From 9fd34708c1f43b07abecce817f4bc3f0ecf959e90ff5edbd9e67b4aa6e61b98e Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Thu, 19 Aug 2010 14:34:50 +0000 Subject: [PATCH 1/6] - bnc#626262 - Populate-on-demand memory problem on xen with hvm guest 21971-pod-accounting.patch - bnc#584204 - xm usb-list broken usb-list.patch - bnc#625520 - TP-L3: NMI cannot be triggered for xen kernel 21926-x86-pv-NMI-inject.patch - bnc#613529 - TP-L3: kdump kernel hangs when crash was initiated from xen kernel 21886-kexec-shutdown.patch - Upstream Intel patches to improve X2APIC handling. 21716-iommu-alloc.patch 21717-ir-qi.patch 21718-x2apic-logic.patch 21933-vtd-ioapic-write.patch 21953-msi-enable.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=71 --- 21333-xentrace-t_info-size.patch | 6 +- 21408-amd-erratum-383.patch | 16 +- 21526-x86-nehalem-cpuid-mask.patch | 209 +++++++-- 21712-amd-osvw.patch | 36 +- 21716-iommu-alloc.patch | 211 +++++++++ 21717-ir-qi.patch | 200 +++++++++ 21718-x2apic-logic.patch | 672 +++++++++++++++++++++++++++++ 21757-x86-mce-avoid-BUG_ON.patch | 38 ++ 21886-kexec-shutdown.patch | 288 +++++++++++++ 21926-x86-pv-NMI-inject.patch | 43 ++ 21933-vtd-ioapic-write.patch | 56 +++ 21953-msi-enable.patch | 68 +++ 21971-pod-accounting.patch | 58 +++ README.SuSE | 7 +- cpupools-core.patch | 176 ++++---- snapshot-xend.patch | 2 +- usb-list.patch | 45 ++ x86-extra-trap-info.patch | 8 +- x86-ioapic-ack-default.patch | 4 +- xen.changes | 44 +- xen.spec | 28 +- 21 files changed, 2011 insertions(+), 204 deletions(-) create mode 100644 21716-iommu-alloc.patch create mode 100644 21717-ir-qi.patch create mode 100644 21718-x2apic-logic.patch create mode 100644 21757-x86-mce-avoid-BUG_ON.patch create mode 100644 21886-kexec-shutdown.patch create mode 100644 21926-x86-pv-NMI-inject.patch create mode 100644 21933-vtd-ioapic-write.patch create mode 100644 21953-msi-enable.patch create mode 100644 21971-pod-accounting.patch create mode 100644 usb-list.patch diff --git a/21333-xentrace-t_info-size.patch b/21333-xentrace-t_info-size.patch index 91b4f9d..f15d9e7 100644 --- a/21333-xentrace-t_info-size.patch +++ b/21333-xentrace-t_info-size.patch @@ -11,10 +11,8 @@ is more than 1024 but less than 2048. Signed-off-by: George Dunlap -Index: xen-4.0.0-testing/xen/common/trace.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/trace.c -+++ xen-4.0.0-testing/xen/common/trace.c +--- a/xen/common/trace.c ++++ b/xen/common/trace.c @@ -367,7 +367,7 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc case XEN_SYSCTL_TBUFOP_get_info: tbc->evt_mask = tb_event_mask; diff --git a/21408-amd-erratum-383.patch b/21408-amd-erratum-383.patch index 90cc985..fc705bc 100644 --- a/21408-amd-erratum-383.patch +++ b/21408-amd-erratum-383.patch @@ -1,3 +1,5 @@ +References: bnc#607219 + # HG changeset patch # User Keir Fraser # Date 1274178085 -3600 @@ -15,10 +17,8 @@ Signed-off-by: Wei Huang Signed-off-by: Joerg Roedel Signed-off-by: Christoph Egger -Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/svm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c +--- a/xen/arch/x86/hvm/svm/svm.c ++++ b/xen/arch/x86/hvm/svm/svm.c @@ -72,6 +72,8 @@ static void *hsa[NR_CPUS] __read_mostly; /* vmcb used for extended host state */ static void *root_vmcb[NR_CPUS] __read_mostly; @@ -28,7 +28,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c static void inline __update_guest_eip( struct cpu_user_regs *regs, unsigned int inst_len) { -@@ -822,6 +824,20 @@ static int svm_cpu_prepare(unsigned int +@@ -822,6 +824,20 @@ static int svm_cpu_prepare(unsigned int return 0; } @@ -115,10 +115,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c break; case VMEXIT_VINTR: -Index: xen-4.0.0-testing/xen/include/asm-x86/msr-index.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/msr-index.h -+++ xen-4.0.0-testing/xen/include/asm-x86/msr-index.h +--- a/xen/include/asm-x86/msr-index.h ++++ b/xen/include/asm-x86/msr-index.h @@ -146,6 +146,11 @@ #define MSR_IA32_MC8_ADDR 0x00000422 #define MSR_IA32_MC8_MISC 0x00000423 diff --git a/21526-x86-nehalem-cpuid-mask.patch b/21526-x86-nehalem-cpuid-mask.patch index a13be19..a4a4594 100644 --- a/21526-x86-nehalem-cpuid-mask.patch +++ b/21526-x86-nehalem-cpuid-mask.patch @@ -8,76 +8,193 @@ Intel: Add CPUID feature mask support for NHM processors. Signed-off-by: Jun Nakajima Signed-off-by: Liping Ke +# HG changeset patch +# User Keir Fraser +# Date 1276604335 -3600 +# Node ID 2501732e291b001711a0dc1c474bb89ce77f3110 +# Parent a2cc1db1af9c8f9b148c80f8b2c3f64bde7542f9 +x86: fix pv cpuid masking + +Invert initial values of the variables parsed into from the command +line, so that completely clearing out one or more of the four bit +fields is possible. + +Further, consolidate the command line parameter specifications into +a single place. + +Finally, as per "Intel Virtualization Technology FlexMigration +Application Note" (http://www.intel.com/Assets/PDF/manual/323850.pdf), +also handle family 6 model 0x1f. + +What remains open is the question whether pv_cpuid() shouldn't also +consume these masks. + +Signed-off-by: Jan Beulich + +--- a/xen/arch/x86/cpu/amd.c ++++ b/xen/arch/x86/cpu/amd.c +@@ -33,14 +33,6 @@ void start_svm(struct cpuinfo_x86 *c); + static char opt_famrev[14]; + string_param("cpuid_mask_cpu", opt_famrev); + +-/* Finer-grained CPUID feature control. */ +-static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; +-integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); +-integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); +-static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; +-integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); +-integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); +- + static inline void wrmsr_amd(unsigned int index, unsigned int lo, + unsigned int hi) + { +@@ -61,7 +53,7 @@ static inline void wrmsr_amd(unsigned in + * + * The processor revision string parameter has precedene. + */ +-static void __devinit set_cpuidmask(struct cpuinfo_x86 *c) ++static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) + { + static unsigned int feat_ecx, feat_edx; + static unsigned int extfeat_ecx, extfeat_edx; +@@ -76,12 +68,12 @@ static void __devinit set_cpuidmask(stru + ASSERT((status == not_parsed) && (smp_processor_id() == 0)); + status = no_mask; + +- if (opt_cpuid_mask_ecx | opt_cpuid_mask_edx | +- opt_cpuid_mask_ext_ecx | opt_cpuid_mask_ext_edx) { +- feat_ecx = opt_cpuid_mask_ecx ? : ~0U; +- feat_edx = opt_cpuid_mask_edx ? : ~0U; +- extfeat_ecx = opt_cpuid_mask_ext_ecx ? : ~0U; +- extfeat_edx = opt_cpuid_mask_ext_edx ? : ~0U; ++ if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & ++ opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) { ++ feat_ecx = opt_cpuid_mask_ecx; ++ feat_edx = opt_cpuid_mask_edx; ++ extfeat_ecx = opt_cpuid_mask_ext_ecx; ++ extfeat_edx = opt_cpuid_mask_ext_edx; + } else if (*opt_famrev == '\0') { + return; + } else if (!strcmp(opt_famrev, "fam_0f_rev_c")) { +--- a/xen/arch/x86/cpu/common.c ++++ b/xen/arch/x86/cpu/common.c +@@ -22,6 +22,15 @@ static int cachesize_override __cpuinitd + static int disable_x86_fxsr __cpuinitdata; + static int disable_x86_serial_nr __cpuinitdata; + ++unsigned int __devinitdata opt_cpuid_mask_ecx = ~0u; ++integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); ++unsigned int __devinitdata opt_cpuid_mask_edx = ~0u; ++integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); ++unsigned int __devinitdata opt_cpuid_mask_ext_ecx = ~0u; ++integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); ++unsigned int __devinitdata opt_cpuid_mask_ext_edx = ~0u; ++integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); ++ + struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; + + /* +--- a/xen/arch/x86/cpu/cpu.h ++++ b/xen/arch/x86/cpu/cpu.h +@@ -21,6 +21,9 @@ struct cpu_dev { + + extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM]; + ++extern unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; ++extern unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; ++ + extern int get_model_name(struct cpuinfo_x86 *c); + extern void display_cacheinfo(struct cpuinfo_x86 *c); + --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c -@@ -29,6 +29,9 @@ extern int trap_init_f00f_bug(void); - static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; - integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); - integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); -+static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; -+integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); -+integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); +@@ -20,16 +20,6 @@ + extern int trap_init_f00f_bug(void); + +-/* +- * opt_cpuid_mask_ecx/edx: cpuid.1[ecx, edx] feature mask. +- * For example, E8400[Intel Core 2 Duo Processor series] ecx = 0x0008E3FD, +- * edx = 0xBFEBFBFF when executing CPUID.EAX = 1 normally. If you want to +- * 'rev down' to E8400, you can set these values in these Xen boot parameters. +- */ +-static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; +-integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); +-integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); +- static int use_xsave = 1; boolean_param("xsave", use_xsave); -@@ -40,24 +43,46 @@ boolean_param("xsave", use_xsave); + +@@ -40,24 +30,57 @@ boolean_param("xsave", use_xsave); struct movsl_mask movsl_mask __read_mostly; #endif -static void __devinit set_cpuidmask(void) -+static void __devinit set_cpuidmask(struct cpuinfo_x86 *c) ++/* ++ * opt_cpuid_mask_ecx/edx: cpuid.1[ecx, edx] feature mask. ++ * For example, E8400[Intel Core 2 Duo Processor series] ecx = 0x0008E3FD, ++ * edx = 0xBFEBFBFF when executing CPUID.EAX = 1 normally. If you want to ++ * 'rev down' to E8400, you can set these values in these Xen boot parameters. ++ */ ++static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) { - unsigned int eax, ebx, ecx, edx, model; -+ unsigned int model = c->x86_model; ++ const char *extra = ""; - if (!(opt_cpuid_mask_ecx | opt_cpuid_mask_edx)) -+ if (!(opt_cpuid_mask_ecx | opt_cpuid_mask_edx | -+ opt_cpuid_mask_ext_ecx | opt_cpuid_mask_ext_edx)) ++ if (!~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & ++ opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) return; - cpuid(0x00000001, &eax, &ebx, &ecx, &edx); - model = ((eax & 0xf0000) >> 12) | ((eax & 0xf0) >> 4); - if (!((model == 0x1d) || ((model == 0x17) && ((eax & 0xf) >= 4)))) { -+ if (c->x86 != 0x6) /* Only family 6 supports this feature */ -+ return; -+ -+ if ((model == 0x1d) || ((model == 0x17) && (c->x86_mask >= 4))) { -+ wrmsr(MSR_IA32_CPUID_FEATURE_MASK1, -+ opt_cpuid_mask_ecx ? : ~0u, -+ opt_cpuid_mask_edx ? : ~0u); -+ } -+/* +- printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", +- smp_processor_id()); ++ /* Only family 6 supports this feature */ ++ switch ((c->x86 == 6) * c->x86_model) { ++ case 0x17: ++ if ((c->x86_mask & 0x0f) < 4) ++ break; ++ /* fall through */ ++ case 0x1d: ++ wrmsr(MSR_INTEL_CPUID_FEATURE_MASK, ++ opt_cpuid_mask_ecx, ++ opt_cpuid_mask_edx); ++ if (!~(opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) ++ return; ++ extra = "extended "; ++ break; ++/* + * CPU supports this feature if the processor signature meets the following: + * (CPUID.(EAX=01h):EAX) > 000106A2h, or + * (CPUID.(EAX=01h):EAX) == 000106Exh, 0002065xh, 000206Cxh, 000206Exh, or 000206Fxh + * + */ -+ else if (((model == 0x1a) && (c->x86_mask > 2)) -+ || model == 0x1e -+ || model == 0x25 -+ || model == 0x2c -+ || model == 0x2e -+ || model == 0x2f) { -+ wrmsr(MSR_IA32_CPUID1_FEATURE_MASK, -+ opt_cpuid_mask_ecx ? : ~0u, -+ opt_cpuid_mask_edx ? : ~0u); -+ wrmsr(MSR_IA32_CPUID80000001_FEATURE_MASK, -+ opt_cpuid_mask_ext_ecx ? : ~0u, -+ opt_cpuid_mask_ext_edx ? : ~0u); -+ } -+ else { - printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", - smp_processor_id()); ++ case 0x1a: ++ if ((c->x86_mask & 0x0f) <= 2) ++ break; ++ /* fall through */ ++ case 0x1e: case 0x1f: ++ case 0x25: case 0x2c: case 0x2e: case 0x2f: ++ wrmsr(MSR_INTEL_CPUID1_FEATURE_MASK, ++ opt_cpuid_mask_ecx, ++ opt_cpuid_mask_edx); ++ wrmsr(MSR_INTEL_CPUID80000001_FEATURE_MASK, ++ opt_cpuid_mask_ext_ecx, ++ opt_cpuid_mask_ext_edx); return; } -- + - wrmsr(MSR_IA32_CPUID_FEATURE_MASK1, - opt_cpuid_mask_ecx ? : ~0u, - opt_cpuid_mask_edx ? : ~0u); ++ printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", ++ smp_processor_id()); } void __devinit early_intel_workaround(struct cpuinfo_x86 *c) -@@ -179,7 +204,7 @@ static void __devinit init_intel(struct +@@ -179,7 +202,7 @@ static void __devinit init_intel(struct detect_ht(c); @@ -88,12 +205,16 @@ Signed-off-by: Liping Ke Intel_errata_workarounds(c); --- a/xen/include/asm-x86/msr-index.h +++ b/xen/include/asm-x86/msr-index.h -@@ -158,6 +158,8 @@ +@@ -156,8 +156,10 @@ + #define MSR_P6_EVNTSEL0 0x00000186 + #define MSR_P6_EVNTSEL1 0x00000187 - /* MSR for cpuid feature mask */ - #define MSR_IA32_CPUID_FEATURE_MASK1 0x00000478 -+#define MSR_IA32_CPUID1_FEATURE_MASK 0x00000130 -+#define MSR_IA32_CPUID80000001_FEATURE_MASK 0x00000131 +-/* MSR for cpuid feature mask */ +-#define MSR_IA32_CPUID_FEATURE_MASK1 0x00000478 ++/* MSRs for Intel cpuid feature mask */ ++#define MSR_INTEL_CPUID_FEATURE_MASK 0x00000478 ++#define MSR_INTEL_CPUID1_FEATURE_MASK 0x00000130 ++#define MSR_INTEL_CPUID80000001_FEATURE_MASK 0x00000131 /* MSRs & bits used for VMX enabling */ #define MSR_IA32_VMX_BASIC 0x480 diff --git a/21712-amd-osvw.patch b/21712-amd-osvw.patch index 096424b..34cebd3 100644 --- a/21712-amd-osvw.patch +++ b/21712-amd-osvw.patch @@ -17,10 +17,8 @@ Signed-off-by: Wei Huang Signed-off-by: Hans Rosenfeld Acked-by: Jan Beulich -Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/cpu/amd.c -+++ xen-4.0.0-testing/xen/arch/x86/cpu/amd.c +--- a/xen/arch/x86/cpu/amd.c ++++ b/xen/arch/x86/cpu/amd.c @@ -7,11 +7,11 @@ #include #include @@ -34,7 +32,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.c void start_svm(struct cpuinfo_x86 *c); -@@ -157,6 +157,54 @@ static void __devinit set_cpuidmask(stru +@@ -149,6 +149,54 @@ static void __devinit set_cpuidmask(cons } /* @@ -89,9 +87,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.c * amd_flush_filter={on,off}. Forcibly Enable or disable the TLB flush * filter on AMD 64-bit processors. */ -Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/cpu/amd.h +--- a/xen/arch/x86/cpu/amd.h +++ /dev/null @@ -1,103 +0,0 @@ -/* @@ -197,10 +193,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.h -#define AMD_EXTFEATURES_FAM11h_REV_B_EDX AMD_EXTFEATURES_K8_REV_G_EDX - -#endif /* __AMD_H__ */ -Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/asid.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/asid.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/asid.c +--- a/xen/arch/x86/hvm/svm/asid.c ++++ b/xen/arch/x86/hvm/svm/asid.c @@ -21,14 +21,14 @@ #include #include @@ -218,10 +212,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/asid.c nasids = cpuid_ebx(0x8000000A); hvm_asid_init(nasids); -Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/svm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c +--- a/xen/arch/x86/hvm/svm/svm.c ++++ b/xen/arch/x86/hvm/svm/svm.c @@ -34,6 +34,7 @@ #include #include @@ -230,7 +222,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c #include #include #include -@@ -828,8 +829,8 @@ static void svm_init_erratum_383(struct +@@ -828,8 +829,8 @@ static void svm_init_erratum_383(struct { uint64_t msr_content; @@ -241,10 +233,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c return; rdmsrl(MSR_AMD64_DC_CFG, msr_content); -Index: xen-4.0.0-testing/xen/include/asm-x86/amd.h -=================================================================== --- /dev/null -+++ xen-4.0.0-testing/xen/include/asm-x86/amd.h ++++ b/xen/include/asm-x86/amd.h @@ -0,0 +1,137 @@ +/* + * amd.h - AMD processor specific definitions @@ -383,10 +373,8 @@ Index: xen-4.0.0-testing/xen/include/asm-x86/amd.h + +int cpu_has_amd_erratum(const struct cpuinfo_x86 *, int, ...); +#endif /* __AMD_H__ */ -Index: xen-4.0.0-testing/xen/include/asm-x86/msr-index.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/msr-index.h -+++ xen-4.0.0-testing/xen/include/asm-x86/msr-index.h +--- a/xen/include/asm-x86/msr-index.h ++++ b/xen/include/asm-x86/msr-index.h @@ -251,6 +251,10 @@ #define MSR_AMD_PATCHLEVEL 0x0000008b #define MSR_AMD_PATCHLOADER 0xc0010020 diff --git a/21716-iommu-alloc.patch b/21716-iommu-alloc.patch new file mode 100644 index 0000000..d396aa5 --- /dev/null +++ b/21716-iommu-alloc.patch @@ -0,0 +1,211 @@ +# HG changeset patch +# User Keir Fraser +# Date 1279186958 -3600 +# Node ID 4ba86edf38f816a0d94cfb85b90074a72113e41c +# Parent 57859775f88f5339fa256e43ee2744be7226c093 +x2APIC/VT-d: allocate iommu when create a drhd + +A drhd is created when parse ACPI DMAR table, but drhd->iommu is not +allocated until iommu setup. But iommu is needed by x2APIC which will +enable interrupt remapping before iommu setup. This patch allocates +iommu when create drhd. And then drhd->ecap can be removed because +it's the same as iommu->ecap. + +Signed-off-by: Weidong Han +xen-unstable changeset: 21716:64a80813978f +xen-unstable date: Mon Jul 05 08:29:10 2010 +0100 + +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/dmar.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/dmar.c ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/dmar.c +@@ -32,6 +32,7 @@ + #include "dmar.h" + #include "iommu.h" + #include "extern.h" ++#include "vtd.h" + + #undef PREFIX + #define PREFIX VTDPREFIX "ACPI DMAR:" +@@ -378,7 +379,6 @@ acpi_parse_one_drhd(struct acpi_dmar_ent + struct acpi_table_drhd * drhd = (struct acpi_table_drhd *)header; + void *dev_scope_start, *dev_scope_end; + struct acpi_drhd_unit *dmaru; +- void *addr; + int ret; + static int include_all = 0; + +@@ -397,8 +397,9 @@ acpi_parse_one_drhd(struct acpi_dmar_ent + dprintk(VTDPREFIX, " dmaru->address = %"PRIx64"\n", + dmaru->address); + +- addr = map_to_nocache_virt(0, drhd->address); +- dmaru->ecap = dmar_readq(addr, DMAR_ECAP_REG); ++ ret = iommu_alloc(dmaru); ++ if ( ret ) ++ goto out; + + dev_scope_start = (void *)(drhd + 1); + dev_scope_end = ((void *)drhd) + header->length; +@@ -420,7 +421,7 @@ acpi_parse_one_drhd(struct acpi_dmar_ent + } + + if ( ret ) +- xfree(dmaru); ++ goto out; + else if ( force_iommu || dmaru->include_all ) + acpi_register_drhd_unit(dmaru); + else +@@ -451,14 +452,15 @@ acpi_parse_one_drhd(struct acpi_dmar_ent + + if ( invalid_cnt ) + { +- xfree(dmaru); +- + if ( iommu_workaround_bios_bug && + invalid_cnt == dmaru->scope.devices_cnt ) + { + dprintk(XENLOG_WARNING VTDPREFIX, + " Workaround BIOS bug: ignore the DRHD due to all " + "devices under its scope are not PCI discoverable!\n"); ++ ++ iommu_free(dmaru); ++ xfree(dmaru); + } + else + { +@@ -474,6 +476,12 @@ acpi_parse_one_drhd(struct acpi_dmar_ent + acpi_register_drhd_unit(dmaru); + } + ++out: ++ if ( ret ) ++ { ++ iommu_free(dmaru); ++ xfree(dmaru); ++ } + return ret; + } + +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/dmar.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/dmar.h ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/dmar.h +@@ -50,7 +50,6 @@ struct acpi_drhd_unit { + struct dmar_scope scope; /* must be first member of struct */ + struct list_head list; + u64 address; /* register base address of the unit */ +- u64 ecap; + u8 include_all:1; + struct iommu *iommu; + struct list_head ioapic_list; +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/intremap.c ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c +@@ -135,15 +135,20 @@ int iommu_supports_eim(void) + /* We MUST have a DRHD unit for each IOAPIC. */ + for ( apic = 0; apic < nr_ioapics; apic++ ) + if ( !ioapic_to_drhd(IO_APIC_ID(apic)) ) ++ { ++ dprintk(XENLOG_WARNING VTDPREFIX, ++ "There is not a DRHD for IOAPIC 0x%x (id: 0x%x)!\n", ++ apic, IO_APIC_ID(apic)); + return 0; ++ } + + if ( list_empty(&acpi_drhd_units) ) + return 0; + + for_each_drhd_unit ( drhd ) +- if ( !ecap_queued_inval(drhd->ecap) || +- !ecap_intr_remap(drhd->ecap) || +- !ecap_eim(drhd->ecap) ) ++ if ( !ecap_queued_inval(drhd->iommu->ecap) || ++ !ecap_intr_remap(drhd->iommu->ecap) || ++ !ecap_eim(drhd->iommu->ecap) ) + return 0; + + return 1; +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/iommu.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/iommu.c ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/iommu.c +@@ -143,15 +143,18 @@ struct iommu_flush *iommu_get_flush(stru + return iommu ? &iommu->intel->flush : NULL; + } + +-static unsigned int clflush_size; + static int iommus_incoherent; + static void __iommu_flush_cache(void *addr, unsigned int size) + { + int i; ++ static unsigned int clflush_size = 0; + + if ( !iommus_incoherent ) + return; + ++ if ( clflush_size == 0 ) ++ clflush_size = get_cache_line_size(); ++ + for ( i = 0; i < size; i += clflush_size ) + cacheline_flush((char *)addr + i); + } +@@ -1036,7 +1039,7 @@ static int iommu_set_interrupt(struct io + return irq; + } + +-static int iommu_alloc(struct acpi_drhd_unit *drhd) ++int __init iommu_alloc(struct acpi_drhd_unit *drhd) + { + struct iommu *iommu; + unsigned long sagaw, nr_dom; +@@ -1130,7 +1133,7 @@ static int iommu_alloc(struct acpi_drhd_ + return 0; + } + +-static void iommu_free(struct acpi_drhd_unit *drhd) ++void __init iommu_free(struct acpi_drhd_unit *drhd) + { + struct iommu *iommu = drhd->iommu; + +@@ -1938,8 +1941,6 @@ int intel_vtd_setup(void) + + platform_quirks(); + +- clflush_size = get_cache_line_size(); +- + irq_to_iommu = xmalloc_array(struct iommu*, nr_irqs); + BUG_ON(!irq_to_iommu); + memset(irq_to_iommu, 0, nr_irqs * sizeof(struct iommu*)); +@@ -1953,9 +1954,6 @@ int intel_vtd_setup(void) + */ + for_each_drhd_unit ( drhd ) + { +- if ( iommu_alloc(drhd) != 0 ) +- goto error; +- + iommu = drhd->iommu; + + if ( iommu_snoop && !ecap_snp_ctl(iommu->ecap) ) +@@ -1995,8 +1993,6 @@ int intel_vtd_setup(void) + return 0; + + error: +- for_each_drhd_unit ( drhd ) +- iommu_free(drhd); + iommu_enabled = 0; + iommu_snoop = 0; + iommu_passthrough = 0; +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/vtd.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/vtd.h ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/vtd.h +@@ -108,4 +108,7 @@ void unmap_vtd_domain_page(void *va); + void iommu_flush_cache_entry(void *addr, unsigned int size); + void iommu_flush_cache_page(void *addr, unsigned long npages); + ++int iommu_alloc(struct acpi_drhd_unit *drhd); ++void iommu_free(struct acpi_drhd_unit *drhd); ++ + #endif // _VTD_H_ diff --git a/21717-ir-qi.patch b/21717-ir-qi.patch new file mode 100644 index 0000000..6afa561 --- /dev/null +++ b/21717-ir-qi.patch @@ -0,0 +1,200 @@ +# HG changeset patch +# User Keir Fraser +# Date 1279186999 -3600 +# Node ID a35e5f33a72eee3d00cec6972bb93585609559e2 +# Parent 4ba86edf38f816a0d94cfb85b90074a72113e41c +x2APIC/VT-d: improve interrupt remapping and queued invalidation enabling and disabling + +x2APIC depends on interrupt remapping, so interrupt remapping needs to +be enabled before x2APIC. Usually x2APIC is not enabled +(x2apic_enabled=0) when enable interrupt remapping, although x2APIC +will be enabled later. So it needs to pass a parameter to set +interrupt mode in intremap_enable, instead of checking +x2apic_enable. This patch adds a parameter "eim" to intremap_enable to +achieve it. Interrupt remapping and queued invalidation are already +enabled when enable x2apic, so it needn't to enable them again when +setup iommu. This patch checks if interrupt remapping and queued +invalidation are already enable or not, and won't enable them if +already enabled. It does the similar in disabling, that's to say don't +disable them if already disabled. + +Signed-off-by: Weidong Han +xen-unstable changeset: 21717:176956d1d2fd +xen-unstable date: Mon Jul 05 08:30:25 2010 +0100 + +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/extern.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/extern.h ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/extern.h +@@ -33,7 +33,7 @@ extern struct keyhandler dump_iommu_info + + int enable_qinval(struct iommu *iommu); + void disable_qinval(struct iommu *iommu); +-int enable_intremap(struct iommu *iommu); ++int enable_intremap(struct iommu *iommu, int eim); + void disable_intremap(struct iommu *iommu); + int queue_invalidate_context(struct iommu *iommu, + u16 did, u16 source_id, u8 function_mask, u8 granu); +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/intremap.c ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c +@@ -709,7 +709,7 @@ void msi_msg_write_remap_rte( + } + #endif + +-int enable_intremap(struct iommu *iommu) ++int enable_intremap(struct iommu *iommu, int eim) + { + struct acpi_drhd_unit *drhd; + struct ir_ctrl *ir_ctrl; +@@ -719,10 +719,25 @@ int enable_intremap(struct iommu *iommu) + ASSERT(ecap_intr_remap(iommu->ecap) && iommu_intremap); + + ir_ctrl = iommu_ir_ctrl(iommu); ++ sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); ++ ++ /* Return if already enabled by Xen */ ++ if ( (sts & DMA_GSTS_IRES) && ir_ctrl->iremap_maddr ) ++ return 0; ++ ++ sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); ++ if ( !(sts & DMA_GSTS_QIES) ) ++ { ++ dprintk(XENLOG_ERR VTDPREFIX, ++ "Queued invalidation is not enabled, should not enable " ++ "interrupt remapping\n"); ++ return -EINVAL; ++ } ++ + if ( ir_ctrl->iremap_maddr == 0 ) + { + drhd = iommu_to_drhd(iommu); +- ir_ctrl->iremap_maddr = alloc_pgtable_maddr(drhd, IREMAP_ARCH_PAGE_NR ); ++ ir_ctrl->iremap_maddr = alloc_pgtable_maddr(drhd, IREMAP_ARCH_PAGE_NR); + if ( ir_ctrl->iremap_maddr == 0 ) + { + dprintk(XENLOG_WARNING VTDPREFIX, +@@ -735,7 +750,7 @@ int enable_intremap(struct iommu *iommu) + #ifdef CONFIG_X86 + /* set extended interrupt mode bit */ + ir_ctrl->iremap_maddr |= +- x2apic_enabled ? (1 << IRTA_REG_EIME_SHIFT) : 0; ++ eim ? (1 << IRTA_REG_EIME_SHIFT) : 0; + #endif + spin_lock_irqsave(&iommu->register_lock, flags); + +@@ -772,13 +787,18 @@ void disable_intremap(struct iommu *iomm + u32 sts; + unsigned long flags; + +- ASSERT(ecap_intr_remap(iommu->ecap) && iommu_intremap); ++ if ( !ecap_intr_remap(iommu->ecap) ) ++ return; + + spin_lock_irqsave(&iommu->register_lock, flags); + sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); ++ if ( !(sts & DMA_GSTS_IRES) ) ++ goto out; ++ + dmar_writel(iommu->reg, DMAR_GCMD_REG, sts & (~DMA_GCMD_IRE)); + + IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, dmar_readl, + !(sts & DMA_GSTS_IRES), sts); ++out: + spin_unlock_irqrestore(&iommu->register_lock, flags); + } +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/iommu.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/iommu.c ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/iommu.c +@@ -1829,24 +1829,20 @@ static int init_vtd_hw(void) + spin_lock_irqsave(&iommu->register_lock, flags); + dmar_writel(iommu->reg, DMAR_FECTL_REG, 0); + spin_unlock_irqrestore(&iommu->register_lock, flags); +- +- /* initialize flush functions */ +- flush = iommu_get_flush(iommu); +- flush->context = flush_context_reg; +- flush->iotlb = flush_iotlb_reg; + } + +- if ( iommu_qinval ) ++ for_each_drhd_unit ( drhd ) + { +- for_each_drhd_unit ( drhd ) ++ iommu = drhd->iommu; ++ /* ++ * If queued invalidation not enabled, use regiser based ++ * invalidation ++ */ ++ if ( enable_qinval(iommu) != 0 ) + { +- iommu = drhd->iommu; +- if ( enable_qinval(iommu) != 0 ) +- { +- dprintk(XENLOG_INFO VTDPREFIX, +- "Failed to enable Queued Invalidation!\n"); +- break; +- } ++ flush = iommu_get_flush(iommu); ++ flush->context = flush_context_reg; ++ flush->iotlb = flush_iotlb_reg; + } + } + +@@ -1872,9 +1868,9 @@ static int init_vtd_hw(void) + for_each_drhd_unit ( drhd ) + { + iommu = drhd->iommu; +- if ( enable_intremap(iommu) != 0 ) ++ if ( enable_intremap(iommu, 0) != 0 ) + { +- dprintk(XENLOG_INFO VTDPREFIX, ++ dprintk(XENLOG_WARNING VTDPREFIX, + "Failed to enable Interrupt Remapping!\n"); + break; + } +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/qinval.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/qinval.c ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/qinval.c +@@ -437,10 +437,16 @@ int enable_qinval(struct iommu *iommu) + u32 sts; + unsigned long flags; + ++ if ( !ecap_queued_inval(iommu->ecap) || !iommu_qinval ) ++ return -ENOENT; ++ + qi_ctrl = iommu_qi_ctrl(iommu); + flush = iommu_get_flush(iommu); + +- ASSERT(ecap_queued_inval(iommu->ecap) && iommu_qinval); ++ /* Return if already enabled by Xen */ ++ sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); ++ if ( (sts & DMA_GSTS_QIES) && qi_ctrl->qinval_maddr ) ++ return 0; + + if ( qi_ctrl->qinval_maddr == 0 ) + { +@@ -488,14 +494,19 @@ void disable_qinval(struct iommu *iommu) + u32 sts; + unsigned long flags; + +- ASSERT(ecap_queued_inval(iommu->ecap) && iommu_qinval); ++ if ( !ecap_queued_inval(iommu->ecap) ) ++ return; + + spin_lock_irqsave(&iommu->register_lock, flags); + sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); ++ if ( !(sts & DMA_GSTS_QIES) ) ++ goto out; ++ + dmar_writel(iommu->reg, DMAR_GCMD_REG, sts & (~DMA_GCMD_QIE)); + + /* Make sure hardware complete it */ + IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, dmar_readl, + !(sts & DMA_GSTS_QIES), sts); ++out: + spin_unlock_irqrestore(&iommu->register_lock, flags); + } diff --git a/21718-x2apic-logic.patch b/21718-x2apic-logic.patch new file mode 100644 index 0000000..c7a44c5 --- /dev/null +++ b/21718-x2apic-logic.patch @@ -0,0 +1,672 @@ +# HG changeset patch +# User Keir Fraser +# Date 1279187030 -3600 +# Node ID d5727c760ff074177ce1d9e7c36dbbe2c1f4f37f +# Parent a35e5f33a72eee3d00cec6972bb93585609559e2 +x2APIC: improve enabling logic + +This patch masks PIC and IOAPIC RTE's before x2APIC enabling, unmask +and restore them after x2APIC enabling. It also really enables +interrupt remapping before x2APIC enabling instead of just checking +interrupt remapping setting. This patch also handles all x2APIC +configuration including BIOS settings and command line +settings. Especially, it handles that BIOS hands over in x2APIC mode +(when there is apic id > 255). It checks if x2APIC is already enabled +by BIOS. If already enabled, it will disable interrupt remapping and +queued invalidation first, then enable them again. + +Signed-off-by: Weidong Han +xen-unstable changeset: 21718:34f612ed4184 +xen-unstable date: Mon Jul 05 08:31:29 2010 +0100 + +Index: xen-4.0.0-testing/xen/arch/x86/apic.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/apic.c ++++ xen-4.0.0-testing/xen/arch/x86/apic.c +@@ -70,6 +70,9 @@ int apic_verbosity; + int x2apic_enabled __read_mostly = 0; + int directed_eoi_enabled __read_mostly = 0; + ++/* x2APIC is enabled in BIOS */ ++static int x2apic_preenabled; ++ + /* + * The following vectors are part of the Linux architecture, there + * is no hardware IRQ pin equivalent for them, they are triggered +@@ -493,6 +496,47 @@ static void apic_pm_activate(void) + apic_pm_state.active = 1; + } + ++static void resume_x2apic(void) ++{ ++ uint64_t msr_content; ++ struct IO_APIC_route_entry **ioapic_entries = NULL; ++ ++ ASSERT(x2apic_enabled); ++ ++ ioapic_entries = alloc_ioapic_entries(); ++ if ( !ioapic_entries ) ++ { ++ printk("Allocate ioapic_entries failed\n"); ++ goto out; ++ } ++ ++ if ( save_IO_APIC_setup(ioapic_entries) ) ++ { ++ printk("Saving IO-APIC state failed\n"); ++ goto out; ++ } ++ ++ mask_8259A(); ++ mask_IO_APIC_setup(ioapic_entries); ++ ++ iommu_enable_IR(); ++ ++ rdmsrl(MSR_IA32_APICBASE, msr_content); ++ if ( !(msr_content & MSR_IA32_APICBASE_EXTD) ) ++ { ++ msr_content |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD; ++ msr_content = (uint32_t)msr_content; ++ wrmsrl(MSR_IA32_APICBASE, msr_content); ++ } ++ ++ restore_IO_APIC_setup(ioapic_entries); ++ unmask_8259A(); ++ ++out: ++ if ( ioapic_entries ) ++ free_ioapic_entries(ioapic_entries); ++} ++ + void __devinit setup_local_APIC(void) + { + unsigned long oldvalue, value, ver, maxlvt; +@@ -731,7 +775,7 @@ int lapic_resume(void) + wrmsr(MSR_IA32_APICBASE, l, h); + } + else +- enable_x2apic(); ++ resume_x2apic(); + + apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED); + apic_write(APIC_ID, apic_pm_state.apic_id); +@@ -895,45 +939,152 @@ no_apic: + return -1; + } + +-void enable_x2apic(void) ++void check_x2apic_preenabled(void) + { + u32 lo, hi; + +- if ( smp_processor_id() == 0 ) ++ if ( !x2apic_is_available() ) ++ return; ++ ++ rdmsr(MSR_IA32_APICBASE, lo, hi); ++ if ( lo & MSR_IA32_APICBASE_EXTD ) + { +- if ( !iommu_supports_eim() ) ++ printk("x2APIC mode is already enabled by BIOS.\n"); ++ x2apic_preenabled = 1; ++ x2apic_enabled = 1; ++ } ++} ++ ++static void enable_bsp_x2apic(void) ++{ ++ struct IO_APIC_route_entry **ioapic_entries = NULL; ++ const struct genapic *x2apic_genapic = NULL; ++ ++ ASSERT(smp_processor_id() == 0); ++ ++ if ( x2apic_preenabled ) ++ { ++ /* ++ * Interrupt remapping should be also enabled by BIOS when ++ * x2APIC is already enabled by BIOS, otherwise it's a BIOS ++ * bug ++ */ ++ if ( !intremap_enabled() ) ++ panic("Interrupt remapping is not enabled by BIOS while " ++ "x2APIC is already enabled by BIOS!\n"); ++ } ++ ++ x2apic_genapic = apic_x2apic_probe(); ++ if ( x2apic_genapic ) ++ genapic = x2apic_genapic; ++ else ++ { ++ if ( x2apic_cmdline_disable() ) + { +- printk("x2APIC would not be enabled without EIM.\n"); +- return; ++ if ( x2apic_preenabled ) ++ { ++ /* Ignore x2apic=0, and set default x2apic mode */ ++ genapic = &apic_x2apic_cluster; ++ printk("x2APIC: already enabled by BIOS, ignore x2apic=0.\n"); ++ } ++ else ++ { ++ printk("Not enable x2APIC due to x2apic=0 is set.\n"); ++ return; ++ } + } +- +- if ( apic_x2apic_phys.probe() ) +- genapic = &apic_x2apic_phys; +- else if ( apic_x2apic_cluster.probe() ) +- genapic = &apic_x2apic_cluster; + else + { +- printk("x2APIC would not be enabled due to x2apic=off.\n"); +- return; ++ if ( !iommu_enabled || !iommu_intremap || !iommu_qinval ) ++ panic("Cannot enable x2APIC due to iommu or interrupt " ++ "remapping or queued invalidation is disabled " ++ "by command line!\n"); ++ else ++ { ++ if ( x2apic_preenabled ) ++ panic("x2APIC: already enabled by BIOS, but " ++ "iommu_supports_eim fails\n"); ++ else ++ { ++ printk("Not enable x2APIC due to " ++ "iommu_supports_eim fails!\n"); ++ return; ++ } ++ } + } ++ } + +- x2apic_enabled = 1; +- printk("Switched to APIC driver %s.\n", genapic->name); ++ ioapic_entries = alloc_ioapic_entries(); ++ if ( !ioapic_entries ) ++ { ++ printk("Allocate ioapic_entries failed\n"); ++ goto out; + } +- else ++ ++ if ( save_IO_APIC_setup(ioapic_entries) ) + { +- BUG_ON(!x2apic_enabled); /* APs only enable x2apic when BSP did so. */ ++ printk("Saving IO-APIC state failed\n"); ++ goto out; + } + ++ mask_8259A(); ++ mask_IO_APIC_setup(ioapic_entries); ++ ++ if ( iommu_enable_IR() ) ++ { ++ printk("Would not enable x2APIC due to interrupt remapping " ++ "cannot be enabled.\n"); ++ goto restore_out; ++ } ++ ++ x2apic_enabled = 1; ++ printk("Switched to APIC driver %s.\n", genapic->name); ++ ++ if ( !x2apic_preenabled ) ++ { ++ u32 lo, hi; ++ ++ rdmsr(MSR_IA32_APICBASE, lo, hi); ++ if ( !(lo & MSR_IA32_APICBASE_EXTD) ) ++ { ++ lo |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD; ++ wrmsr(MSR_IA32_APICBASE, lo, 0); ++ printk("x2APIC mode enabled.\n"); ++ } ++ } ++ ++restore_out: ++ restore_IO_APIC_setup(ioapic_entries); ++ unmask_8259A(); ++ ++out: ++ if ( ioapic_entries ) ++ free_ioapic_entries(ioapic_entries); ++} ++ ++static void enable_ap_x2apic(void) ++{ ++ u32 lo, hi; ++ ++ ASSERT(smp_processor_id() != 0); ++ ++ /* APs only enable x2apic when BSP did so. */ ++ BUG_ON(!x2apic_enabled); ++ + rdmsr(MSR_IA32_APICBASE, lo, hi); + if ( !(lo & MSR_IA32_APICBASE_EXTD) ) + { + lo |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD; + wrmsr(MSR_IA32_APICBASE, lo, 0); +- printk("x2APIC mode enabled.\n"); + } ++} ++ ++void enable_x2apic(void) ++{ ++ if ( smp_processor_id() == 0 ) ++ enable_bsp_x2apic(); + else +- printk("x2APIC mode enabled by BIOS.\n"); ++ enable_ap_x2apic(); + } + + void __init init_apic_mappings(void) +Index: xen-4.0.0-testing/xen/arch/x86/genapic/x2apic.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/genapic/x2apic.c ++++ xen-4.0.0-testing/xen/arch/x86/genapic/x2apic.c +@@ -29,6 +29,11 @@ boolean_param("x2apic", x2apic); + static int x2apic_phys; /* By default we use logical cluster mode. */ + boolean_param("x2apic_phys", x2apic_phys); + ++int x2apic_cmdline_disable(void) ++{ ++ return (x2apic == 0); ++} ++ + static int probe_x2apic_phys(void) + { + return x2apic && x2apic_phys && x2apic_is_available() && +@@ -51,6 +56,20 @@ const struct genapic apic_x2apic_cluster + GENAPIC_X2APIC_CLUSTER + }; + ++const struct genapic *apic_x2apic_probe(void) ++{ ++ if ( !x2apic || !x2apic_is_available() ) ++ return NULL; ++ ++ if ( !iommu_supports_eim() ) ++ return NULL; ++ ++ if ( x2apic_phys ) ++ return &apic_x2apic_phys; ++ else ++ return &apic_x2apic_cluster; ++} ++ + void init_apic_ldr_x2apic_phys(void) + { + return; +Index: xen-4.0.0-testing/xen/arch/x86/i8259.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/i8259.c ++++ xen-4.0.0-testing/xen/arch/x86/i8259.c +@@ -175,6 +175,26 @@ int i8259A_irq_pending(unsigned int irq) + return ret; + } + ++void mask_8259A(void) ++{ ++ unsigned long flags; ++ ++ spin_lock_irqsave(&i8259A_lock, flags); ++ outb(0xff, 0xA1); ++ outb(0xff, 0x21); ++ spin_unlock_irqrestore(&i8259A_lock, flags); ++} ++ ++void unmask_8259A(void) ++{ ++ unsigned long flags; ++ ++ spin_lock_irqsave(&i8259A_lock, flags); ++ outb(cached_A1, 0xA1); ++ outb(cached_21, 0x21); ++ spin_unlock_irqrestore(&i8259A_lock, flags); ++} ++ + /* + * This function assumes to be called rarely. Switching between + * 8259A registers is slow. +Index: xen-4.0.0-testing/xen/arch/x86/io_apic.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/io_apic.c ++++ xen-4.0.0-testing/xen/arch/x86/io_apic.c +@@ -136,6 +136,126 @@ static void __init replace_pin_at_irq(un + } + } + ++struct IO_APIC_route_entry **alloc_ioapic_entries(void) ++{ ++ int apic; ++ struct IO_APIC_route_entry **ioapic_entries; ++ ++ ioapic_entries = xmalloc_array(struct IO_APIC_route_entry *, nr_ioapics); ++ if (!ioapic_entries) ++ return 0; ++ ++ for (apic = 0; apic < nr_ioapics; apic++) { ++ ioapic_entries[apic] = ++ xmalloc_array(struct IO_APIC_route_entry, ++ nr_ioapic_registers[apic]); ++ if (!ioapic_entries[apic]) ++ goto nomem; ++ } ++ ++ return ioapic_entries; ++ ++nomem: ++ while (--apic >= 0) ++ xfree(ioapic_entries[apic]); ++ xfree(ioapic_entries); ++ ++ return 0; ++} ++ ++/* ++ * Saves all the IO-APIC RTE's ++ */ ++int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries) ++{ ++ int apic, pin; ++ ++ if (!ioapic_entries) ++ return -ENOMEM; ++ ++ for (apic = 0; apic < nr_ioapics; apic++) { ++ if (!ioapic_entries[apic]) ++ return -ENOMEM; ++ ++ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { ++ *(((int *)&ioapic_entries[apic][pin])+0) = ++ __io_apic_read(apic, 0x10+pin*2); ++ *(((int *)&ioapic_entries[apic][pin])+1) = ++ __io_apic_read(apic, 0x11+pin*2); ++ } ++ } ++ ++ return 0; ++} ++ ++/* ++ * Mask all IO APIC entries. ++ */ ++void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries) ++{ ++ int apic, pin; ++ ++ if (!ioapic_entries) ++ return; ++ ++ for (apic = 0; apic < nr_ioapics; apic++) { ++ if (!ioapic_entries[apic]) ++ break; ++ ++ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { ++ struct IO_APIC_route_entry entry; ++ unsigned long flags; ++ ++ entry = ioapic_entries[apic][pin]; ++ if (!entry.mask) { ++ entry.mask = 1; ++ ++ spin_lock_irqsave(&ioapic_lock, flags); ++ __io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1)); ++ __io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0)); ++ spin_unlock_irqrestore(&ioapic_lock, flags); ++ } ++ } ++ } ++} ++ ++/* ++ * Restore IO APIC entries which was saved in ioapic_entries. ++ */ ++int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries) ++{ ++ int apic, pin; ++ unsigned long flags; ++ struct IO_APIC_route_entry entry; ++ ++ if (!ioapic_entries) ++ return -ENOMEM; ++ ++ for (apic = 0; apic < nr_ioapics; apic++) { ++ if (!ioapic_entries[apic]) ++ return -ENOMEM; ++ ++ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) ++ entry = ioapic_entries[apic][pin]; ++ spin_lock_irqsave(&ioapic_lock, flags); ++ __io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1)); ++ __io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0)); ++ spin_unlock_irqrestore(&ioapic_lock, flags); ++ } ++ ++ return 0; ++} ++ ++void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries) ++{ ++ int apic; ++ ++ for (apic = 0; apic < nr_ioapics; apic++) ++ xfree(ioapic_entries[apic]); ++ ++ xfree(ioapic_entries); ++} ++ + static void __modify_IO_APIC_irq (unsigned int irq, unsigned long enable, unsigned long disable) + { + struct irq_pin_list *entry = irq_2_pin + irq; +Index: xen-4.0.0-testing/xen/arch/x86/setup.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/setup.c ++++ xen-4.0.0-testing/xen/arch/x86/setup.c +@@ -981,6 +981,9 @@ void __init __start_xen(unsigned long mb + + tboot_probe(); + ++ /* Check if x2APIC is already enabled in BIOS */ ++ check_x2apic_preenabled(); ++ + /* Unmap the first page of CPU0's stack. */ + memguard_guard_stack(cpu0_stack); + +@@ -999,9 +1002,6 @@ void __init __start_xen(unsigned long mb + + acpi_boot_init(); + +- if ( x2apic_is_available() ) +- enable_x2apic(); +- + init_cpu_to_node(); + + if ( smp_found_config ) +@@ -1014,6 +1014,9 @@ void __init __start_xen(unsigned long mb + + init_apic_mappings(); + ++ if ( x2apic_is_available() ) ++ enable_x2apic(); ++ + percpu_free_unused_areas(); + + init_IRQ(); +Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/intremap.c ++++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c +@@ -132,6 +132,12 @@ int iommu_supports_eim(void) + if ( !iommu_enabled || !iommu_qinval || !iommu_intremap ) + return 0; + ++ if ( list_empty(&acpi_drhd_units) ) ++ { ++ dprintk(XENLOG_WARNING VTDPREFIX, "VT-d is not supported\n"); ++ return 0; ++ } ++ + /* We MUST have a DRHD unit for each IOAPIC. */ + for ( apic = 0; apic < nr_ioapics; apic++ ) + if ( !ioapic_to_drhd(IO_APIC_ID(apic)) ) +@@ -142,9 +148,6 @@ int iommu_supports_eim(void) + return 0; + } + +- if ( list_empty(&acpi_drhd_units) ) +- return 0; +- + for_each_drhd_unit ( drhd ) + if ( !ecap_queued_inval(drhd->iommu->ecap) || + !ecap_intr_remap(drhd->iommu->ecap) || +@@ -802,3 +805,80 @@ void disable_intremap(struct iommu *iomm + out: + spin_unlock_irqrestore(&iommu->register_lock, flags); + } ++ ++/* ++ * This function is used to enable Interrutp remapping when ++ * enable x2apic ++ */ ++int iommu_enable_IR(void) ++{ ++ struct acpi_drhd_unit *drhd; ++ struct iommu *iommu; ++ ++ if ( !iommu_supports_eim() ) ++ return -1; ++ ++ for_each_drhd_unit ( drhd ) ++ { ++ struct qi_ctrl *qi_ctrl = NULL; ++ ++ iommu = drhd->iommu; ++ qi_ctrl = iommu_qi_ctrl(iommu); ++ ++ /* Clear previous faults */ ++ clear_fault_bits(iommu); ++ ++ /* ++ * Disable interrupt remapping and queued invalidation if ++ * already enabled by BIOS ++ */ ++ disable_intremap(iommu); ++ disable_qinval(iommu); ++ } ++ ++ /* Enable queue invalidation */ ++ for_each_drhd_unit ( drhd ) ++ { ++ iommu = drhd->iommu; ++ if ( enable_qinval(iommu) != 0 ) ++ { ++ dprintk(XENLOG_INFO VTDPREFIX, ++ "Failed to enable Queued Invalidation!\n"); ++ return -1; ++ } ++ } ++ ++ /* Enable interrupt remapping */ ++ for_each_drhd_unit ( drhd ) ++ { ++ iommu = drhd->iommu; ++ if ( enable_intremap(iommu, 1) ) ++ { ++ dprintk(XENLOG_INFO VTDPREFIX, ++ "Failed to enable Interrupt Remapping!\n"); ++ return -1; ++ } ++ } ++ ++ return 0; ++} ++ ++/* ++ * Check if interrupt remapping is enabled or not ++ * return 1: enabled ++ * return 0: not enabled ++ */ ++int intremap_enabled(void) ++{ ++ struct acpi_drhd_unit *drhd; ++ u32 sts; ++ ++ for_each_drhd_unit ( drhd ) ++ { ++ sts = dmar_readl(drhd->iommu->reg, DMAR_GSTS_REG); ++ if ( !(sts & DMA_GSTS_IRES) ) ++ return 0; ++ } ++ ++ return 1; ++} +Index: xen-4.0.0-testing/xen/include/asm-x86/apic.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/apic.h ++++ xen-4.0.0-testing/xen/include/asm-x86/apic.h +@@ -25,6 +25,8 @@ extern int apic_verbosity; + extern int x2apic_enabled; + extern int directed_eoi_enabled; + ++extern void check_x2apic_preenabled(void); ++extern int x2apic_cmdline_disable(void); + extern void enable_x2apic(void); + + static __inline int x2apic_is_available(void) +Index: xen-4.0.0-testing/xen/include/asm-x86/genapic.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/genapic.h ++++ xen-4.0.0-testing/xen/include/asm-x86/genapic.h +@@ -70,6 +70,7 @@ cpumask_t vector_allocation_domain_flat( + .send_IPI_mask = send_IPI_mask_flat, \ + .send_IPI_self = send_IPI_self_flat + ++const struct genapic *apic_x2apic_probe(void); + void init_apic_ldr_x2apic_phys(void); + void init_apic_ldr_x2apic_cluster(void); + void clustered_apic_check_x2apic(void); +Index: xen-4.0.0-testing/xen/include/asm-x86/io_apic.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/io_apic.h ++++ xen-4.0.0-testing/xen/include/asm-x86/io_apic.h +@@ -199,6 +199,12 @@ extern int (*ioapic_renumber_irq)(int io + extern void ioapic_suspend(void); + extern void ioapic_resume(void); + ++extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); ++extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); ++extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); ++extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); ++extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); ++ + #else /* !CONFIG_X86_IO_APIC */ + static inline void init_ioapic_mappings(void) {} + static inline void ioapic_suspend(void) {} +Index: xen-4.0.0-testing/xen/include/asm-x86/irq.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/irq.h ++++ xen-4.0.0-testing/xen/include/asm-x86/irq.h +@@ -91,6 +91,8 @@ asmlinkage void do_IRQ(struct cpu_user_r + void disable_8259A_irq(unsigned int irq); + void enable_8259A_irq(unsigned int irq); + int i8259A_irq_pending(unsigned int irq); ++void mask_8259A(void); ++void unmask_8259A(void); + void init_8259A(int aeoi); + int i8259A_suspend(void); + int i8259A_resume(void); +Index: xen-4.0.0-testing/xen/include/xen/iommu.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/xen/iommu.h ++++ xen-4.0.0-testing/xen/include/xen/iommu.h +@@ -58,6 +58,8 @@ struct iommu { + + int iommu_setup(void); + int iommu_supports_eim(void); ++int iommu_enable_IR(void); ++int intremap_enabled(void); + + int iommu_add_device(struct pci_dev *pdev); + int iommu_remove_device(struct pci_dev *pdev); diff --git a/21757-x86-mce-avoid-BUG_ON.patch b/21757-x86-mce-avoid-BUG_ON.patch new file mode 100644 index 0000000..dc3e8bf --- /dev/null +++ b/21757-x86-mce-avoid-BUG_ON.patch @@ -0,0 +1,38 @@ +# HG changeset patch +# User Keir Fraser +# Date 1278674491 -3600 +# Node ID 50cf787b70eb74adfe501a2484a0dffe7d15e567 +# Parent a7a680442b738928eb963b31e22a3e428ac111a0 +mce: Replace BUG() with a console warning in the MCE handler. + +If the hardware reports corrected errors that we didn't see through +the status MSRs, complain on the console but don't BUG() the machine. + +Signed-off-by: Tim Deegan + +--- a/xen/arch/x86/cpu/mcheck/amd_nonfatal.c ++++ b/xen/arch/x86/cpu/mcheck/amd_nonfatal.c +@@ -152,14 +152,19 @@ static void mce_amd_work_fn(void *data) + + /* HW does not count *all* kinds of correctable errors. + * Thus it is possible, that the polling routine finds an +- * correctable error even if the HW reports nothing. +- * However, the other way around is not possible (= BUG). +- */ ++ * correctable error even if the HW reports nothing. */ + if (counter > 0) { + /* HW reported correctable errors, + * the polling routine did not find... + */ +- BUG_ON(adjust == 0); ++ if (adjust == 0) { ++ printk("CPU counter reports %"PRIu32 ++ " correctable hardware error%s that %s" ++ " not reported by the status MSRs\n", ++ counter, ++ (counter == 1 ? "" : "s"), ++ (counter == 1 ? "was" : "were")); ++ } + /* subtract 1 to not double count the error + * from the polling service routine */ + adjust += (counter - 1); diff --git a/21886-kexec-shutdown.patch b/21886-kexec-shutdown.patch new file mode 100644 index 0000000..3da83a9 --- /dev/null +++ b/21886-kexec-shutdown.patch @@ -0,0 +1,288 @@ +# HG changeset patch +# User Keir Fraser +# Date 1280395881 -3600 +# Node ID 578ed14c3c673d734318bcefa4597a7d7d9aee37 +# Parent 2007fd03f53d9a3e8774a6df06beef7c74801b07 +kexec: Clean up shutdown logic. Reinstate ACPI DMAR during kexec. +References: bnc#613529 + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/crash.c ++++ b/xen/arch/x86/crash.c +@@ -25,7 +25,6 @@ + #include + #include + #include +-#include + + static atomic_t waiting_for_crash_ipi; + static unsigned int crashing_cpu; +@@ -41,9 +40,10 @@ static int crash_nmi_callback(struct cpu + local_irq_disable(); + + kexec_crash_save_cpu(); +- disable_local_APIC(); ++ ++ __stop_this_cpu(); ++ + atomic_dec(&waiting_for_crash_ipi); +- hvm_cpu_down(); + + for ( ; ; ) + halt(); +@@ -55,7 +55,10 @@ static void nmi_shootdown_cpus(void) + { + unsigned long msecs; + ++ local_irq_disable(); ++ + crashing_cpu = smp_processor_id(); ++ local_irq_count(crashing_cpu) = 0; + + atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1); + /* Would it be better to replace the trap vector here? */ +@@ -72,25 +75,18 @@ static void nmi_shootdown_cpus(void) + msecs--; + } + +- /* Leave the nmi callback set */ +- disable_local_APIC(); ++ __stop_this_cpu(); ++ disable_IO_APIC(); ++ ++ local_irq_enable(); + } + + void machine_crash_shutdown(void) + { + crash_xen_info_t *info; + +- local_irq_disable(); +- + nmi_shootdown_cpus(); + +- if ( hpet_broadcast_is_available() ) +- hpet_disable_legacy_broadcast(); +- +- disable_IO_APIC(); +- +- hvm_cpu_down(); +- + info = kexec_crash_save_info(); + info->xen_phys_start = xen_phys_start; + info->dom0_pfn_to_mfn_frame_list_list = +--- a/xen/arch/x86/machine_kexec.c ++++ b/xen/arch/x86/machine_kexec.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + typedef void (*relocate_new_kernel_t)( + unsigned long indirection_page, +@@ -76,38 +77,11 @@ void machine_kexec_unload(int type, int + { + } + +-static void __machine_reboot_kexec(void *data) ++void machine_reboot_kexec(xen_kexec_image_t *image) + { +- xen_kexec_image_t *image = (xen_kexec_image_t *)data; +- +- watchdog_disable(); +- console_start_sync(); +- ++ BUG_ON(smp_processor_id() != 0); + smp_send_stop(); +- + machine_kexec(image); +-} +- +-void machine_reboot_kexec(xen_kexec_image_t *image) +-{ +- int reboot_cpu_id; +- +- reboot_cpu_id = 0; +- +- if ( !cpu_isset(reboot_cpu_id, cpu_online_map) ) +- reboot_cpu_id = smp_processor_id(); +- +- if ( reboot_cpu_id != smp_processor_id() ) +- { +- on_selected_cpus(cpumask_of(reboot_cpu_id), __machine_reboot_kexec, +- image, 0); +- for (;;) +- ; /* nothing */ +- } +- else +- { +- __machine_reboot_kexec(image); +- } + BUG(); + } + +@@ -118,6 +92,9 @@ void machine_kexec(xen_kexec_image_t *im + .limit = LAST_RESERVED_GDT_BYTE + }; + ++ if ( hpet_broadcast_is_available() ) ++ hpet_disable_legacy_broadcast(); ++ + /* + * compat_machine_kexec() returns to idle pagetables, which requires us + * to be running on a static GDT mapping (idle pagetables have no GDT +--- a/xen/arch/x86/smp.c ++++ b/xen/arch/x86/smp.c +@@ -326,7 +326,7 @@ int on_selected_cpus( + return 0; + } + +-static void __stop_this_cpu(void) ++void __stop_this_cpu(void) + { + ASSERT(!local_irq_is_enabled()); + +--- a/xen/arch/x86/tboot.c ++++ b/xen/arch/x86/tboot.c +@@ -491,7 +491,10 @@ int __init tboot_parse_dmar_table(acpi_t + dmar_table = NULL; + acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_table); + if ( dmar_table != NULL ) +- ((struct acpi_table_dmar *)dmar_table)->header.signature[0] = '\0'; ++ { ++ dmar_table->signature[0] = 'X'; ++ dmar_table->checksum -= 'X'-'D'; ++ } + + return rc; + } +--- a/xen/common/kexec.c ++++ b/xen/common/kexec.c +@@ -6,7 +6,9 @@ + * - Magnus Damm + */ + ++#include + #include ++#include + #include + #include + #include +@@ -201,6 +203,22 @@ crash_xen_info_t *kexec_crash_save_info( + return out; + } + ++static int acpi_dmar_reinstate(struct acpi_table_header *table) ++{ ++ table->signature[0] = 'D'; ++ table->checksum += 'X'-'D'; ++ return 0; ++} ++ ++static void kexec_common_shutdown(void) ++{ ++ watchdog_disable(); ++ console_start_sync(); ++ spin_debug_disable(); ++ one_cpu_only(); ++ acpi_table_parse(ACPI_SIG_DMAR, acpi_dmar_reinstate); ++} ++ + void kexec_crash(void) + { + int pos; +@@ -209,17 +227,25 @@ void kexec_crash(void) + if ( !test_bit(KEXEC_IMAGE_CRASH_BASE + pos, &kexec_flags) ) + return; + +- console_start_sync(); +- +- one_cpu_only(); ++ kexec_common_shutdown(); + kexec_crash_save_cpu(); + machine_crash_shutdown(); +- + machine_kexec(&kexec_image[KEXEC_IMAGE_CRASH_BASE + pos]); + + BUG(); + } + ++static long kexec_reboot(void *_image) ++{ ++ xen_kexec_image_t *image = _image; ++ ++ kexec_common_shutdown(); ++ machine_reboot_kexec(image); ++ ++ BUG(); ++ return 0; ++} ++ + static void do_crashdump_trigger(unsigned char key) + { + printk("'%c' pressed -> triggering crashdump\n", key); +@@ -540,7 +566,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v + { + xen_kexec_exec_t exec; + xen_kexec_image_t *image; +- int base, bit, pos; ++ int base, bit, pos, ret = -EINVAL; + + if ( unlikely(copy_from_guest(&exec, uarg, 1)) ) + return -EFAULT; +@@ -558,8 +584,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v + { + case KEXEC_TYPE_DEFAULT: + image = &kexec_image[base + pos]; +- one_cpu_only(); +- machine_reboot_kexec(image); /* Does not return */ ++ ret = continue_hypercall_on_cpu(0, kexec_reboot, image); + break; + case KEXEC_TYPE_CRASH: + kexec_crash(); /* Does not return */ +--- a/xen/drivers/acpi/tables.c ++++ b/xen/drivers/acpi/tables.c +@@ -41,7 +41,7 @@ mps_inti_flags_polarity[] = { "dfl", "hi + static const char *__initdata + mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" }; + +-static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES] __initdata; ++static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES]; + + static int acpi_apic_instance __initdata; + +@@ -239,7 +239,7 @@ acpi_table_parse_madt(enum acpi_madt_typ + * Scan the ACPI System Descriptor Table (STD) for a table matching @id, + * run @handler on it. Return 0 if table found, return on if not. + */ +-int __init acpi_table_parse(char *id, acpi_table_handler handler) ++int acpi_table_parse(char *id, acpi_table_handler handler) + { + struct acpi_table_header *table = NULL; + +--- a/xen/drivers/passthrough/vtd/dmar.c ++++ b/xen/drivers/passthrough/vtd/dmar.c +@@ -738,7 +738,8 @@ static int __init acpi_parse_dmar(struct + + out: + /* Zap ACPI DMAR signature to prevent dom0 using vt-d HW. */ +- dmar->header.signature[0] = '\0'; ++ dmar->header.signature[0] = 'X'; ++ dmar->header.checksum -= 'X'-'D'; + return ret; + } + +--- a/xen/include/asm-x86/smp.h ++++ b/xen/include/asm-x86/smp.h +@@ -102,6 +102,9 @@ static __inline int logical_smp_processo + + extern int __cpu_disable(void); + extern void __cpu_die(unsigned int cpu); ++ ++void __stop_this_cpu(void); ++ + #endif /* !__ASSEMBLY__ */ + + #else /* CONFIG_SMP */ diff --git a/21926-x86-pv-NMI-inject.patch b/21926-x86-pv-NMI-inject.patch new file mode 100644 index 0000000..96af31e --- /dev/null +++ b/21926-x86-pv-NMI-inject.patch @@ -0,0 +1,43 @@ +# HG changeset patch +# User Keir Fraser +# Date 1281015674 -3600 +# Node ID 6f07d9ac1e7cd145fb2770bb11655ac1161b58da +# Parent 8992134dcfd0b9e1e86f4111e68a8aa48bd33c3c +x86: Fix NMI injection to PV guests +References: bnc#625520 + +Signed-off-by: Juergen Gross + +--- a/xen/arch/x86/x86_32/entry.S ++++ b/xen/arch/x86/x86_32/entry.S +@@ -275,7 +275,7 @@ process_mce: + ALIGN + /* %ebx: struct vcpu */ + process_nmi: +- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%ebx) ++ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%ebx) + jnz test_guest_events + sti + movb $0,VCPU_nmi_pending(%ebx) +--- a/xen/arch/x86/x86_64/compat/entry.S ++++ b/xen/arch/x86/x86_64/compat/entry.S +@@ -148,7 +148,7 @@ compat_process_mce: + ALIGN + /* %rbx: struct vcpu */ + compat_process_nmi: +- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) ++ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) + jnz compat_test_guest_events + sti + movb $0,VCPU_nmi_pending(%rbx) +--- a/xen/arch/x86/x86_64/entry.S ++++ b/xen/arch/x86/x86_64/entry.S +@@ -250,7 +250,7 @@ process_mce: + ALIGN + /* %rbx: struct vcpu */ + process_nmi: +- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) ++ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) + jnz test_guest_events + sti + movb $0,VCPU_nmi_pending(%rbx) diff --git a/21933-vtd-ioapic-write.patch b/21933-vtd-ioapic-write.patch new file mode 100644 index 0000000..fe554b8 --- /dev/null +++ b/21933-vtd-ioapic-write.patch @@ -0,0 +1,56 @@ +# HG changeset patch +# User Keir Fraser +# Date 1281367965 -3600 +# Node ID add40eb478680b6f8de7102e87fba259f721ce1d +# Parent fe930e1b2ce8f205fb368d0cc86876cc54d761a9 +vt-d: Fix ioapic write order in io_apic_write_remap_rte + +At the end of io_apic_write_remap_rte, it writes new entry (remapped +interrupt) to ioapic. But it writes low 32 bits before high 32 bits, +it unmasks interrupt before writing high 32 bits if 'mask' bit in low +32 bits is cleared. Thus it may result in issues. This patch fixes +this issue by writing high 32 bits before low 32 bits. + +Signed-off-by: Jiang, Yunhong +Signed-off-by: Weidong Han + +# HG changeset patch +# User Keir Fraser +# Date 1281368025 -3600 +# Node ID befd1814c0a262ce0d6c96727a76b907cdeecdc4 +# Parent add40eb478680b6f8de7102e87fba259f721ce1d +vt-d: Fix ioapic_rte_to_remap_entry error path. + +When ioapic_rte_to_remap_entry fails, currently it just writes value +to ioapic. But the 'mask' bit may be changed if it writes to the upper +half of RTE. This patch ensures to recover the original value of 'mask' +bit in this case. + +Signed-off-by: Weidong Han + +--- a/xen/drivers/passthrough/vtd/intremap.c ++++ b/xen/drivers/passthrough/vtd/intremap.c +@@ -438,14 +438,21 @@ void io_apic_write_remap_rte( + { + *IO_APIC_BASE(apic) = rte_upper ? (reg + 1) : reg; + *(IO_APIC_BASE(apic)+4) = value; ++ ++ /* Recover the original value of 'mask' bit */ ++ if ( rte_upper ) ++ { ++ *IO_APIC_BASE(apic) = reg; ++ *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0); ++ } + return; + } + + /* write new entry to ioapic */ +- *IO_APIC_BASE(apic) = reg; +- *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0); + *IO_APIC_BASE(apic) = reg + 1; + *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+1); ++ *IO_APIC_BASE(apic) = reg; ++ *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0); + } + + #if defined(__i386__) || defined(__x86_64__) diff --git a/21953-msi-enable.patch b/21953-msi-enable.patch new file mode 100644 index 0000000..a26ca9a --- /dev/null +++ b/21953-msi-enable.patch @@ -0,0 +1,68 @@ +# HG changeset patch +# User Keir Fraser +# Date 1281542462 -3600 +# Node ID 786b163da49bbf18857b5484cce5e5aed33528b3 +# Parent f45026ec8db5a18131acd924a5b99f3b0e480df1 +msi: Avoid uninitialized msi descriptors + +When __pci_enable_msix() returns early, output parameter (struct +msi_desc **desc) will not be initialized. On my machine, a Broadcom +BCM5709 nic has both MSI and MSIX capability blocks and when guest +tries to enable msix interrupts but __pci_enable_msix() returns early +for encountering a msi block, the whole system will crash for fatal +page fault immediately. + +Signed-off-by: Wei Wang + +--- a/xen/arch/x86/msi.c ++++ b/xen/arch/x86/msi.c +@@ -605,21 +605,25 @@ static int msix_capability_init(struct p + * indicates the successful setup of an entry zero with the new MSI + * irq or non-zero for otherwise. + **/ ++ + static int __pci_enable_msi(struct msi_info *msi, struct msi_desc **desc) + { + int status; + struct pci_dev *pdev; ++ struct msi_desc *old_desc; + + ASSERT(spin_is_locked(&pcidevs_lock)); + pdev = pci_get_pdev(msi->bus, msi->devfn); + if ( !pdev ) + return -ENODEV; + +- if ( find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSI) ) ++ old_desc = find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSI); ++ if ( old_desc ) + { + dprintk(XENLOG_WARNING, "irq %d has already mapped to MSI on " + "device %02x:%02x.%01x.\n", msi->irq, msi->bus, + PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); ++ *desc = old_desc; + return 0; + } + +@@ -669,6 +673,7 @@ static int __pci_enable_msix(struct msi_ + u16 control; + u8 slot = PCI_SLOT(msi->devfn); + u8 func = PCI_FUNC(msi->devfn); ++ struct msi_desc *old_desc; + + ASSERT(spin_is_locked(&pcidevs_lock)); + pdev = pci_get_pdev(msi->bus, msi->devfn); +@@ -681,11 +686,13 @@ static int __pci_enable_msix(struct msi_ + if (msi->entry_nr >= nr_entries) + return -EINVAL; + +- if ( find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSIX) ) ++ old_desc = find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSIX); ++ if ( old_desc ) + { + dprintk(XENLOG_WARNING, "irq %d has already mapped to MSIX on " + "device %02x:%02x.%01x.\n", msi->irq, msi->bus, + PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); ++ *desc = old_desc; + return 0; + } + diff --git a/21971-pod-accounting.patch b/21971-pod-accounting.patch new file mode 100644 index 0000000..320c821 --- /dev/null +++ b/21971-pod-accounting.patch @@ -0,0 +1,58 @@ +References: bnc#626262 + +# HG changeset patch +# User George Dunlap +# Date 1281538581 -3600 +# Node ID 6f059a340cdf60e59f58bbca755a62356f57ea0e +# Parent 3b839375d5bcb3a4b484170a890e340493b4738a +[Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache allocation + +Rather than trying to count the number of PoD entries we're putting in, we +simply pass the target # of pages - the vga hole, and let the hypervisor +do the calculation. + +Signed-off-by: George Dunlap +Signed-off-by: Stefano Stabellini + +--- a/tools/libxc/xc_hvm_build.c ++++ b/tools/libxc/xc_hvm_build.c +@@ -107,7 +107,6 @@ static int setup_guest(int xc_handle, + xen_pfn_t *page_array = NULL; + unsigned long i, nr_pages = (unsigned long)memsize << (20 - PAGE_SHIFT); + unsigned long target_pages = (unsigned long)target << (20 - PAGE_SHIFT); +- unsigned long pod_pages = 0; + unsigned long entry_eip, cur_pages; + struct xen_add_to_physmap xatp; + struct shared_info *shared_info; +@@ -208,11 +207,6 @@ static int setup_guest(int xc_handle, + if ( done > 0 ) + { + done <<= SUPERPAGE_PFN_SHIFT; +- if ( pod_mode && target_pages > cur_pages ) +- { +- int d = target_pages - cur_pages; +- pod_pages += ( done < d ) ? done : d; +- } + cur_pages += done; + count -= done; + } +@@ -224,15 +218,16 @@ static int setup_guest(int xc_handle, + rc = xc_domain_memory_populate_physmap( + xc_handle, dom, count, 0, 0, &page_array[cur_pages]); + cur_pages += count; +- if ( pod_mode ) +- pod_pages -= count; + } + } + ++ /* Subtract 0x20 from target_pages for the VGA "hole". Xen will ++ * adjust the PoD cache size so that domain tot_pages will be ++ * target_pages - 0x20 after this call. */ + if ( pod_mode ) + rc = xc_domain_memory_set_pod_target(xc_handle, + dom, +- pod_pages, ++ target_pages - 0x20, + NULL, NULL, NULL); + + if ( rc != 0 ) diff --git a/README.SuSE b/README.SuSE index c8bd432..f161bbc 100644 --- a/README.SuSE +++ b/README.SuSE @@ -464,9 +464,6 @@ The hypervisor and domain 0 kernel are a matched set, and usually must be upgraded together. Consult the online documentation for a matrix of supported 32- and 64-bit combinations -A 64-bit paravirtualized VM will not run on 32-bit host but a 32-bit -paravirtualized VM will run on a 64-bit host. - On certain machines with 2GB or less of RAM, domain 0 Linux may fail to boot, printing the following messages: PCI-DMA: Using software bounce buffering for IO (SWIOTLB) @@ -498,8 +495,8 @@ file (viewable with the "xm dmesg" command). If problems persist, check if a newer version is available. Well-tested versions will be shipped with SUSE and via YaST Online Update. More frequent -(but less supported) updates are available on the Xen Technical Preview site: - ftp://ftp.novell.com/forge/XenTechnicalPreview/ +(but less supported) updates are available on Novell's Forge site: + http://forge.novell.com/modules/xfmod/project/?xenpreview Known Issues diff --git a/cpupools-core.patch b/cpupools-core.patch index 09fbf44..e4e758e 100644 --- a/cpupools-core.patch +++ b/cpupools-core.patch @@ -1,9 +1,7 @@ From: Juergen Gross -Index: xen-4.0.0-testing/xen/arch/x86/acpi/power.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/acpi/power.c -+++ xen-4.0.0-testing/xen/arch/x86/acpi/power.c +--- a/xen/arch/x86/acpi/power.c ++++ b/xen/arch/x86/acpi/power.c @@ -234,7 +234,7 @@ static int enter_state(u32 state) return error; } @@ -22,10 +20,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/acpi/power.c } static int acpi_get_wake_status(void) -Index: xen-4.0.0-testing/xen/arch/x86/domain.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/domain.c -+++ xen-4.0.0-testing/xen/arch/x86/domain.c +--- a/xen/arch/x86/domain.c ++++ b/xen/arch/x86/domain.c @@ -1518,42 +1518,52 @@ void sync_vcpu_execstate(struct vcpu *v) } @@ -139,10 +135,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/domain.c return 0; } -Index: xen-4.0.0-testing/xen/arch/x86/domain_build.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/domain_build.c -+++ xen-4.0.0-testing/xen/arch/x86/domain_build.c +--- a/xen/arch/x86/domain_build.c ++++ b/xen/arch/x86/domain_build.c @@ -9,6 +9,7 @@ #include #include @@ -183,10 +177,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/domain_build.c /* Set up CR3 value for write_ptbase */ if ( paging_mode_enabled(d) ) -Index: xen-4.0.0-testing/xen/arch/x86/microcode.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/microcode.c -+++ xen-4.0.0-testing/xen/arch/x86/microcode.c +--- a/xen/arch/x86/microcode.c ++++ b/xen/arch/x86/microcode.c @@ -114,7 +114,7 @@ static int microcode_update_cpu(const vo return err; } @@ -214,10 +206,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/microcode.c + return continue_hypercall_on_cpu(info->cpu, NULL, + do_microcode_update, info); } -Index: xen-4.0.0-testing/xen/arch/x86/mm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/mm.c +--- a/xen/arch/x86/mm.c ++++ b/xen/arch/x86/mm.c @@ -242,7 +242,7 @@ void __init arch_init_memory(void) * Any Xen-heap pages that we will allow to be mapped will have * their domain field set to dom_xen. @@ -244,10 +234,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/mm.c BUG_ON(dom_cow == NULL); /* First 1MB of RAM is historically marked as I/O. */ -Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/platform_hypercall.c -+++ xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c +--- a/xen/arch/x86/platform_hypercall.c ++++ b/xen/arch/x86/platform_hypercall.c @@ -19,6 +19,7 @@ #include #include @@ -307,10 +295,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c break; } break; -Index: xen-4.0.0-testing/xen/arch/x86/setup.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/setup.c -+++ xen-4.0.0-testing/xen/arch/x86/setup.c +--- a/xen/arch/x86/setup.c ++++ b/xen/arch/x86/setup.c @@ -2,6 +2,7 @@ #include #include @@ -328,7 +314,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/setup.c if ( idle_domain == NULL ) BUG(); idle_domain->vcpu = idle_vcpu; -@@ -1094,8 +1095,13 @@ void __init __start_xen(unsigned long mb +@@ -1097,8 +1098,13 @@ void __init __start_xen(unsigned long mb if ( !tboot_protect_mem_regions() ) panic("Could not protect TXT memory regions\n"); @@ -343,10 +329,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/setup.c if ( (dom0 == NULL) || (alloc_dom0_vcpu0() == NULL) ) panic("Error creating domain 0\n"); -Index: xen-4.0.0-testing/xen/arch/x86/smpboot.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/smpboot.c -+++ xen-4.0.0-testing/xen/arch/x86/smpboot.c +--- a/xen/arch/x86/smpboot.c ++++ b/xen/arch/x86/smpboot.c @@ -39,6 +39,7 @@ #include #include @@ -468,10 +452,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/smpboot.c cpufreq_add_cpu(cpu); return 0; } -Index: xen-4.0.0-testing/xen/arch/x86/sysctl.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/sysctl.c -+++ xen-4.0.0-testing/xen/arch/x86/sysctl.c +--- a/xen/arch/x86/sysctl.c ++++ b/xen/arch/x86/sysctl.c @@ -29,7 +29,7 @@ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) @@ -490,10 +472,8 @@ Index: xen-4.0.0-testing/xen/arch/x86/sysctl.c break; case XEN_SYSCTL_CPU_HOTPLUG_STATUS: ret = 0; -Index: xen-4.0.0-testing/xen/common/Makefile -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/Makefile -+++ xen-4.0.0-testing/xen/common/Makefile +--- a/xen/common/Makefile ++++ b/xen/common/Makefile @@ -1,5 +1,6 @@ obj-y += bitmap.o obj-y += cpu.o @@ -501,10 +481,8 @@ Index: xen-4.0.0-testing/xen/common/Makefile obj-y += domctl.o obj-y += domain.o obj-y += event_channel.o -Index: xen-4.0.0-testing/xen/common/cpupool.c -=================================================================== --- /dev/null -+++ xen-4.0.0-testing/xen/common/cpupool.c ++++ b/xen/common/cpupool.c @@ -0,0 +1,585 @@ +/****************************************************************************** + * cpupool.c @@ -1091,10 +1069,8 @@ Index: xen-4.0.0-testing/xen/common/cpupool.c + * indent-tabs-mode: nil + * End: + */ -Index: xen-4.0.0-testing/xen/common/domain.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/domain.c -+++ xen-4.0.0-testing/xen/common/domain.c +--- a/xen/common/domain.c ++++ b/xen/common/domain.c @@ -209,7 +209,7 @@ static void __init parse_extra_guest_irq custom_param("extra_guest_irqs", parse_extra_guest_irqs); @@ -1123,10 +1099,8 @@ Index: xen-4.0.0-testing/xen/common/domain.c sched_destroy_domain(d); /* Free page used by xen oprofile buffer. */ -Index: xen-4.0.0-testing/xen/common/domctl.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/domctl.c -+++ xen-4.0.0-testing/xen/common/domctl.c +--- a/xen/common/domctl.c ++++ b/xen/common/domctl.c @@ -11,6 +11,7 @@ #include #include @@ -1202,10 +1176,28 @@ Index: xen-4.0.0-testing/xen/common/domctl.c if ( alloc_vcpu(d, i, cpu) == NULL ) goto maxvcpu_out; -Index: xen-4.0.0-testing/xen/common/sched_credit.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/sched_credit.c -+++ xen-4.0.0-testing/xen/common/sched_credit.c +--- a/xen/common/kexec.c ++++ b/xen/common/kexec.c +@@ -235,7 +235,7 @@ void kexec_crash(void) + BUG(); + } + +-static long kexec_reboot(void *_image) ++static long kexec_reboot(void *hdl, void *_image) + { + xen_kexec_image_t *image = _image; + +@@ -584,7 +584,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v + { + case KEXEC_TYPE_DEFAULT: + image = &kexec_image[base + pos]; +- ret = continue_hypercall_on_cpu(0, kexec_reboot, image); ++ ret = continue_hypercall_on_cpu(0, NULL, kexec_reboot, image); + break; + case KEXEC_TYPE_CRASH: + kexec_crash(); /* Does not return */ +--- a/xen/common/sched_credit.c ++++ b/xen/common/sched_credit.c @@ -70,11 +70,15 @@ /* * Useful macros @@ -2094,7 +2086,7 @@ Index: xen-4.0.0-testing/xen/common/sched_credit.c .destroy_vcpu = csched_vcpu_destroy, .sleep = csched_vcpu_sleep, -@@ -1411,6 +1540,13 @@ const struct scheduler sched_credit_def +@@ -1411,6 +1540,13 @@ const struct scheduler sched_credit_def .dump_cpu_state = csched_dump_pcpu, .dump_settings = csched_dump, .init = csched_init, @@ -2108,10 +2100,8 @@ Index: xen-4.0.0-testing/xen/common/sched_credit.c .tick_suspend = csched_tick_suspend, .tick_resume = csched_tick_resume, -Index: xen-4.0.0-testing/xen/common/sched_sedf.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/sched_sedf.c -+++ xen-4.0.0-testing/xen/common/sched_sedf.c +--- a/xen/common/sched_sedf.c ++++ b/xen/common/sched_sedf.c @@ -21,6 +21,9 @@ printk(_a ); \ } while ( 0 ) @@ -2377,7 +2367,7 @@ Index: xen-4.0.0-testing/xen/common/sched_sedf.c .name = "Simple EDF Scheduler", .opt_name = "sedf", .sched_id = XEN_SCHEDULER_SEDF, -@@ -1464,9 +1509,15 @@ const struct scheduler sched_sedf_def = +@@ -1464,9 +1509,15 @@ const struct scheduler sched_sedf_def = .init_domain = sedf_init_domain, .destroy_domain = sedf_destroy_domain, @@ -2394,10 +2384,8 @@ Index: xen-4.0.0-testing/xen/common/sched_sedf.c .do_schedule = sedf_do_schedule, .pick_cpu = sedf_pick_cpu, .dump_cpu_state = sedf_dump_cpu_state, -Index: xen-4.0.0-testing/xen/common/schedule.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/schedule.c -+++ xen-4.0.0-testing/xen/common/schedule.c +--- a/xen/common/schedule.c ++++ b/xen/common/schedule.c @@ -53,10 +53,11 @@ static void poll_timer_fn(void *data); /* This is global for now so that private implementations can reach it */ @@ -2916,10 +2904,8 @@ Index: xen-4.0.0-testing/xen/common/schedule.c } #ifdef CONFIG_COMPAT -Index: xen-4.0.0-testing/xen/common/softirq.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/softirq.c -+++ xen-4.0.0-testing/xen/common/softirq.c +--- a/xen/common/softirq.c ++++ b/xen/common/softirq.c @@ -88,9 +88,11 @@ void raise_softirq(unsigned int nr) } @@ -3013,10 +2999,8 @@ Index: xen-4.0.0-testing/xen/common/softirq.c open_softirq(TASKLET_SOFTIRQ, tasklet_action); } -Index: xen-4.0.0-testing/xen/common/sysctl.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/sysctl.c -+++ xen-4.0.0-testing/xen/common/sysctl.c +--- a/xen/common/sysctl.c ++++ b/xen/common/sysctl.c @@ -314,6 +314,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc } break; @@ -3032,10 +3016,8 @@ Index: xen-4.0.0-testing/xen/common/sysctl.c default: ret = arch_do_sysctl(op, u_sysctl); break; -Index: xen-4.0.0-testing/xen/include/asm-x86/domain.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/domain.h -+++ xen-4.0.0-testing/xen/include/asm-x86/domain.h +--- a/xen/include/asm-x86/domain.h ++++ b/xen/include/asm-x86/domain.h @@ -451,7 +451,8 @@ struct arch_vcpu #define hvm_svm hvm_vcpu.u.svm @@ -3046,10 +3028,8 @@ Index: xen-4.0.0-testing/xen/include/asm-x86/domain.h void vcpu_show_execution_state(struct vcpu *); void vcpu_show_registers(const struct vcpu *); -Index: xen-4.0.0-testing/xen/include/asm-x86/smp.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/smp.h -+++ xen-4.0.0-testing/xen/include/asm-x86/smp.h +--- a/xen/include/asm-x86/smp.h ++++ b/xen/include/asm-x86/smp.h @@ -56,7 +56,6 @@ extern u32 cpu_2_logical_apicid[]; #define CPU_ONLINE 0x0002 /* CPU is up */ #define CPU_DEAD 0x0004 /* CPU is dead */ @@ -3058,10 +3038,8 @@ Index: xen-4.0.0-testing/xen/include/asm-x86/smp.h #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) extern int cpu_down(unsigned int cpu); -Index: xen-4.0.0-testing/xen/include/public/domctl.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/domctl.h -+++ xen-4.0.0-testing/xen/include/public/domctl.h +--- a/xen/include/public/domctl.h ++++ b/xen/include/public/domctl.h @@ -60,10 +60,10 @@ struct xen_domctl_createdomain { /* Should domain memory integrity be verifed by tboot during Sx? */ #define _XEN_DOMCTL_CDF_s3_integrity 2 @@ -3090,10 +3068,8 @@ Index: xen-4.0.0-testing/xen/include/public/domctl.h struct xen_domctl { uint32_t cmd; #define XEN_DOMCTL_createdomain 1 -Index: xen-4.0.0-testing/xen/include/public/sysctl.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/sysctl.h -+++ xen-4.0.0-testing/xen/include/public/sysctl.h +--- a/xen/include/public/sysctl.h ++++ b/xen/include/public/sysctl.h @@ -491,6 +491,28 @@ struct xen_sysctl_lockprof_op { typedef struct xen_sysctl_lockprof_op xen_sysctl_lockprof_op_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_lockprof_op_t); @@ -3131,10 +3107,8 @@ Index: xen-4.0.0-testing/xen/include/public/sysctl.h uint8_t pad[128]; } u; }; -Index: xen-4.0.0-testing/xen/include/xen/sched-if.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/xen/sched-if.h -+++ xen-4.0.0-testing/xen/include/xen/sched-if.h +--- a/xen/include/xen/sched-if.h ++++ b/xen/include/xen/sched-if.h @@ -10,16 +10,29 @@ #include @@ -3229,10 +3203,8 @@ Index: xen-4.0.0-testing/xen/include/xen/sched-if.h +struct scheduler *scheduler_get_by_id(unsigned int id); + #endif /* __XEN_SCHED_IF_H__ */ -Index: xen-4.0.0-testing/xen/include/xen/sched.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/xen/sched.h -+++ xen-4.0.0-testing/xen/include/xen/sched.h +--- a/xen/include/xen/sched.h ++++ b/xen/include/xen/sched.h @@ -9,6 +9,7 @@ #include #include @@ -3241,7 +3213,7 @@ Index: xen-4.0.0-testing/xen/include/xen/sched.h #include #include #include -@@ -132,8 +133,6 @@ struct vcpu +@@ -132,8 +133,6 @@ struct vcpu bool_t defer_shutdown; /* VCPU is paused following shutdown request (d->is_shutting_down)? */ bool_t paused_for_shutdown; @@ -3313,10 +3285,8 @@ Index: xen-4.0.0-testing/xen/include/xen/sched.h #endif /* __SCHED_H__ */ /* -Index: xen-4.0.0-testing/xen/include/xen/softirq.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/xen/softirq.h -+++ xen-4.0.0-testing/xen/include/xen/softirq.h +--- a/xen/include/xen/softirq.h ++++ b/xen/include/xen/softirq.h @@ -58,6 +58,7 @@ struct tasklet struct tasklet name = { LIST_HEAD_INIT(name.list), 0, 0, 0, func, data } diff --git a/snapshot-xend.patch b/snapshot-xend.patch index 7a22802..4e0d8b0 100644 --- a/snapshot-xend.patch +++ b/snapshot-xend.patch @@ -647,7 +647,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py def xm_save(args): arg_check(args, "save", 2, 4) -@@ -3729,6 +3804,10 @@ commands = { +@@ -3741,6 +3816,10 @@ commands = { "restore": xm_restore, "resume": xm_resume, "save": xm_save, diff --git a/usb-list.patch b/usb-list.patch new file mode 100644 index 0000000..ff4f2b5 --- /dev/null +++ b/usb-list.patch @@ -0,0 +1,45 @@ +"usb-hc-create" does not check usb-ver parameter. It allows 2/2.0/2.0usb/2.0aaa. While low level +driver doing hc create, it gets an integer by vssanf %d from usb-ver string, so there is no problem. +But 2/2.0/2.0usb/2.0aaa will be saved into VM config. + +After that, while doing "usb-list", it cannot handle "2.0/2.0usb/2.0aaa" and will cause error: +Idx BE state usb-ver BE-path +Error: Invalid argument. +Usage: xm usb-list + +This patch is to let "usb-list" handle all usb-ver cases as low level driver does and won't cause error. + +About this problem, I've submitted two patches to upstream before, but got no response. Information +could be referred to: + http://www.gossamer-threads.com/lists/xen/devel/178406?search_string=usb-list;#178406 + http://www.gossamer-threads.com/lists/xen/devel/181021?search_string=usb-list;#181021 + + +Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +=================================================================== +--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.0-testing/tools/python/xen/xm/main.py +@@ -2543,10 +2543,22 @@ def xm_usb_list(args): + ni = parse_dev_info(x[1]) + ni['idx'] = int(x[0]) + usbver = sxp.child_value(x[1], 'usb-ver') ++ ++ substr = re.search("^\d{1,}", usbver) ++ if substr: ++ usbver = substr.group() ++ else: ++ print "Unknown usb-ver" ++ continue ++ + if int(usbver) == 1: + ni['usb-ver'] = 'USB1.1' +- else: ++ elif int(usbver) == 2: + ni['usb-ver'] = 'USB2.0' ++ else: ++ print "Unknown usb-ver" ++ continue ++ + print "%(idx)-3d %(backend-id)-3d %(state)-5d %(usb-ver)-7s %(be-path)-30s " % ni + + ports = sxp.child(x[1], 'port') diff --git a/x86-extra-trap-info.patch b/x86-extra-trap-info.patch index 2339519..ac39213 100644 --- a/x86-extra-trap-info.patch +++ b/x86-extra-trap-info.patch @@ -1,5 +1,5 @@ ---- 2010-01-06.orig/xen/arch/x86/x86_32/entry.S 2009-12-02 10:02:49.000000000 +0100 -+++ 2010-01-06/xen/arch/x86/x86_32/entry.S 2010-01-06 11:23:45.000000000 +0100 +--- a/xen/arch/x86/x86_32/entry.S ++++ b/xen/arch/x86/x86_32/entry.S @@ -403,21 +403,33 @@ ring1: /* obtain ss/esp from oldss/olde movl %eax,UREGS_eip+4(%esp) ret @@ -44,8 +44,8 @@ domain_crash_synchronous: pushl $domain_crash_synchronous_string call printk ---- 2010-01-06.orig/xen/arch/x86/x86_64/entry.S 2009-12-02 10:02:49.000000000 +0100 -+++ 2010-01-06/xen/arch/x86/x86_64/entry.S 2010-01-06 11:23:45.000000000 +0100 +--- a/xen/arch/x86/x86_64/entry.S ++++ b/xen/arch/x86/x86_64/entry.S @@ -421,17 +421,30 @@ create_bounce_frame: movq %rax,UREGS_rip+8(%rsp) ret diff --git a/x86-ioapic-ack-default.patch b/x86-ioapic-ack-default.patch index cb989d6..15fa40e 100644 --- a/x86-ioapic-ack-default.patch +++ b/x86-ioapic-ack-default.patch @@ -4,7 +4,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/io_apic.c =================================================================== --- xen-4.0.0-testing.orig/xen/arch/x86/io_apic.c +++ xen-4.0.0-testing/xen/arch/x86/io_apic.c -@@ -1442,7 +1442,7 @@ static unsigned int startup_level_ioapic +@@ -1562,7 +1562,7 @@ static unsigned int startup_level_ioapic return 0; /* don't check for pending */ } @@ -13,7 +13,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/io_apic.c static void setup_ioapic_ack(char *s) { if ( !strcmp(s, "old") ) -@@ -1946,6 +1946,8 @@ void __init setup_IO_APIC(void) +@@ -2066,6 +2066,8 @@ void __init setup_IO_APIC(void) else io_apic_irqs = ~PIC_IRQS; diff --git a/xen.changes b/xen.changes index 4bfe29f..7799f54 100644 --- a/xen.changes +++ b/xen.changes @@ -1,22 +1,56 @@ ------------------------------------------------------------------- -Tue Jul 27 16:32:57 MDT 2010 - jfehlig@novell.com +Mon Aug 16 18:35:11 MDT 2010 - carnold@novell.com + +- bnc#626262 - Populate-on-demand memory problem on xen with hvm + guest + 21971-pod-accounting.patch + +------------------------------------------------------------------- +Mon Aug 16 17:03:58 CST 2010 - cyliu@novell.com + +- bnc#584204 - xm usb-list broken + usb-list.patch + +------------------------------------------------------------------- +Thu Aug 12 06:13:44 MDT 2010 - carnold@novell.com + +- bnc#625520 - TP-L3: NMI cannot be triggered for xen kernel + 21926-x86-pv-NMI-inject.patch + +------------------------------------------------------------------- +Mon Aug 9 09:47:09 MDT 2010 - carnold@novell.com + +- bnc#613529 - TP-L3: kdump kernel hangs when crash was initiated + from xen kernel + 21886-kexec-shutdown.patch + +------------------------------------------------------------------- +Mon Aug 2 16:42:41 MDT 2010 - carnold@novell.com + +- Upstream Intel patches to improve X2APIC handling. + 21716-iommu-alloc.patch + 21717-ir-qi.patch + 21718-x2apic-logic.patch + +------------------------------------------------------------------- +Tue Jul 27 16:23:09 MDT 2010 - jfehlig@novell.com - bnc#623833 - Error in Xend-API method VM_set_actions_after_crash 21866-xenapi.patch ------------------------------------------------------------------- -Tue Jul 27 15:39:17 MDT 2010 - jfehlig@novell.com +Tue Jul 27 15:37:51 MDT 2010 - jfehlig@novell.com - bnc#625003 - Fix vm config options coredump-{restart,destroy} Added hunk to xm-create-xflag.patch ------------------------------------------------------------------- -Mon Jul 26 16:49:39 MDT 2010 - jfehlig@novell.com +Mon Jul 26 16:53:02 MDT 2010 - jfehlig@novell.com - bnc#605186 - Squelch harmless error messages in block-iscsi ------------------------------------------------------------------- -Mon Jul 26 16:45:21 MDT 2010 - jfehlig@novell.com +Mon Jul 26 16:22:56 MDT 2010 - jfehlig@novell.com - bnc#623438 - Add ability to control SCSI device path scanning in xend @@ -67,6 +101,8 @@ Tue Jul 6 11:31:33 MDT 2010 - carnold@novell.com 21706-trace-security.patch 21712-amd-osvw.patch 21744-x86-cpufreq-range-check.patch + 21933-vtd-ioapic-write.patch + 21953-msi-enable.patch ------------------------------------------------------------------- Fri Jun 25 15:43:35 CST 2010 - jsong@novell.com diff --git a/xen.spec b/xen.spec index 4fb35ef..04a18e7 100644 --- a/xen.spec +++ b/xen.spec @@ -133,10 +133,19 @@ Patch55: 21700-32on64-vm86-gpf.patch Patch56: 21705-trace-printk.patch Patch57: 21706-trace-security.patch Patch58: 21712-amd-osvw.patch -Patch59: 21723-get-domu-state.patch -Patch60: 21744-x86-cpufreq-range-check.patch -Patch61: 21847-pscsi.patch -Patch62: 21866-xenapi.patch +Patch59: 21716-iommu-alloc.patch +Patch60: 21717-ir-qi.patch +Patch61: 21718-x2apic-logic.patch +Patch62: 21723-get-domu-state.patch +Patch63: 21744-x86-cpufreq-range-check.patch +Patch64: 21757-x86-mce-avoid-BUG_ON.patch +Patch65: 21847-pscsi.patch +Patch66: 21866-xenapi.patch +Patch67: 21886-kexec-shutdown.patch +Patch68: 21926-x86-pv-NMI-inject.patch +Patch69: 21933-vtd-ioapic-write.patch +Patch70: 21953-msi-enable.patch +Patch71: 21971-pod-accounting.patch # Our patches Patch300: xen-config.diff Patch301: xend-config.diff @@ -200,6 +209,7 @@ Patch369: cpu-pools-docs.patch Patch370: xend-sysconfig.patch Patch371: domu-usb-controller.patch Patch372: popen2-argument-fix.patch +Patch373: usb-list.patch # Patches for snapshot support Patch400: snapshot-ioemu-save.patch Patch401: snapshot-ioemu-restore.patch @@ -645,6 +655,15 @@ Authors: %patch60 -p1 %patch61 -p1 %patch62 -p1 +%patch63 -p1 +%patch64 -p1 +%patch65 -p1 +%patch66 -p1 +%patch67 -p1 +%patch68 -p1 +%patch69 -p1 +%patch70 -p1 +%patch71 -p1 %patch300 -p1 %patch301 -p1 %patch302 -p1 @@ -706,6 +725,7 @@ Authors: %patch370 -p1 %patch371 -p1 %patch372 -p1 +%patch373 -p1 %patch400 -p1 %patch401 -p1 %patch402 -p1 From 54d3fda8bf9aca30b1c639bb240db4d7913186f78bcfb559daecc03761a4f8ca Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Thu, 19 Aug 2010 14:38:07 +0000 Subject: [PATCH 2/6] Bumped the version from _05 to _06 OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=72 --- xen.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen.spec b/xen.spec index 04a18e7..2d40b3b 100644 --- a/xen.spec +++ b/xen.spec @@ -1,5 +1,5 @@ # -# spec file for package xen (Version 4.0.0_21091_05) +# spec file for package xen (Version 4.0.0_21091_06) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -38,7 +38,7 @@ BuildRequires: glibc-32bit glibc-devel-32bit %if %{?with_kmp}0 BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11 %endif -Version: 4.0.0_21091_05 +Version: 4.0.0_21091_06 Release: 9 License: GPLv2+ Group: System/Kernel From eeeeaf88a67fe5b2b5468386e7d6471b0e84653d3c6cdee429c02e7a1ba44ad9 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Wed, 22 Sep 2010 14:40:08 +0000 Subject: [PATCH 3/6] - bnc#636231 - XEN: Unable to disconnect/remove CDROM drive from VM xend-devid-or-name.patch - Upstream patches from Jan 22019-x86-cpuidle-online-check.patch 22051-x86-forced-EOI.patch 22067-x86-irq-domain.patch 22068-vtd-irte-RH-bit.patch 22071-ept-get-entry-lock.patch 22084-x86-xsave-off.patch - bnc#638465 - hypervisor panic in memory handling heaplock.patch - Update to Xen 4.0.1. This is a bug fix release. OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=73 --- 21089-x86-startup-irq-from-setup-gsi.patch | 20 +- 21109-x86-cpu-hotplug.patch | 154 ---- 21128-domain-save-flush.patch | 31 - 21129-xen-hotplug-cleanup.patch | 22 - 21150-shadow-race.patch | 68 -- 21151-trace-bounds-check.patch | 205 ------ 21160-sysctl-debug-keys.patch | 27 - 21189-x86-emulate-clflush.patch | 53 -- 21193-blktap-script.patch | 23 - 21194-ioemu-subtype.patch | 12 - 21223-xend-preserve-devs.patch | 32 - 21225-conring-iommu.patch | 77 -- 21234-x86-bad-srat-clear-pxm2node.patch | 34 - 21235-crashkernel-advanced.patch | 22 +- 21266-vmx-disabled-check.patch | 24 - 21271-x86-cache-flush-global.patch | 14 +- 21272-x86-dom0-alloc-performance.patch | 99 --- 21273-linux-autconf.patch | 26 - 21301-svm-lmsl.patch | 28 +- 21304-keyhandler-alternative.patch | 8 +- 21317-xend-blkif-util-tap2.patch | 23 - 21331-svm-vintr-during-nmi.patch | 41 -- 21333-xentrace-t_info-size.patch | 24 - 21340-vtd-dom0-mapping-latency.patch | 56 -- 21346-x86-platform-timer-wrap.patch | 67 -- 21349-x86-memcpy.patch | 313 -------- 21360-x86-mce-polling-disabled-init.patch | 20 - 21372-x86-cross-cpu-wait.patch | 42 -- 21373-dummy-domain-io-caps.patch | 48 -- 21408-amd-erratum-383.patch | 139 ---- 21421-vts-ats-enabling.patch | 30 +- 21435-vmx-retain-global-controls.patch | 45 -- 21445-x86-tsc-handling-cleanups-v2.patch | 268 ------- 21446-iommu-graceful-generic-fail.patch | 29 - ...adow-avoid-remove-all-after-teardown.patch | 31 - 21456-compat-hvm-addr-check.patch | 22 - 21459-block-script.patch | 27 - 21460-xend-timeoffset.patch | 25 - 21492-x86-pirq-unbind.patch | 23 - 21526-x86-nehalem-cpuid-mask.patch | 32 +- 21542-amd-erratum-411.patch | 16 +- 21615-dont-save-xen-heap-pages.patch | 22 +- 21620-x86-signed-domain-irq.patch | 34 - 21627-cpuidle-wrap.patch | 8 +- 21643-vmx-vpmu-pmc-offset.patch | 25 - 21653-xend-mac-addr.patch | 6 +- 21678-xend-mac-fix.patch | 6 +- 21682-trace-buffer-range.patch | 26 - 21683-vtd-kill-timer-conditional.patch | 20 +- 21693-memevent-64bit-only.patch | 286 -------- 21695-trace-t_info-readonly.patch | 90 --- 21698-x86-pirq-range-check.patch | 20 - 21699-p2m-query-for-type-change.patch | 24 - 21700-32on64-vm86-gpf.patch | 25 - 21705-trace-printk.patch | 51 -- 21706-trace-security.patch | 396 ----------- 21712-amd-osvw.patch | 388 ---------- 21716-iommu-alloc.patch | 211 ------ 21717-ir-qi.patch | 200 ------ 21718-x2apic-logic.patch | 672 ------------------ 21723-get-domu-state.patch | 28 +- 21744-x86-cpufreq-range-check.patch | 27 - 21757-x86-mce-avoid-BUG_ON.patch | 38 - 21847-pscsi.patch | 26 +- 21866-xenapi.patch | 18 +- 21886-kexec-shutdown.patch | 288 -------- 21926-x86-pv-NMI-inject.patch | 43 -- 21933-vtd-ioapic-write.patch | 56 -- 21953-msi-enable.patch | 68 -- 21971-pod-accounting.patch | 58 -- 22019-x86-cpuidle-online-check.patch | 30 + 22051-x86-forced-EOI.patch | 203 ++++++ 22067-x86-irq-domain.patch | 31 + 22068-vtd-irte-RH-bit.patch | 35 + 22071-ept-get-entry-lock.patch | 45 ++ 22084-x86-xsave-off.patch | 22 + 32on64-extra-mem.patch | 8 +- bdrv_open2_fix_flags.patch | 24 +- bdrv_open2_flags_2.patch | 38 +- blktap-pv-cdrom.patch | 46 +- blktap.patch | 18 +- blktapctrl-default-to-ioemu.patch | 6 +- block-dmmd | 10 +- block-flags.diff | 34 - block-losetup-retry.diff | 211 ------ bridge-bonding.diff | 6 +- bridge-opensuse.patch | 6 +- bridge-record-creation.patch | 6 +- bridge-vlan.diff | 6 +- build-tapdisk-ioemu.patch | 24 +- capslock_enable.patch | 9 +- cdrom-removable.patch | 26 +- checkpoint-rename.patch | 6 +- cpu-pools-docs.patch | 32 +- cpu-pools-libxc.patch | 26 +- cpu-pools-libxen.patch | 60 +- cpu-pools-python.patch | 110 +-- cpu-pools-xmtest.patch | 72 +- cpupools-core-fixup.patch | 34 +- cpupools-core.patch | 222 +++--- del_usb_xend_entry.patch | 8 +- disable_emulated_device.diff | 6 +- dom-print.patch | 9 +- domu-usb-controller.patch | 6 +- dump-exec-state.patch | 52 +- enable_more_nic_pxe.patch | 12 +- heaplock.patch | 41 ++ hibernate.patch | 6 +- hv_tools.patch | 26 +- hv_win7_eoi_bug.patch | 6 +- hv_xen_base.patch | 42 +- hv_xen_extension.patch | 28 +- ...7615-qcow2-fix-alloc_cluster_link_l2.patch | 6 +- ioemu-bdrv-open-CACHE_WB.patch | 6 +- ioemu-blktap-barriers.patch | 6 +- ioemu-blktap-fv-init.patch | 6 +- ioemu-blktap-image-format.patch | 12 +- ioemu-blktap-zero-size.patch | 12 +- ioemu-debuginfo.patch | 12 +- ioemu-disable-scsi.patch | 18 +- ioemu-vnc-resize.patch | 8 +- libxen_permissive.patch | 6 +- magic_ioport_compat.patch | 6 +- network-nat-open-SuSEfirewall2-FORWARD.patch | 6 +- network-nat.patch | 6 +- network-route.patch | 6 +- passthrough-hotplug-segfault.patch | 90 --- popen2-argument-fix.patch | 6 +- pv-driver-build.patch | 6 +- pvdrv-import-shared-info.patch | 18 +- pvdrv_emulation_control.patch | 6 +- qemu-dm-segfault.patch | 6 +- qemu-security-etch1.diff | 12 +- serial-split.patch | 8 +- snapshot-ioemu-delete.patch | 20 +- snapshot-ioemu-restore.patch | 36 +- snapshot-ioemu-save.patch | 30 +- snapshot-xend.patch | 44 +- supported_module.diff | 4 +- suse-disable-tap2-default.patch | 32 - tapdisk-ioemu-logfile.patch | 8 +- tapdisk-ioemu-shutdown-fix.patch | 12 +- tmp_build.patch | 6 +- tools-gdbserver-build.diff | 8 +- tools-kboot.diff | 36 +- tools-xc_kexec.diff | 78 +- udev-rules.patch | 20 +- usb-list.patch | 8 +- vif-bridge-no-iptables.patch | 6 +- vif-route-ifup.patch | 16 +- x86-cpufreq-report.patch | 14 +- x86-extra-trap-info.patch | 12 +- x86-ioapic-ack-default.patch | 6 +- x86-show-page-walk-early.patch | 44 +- xen-4.0.0-testing-src.tar.bz2 | 3 - xen-4.0.1-testing-src.tar.bz2 | 3 + xen-api-auth.patch | 6 +- xen-changeset.diff | 6 +- xen-config.diff | 23 +- xen-destdir.diff | 36 +- xen-disable-libxl.diff | 8 +- xen-disable-qemu-monitor.diff | 6 +- xen-disable-xenpaging.diff | 8 +- xen-domUloader.diff | 24 +- xen-extra-fixes.patch | 6 +- xen-fixme-doc.diff | 12 +- xen-hvm-default-bridge.diff | 24 +- xen-hvm-default-pae.diff | 6 +- xen-ioemu-hvm-pv-support.diff | 6 +- xen-max-free-mem.diff | 24 +- xen-no-dummy-nfs-ip.diff | 8 +- xen-paths.diff | 18 +- xen-qemu-iscsi-fix.patch | 10 +- xen-rpmoptflags.diff | 12 +- xen-warnings.diff | 54 +- xen-xm-top-needs-root.diff | 8 +- xen-xmexample-vti.diff | 6 +- xen-xmexample.diff | 45 +- xen.changes | 28 + xen.spec | 170 +---- xenapi-console-protocol.patch | 6 +- xend-config.diff | 12 +- xend-core-dump-loc.diff | 6 +- xend-devid-or-name.patch | 27 + xend-domain-lock.patch | 42 +- xend-sysconfig.patch | 6 +- xm-create-xflag.patch | 16 +- xm-save-check-file.patch | 18 +- xm-test-cleanup.diff | 6 +- 189 files changed, 1756 insertions(+), 6759 deletions(-) delete mode 100644 21109-x86-cpu-hotplug.patch delete mode 100644 21128-domain-save-flush.patch delete mode 100644 21129-xen-hotplug-cleanup.patch delete mode 100644 21150-shadow-race.patch delete mode 100644 21151-trace-bounds-check.patch delete mode 100644 21160-sysctl-debug-keys.patch delete mode 100644 21189-x86-emulate-clflush.patch delete mode 100644 21193-blktap-script.patch delete mode 100644 21194-ioemu-subtype.patch delete mode 100644 21223-xend-preserve-devs.patch delete mode 100644 21225-conring-iommu.patch delete mode 100644 21234-x86-bad-srat-clear-pxm2node.patch delete mode 100644 21266-vmx-disabled-check.patch delete mode 100644 21272-x86-dom0-alloc-performance.patch delete mode 100644 21273-linux-autconf.patch delete mode 100644 21317-xend-blkif-util-tap2.patch delete mode 100644 21331-svm-vintr-during-nmi.patch delete mode 100644 21333-xentrace-t_info-size.patch delete mode 100644 21340-vtd-dom0-mapping-latency.patch delete mode 100644 21346-x86-platform-timer-wrap.patch delete mode 100644 21349-x86-memcpy.patch delete mode 100644 21360-x86-mce-polling-disabled-init.patch delete mode 100644 21372-x86-cross-cpu-wait.patch delete mode 100644 21373-dummy-domain-io-caps.patch delete mode 100644 21408-amd-erratum-383.patch delete mode 100644 21435-vmx-retain-global-controls.patch delete mode 100644 21445-x86-tsc-handling-cleanups-v2.patch delete mode 100644 21446-iommu-graceful-generic-fail.patch delete mode 100644 21453-shadow-avoid-remove-all-after-teardown.patch delete mode 100644 21456-compat-hvm-addr-check.patch delete mode 100644 21459-block-script.patch delete mode 100644 21460-xend-timeoffset.patch delete mode 100644 21492-x86-pirq-unbind.patch delete mode 100644 21620-x86-signed-domain-irq.patch delete mode 100644 21643-vmx-vpmu-pmc-offset.patch delete mode 100644 21682-trace-buffer-range.patch delete mode 100644 21693-memevent-64bit-only.patch delete mode 100644 21695-trace-t_info-readonly.patch delete mode 100644 21698-x86-pirq-range-check.patch delete mode 100644 21699-p2m-query-for-type-change.patch delete mode 100644 21700-32on64-vm86-gpf.patch delete mode 100644 21705-trace-printk.patch delete mode 100644 21706-trace-security.patch delete mode 100644 21712-amd-osvw.patch delete mode 100644 21716-iommu-alloc.patch delete mode 100644 21717-ir-qi.patch delete mode 100644 21718-x2apic-logic.patch delete mode 100644 21744-x86-cpufreq-range-check.patch delete mode 100644 21757-x86-mce-avoid-BUG_ON.patch delete mode 100644 21886-kexec-shutdown.patch delete mode 100644 21926-x86-pv-NMI-inject.patch delete mode 100644 21933-vtd-ioapic-write.patch delete mode 100644 21953-msi-enable.patch delete mode 100644 21971-pod-accounting.patch create mode 100644 22019-x86-cpuidle-online-check.patch create mode 100644 22051-x86-forced-EOI.patch create mode 100644 22067-x86-irq-domain.patch create mode 100644 22068-vtd-irte-RH-bit.patch create mode 100644 22071-ept-get-entry-lock.patch create mode 100644 22084-x86-xsave-off.patch delete mode 100644 block-flags.diff delete mode 100644 block-losetup-retry.diff create mode 100644 heaplock.patch delete mode 100644 passthrough-hotplug-segfault.patch delete mode 100644 suse-disable-tap2-default.patch delete mode 100644 xen-4.0.0-testing-src.tar.bz2 create mode 100644 xen-4.0.1-testing-src.tar.bz2 create mode 100644 xend-devid-or-name.patch diff --git a/21089-x86-startup-irq-from-setup-gsi.patch b/21089-x86-startup-irq-from-setup-gsi.patch index 4cf20f0..63e9eee 100644 --- a/21089-x86-startup-irq-from-setup-gsi.patch +++ b/21089-x86-startup-irq-from-setup-gsi.patch @@ -54,9 +54,11 @@ up in order for it to be usable. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/io_apic.c -+++ b/xen/arch/x86/io_apic.c -@@ -2111,6 +2111,7 @@ int __init io_apic_get_redir_entries (in +Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/io_apic.c ++++ xen-4.0.1-testing/xen/arch/x86/io_apic.c +@@ -2231,6 +2231,7 @@ int __init io_apic_get_redir_entries (in int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low) { @@ -64,7 +66,7 @@ Signed-off-by: Jan Beulich struct IO_APIC_route_entry entry; unsigned long flags; int vector; -@@ -2162,7 +2163,12 @@ int io_apic_set_pci_routing (int ioapic, +@@ -2282,7 +2283,12 @@ int io_apic_set_pci_routing (int ioapic, io_apic_write(ioapic, 0x11+2*pin, *(((int *)&entry)+1)); io_apic_write(ioapic, 0x10+2*pin, *(((int *)&entry)+0)); set_native_irq_info(irq, TARGET_CPUS); @@ -78,9 +80,11 @@ Signed-off-by: Jan Beulich return 0; } ---- a/xen/arch/x86/mpparse.c -+++ b/xen/arch/x86/mpparse.c -@@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int trigge +Index: xen-4.0.1-testing/xen/arch/x86/mpparse.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/mpparse.c ++++ xen-4.0.1-testing/xen/arch/x86/mpparse.c +@@ -1102,6 +1102,8 @@ int mp_register_gsi (u32 gsi, int trigge int ioapic = -1; int ioapic_pin = 0; int idx, bit = 0; @@ -89,7 +93,7 @@ Signed-off-by: Jan Beulich /* * Mapping between Global System Interrups, which -@@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, int trigge +@@ -1126,8 +1128,13 @@ int mp_register_gsi (u32 gsi, int trigge if (ioapic_renumber_irq) gsi = ioapic_renumber_irq(ioapic, gsi); diff --git a/21109-x86-cpu-hotplug.patch b/21109-x86-cpu-hotplug.patch deleted file mode 100644 index 747a683..0000000 --- a/21109-x86-cpu-hotplug.patch +++ /dev/null @@ -1,154 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1270624140 -3600 -# Node ID 7794f61c61f3b0c90e367a87b287850b31645742 -# Parent adce8bc43fcccf8730b1da962be60c457c51fa1b -x86, cpu hotplug: Synchronise vcpu state earlier during cpu offline. - -Needs to happen before non-idle VCPU is fully descheduled after CPU is -removed from cpu_online_map. Else sync_vcpu_execstate() doesn't work -properly. - -Signed-off-by: Keir Fraser - -# HG changeset patch -# User Keir Fraser -# Date 1270737112 -3600 -# Node ID c9e8369e49be7396eca444cfce27e6782e4aa248 -# Parent a33909be109cefb0aef251c7c7e48168ed05512a -Fix two issues for CPU online/offline. - -Firstly, we should return if we fail to get spin lock in cpu_down. -Secondly, in credit scheduler, the idlers need be limited only to -online map. - -Signed-off-by: Jiang, Yunhong - -# HG changeset patch -# User Keir Fraser -# Date 1271090027 -3600 -# Node ID 5d4038d41fd894f9fc71e64043d559d7c465bd15 -# Parent 1d3bec66528900b1b442b6d36f24cd35ca076506 -cpufreq: fix racing issue for cpu hotplug - -To eliminate racing between dbs timer handler and cpufreq_del_cpu, -using kill_timer instead of stop_timer to make sure timer handler -execution finished before other stuff in cpufreq_del_cpu. - -BTW, fix a lost point of cpufreq_statistic_lock taking sequence. - -Signed-off-by: Wei Gang - ---- a/xen/arch/x86/domain.c -+++ b/xen/arch/x86/domain.c -@@ -1442,7 +1442,8 @@ void context_switch(struct vcpu *prev, s - - set_current(next); - -- if ( (per_cpu(curr_vcpu, cpu) == next) || is_idle_vcpu(next) ) -+ if ( (per_cpu(curr_vcpu, cpu) == next) || -+ (is_idle_vcpu(next) && cpu_online(cpu)) ) - { - local_irq_enable(); - } ---- a/xen/arch/x86/smpboot.c -+++ b/xen/arch/x86/smpboot.c -@@ -997,17 +997,13 @@ static int __devinit do_boot_cpu(int api - return boot_error; - } - --static void idle_task_exit(void) --{ -- /* Give up lazy state borrowed by this idle vcpu */ -- __sync_lazy_execstate(); --} -- - void cpu_exit_clear(void) - { - int cpu = raw_smp_processor_id(); - -- idle_task_exit(); -+ /* Previous non-idle state should be synchronised already. */ -+ if (__sync_lazy_execstate()) -+ BUG(); - - cpucount --; - cpu_uninit(); -@@ -1302,6 +1298,13 @@ int __cpu_disable(void) - - remove_siblinginfo(cpu); - -+ /* -+ * If we are running the idle vcpu, sync last non-idle vcpu's state -+ * before changing cpu_online_map. If we are running non-idle vcpu, -+ * we will synchronously sync the state in context_switch() later. -+ */ -+ __sync_lazy_execstate(); -+ - /* It's now safe to remove this processor from the online map */ - cpu_clear(cpu, cpu_online_map); - fixup_irqs(); -@@ -1340,10 +1343,8 @@ int cpu_down(unsigned int cpu) - int err = 0; - - /* spin_trylock() avoids deadlock with stop_machine_run(). */ -- if (!spin_trylock(&cpu_add_remove_lock)) { -- err = -EBUSY; -- goto out; -- } -+ if (!spin_trylock(&cpu_add_remove_lock)) -+ return -EBUSY; - - if (num_online_cpus() == 1) { - err = -EBUSY; ---- a/xen/common/sched_credit.c -+++ b/xen/common/sched_credit.c -@@ -410,7 +410,7 @@ _csched_cpu_pick(struct vcpu *vc, bool_t - * like run two VCPUs on co-hyperthreads while there are idle cores - * or sockets. - */ -- idlers = csched_priv.idlers; -+ cpus_and(idlers, cpu_online_map, csched_priv.idlers); - cpu_set(cpu, idlers); - cpus_and(cpus, cpus, idlers); - cpu_clear(cpu, cpus); ---- a/xen/drivers/acpi/pmstat.c -+++ b/xen/drivers/acpi/pmstat.c -@@ -86,12 +86,13 @@ int do_get_pm_info(struct xen_sysctl_get - case PMSTAT_get_pxstat: - { - uint32_t ct; -- struct pm_px *pxpt = cpufreq_statistic_data[op->cpuid]; -+ struct pm_px *pxpt; - spinlock_t *cpufreq_statistic_lock = - &per_cpu(cpufreq_statistic_lock, op->cpuid); - - spin_lock(cpufreq_statistic_lock); - -+ pxpt = cpufreq_statistic_data[op->cpuid]; - if ( !pxpt || !pxpt->u.pt || !pxpt->u.trans_pt ) - { - spin_unlock(cpufreq_statistic_lock); ---- a/xen/drivers/cpufreq/cpufreq_ondemand.c -+++ b/xen/drivers/cpufreq/cpufreq_ondemand.c -@@ -196,9 +196,8 @@ static void dbs_timer_init(struct cpu_db - { - dbs_info->enable = 1; - -- if ( !dbs_timer[dbs_info->cpu].function ) -- init_timer(&dbs_timer[dbs_info->cpu], do_dbs_timer, -- (void *)dbs_info, dbs_info->cpu); -+ init_timer(&dbs_timer[dbs_info->cpu], do_dbs_timer, -+ (void *)dbs_info, dbs_info->cpu); - - set_timer(&dbs_timer[dbs_info->cpu], NOW()+dbs_tuners_ins.sampling_rate); - -@@ -213,7 +212,7 @@ static void dbs_timer_exit(struct cpu_db - { - dbs_info->enable = 0; - dbs_info->stoppable = 0; -- stop_timer(&dbs_timer[dbs_info->cpu]); -+ kill_timer(&dbs_timer[dbs_info->cpu]); - } - - int cpufreq_governor_dbs(struct cpufreq_policy *policy, unsigned int event) diff --git a/21128-domain-save-flush.patch b/21128-domain-save-flush.patch deleted file mode 100644 index 98ae883..0000000 --- a/21128-domain-save-flush.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271053336 -3600 -# Node ID b5f9c6274d917db5bbe6cb9cc0d59910cc07a8a6 -# Parent 5bc70100b514d98bd3938cdeca1e182726c26df2 -libxc: Flush I/O before xc_domain_save completion - -The final, flushing call to discard_file_cache also discards any -errors from fsync. Call fsync explicitly before leaving, to check if -all VM memory actually made it to the disk. - -Signed-off-by: Daniel Stodden - -Index: xen-4.0.0-testing/tools/libxc/xc_domain_save.c -=================================================================== ---- xen-4.0.0-testing.orig/tools/libxc/xc_domain_save.c -+++ xen-4.0.0-testing/tools/libxc/xc_domain_save.c -@@ -1764,6 +1764,13 @@ int xc_domain_save(int xc_handle, int io - goto out; - } - -+ /* Flush last write and check for errors. */ -+ if ( fsync(io_fd) && errno != EINVAL ) -+ { -+ PERROR("Error when flushing state file"); -+ goto out; -+ } -+ - /* Success! */ - rc = 0; - diff --git a/21129-xen-hotplug-cleanup.patch b/21129-xen-hotplug-cleanup.patch deleted file mode 100644 index 9162685..0000000 --- a/21129-xen-hotplug-cleanup.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271053401 -3600 -# Node ID bf74d9c31674c9001a7c4aa8d93227552edf53b1 -# Parent b5f9c6274d917db5bbe6cb9cc0d59910cc07a8a6 -blktap2: a little fix to xen-hotplug-cleanup - -Signed-off-by: James (Song Wei) - -Index: xen-4.0.0-testing/tools/hotplug/Linux/xen-hotplug-cleanup -=================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/xen-hotplug-cleanup -+++ xen-4.0.0-testing/tools/hotplug/Linux/xen-hotplug-cleanup -@@ -21,7 +21,7 @@ if [ "$vm" != "" ]; then - - # if the vm path does not exist and the device class is 'vbd' then we may have - # a tap2 device -- if [ $(xenstore-read "$vm_dev" 2>/dev/null) != "" ] \ -+ if [ "$(xenstore-read "$vm_dev" 2>/dev/null)" != "" ] \ - && [ "${path_array[1]}" = "vbd" ]; then - vm_dev="$vm/device/tap2/${path_array[3]}" - fi diff --git a/21150-shadow-race.patch b/21150-shadow-race.patch deleted file mode 100644 index 75d6b62..0000000 --- a/21150-shadow-race.patch +++ /dev/null @@ -1,68 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271091116 -3600 -# Node ID 78488a63bbc200095413824cc146134b54635da9 -# Parent b010b792c0f814de725f669d8a6bee738df68963 -x86, shadow: Fix read-to-use race condition - -If OOS mode is enabled, after last possible resync, read the guest l1e -one last time. If it's different than the original read, start over -again. - -This fixes a race which can result in inconsistent in-sync shadow -tables, leading to corruption: - -v1: take page fault, read gl1e from an out-of-sync PT. -v2: modify gl1e, lowering permissions -[v1,v3]: resync l1 which was just read. -v1: propagate change to l1 shadow using stale gl1e - -Now we have an in-sync shadow with more permissions than the guest. - -The resync can happen either as a result of a 3rd vcpu doing a cr3 -update, or under certain conditions by v1 itself. - -Signed-off-by: George Dunlap - ---- a/xen/arch/x86/mm/shadow/multi.c -+++ b/xen/arch/x86/mm/shadow/multi.c -@@ -240,6 +240,23 @@ shadow_check_gwalk(struct vcpu *v, unsig - return !mismatch; - } - -+static int -+shadow_check_gl1e(struct vcpu *v, walk_t *gw) -+{ -+ guest_l1e_t *l1p, nl1e; -+ -+ if ( !mfn_valid(gw->l1mfn) ) -+ return 0; -+ -+ /* Can't just pull-through because mfn may have changed */ -+ l1p = map_domain_page(mfn_x(gw->l1mfn)); -+ nl1e.l1 = l1p[guest_l1_table_offset(gw->va)].l1; -+ unmap_domain_page(l1p); -+ -+ return gw->l1e.l1 != nl1e.l1; -+} -+ -+ - /* Remove write access permissions from a gwalk_t in a batch, and - * return OR-ed result for TLB flush hint and need to rewalk the guest - * pages. -@@ -3235,6 +3252,15 @@ static int sh_page_fault(struct vcpu *v, - shadow_unlock(d); - return 0; - } -+ -+ /* Final check: if someone has synced a page, it's possible that -+ * our l1e is stale. Compare the entries, and rewalk if necessary. */ -+ if ( shadow_check_gl1e(v, &gw) ) -+ { -+ perfc_incr(shadow_inconsistent_gwalk); -+ shadow_unlock(d); -+ goto rewalk; -+ } - #endif /* OOS */ - - /* Calculate the shadow entry and write it */ diff --git a/21151-trace-bounds-check.patch b/21151-trace-bounds-check.patch deleted file mode 100644 index 3da6d68..0000000 --- a/21151-trace-bounds-check.patch +++ /dev/null @@ -1,205 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271091288 -3600 -# Node ID 94cae4dfa25bcf9aaeb93fb374926cb40411ebdf -# Parent 78488a63bbc200095413824cc146134b54635da9 -xentrace: Bounds checking and error handling - -Check tbuf_size to make sure that it will fit on the t_info struct -allocated at boot. Also deal with allocation failures more -gracefully. - -Signed-off-by: George Dunlap - -# HG changeset patch -# User Keir Fraser -# Date 1278093165 -3600 -# Node ID 2f3a68a0b55b1b7df4d6632dfc151040ba08e9ea -# Parent 2846fd19945cb2ab32d1513531c3500278133484 -trace: Fix T_INFO_FIRST_OFFSET calculation - -This wasn't defined correctly, thus allowing in the -num_online_cpus() == NR_CPUS case to pass a corrupted MFN to -Dom0. - -Reported-by: Jan Beulich -Signed-off-by: George Dunlap - -# HG changeset patch -# User Keir Fraser -# Date 1278093190 -3600 -# Node ID 1390e2ab45c7b63d79ba9496d609cf59af4b44ee -# Parent 2f3a68a0b55b1b7df4d6632dfc151040ba08e9ea -trace: improve check_tbuf_size() - -It didn't consider the case of the incoming size not allowing for the -2*data_size range for t_buf->{prod,cons} - -Signed-off-by: Jan Beulich -Signed-off-by: George Dunlap - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -48,10 +48,12 @@ integer_param("tbuf_size", opt_tbuf_size - /* Pointers to the meta-data objects for all system trace buffers */ - static struct t_info *t_info; - #define T_INFO_PAGES 2 /* Size fixed at 2 pages for now. */ -+#define T_INFO_SIZE ((T_INFO_PAGES)*(PAGE_SIZE)) - static DEFINE_PER_CPU_READ_MOSTLY(struct t_buf *, t_bufs); - static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, t_data); - static DEFINE_PER_CPU_READ_MOSTLY(spinlock_t, t_lock); - static int data_size; -+static u32 t_info_first_offset __read_mostly; - - /* High water mark for trace buffers; */ - /* Send virtual interrupt when buffer level reaches this point */ -@@ -71,6 +73,39 @@ static cpumask_t tb_cpu_mask = CPU_MASK_ - /* which tracing events are enabled */ - static u32 tb_event_mask = TRC_ALL; - -+/* Return the number of elements _type necessary to store at least _x bytes of data -+ * i.e., sizeof(_type) * ans >= _x. */ -+#define fit_to_type(_type, _x) (((_x)+sizeof(_type)-1) / sizeof(_type)) -+ -+static void calc_tinfo_first_offset(void) -+{ -+ int offset_in_bytes; -+ -+ offset_in_bytes = offsetof(struct t_info, mfn_offset[NR_CPUS]); -+ -+ t_info_first_offset = fit_to_type(uint32_t, offset_in_bytes); -+ -+ gdprintk(XENLOG_INFO, "%s: NR_CPUs %d, offset_in_bytes %d, t_info_first_offset %u\n", -+ __func__, NR_CPUS, offset_in_bytes, (unsigned)t_info_first_offset); -+} -+ -+/** -+ * check_tbuf_size - check to make sure that the proposed size will fit -+ * in the currently sized struct t_info and allows prod and cons to -+ * reach double the value without overflow. -+ */ -+static int check_tbuf_size(u32 pages) -+{ -+ struct t_buf dummy; -+ typeof(dummy.prod) size; -+ -+ size = ((typeof(dummy.prod))pages) * PAGE_SIZE; -+ -+ return (size / PAGE_SIZE != pages) -+ || (size + size < size) -+ || (num_online_cpus() * pages + t_info_first_offset > T_INFO_SIZE / sizeof(uint32_t)); -+} -+ - /** - * alloc_trace_bufs - performs initialization of the per-cpu trace buffers. - * -@@ -87,7 +122,9 @@ static int alloc_trace_bufs(void) - unsigned long nr_pages; - /* Start after a fixed-size array of NR_CPUS */ - uint32_t *t_info_mfn_list = (uint32_t *)t_info; -- int offset = (NR_CPUS * 2 + 1 + 1) / 4; -+ int offset = t_info_first_offset; -+ -+ BUG_ON(check_tbuf_size(opt_tbuf_size)); - - if ( opt_tbuf_size == 0 ) - return -EINVAL; -@@ -180,7 +217,8 @@ out_dealloc: - } - spin_unlock_irqrestore(&per_cpu(t_lock, cpu), flags); - } -- return -EINVAL; -+ -+ return -ENOMEM; - } - - -@@ -197,19 +235,35 @@ static int tb_set_size(int size) - * boot time or via control tools, but not by both. Once buffers - * are created they cannot be destroyed. - */ -- if ( (opt_tbuf_size != 0) || (size <= 0) ) -+ int ret = 0; -+ -+ -+ -+ if ( (opt_tbuf_size != 0) ) - { -- gdprintk(XENLOG_INFO, "tb_set_size from %d to %d not implemented\n", -- opt_tbuf_size, size); -+ if ( size != opt_tbuf_size ) -+ gdprintk(XENLOG_INFO, "tb_set_size from %d to %d not implemented\n", -+ opt_tbuf_size, size); - return -EINVAL; - } - -- opt_tbuf_size = size; -- if ( alloc_trace_bufs() != 0 ) -+ if ( size <= 0 ) - return -EINVAL; - -- printk("Xen trace buffers: initialized\n"); -- return 0; -+ if ( check_tbuf_size(size) ) -+ { -+ gdprintk(XENLOG_INFO, "tb size %d too large\n", size); -+ return -EINVAL; -+ } -+ -+ opt_tbuf_size = size; -+ -+ if ( (ret = alloc_trace_bufs()) == 0 ) -+ printk("Xen trace buffers: initialized\n"); -+ else -+ opt_tbuf_size = 0; -+ -+ return ret; - } - - int trace_will_trace_event(u32 event) -@@ -248,6 +302,10 @@ int trace_will_trace_event(u32 event) - void __init init_trace_bufs(void) - { - int i; -+ -+ /* Calculate offset in u32 of first mfn */ -+ calc_tinfo_first_offset(); -+ - /* t_info size fixed at 2 pages for now. That should be big enough / small enough - * until it's worth making it dynamic. */ - t_info = alloc_xenheap_pages(1, 0); -@@ -265,13 +323,18 @@ void __init init_trace_bufs(void) - share_xen_page_with_privileged_guests( - virt_to_page(t_info) + i, XENSHARE_writable); - -- -- - if ( opt_tbuf_size == 0 ) - { - printk("Xen trace buffers: disabled\n"); - return; - } -+ else if ( check_tbuf_size(opt_tbuf_size) ) -+ { -+ gdprintk(XENLOG_INFO, "Xen trace buffers: " -+ "tb size %d too large, disabling\n", -+ opt_tbuf_size); -+ opt_tbuf_size = 0; -+ } - - if ( alloc_trace_bufs() == 0 ) - { -@@ -279,6 +342,13 @@ void __init init_trace_bufs(void) - wmb(); /* above must be visible before tb_init_done flag set */ - tb_init_done = 1; - } -+ else -+ { -+ gdprintk(XENLOG_INFO, "Xen trace buffers: " -+ "allocation size %d failed, disabling\n", -+ opt_tbuf_size); -+ opt_tbuf_size = 0; -+ } - } - - /** diff --git a/21160-sysctl-debug-keys.patch b/21160-sysctl-debug-keys.patch deleted file mode 100644 index 6839cdb..0000000 --- a/21160-sysctl-debug-keys.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271162458 -3600 -# Node ID 859a372efa66e6bcba8e1fd968e521cb16da12ea -# Parent da90dd1a09b93ae41ab451d223ff87dca04356f5 -sysctl: Fix XEN_SYSCTL_debug_keys error path. - -Signed-off-by: Keir Fraser - ---- a/xen/common/sysctl.c -+++ b/xen/common/sysctl.c -@@ -169,12 +169,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc - if ( ret ) - break; - -+ ret = -EFAULT; - for ( i = 0; i < op->u.debug_keys.nr_keys; i++ ) - { - if ( copy_from_guest_offset(&c, op->u.debug_keys.keys, i, 1) ) -- return -EFAULT; -+ goto out; - handle_keypress(c, guest_cpu_user_regs()); - } -+ ret = 0; - } - break; - diff --git a/21189-x86-emulate-clflush.patch b/21189-x86-emulate-clflush.patch deleted file mode 100644 index bf0aa3a..0000000 --- a/21189-x86-emulate-clflush.patch +++ /dev/null @@ -1,53 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271353678 -3600 -# Node ID d18e6a6c618af4f25a9e1a57c9e3eac55921678c -# Parent ffffddc4b1e030cce6bd4d12c4409c94599c1abf -x86_emulate: Emulate CLFLUSH instruction - -We recently found that FreeBSD 8.0 guest failed to install and boot on -Xen. The reason was that FreeBSD detected clflush feature and invoked -this instruction to flush MMIO space. This caused a page fault; but -x86_emulate.c failed to emulate this instruction (not supported). As a -result, a page fault was detected inside FreeBSD. A similar issue was -reported earlier. - -http://lists.xensource.com/archives/html/xen-devel/2010-03/msg00362.html - -From: Wei Huang -Signed-off-by: Keir Fraser - -Index: xen-4.0.0-testing/xen/arch/x86/x86_emulate/x86_emulate.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_emulate/x86_emulate.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_emulate/x86_emulate.c -@@ -227,7 +227,8 @@ static uint8_t twobyte_table[256] = { - DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, 0, 0, - /* 0xA8 - 0xAF */ - ImplicitOps, ImplicitOps, 0, DstBitBase|SrcReg|ModRM, -- DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, 0, DstReg|SrcMem|ModRM, -+ DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, -+ ImplicitOps|ModRM, DstReg|SrcMem|ModRM, - /* 0xB0 - 0xB7 */ - ByteOp|DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, - DstReg|SrcMem|ModRM|Mov, DstBitBase|SrcReg|ModRM, -@@ -4008,6 +4009,19 @@ x86_emulate( - emulate_2op_SrcV_nobyte("bts", src, dst, _regs.eflags); - break; - -+ case 0xae: /* Grp15 */ -+ switch ( modrm_reg & 7 ) -+ { -+ case 7: /* clflush */ -+ fail_if(ops->wbinvd == NULL); -+ if ( (rc = ops->wbinvd(ctxt)) != 0 ) -+ goto done; -+ break; -+ default: -+ goto cannot_emulate; -+ } -+ break; -+ - case 0xaf: /* imul */ - _regs.eflags &= ~(EFLG_OF|EFLG_CF); - switch ( dst.bytes ) diff --git a/21193-blktap-script.patch b/21193-blktap-script.patch deleted file mode 100644 index c568a78..0000000 --- a/21193-blktap-script.patch +++ /dev/null @@ -1,23 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271663923 -3600 -# Node ID ae1abcdd4a670e34509e39d5280834a75afc0f6a -# Parent 6860c523d2daf1d110b130a9596469a0957b4032 -tools/hotplug/Linux/blktap: remove optional tapdisk: prefix - -Perhaps this should even be further generalized (e.g. to remove any -"[!/]*:" pattern prefixes) to be more forward compatible? - -Signed-off-by: Jan Beulich - -diff -r 6860c523d2da -r ae1abcdd4a67 tools/hotplug/Linux/blktap ---- a/tools/hotplug/Linux/blktap Mon Apr 19 08:55:33 2010 +0100 -+++ b/tools/hotplug/Linux/blktap Mon Apr 19 08:58:43 2010 +0100 -@@ -59,6 +59,7 @@ - if [ -n "$t" ] - then - p=$(xenstore_read "$XENBUS_PATH/params") -+ p=${p#tapdisk:} - # if we have a ':', chew from head including : - if echo $p | grep -q \: - then diff --git a/21194-ioemu-subtype.patch b/21194-ioemu-subtype.patch deleted file mode 100644 index 71f2b30..0000000 --- a/21194-ioemu-subtype.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -r c02cc832cb2d tools/python/xen/xend/server/BlktapController.py ---- a/tools/python/xen/xend/server/BlktapController.py Tue Apr 13 18:19:33 2010 +0100 -+++ b/tools/python/xen/xend/server/BlktapController.py Fri Apr 16 12:05:39 2010 -0600 -@@ -189,7 +189,7 @@ - blktap2_installed=1; - - if typ in ('tap'): -- if subtyp in ('tapdisk'): -+ if subtyp in ('tapdisk', 'ioemu'): - if params not in blktap2_disk_types or not blktap2_installed: - # pass this device off to BlktapController - log.warn('WARNING: using deprecated blktap module') diff --git a/21223-xend-preserve-devs.patch b/21223-xend-preserve-devs.patch deleted file mode 100644 index 3a0aa2b..0000000 --- a/21223-xend-preserve-devs.patch +++ /dev/null @@ -1,32 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271925757 -3600 -# Node ID 5b72f9832cc21ebdbbd8569836578817353314d8 -# Parent 11d20f17f82c1c6fc6c003c363835a964338b311 -xend: don't drop device config on domain start failure - -If domain creation in xend fails before devices are configured, e.g. -insufficient memory, device config is dropped from xend's managed -domain config. - -Once xend is restarted, the domain's devices are lost. - -This patch fixes a bug in XendConfig where only the device -controller was consulted for device configuration. - -Signed-off-by: Jim Fehlig - -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py -@@ -1166,8 +1166,8 @@ class XendConfig(dict): - config.append(['VDI', dev_cfg.get('VDI', '')]) - - sxpr.append(['device', config]) -+ found = True - -- found = True - except: - log.exception("dumping sxp from device controllers") - pass diff --git a/21225-conring-iommu.patch b/21225-conring-iommu.patch deleted file mode 100644 index 619be29..0000000 --- a/21225-conring-iommu.patch +++ /dev/null @@ -1,77 +0,0 @@ -References: bnc#600794 - -# HG changeset patch -# User Keir Fraser -# Date 1271954636 -3600 -# Node ID 2b97855a629f1d79e1d075a6d2a8b569018b2094 -# Parent a7947fd90328287dd097294b241753063c858597 -console: Make initial static console buffer __initdata. - -The previous scheme --- freeing an area of BSS --- did not interact -nicely with device passthrough as IOMMU will not have any Xen BSS area -in guest device pagetables. Hence if the freed BSS space gets -allocated to a guest, DMAs to guest's own memory can fail. - -The simple solution here is to always free the static buffer at end of -boot (initmem is specially handled for IOMMUs) and require a -dynamically-allocated buffer always to be created. - -Signed-off-by: Keir Fraser - ---- a/xen/drivers/char/console.c -+++ b/xen/drivers/char/console.c -@@ -65,11 +65,7 @@ size_param("conring_size", opt_conring_s - - #define _CONRING_SIZE 16384 - #define CONRING_IDX_MASK(i) ((i)&(conring_size-1)) --static char --#if _CONRING_SIZE >= PAGE_SIZE -- __attribute__((__section__(".bss.page_aligned"), __aligned__(PAGE_SIZE))) --#endif -- _conring[_CONRING_SIZE]; -+static char __initdata _conring[_CONRING_SIZE]; - static char *__read_mostly conring = _conring; - static uint32_t __read_mostly conring_size = _CONRING_SIZE; - static uint32_t conringc, conringp; -@@ -596,25 +592,20 @@ void __init console_init_preirq(void) - void __init console_init_postirq(void) - { - char *ring; -- unsigned int i; -+ unsigned int i, order; - - serial_init_postirq(); - - if ( !opt_conring_size ) - opt_conring_size = num_present_cpus() << (9 + xenlog_lower_thresh); -- /* Round size down to a power of two. */ -- while ( opt_conring_size & (opt_conring_size - 1) ) -- opt_conring_size &= opt_conring_size - 1; -- if ( opt_conring_size < conring_size ) -- return; -- -- ring = alloc_xenheap_pages(get_order_from_bytes(opt_conring_size), 0); -- if ( ring == NULL ) -+ -+ order = get_order_from_bytes(max(opt_conring_size, conring_size)); -+ while ( (ring = alloc_xenheap_pages(order, 0)) == NULL ) - { -- printk("Unable to allocate console ring of %u bytes.\n", -- opt_conring_size); -- return; -+ BUG_ON(order == 0); -+ order--; - } -+ opt_conring_size = PAGE_SIZE << order; - - spin_lock_irq(&console_lock); - for ( i = conringc ; i != conringp; i++ ) -@@ -625,8 +616,6 @@ void __init console_init_postirq(void) - spin_unlock_irq(&console_lock); - - printk("Allocated console ring of %u KiB.\n", opt_conring_size >> 10); -- -- init_xenheap_pages(__pa(_conring), __pa(_conring + _CONRING_SIZE)); - } - - void __init console_endboot(void) diff --git a/21234-x86-bad-srat-clear-pxm2node.patch b/21234-x86-bad-srat-clear-pxm2node.patch deleted file mode 100644 index 2350cb1..0000000 --- a/21234-x86-bad-srat-clear-pxm2node.patch +++ /dev/null @@ -1,34 +0,0 @@ -References: bnc#595124 - -# HG changeset patch -# User Keir Fraser -# Date 1272280290 -3600 -# Node ID d01ea51fc929c57c7d5f427e1aafa0de7a436473 -# Parent f766f2142a8515d1dc71783355dc4fc1813d95c4 -x86: make pxm_to_node() return sane values when disabling NUMA internally - -Otherwise, pass-through code may call memory allocation functions with -invalid node IDs, causing the allocations to fail. - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/srat.c -+++ b/xen/arch/x86/srat.c -@@ -25,7 +25,7 @@ static struct acpi_table_slit *__read_mo - static nodemask_t nodes_parsed __initdata; - static nodemask_t nodes_found __initdata; - static struct node nodes[MAX_NUMNODES] __initdata; --static u8 __read_mostly pxm2node[256] = { [0 ... 255] = 0xff }; -+static u8 __read_mostly pxm2node[256] = { [0 ... 255] = NUMA_NO_NODE }; - - - static int num_node_memblks; -@@ -112,6 +112,8 @@ static __init void bad_srat(void) - acpi_numa = -1; - for (i = 0; i < MAX_LOCAL_APIC; i++) - apicid_to_node[i] = NUMA_NO_NODE; -+ for (i = 0; i < ARRAY_SIZE(pxm2node); i++) -+ pxm2node[i] = NUMA_NO_NODE; - } - - #ifdef CONFIG_X86_64 diff --git a/21235-crashkernel-advanced.patch b/21235-crashkernel-advanced.patch index 68a9c42..09e7abe 100644 --- a/21235-crashkernel-advanced.patch +++ b/21235-crashkernel-advanced.patch @@ -33,9 +33,11 @@ This still needs to be hooked up for ia64. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/setup.c -+++ b/xen/arch/x86/setup.c -@@ -642,6 +642,11 @@ void __init __start_xen(unsigned long mb +Index: xen-4.0.1-testing/xen/arch/x86/setup.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/setup.c ++++ xen-4.0.1-testing/xen/arch/x86/setup.c +@@ -664,6 +664,11 @@ void __init __start_xen(unsigned long mb memcpy(&boot_e820, &e820, sizeof(e820)); /* Early kexec reservation (explicit static start address). */ @@ -47,9 +49,11 @@ Signed-off-by: Jan Beulich kexec_reserve_area(&boot_e820); /* ---- a/xen/common/kexec.c -+++ b/xen/common/kexec.c -@@ -47,15 +47,109 @@ static unsigned char vmcoreinfo_data[VMC +Index: xen-4.0.1-testing/xen/common/kexec.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/kexec.c ++++ xen-4.0.1-testing/xen/common/kexec.c +@@ -49,15 +49,109 @@ static unsigned char vmcoreinfo_data[VMC static size_t vmcoreinfo_size = 0; xen_kexec_reserve_t kexec_crash_area; @@ -162,8 +166,10 @@ Signed-off-by: Jan Beulich static void one_cpu_only(void) { /* Only allow the first cpu to continue - force other cpus to spin */ ---- a/xen/include/xen/kexec.h -+++ b/xen/include/xen/kexec.h +Index: xen-4.0.1-testing/xen/include/xen/kexec.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/kexec.h ++++ xen-4.0.1-testing/xen/include/xen/kexec.h @@ -12,6 +12,8 @@ typedef struct xen_kexec_reserve { extern xen_kexec_reserve_t kexec_crash_area; diff --git a/21266-vmx-disabled-check.patch b/21266-vmx-disabled-check.patch deleted file mode 100644 index 3a00114..0000000 --- a/21266-vmx-disabled-check.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1272972545 -3600 -# Node ID 6d21da6feb59db33eceb3aa6bcb8afac15ac7fd8 -# Parent 71cf9b12ac9effe2b7cf0aec058f92ee36430e0a -vmx, tboot: Check the correct in/outside-SMX flag when init'ing VMX. - -Signed-off-by: Shane Wang -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/hvm/vmx/vmcs.c -+++ b/xen/arch/x86/hvm/vmx/vmcs.c -@@ -360,8 +360,9 @@ int vmx_cpu_up(void) - bios_locked = !!(eax & IA32_FEATURE_CONTROL_MSR_LOCK); - if ( bios_locked ) - { -- if ( !(eax & (IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX | -- IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX)) ) -+ if ( !(eax & (tboot_in_measured_env() -+ ? IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX -+ : IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX)) ) - { - printk("CPU%d: VMX disabled by BIOS.\n", cpu); - return 0; diff --git a/21271-x86-cache-flush-global.patch b/21271-x86-cache-flush-global.patch index 4bd8bec..e740f9a 100644 --- a/21271-x86-cache-flush-global.patch +++ b/21271-x86-cache-flush-global.patch @@ -12,9 +12,11 @@ the hypervisor. Add a new MMUEXT operation for this. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/mm.c -+++ b/xen/arch/x86/mm.c -@@ -2887,6 +2887,27 @@ int do_mmuext_op( +Index: xen-4.0.1-testing/xen/arch/x86/mm.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/mm.c +@@ -2889,6 +2889,27 @@ int do_mmuext_op( } break; @@ -42,8 +44,10 @@ Signed-off-by: Jan Beulich case MMUEXT_SET_LDT: { unsigned long ptr = op.arg1.linear_addr; ---- a/xen/include/public/xen.h -+++ b/xen/include/public/xen.h +Index: xen-4.0.1-testing/xen/include/public/xen.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/public/xen.h ++++ xen-4.0.1-testing/xen/include/public/xen.h @@ -239,6 +239,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); * * cmd: MMUEXT_FLUSH_CACHE diff --git a/21272-x86-dom0-alloc-performance.patch b/21272-x86-dom0-alloc-performance.patch deleted file mode 100644 index 2bafa88..0000000 --- a/21272-x86-dom0-alloc-performance.patch +++ /dev/null @@ -1,99 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1272973341 -3600 -# Node ID b07edd50661e7f768088c08215dabb9becb5c5b6 -# Parent 6c7b905b03ff1cf171187bafe7129e3e213e5787 -x86: fix Dom0 booting time regression -References: bnc#593536 - -Unfortunately the changes in c/s 21035 caused boot time to go up -significantly on certain large systems. To rectify this without going -back to the old behavior, introduce a new memory allocation flag so -that Dom0 allocations can exhaust non-DMA memory before starting to -consume DMA memory. For the latter, the behavior introduced in -aforementioned c/s gets retained, while for the former we can now even -try larger chunks first. - -This builds on the fact that alloc_chunk() gets called with non- -increasing 'max_pages' arguments, end hence it can store locally the -allocation order last used (as larger order allocations can't succeed -during subsequent invocations if they failed once). - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/domain_build.c -+++ b/xen/arch/x86/domain_build.c -@@ -125,26 +125,36 @@ string_param("dom0_ioports_disable", opt - static struct page_info * __init alloc_chunk( - struct domain *d, unsigned long max_pages) - { -+ static unsigned int __initdata last_order = MAX_ORDER; -+ static unsigned int __initdata memflags = MEMF_no_dma; - struct page_info *page; -- unsigned int order, free_order; -+ unsigned int order = get_order_from_pages(max_pages), free_order; - -- /* -- * Allocate up to 2MB at a time: It prevents allocating very large chunks -- * from DMA pools before the >4GB pool is fully depleted. -- */ -- if ( max_pages > (2UL << (20 - PAGE_SHIFT)) ) -- max_pages = 2UL << (20 - PAGE_SHIFT); -- order = get_order_from_pages(max_pages); -- if ( (max_pages & (max_pages-1)) != 0 ) -- order--; -- while ( (page = alloc_domheap_pages(d, order, 0)) == NULL ) -+ if ( order > last_order ) -+ order = last_order; -+ else if ( max_pages & (max_pages - 1) ) -+ --order; -+ while ( (page = alloc_domheap_pages(d, order, memflags)) == NULL ) - if ( order-- == 0 ) - break; -+ if ( page ) -+ last_order = order; -+ else if ( memflags ) -+ { -+ /* -+ * Allocate up to 2MB at a time: It prevents allocating very large -+ * chunks from DMA pools before the >4GB pool is fully depleted. -+ */ -+ last_order = 21 - PAGE_SHIFT; -+ memflags = 0; -+ return alloc_chunk(d, max_pages); -+ } -+ - /* - * Make a reasonable attempt at finding a smaller chunk at a higher - * address, to avoid allocating from low memory as much as possible. - */ -- for ( free_order = order; page && order--; ) -+ for ( free_order = order; !memflags && page && order--; ) - { - struct page_info *pg2; - ---- a/xen/common/page_alloc.c -+++ b/xen/common/page_alloc.c -@@ -1157,8 +1157,9 @@ struct page_info *alloc_domheap_pages( - pg = alloc_heap_pages(dma_zone + 1, zone_hi, node, order, memflags); - - if ( (pg == NULL) && -- ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi, -- node, order, memflags)) == NULL) ) -+ ((memflags & MEMF_no_dma) || -+ ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi, -+ node, order, memflags)) == NULL)) ) - return NULL; - - if ( (d != NULL) && assign_pages(d, pg, order, memflags) ) ---- a/xen/include/xen/mm.h -+++ b/xen/include/xen/mm.h -@@ -79,6 +79,8 @@ int assign_pages( - #define MEMF_populate_on_demand (1U<<_MEMF_populate_on_demand) - #define _MEMF_tmem 2 - #define MEMF_tmem (1U<<_MEMF_tmem) -+#define _MEMF_no_dma 3 -+#define MEMF_no_dma (1U<<_MEMF_no_dma) - #define _MEMF_node 8 - #define MEMF_node(n) ((((n)+1)&0xff)<<_MEMF_node) - #define _MEMF_bits 24 diff --git a/21273-linux-autconf.patch b/21273-linux-autconf.patch deleted file mode 100644 index dd18589..0000000 --- a/21273-linux-autconf.patch +++ /dev/null @@ -1,26 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1272973376 -3600 -# Node ID d2373000996d850c46297740fbd11ea1d93d59d9 -# Parent b07edd50661e7f768088c08215dabb9becb5c5b6 -linux pvdrv: generalize location of autoconf.h - -The location of the file in the build tree changed in recent Linux; -since there can be only one such file, using a wild card instead of -an explicit directory name seems the easiest solution. - -Signed-off-by: Jan Beulich - -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/overrides.mk -=================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/overrides.mk -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/overrides.mk -@@ -11,7 +11,7 @@ ifeq ($(ARCH),ia64) - _XEN_CPPFLAGS += -DCONFIG_VMX_GUEST - endif - --_XEN_CPPFLAGS += -include $(objtree)/include/linux/autoconf.h -+_XEN_CPPFLAGS += -include $(wildcard $(objtree)/include/*/autoconf.h) - - EXTRA_CFLAGS += $(_XEN_CPPFLAGS) - EXTRA_AFLAGS += $(_XEN_CPPFLAGS) diff --git a/21301-svm-lmsl.patch b/21301-svm-lmsl.patch index fc81aa2..68a95fc 100644 --- a/21301-svm-lmsl.patch +++ b/21301-svm-lmsl.patch @@ -11,9 +11,11 @@ makes sense to also allow HVM guests to make use of it. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/hvm/hvm.c -+++ b/xen/arch/x86/hvm/hvm.c -@@ -629,11 +629,12 @@ static int hvm_load_cpu_ctxt(struct doma +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hvm.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c +@@ -603,11 +603,12 @@ static int hvm_load_cpu_ctxt(struct doma return -EINVAL; } @@ -27,7 +29,7 @@ Signed-off-by: Jan Beulich (!cpu_has_ffxsr && (ctxt.msr_efer & EFER_FFXSE)) || ((ctxt.msr_efer & (EFER_LME|EFER_LMA)) == EFER_LMA) ) { -@@ -984,10 +985,11 @@ int hvm_set_efer(uint64_t value) +@@ -960,10 +961,11 @@ int hvm_set_efer(uint64_t value) value &= ~EFER_LMA; @@ -40,9 +42,11 @@ Signed-off-by: Jan Beulich (!cpu_has_ffxsr && (value & EFER_FFXSE)) ) { gdprintk(XENLOG_WARNING, "Trying to set reserved bit in " ---- a/xen/arch/x86/hvm/svm/svm.c -+++ b/xen/arch/x86/hvm/svm/svm.c -@@ -56,6 +56,9 @@ +Index: xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/svm/svm.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c +@@ -57,6 +57,9 @@ u32 svm_feature_flags; @@ -52,7 +56,7 @@ Signed-off-by: Jan Beulich #define set_segment_register(name, value) \ asm volatile ( "movw %%ax ,%%" STR(name) "" : : "a" (value) ) -@@ -847,6 +850,29 @@ static int svm_cpu_up(struct cpuinfo_x86 +@@ -871,6 +874,29 @@ static int svm_cpu_up(struct cpuinfo_x86 /* Initialize core's ASID handling. */ svm_asid_init(c); @@ -82,9 +86,11 @@ Signed-off-by: Jan Beulich return 1; } ---- a/xen/include/asm-x86/hvm/hvm.h -+++ b/xen/include/asm-x86/hvm/hvm.h -@@ -131,6 +131,7 @@ struct hvm_function_table { +Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-x86/hvm/hvm.h ++++ xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm.h +@@ -143,6 +143,7 @@ struct hvm_function_table { extern struct hvm_function_table hvm_funcs; extern int hvm_enabled; diff --git a/21304-keyhandler-alternative.patch b/21304-keyhandler-alternative.patch index b4b5aa4..7e2b065 100644 --- a/21304-keyhandler-alternative.patch +++ b/21304-keyhandler-alternative.patch @@ -11,8 +11,10 @@ a tasklet-based alternative mechanism to handle Dom0 state dumps. Signed-off-by: Jan Beulich ---- a/xen/common/keyhandler.c -+++ b/xen/common/keyhandler.c +Index: xen-4.0.1-testing/xen/common/keyhandler.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/keyhandler.c ++++ xen-4.0.1-testing/xen/common/keyhandler.c @@ -19,6 +19,7 @@ static struct keyhandler *key_table[256]; @@ -66,7 +68,7 @@ Signed-off-by: Jan Beulich } static struct keyhandler dump_dom0_registers_keyhandler = { -@@ -425,8 +456,28 @@ static struct keyhandler do_debug_key_ke +@@ -434,8 +465,28 @@ static struct keyhandler do_debug_key_ke .desc = "trap to xendbg" }; diff --git a/21317-xend-blkif-util-tap2.patch b/21317-xend-blkif-util-tap2.patch deleted file mode 100644 index 2941e2a..0000000 --- a/21317-xend-blkif-util-tap2.patch +++ /dev/null @@ -1,23 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273220860 -3600 -# Node ID 5ac6e33fa3a7fe6645eaeb7de530a29be2865c34 -# Parent 7af536406c255bdc9d3429679710b0827d52bdaf -xend: support blktap2 in xend blkif utils - -Support tap2 device type in xend blkif utils parse method. - -Signed-off-by: Jim Fehlig - -diff -r 7af536406c25 -r 5ac6e33fa3a7 tools/python/xen/util/blkif.py ---- a/tools/python/xen/util/blkif.py Fri May 07 09:26:49 2010 +0100 -+++ b/tools/python/xen/util/blkif.py Fri May 07 09:27:40 2010 +0100 -@@ -86,7 +86,7 @@ - else: - fn = "/dev/%s" %(fn,) - -- if typ == "tap": -+ if typ in ("tap", "tap2"): - (taptype, fn) = fn.split(":", 1) - return (fn, taptype) - diff --git a/21331-svm-vintr-during-nmi.patch b/21331-svm-vintr-during-nmi.patch deleted file mode 100644 index f31e61e..0000000 --- a/21331-svm-vintr-during-nmi.patch +++ /dev/null @@ -1,41 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273256548 -3600 -# Node ID bbf009817ffbe15a7cbbda8bddd82640f290ce0c -# Parent a97ef0eb0b9d520b8b6b97d240771cc27de978e3 -svm: Avoid VINTR injection during NMI shadow - -It is invalid because we get vmexit via IRET interception in this -case. VINTR is unaware of NMI shadows and may vmexit early, leaving us -in an endless loop of VINTR injections and interceptions. - -Signed-off-by: Wei Wang -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/hvm/svm/intr.c -+++ b/xen/arch/x86/hvm/svm/intr.c -@@ -88,10 +88,21 @@ static void enable_intr_window(struct vc - * guest can accept the real interrupt. - * - * TODO: Better NMI handling. We need a way to skip a MOV SS interrupt -- * shadow. This is hard to do without hardware support. We should also -- * track 'NMI blocking' from NMI injection until IRET. This can be done -- * quite easily in software by intercepting the unblocking IRET. -+ * shadow. This is hard to do without hardware support. Also we should -+ * not be waiting for EFLAGS.IF to become 1. - */ -+ -+ /* -+ * NMI-blocking window is handled by IRET interception. We should not -+ * inject a VINTR in this case as VINTR is unaware of NMI-blocking and -+ * hence we can enter an endless loop (VINTR intercept fires, yet -+ * hvm_interrupt_blocked() still indicates NMI-blocking is active, so -+ * we inject a VINTR, ...). -+ */ -+ if ( (intack.source == hvm_intsrc_nmi) && -+ (vmcb->general1_intercepts & GENERAL1_INTERCEPT_IRET) ) -+ return; -+ - intr = vmcb->vintr; - intr.fields.irq = 1; - intr.fields.vector = 0; diff --git a/21333-xentrace-t_info-size.patch b/21333-xentrace-t_info-size.patch deleted file mode 100644 index f15d9e7..0000000 --- a/21333-xentrace-t_info-size.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273479772 -3600 -# Node ID 93c5beba9d04d3e8d2522241bad14107433c3121 -# Parent 3b6e33ebb57b670a48ad138aecb47cbd32a4e986 -xentrace: fix bug in t_info size - -t_info size should be in bytes, not pages. This fixes a bug -that crashes the hypervisor if the total number of all pages -is more than 1024 but less than 2048. - -Signed-off-by: George Dunlap - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -367,7 +367,7 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc - case XEN_SYSCTL_TBUFOP_get_info: - tbc->evt_mask = tb_event_mask; - tbc->buffer_mfn = t_info ? virt_to_mfn(t_info) : 0; -- tbc->size = T_INFO_PAGES; -+ tbc->size = T_INFO_PAGES * PAGE_SIZE; - break; - case XEN_SYSCTL_TBUFOP_set_cpu_mask: - xenctl_cpumap_to_cpumask(&tb_cpu_mask, &tbc->cpu_mask); diff --git a/21340-vtd-dom0-mapping-latency.patch b/21340-vtd-dom0-mapping-latency.patch deleted file mode 100644 index bd1ba81..0000000 --- a/21340-vtd-dom0-mapping-latency.patch +++ /dev/null @@ -1,56 +0,0 @@ -References: bnc#603008 - -# HG changeset patch -# User Keir Fraser -# Date 1273563345 -3600 -# Node ID 220fa418eaae499cdc14359e83092401290a6211 -# Parent 804304d4e05d98289de9a107c6b26c5a1db09cd8 -VT-d: prevent watchdog timer from kicking in when -initializing on systems with huge amounts of memory - -Process pending soft-IRQs every 4G worth of pages initialized for Dom0 -to keep timekeeping happy and prevent the NMI watchdog (when enabled) -from kicking in. - -Signed-off-by: Jan Beulich - ---- a/xen/drivers/passthrough/vtd/ia64/vtd.c -+++ b/xen/drivers/passthrough/vtd/ia64/vtd.c -@@ -19,6 +19,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -110,6 +111,9 @@ static int do_dom0_iommu_mapping(unsigne - iommu_map_page(d, (pfn*tmp+j), (pfn*tmp+j)); - - page_addr += PAGE_SIZE; -+ -+ if (!(pfn & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K)))) -+ process_pending_softirqs(); - } - return 0; - } ---- a/xen/drivers/passthrough/vtd/x86/vtd.c -+++ b/xen/drivers/passthrough/vtd/x86/vtd.c -@@ -19,6 +19,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -153,6 +154,9 @@ void iommu_set_dom0_mapping(struct domai - tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K); - for ( j = 0; j < tmp; j++ ) - iommu_map_page(d, (i*tmp+j), (i*tmp+j)); -+ -+ if (!(i & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K)))) -+ process_pending_softirqs(); - } - } - diff --git a/21346-x86-platform-timer-wrap.patch b/21346-x86-platform-timer-wrap.patch deleted file mode 100644 index 1a43c05..0000000 --- a/21346-x86-platform-timer-wrap.patch +++ /dev/null @@ -1,67 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273573287 -3600 -# Node ID 7d4deb86b9661b8585fc2b5c41334f2b34b0922b -# Parent 2077d6ad60780bbe0631c0dee1ef2e2b8eb03867 -x86: Detect and handle unexpected platform-timer counter wrap. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/time.c -+++ b/xen/arch/x86/time.c -@@ -571,26 +571,48 @@ static u64 plt_stamp64; /* 64-b - static u64 plt_stamp; /* hardware-width platform counter stamp */ - static struct timer plt_overflow_timer; - -+static s_time_t __read_platform_stime(u64 platform_time) -+{ -+ u64 diff = platform_time - platform_timer_stamp; -+ ASSERT(spin_is_locked(&platform_timer_lock)); -+ return (stime_platform_stamp + scale_delta(diff, &plt_scale)); -+} -+ - static void plt_overflow(void *unused) - { -+ int i; - u64 count; -+ s_time_t now, plt_now, plt_wrap; - - spin_lock_irq(&platform_timer_lock); -+ - count = plt_src.read_counter(); - plt_stamp64 += (count - plt_stamp) & plt_mask; - plt_stamp = count; -+ -+ now = NOW(); -+ plt_wrap = __read_platform_stime(plt_stamp64); -+ for ( i = 0; i < 10; i++ ) -+ { -+ plt_now = plt_wrap; -+ plt_wrap = __read_platform_stime(plt_stamp64 + plt_mask + 1); -+ if ( __builtin_llabs(plt_wrap - now) > __builtin_llabs(plt_now - now) ) -+ break; -+ plt_stamp64 += plt_mask + 1; -+ } -+ if ( i != 0 ) -+ { -+ static bool_t warned_once; -+ if ( !test_and_set_bool(warned_once) ) -+ printk("Platform timer appears to have unexpectedly wrapped " -+ "%u%s times.\n", i, (i == 10) ? " or more" : ""); -+ } -+ - spin_unlock_irq(&platform_timer_lock); - - set_timer(&plt_overflow_timer, NOW() + plt_overflow_period); - } - --static s_time_t __read_platform_stime(u64 platform_time) --{ -- u64 diff = platform_time - platform_timer_stamp; -- ASSERT(spin_is_locked(&platform_timer_lock)); -- return (stime_platform_stamp + scale_delta(diff, &plt_scale)); --} -- - static s_time_t read_platform_stime(void) - { - u64 count; diff --git a/21349-x86-memcpy.patch b/21349-x86-memcpy.patch deleted file mode 100644 index 0998329..0000000 --- a/21349-x86-memcpy.patch +++ /dev/null @@ -1,313 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273583128 -3600 -# Node ID d77a88f938c635c3ccfedaa00f946e4d9ed26098 -# Parent 2b5e14e4c5e57b0064d1c0415d9c4629bd0aac9b -x86: Replace our own specialised versions of memset and memcpy with -direct use of gcc's built-in versions. - -This dramatically simplifies our code while also avoiding compile -warnings with certain intermediate versions of gcc. - -This patch is based on an initial version by Jan Beulich. - -Signed-off-by: Keir Fraser - -Index: xen-4.0.0-testing/xen/arch/x86/string.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/string.c -+++ xen-4.0.0-testing/xen/arch/x86/string.c -@@ -14,25 +14,12 @@ void *memcpy(void *dest, const void *src - long d0, d1, d2; - - asm volatile ( --#ifdef __i386__ -- " rep movsl ; " --#else -- " rep movsq ; " -- " testb $4,%b4 ; " -- " je 0f ; " -- " movsl ; " -- "0: ; " --#endif -- " testb $2,%b4 ; " -- " je 1f ; " -- " movsw ; " -- "1: testb $1,%b4 ; " -- " je 2f ; " -- " movsb ; " -- "2: " -+ " rep ; movs"__OS" ; " -+ " mov %4,%3 ; " -+ " rep ; movsb " - : "=&c" (d0), "=&D" (d1), "=&S" (d2) -- : "0" (n/sizeof(long)), "q" (n), "1" (dest), "2" (src) -- : "memory"); -+ : "0" (n/BYTES_PER_LONG), "r" (n%BYTES_PER_LONG), "1" (dest), "2" (src) -+ : "memory" ); - - return dest; - } -@@ -55,7 +42,7 @@ void *memset(void *s, int c, size_t n) - void *memmove(void *dest, const void *src, size_t n) - { - long d0, d1, d2; -- -+ - if ( dest < src ) - return memcpy(dest, src, n); - -Index: xen-4.0.0-testing/xen/include/asm-x86/string.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/string.h -+++ xen-4.0.0-testing/xen/include/asm-x86/string.h -@@ -3,246 +3,14 @@ - - #include - --static inline void *__variable_memcpy(void *to, const void *from, size_t n) --{ -- long d0, d1, d2; -- __asm__ __volatile__ ( -- " rep ; movs"__OS"\n" -- " mov %4,%3 \n" -- " rep ; movsb \n" -- : "=&c" (d0), "=&D" (d1), "=&S" (d2) -- : "0" (n/BYTES_PER_LONG), "r" (n%BYTES_PER_LONG), "1" (to), "2" (from) -- : "memory" ); -- return to; --} -- --/* -- * This looks horribly ugly, but the compiler can optimize it totally, -- * as the count is constant. -- */ --static always_inline void * __constant_memcpy( -- void * to, const void * from, size_t n) --{ -- switch ( n ) -- { -- case 0: -- return to; -- case 1: -- *(u8 *)to = *(const u8 *)from; -- return to; -- case 2: -- *(u16 *)to = *(const u16 *)from; -- return to; -- case 3: -- *(u16 *)to = *(const u16 *)from; -- *(2+(u8 *)to) = *(2+(const u8 *)from); -- return to; -- case 4: -- *(u32 *)to = *(const u32 *)from; -- return to; -- case 5: -- *(u32 *)to = *(const u32 *)from; -- *(4+(u8 *)to) = *(4+(const u8 *)from); -- return to; -- case 6: -- *(u32 *)to = *(const u32 *)from; -- *(2+(u16 *)to) = *(2+(const u16 *)from); -- return to; -- case 7: -- *(u32 *)to = *(const u32 *)from; -- *(2+(u16 *)to) = *(2+(const u16 *)from); -- *(6+(u8 *)to) = *(6+(const u8 *)from); -- return to; -- case 8: -- *(u64 *)to = *(const u64 *)from; -- return to; -- case 12: -- *(u64 *)to = *(const u64 *)from; -- *(2+(u32 *)to) = *(2+(const u32 *)from); -- return to; -- case 16: -- *(u64 *)to = *(const u64 *)from; -- *(1+(u64 *)to) = *(1+(const u64 *)from); -- return to; -- case 20: -- *(u64 *)to = *(const u64 *)from; -- *(1+(u64 *)to) = *(1+(const u64 *)from); -- *(4+(u32 *)to) = *(4+(const u32 *)from); -- return to; -- } --#define COMMON(x) \ -- __asm__ __volatile__ ( \ -- "rep ; movs"__OS \ -- x \ -- : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ -- : "0" (n/BYTES_PER_LONG), "1" (to), "2" (from) \ -- : "memory" ); -- { -- long d0, d1, d2; -- switch ( n % BYTES_PER_LONG ) -- { -- case 0: COMMON(""); return to; -- case 1: COMMON("\n\tmovsb"); return to; -- case 2: COMMON("\n\tmovsw"); return to; -- case 3: COMMON("\n\tmovsw\n\tmovsb"); return to; -- case 4: COMMON("\n\tmovsl"); return to; -- case 5: COMMON("\n\tmovsl\n\tmovsb"); return to; -- case 6: COMMON("\n\tmovsl\n\tmovsw"); return to; -- case 7: COMMON("\n\tmovsl\n\tmovsw\n\tmovsb"); return to; -- } -- } --#undef COMMON -- return to; --} -- - #define __HAVE_ARCH_MEMCPY --/* align source to a 64-bit boundary */ --static always_inline --void *__var_memcpy(void *t, const void *f, size_t n) --{ -- int off = (unsigned long)f & 0x7; -- /* just do alignment if needed and if size is worth */ -- if ( (n > 32) && off ) { -- size_t n1 = 8 - off; -- __variable_memcpy(t, f, n1); -- __variable_memcpy(t + n1, f + n1, n - n1); -- return t; -- } else { -- return (__variable_memcpy(t, f, n)); -- } --} -- --#define memcpy(t,f,n) (__memcpy((t),(f),(n))) --static always_inline --void *__memcpy(void *t, const void *f, size_t n) --{ -- return (__builtin_constant_p(n) ? -- __constant_memcpy((t),(f),(n)) : -- __var_memcpy((t),(f),(n))); --} -+#define memcpy(t,f,n) (__builtin_memcpy((t),(f),(n))) - --/* Some version of gcc don't have this builtin. It's non-critical anyway. */ -+/* Some versions of gcc don't have this builtin. It's non-critical anyway. */ - #define __HAVE_ARCH_MEMMOVE - extern void *memmove(void *dest, const void *src, size_t n); - --static inline void *__memset_generic(void *s, char c, size_t count) --{ -- long d0, d1; -- __asm__ __volatile__ ( -- "rep ; stosb" -- : "=&c" (d0), "=&D" (d1) : "a" (c), "1" (s), "0" (count) : "memory" ); -- return s; --} -- --/* we might want to write optimized versions of these later */ --#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count)) -- --/* -- * memset(x,0,y) is a reasonably common thing to do, so we want to fill -- * things 32 bits at a time even when we don't know the size of the -- * area at compile-time.. -- */ --static inline void *__constant_c_memset(void *s, unsigned long c, size_t count) --{ -- long d0, d1; -- __asm__ __volatile__( -- " rep ; stos"__OS"\n" -- " mov %3,%4 \n" -- " rep ; stosb \n" -- : "=&c" (d0), "=&D" (d1) -- : "a" (c), "r" (count%BYTES_PER_LONG), -- "0" (count/BYTES_PER_LONG), "1" (s) -- : "memory" ); -- return s; --} -- --/* -- * This looks horribly ugly, but the compiler can optimize it totally, -- * as we by now know that both pattern and count is constant.. -- */ --static always_inline void *__constant_c_and_count_memset( -- void *s, unsigned long pattern, size_t count) --{ -- switch ( count ) -- { -- case 0: -- return s; -- case 1: -- *(u8 *)s = pattern; -- return s; -- case 2: -- *(u16 *)s = pattern; -- return s; -- case 3: -- *(u16 *)s = pattern; -- *(2+(u8 *)s) = pattern; -- return s; -- case 4: -- *(u32 *)s = pattern; -- return s; -- case 5: -- *(u32 *)s = pattern; -- *(4+(u8 *)s) = pattern; -- return s; -- case 6: -- *(u32 *)s = pattern; -- *(2+(u16 *)s) = pattern; -- return s; -- case 7: -- *(u32 *)s = pattern; -- *(2+(u16 *)s) = pattern; -- *(6+(u8 *)s) = pattern; -- return s; -- case 8: -- *(u64 *)s = pattern; -- return s; -- } --#define COMMON(x) \ -- __asm__ __volatile__ ( \ -- "rep ; stos"__OS \ -- x \ -- : "=&c" (d0), "=&D" (d1) \ -- : "a" (pattern), "0" (count/BYTES_PER_LONG), "1" (s) \ -- : "memory" ) -- { -- long d0, d1; -- switch ( count % BYTES_PER_LONG ) -- { -- case 0: COMMON(""); return s; -- case 1: COMMON("\n\tstosb"); return s; -- case 2: COMMON("\n\tstosw"); return s; -- case 3: COMMON("\n\tstosw\n\tstosb"); return s; -- case 4: COMMON("\n\tstosl"); return s; -- case 5: COMMON("\n\tstosl\n\tstosb"); return s; -- case 6: COMMON("\n\tstosl\n\tstosw"); return s; -- case 7: COMMON("\n\tstosl\n\tstosw\n\tstosb"); return s; -- } -- } --#undef COMMON -- return s; --} -- --#define __constant_c_x_memset(s, c, count) \ --(__builtin_constant_p(count) ? \ -- __constant_c_and_count_memset((s),(c),(count)) : \ -- __constant_c_memset((s),(c),(count))) -- --#define __var_x_memset(s, c, count) \ --(__builtin_constant_p(count) ? \ -- __constant_count_memset((s),(c),(count)) : \ -- __memset_generic((s),(c),(count))) -- --#ifdef CONFIG_X86_64 --#define MEMSET_PATTERN_MUL 0x0101010101010101UL --#else --#define MEMSET_PATTERN_MUL 0x01010101UL --#endif -- - #define __HAVE_ARCH_MEMSET --#define memset(s, c, count) (__memset((s),(c),(count))) --#define __memset(s, c, count) \ --(__builtin_constant_p(c) ? \ -- __constant_c_x_memset((s),(MEMSET_PATTERN_MUL*(unsigned char)(c)),(count)) : \ -- __var_x_memset((s),(c),(count))) -+#define memset(s,c,n) (__builtin_memset((s),(c),(n))) - - #endif /* __X86_STRING_H__ */ diff --git a/21360-x86-mce-polling-disabled-init.patch b/21360-x86-mce-polling-disabled-init.patch deleted file mode 100644 index 91b52d3..0000000 --- a/21360-x86-mce-polling-disabled-init.patch +++ /dev/null @@ -1,20 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273651780 -3600 -# Node ID fa94385978e6317732e2c12000923ca6a5e0d2ed -# Parent 0079f76e906f378f81044da4e135df2fbb878fa5 -mce: MCE polling logic should check mce_disabled during initialisation. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/cpu/mcheck/non-fatal.c -+++ b/xen/arch/x86/cpu/mcheck/non-fatal.c -@@ -91,7 +91,7 @@ static int __init init_nonfatal_mce_chec - struct cpuinfo_x86 *c = &boot_cpu_data; - - /* Check for MCE support */ -- if (!mce_available(c)) -+ if (mce_disabled || !mce_available(c)) - return -ENODEV; - - /* diff --git a/21372-x86-cross-cpu-wait.patch b/21372-x86-cross-cpu-wait.patch deleted file mode 100644 index 5ccee8e..0000000 --- a/21372-x86-cross-cpu-wait.patch +++ /dev/null @@ -1,42 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273740260 -3600 -# Node ID 6c22d2dfed4882d5febf98d2afbb96ec9bedd043 -# Parent 97da07c523ddc2565da67b6cfeec006d742bb06d -x86: Fix a few on_{selected,each}_cpus callers who should wait for completion. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/acpi/cpufreq/cpufreq.c -+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c -@@ -195,7 +195,7 @@ static void drv_write(struct drv_cmd *cm - cpu_isset(smp_processor_id(), cmd->mask)) - do_drv_write((void *)cmd); - else -- on_selected_cpus(&cmd->mask, do_drv_write, cmd, 0); -+ on_selected_cpus(&cmd->mask, do_drv_write, cmd, 1); - } - - static u32 get_cur_val(cpumask_t mask) ---- a/xen/arch/x86/acpi/cpufreq/powernow.c -+++ b/xen/arch/x86/acpi/cpufreq/powernow.c -@@ -122,7 +122,7 @@ static int powernow_cpufreq_target(struc - - cmd.val = next_perf_state; - -- on_selected_cpus(&cmd.mask, transition_pstate, &cmd, 0); -+ on_selected_cpus(&cmd.mask, transition_pstate, &cmd, 1); - - for_each_cpu_mask(j, online_policy_cpus) - cpufreq_statistic_update(j, perf->state, next_perf_state); ---- a/xen/arch/x86/cpu/mcheck/mce.c -+++ b/xen/arch/x86/cpu/mcheck/mce.c -@@ -1610,7 +1610,7 @@ long do_mca(XEN_GUEST_HANDLE(xen_mc_t) u - add_taint(TAINT_ERROR_INJECT); - - if ( mce_broadcast ) -- on_each_cpu(x86_mc_mceinject, mc_mceinject, 0); -+ on_each_cpu(x86_mc_mceinject, mc_mceinject, 1); - else - on_selected_cpus(cpumask_of(target), x86_mc_mceinject, - mc_mceinject, 1); diff --git a/21373-dummy-domain-io-caps.patch b/21373-dummy-domain-io-caps.patch deleted file mode 100644 index 9e967f9..0000000 --- a/21373-dummy-domain-io-caps.patch +++ /dev/null @@ -1,48 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273741742 -3600 -# Node ID 1ec412805622fd7ec0e88bf3b7ab681d024994bc -# Parent 6c22d2dfed4882d5febf98d2afbb96ec9bedd043 -Even 'dummy' domains (e.g., dom_xen a.k.a. DOMID_XEN) must have valid I/O caps. - -Ensure the rangesets are always initialised. Certain (privileged) -invocations of hypercalls such as mmu_update can end up interrogating -these special domains for possible I/O capabilities. - -Signed-off-by: Keir Fraser - ---- a/xen/common/domain.c -+++ b/xen/common/domain.c -@@ -245,12 +245,17 @@ struct domain *domain_create( - d->disable_migrate = 1; - } - -- if ( domcr_flags & DOMCRF_dummy ) -- return d; -- - rangeset_domain_initialise(d); - init_status |= INIT_rangeset; - -+ d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); -+ d->irq_caps = rangeset_new(d, "Interrupts", 0); -+ if ( (d->iomem_caps == NULL) || (d->irq_caps == NULL) ) -+ goto fail; -+ -+ if ( domcr_flags & DOMCRF_dummy ) -+ return d; -+ - if ( !is_idle_domain(d) ) - { - if ( xsm_domain_create(d, ssidref) != 0 ) -@@ -285,11 +290,6 @@ struct domain *domain_create( - goto fail; - init_status |= INIT_arch; - -- d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); -- d->irq_caps = rangeset_new(d, "Interrupts", 0); -- if ( (d->iomem_caps == NULL) || (d->irq_caps == NULL) ) -- goto fail; -- - if ( sched_init_domain(d) != 0 ) - goto fail; - diff --git a/21408-amd-erratum-383.patch b/21408-amd-erratum-383.patch deleted file mode 100644 index fc705bc..0000000 --- a/21408-amd-erratum-383.patch +++ /dev/null @@ -1,139 +0,0 @@ -References: bnc#607219 - -# HG changeset patch -# User Keir Fraser -# Date 1274178085 -3600 -# Node ID f40acba36be886e4b4e87afeacf39688f316dfe4 -# Parent e4028345ad48c442eb55b7bc08afdf1aede0aa2e -svm: Fix for AMD erratum 383 on Family 10h CPUs - -This patches implements the workaround of AMD erratum 383 on family -10h CPUs. It destroys the guest VM when a MC error with a special -pattern is detected. Without this patch, a guest VM failure can -potentially crash Xen hypervisor and the whole system. The erratum -will be published in next version of guide. - -Signed-off-by: Wei Huang -Signed-off-by: Joerg Roedel -Signed-off-by: Christoph Egger - ---- a/xen/arch/x86/hvm/svm/svm.c -+++ b/xen/arch/x86/hvm/svm/svm.c -@@ -72,6 +72,8 @@ static void *hsa[NR_CPUS] __read_mostly; - /* vmcb used for extended host state */ - static void *root_vmcb[NR_CPUS] __read_mostly; - -+static bool_t amd_erratum383_found __read_mostly; -+ - static void inline __update_guest_eip( - struct cpu_user_regs *regs, unsigned int inst_len) - { -@@ -822,6 +824,20 @@ static int svm_cpu_prepare(unsigned int - return 0; - } - -+static void svm_init_erratum_383(struct cpuinfo_x86 *c) -+{ -+ uint64_t msr_content; -+ -+ /* only family 10h is affected */ -+ if ( c->x86 != 0x10 ) -+ return; -+ -+ rdmsrl(MSR_AMD64_DC_CFG, msr_content); -+ wrmsrl(MSR_AMD64_DC_CFG, msr_content | (1ULL << 47)); -+ -+ amd_erratum383_found = 1; -+} -+ - static int svm_cpu_up(struct cpuinfo_x86 *c) - { - u32 eax, edx, phys_hsa_lo, phys_hsa_hi; -@@ -847,6 +863,9 @@ static int svm_cpu_up(struct cpuinfo_x86 - phys_hsa_hi = (u32)(phys_hsa >> 32); - wrmsr(MSR_K8_VM_HSAVE_PA, phys_hsa_lo, phys_hsa_hi); - -+ /* check for erratum 383 */ -+ svm_init_erratum_383(c); -+ - /* Initialize core's ASID handling. */ - svm_asid_init(c); - -@@ -1244,6 +1263,47 @@ static void svm_vmexit_ud_intercept(stru - } - } - -+extern unsigned int nr_mce_banks; /* from mce.h */ -+ -+static int svm_is_erratum_383(struct cpu_user_regs *regs) -+{ -+ uint64_t msr_content; -+ uint32_t i; -+ struct vcpu *v = current; -+ -+ if ( !amd_erratum383_found ) -+ return 0; -+ -+ rdmsrl(MSR_IA32_MC0_STATUS, msr_content); -+ /* Bit 62 may or may not be set for this mce */ -+ msr_content &= ~(1ULL << 62); -+ -+ if ( msr_content != 0xb600000000010015ULL ) -+ return 0; -+ -+ /* Clear MCi_STATUS registers */ -+ for (i = 0; i < nr_mce_banks; i++) -+ wrmsrl(MSR_IA32_MCx_STATUS(i), 0ULL); -+ -+ rdmsrl(MSR_IA32_MCG_STATUS, msr_content); -+ wrmsrl(MSR_IA32_MCG_STATUS, msr_content & ~(1ULL << 2)); -+ -+ /* flush TLB */ -+ flush_tlb_mask(&v->domain->domain_dirty_cpumask); -+ -+ return 1; -+} -+ -+static void svm_vmexit_mce_intercept( -+ struct vcpu *v, struct cpu_user_regs *regs) -+{ -+ if ( svm_is_erratum_383(regs) ) -+ { -+ gdprintk(XENLOG_ERR, "SVM hits AMD erratum 383\n"); -+ domain_crash(v->domain); -+ } -+} -+ - static void wbinvd_ipi(void *info) - { - wbinvd(); -@@ -1432,6 +1492,7 @@ asmlinkage void svm_vmexit_handler(struc - /* Asynchronous event, handled when we STGI'd after the VMEXIT. */ - case VMEXIT_EXCEPTION_MC: - HVMTRACE_0D(MCE); -+ svm_vmexit_mce_intercept(v, regs); - break; - - case VMEXIT_VINTR: ---- a/xen/include/asm-x86/msr-index.h -+++ b/xen/include/asm-x86/msr-index.h -@@ -146,6 +146,11 @@ - #define MSR_IA32_MC8_ADDR 0x00000422 - #define MSR_IA32_MC8_MISC 0x00000423 - -+#define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) -+#define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x)) -+#define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x)) -+#define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x)) -+ - #define MSR_P6_PERFCTR0 0x000000c1 - #define MSR_P6_PERFCTR1 0x000000c2 - #define MSR_P6_EVNTSEL0 0x00000186 -@@ -224,6 +229,7 @@ - - /* AMD64 MSRs */ - #define MSR_AMD64_NB_CFG 0xc001001f -+#define MSR_AMD64_DC_CFG 0xc0011022 - #define AMD64_NB_CFG_CF8_EXT_ENABLE_BIT 46 - - /* AMD Family10h machine check MSRs */ diff --git a/21421-vts-ats-enabling.patch b/21421-vts-ats-enabling.patch index 0d51bf0..49d7db2 100644 --- a/21421-vts-ats-enabling.patch +++ b/21421-vts-ats-enabling.patch @@ -18,9 +18,11 @@ device is deassigned from a domain. Signed-off-by: Weidong Han ---- a/xen/drivers/passthrough/vtd/ia64/ats.c -+++ b/xen/drivers/passthrough/vtd/ia64/ats.c -@@ -47,6 +47,11 @@ int enable_ats_device(int seg, int bus, +Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/ia64/ats.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c +@@ -47,6 +47,11 @@ int enable_ats_device(int seg, int bus, return 0; } @@ -32,9 +34,11 @@ Signed-off-by: Weidong Han int dev_invalidate_iotlb(struct iommu *iommu, u16 did, u64 addr, unsigned int size_order, u64 type) { ---- a/xen/drivers/passthrough/vtd/iommu.c -+++ b/xen/drivers/passthrough/vtd/iommu.c -@@ -1324,6 +1324,9 @@ static int domain_context_mapping(struct +Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/iommu.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c +@@ -1331,6 +1331,9 @@ static int domain_context_mapping(struct dprintk(VTDPREFIX, "d%d:PCIe: map bdf = %x:%x.%x\n", domain->domain_id, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn); @@ -44,7 +48,7 @@ Signed-off-by: Weidong Han break; case DEV_TYPE_PCI: -@@ -1453,6 +1456,9 @@ static int domain_context_unmap(struct d +@@ -1460,6 +1463,9 @@ static int domain_context_unmap(struct d dprintk(VTDPREFIX, "d%d:PCIe: unmap bdf = %x:%x.%x\n", domain->domain_id, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); ret = domain_context_unmap_one(domain, iommu, bus, devfn); @@ -54,7 +58,7 @@ Signed-off-by: Weidong Han break; case DEV_TYPE_PCI: -@@ -1771,8 +1777,6 @@ static void setup_dom0_devices(struct do +@@ -1788,8 +1794,6 @@ static void setup_dom0_devices(struct do list_add(&pdev->domain_list, &d->arch.pdev_list); domain_context_mapping(d, pdev->bus, pdev->devfn); pci_enable_acs(pdev); @@ -63,8 +67,10 @@ Signed-off-by: Weidong Han } } spin_unlock(&pcidevs_lock); ---- a/xen/drivers/passthrough/vtd/x86/ats.c -+++ b/xen/drivers/passthrough/vtd/x86/ats.c +Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/x86/ats.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c @@ -92,6 +92,9 @@ int ats_device(int seg, int bus, int dev pdev = pci_get_pdev(bus, devfn); @@ -75,7 +81,7 @@ Signed-off-by: Weidong Han if ( !ecap_queued_inval(drhd->iommu->ecap) || !ecap_dev_iotlb(drhd->iommu->ecap) ) return 0; -@@ -144,6 +147,9 @@ int enable_ats_device(int seg, int bus, +@@ -144,6 +147,9 @@ int enable_ats_device(int seg, int bus, value = pci_conf_read16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos + ATS_REG_CTL); @@ -85,7 +91,7 @@ Signed-off-by: Weidong Han value |= ATS_ENABLE; pci_conf_write16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos + ATS_REG_CTL, value); -@@ -153,10 +159,50 @@ int enable_ats_device(int seg, int bus, +@@ -153,10 +159,50 @@ int enable_ats_device(int seg, int bus, pdev->devfn = devfn; pdev->ats_queue_depth = queue_depth; list_add(&(pdev->list), &ats_devices); diff --git a/21435-vmx-retain-global-controls.patch b/21435-vmx-retain-global-controls.patch deleted file mode 100644 index 49329c6..0000000 --- a/21435-vmx-retain-global-controls.patch +++ /dev/null @@ -1,45 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274298365 -3600 -# Node ID c414129c8e129422d03898ec5822f56b2d2da4f8 -# Parent fe18437da295d0fdad2d852a603144eec62d29cd -vmx: Do not modify global vmx_vm{entry,exit}_control fields in init_vmcs_config() - -The function shoudl only have single-domain effect. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/hvm/vmx/vmcs.c -+++ b/xen/arch/x86/hvm/vmx/vmcs.c -@@ -558,6 +558,8 @@ static int construct_vmcs(struct vcpu *v - struct domain *d = v->domain; - uint16_t sysenter_cs; - unsigned long sysenter_eip; -+ u32 vmexit_ctl = vmx_vmexit_control; -+ u32 vmentry_ctl = vmx_vmentry_control; - - vmx_vmcs_enter(v); - -@@ -584,17 +586,17 @@ static int construct_vmcs(struct vcpu *v - v->arch.hvm_vmx.secondary_exec_control &= - ~(SECONDARY_EXEC_ENABLE_EPT | - SECONDARY_EXEC_UNRESTRICTED_GUEST); -- vmx_vmexit_control &= ~(VM_EXIT_SAVE_GUEST_PAT | -- VM_EXIT_LOAD_HOST_PAT); -- vmx_vmentry_control &= ~VM_ENTRY_LOAD_GUEST_PAT; -+ vmexit_ctl &= ~(VM_EXIT_SAVE_GUEST_PAT | -+ VM_EXIT_LOAD_HOST_PAT); -+ vmentry_ctl &= ~VM_ENTRY_LOAD_GUEST_PAT; - } - - /* Do not enable Monitor Trap Flag unless start single step debug */ - v->arch.hvm_vmx.exec_control &= ~CPU_BASED_MONITOR_TRAP_FLAG; - - __vmwrite(CPU_BASED_VM_EXEC_CONTROL, v->arch.hvm_vmx.exec_control); -- __vmwrite(VM_EXIT_CONTROLS, vmx_vmexit_control); -- __vmwrite(VM_ENTRY_CONTROLS, vmx_vmentry_control); -+ __vmwrite(VM_EXIT_CONTROLS, vmexit_ctl); -+ __vmwrite(VM_ENTRY_CONTROLS, vmentry_ctl); - - if ( cpu_has_vmx_ple ) - { diff --git a/21445-x86-tsc-handling-cleanups-v2.patch b/21445-x86-tsc-handling-cleanups-v2.patch deleted file mode 100644 index db93ecb..0000000 --- a/21445-x86-tsc-handling-cleanups-v2.patch +++ /dev/null @@ -1,268 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278094440 -3600 -# Node ID a9c458ab90e4ecb25383456be653368ecd900ee4 -# Parent 322468d5ab6ceca4afa21977a02f4492308d2ddc -x86: TSC handling cleanups (version 2) - -"I am removing the tsc_scaled variable that is never actually used -because when tsc needs to be scaled vtsc is 1. I am also making this -more explicit in tsc_set_info. I am also removing hvm_domain.gtsc_khz -that is a duplicate of d->arch.tsc_khz. I am using scale_delta(delta, -&d->arch.ns_to_vtsc) to scale the tsc value before returning it to the -guest like in the pv case. I added a feature flag to specify that the -pvclock algorithm is safe to be used in an HVM guest so that the guest -can now use it without hanging." - -Version 2 fixes a bug which breaks PV domU time. - -Signed-off-by: Stefano Stabellini -xen-unstable changeset: 21445:c1ed00d49534 -xen-unstable date: Sat May 22 06:31:47 2010 +0100 - -Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c -@@ -152,32 +152,6 @@ void hvm_set_rdtsc_exiting(struct domain - hvm_funcs.set_rdtsc_exiting(v, enable); - } - --int hvm_gtsc_need_scale(struct domain *d) --{ -- uint32_t gtsc_mhz, htsc_mhz; -- -- if ( d->arch.vtsc ) -- return 0; -- -- gtsc_mhz = d->arch.hvm_domain.gtsc_khz / 1000; -- htsc_mhz = (uint32_t)cpu_khz / 1000; -- -- d->arch.hvm_domain.tsc_scaled = (gtsc_mhz && (gtsc_mhz != htsc_mhz)); -- return d->arch.hvm_domain.tsc_scaled; --} -- --static u64 hvm_h2g_scale_tsc(struct vcpu *v, u64 host_tsc) --{ -- uint32_t gtsc_khz, htsc_khz; -- -- if ( !v->domain->arch.hvm_domain.tsc_scaled ) -- return host_tsc; -- -- htsc_khz = cpu_khz; -- gtsc_khz = v->domain->arch.hvm_domain.gtsc_khz; -- return muldiv64(host_tsc, gtsc_khz, htsc_khz); --} -- - void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc) - { - uint64_t tsc; -@@ -185,11 +159,11 @@ void hvm_set_guest_tsc(struct vcpu *v, u - if ( v->domain->arch.vtsc ) - { - tsc = hvm_get_guest_time(v); -+ tsc = gtime_to_gtsc(v->domain, tsc); - } - else - { - rdtscll(tsc); -- tsc = hvm_h2g_scale_tsc(v, tsc); - } - - v->arch.hvm_vcpu.cache_tsc_offset = guest_tsc - tsc; -@@ -203,12 +177,12 @@ u64 hvm_get_guest_tsc(struct vcpu *v) - if ( v->domain->arch.vtsc ) - { - tsc = hvm_get_guest_time(v); -+ tsc = gtime_to_gtsc(v->domain, tsc); - v->domain->arch.vtsc_kerncount++; - } - else - { - rdtscll(tsc); -- tsc = hvm_h2g_scale_tsc(v, tsc); - } - - return tsc + v->arch.hvm_vcpu.cache_tsc_offset; -Index: xen-4.0.0-testing/xen/arch/x86/hvm/save.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/save.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/save.c -@@ -33,7 +33,7 @@ void arch_hvm_save(struct domain *d, str - hdr->cpuid = eax; - - /* Save guest's preferred TSC. */ -- hdr->gtsc_khz = d->arch.hvm_domain.gtsc_khz; -+ hdr->gtsc_khz = d->arch.tsc_khz; - } - - int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr) -@@ -62,8 +62,8 @@ int arch_hvm_load(struct domain *d, stru - - /* Restore guest's preferred TSC frequency. */ - if ( hdr->gtsc_khz ) -- d->arch.hvm_domain.gtsc_khz = hdr->gtsc_khz; -- if ( hvm_gtsc_need_scale(d) ) -+ d->arch.tsc_khz = hdr->gtsc_khz; -+ if ( d->arch.vtsc ) - { - hvm_set_rdtsc_exiting(d, 1); - gdprintk(XENLOG_WARNING, "Domain %d expects freq %uMHz " -Index: xen-4.0.0-testing/xen/arch/x86/hvm/vpt.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/vpt.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/vpt.c -@@ -32,9 +32,6 @@ void hvm_init_guest_time(struct domain * - spin_lock_init(&pl->pl_time_lock); - pl->stime_offset = -(u64)get_s_time(); - pl->last_guest_time = 0; -- -- d->arch.hvm_domain.gtsc_khz = cpu_khz; -- d->arch.hvm_domain.tsc_scaled = 0; - } - - u64 hvm_get_guest_time(struct vcpu *v) -Index: xen-4.0.0-testing/xen/arch/x86/time.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/time.c -+++ xen-4.0.0-testing/xen/arch/x86/time.c -@@ -850,8 +850,13 @@ static void __update_vcpu_system_time(st - - if ( d->arch.vtsc ) - { -- u64 delta = max_t(s64, t->stime_local_stamp - d->arch.vtsc_offset, 0); -- tsc_stamp = scale_delta(delta, &d->arch.ns_to_vtsc); -+ u64 stime = t->stime_local_stamp; -+ if ( is_hvm_domain(d) ) -+ { -+ struct pl_time *pl = &v->domain->arch.hvm_domain.pl_time; -+ stime += pl->stime_offset + v->arch.hvm_vcpu.stime_offset; -+ } -+ tsc_stamp = gtime_to_gtsc(d, stime); - } - else - { -@@ -874,6 +879,8 @@ static void __update_vcpu_system_time(st - _u.tsc_to_system_mul = t->tsc_scale.mul_frac; - _u.tsc_shift = (s8)t->tsc_scale.shift; - } -+ if ( is_hvm_domain(d) ) -+ _u.tsc_timestamp += v->arch.hvm_vcpu.cache_tsc_offset; - - /* Don't bother unless timestamp record has changed or we are forced. */ - _u.version = u->version; /* make versions match for memcmp test */ -@@ -1640,11 +1647,17 @@ struct tm wallclock_time(void) - * PV SoftTSC Emulation. - */ - -+u64 gtime_to_gtsc(struct domain *d, u64 tsc) -+{ -+ if ( !is_hvm_domain(d) ) -+ tsc = max_t(s64, tsc - d->arch.vtsc_offset, 0); -+ return scale_delta(tsc, &d->arch.ns_to_vtsc); -+} -+ - void pv_soft_rdtsc(struct vcpu *v, struct cpu_user_regs *regs, int rdtscp) - { - s_time_t now = get_s_time(); - struct domain *d = v->domain; -- u64 delta; - - spin_lock(&d->arch.vtsc_lock); - -@@ -1660,8 +1673,7 @@ void pv_soft_rdtsc(struct vcpu *v, struc - - spin_unlock(&d->arch.vtsc_lock); - -- delta = max_t(s64, now - d->arch.vtsc_offset, 0); -- now = scale_delta(delta, &d->arch.ns_to_vtsc); -+ now = gtime_to_gtsc(d, now); - - regs->eax = (uint32_t)now; - regs->edx = (uint32_t)(now >> 32); -@@ -1802,8 +1814,10 @@ void tsc_set_info(struct domain *d, - d->arch.vtsc_offset = get_s_time() - elapsed_nsec; - d->arch.tsc_khz = gtsc_khz ? gtsc_khz : cpu_khz; - set_time_scale(&d->arch.vtsc_to_ns, d->arch.tsc_khz * 1000 ); -- /* use native TSC if initial host has safe TSC and not migrated yet */ -- if ( host_tsc_is_safe() && incarnation == 0 ) -+ /* use native TSC if initial host has safe TSC, has not migrated -+ * yet and tsc_khz == cpu_khz */ -+ if ( host_tsc_is_safe() && incarnation == 0 && -+ d->arch.tsc_khz == cpu_khz ) - d->arch.vtsc = 0; - else - d->arch.ns_to_vtsc = scale_reciprocal(d->arch.vtsc_to_ns); -@@ -1828,7 +1842,7 @@ void tsc_set_info(struct domain *d, - } - d->arch.incarnation = incarnation + 1; - if ( is_hvm_domain(d) ) -- hvm_set_rdtsc_exiting(d, d->arch.vtsc || hvm_gtsc_need_scale(d)); -+ hvm_set_rdtsc_exiting(d, d->arch.vtsc); - } - - /* vtsc may incur measurable performance degradation, diagnose with this */ -Index: xen-4.0.0-testing/xen/common/kernel.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/kernel.c -+++ xen-4.0.0-testing/xen/common/kernel.c -@@ -243,6 +243,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL - fi.submap |= (1U << XENFEAT_mmu_pt_update_preserve_ad) | - (1U << XENFEAT_highmem_assist) | - (1U << XENFEAT_gnttab_map_avail_bits); -+ else -+ fi.submap |= (1U << XENFEAT_hvm_safe_pvclock); - #endif - break; - default: -Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/domain.h -+++ xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h -@@ -45,8 +45,6 @@ struct hvm_domain { - struct hvm_ioreq_page ioreq; - struct hvm_ioreq_page buf_ioreq; - -- uint32_t gtsc_khz; /* kHz */ -- bool_t tsc_scaled; - struct pl_time pl_time; - - struct hvm_io_handler io_handler; -Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/hvm.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/hvm.h -+++ xen-4.0.0-testing/xen/include/asm-x86/hvm/hvm.h -@@ -290,7 +290,6 @@ int hvm_event_needs_reinjection(uint8_t - uint8_t hvm_combine_hw_exceptions(uint8_t vec1, uint8_t vec2); - - void hvm_set_rdtsc_exiting(struct domain *d, bool_t enable); --int hvm_gtsc_need_scale(struct domain *d); - - static inline int - hvm_cpu_prepare(unsigned int cpu) -Index: xen-4.0.0-testing/xen/include/asm-x86/time.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/time.h -+++ xen-4.0.0-testing/xen/include/asm-x86/time.h -@@ -60,6 +60,7 @@ uint64_t acpi_pm_tick_to_ns(uint64_t tic - uint64_t ns_to_acpi_pm_tick(uint64_t ns); - - void pv_soft_rdtsc(struct vcpu *v, struct cpu_user_regs *regs, int rdtscp); -+u64 gtime_to_gtsc(struct domain *d, u64 tsc); - - void tsc_set_info(struct domain *d, uint32_t tsc_mode, uint64_t elapsed_nsec, - uint32_t gtsc_khz, uint32_t incarnation); -Index: xen-4.0.0-testing/xen/include/public/features.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/features.h -+++ xen-4.0.0-testing/xen/include/public/features.h -@@ -68,6 +68,9 @@ - */ - #define XENFEAT_gnttab_map_avail_bits 7 - -+/* x86: pvclock algorithm is safe to use on HVM */ -+#define XENFEAT_hvm_safe_pvclock 9 -+ - #define XENFEAT_NR_SUBMAPS 1 - - #endif /* __XEN_PUBLIC_FEATURES_H__ */ diff --git a/21446-iommu-graceful-generic-fail.patch b/21446-iommu-graceful-generic-fail.patch deleted file mode 100644 index 4a84654..0000000 --- a/21446-iommu-graceful-generic-fail.patch +++ /dev/null @@ -1,29 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274506601 -3600 -# Node ID 93410e5e4ad8799932ad31820d0d82c74d1f63a2 -# Parent c1ed00d495342334980be576bbb8a2b1037b89c9 -iommu: Gracefully fail to initialise iommu on generic x86 platforms. - -Signed-off-by: Keir Fraser - ---- a/xen/include/asm-x86/hvm/iommu.h -+++ b/xen/include/asm-x86/hvm/iommu.h -@@ -1,6 +1,8 @@ - #ifndef __ASM_X86_HVM_IOMMU_H__ - #define __ASM_X86_HVM_IOMMU_H__ - -+#include -+ - struct iommu_ops; - extern const struct iommu_ops intel_iommu_ops; - extern const struct iommu_ops amd_iommu_ops; -@@ -31,7 +33,7 @@ static inline int iommu_hardware_setup(v - case X86_VENDOR_AMD: - return amd_iov_detect(); - default: -- BUG(); -+ return -ENODEV; - } - - return 0; diff --git a/21453-shadow-avoid-remove-all-after-teardown.patch b/21453-shadow-avoid-remove-all-after-teardown.patch deleted file mode 100644 index bbb2d73..0000000 --- a/21453-shadow-avoid-remove-all-after-teardown.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274857281 -3600 -# Node ID 5addb6cb16fd64c664b1e3dd335c76b3426e05e9 -# Parent 459f35d8cac4f19e6eae0a7396f6c97e20ae955c -x86 shadow: Avoid remove-all-shadows after shadow teardown - -If dom0 alters the p2m of a domain that's being destroyed, we can end -up doing a remove-all-shadows after the shadow hash table has been -freed. Since no hash table implies no shadows, just return -immediately. - -Signed-off-by: Tim Deegan - ---- a/xen/arch/x86/mm/shadow/common.c -+++ b/xen/arch/x86/mm/shadow/common.c -@@ -2173,8 +2173,13 @@ static void hash_foreach(struct vcpu *v, - struct domain *d = v->domain; - struct page_info *x; - -- /* Say we're here, to stop hash-lookups reordering the chains */ - ASSERT(shadow_locked_by_me(d)); -+ -+ /* Can be called via p2m code &c after shadow teardown. */ -+ if ( unlikely(!d->arch.paging.shadow.hash_table) ) -+ return; -+ -+ /* Say we're here, to stop hash-lookups reordering the chains */ - ASSERT(d->arch.paging.shadow.hash_walking == 0); - d->arch.paging.shadow.hash_walking = 1; - diff --git a/21456-compat-hvm-addr-check.patch b/21456-compat-hvm-addr-check.patch deleted file mode 100644 index 0e1c868..0000000 --- a/21456-compat-hvm-addr-check.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274857778 -3600 -# Node ID a69d09da4917c7b57ceed65224e4bbc389601081 -# Parent 32cdd423d4ebab2b2d03a4501be08438c5dc7050 -compat-guest accessor macros do not need address check for hvm guests. - -Signed-off-by: Tim Deegan - ---- a/xen/include/xen/compat.h -+++ b/xen/include/xen/compat.h -@@ -90,8 +90,9 @@ - * Allows use of faster __copy_* functions. - */ - #define compat_handle_okay(hnd, nr) \ -+ (paging_mode_external(current->domain) || \ - compat_array_access_ok((void *)(full_ptr_t)(hnd).c, (nr), \ -- sizeof(**(hnd)._)) -+ sizeof(**(hnd)._))) - - #define __copy_to_compat_offset(hnd, off, ptr, nr) ({ \ - const typeof(*(ptr)) *_s = (ptr); \ diff --git a/21459-block-script.patch b/21459-block-script.patch deleted file mode 100644 index b40a8dc..0000000 --- a/21459-block-script.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User Jim Fehlig -# Date 1274807602 21600 -# Node ID 14d040342c6618365750b2c3b96ca01ff4a5e5dd -# Parent 93410e5e4ad8799932ad31820d0d82c74d1f63a2 -Allow space in vbd path name - -c/s 20393 breaks existing domain configuration that contains -spaces in the vbd path name. Fixed by this trivial patch which -provides missing quotes. - - Signed-off-by: Jim Fehlig - -diff -r 93410e5e4ad8 -r 14d040342c66 tools/hotplug/Linux/block ---- a/tools/hotplug/Linux/block Sat May 22 06:36:41 2010 +0100 -+++ b/tools/hotplug/Linux/block Tue May 25 11:13:22 2010 -0600 -@@ -272,8 +272,8 @@ - - if [ "x$mode" != 'x!' ] - then -- inode=$(stat -c '%i' $file) -- dev=$(stat -c '%D' $file) -+ inode=$(stat -c '%i' "$file") -+ dev=$(stat -c '%D' "$file") - if [ -z "$inode" ] || [ -z "$dev" ] - then - fatal "Unable to lookup $file: dev: $dev inode: $inode" diff --git a/21460-xend-timeoffset.patch b/21460-xend-timeoffset.patch deleted file mode 100644 index db16ac0..0000000 --- a/21460-xend-timeoffset.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Jim Fehlig -# Date 1274822804 21600 -# Node ID a83e97657ba0f3ea232fe0dfb9edccf8e28aa982 -# Parent 14d040342c6618365750b2c3b96ca01ff4a5e5dd -tools: Fix time offset when localtime=0 - -localtime can be stored in vm config as a string, resulting in -incorrect calculation of rtc_timeoffset. Cast localtime to int -to ensure rtc_timeoffset is calculated properly. - - Signed-off-by: Jim Fehlig - -diff -r 14d040342c66 -r a83e97657ba0 tools/python/xen/xend/image.py ---- a/tools/python/xen/xend/image.py Tue May 25 11:13:22 2010 -0600 -+++ b/tools/python/xen/xend/image.py Tue May 25 15:26:44 2010 -0600 -@@ -129,7 +129,7 @@ - self.dmargs = self.parseDeviceModelArgs(vmConfig) - self.pid = None - rtc_timeoffset = int(vmConfig['platform'].get('rtc_timeoffset', 0)) -- if vmConfig['platform'].get('localtime', 0): -+ if int(vmConfig['platform'].get('localtime', 0)): - if time.localtime(time.time())[8]: - rtc_timeoffset -= time.altzone - else: diff --git a/21492-x86-pirq-unbind.patch b/21492-x86-pirq-unbind.patch deleted file mode 100644 index 7981474..0000000 --- a/21492-x86-pirq-unbind.patch +++ /dev/null @@ -1,23 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1275040447 -3600 -# Node ID 96917cf25bf3ad42c6b6cddb7ff4f03857ae9619 -# Parent 95acf74586d782d8d4d39016b3426a1eae127e97 -x86: Fix guest-pointer-array memmove in __pirq_guest_unbind(). - -Thanks to Alex Zefefrt for finding this. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -1242,7 +1242,8 @@ static irq_guest_action_t *__pirq_guest_ - for ( i = 0; (i < action->nr_guests) && (action->guest[i] != d); i++ ) - continue; - BUG_ON(i == action->nr_guests); -- memmove(&action->guest[i], &action->guest[i+1], IRQ_MAX_GUESTS-i-1); -+ memmove(&action->guest[i], &action->guest[i+1], -+ (action->nr_guests-i-1) * sizeof(action->guest[0])); - action->nr_guests--; - - switch ( action->ack_type ) diff --git a/21526-x86-nehalem-cpuid-mask.patch b/21526-x86-nehalem-cpuid-mask.patch index a4a4594..d876297 100644 --- a/21526-x86-nehalem-cpuid-mask.patch +++ b/21526-x86-nehalem-cpuid-mask.patch @@ -31,8 +31,10 @@ consume these masks. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/cpu/amd.c -+++ b/xen/arch/x86/cpu/amd.c +Index: xen-4.0.1-testing/xen/arch/x86/cpu/amd.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/amd.c ++++ xen-4.0.1-testing/xen/arch/x86/cpu/amd.c @@ -33,14 +33,6 @@ void start_svm(struct cpuinfo_x86 *c); static char opt_famrev[14]; string_param("cpuid_mask_cpu", opt_famrev); @@ -76,8 +78,10 @@ Signed-off-by: Jan Beulich } else if (*opt_famrev == '\0') { return; } else if (!strcmp(opt_famrev, "fam_0f_rev_c")) { ---- a/xen/arch/x86/cpu/common.c -+++ b/xen/arch/x86/cpu/common.c +Index: xen-4.0.1-testing/xen/arch/x86/cpu/common.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/common.c ++++ xen-4.0.1-testing/xen/arch/x86/cpu/common.c @@ -22,6 +22,15 @@ static int cachesize_override __cpuinitd static int disable_x86_fxsr __cpuinitdata; static int disable_x86_serial_nr __cpuinitdata; @@ -94,8 +98,10 @@ Signed-off-by: Jan Beulich struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; /* ---- a/xen/arch/x86/cpu/cpu.h -+++ b/xen/arch/x86/cpu/cpu.h +Index: xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/cpu.h ++++ xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h @@ -21,6 +21,9 @@ struct cpu_dev { extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM]; @@ -106,8 +112,10 @@ Signed-off-by: Jan Beulich extern int get_model_name(struct cpuinfo_x86 *c); extern void display_cacheinfo(struct cpuinfo_x86 *c); ---- a/xen/arch/x86/cpu/intel.c -+++ b/xen/arch/x86/cpu/intel.c +Index: xen-4.0.1-testing/xen/arch/x86/cpu/intel.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/intel.c ++++ xen-4.0.1-testing/xen/arch/x86/cpu/intel.c @@ -20,16 +20,6 @@ extern int trap_init_f00f_bug(void); @@ -194,7 +202,7 @@ Signed-off-by: Jan Beulich } void __devinit early_intel_workaround(struct cpuinfo_x86 *c) -@@ -179,7 +202,7 @@ static void __devinit init_intel(struct +@@ -179,7 +202,7 @@ static void __devinit init_intel(struct detect_ht(c); @@ -203,8 +211,10 @@ Signed-off-by: Jan Beulich /* Work around errata */ Intel_errata_workarounds(c); ---- a/xen/include/asm-x86/msr-index.h -+++ b/xen/include/asm-x86/msr-index.h +Index: xen-4.0.1-testing/xen/include/asm-x86/msr-index.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-x86/msr-index.h ++++ xen-4.0.1-testing/xen/include/asm-x86/msr-index.h @@ -156,8 +156,10 @@ #define MSR_P6_EVNTSEL0 0x00000186 #define MSR_P6_EVNTSEL1 0x00000187 diff --git a/21542-amd-erratum-411.patch b/21542-amd-erratum-411.patch index 9322bce..b22122c 100644 --- a/21542-amd-erratum-411.patch +++ b/21542-amd-erratum-411.patch @@ -9,11 +9,11 @@ Clear APIC TMICT when we mask APIC LVTT. Signed-off-by: Wei Wang -Index: xen-4.0.0-testing/xen/arch/x86/apic.c +Index: xen-4.0.1-testing/xen/arch/x86/apic.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/apic.c -+++ xen-4.0.0-testing/xen/arch/x86/apic.c -@@ -195,6 +195,9 @@ void clear_local_APIC(void) +--- xen-4.0.1-testing.orig/xen/arch/x86/apic.c ++++ xen-4.0.1-testing/xen/arch/x86/apic.c +@@ -198,6 +198,9 @@ void clear_local_APIC(void) maxlvt = get_maxlvt(); @@ -23,7 +23,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/apic.c /* * Masking an LVT entry on a P6 can trigger a local APIC error * if the vector is zero. Mask LVTERR first to prevent this. -@@ -1184,7 +1187,10 @@ void disable_APIC_timer(void) +@@ -1335,7 +1338,10 @@ void disable_APIC_timer(void) { if (using_apic_timer) { unsigned long v; @@ -35,10 +35,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/apic.c v = apic_read(APIC_LVTT); apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED); } -Index: xen-4.0.0-testing/xen/arch/x86/hpet.c +Index: xen-4.0.1-testing/xen/arch/x86/hpet.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hpet.c -+++ xen-4.0.0-testing/xen/arch/x86/hpet.c +--- xen-4.0.1-testing.orig/xen/arch/x86/hpet.c ++++ xen-4.0.1-testing/xen/arch/x86/hpet.c @@ -659,8 +659,7 @@ void hpet_broadcast_enter(void) if ( hpet_attach_channel ) hpet_attach_channel(cpu, ch); diff --git a/21615-dont-save-xen-heap-pages.patch b/21615-dont-save-xen-heap-pages.patch index 782e3d9..b6327cf 100644 --- a/21615-dont-save-xen-heap-pages.patch +++ b/21615-dont-save-xen-heap-pages.patch @@ -17,8 +17,10 @@ guests, meaning that the input to these must be treated as GMFNs. Signed-off-by: Jan Beulich ---- a/tools/libxc/xc_domain_save.c -+++ b/tools/libxc/xc_domain_save.c +Index: xen-4.0.1-testing/tools/libxc/xc_domain_save.c +=================================================================== +--- xen-4.0.1-testing.orig/tools/libxc/xc_domain_save.c ++++ xen-4.0.1-testing/tools/libxc/xc_domain_save.c @@ -1282,58 +1282,64 @@ int xc_domain_save(int xc_handle, int io goto out; } @@ -56,11 +58,11 @@ Signed-off-by: Jan Beulich - goto out; - } + unsigned long gmfn = pfn_batch[j]; - -- for ( j = 0; j < batch; j++ ) ++ + if ( !hvm ) + gmfn = pfn_to_mfn(gmfn); -+ + +- for ( j = 0; j < batch; j++ ) + if ( pfn_err[j] ) { - unsigned long mfn = pfn_to_mfn(pfn_batch[j]); @@ -122,9 +124,11 @@ Signed-off-by: Jan Beulich if ( write_exact(io_fd, &batch, sizeof(unsigned int)) ) { PERROR("Error when writing to state file (2)"); ---- a/xen/arch/x86/domctl.c -+++ b/xen/arch/x86/domctl.c -@@ -207,11 +207,12 @@ long arch_do_domctl( +Index: xen-4.0.1-testing/xen/arch/x86/domctl.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/domctl.c ++++ xen-4.0.1-testing/xen/arch/x86/domctl.c +@@ -206,11 +206,12 @@ long arch_do_domctl( for ( j = 0; j < k; j++ ) { @@ -139,7 +143,7 @@ Signed-off-by: Jan Beulich type = XEN_DOMCTL_PFINFO_XTAB; else if ( xsm_getpageframeinfo(page) != 0 ) ; -@@ -306,14 +307,15 @@ long arch_do_domctl( +@@ -305,14 +306,15 @@ long arch_do_domctl( for ( j = 0; j < k; j++ ) { struct page_info *page; diff --git a/21620-x86-signed-domain-irq.patch b/21620-x86-signed-domain-irq.patch deleted file mode 100644 index ee3d1bf..0000000 --- a/21620-x86-signed-domain-irq.patch +++ /dev/null @@ -1,34 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1276604463 -3600 -# Node ID b0f7f710f512aba0fca814467e4f5fe7b906ada3 -# Parent 972b7e305138759d4ef42b75d5fe5c6fd2d2e30c -x86: return value of domain_pirq_to_irq() is signed - -That value can, for forcibly unbound PIRQs, validly be negative, and -for the respective check to catch those cases (and prevent using these -negative values as array index), the respective variables must be of -signed type. - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -879,7 +879,7 @@ static void __do_IRQ_guest(int irq) - struct irq_desc *domain_spin_lock_irq_desc( - struct domain *d, int pirq, unsigned long *pflags) - { -- unsigned int irq; -+ int irq; - unsigned long flags; - struct irq_desc *desc; - -@@ -1046,7 +1046,7 @@ extern int ioapic_ack_new; - static int pirq_acktype(struct domain *d, int pirq) - { - struct irq_desc *desc; -- unsigned int irq; -+ int irq; - - irq = domain_pirq_to_irq(d, pirq); - if ( irq <= 0 ) diff --git a/21627-cpuidle-wrap.patch b/21627-cpuidle-wrap.patch index 18da1d3..004a9ea 100644 --- a/21627-cpuidle-wrap.patch +++ b/21627-cpuidle-wrap.patch @@ -7,9 +7,11 @@ cpuidle: fix wrapped ticks calculation for pm timer. Signed-off-by: Wei Gang ---- a/xen/arch/x86/acpi/cpu_idle.c -+++ b/xen/arch/x86/acpi/cpu_idle.c -@@ -127,9 +127,9 @@ static inline u32 ticks_elapsed(u32 t1, +Index: xen-4.0.1-testing/xen/arch/x86/acpi/cpu_idle.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/acpi/cpu_idle.c ++++ xen-4.0.1-testing/xen/arch/x86/acpi/cpu_idle.c +@@ -127,9 +127,9 @@ static inline u32 ticks_elapsed(u32 t1, if ( t2 >= t1 ) return (t2 - t1); else if ( !(acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER) ) diff --git a/21643-vmx-vpmu-pmc-offset.patch b/21643-vmx-vpmu-pmc-offset.patch deleted file mode 100644 index be0eafb..0000000 --- a/21643-vmx-vpmu-pmc-offset.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277110750 -3600 -# Node ID 31708477f0a92be70a940d1c8ff1aa721051bba8 -# Parent 46a4c936b77e483971d2b3eb0b544c61700f824a -vmx: Fix bug in VMX VPMU fixed function PMC offset - -This is a minor fix to the calculation of bit-width of fixed function -perfmon counters in Intel processors. Bits 5-12 of edx register -should be calculated as (edx & 0x1fe0) >>5 instead of using 0x1f70. - -From: "John, Jaiber J" -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/hvm/vmx/vpmu_core2.c -+++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c -@@ -82,7 +82,7 @@ static int core2_get_bitwidth_fix_count( - { - u32 eax, ebx, ecx, edx; - cpuid(0xa, &eax, &ebx, &ecx, &edx); -- return ((edx & 0x1f70) >> 5); -+ return ((edx & 0x1fe0) >> 5); - } - - static int is_core2_vpmu_msr(u32 msr_index, int *type, int *index) diff --git a/21653-xend-mac-addr.patch b/21653-xend-mac-addr.patch index 293ffdb..a1b8b5f 100644 --- a/21653-xend-mac-addr.patch +++ b/21653-xend-mac-addr.patch @@ -16,10 +16,10 @@ validity before doing device_add, there will be no problem. Signed-off-by Chunyan Liu -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -847,11 +847,6 @@ class XendDomainInfo: @type dev_config: SXP object (parsed config) """ diff --git a/21678-xend-mac-fix.patch b/21678-xend-mac-fix.patch index 5ff0672..b452487 100644 --- a/21678-xend-mac-fix.patch +++ b/21678-xend-mac-fix.patch @@ -16,10 +16,10 @@ change manually as it had been mangled.) Signed-off-by: Ian Jackson Signed-off-by Chunyan Liu -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -847,6 +847,8 @@ class XendDomainInfo: @type dev_config: SXP object (parsed config) """ diff --git a/21682-trace-buffer-range.patch b/21682-trace-buffer-range.patch deleted file mode 100644 index 7ba7645..0000000 --- a/21682-trace-buffer-range.patch +++ /dev/null @@ -1,26 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277738876 -3600 -# Node ID 7e46fdbe8a1187cee2ab609256300d7967f37f06 -# Parent bf64e1081333696c68c9430cbc32c8bd6ee18796 -xentrace: restrict trace buffer MFNs - -Since they're being passed to Dom0 using an array of uint32_t, they -must be representable as 32-bit quantities, and hence the buffer -allocation must specify an upper address boundary. - -Signed-off-by: Jan Beulich -Acked-by: George Dunlap - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -152,7 +152,8 @@ static int alloc_trace_bufs(void) - char *rawbuf; - struct t_buf *buf; - -- if ( (rawbuf = alloc_xenheap_pages(order, 0)) == NULL ) -+ if ( (rawbuf = alloc_xenheap_pages( -+ order, MEMF_bits(32 + PAGE_SHIFT))) == NULL ) - { - printk("Xen trace buffers: memory allocation failed\n"); - opt_tbuf_size = 0; diff --git a/21683-vtd-kill-timer-conditional.patch b/21683-vtd-kill-timer-conditional.patch index 94b6b9e..77ee382 100644 --- a/21683-vtd-kill-timer-conditional.patch +++ b/21683-vtd-kill-timer-conditional.patch @@ -7,8 +7,10 @@ vtd: Only kill_timer() an init_timer()'ed timer. Signed-off-by: Keir Fraser ---- a/xen/drivers/passthrough/io.c -+++ b/xen/drivers/passthrough/io.c +Index: xen-4.0.1-testing/xen/drivers/passthrough/io.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/io.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/io.c @@ -27,7 +27,7 @@ static void hvm_dirq_assist(unsigned long _d); @@ -18,8 +20,10 @@ Signed-off-by: Keir Fraser { return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE)); } ---- a/xen/drivers/passthrough/pci.c -+++ b/xen/drivers/passthrough/pci.c +Index: xen-4.0.1-testing/xen/drivers/passthrough/pci.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/pci.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/pci.c @@ -257,7 +257,9 @@ static void pci_clean_dpci_irqs(struct d i = find_next_bit(hvm_irq_dpci->mapping, d->nr_pirqs, i + 1) ) { @@ -31,9 +35,11 @@ Signed-off-by: Keir Fraser list_for_each_safe ( digl_list, tmp, &hvm_irq_dpci->mirq[i].digl_list ) ---- a/xen/include/xen/iommu.h -+++ b/xen/include/xen/iommu.h -@@ -92,6 +92,7 @@ void hvm_dpci_isairq_eoi(struct domain * +Index: xen-4.0.1-testing/xen/include/xen/iommu.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/iommu.h ++++ xen-4.0.1-testing/xen/include/xen/iommu.h +@@ -103,6 +103,7 @@ void hvm_dpci_isairq_eoi(struct domain * struct hvm_irq_dpci *domain_get_irq_dpci(struct domain *domain); int domain_set_irq_dpci(struct domain *domain, struct hvm_irq_dpci *dpci); void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci); diff --git a/21693-memevent-64bit-only.patch b/21693-memevent-64bit-only.patch deleted file mode 100644 index 5aca3aa..0000000 --- a/21693-memevent-64bit-only.patch +++ /dev/null @@ -1,286 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277831801 -3600 -# Node ID 6b5a5bfaf3577a050c6779b0b62245560fda53f6 -# Parent 3ea84fd20b263a8e443e3bb16d5495cd3dbd8033 -x86: Only build memory-event features on 64-bit Xen - -32-bit Xen doesn't have enough p2m types to support them. - -Signed-off-by: Tim Deegan - -# HG changeset patch -# User Keir Fraser -# Date 1278579370 -3600 -# Node ID a7a680442b738928eb963b31e22a3e428ac111a0 -# Parent 92ac9536ac5abc17f414f024f3df92658cf2ee96 -xend: Continue domain building even if memshr extensions are not -present in the hypervisor. - -Signed-off-by: Keir Fraser - -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py -@@ -830,8 +830,10 @@ class HVMImageHandler(ImageHandler): - self.acpi = int(vmConfig['platform'].get('acpi', 0)) - self.guest_os_type = vmConfig['platform'].get('guest_os_type') - self.memory_sharing = int(vmConfig['memory_sharing']) -- xc.dom_set_memshr(self.vm.getDomid(), self.memory_sharing) -- -+ try: -+ xc.dom_set_memshr(self.vm.getDomid(), self.memory_sharing) -+ except: -+ pass - - # Return a list of cmd line args to the device models based on the - # xm config file -Index: xen-4.0.0-testing/xen/arch/x86/domctl.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/domctl.c -+++ xen-4.0.0-testing/xen/arch/x86/domctl.c -@@ -1420,6 +1420,7 @@ long arch_do_domctl( - break; - #endif /* XEN_GDBSX_CONFIG */ - -+#ifdef __x86_64__ - case XEN_DOMCTL_mem_event_op: - { - struct domain *d; -@@ -1450,6 +1451,7 @@ long arch_do_domctl( - } - } - break; -+#endif /* __x86_64__ */ - - default: - ret = -ENOSYS; -Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c -@@ -922,6 +922,7 @@ bool_t hvm_hap_nested_page_fault(unsigne - return 1; - } - -+#ifdef __x86_64__ - /* Check if the page has been paged out */ - if ( p2m_is_paged(p2mt) || (p2mt == p2m_ram_paging_out) ) - p2m_mem_paging_populate(current->domain, gfn); -@@ -932,6 +933,7 @@ bool_t hvm_hap_nested_page_fault(unsigne - mem_sharing_unshare_page(current->domain, gfn, 0); - return 1; - } -+#endif - - /* Spurious fault? PoD and log-dirty also take this path. */ - if ( p2m_is_ram(p2mt) ) -Index: xen-4.0.0-testing/xen/arch/x86/mm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/mm.c -@@ -3179,20 +3179,23 @@ int do_mmu_update( - rc = -ENOENT; - break; - } -+#ifdef __x86_64__ - /* XXX: Ugly: pull all the checks into a separate function. - * Don't want to do it now, not to interfere with mem_paging - * patches */ - else if ( p2m_ram_shared == l1e_p2mt ) - { - /* Unshare the page for RW foreign mappings */ -- if(l1e_get_flags(l1e) & _PAGE_RW) -+ if ( l1e_get_flags(l1e) & _PAGE_RW ) - { - rc = mem_sharing_unshare_page(pg_owner, - l1e_get_pfn(l1e), - 0); -- if(rc) break; -+ if ( rc ) -+ break; - } - } -+#endif - - okay = mod_l1_entry(va, l1e, mfn, - cmd == MMU_PT_UPDATE_PRESERVE_AD, v, -@@ -4537,8 +4540,10 @@ long arch_memory_op(int op, XEN_GUEST_HA - return rc; - } - -+#ifdef __x86_64__ - case XENMEM_get_sharing_freed_pages: - return mem_sharing_get_nr_saved_mfns(); -+#endif - - default: - return subarch_memory_op(op, arg); -Index: xen-4.0.0-testing/xen/arch/x86/mm/Makefile -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm/Makefile -+++ xen-4.0.0-testing/xen/arch/x86/mm/Makefile -@@ -6,9 +6,9 @@ obj-y += p2m.o - obj-y += guest_walk_2.o - obj-y += guest_walk_3.o - obj-$(x86_64) += guest_walk_4.o --obj-y += mem_event.o --obj-y += mem_paging.o --obj-y += mem_sharing.o -+obj-$(x86_64) += mem_event.o -+obj-$(x86_64) += mem_paging.o -+obj-$(x86_64) += mem_sharing.o - - guest_walk_%.o: guest_walk.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ -Index: xen-4.0.0-testing/xen/arch/x86/mm/p2m.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm/p2m.c -+++ xen-4.0.0-testing/xen/arch/x86/mm/p2m.c -@@ -1708,17 +1708,23 @@ void p2m_teardown(struct domain *d) - { - struct page_info *pg; - struct p2m_domain *p2m = d->arch.p2m; -+#ifdef __x86_64__ - unsigned long gfn; - p2m_type_t t; - mfn_t mfn; -+#endif - - p2m_lock(p2m); -- for(gfn=0; gfn < p2m->max_mapped_pfn; gfn++) -+ -+#ifdef __x86_64__ -+ for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) - { - mfn = p2m->get_entry(d, gfn, &t, p2m_query); -- if(mfn_valid(mfn) && (t == p2m_ram_shared)) -+ if ( mfn_valid(mfn) && (t == p2m_ram_shared) ) - BUG_ON(mem_sharing_unshare_page(d, gfn, MEM_SHARING_DESTROY_GFN)); - } -+#endif -+ - d->arch.phys_table = pagetable_null(); - - while ( (pg = page_list_remove_head(&p2m->pages)) ) -@@ -2410,6 +2416,7 @@ clear_mmio_p2m_entry(struct domain *d, u - return rc; - } - -+#ifdef __x86_64__ - int - set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn) - { -@@ -2592,7 +2599,7 @@ void p2m_mem_paging_resume(struct domain - /* Unpause any domains that were paused because the ring was full */ - mem_event_unpause_vcpus(d); - } -- -+#endif /* __x86_64__ */ - - /* - * Local variables: -Index: xen-4.0.0-testing/xen/include/asm-x86/mem_sharing.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/mem_sharing.h -+++ xen-4.0.0-testing/xen/include/asm-x86/mem_sharing.h -@@ -22,6 +22,8 @@ - #ifndef __MEM_SHARING_H__ - #define __MEM_SHARING_H__ - -+#ifdef __x86_64__ -+ - #define sharing_supported(_d) \ - (is_hvm_domain(_d) && (_d)->arch.hvm_domain.hap_enabled) - -@@ -43,4 +45,10 @@ int mem_sharing_domctl(struct domain *d, - xen_domctl_mem_sharing_op_t *mec); - void mem_sharing_init(void); - -+#else -+ -+#define mem_sharing_init() do { } while (0) -+ -+#endif /* __x86_64__ */ -+ - #endif /* __MEM_SHARING_H__ */ -Index: xen-4.0.0-testing/xen/include/asm-x86/p2m.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/p2m.h -+++ xen-4.0.0-testing/xen/include/asm-x86/p2m.h -@@ -77,11 +77,12 @@ typedef enum { - p2m_grant_map_rw = 7, /* Read/write grant mapping */ - p2m_grant_map_ro = 8, /* Read-only grant mapping */ - -+ /* Likewise, although these are defined in all builds, they can only -+ * be used in 64-bit builds */ - p2m_ram_paging_out = 9, /* Memory that is being paged out */ - p2m_ram_paged = 10, /* Memory that has been paged out */ - p2m_ram_paging_in = 11, /* Memory that is being paged in */ - p2m_ram_paging_in_start = 12, /* Memory that is being paged in */ -- - p2m_ram_shared = 13, /* Shared or sharable memory */ - } p2m_type_t; - -@@ -154,6 +155,7 @@ typedef enum { - #define p2m_is_sharable(_t) (p2m_to_mask(_t) & P2M_SHARABLE_TYPES) - #define p2m_is_shared(_t) (p2m_to_mask(_t) & P2M_SHARED_TYPES) - -+ - /* Populate-on-demand */ - #define POPULATE_ON_DEMAND_MFN (1<<9) - #define POD_PAGE_ORDER 9 -@@ -314,20 +316,21 @@ static inline mfn_t gfn_to_mfn_unshare(s - int must_succeed) - { - mfn_t mfn; -- int ret; - - mfn = gfn_to_mfn(d, gfn, p2mt); -- if(p2m_is_shared(*p2mt)) -+#ifdef __x86_64__ -+ if ( p2m_is_shared(*p2mt) ) - { -- ret = mem_sharing_unshare_page(d, gfn, -- must_succeed ? MEM_SHARING_MUST_SUCCEED : 0); -- if(ret < 0) -+ if ( mem_sharing_unshare_page(d, gfn, -+ must_succeed -+ ? MEM_SHARING_MUST_SUCCEED : 0) ) - { - BUG_ON(must_succeed); - return mfn; - } - mfn = gfn_to_mfn(d, gfn, p2mt); - } -+#endif - - return mfn; - } -@@ -429,10 +432,11 @@ p2m_type_t p2m_change_type(struct domain - /* Set mmio addresses in the p2m table (for pass-through) */ - int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); - int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn); --/* Modify p2m table for shared gfn */ --int --set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); - -+ -+#ifdef __x86_64__ -+/* Modify p2m table for shared gfn */ -+int set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); - /* Check if a nominated gfn is valid to be paged out */ - int p2m_mem_paging_nominate(struct domain *d, unsigned long gfn); - /* Evict a frame */ -@@ -443,6 +447,10 @@ void p2m_mem_paging_populate(struct doma - int p2m_mem_paging_prep(struct domain *d, unsigned long gfn); - /* Resume normal operation (in case a domain was paused) */ - void p2m_mem_paging_resume(struct domain *d); -+#else -+static inline void p2m_mem_paging_populate(struct domain *d, unsigned long gfn) -+{ } -+#endif - - #endif /* _XEN_P2M_H */ - diff --git a/21695-trace-t_info-readonly.patch b/21695-trace-t_info-readonly.patch deleted file mode 100644 index 71957ce..0000000 --- a/21695-trace-t_info-readonly.patch +++ /dev/null @@ -1,90 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277831922 -3600 -# Node ID c5f3fe17374cead91fdaa94f60cf7b3115eaa091 -# Parent 2a3a5979e3f16d77f5b526050c45acba186482b0 -trace: share t_info pages only in read-only mode - -There's no need to share writably the t_info pages (Dom0 only wants -[and needs] to read it) - -Signed-off-by: Jan Beulich -Acked-by: George Dunlap - ---- a/tools/xenmon/xenbaked.c -+++ b/tools/xenmon/xenbaked.c -@@ -84,7 +84,7 @@ typedef struct settings_st { - } settings_t; - - struct t_struct { -- struct t_info *t_info; /* Structure with information about individual buffers */ -+ const struct t_info *t_info; /* Structure with information about individual buffers */ - struct t_buf **meta; /* Pointers to trace buffer metadata */ - unsigned char **data; /* Pointers to trace buffer data areas */ - }; -@@ -376,9 +376,8 @@ static struct t_struct *map_tbufs(unsign - } - - /* Map t_info metadata structure */ -- tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, -- tinfo_size, PROT_READ | PROT_WRITE, -- tbufs_mfn); -+ tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, tinfo_size, -+ PROT_READ, tbufs_mfn); - - if ( tbufs.t_info == 0 ) - { -@@ -404,7 +403,8 @@ static struct t_struct *map_tbufs(unsign - for(i=0; imfn_offset[i]; -+ const uint32_t *mfn_list = (const uint32_t *)tbufs.t_info -+ + tbufs.t_info->mfn_offset[i]; - int j; - xen_pfn_t pfn_list[tbufs.t_info->tbuf_size]; - ---- a/tools/xentrace/xentrace.c -+++ b/tools/xentrace/xentrace.c -@@ -62,7 +62,7 @@ typedef struct settings_st { - } settings_t; - - struct t_struct { -- struct t_info *t_info; /* Structure with information about individual buffers */ -+ const struct t_info *t_info; /* Structure with information about individual buffers */ - struct t_buf **meta; /* Pointers to trace buffer metadata */ - unsigned char **data; /* Pointers to trace buffer data areas */ - }; -@@ -459,9 +459,8 @@ static struct t_struct *map_tbufs(unsign - int i; - - /* Map t_info metadata structure */ -- tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, -- tinfo_size, PROT_READ | PROT_WRITE, -- tbufs_mfn); -+ tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, tinfo_size, -+ PROT_READ, tbufs_mfn); - - if ( tbufs.t_info == 0 ) - { -@@ -487,7 +486,8 @@ static struct t_struct *map_tbufs(unsign - for(i=0; imfn_offset[i]; -+ const uint32_t *mfn_list = (const uint32_t *)tbufs.t_info -+ + tbufs.t_info->mfn_offset[i]; - int j; - xen_pfn_t pfn_list[tbufs.t_info->tbuf_size]; - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -322,7 +322,7 @@ void __init init_trace_bufs(void) - - for(i=0; i -# Date 1277917869 -3600 -# Node ID 81d6471ff1235fde2c30428b920cb6e00ba546d6 -# Parent a9caa0f2d693a1d0d008b4295e49da3ea1d70334 -x86: fix an off-by-one pirq range check - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -1019,7 +1019,7 @@ static void __pirq_guest_eoi(struct doma - - int pirq_guest_eoi(struct domain *d, int irq) - { -- if ( (irq < 0) || (irq > d->nr_pirqs) ) -+ if ( (irq < 0) || (irq >= d->nr_pirqs) ) - return -EINVAL; - - __pirq_guest_eoi(d, irq); diff --git a/21699-p2m-query-for-type-change.patch b/21699-p2m-query-for-type-change.patch deleted file mode 100644 index b3152cf..0000000 --- a/21699-p2m-query-for-type-change.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277917902 -3600 -# Node ID 7cda3ad44c6d4e799e65b2ffe21e609f50cdb94b -# Parent 81d6471ff1235fde2c30428b920cb6e00ba546d6 -Use gfn_to_mfn_query() rather then gfn_to_mfn() when changing P2M types - -Use gfn_to_mfn_query() rather then gfn_to_mfn() when changing -P2M types since we do not really want to force a PoD allocation -as a side effect. - -Signed-off-by: Paul Durrant - ---- a/xen/arch/x86/mm/p2m.c -+++ b/xen/arch/x86/mm/p2m.c -@@ -2351,7 +2351,7 @@ p2m_type_t p2m_change_type(struct domain - - p2m_lock(d->arch.p2m); - -- mfn = gfn_to_mfn(d, gfn, &pt); -+ mfn = gfn_to_mfn_query(d, gfn, &pt); - if ( pt == ot ) - set_p2m_entry(d, gfn, mfn, 0, nt); - diff --git a/21700-32on64-vm86-gpf.patch b/21700-32on64-vm86-gpf.patch deleted file mode 100644 index 241c450..0000000 --- a/21700-32on64-vm86-gpf.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277917963 -3600 -# Node ID fae04060a4f4e364c5012692b97ae1eeec3a326e -# Parent 7cda3ad44c6d4e799e65b2ffe21e609f50cdb94b -Fix #GPF injection into compat guests in vm86 code - -not to let the guest disable interrupts in the real EFLAGS. - -Signed-off-by: Ian Campbell - ---- a/xen/arch/x86/x86_64/compat/traps.c -+++ b/xen/arch/x86/x86_64/compat/traps.c -@@ -127,9 +127,8 @@ unsigned int compat_iret(void) - ti = &v->arch.guest_context.trap_ctxt[13]; - if ( TI_GET_IF(ti) ) - eflags &= ~X86_EFLAGS_IF; -- regs->_eflags = eflags & ~(X86_EFLAGS_VM|X86_EFLAGS_RF| -- X86_EFLAGS_NT|X86_EFLAGS_TF); -- -+ regs->_eflags &= ~(X86_EFLAGS_VM|X86_EFLAGS_RF| -+ X86_EFLAGS_NT|X86_EFLAGS_TF); - if ( unlikely(__put_user(0, (u32 *)regs->rsp)) ) - goto exit_and_crash; - regs->_eip = ti->address; diff --git a/21705-trace-printk.patch b/21705-trace-printk.patch deleted file mode 100644 index 515640e..0000000 --- a/21705-trace-printk.patch +++ /dev/null @@ -1,51 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278093217 -3600 -# Node ID 19f4d637a52b8723ac1fbcf666c146951bee8e57 -# Parent 1390e2ab45c7b63d79ba9496d609cf59af4b44ee -trace: adjust printk()s - -They should be lower level or rate limited. - -Signed-off-by: Jan Beulich -Acked-by: George Dunlap - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -137,7 +137,7 @@ static int alloc_trace_bufs(void) - } - - t_info->tbuf_size = opt_tbuf_size; -- printk("tbuf_size %d\n", t_info->tbuf_size); -+ printk(XENLOG_INFO "tbuf_size %d\n", t_info->tbuf_size); - - nr_pages = opt_tbuf_size; - order = get_order_from_pages(nr_pages); -@@ -194,7 +194,7 @@ static int alloc_trace_bufs(void) - /* Write list first, then write per-cpu offset. */ - wmb(); - t_info->mfn_offset[cpu]=offset; -- printk("p%d mfn %"PRIx32" offset %d\n", -+ printk(XENLOG_INFO "p%d mfn %"PRIx32" offset %d\n", - cpu, mfn, offset); - offset+=i; - } -@@ -489,12 +489,13 @@ static inline int __insert_record(struct - /* Double-check once more that we have enough space. - * Don't bugcheck here, in case the userland tool is doing - * something stupid. */ -- if ( calc_bytes_avail(buf) < rec_size ) -+ next = calc_bytes_avail(buf); -+ if ( next < rec_size ) - { -- printk("%s: %u bytes left (%u - ((%u - %u) %% %u) recsize %u.\n", -- __func__, -- calc_bytes_avail(buf), -- data_size, buf->prod, buf->cons, data_size, rec_size); -+ if ( printk_ratelimit() ) -+ printk(XENLOG_WARNING -+ "%s: avail=%u (size=%08x prod=%08x cons=%08x) rec=%u\n", -+ __func__, next, data_size, buf->prod, buf->cons, rec_size); - return 0; - } - rmb(); diff --git a/21706-trace-security.patch b/21706-trace-security.patch deleted file mode 100644 index 588ed0c..0000000 --- a/21706-trace-security.patch +++ /dev/null @@ -1,396 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278093394 -3600 -# Node ID ae68758f8862bc43ab6bbe4ad3a8594c28b9bc39 -# Parent 19f4d637a52b8723ac1fbcf666c146951bee8e57 -trace: fix security issues - -After getting a report of 3.2.3's xenmon crashing Xen (as it turned -out this was because c/s 17000 was backported to that tree without -also applying c/s 17515), I figured that the hypervisor shouldn't rely -on any specific state of the actual trace buffer (as it is shared -writable with Dom0) - -[GWD: Volatile quantifiers have been taken out and moved to another -patch] - -To make clear what purpose specific variables have and/or where they -got loaded from, the patch also changes the type of some of them to be -explicitly u32/s32, and removes pointless assertions (like checking an -unsigned variable to be >= 0). - -I also took the prototype adjustment of __trace_var() as an -opportunity to simplify the TRACE_xD() macros. Similar simplification -could be done on the (quite numerous) direct callers of the function. - -Signed-off-by: Jan Beulich -Signed-off-by: George Dunlap - -# HG changeset patch -# User Keir Fraser -# Date 1278314658 -3600 -# Node ID 9074d50d09358cd8349d54c7ab2e2ead81fa1570 -# Parent f483b5ce7be235494156fee164decd73e0472cb7 -trace: insert compiler memory barriers - -This is to ensure fields shared writably with Dom0 get read only once -for any consistency checking followed by actual calculations. - -I realized there was another multiple-read issue, a fix for which is -also included (which at once simplifies __insert_record()). - -Signed-off-by: Jan Beulich - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -52,12 +52,12 @@ static struct t_info *t_info; - static DEFINE_PER_CPU_READ_MOSTLY(struct t_buf *, t_bufs); - static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, t_data); - static DEFINE_PER_CPU_READ_MOSTLY(spinlock_t, t_lock); --static int data_size; -+static u32 data_size; - static u32 t_info_first_offset __read_mostly; - - /* High water mark for trace buffers; */ - /* Send virtual interrupt when buffer level reaches this point */ --static int t_buf_highwater; -+static u32 t_buf_highwater; - - /* Number of records lost due to per-CPU trace buffer being full. */ - static DEFINE_PER_CPU(unsigned long, lost_records); -@@ -162,7 +162,7 @@ static int alloc_trace_bufs(void) - - spin_lock_irqsave(&per_cpu(t_lock, cpu), flags); - -- buf = per_cpu(t_bufs, cpu) = (struct t_buf *)rawbuf; -+ per_cpu(t_bufs, cpu) = buf = (struct t_buf *)rawbuf; - buf->cons = buf->prod = 0; - per_cpu(t_data, cpu) = (unsigned char *)(buf + 1); - -@@ -213,6 +213,7 @@ out_dealloc: - spin_lock_irqsave(&per_cpu(t_lock, cpu), flags); - if ( (rawbuf = (char *)per_cpu(t_bufs, cpu)) ) - { -+ per_cpu(t_bufs, cpu) = NULL; - ASSERT(!(virt_to_page(rawbuf)->count_info & PGC_allocated)); - free_xenheap_pages(rawbuf, order); - } -@@ -418,19 +419,39 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc - return rc; - } - --static inline int calc_rec_size(int cycles, int extra) -+static inline unsigned int calc_rec_size(bool_t cycles, unsigned int extra) - { -- int rec_size; -- rec_size = 4; -+ unsigned int rec_size = 4; -+ - if ( cycles ) - rec_size += 8; - rec_size += extra; - return rec_size; - } - --static inline int calc_unconsumed_bytes(struct t_buf *buf) -+static inline bool_t bogus(u32 prod, u32 cons) - { -- int x = buf->prod - buf->cons; -+ if ( unlikely(prod & 3) || unlikely(prod >= 2 * data_size) || -+ unlikely(cons & 3) || unlikely(cons >= 2 * data_size) ) -+ { -+ tb_init_done = 0; -+ printk(XENLOG_WARNING "trc#%u: bogus prod (%08x) and/or cons (%08x)\n", -+ smp_processor_id(), prod, cons); -+ return 1; -+ } -+ return 0; -+} -+ -+static inline u32 calc_unconsumed_bytes(const struct t_buf *buf) -+{ -+ u32 prod = buf->prod, cons = buf->cons; -+ s32 x; -+ -+ barrier(); /* must read buf->prod and buf->cons only once */ -+ if ( bogus(prod, cons) ) -+ return data_size; -+ -+ x = prod - cons; - if ( x < 0 ) - x += 2*data_size; - -@@ -440,9 +461,16 @@ static inline int calc_unconsumed_bytes( - return x; - } - --static inline int calc_bytes_to_wrap(struct t_buf *buf) -+static inline u32 calc_bytes_to_wrap(const struct t_buf *buf) - { -- int x = data_size - buf->prod; -+ u32 prod = buf->prod, cons = buf->cons; -+ s32 x; -+ -+ barrier(); /* must read buf->prod and buf->cons only once */ -+ if ( bogus(prod, cons) ) -+ return 0; -+ -+ x = data_size - prod; - if ( x <= 0 ) - x += data_size; - -@@ -452,55 +480,60 @@ static inline int calc_bytes_to_wrap(str - return x; - } - --static inline int calc_bytes_avail(struct t_buf *buf) -+static inline u32 calc_bytes_avail(const struct t_buf *buf) - { - return data_size - calc_unconsumed_bytes(buf); - } - --static inline struct t_rec * --next_record(struct t_buf *buf) -+static inline struct t_rec *next_record(const struct t_buf *buf, -+ uint32_t *next) - { -- int x = buf->prod; -+ u32 x = buf->prod, cons = buf->cons; -+ -+ barrier(); /* must read buf->prod and buf->cons only once */ -+ *next = x; -+ if ( !tb_init_done || bogus(x, cons) ) -+ return NULL; -+ - if ( x >= data_size ) - x -= data_size; - -- ASSERT(x >= 0); - ASSERT(x < data_size); - - return (struct t_rec *)&this_cpu(t_data)[x]; - } - --static inline int __insert_record(struct t_buf *buf, -- unsigned long event, -- int extra, -- int cycles, -- int rec_size, -- unsigned char *extra_data) -+static inline void __insert_record(struct t_buf *buf, -+ unsigned long event, -+ unsigned int extra, -+ bool_t cycles, -+ unsigned int rec_size, -+ const void *extra_data) - { - struct t_rec *rec; - unsigned char *dst; -- unsigned long extra_word = extra/sizeof(u32); -- int local_rec_size = calc_rec_size(cycles, extra); -+ unsigned int extra_word = extra / sizeof(u32); -+ unsigned int local_rec_size = calc_rec_size(cycles, extra); - uint32_t next; - - BUG_ON(local_rec_size != rec_size); - BUG_ON(extra & 3); - -+ rec = next_record(buf, &next); -+ if ( !rec ) -+ return; - /* Double-check once more that we have enough space. - * Don't bugcheck here, in case the userland tool is doing - * something stupid. */ -- next = calc_bytes_avail(buf); -- if ( next < rec_size ) -+ if ( (unsigned char *)rec + rec_size > this_cpu(t_data) + data_size ) - { - if ( printk_ratelimit() ) - printk(XENLOG_WARNING -- "%s: avail=%u (size=%08x prod=%08x cons=%08x) rec=%u\n", -- __func__, next, data_size, buf->prod, buf->cons, rec_size); -- return 0; -+ "%s: size=%08x prod=%08x cons=%08x rec=%u\n", -+ __func__, data_size, next, buf->cons, rec_size); -+ return; - } -- rmb(); - -- rec = next_record(buf); - rec->event = event; - rec->extra_u32 = extra_word; - dst = (unsigned char *)rec->u.nocycles.extra_u32; -@@ -517,21 +550,19 @@ static inline int __insert_record(struct - - wmb(); - -- next = buf->prod + rec_size; -+ next += rec_size; - if ( next >= 2*data_size ) - next -= 2*data_size; -- ASSERT(next >= 0); - ASSERT(next < 2*data_size); - buf->prod = next; -- -- return rec_size; - } - --static inline int insert_wrap_record(struct t_buf *buf, int size) -+static inline void insert_wrap_record(struct t_buf *buf, -+ unsigned int size) - { -- int space_left = calc_bytes_to_wrap(buf); -- unsigned long extra_space = space_left - sizeof(u32); -- int cycles = 0; -+ u32 space_left = calc_bytes_to_wrap(buf); -+ unsigned int extra_space = space_left - sizeof(u32); -+ bool_t cycles = 0; - - BUG_ON(space_left > size); - -@@ -543,17 +574,13 @@ static inline int insert_wrap_record(str - ASSERT((extra_space/sizeof(u32)) <= TRACE_EXTRA_MAX); - } - -- return __insert_record(buf, -- TRC_TRACE_WRAP_BUFFER, -- extra_space, -- cycles, -- space_left, -- NULL); -+ __insert_record(buf, TRC_TRACE_WRAP_BUFFER, extra_space, cycles, -+ space_left, NULL); - } - - #define LOST_REC_SIZE (4 + 8 + 16) /* header + tsc + sizeof(struct ed) */ - --static inline int insert_lost_records(struct t_buf *buf) -+static inline void insert_lost_records(struct t_buf *buf) - { - struct { - u32 lost_records; -@@ -568,12 +595,8 @@ static inline int insert_lost_records(st - - this_cpu(lost_records) = 0; - -- return __insert_record(buf, -- TRC_LOST_RECORDS, -- sizeof(ed), -- 1 /* cycles */, -- LOST_REC_SIZE, -- (unsigned char *)&ed); -+ __insert_record(buf, TRC_LOST_RECORDS, sizeof(ed), 1 /* cycles */, -+ LOST_REC_SIZE, &ed); - } - - /* -@@ -595,13 +618,15 @@ static DECLARE_TASKLET(trace_notify_dom0 - * failure, otherwise 0. Failure occurs only if the trace buffers are not yet - * initialised. - */ --void __trace_var(u32 event, int cycles, int extra, unsigned char *extra_data) -+void __trace_var(u32 event, bool_t cycles, unsigned int extra, -+ const void *extra_data) - { - struct t_buf *buf; -- unsigned long flags, bytes_to_tail, bytes_to_wrap; -- int rec_size, total_size; -- int extra_word; -- int started_below_highwater = 0; -+ unsigned long flags; -+ u32 bytes_to_tail, bytes_to_wrap; -+ unsigned int rec_size, total_size; -+ unsigned int extra_word; -+ bool_t started_below_highwater; - - if( !tb_init_done ) - return; -@@ -640,7 +665,11 @@ void __trace_var(u32 event, int cycles, - buf = this_cpu(t_bufs); - - if ( unlikely(!buf) ) -+ { -+ /* Make gcc happy */ -+ started_below_highwater = 0; - goto unlock; -+ } - - started_below_highwater = (calc_unconsumed_bytes(buf) < t_buf_highwater); - -@@ -721,8 +750,9 @@ unlock: - spin_unlock_irqrestore(&this_cpu(t_lock), flags); - - /* Notify trace buffer consumer that we've crossed the high water mark. */ -- if ( started_below_highwater && -- (calc_unconsumed_bytes(buf) >= t_buf_highwater) ) -+ if ( likely(buf!=NULL) -+ && started_below_highwater -+ && (calc_unconsumed_bytes(buf) >= t_buf_highwater) ) - tasklet_schedule(&trace_notify_dom0_tasklet); - } - ---- a/xen/include/xen/trace.h -+++ b/xen/include/xen/trace.h -@@ -36,7 +36,7 @@ int tb_control(struct xen_sysctl_tbuf_op - - int trace_will_trace_event(u32 event); - --void __trace_var(u32 event, int cycles, int extra, unsigned char *extra_data); -+void __trace_var(u32 event, bool_t cycles, unsigned int extra, const void *); - - static inline void trace_var(u32 event, int cycles, int extra, - unsigned char *extra_data) -@@ -57,7 +57,7 @@ static inline void trace_var(u32 event, - { \ - u32 _d[1]; \ - _d[0] = d1; \ -- __trace_var(_e, 1, sizeof(*_d), (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -68,7 +68,7 @@ static inline void trace_var(u32 event, - u32 _d[2]; \ - _d[0] = d1; \ - _d[1] = d2; \ -- __trace_var(_e, 1, sizeof(*_d)*2, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -80,7 +80,7 @@ static inline void trace_var(u32 event, - _d[0] = d1; \ - _d[1] = d2; \ - _d[2] = d3; \ -- __trace_var(_e, 1, sizeof(*_d)*3, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -93,7 +93,7 @@ static inline void trace_var(u32 event, - _d[1] = d2; \ - _d[2] = d3; \ - _d[3] = d4; \ -- __trace_var(_e, 1, sizeof(*_d)*4, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -107,7 +107,7 @@ static inline void trace_var(u32 event, - _d[2] = d3; \ - _d[3] = d4; \ - _d[4] = d5; \ -- __trace_var(_e, 1, sizeof(*_d)*5, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -122,7 +122,7 @@ static inline void trace_var(u32 event, - _d[3] = d4; \ - _d[4] = d5; \ - _d[5] = d6; \ -- __trace_var(_e, 1, sizeof(*_d)*6, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - diff --git a/21712-amd-osvw.patch b/21712-amd-osvw.patch deleted file mode 100644 index 34cebd3..0000000 --- a/21712-amd-osvw.patch +++ /dev/null @@ -1,388 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278093897 -3600 -# Node ID f483b5ce7be235494156fee164decd73e0472cb7 -# Parent 4d091e6e04918ba3ef19cc45ae2fffaee4f18afe -AMD OSVW (OS Visible Workaround) for Xen - -This path enables AMD OSVW (OS Visible Workaround) feature for -Xen. New AMD errata will have a OSVW id assigned in the future. OS is -supposed to check OSVW status MSR to find out whether CPU has a -specific erratum. Legacy errata are also supported in this patch: -traditional family/model/stepping approach will be used if OSVW -feature isn't applicable. This patch is adapted from Hans Rosenfeld's -patch submitted to Linux kernel. - -Signed-off-by: Wei Huang -Signed-off-by: Hans Rosenfeld -Acked-by: Jan Beulich - ---- a/xen/arch/x86/cpu/amd.c -+++ b/xen/arch/x86/cpu/amd.c -@@ -7,11 +7,11 @@ - #include - #include - #include -+#include - #include - #include /* amd_init_cpu */ - - #include "cpu.h" --#include "amd.h" - - void start_svm(struct cpuinfo_x86 *c); - -@@ -149,6 +149,54 @@ static void __devinit set_cpuidmask(cons - } - - /* -+ * Check for the presence of an AMD erratum. Arguments are defined in amd.h -+ * for each known erratum. Return 1 if erratum is found. -+ */ -+int cpu_has_amd_erratum(const struct cpuinfo_x86 *cpu, int osvw, ...) -+{ -+ va_list ap; -+ u32 range; -+ u32 ms; -+ -+ if (cpu->x86_vendor != X86_VENDOR_AMD) -+ return 0; -+ -+ va_start(ap, osvw); -+ -+ if (osvw) { -+ u16 osvw_id = va_arg(ap, int); -+ -+ if (cpu_has(cpu, X86_FEATURE_OSVW)) { -+ u64 osvw_len; -+ rdmsrl(MSR_AMD_OSVW_ID_LENGTH, osvw_len); -+ -+ if (osvw_id < osvw_len) { -+ u64 osvw_bits; -+ rdmsrl(MSR_AMD_OSVW_STATUS + (osvw_id >> 6), -+ osvw_bits); -+ -+ va_end(ap); -+ return (osvw_bits >> (osvw_id & 0x3f)) & 0x01; -+ } -+ } -+ } -+ -+ /* OSVW unavailable or ID unknown, match family-model-stepping range */ -+ ms = (cpu->x86_model << 8) | cpu->x86_mask; -+ while ((range = va_arg(ap, int))) { -+ if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) && -+ (ms >= AMD_MODEL_RANGE_START(range)) && -+ (ms <= AMD_MODEL_RANGE_END(range))) { -+ va_end(ap); -+ return 1; -+ } -+ } -+ -+ va_end(ap); -+ return 0; -+} -+ -+/* - * amd_flush_filter={on,off}. Forcibly Enable or disable the TLB flush - * filter on AMD 64-bit processors. - */ ---- a/xen/arch/x86/cpu/amd.h -+++ /dev/null -@@ -1,103 +0,0 @@ --/* -- * amd.h - AMD processor specific definitions -- */ -- --#ifndef __AMD_H__ --#define __AMD_H__ -- --#include -- --/* CPUID masked for use by AMD-V Extended Migration */ -- --#define X86_FEATURE_BITPOS(_feature_) ((_feature_) % 32) --#define __bit(_x_) (1U << X86_FEATURE_BITPOS(_x_)) -- --/* Family 0Fh, Revision C */ --#define AMD_FEATURES_K8_REV_C_ECX 0 --#define AMD_FEATURES_K8_REV_C_EDX ( \ -- __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ -- __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ -- __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ -- __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ -- __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ -- __bit(X86_FEATURE_SEP) | __bit(X86_FEATURE_MTRR) | \ -- __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ -- __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ -- __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_CLFLSH)| \ -- __bit(X86_FEATURE_MMX) | __bit(X86_FEATURE_FXSR) | \ -- __bit(X86_FEATURE_XMM) | __bit(X86_FEATURE_XMM2)) --#define AMD_EXTFEATURES_K8_REV_C_ECX 0 --#define AMD_EXTFEATURES_K8_REV_C_EDX ( \ -- __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ -- __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ -- __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ -- __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ -- __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ -- __bit(X86_FEATURE_SYSCALL) | __bit(X86_FEATURE_MTRR) | \ -- __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ -- __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ -- __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_NX) | \ -- __bit(X86_FEATURE_MMXEXT) | __bit(X86_FEATURE_MMX) | \ -- __bit(X86_FEATURE_FXSR) | __bit(X86_FEATURE_LM) | \ -- __bit(X86_FEATURE_3DNOWEXT) | __bit(X86_FEATURE_3DNOW)) -- --/* Family 0Fh, Revision D */ --#define AMD_FEATURES_K8_REV_D_ECX AMD_FEATURES_K8_REV_C_ECX --#define AMD_FEATURES_K8_REV_D_EDX AMD_FEATURES_K8_REV_C_EDX --#define AMD_EXTFEATURES_K8_REV_D_ECX (AMD_EXTFEATURES_K8_REV_C_ECX |\ -- __bit(X86_FEATURE_LAHF_LM)) --#define AMD_EXTFEATURES_K8_REV_D_EDX (AMD_EXTFEATURES_K8_REV_C_EDX |\ -- __bit(X86_FEATURE_FFXSR)) -- --/* Family 0Fh, Revision E */ --#define AMD_FEATURES_K8_REV_E_ECX (AMD_FEATURES_K8_REV_D_ECX | \ -- __bit(X86_FEATURE_XMM3)) --#define AMD_FEATURES_K8_REV_E_EDX (AMD_FEATURES_K8_REV_D_EDX | \ -- __bit(X86_FEATURE_HT)) --#define AMD_EXTFEATURES_K8_REV_E_ECX (AMD_EXTFEATURES_K8_REV_D_ECX |\ -- __bit(X86_FEATURE_CMP_LEGACY)) --#define AMD_EXTFEATURES_K8_REV_E_EDX AMD_EXTFEATURES_K8_REV_D_EDX -- --/* Family 0Fh, Revision F */ --#define AMD_FEATURES_K8_REV_F_ECX (AMD_FEATURES_K8_REV_E_ECX | \ -- __bit(X86_FEATURE_CX16)) --#define AMD_FEATURES_K8_REV_F_EDX AMD_FEATURES_K8_REV_E_EDX --#define AMD_EXTFEATURES_K8_REV_F_ECX (AMD_EXTFEATURES_K8_REV_E_ECX |\ -- __bit(X86_FEATURE_SVME) | __bit(X86_FEATURE_EXTAPICSPACE) | \ -- __bit(X86_FEATURE_ALTMOVCR)) --#define AMD_EXTFEATURES_K8_REV_F_EDX (AMD_EXTFEATURES_K8_REV_E_EDX |\ -- __bit(X86_FEATURE_RDTSCP)) -- --/* Family 0Fh, Revision G */ --#define AMD_FEATURES_K8_REV_G_ECX AMD_FEATURES_K8_REV_F_ECX --#define AMD_FEATURES_K8_REV_G_EDX AMD_FEATURES_K8_REV_F_EDX --#define AMD_EXTFEATURES_K8_REV_G_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ -- __bit(X86_FEATURE_3DNOWPF)) --#define AMD_EXTFEATURES_K8_REV_G_EDX AMD_EXTFEATURES_K8_REV_F_EDX -- --/* Family 10h, Revision B */ --#define AMD_FEATURES_FAM10h_REV_B_ECX (AMD_FEATURES_K8_REV_F_ECX | \ -- __bit(X86_FEATURE_POPCNT) | __bit(X86_FEATURE_MWAIT)) --#define AMD_FEATURES_FAM10h_REV_B_EDX AMD_FEATURES_K8_REV_F_EDX --#define AMD_EXTFEATURES_FAM10h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ -- __bit(X86_FEATURE_ABM) | __bit(X86_FEATURE_SSE4A) | \ -- __bit(X86_FEATURE_MISALIGNSSE) | __bit(X86_FEATURE_OSVW) | \ -- __bit(X86_FEATURE_IBS)) --#define AMD_EXTFEATURES_FAM10h_REV_B_EDX (AMD_EXTFEATURES_K8_REV_F_EDX |\ -- __bit(X86_FEATURE_PAGE1GB)) -- --/* Family 10h, Revision C */ --#define AMD_FEATURES_FAM10h_REV_C_ECX AMD_FEATURES_FAM10h_REV_B_ECX --#define AMD_FEATURES_FAM10h_REV_C_EDX AMD_FEATURES_FAM10h_REV_B_EDX --#define AMD_EXTFEATURES_FAM10h_REV_C_ECX (AMD_EXTFEATURES_FAM10h_REV_B_ECX |\ -- __bit(X86_FEATURE_SKINIT) | __bit(X86_FEATURE_WDT)) --#define AMD_EXTFEATURES_FAM10h_REV_C_EDX AMD_EXTFEATURES_FAM10h_REV_B_EDX -- --/* Family 11h, Revision B */ --#define AMD_FEATURES_FAM11h_REV_B_ECX AMD_FEATURES_K8_REV_G_ECX --#define AMD_FEATURES_FAM11h_REV_B_EDX AMD_FEATURES_K8_REV_G_EDX --#define AMD_EXTFEATURES_FAM11h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_G_ECX |\ -- __bit(X86_FEATURE_SKINIT)) --#define AMD_EXTFEATURES_FAM11h_REV_B_EDX AMD_EXTFEATURES_K8_REV_G_EDX -- --#endif /* __AMD_H__ */ ---- a/xen/arch/x86/hvm/svm/asid.c -+++ b/xen/arch/x86/hvm/svm/asid.c -@@ -21,14 +21,14 @@ - #include - #include - #include -+#include - - void svm_asid_init(struct cpuinfo_x86 *c) - { - int nasids = 0; - - /* Check for erratum #170, and leave ASIDs disabled if it's present. */ -- if ( (c->x86 == 0x10) || -- ((c->x86 == 0xf) && (c->x86_model >= 0x68) && (c->x86_mask >= 1)) ) -+ if ( !cpu_has_amd_erratum(c, AMD_ERRATUM_170) ) - nasids = cpuid_ebx(0x8000000A); - - hvm_asid_init(nasids); ---- a/xen/arch/x86/hvm/svm/svm.c -+++ b/xen/arch/x86/hvm/svm/svm.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -828,8 +829,8 @@ static void svm_init_erratum_383(struct - { - uint64_t msr_content; - -- /* only family 10h is affected */ -- if ( c->x86 != 0x10 ) -+ /* check whether CPU is affected */ -+ if ( !cpu_has_amd_erratum(c, AMD_ERRATUM_383) ) - return; - - rdmsrl(MSR_AMD64_DC_CFG, msr_content); ---- /dev/null -+++ b/xen/include/asm-x86/amd.h -@@ -0,0 +1,137 @@ -+/* -+ * amd.h - AMD processor specific definitions -+ */ -+ -+#ifndef __AMD_H__ -+#define __AMD_H__ -+ -+#include -+ -+/* CPUID masked for use by AMD-V Extended Migration */ -+ -+#define X86_FEATURE_BITPOS(_feature_) ((_feature_) % 32) -+#define __bit(_x_) (1U << X86_FEATURE_BITPOS(_x_)) -+ -+/* Family 0Fh, Revision C */ -+#define AMD_FEATURES_K8_REV_C_ECX 0 -+#define AMD_FEATURES_K8_REV_C_EDX ( \ -+ __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ -+ __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ -+ __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ -+ __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ -+ __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ -+ __bit(X86_FEATURE_SEP) | __bit(X86_FEATURE_MTRR) | \ -+ __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ -+ __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ -+ __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_CLFLSH)| \ -+ __bit(X86_FEATURE_MMX) | __bit(X86_FEATURE_FXSR) | \ -+ __bit(X86_FEATURE_XMM) | __bit(X86_FEATURE_XMM2)) -+#define AMD_EXTFEATURES_K8_REV_C_ECX 0 -+#define AMD_EXTFEATURES_K8_REV_C_EDX ( \ -+ __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ -+ __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ -+ __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ -+ __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ -+ __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ -+ __bit(X86_FEATURE_SYSCALL) | __bit(X86_FEATURE_MTRR) | \ -+ __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ -+ __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ -+ __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_NX) | \ -+ __bit(X86_FEATURE_MMXEXT) | __bit(X86_FEATURE_MMX) | \ -+ __bit(X86_FEATURE_FXSR) | __bit(X86_FEATURE_LM) | \ -+ __bit(X86_FEATURE_3DNOWEXT) | __bit(X86_FEATURE_3DNOW)) -+ -+/* Family 0Fh, Revision D */ -+#define AMD_FEATURES_K8_REV_D_ECX AMD_FEATURES_K8_REV_C_ECX -+#define AMD_FEATURES_K8_REV_D_EDX AMD_FEATURES_K8_REV_C_EDX -+#define AMD_EXTFEATURES_K8_REV_D_ECX (AMD_EXTFEATURES_K8_REV_C_ECX |\ -+ __bit(X86_FEATURE_LAHF_LM)) -+#define AMD_EXTFEATURES_K8_REV_D_EDX (AMD_EXTFEATURES_K8_REV_C_EDX |\ -+ __bit(X86_FEATURE_FFXSR)) -+ -+/* Family 0Fh, Revision E */ -+#define AMD_FEATURES_K8_REV_E_ECX (AMD_FEATURES_K8_REV_D_ECX | \ -+ __bit(X86_FEATURE_XMM3)) -+#define AMD_FEATURES_K8_REV_E_EDX (AMD_FEATURES_K8_REV_D_EDX | \ -+ __bit(X86_FEATURE_HT)) -+#define AMD_EXTFEATURES_K8_REV_E_ECX (AMD_EXTFEATURES_K8_REV_D_ECX |\ -+ __bit(X86_FEATURE_CMP_LEGACY)) -+#define AMD_EXTFEATURES_K8_REV_E_EDX AMD_EXTFEATURES_K8_REV_D_EDX -+ -+/* Family 0Fh, Revision F */ -+#define AMD_FEATURES_K8_REV_F_ECX (AMD_FEATURES_K8_REV_E_ECX | \ -+ __bit(X86_FEATURE_CX16)) -+#define AMD_FEATURES_K8_REV_F_EDX AMD_FEATURES_K8_REV_E_EDX -+#define AMD_EXTFEATURES_K8_REV_F_ECX (AMD_EXTFEATURES_K8_REV_E_ECX |\ -+ __bit(X86_FEATURE_SVME) | __bit(X86_FEATURE_EXTAPICSPACE) | \ -+ __bit(X86_FEATURE_ALTMOVCR)) -+#define AMD_EXTFEATURES_K8_REV_F_EDX (AMD_EXTFEATURES_K8_REV_E_EDX |\ -+ __bit(X86_FEATURE_RDTSCP)) -+ -+/* Family 0Fh, Revision G */ -+#define AMD_FEATURES_K8_REV_G_ECX AMD_FEATURES_K8_REV_F_ECX -+#define AMD_FEATURES_K8_REV_G_EDX AMD_FEATURES_K8_REV_F_EDX -+#define AMD_EXTFEATURES_K8_REV_G_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ -+ __bit(X86_FEATURE_3DNOWPF)) -+#define AMD_EXTFEATURES_K8_REV_G_EDX AMD_EXTFEATURES_K8_REV_F_EDX -+ -+/* Family 10h, Revision B */ -+#define AMD_FEATURES_FAM10h_REV_B_ECX (AMD_FEATURES_K8_REV_F_ECX | \ -+ __bit(X86_FEATURE_POPCNT) | __bit(X86_FEATURE_MWAIT)) -+#define AMD_FEATURES_FAM10h_REV_B_EDX AMD_FEATURES_K8_REV_F_EDX -+#define AMD_EXTFEATURES_FAM10h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ -+ __bit(X86_FEATURE_ABM) | __bit(X86_FEATURE_SSE4A) | \ -+ __bit(X86_FEATURE_MISALIGNSSE) | __bit(X86_FEATURE_OSVW) | \ -+ __bit(X86_FEATURE_IBS)) -+#define AMD_EXTFEATURES_FAM10h_REV_B_EDX (AMD_EXTFEATURES_K8_REV_F_EDX |\ -+ __bit(X86_FEATURE_PAGE1GB)) -+ -+/* Family 10h, Revision C */ -+#define AMD_FEATURES_FAM10h_REV_C_ECX AMD_FEATURES_FAM10h_REV_B_ECX -+#define AMD_FEATURES_FAM10h_REV_C_EDX AMD_FEATURES_FAM10h_REV_B_EDX -+#define AMD_EXTFEATURES_FAM10h_REV_C_ECX (AMD_EXTFEATURES_FAM10h_REV_B_ECX |\ -+ __bit(X86_FEATURE_SKINIT) | __bit(X86_FEATURE_WDT)) -+#define AMD_EXTFEATURES_FAM10h_REV_C_EDX AMD_EXTFEATURES_FAM10h_REV_B_EDX -+ -+/* Family 11h, Revision B */ -+#define AMD_FEATURES_FAM11h_REV_B_ECX AMD_FEATURES_K8_REV_G_ECX -+#define AMD_FEATURES_FAM11h_REV_B_EDX AMD_FEATURES_K8_REV_G_EDX -+#define AMD_EXTFEATURES_FAM11h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_G_ECX |\ -+ __bit(X86_FEATURE_SKINIT)) -+#define AMD_EXTFEATURES_FAM11h_REV_B_EDX AMD_EXTFEATURES_K8_REV_G_EDX -+ -+/* AMD errata checking -+ * -+ * Errata are defined using the AMD_LEGACY_ERRATUM() or AMD_OSVW_ERRATUM() -+ * macros. The latter is intended for newer errata that have an OSVW id -+ * assigned, which it takes as first argument. Both take a variable number -+ * of family-specific model-stepping ranges created by AMD_MODEL_RANGE(). -+ * -+ * Example 1: -+ * #define AMD_ERRATUM_319 \ -+ * AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0x4, 0x2), \ -+ * AMD_MODEL_RANGE(0x10, 0x8, 0x0, 0x8, 0x0), \ -+ * AMD_MODEL_RANGE(0x10, 0x9, 0x0, 0x9, 0x0)) -+ * Example 2: -+ * #define AMD_ERRATUM_400 \ -+ * AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf), \ -+ * AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf)) -+ */ -+ -+#define AMD_LEGACY_ERRATUM(...) 0 /* legacy */, __VA_ARGS__, 0 -+#define AMD_OSVW_ERRATUM(osvw_id, ...) 1 /* osvw */, osvw_id, __VA_ARGS__, 0 -+#define AMD_MODEL_RANGE(f, m_start, s_start, m_end, s_end) \ -+ ((f << 24) | (m_start << 16) | (s_start << 12) | (m_end << 4) | (s_end)) -+#define AMD_MODEL_RANGE_FAMILY(range) (((range) >> 24) & 0xff) -+#define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff) -+#define AMD_MODEL_RANGE_END(range) ((range) & 0xfff) -+ -+#define AMD_ERRATUM_170 \ -+ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf)) -+ -+#define AMD_ERRATUM_383 \ -+ AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf), \ -+ AMD_MODEL_RANGE(0x12, 0x0, 0x0, 0x1, 0x0)) -+ -+int cpu_has_amd_erratum(const struct cpuinfo_x86 *, int, ...); -+#endif /* __AMD_H__ */ ---- a/xen/include/asm-x86/msr-index.h -+++ b/xen/include/asm-x86/msr-index.h -@@ -251,6 +251,10 @@ - #define MSR_AMD_PATCHLEVEL 0x0000008b - #define MSR_AMD_PATCHLOADER 0xc0010020 - -+/* AMD OS Visible Workaround MSRs */ -+#define MSR_AMD_OSVW_ID_LENGTH 0xc0010140 -+#define MSR_AMD_OSVW_STATUS 0xc0010141 -+ - /* K6 MSRs */ - #define MSR_K6_EFER 0xc0000080 - #define MSR_K6_STAR 0xc0000081 diff --git a/21716-iommu-alloc.patch b/21716-iommu-alloc.patch deleted file mode 100644 index d396aa5..0000000 --- a/21716-iommu-alloc.patch +++ /dev/null @@ -1,211 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1279186958 -3600 -# Node ID 4ba86edf38f816a0d94cfb85b90074a72113e41c -# Parent 57859775f88f5339fa256e43ee2744be7226c093 -x2APIC/VT-d: allocate iommu when create a drhd - -A drhd is created when parse ACPI DMAR table, but drhd->iommu is not -allocated until iommu setup. But iommu is needed by x2APIC which will -enable interrupt remapping before iommu setup. This patch allocates -iommu when create drhd. And then drhd->ecap can be removed because -it's the same as iommu->ecap. - -Signed-off-by: Weidong Han -xen-unstable changeset: 21716:64a80813978f -xen-unstable date: Mon Jul 05 08:29:10 2010 +0100 - -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/dmar.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/dmar.c -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/dmar.c -@@ -32,6 +32,7 @@ - #include "dmar.h" - #include "iommu.h" - #include "extern.h" -+#include "vtd.h" - - #undef PREFIX - #define PREFIX VTDPREFIX "ACPI DMAR:" -@@ -378,7 +379,6 @@ acpi_parse_one_drhd(struct acpi_dmar_ent - struct acpi_table_drhd * drhd = (struct acpi_table_drhd *)header; - void *dev_scope_start, *dev_scope_end; - struct acpi_drhd_unit *dmaru; -- void *addr; - int ret; - static int include_all = 0; - -@@ -397,8 +397,9 @@ acpi_parse_one_drhd(struct acpi_dmar_ent - dprintk(VTDPREFIX, " dmaru->address = %"PRIx64"\n", - dmaru->address); - -- addr = map_to_nocache_virt(0, drhd->address); -- dmaru->ecap = dmar_readq(addr, DMAR_ECAP_REG); -+ ret = iommu_alloc(dmaru); -+ if ( ret ) -+ goto out; - - dev_scope_start = (void *)(drhd + 1); - dev_scope_end = ((void *)drhd) + header->length; -@@ -420,7 +421,7 @@ acpi_parse_one_drhd(struct acpi_dmar_ent - } - - if ( ret ) -- xfree(dmaru); -+ goto out; - else if ( force_iommu || dmaru->include_all ) - acpi_register_drhd_unit(dmaru); - else -@@ -451,14 +452,15 @@ acpi_parse_one_drhd(struct acpi_dmar_ent - - if ( invalid_cnt ) - { -- xfree(dmaru); -- - if ( iommu_workaround_bios_bug && - invalid_cnt == dmaru->scope.devices_cnt ) - { - dprintk(XENLOG_WARNING VTDPREFIX, - " Workaround BIOS bug: ignore the DRHD due to all " - "devices under its scope are not PCI discoverable!\n"); -+ -+ iommu_free(dmaru); -+ xfree(dmaru); - } - else - { -@@ -474,6 +476,12 @@ acpi_parse_one_drhd(struct acpi_dmar_ent - acpi_register_drhd_unit(dmaru); - } - -+out: -+ if ( ret ) -+ { -+ iommu_free(dmaru); -+ xfree(dmaru); -+ } - return ret; - } - -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/dmar.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/dmar.h -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/dmar.h -@@ -50,7 +50,6 @@ struct acpi_drhd_unit { - struct dmar_scope scope; /* must be first member of struct */ - struct list_head list; - u64 address; /* register base address of the unit */ -- u64 ecap; - u8 include_all:1; - struct iommu *iommu; - struct list_head ioapic_list; -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/intremap.c -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c -@@ -135,15 +135,20 @@ int iommu_supports_eim(void) - /* We MUST have a DRHD unit for each IOAPIC. */ - for ( apic = 0; apic < nr_ioapics; apic++ ) - if ( !ioapic_to_drhd(IO_APIC_ID(apic)) ) -+ { -+ dprintk(XENLOG_WARNING VTDPREFIX, -+ "There is not a DRHD for IOAPIC 0x%x (id: 0x%x)!\n", -+ apic, IO_APIC_ID(apic)); - return 0; -+ } - - if ( list_empty(&acpi_drhd_units) ) - return 0; - - for_each_drhd_unit ( drhd ) -- if ( !ecap_queued_inval(drhd->ecap) || -- !ecap_intr_remap(drhd->ecap) || -- !ecap_eim(drhd->ecap) ) -+ if ( !ecap_queued_inval(drhd->iommu->ecap) || -+ !ecap_intr_remap(drhd->iommu->ecap) || -+ !ecap_eim(drhd->iommu->ecap) ) - return 0; - - return 1; -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/iommu.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/iommu.c -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/iommu.c -@@ -143,15 +143,18 @@ struct iommu_flush *iommu_get_flush(stru - return iommu ? &iommu->intel->flush : NULL; - } - --static unsigned int clflush_size; - static int iommus_incoherent; - static void __iommu_flush_cache(void *addr, unsigned int size) - { - int i; -+ static unsigned int clflush_size = 0; - - if ( !iommus_incoherent ) - return; - -+ if ( clflush_size == 0 ) -+ clflush_size = get_cache_line_size(); -+ - for ( i = 0; i < size; i += clflush_size ) - cacheline_flush((char *)addr + i); - } -@@ -1036,7 +1039,7 @@ static int iommu_set_interrupt(struct io - return irq; - } - --static int iommu_alloc(struct acpi_drhd_unit *drhd) -+int __init iommu_alloc(struct acpi_drhd_unit *drhd) - { - struct iommu *iommu; - unsigned long sagaw, nr_dom; -@@ -1130,7 +1133,7 @@ static int iommu_alloc(struct acpi_drhd_ - return 0; - } - --static void iommu_free(struct acpi_drhd_unit *drhd) -+void __init iommu_free(struct acpi_drhd_unit *drhd) - { - struct iommu *iommu = drhd->iommu; - -@@ -1938,8 +1941,6 @@ int intel_vtd_setup(void) - - platform_quirks(); - -- clflush_size = get_cache_line_size(); -- - irq_to_iommu = xmalloc_array(struct iommu*, nr_irqs); - BUG_ON(!irq_to_iommu); - memset(irq_to_iommu, 0, nr_irqs * sizeof(struct iommu*)); -@@ -1953,9 +1954,6 @@ int intel_vtd_setup(void) - */ - for_each_drhd_unit ( drhd ) - { -- if ( iommu_alloc(drhd) != 0 ) -- goto error; -- - iommu = drhd->iommu; - - if ( iommu_snoop && !ecap_snp_ctl(iommu->ecap) ) -@@ -1995,8 +1993,6 @@ int intel_vtd_setup(void) - return 0; - - error: -- for_each_drhd_unit ( drhd ) -- iommu_free(drhd); - iommu_enabled = 0; - iommu_snoop = 0; - iommu_passthrough = 0; -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/vtd.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/vtd.h -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/vtd.h -@@ -108,4 +108,7 @@ void unmap_vtd_domain_page(void *va); - void iommu_flush_cache_entry(void *addr, unsigned int size); - void iommu_flush_cache_page(void *addr, unsigned long npages); - -+int iommu_alloc(struct acpi_drhd_unit *drhd); -+void iommu_free(struct acpi_drhd_unit *drhd); -+ - #endif // _VTD_H_ diff --git a/21717-ir-qi.patch b/21717-ir-qi.patch deleted file mode 100644 index 6afa561..0000000 --- a/21717-ir-qi.patch +++ /dev/null @@ -1,200 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1279186999 -3600 -# Node ID a35e5f33a72eee3d00cec6972bb93585609559e2 -# Parent 4ba86edf38f816a0d94cfb85b90074a72113e41c -x2APIC/VT-d: improve interrupt remapping and queued invalidation enabling and disabling - -x2APIC depends on interrupt remapping, so interrupt remapping needs to -be enabled before x2APIC. Usually x2APIC is not enabled -(x2apic_enabled=0) when enable interrupt remapping, although x2APIC -will be enabled later. So it needs to pass a parameter to set -interrupt mode in intremap_enable, instead of checking -x2apic_enable. This patch adds a parameter "eim" to intremap_enable to -achieve it. Interrupt remapping and queued invalidation are already -enabled when enable x2apic, so it needn't to enable them again when -setup iommu. This patch checks if interrupt remapping and queued -invalidation are already enable or not, and won't enable them if -already enabled. It does the similar in disabling, that's to say don't -disable them if already disabled. - -Signed-off-by: Weidong Han -xen-unstable changeset: 21717:176956d1d2fd -xen-unstable date: Mon Jul 05 08:30:25 2010 +0100 - -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/extern.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/extern.h -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/extern.h -@@ -33,7 +33,7 @@ extern struct keyhandler dump_iommu_info - - int enable_qinval(struct iommu *iommu); - void disable_qinval(struct iommu *iommu); --int enable_intremap(struct iommu *iommu); -+int enable_intremap(struct iommu *iommu, int eim); - void disable_intremap(struct iommu *iommu); - int queue_invalidate_context(struct iommu *iommu, - u16 did, u16 source_id, u8 function_mask, u8 granu); -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/intremap.c -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c -@@ -709,7 +709,7 @@ void msi_msg_write_remap_rte( - } - #endif - --int enable_intremap(struct iommu *iommu) -+int enable_intremap(struct iommu *iommu, int eim) - { - struct acpi_drhd_unit *drhd; - struct ir_ctrl *ir_ctrl; -@@ -719,10 +719,25 @@ int enable_intremap(struct iommu *iommu) - ASSERT(ecap_intr_remap(iommu->ecap) && iommu_intremap); - - ir_ctrl = iommu_ir_ctrl(iommu); -+ sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); -+ -+ /* Return if already enabled by Xen */ -+ if ( (sts & DMA_GSTS_IRES) && ir_ctrl->iremap_maddr ) -+ return 0; -+ -+ sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); -+ if ( !(sts & DMA_GSTS_QIES) ) -+ { -+ dprintk(XENLOG_ERR VTDPREFIX, -+ "Queued invalidation is not enabled, should not enable " -+ "interrupt remapping\n"); -+ return -EINVAL; -+ } -+ - if ( ir_ctrl->iremap_maddr == 0 ) - { - drhd = iommu_to_drhd(iommu); -- ir_ctrl->iremap_maddr = alloc_pgtable_maddr(drhd, IREMAP_ARCH_PAGE_NR ); -+ ir_ctrl->iremap_maddr = alloc_pgtable_maddr(drhd, IREMAP_ARCH_PAGE_NR); - if ( ir_ctrl->iremap_maddr == 0 ) - { - dprintk(XENLOG_WARNING VTDPREFIX, -@@ -735,7 +750,7 @@ int enable_intremap(struct iommu *iommu) - #ifdef CONFIG_X86 - /* set extended interrupt mode bit */ - ir_ctrl->iremap_maddr |= -- x2apic_enabled ? (1 << IRTA_REG_EIME_SHIFT) : 0; -+ eim ? (1 << IRTA_REG_EIME_SHIFT) : 0; - #endif - spin_lock_irqsave(&iommu->register_lock, flags); - -@@ -772,13 +787,18 @@ void disable_intremap(struct iommu *iomm - u32 sts; - unsigned long flags; - -- ASSERT(ecap_intr_remap(iommu->ecap) && iommu_intremap); -+ if ( !ecap_intr_remap(iommu->ecap) ) -+ return; - - spin_lock_irqsave(&iommu->register_lock, flags); - sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); -+ if ( !(sts & DMA_GSTS_IRES) ) -+ goto out; -+ - dmar_writel(iommu->reg, DMAR_GCMD_REG, sts & (~DMA_GCMD_IRE)); - - IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, dmar_readl, - !(sts & DMA_GSTS_IRES), sts); -+out: - spin_unlock_irqrestore(&iommu->register_lock, flags); - } -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/iommu.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/iommu.c -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/iommu.c -@@ -1829,24 +1829,20 @@ static int init_vtd_hw(void) - spin_lock_irqsave(&iommu->register_lock, flags); - dmar_writel(iommu->reg, DMAR_FECTL_REG, 0); - spin_unlock_irqrestore(&iommu->register_lock, flags); -- -- /* initialize flush functions */ -- flush = iommu_get_flush(iommu); -- flush->context = flush_context_reg; -- flush->iotlb = flush_iotlb_reg; - } - -- if ( iommu_qinval ) -+ for_each_drhd_unit ( drhd ) - { -- for_each_drhd_unit ( drhd ) -+ iommu = drhd->iommu; -+ /* -+ * If queued invalidation not enabled, use regiser based -+ * invalidation -+ */ -+ if ( enable_qinval(iommu) != 0 ) - { -- iommu = drhd->iommu; -- if ( enable_qinval(iommu) != 0 ) -- { -- dprintk(XENLOG_INFO VTDPREFIX, -- "Failed to enable Queued Invalidation!\n"); -- break; -- } -+ flush = iommu_get_flush(iommu); -+ flush->context = flush_context_reg; -+ flush->iotlb = flush_iotlb_reg; - } - } - -@@ -1872,9 +1868,9 @@ static int init_vtd_hw(void) - for_each_drhd_unit ( drhd ) - { - iommu = drhd->iommu; -- if ( enable_intremap(iommu) != 0 ) -+ if ( enable_intremap(iommu, 0) != 0 ) - { -- dprintk(XENLOG_INFO VTDPREFIX, -+ dprintk(XENLOG_WARNING VTDPREFIX, - "Failed to enable Interrupt Remapping!\n"); - break; - } -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/qinval.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/qinval.c -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/qinval.c -@@ -437,10 +437,16 @@ int enable_qinval(struct iommu *iommu) - u32 sts; - unsigned long flags; - -+ if ( !ecap_queued_inval(iommu->ecap) || !iommu_qinval ) -+ return -ENOENT; -+ - qi_ctrl = iommu_qi_ctrl(iommu); - flush = iommu_get_flush(iommu); - -- ASSERT(ecap_queued_inval(iommu->ecap) && iommu_qinval); -+ /* Return if already enabled by Xen */ -+ sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); -+ if ( (sts & DMA_GSTS_QIES) && qi_ctrl->qinval_maddr ) -+ return 0; - - if ( qi_ctrl->qinval_maddr == 0 ) - { -@@ -488,14 +494,19 @@ void disable_qinval(struct iommu *iommu) - u32 sts; - unsigned long flags; - -- ASSERT(ecap_queued_inval(iommu->ecap) && iommu_qinval); -+ if ( !ecap_queued_inval(iommu->ecap) ) -+ return; - - spin_lock_irqsave(&iommu->register_lock, flags); - sts = dmar_readl(iommu->reg, DMAR_GSTS_REG); -+ if ( !(sts & DMA_GSTS_QIES) ) -+ goto out; -+ - dmar_writel(iommu->reg, DMAR_GCMD_REG, sts & (~DMA_GCMD_QIE)); - - /* Make sure hardware complete it */ - IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, dmar_readl, - !(sts & DMA_GSTS_QIES), sts); -+out: - spin_unlock_irqrestore(&iommu->register_lock, flags); - } diff --git a/21718-x2apic-logic.patch b/21718-x2apic-logic.patch deleted file mode 100644 index c7a44c5..0000000 --- a/21718-x2apic-logic.patch +++ /dev/null @@ -1,672 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1279187030 -3600 -# Node ID d5727c760ff074177ce1d9e7c36dbbe2c1f4f37f -# Parent a35e5f33a72eee3d00cec6972bb93585609559e2 -x2APIC: improve enabling logic - -This patch masks PIC and IOAPIC RTE's before x2APIC enabling, unmask -and restore them after x2APIC enabling. It also really enables -interrupt remapping before x2APIC enabling instead of just checking -interrupt remapping setting. This patch also handles all x2APIC -configuration including BIOS settings and command line -settings. Especially, it handles that BIOS hands over in x2APIC mode -(when there is apic id > 255). It checks if x2APIC is already enabled -by BIOS. If already enabled, it will disable interrupt remapping and -queued invalidation first, then enable them again. - -Signed-off-by: Weidong Han -xen-unstable changeset: 21718:34f612ed4184 -xen-unstable date: Mon Jul 05 08:31:29 2010 +0100 - -Index: xen-4.0.0-testing/xen/arch/x86/apic.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/apic.c -+++ xen-4.0.0-testing/xen/arch/x86/apic.c -@@ -70,6 +70,9 @@ int apic_verbosity; - int x2apic_enabled __read_mostly = 0; - int directed_eoi_enabled __read_mostly = 0; - -+/* x2APIC is enabled in BIOS */ -+static int x2apic_preenabled; -+ - /* - * The following vectors are part of the Linux architecture, there - * is no hardware IRQ pin equivalent for them, they are triggered -@@ -493,6 +496,47 @@ static void apic_pm_activate(void) - apic_pm_state.active = 1; - } - -+static void resume_x2apic(void) -+{ -+ uint64_t msr_content; -+ struct IO_APIC_route_entry **ioapic_entries = NULL; -+ -+ ASSERT(x2apic_enabled); -+ -+ ioapic_entries = alloc_ioapic_entries(); -+ if ( !ioapic_entries ) -+ { -+ printk("Allocate ioapic_entries failed\n"); -+ goto out; -+ } -+ -+ if ( save_IO_APIC_setup(ioapic_entries) ) -+ { -+ printk("Saving IO-APIC state failed\n"); -+ goto out; -+ } -+ -+ mask_8259A(); -+ mask_IO_APIC_setup(ioapic_entries); -+ -+ iommu_enable_IR(); -+ -+ rdmsrl(MSR_IA32_APICBASE, msr_content); -+ if ( !(msr_content & MSR_IA32_APICBASE_EXTD) ) -+ { -+ msr_content |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD; -+ msr_content = (uint32_t)msr_content; -+ wrmsrl(MSR_IA32_APICBASE, msr_content); -+ } -+ -+ restore_IO_APIC_setup(ioapic_entries); -+ unmask_8259A(); -+ -+out: -+ if ( ioapic_entries ) -+ free_ioapic_entries(ioapic_entries); -+} -+ - void __devinit setup_local_APIC(void) - { - unsigned long oldvalue, value, ver, maxlvt; -@@ -731,7 +775,7 @@ int lapic_resume(void) - wrmsr(MSR_IA32_APICBASE, l, h); - } - else -- enable_x2apic(); -+ resume_x2apic(); - - apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED); - apic_write(APIC_ID, apic_pm_state.apic_id); -@@ -895,45 +939,152 @@ no_apic: - return -1; - } - --void enable_x2apic(void) -+void check_x2apic_preenabled(void) - { - u32 lo, hi; - -- if ( smp_processor_id() == 0 ) -+ if ( !x2apic_is_available() ) -+ return; -+ -+ rdmsr(MSR_IA32_APICBASE, lo, hi); -+ if ( lo & MSR_IA32_APICBASE_EXTD ) - { -- if ( !iommu_supports_eim() ) -+ printk("x2APIC mode is already enabled by BIOS.\n"); -+ x2apic_preenabled = 1; -+ x2apic_enabled = 1; -+ } -+} -+ -+static void enable_bsp_x2apic(void) -+{ -+ struct IO_APIC_route_entry **ioapic_entries = NULL; -+ const struct genapic *x2apic_genapic = NULL; -+ -+ ASSERT(smp_processor_id() == 0); -+ -+ if ( x2apic_preenabled ) -+ { -+ /* -+ * Interrupt remapping should be also enabled by BIOS when -+ * x2APIC is already enabled by BIOS, otherwise it's a BIOS -+ * bug -+ */ -+ if ( !intremap_enabled() ) -+ panic("Interrupt remapping is not enabled by BIOS while " -+ "x2APIC is already enabled by BIOS!\n"); -+ } -+ -+ x2apic_genapic = apic_x2apic_probe(); -+ if ( x2apic_genapic ) -+ genapic = x2apic_genapic; -+ else -+ { -+ if ( x2apic_cmdline_disable() ) - { -- printk("x2APIC would not be enabled without EIM.\n"); -- return; -+ if ( x2apic_preenabled ) -+ { -+ /* Ignore x2apic=0, and set default x2apic mode */ -+ genapic = &apic_x2apic_cluster; -+ printk("x2APIC: already enabled by BIOS, ignore x2apic=0.\n"); -+ } -+ else -+ { -+ printk("Not enable x2APIC due to x2apic=0 is set.\n"); -+ return; -+ } - } -- -- if ( apic_x2apic_phys.probe() ) -- genapic = &apic_x2apic_phys; -- else if ( apic_x2apic_cluster.probe() ) -- genapic = &apic_x2apic_cluster; - else - { -- printk("x2APIC would not be enabled due to x2apic=off.\n"); -- return; -+ if ( !iommu_enabled || !iommu_intremap || !iommu_qinval ) -+ panic("Cannot enable x2APIC due to iommu or interrupt " -+ "remapping or queued invalidation is disabled " -+ "by command line!\n"); -+ else -+ { -+ if ( x2apic_preenabled ) -+ panic("x2APIC: already enabled by BIOS, but " -+ "iommu_supports_eim fails\n"); -+ else -+ { -+ printk("Not enable x2APIC due to " -+ "iommu_supports_eim fails!\n"); -+ return; -+ } -+ } - } -+ } - -- x2apic_enabled = 1; -- printk("Switched to APIC driver %s.\n", genapic->name); -+ ioapic_entries = alloc_ioapic_entries(); -+ if ( !ioapic_entries ) -+ { -+ printk("Allocate ioapic_entries failed\n"); -+ goto out; - } -- else -+ -+ if ( save_IO_APIC_setup(ioapic_entries) ) - { -- BUG_ON(!x2apic_enabled); /* APs only enable x2apic when BSP did so. */ -+ printk("Saving IO-APIC state failed\n"); -+ goto out; - } - -+ mask_8259A(); -+ mask_IO_APIC_setup(ioapic_entries); -+ -+ if ( iommu_enable_IR() ) -+ { -+ printk("Would not enable x2APIC due to interrupt remapping " -+ "cannot be enabled.\n"); -+ goto restore_out; -+ } -+ -+ x2apic_enabled = 1; -+ printk("Switched to APIC driver %s.\n", genapic->name); -+ -+ if ( !x2apic_preenabled ) -+ { -+ u32 lo, hi; -+ -+ rdmsr(MSR_IA32_APICBASE, lo, hi); -+ if ( !(lo & MSR_IA32_APICBASE_EXTD) ) -+ { -+ lo |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD; -+ wrmsr(MSR_IA32_APICBASE, lo, 0); -+ printk("x2APIC mode enabled.\n"); -+ } -+ } -+ -+restore_out: -+ restore_IO_APIC_setup(ioapic_entries); -+ unmask_8259A(); -+ -+out: -+ if ( ioapic_entries ) -+ free_ioapic_entries(ioapic_entries); -+} -+ -+static void enable_ap_x2apic(void) -+{ -+ u32 lo, hi; -+ -+ ASSERT(smp_processor_id() != 0); -+ -+ /* APs only enable x2apic when BSP did so. */ -+ BUG_ON(!x2apic_enabled); -+ - rdmsr(MSR_IA32_APICBASE, lo, hi); - if ( !(lo & MSR_IA32_APICBASE_EXTD) ) - { - lo |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD; - wrmsr(MSR_IA32_APICBASE, lo, 0); -- printk("x2APIC mode enabled.\n"); - } -+} -+ -+void enable_x2apic(void) -+{ -+ if ( smp_processor_id() == 0 ) -+ enable_bsp_x2apic(); - else -- printk("x2APIC mode enabled by BIOS.\n"); -+ enable_ap_x2apic(); - } - - void __init init_apic_mappings(void) -Index: xen-4.0.0-testing/xen/arch/x86/genapic/x2apic.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/genapic/x2apic.c -+++ xen-4.0.0-testing/xen/arch/x86/genapic/x2apic.c -@@ -29,6 +29,11 @@ boolean_param("x2apic", x2apic); - static int x2apic_phys; /* By default we use logical cluster mode. */ - boolean_param("x2apic_phys", x2apic_phys); - -+int x2apic_cmdline_disable(void) -+{ -+ return (x2apic == 0); -+} -+ - static int probe_x2apic_phys(void) - { - return x2apic && x2apic_phys && x2apic_is_available() && -@@ -51,6 +56,20 @@ const struct genapic apic_x2apic_cluster - GENAPIC_X2APIC_CLUSTER - }; - -+const struct genapic *apic_x2apic_probe(void) -+{ -+ if ( !x2apic || !x2apic_is_available() ) -+ return NULL; -+ -+ if ( !iommu_supports_eim() ) -+ return NULL; -+ -+ if ( x2apic_phys ) -+ return &apic_x2apic_phys; -+ else -+ return &apic_x2apic_cluster; -+} -+ - void init_apic_ldr_x2apic_phys(void) - { - return; -Index: xen-4.0.0-testing/xen/arch/x86/i8259.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/i8259.c -+++ xen-4.0.0-testing/xen/arch/x86/i8259.c -@@ -175,6 +175,26 @@ int i8259A_irq_pending(unsigned int irq) - return ret; - } - -+void mask_8259A(void) -+{ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&i8259A_lock, flags); -+ outb(0xff, 0xA1); -+ outb(0xff, 0x21); -+ spin_unlock_irqrestore(&i8259A_lock, flags); -+} -+ -+void unmask_8259A(void) -+{ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&i8259A_lock, flags); -+ outb(cached_A1, 0xA1); -+ outb(cached_21, 0x21); -+ spin_unlock_irqrestore(&i8259A_lock, flags); -+} -+ - /* - * This function assumes to be called rarely. Switching between - * 8259A registers is slow. -Index: xen-4.0.0-testing/xen/arch/x86/io_apic.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/io_apic.c -+++ xen-4.0.0-testing/xen/arch/x86/io_apic.c -@@ -136,6 +136,126 @@ static void __init replace_pin_at_irq(un - } - } - -+struct IO_APIC_route_entry **alloc_ioapic_entries(void) -+{ -+ int apic; -+ struct IO_APIC_route_entry **ioapic_entries; -+ -+ ioapic_entries = xmalloc_array(struct IO_APIC_route_entry *, nr_ioapics); -+ if (!ioapic_entries) -+ return 0; -+ -+ for (apic = 0; apic < nr_ioapics; apic++) { -+ ioapic_entries[apic] = -+ xmalloc_array(struct IO_APIC_route_entry, -+ nr_ioapic_registers[apic]); -+ if (!ioapic_entries[apic]) -+ goto nomem; -+ } -+ -+ return ioapic_entries; -+ -+nomem: -+ while (--apic >= 0) -+ xfree(ioapic_entries[apic]); -+ xfree(ioapic_entries); -+ -+ return 0; -+} -+ -+/* -+ * Saves all the IO-APIC RTE's -+ */ -+int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries) -+{ -+ int apic, pin; -+ -+ if (!ioapic_entries) -+ return -ENOMEM; -+ -+ for (apic = 0; apic < nr_ioapics; apic++) { -+ if (!ioapic_entries[apic]) -+ return -ENOMEM; -+ -+ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { -+ *(((int *)&ioapic_entries[apic][pin])+0) = -+ __io_apic_read(apic, 0x10+pin*2); -+ *(((int *)&ioapic_entries[apic][pin])+1) = -+ __io_apic_read(apic, 0x11+pin*2); -+ } -+ } -+ -+ return 0; -+} -+ -+/* -+ * Mask all IO APIC entries. -+ */ -+void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries) -+{ -+ int apic, pin; -+ -+ if (!ioapic_entries) -+ return; -+ -+ for (apic = 0; apic < nr_ioapics; apic++) { -+ if (!ioapic_entries[apic]) -+ break; -+ -+ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { -+ struct IO_APIC_route_entry entry; -+ unsigned long flags; -+ -+ entry = ioapic_entries[apic][pin]; -+ if (!entry.mask) { -+ entry.mask = 1; -+ -+ spin_lock_irqsave(&ioapic_lock, flags); -+ __io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1)); -+ __io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0)); -+ spin_unlock_irqrestore(&ioapic_lock, flags); -+ } -+ } -+ } -+} -+ -+/* -+ * Restore IO APIC entries which was saved in ioapic_entries. -+ */ -+int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries) -+{ -+ int apic, pin; -+ unsigned long flags; -+ struct IO_APIC_route_entry entry; -+ -+ if (!ioapic_entries) -+ return -ENOMEM; -+ -+ for (apic = 0; apic < nr_ioapics; apic++) { -+ if (!ioapic_entries[apic]) -+ return -ENOMEM; -+ -+ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) -+ entry = ioapic_entries[apic][pin]; -+ spin_lock_irqsave(&ioapic_lock, flags); -+ __io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1)); -+ __io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0)); -+ spin_unlock_irqrestore(&ioapic_lock, flags); -+ } -+ -+ return 0; -+} -+ -+void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries) -+{ -+ int apic; -+ -+ for (apic = 0; apic < nr_ioapics; apic++) -+ xfree(ioapic_entries[apic]); -+ -+ xfree(ioapic_entries); -+} -+ - static void __modify_IO_APIC_irq (unsigned int irq, unsigned long enable, unsigned long disable) - { - struct irq_pin_list *entry = irq_2_pin + irq; -Index: xen-4.0.0-testing/xen/arch/x86/setup.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/setup.c -+++ xen-4.0.0-testing/xen/arch/x86/setup.c -@@ -981,6 +981,9 @@ void __init __start_xen(unsigned long mb - - tboot_probe(); - -+ /* Check if x2APIC is already enabled in BIOS */ -+ check_x2apic_preenabled(); -+ - /* Unmap the first page of CPU0's stack. */ - memguard_guard_stack(cpu0_stack); - -@@ -999,9 +1002,6 @@ void __init __start_xen(unsigned long mb - - acpi_boot_init(); - -- if ( x2apic_is_available() ) -- enable_x2apic(); -- - init_cpu_to_node(); - - if ( smp_found_config ) -@@ -1014,6 +1014,9 @@ void __init __start_xen(unsigned long mb - - init_apic_mappings(); - -+ if ( x2apic_is_available() ) -+ enable_x2apic(); -+ - percpu_free_unused_areas(); - - init_IRQ(); -Index: xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/drivers/passthrough/vtd/intremap.c -+++ xen-4.0.0-testing/xen/drivers/passthrough/vtd/intremap.c -@@ -132,6 +132,12 @@ int iommu_supports_eim(void) - if ( !iommu_enabled || !iommu_qinval || !iommu_intremap ) - return 0; - -+ if ( list_empty(&acpi_drhd_units) ) -+ { -+ dprintk(XENLOG_WARNING VTDPREFIX, "VT-d is not supported\n"); -+ return 0; -+ } -+ - /* We MUST have a DRHD unit for each IOAPIC. */ - for ( apic = 0; apic < nr_ioapics; apic++ ) - if ( !ioapic_to_drhd(IO_APIC_ID(apic)) ) -@@ -142,9 +148,6 @@ int iommu_supports_eim(void) - return 0; - } - -- if ( list_empty(&acpi_drhd_units) ) -- return 0; -- - for_each_drhd_unit ( drhd ) - if ( !ecap_queued_inval(drhd->iommu->ecap) || - !ecap_intr_remap(drhd->iommu->ecap) || -@@ -802,3 +805,80 @@ void disable_intremap(struct iommu *iomm - out: - spin_unlock_irqrestore(&iommu->register_lock, flags); - } -+ -+/* -+ * This function is used to enable Interrutp remapping when -+ * enable x2apic -+ */ -+int iommu_enable_IR(void) -+{ -+ struct acpi_drhd_unit *drhd; -+ struct iommu *iommu; -+ -+ if ( !iommu_supports_eim() ) -+ return -1; -+ -+ for_each_drhd_unit ( drhd ) -+ { -+ struct qi_ctrl *qi_ctrl = NULL; -+ -+ iommu = drhd->iommu; -+ qi_ctrl = iommu_qi_ctrl(iommu); -+ -+ /* Clear previous faults */ -+ clear_fault_bits(iommu); -+ -+ /* -+ * Disable interrupt remapping and queued invalidation if -+ * already enabled by BIOS -+ */ -+ disable_intremap(iommu); -+ disable_qinval(iommu); -+ } -+ -+ /* Enable queue invalidation */ -+ for_each_drhd_unit ( drhd ) -+ { -+ iommu = drhd->iommu; -+ if ( enable_qinval(iommu) != 0 ) -+ { -+ dprintk(XENLOG_INFO VTDPREFIX, -+ "Failed to enable Queued Invalidation!\n"); -+ return -1; -+ } -+ } -+ -+ /* Enable interrupt remapping */ -+ for_each_drhd_unit ( drhd ) -+ { -+ iommu = drhd->iommu; -+ if ( enable_intremap(iommu, 1) ) -+ { -+ dprintk(XENLOG_INFO VTDPREFIX, -+ "Failed to enable Interrupt Remapping!\n"); -+ return -1; -+ } -+ } -+ -+ return 0; -+} -+ -+/* -+ * Check if interrupt remapping is enabled or not -+ * return 1: enabled -+ * return 0: not enabled -+ */ -+int intremap_enabled(void) -+{ -+ struct acpi_drhd_unit *drhd; -+ u32 sts; -+ -+ for_each_drhd_unit ( drhd ) -+ { -+ sts = dmar_readl(drhd->iommu->reg, DMAR_GSTS_REG); -+ if ( !(sts & DMA_GSTS_IRES) ) -+ return 0; -+ } -+ -+ return 1; -+} -Index: xen-4.0.0-testing/xen/include/asm-x86/apic.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/apic.h -+++ xen-4.0.0-testing/xen/include/asm-x86/apic.h -@@ -25,6 +25,8 @@ extern int apic_verbosity; - extern int x2apic_enabled; - extern int directed_eoi_enabled; - -+extern void check_x2apic_preenabled(void); -+extern int x2apic_cmdline_disable(void); - extern void enable_x2apic(void); - - static __inline int x2apic_is_available(void) -Index: xen-4.0.0-testing/xen/include/asm-x86/genapic.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/genapic.h -+++ xen-4.0.0-testing/xen/include/asm-x86/genapic.h -@@ -70,6 +70,7 @@ cpumask_t vector_allocation_domain_flat( - .send_IPI_mask = send_IPI_mask_flat, \ - .send_IPI_self = send_IPI_self_flat - -+const struct genapic *apic_x2apic_probe(void); - void init_apic_ldr_x2apic_phys(void); - void init_apic_ldr_x2apic_cluster(void); - void clustered_apic_check_x2apic(void); -Index: xen-4.0.0-testing/xen/include/asm-x86/io_apic.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/io_apic.h -+++ xen-4.0.0-testing/xen/include/asm-x86/io_apic.h -@@ -199,6 +199,12 @@ extern int (*ioapic_renumber_irq)(int io - extern void ioapic_suspend(void); - extern void ioapic_resume(void); - -+extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); -+extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); -+extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); -+extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); -+extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); -+ - #else /* !CONFIG_X86_IO_APIC */ - static inline void init_ioapic_mappings(void) {} - static inline void ioapic_suspend(void) {} -Index: xen-4.0.0-testing/xen/include/asm-x86/irq.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/irq.h -+++ xen-4.0.0-testing/xen/include/asm-x86/irq.h -@@ -91,6 +91,8 @@ asmlinkage void do_IRQ(struct cpu_user_r - void disable_8259A_irq(unsigned int irq); - void enable_8259A_irq(unsigned int irq); - int i8259A_irq_pending(unsigned int irq); -+void mask_8259A(void); -+void unmask_8259A(void); - void init_8259A(int aeoi); - int i8259A_suspend(void); - int i8259A_resume(void); -Index: xen-4.0.0-testing/xen/include/xen/iommu.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/xen/iommu.h -+++ xen-4.0.0-testing/xen/include/xen/iommu.h -@@ -58,6 +58,8 @@ struct iommu { - - int iommu_setup(void); - int iommu_supports_eim(void); -+int iommu_enable_IR(void); -+int intremap_enabled(void); - - int iommu_add_device(struct pci_dev *pdev); - int iommu_remove_device(struct pci_dev *pdev); diff --git a/21723-get-domu-state.patch b/21723-get-domu-state.patch index 922e954..df79dac 100644 --- a/21723-get-domu-state.patch +++ b/21723-get-domu-state.patch @@ -16,10 +16,10 @@ VM" or " API" Signed-off-by James (Song Wei) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py @@ -250,6 +250,18 @@ class XendDomain: @return: path to config file. """ @@ -39,10 +39,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py def _managed_check_point_path(self, domuuid): """Returns absolute path to check point file for managed domain. -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -327,6 +327,8 @@ class XendDomainInfo: @type info: dictionary @ivar domid: Domain ID (if VM has started) @@ -60,10 +60,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py maxmem = self.info.get('memory_static_max', 0) memory = self.info.get('memory_dynamic_max', 0) -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py @@ -225,6 +225,20 @@ class SrvDomain(SrvDir): self.acceptCommand(req) return self.xd.domain_reset(self.dom.getName()) @@ -85,10 +85,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py def op_usb_add(self, op, req): self.acceptCommand(req) return req.threadRequest(self.do_usb_add, op, req) -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py @@ -165,6 +165,8 @@ SUBCOMMAND_HELP = { #usb 'usb-add' : (' <[host:bus.addr] [host:vendor_id:product_id]>','Add the usb device to FV VM.'), @@ -144,7 +144,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py def xm_dump_core(args): live = False -@@ -1515,6 +1522,32 @@ def xm_usb_add(args): +@@ -1517,6 +1524,32 @@ def xm_usb_add(args): arg_check(args, "usb-add", 2) server.xend.domain.usb_add(args[0],args[1]) @@ -177,7 +177,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py def xm_usb_del(args): arg_check(args, "usb-del", 2) server.xend.domain.usb_del(args[0],args[1]) -@@ -3538,6 +3571,8 @@ commands = { +@@ -3542,6 +3575,8 @@ commands = { #usb "usb-add": xm_usb_add, "usb-del": xm_usb_del, diff --git a/21744-x86-cpufreq-range-check.patch b/21744-x86-cpufreq-range-check.patch deleted file mode 100644 index 5d5a65f..0000000 --- a/21744-x86-cpufreq-range-check.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278578686 -3600 -# Node ID df63728e1680ce7827bd58f6bda453f70ed41ad9 -# Parent a0f0ae5be814f19590d5a59d91ab7183cd1a325f -x86/cpufreq: check array index before use - -... rather than after. - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/acpi/cpufreq/cpufreq.c -+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c -@@ -210,9 +210,11 @@ - - if (!cpu_isset(cpu, mask)) - cpu = first_cpu(mask); -+ if (cpu >= NR_CPUS) -+ return 0; -+ - policy = cpufreq_cpu_policy[cpu]; -- -- if (cpu >= NR_CPUS || !policy || !drv_data[policy->cpu]) -+ if (!policy || !drv_data[policy->cpu]) - return 0; - - switch (drv_data[policy->cpu]->cpu_feature) { diff --git a/21757-x86-mce-avoid-BUG_ON.patch b/21757-x86-mce-avoid-BUG_ON.patch deleted file mode 100644 index dc3e8bf..0000000 --- a/21757-x86-mce-avoid-BUG_ON.patch +++ /dev/null @@ -1,38 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278674491 -3600 -# Node ID 50cf787b70eb74adfe501a2484a0dffe7d15e567 -# Parent a7a680442b738928eb963b31e22a3e428ac111a0 -mce: Replace BUG() with a console warning in the MCE handler. - -If the hardware reports corrected errors that we didn't see through -the status MSRs, complain on the console but don't BUG() the machine. - -Signed-off-by: Tim Deegan - ---- a/xen/arch/x86/cpu/mcheck/amd_nonfatal.c -+++ b/xen/arch/x86/cpu/mcheck/amd_nonfatal.c -@@ -152,14 +152,19 @@ static void mce_amd_work_fn(void *data) - - /* HW does not count *all* kinds of correctable errors. - * Thus it is possible, that the polling routine finds an -- * correctable error even if the HW reports nothing. -- * However, the other way around is not possible (= BUG). -- */ -+ * correctable error even if the HW reports nothing. */ - if (counter > 0) { - /* HW reported correctable errors, - * the polling routine did not find... - */ -- BUG_ON(adjust == 0); -+ if (adjust == 0) { -+ printk("CPU counter reports %"PRIu32 -+ " correctable hardware error%s that %s" -+ " not reported by the status MSRs\n", -+ counter, -+ (counter == 1 ? "" : "s"), -+ (counter == 1 ? "was" : "were")); -+ } - /* subtract 1 to not double count the error - * from the polling service routine */ - adjust += (counter - 1); diff --git a/21847-pscsi.patch b/21847-pscsi.patch index f7d9df6..3ee6164 100644 --- a/21847-pscsi.patch +++ b/21847-pscsi.patch @@ -37,10 +37,10 @@ Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com Comment from Masaki Kanno : "Well done" Committed-by: Ian Jackson -Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +Index: xen-4.0.1-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.0-testing/tools/examples/xend-config.sxp +--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.1-testing/tools/examples/xend-config.sxp @@ -277,3 +277,11 @@ # we have to realize this may incur security issue and we can't make sure the # device assignment could really work properly even after we do this. @@ -50,13 +50,13 @@ Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +# because xend scans all the device paths to build its internal PSCSI device +# list. If we need only a few devices for assigning to a guest, we can reduce +# the scan to this device. Set list list of device paths in same syntax like in -+# command lsscsi, e.g. ('16:0:0:0' '15:0') ++# command lsscsi, e.g. ('16:0:0:0' '15:0') +# (pscsi-device-mask ('*')) + -Index: xen-4.0.0-testing/tools/python/xen/util/vscsi_util.py +Index: xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/util/vscsi_util.py -+++ xen-4.0.0-testing/tools/python/xen/util/vscsi_util.py +--- xen-4.0.1-testing.orig/tools/python/xen/util/vscsi_util.py ++++ xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py @@ -148,11 +148,12 @@ def _vscsi_get_scsidevices_by_sysfs(): return devices @@ -85,10 +85,10 @@ Index: xen-4.0.0-testing/tools/python/xen/util/vscsi_util.py scsi_record = _make_scsi_record(scsi_info) scsi_records.append(scsi_record) return scsi_records -Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py @@ -323,7 +323,12 @@ class XendNode: pscsi_table = {} pscsi_HBA_table = {} @@ -103,10 +103,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py scsi_id = pscsi_record['scsi_id'] if scsi_id: saved_HBA_uuid = None -Index: xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendOptions.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendOptions.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py @@ -164,6 +164,9 @@ class XendOptions: """ print >>sys.stderr, "xend [ERROR]", fmt % args diff --git a/21866-xenapi.patch b/21866-xenapi.patch index d9a5377..984d8e4 100644 --- a/21866-xenapi.patch +++ b/21866-xenapi.patch @@ -18,10 +18,10 @@ Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com Acked-by: Jim Fehlig Committed-by: Ian Jackson -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py @@ -1667,7 +1667,8 @@ class XendAPI(object): def VM_set_actions_after_crash(self, session, vm_ref, action): if action not in XEN_API_ON_CRASH_BEHAVIOUR: @@ -32,10 +32,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py def VM_set_HVM_boot_policy(self, session, vm_ref, value): if value != "" and value != "BIOS order": -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPIConstants.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py @@ -63,6 +63,18 @@ XEN_API_ON_CRASH_BEHAVIOUR_FILTER = { 'rename_restart' : 'rename_restart', } @@ -55,10 +55,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py XEN_API_VBD_MODE = ['RO', 'RW'] XEN_API_VDI_TYPE = ['system', 'user', 'ephemeral'] XEN_API_VBD_TYPE = ['CD', 'Disk'] -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -41,6 +41,7 @@ from xen.util.pci import pci_opts_list_f from xen.xend.XendSXPDev import dev_dict_to_sxp from xen.util import xsconstants diff --git a/21886-kexec-shutdown.patch b/21886-kexec-shutdown.patch deleted file mode 100644 index 3da83a9..0000000 --- a/21886-kexec-shutdown.patch +++ /dev/null @@ -1,288 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1280395881 -3600 -# Node ID 578ed14c3c673d734318bcefa4597a7d7d9aee37 -# Parent 2007fd03f53d9a3e8774a6df06beef7c74801b07 -kexec: Clean up shutdown logic. Reinstate ACPI DMAR during kexec. -References: bnc#613529 - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/crash.c -+++ b/xen/arch/x86/crash.c -@@ -25,7 +25,6 @@ - #include - #include - #include --#include - - static atomic_t waiting_for_crash_ipi; - static unsigned int crashing_cpu; -@@ -41,9 +40,10 @@ static int crash_nmi_callback(struct cpu - local_irq_disable(); - - kexec_crash_save_cpu(); -- disable_local_APIC(); -+ -+ __stop_this_cpu(); -+ - atomic_dec(&waiting_for_crash_ipi); -- hvm_cpu_down(); - - for ( ; ; ) - halt(); -@@ -55,7 +55,10 @@ static void nmi_shootdown_cpus(void) - { - unsigned long msecs; - -+ local_irq_disable(); -+ - crashing_cpu = smp_processor_id(); -+ local_irq_count(crashing_cpu) = 0; - - atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1); - /* Would it be better to replace the trap vector here? */ -@@ -72,25 +75,18 @@ static void nmi_shootdown_cpus(void) - msecs--; - } - -- /* Leave the nmi callback set */ -- disable_local_APIC(); -+ __stop_this_cpu(); -+ disable_IO_APIC(); -+ -+ local_irq_enable(); - } - - void machine_crash_shutdown(void) - { - crash_xen_info_t *info; - -- local_irq_disable(); -- - nmi_shootdown_cpus(); - -- if ( hpet_broadcast_is_available() ) -- hpet_disable_legacy_broadcast(); -- -- disable_IO_APIC(); -- -- hvm_cpu_down(); -- - info = kexec_crash_save_info(); - info->xen_phys_start = xen_phys_start; - info->dom0_pfn_to_mfn_frame_list_list = ---- a/xen/arch/x86/machine_kexec.c -+++ b/xen/arch/x86/machine_kexec.c -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - - typedef void (*relocate_new_kernel_t)( - unsigned long indirection_page, -@@ -76,38 +77,11 @@ void machine_kexec_unload(int type, int - { - } - --static void __machine_reboot_kexec(void *data) -+void machine_reboot_kexec(xen_kexec_image_t *image) - { -- xen_kexec_image_t *image = (xen_kexec_image_t *)data; -- -- watchdog_disable(); -- console_start_sync(); -- -+ BUG_ON(smp_processor_id() != 0); - smp_send_stop(); -- - machine_kexec(image); --} -- --void machine_reboot_kexec(xen_kexec_image_t *image) --{ -- int reboot_cpu_id; -- -- reboot_cpu_id = 0; -- -- if ( !cpu_isset(reboot_cpu_id, cpu_online_map) ) -- reboot_cpu_id = smp_processor_id(); -- -- if ( reboot_cpu_id != smp_processor_id() ) -- { -- on_selected_cpus(cpumask_of(reboot_cpu_id), __machine_reboot_kexec, -- image, 0); -- for (;;) -- ; /* nothing */ -- } -- else -- { -- __machine_reboot_kexec(image); -- } - BUG(); - } - -@@ -118,6 +92,9 @@ void machine_kexec(xen_kexec_image_t *im - .limit = LAST_RESERVED_GDT_BYTE - }; - -+ if ( hpet_broadcast_is_available() ) -+ hpet_disable_legacy_broadcast(); -+ - /* - * compat_machine_kexec() returns to idle pagetables, which requires us - * to be running on a static GDT mapping (idle pagetables have no GDT ---- a/xen/arch/x86/smp.c -+++ b/xen/arch/x86/smp.c -@@ -326,7 +326,7 @@ int on_selected_cpus( - return 0; - } - --static void __stop_this_cpu(void) -+void __stop_this_cpu(void) - { - ASSERT(!local_irq_is_enabled()); - ---- a/xen/arch/x86/tboot.c -+++ b/xen/arch/x86/tboot.c -@@ -491,7 +491,10 @@ int __init tboot_parse_dmar_table(acpi_t - dmar_table = NULL; - acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_table); - if ( dmar_table != NULL ) -- ((struct acpi_table_dmar *)dmar_table)->header.signature[0] = '\0'; -+ { -+ dmar_table->signature[0] = 'X'; -+ dmar_table->checksum -= 'X'-'D'; -+ } - - return rc; - } ---- a/xen/common/kexec.c -+++ b/xen/common/kexec.c -@@ -6,7 +6,9 @@ - * - Magnus Damm - */ - -+#include - #include -+#include - #include - #include - #include -@@ -201,6 +203,22 @@ crash_xen_info_t *kexec_crash_save_info( - return out; - } - -+static int acpi_dmar_reinstate(struct acpi_table_header *table) -+{ -+ table->signature[0] = 'D'; -+ table->checksum += 'X'-'D'; -+ return 0; -+} -+ -+static void kexec_common_shutdown(void) -+{ -+ watchdog_disable(); -+ console_start_sync(); -+ spin_debug_disable(); -+ one_cpu_only(); -+ acpi_table_parse(ACPI_SIG_DMAR, acpi_dmar_reinstate); -+} -+ - void kexec_crash(void) - { - int pos; -@@ -209,17 +227,25 @@ void kexec_crash(void) - if ( !test_bit(KEXEC_IMAGE_CRASH_BASE + pos, &kexec_flags) ) - return; - -- console_start_sync(); -- -- one_cpu_only(); -+ kexec_common_shutdown(); - kexec_crash_save_cpu(); - machine_crash_shutdown(); -- - machine_kexec(&kexec_image[KEXEC_IMAGE_CRASH_BASE + pos]); - - BUG(); - } - -+static long kexec_reboot(void *_image) -+{ -+ xen_kexec_image_t *image = _image; -+ -+ kexec_common_shutdown(); -+ machine_reboot_kexec(image); -+ -+ BUG(); -+ return 0; -+} -+ - static void do_crashdump_trigger(unsigned char key) - { - printk("'%c' pressed -> triggering crashdump\n", key); -@@ -540,7 +566,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v - { - xen_kexec_exec_t exec; - xen_kexec_image_t *image; -- int base, bit, pos; -+ int base, bit, pos, ret = -EINVAL; - - if ( unlikely(copy_from_guest(&exec, uarg, 1)) ) - return -EFAULT; -@@ -558,8 +584,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v - { - case KEXEC_TYPE_DEFAULT: - image = &kexec_image[base + pos]; -- one_cpu_only(); -- machine_reboot_kexec(image); /* Does not return */ -+ ret = continue_hypercall_on_cpu(0, kexec_reboot, image); - break; - case KEXEC_TYPE_CRASH: - kexec_crash(); /* Does not return */ ---- a/xen/drivers/acpi/tables.c -+++ b/xen/drivers/acpi/tables.c -@@ -41,7 +41,7 @@ mps_inti_flags_polarity[] = { "dfl", "hi - static const char *__initdata - mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" }; - --static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES] __initdata; -+static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES]; - - static int acpi_apic_instance __initdata; - -@@ -239,7 +239,7 @@ acpi_table_parse_madt(enum acpi_madt_typ - * Scan the ACPI System Descriptor Table (STD) for a table matching @id, - * run @handler on it. Return 0 if table found, return on if not. - */ --int __init acpi_table_parse(char *id, acpi_table_handler handler) -+int acpi_table_parse(char *id, acpi_table_handler handler) - { - struct acpi_table_header *table = NULL; - ---- a/xen/drivers/passthrough/vtd/dmar.c -+++ b/xen/drivers/passthrough/vtd/dmar.c -@@ -738,7 +738,8 @@ static int __init acpi_parse_dmar(struct - - out: - /* Zap ACPI DMAR signature to prevent dom0 using vt-d HW. */ -- dmar->header.signature[0] = '\0'; -+ dmar->header.signature[0] = 'X'; -+ dmar->header.checksum -= 'X'-'D'; - return ret; - } - ---- a/xen/include/asm-x86/smp.h -+++ b/xen/include/asm-x86/smp.h -@@ -102,6 +102,9 @@ static __inline int logical_smp_processo - - extern int __cpu_disable(void); - extern void __cpu_die(unsigned int cpu); -+ -+void __stop_this_cpu(void); -+ - #endif /* !__ASSEMBLY__ */ - - #else /* CONFIG_SMP */ diff --git a/21926-x86-pv-NMI-inject.patch b/21926-x86-pv-NMI-inject.patch deleted file mode 100644 index 96af31e..0000000 --- a/21926-x86-pv-NMI-inject.patch +++ /dev/null @@ -1,43 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1281015674 -3600 -# Node ID 6f07d9ac1e7cd145fb2770bb11655ac1161b58da -# Parent 8992134dcfd0b9e1e86f4111e68a8aa48bd33c3c -x86: Fix NMI injection to PV guests -References: bnc#625520 - -Signed-off-by: Juergen Gross - ---- a/xen/arch/x86/x86_32/entry.S -+++ b/xen/arch/x86/x86_32/entry.S -@@ -275,7 +275,7 @@ process_mce: - ALIGN - /* %ebx: struct vcpu */ - process_nmi: -- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%ebx) -+ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%ebx) - jnz test_guest_events - sti - movb $0,VCPU_nmi_pending(%ebx) ---- a/xen/arch/x86/x86_64/compat/entry.S -+++ b/xen/arch/x86/x86_64/compat/entry.S -@@ -148,7 +148,7 @@ compat_process_mce: - ALIGN - /* %rbx: struct vcpu */ - compat_process_nmi: -- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) -+ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) - jnz compat_test_guest_events - sti - movb $0,VCPU_nmi_pending(%rbx) ---- a/xen/arch/x86/x86_64/entry.S -+++ b/xen/arch/x86/x86_64/entry.S -@@ -250,7 +250,7 @@ process_mce: - ALIGN - /* %rbx: struct vcpu */ - process_nmi: -- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) -+ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx) - jnz test_guest_events - sti - movb $0,VCPU_nmi_pending(%rbx) diff --git a/21933-vtd-ioapic-write.patch b/21933-vtd-ioapic-write.patch deleted file mode 100644 index fe554b8..0000000 --- a/21933-vtd-ioapic-write.patch +++ /dev/null @@ -1,56 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1281367965 -3600 -# Node ID add40eb478680b6f8de7102e87fba259f721ce1d -# Parent fe930e1b2ce8f205fb368d0cc86876cc54d761a9 -vt-d: Fix ioapic write order in io_apic_write_remap_rte - -At the end of io_apic_write_remap_rte, it writes new entry (remapped -interrupt) to ioapic. But it writes low 32 bits before high 32 bits, -it unmasks interrupt before writing high 32 bits if 'mask' bit in low -32 bits is cleared. Thus it may result in issues. This patch fixes -this issue by writing high 32 bits before low 32 bits. - -Signed-off-by: Jiang, Yunhong -Signed-off-by: Weidong Han - -# HG changeset patch -# User Keir Fraser -# Date 1281368025 -3600 -# Node ID befd1814c0a262ce0d6c96727a76b907cdeecdc4 -# Parent add40eb478680b6f8de7102e87fba259f721ce1d -vt-d: Fix ioapic_rte_to_remap_entry error path. - -When ioapic_rte_to_remap_entry fails, currently it just writes value -to ioapic. But the 'mask' bit may be changed if it writes to the upper -half of RTE. This patch ensures to recover the original value of 'mask' -bit in this case. - -Signed-off-by: Weidong Han - ---- a/xen/drivers/passthrough/vtd/intremap.c -+++ b/xen/drivers/passthrough/vtd/intremap.c -@@ -438,14 +438,21 @@ void io_apic_write_remap_rte( - { - *IO_APIC_BASE(apic) = rte_upper ? (reg + 1) : reg; - *(IO_APIC_BASE(apic)+4) = value; -+ -+ /* Recover the original value of 'mask' bit */ -+ if ( rte_upper ) -+ { -+ *IO_APIC_BASE(apic) = reg; -+ *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0); -+ } - return; - } - - /* write new entry to ioapic */ -- *IO_APIC_BASE(apic) = reg; -- *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0); - *IO_APIC_BASE(apic) = reg + 1; - *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+1); -+ *IO_APIC_BASE(apic) = reg; -+ *(IO_APIC_BASE(apic)+4) = *(((u32 *)&old_rte)+0); - } - - #if defined(__i386__) || defined(__x86_64__) diff --git a/21953-msi-enable.patch b/21953-msi-enable.patch deleted file mode 100644 index a26ca9a..0000000 --- a/21953-msi-enable.patch +++ /dev/null @@ -1,68 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1281542462 -3600 -# Node ID 786b163da49bbf18857b5484cce5e5aed33528b3 -# Parent f45026ec8db5a18131acd924a5b99f3b0e480df1 -msi: Avoid uninitialized msi descriptors - -When __pci_enable_msix() returns early, output parameter (struct -msi_desc **desc) will not be initialized. On my machine, a Broadcom -BCM5709 nic has both MSI and MSIX capability blocks and when guest -tries to enable msix interrupts but __pci_enable_msix() returns early -for encountering a msi block, the whole system will crash for fatal -page fault immediately. - -Signed-off-by: Wei Wang - ---- a/xen/arch/x86/msi.c -+++ b/xen/arch/x86/msi.c -@@ -605,21 +605,25 @@ static int msix_capability_init(struct p - * indicates the successful setup of an entry zero with the new MSI - * irq or non-zero for otherwise. - **/ -+ - static int __pci_enable_msi(struct msi_info *msi, struct msi_desc **desc) - { - int status; - struct pci_dev *pdev; -+ struct msi_desc *old_desc; - - ASSERT(spin_is_locked(&pcidevs_lock)); - pdev = pci_get_pdev(msi->bus, msi->devfn); - if ( !pdev ) - return -ENODEV; - -- if ( find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSI) ) -+ old_desc = find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSI); -+ if ( old_desc ) - { - dprintk(XENLOG_WARNING, "irq %d has already mapped to MSI on " - "device %02x:%02x.%01x.\n", msi->irq, msi->bus, - PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); -+ *desc = old_desc; - return 0; - } - -@@ -669,6 +673,7 @@ static int __pci_enable_msix(struct msi_ - u16 control; - u8 slot = PCI_SLOT(msi->devfn); - u8 func = PCI_FUNC(msi->devfn); -+ struct msi_desc *old_desc; - - ASSERT(spin_is_locked(&pcidevs_lock)); - pdev = pci_get_pdev(msi->bus, msi->devfn); -@@ -681,11 +686,13 @@ static int __pci_enable_msix(struct msi_ - if (msi->entry_nr >= nr_entries) - return -EINVAL; - -- if ( find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSIX) ) -+ old_desc = find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSIX); -+ if ( old_desc ) - { - dprintk(XENLOG_WARNING, "irq %d has already mapped to MSIX on " - "device %02x:%02x.%01x.\n", msi->irq, msi->bus, - PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn)); -+ *desc = old_desc; - return 0; - } - diff --git a/21971-pod-accounting.patch b/21971-pod-accounting.patch deleted file mode 100644 index 320c821..0000000 --- a/21971-pod-accounting.patch +++ /dev/null @@ -1,58 +0,0 @@ -References: bnc#626262 - -# HG changeset patch -# User George Dunlap -# Date 1281538581 -3600 -# Node ID 6f059a340cdf60e59f58bbca755a62356f57ea0e -# Parent 3b839375d5bcb3a4b484170a890e340493b4738a -[Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache allocation - -Rather than trying to count the number of PoD entries we're putting in, we -simply pass the target # of pages - the vga hole, and let the hypervisor -do the calculation. - -Signed-off-by: George Dunlap -Signed-off-by: Stefano Stabellini - ---- a/tools/libxc/xc_hvm_build.c -+++ b/tools/libxc/xc_hvm_build.c -@@ -107,7 +107,6 @@ static int setup_guest(int xc_handle, - xen_pfn_t *page_array = NULL; - unsigned long i, nr_pages = (unsigned long)memsize << (20 - PAGE_SHIFT); - unsigned long target_pages = (unsigned long)target << (20 - PAGE_SHIFT); -- unsigned long pod_pages = 0; - unsigned long entry_eip, cur_pages; - struct xen_add_to_physmap xatp; - struct shared_info *shared_info; -@@ -208,11 +207,6 @@ static int setup_guest(int xc_handle, - if ( done > 0 ) - { - done <<= SUPERPAGE_PFN_SHIFT; -- if ( pod_mode && target_pages > cur_pages ) -- { -- int d = target_pages - cur_pages; -- pod_pages += ( done < d ) ? done : d; -- } - cur_pages += done; - count -= done; - } -@@ -224,15 +218,16 @@ static int setup_guest(int xc_handle, - rc = xc_domain_memory_populate_physmap( - xc_handle, dom, count, 0, 0, &page_array[cur_pages]); - cur_pages += count; -- if ( pod_mode ) -- pod_pages -= count; - } - } - -+ /* Subtract 0x20 from target_pages for the VGA "hole". Xen will -+ * adjust the PoD cache size so that domain tot_pages will be -+ * target_pages - 0x20 after this call. */ - if ( pod_mode ) - rc = xc_domain_memory_set_pod_target(xc_handle, - dom, -- pod_pages, -+ target_pages - 0x20, - NULL, NULL, NULL); - - if ( rc != 0 ) diff --git a/22019-x86-cpuidle-online-check.patch b/22019-x86-cpuidle-online-check.patch new file mode 100644 index 0000000..153900d --- /dev/null +++ b/22019-x86-cpuidle-online-check.patch @@ -0,0 +1,30 @@ +# HG changeset patch +# User Keir Fraser +# Date 1282069957 -3600 +# Node ID 5218db847b58a151d8f320b7141efc984f759b35 +# Parent 542e8cd16a6cf036e89b597ba6343245fcaafa25 +x86 cpuidle: check whether cpu is online in cpu idle control + +We observed a 2.6.18.8 dom0 kernel crash when Xen has maxcpus < num +of physical cores (maxcpus=3D4 for a 12-core system). It appeared that +hypervisor doesn't check whether CPU is online or not. This small +patch fixed the issue. + +Signed-off-by: Uwe Dannowski +Acked-by: Wei Huang + +--- a/xen/arch/x86/acpi/cpuidle_menu.c ++++ b/xen/arch/x86/acpi/cpuidle_menu.c +@@ -270,9 +270,10 @@ static void menu_reflect(struct acpi_pro + + static int menu_enable_device(struct acpi_processor_power *power) + { +- struct menu_device *data = &per_cpu(menu_devices, power->cpu); ++ if (!cpu_online(power->cpu)) ++ return -1; + +- memset(data, 0, sizeof(struct menu_device)); ++ memset(&per_cpu(menu_devices, power->cpu), 0, sizeof(struct menu_device)); + + return 0; + } diff --git a/22051-x86-forced-EOI.patch b/22051-x86-forced-EOI.patch new file mode 100644 index 0000000..3bd96a5 --- /dev/null +++ b/22051-x86-forced-EOI.patch @@ -0,0 +1,203 @@ +# HG changeset patch +# User Keir Fraser +# Date 1282466228 -3600 +# Node ID 59ff5820534f4c5ec006d1ddca0f4356634c3b22 +# Parent f77261710856aad506dda92cfa3b92b923be4e15 +x86: Automatically EOI guest-bound interrupts if guest takes too long. + +Signed-off-by: Keir Fraser + +Includes the x86 IRQ specific parts of c/s 21508: + +# HG changeset patch +# User Keir Fraser +# Date 1275480791 -3600 +# Node ID 5aabc6f94df5f275647d55caa24780eff0c81355 +# Parent a3bdee5a20daf590ae7a440dad4e3b104b99c620 +timers: Track inactive timers and migrate them on cpu offline. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/irq.c ++++ b/xen/arch/x86/irq.c +@@ -46,8 +46,6 @@ static DECLARE_BITMAP(used_vectors, NR_V + + struct irq_cfg __read_mostly *irq_cfg = NULL; + +-static struct timer *__read_mostly irq_guest_eoi_timer; +- + static DEFINE_SPINLOCK(vector_lock); + + DEFINE_PER_CPU(vector_irq_t, vector_irq) = { +@@ -274,18 +272,15 @@ int init_irq_data(void) + irq_desc = xmalloc_array(struct irq_desc, nr_irqs); + irq_cfg = xmalloc_array(struct irq_cfg, nr_irqs); + irq_status = xmalloc_array(int, nr_irqs); +- irq_guest_eoi_timer = xmalloc_array(struct timer, nr_irqs); + irq_vector = xmalloc_array(u8, nr_irqs_gsi); + +- if (!irq_desc || !irq_cfg || !irq_status ||! irq_vector || +- !irq_guest_eoi_timer) ++ if ( !irq_desc || !irq_cfg || !irq_status ||! irq_vector ) + return -ENOMEM; + + memset(irq_desc, 0, nr_irqs * sizeof(*irq_desc)); + memset(irq_cfg, 0, nr_irqs * sizeof(*irq_cfg)); + memset(irq_status, 0, nr_irqs * sizeof(*irq_status)); + memset(irq_vector, 0, nr_irqs_gsi * sizeof(*irq_vector)); +- memset(irq_guest_eoi_timer, 0, nr_irqs * sizeof(*irq_guest_eoi_timer)); + + for (irq = 0; irq < nr_irqs; irq++) { + desc = irq_to_desc(irq); +@@ -740,6 +735,7 @@ typedef struct { + #define ACKTYPE_UNMASK 1 /* Unmask PIC hardware (from any CPU) */ + #define ACKTYPE_EOI 2 /* EOI on the CPU that was interrupted */ + cpumask_t cpu_eoi_map; /* CPUs that need to EOI this interrupt */ ++ struct timer eoi_timer; + struct domain *guest[IRQ_MAX_GUESTS]; + } irq_guest_action_t; + +@@ -784,13 +780,55 @@ static void _irq_guest_eoi(struct irq_de + desc->handler->enable(irq); + } + ++static void set_eoi_ready(void *data); ++ + static void irq_guest_eoi_timer_fn(void *data) + { + struct irq_desc *desc = data; ++ unsigned int irq = desc - irq_desc; ++ irq_guest_action_t *action; ++ cpumask_t cpu_eoi_map; + unsigned long flags; + + spin_lock_irqsave(&desc->lock, flags); +- _irq_guest_eoi(desc); ++ ++ if ( !(desc->status & IRQ_GUEST) ) ++ goto out; ++ ++ action = (irq_guest_action_t *)desc->action; ++ ++ if ( action->ack_type != ACKTYPE_NONE ) ++ { ++ unsigned int i; ++ for ( i = 0; i < action->nr_guests; i++ ) ++ { ++ struct domain *d = action->guest[i]; ++ unsigned int pirq = domain_irq_to_pirq(d, irq); ++ if ( test_and_clear_bit(pirq, d->pirq_mask) ) ++ action->in_flight--; ++ } ++ } ++ ++ if ( action->in_flight != 0 ) ++ goto out; ++ ++ switch ( action->ack_type ) ++ { ++ case ACKTYPE_UNMASK: ++ desc->handler->end(irq); ++ break; ++ case ACKTYPE_EOI: ++ cpu_eoi_map = action->cpu_eoi_map; ++ spin_unlock_irq(&desc->lock); ++ on_selected_cpus(&cpu_eoi_map, set_eoi_ready, desc, 0); ++ spin_lock_irq(&desc->lock); ++ break; ++ case ACKTYPE_NONE: ++ _irq_guest_eoi(desc); ++ break; ++ } ++ ++ out: + spin_unlock_irqrestore(&desc->lock, flags); + } + +@@ -847,9 +885,11 @@ static void __do_IRQ_guest(int irq) + } + } + +- if ( already_pending == action->nr_guests ) ++ stop_timer(&action->eoi_timer); ++ ++ if ( (action->ack_type == ACKTYPE_NONE) && ++ (already_pending == action->nr_guests) ) + { +- stop_timer(&irq_guest_eoi_timer[irq]); + desc->handler->disable(irq); + desc->status |= IRQ_GUEST_EOI_PENDING; + for ( i = 0; i < already_pending; ++i ) +@@ -865,10 +905,10 @@ static void __do_IRQ_guest(int irq) + * - skip the timer setup below. + */ + } +- init_timer(&irq_guest_eoi_timer[irq], +- irq_guest_eoi_timer_fn, desc, smp_processor_id()); +- set_timer(&irq_guest_eoi_timer[irq], NOW() + MILLISECS(1)); + } ++ ++ migrate_timer(&action->eoi_timer, smp_processor_id()); ++ set_timer(&action->eoi_timer, NOW() + MILLISECS(1)); + } + + /* +@@ -978,7 +1018,7 @@ static void __pirq_guest_eoi(struct doma + if ( action->ack_type == ACKTYPE_NONE ) + { + ASSERT(!test_bit(pirq, d->pirq_mask)); +- stop_timer(&irq_guest_eoi_timer[irq]); ++ stop_timer(&action->eoi_timer); + _irq_guest_eoi(desc); + } + +@@ -1162,6 +1202,7 @@ int pirq_guest_bind(struct vcpu *v, int + action->shareable = will_share; + action->ack_type = pirq_acktype(v->domain, pirq); + cpus_clear(action->cpu_eoi_map); ++ init_timer(&action->eoi_timer, irq_guest_eoi_timer_fn, desc, 0); + + desc->depth = 0; + desc->status |= IRQ_GUEST; +@@ -1266,7 +1307,7 @@ static irq_guest_action_t *__pirq_guest_ + } + break; + case ACKTYPE_NONE: +- stop_timer(&irq_guest_eoi_timer[irq]); ++ stop_timer(&action->eoi_timer); + _irq_guest_eoi(desc); + break; + } +@@ -1306,9 +1347,7 @@ static irq_guest_action_t *__pirq_guest_ + BUG_ON(!cpus_empty(action->cpu_eoi_map)); + + desc->action = NULL; +- desc->status &= ~IRQ_GUEST; +- desc->status &= ~IRQ_INPROGRESS; +- kill_timer(&irq_guest_eoi_timer[irq]); ++ desc->status &= ~(IRQ_GUEST|IRQ_GUEST_EOI_PENDING|IRQ_INPROGRESS); + desc->handler->shutdown(irq); + + /* Caller frees the old guest descriptor block. */ +@@ -1342,7 +1381,10 @@ void pirq_guest_unbind(struct domain *d, + spin_unlock_irq(&desc->lock); + + if ( oldaction != NULL ) ++ { ++ kill_timer(&oldaction->eoi_timer); + xfree(oldaction); ++ } + } + + static int pirq_guest_force_unbind(struct domain *d, int irq) +@@ -1380,7 +1422,10 @@ static int pirq_guest_force_unbind(struc + spin_unlock_irq(&desc->lock); + + if ( oldaction != NULL ) ++ { ++ kill_timer(&oldaction->eoi_timer); + xfree(oldaction); ++ } + + return bound; + } diff --git a/22067-x86-irq-domain.patch b/22067-x86-irq-domain.patch new file mode 100644 index 0000000..62f548d --- /dev/null +++ b/22067-x86-irq-domain.patch @@ -0,0 +1,31 @@ +# HG changeset patch +# User Keir Fraser +# Date 1282817774 -3600 +# Node ID 3eb5127e46365242401e37df292fbe290fa0a974 +# Parent eccfdeb41b803d07bcb4f7fa912a8341fdb19162 +Fix bind_irq_vector() destination + +The "mask" covered all online cpus in the "domain". It should be used +as destination later, instead of using "domain" directly. + +Signed-off-by: Sheng Yang + +--- a/xen/arch/x86/irq.c ++++ b/xen/arch/x86/irq.c +@@ -88,14 +88,14 @@ static int __bind_irq_vector(int irq, in + cpus_and(mask, domain, cpu_online_map); + if (cpus_empty(mask)) + return -EINVAL; +- if ((cfg->vector == vector) && cpus_equal(cfg->domain, domain)) ++ if ((cfg->vector == vector) && cpus_equal(cfg->domain, mask)) + return 0; + if (cfg->vector != IRQ_VECTOR_UNASSIGNED) + return -EBUSY; + for_each_cpu_mask(cpu, mask) + per_cpu(vector_irq, cpu)[vector] = irq; + cfg->vector = vector; +- cfg->domain = domain; ++ cfg->domain = mask; + irq_status[irq] = IRQ_USED; + if (IO_APIC_IRQ(irq)) + irq_vector[irq] = vector; diff --git a/22068-vtd-irte-RH-bit.patch b/22068-vtd-irte-RH-bit.patch new file mode 100644 index 0000000..c95a972 --- /dev/null +++ b/22068-vtd-irte-RH-bit.patch @@ -0,0 +1,35 @@ +# HG changeset patch +# User Keir Fraser +# Date 1282817816 -3600 +# Node ID 3c4c3d48a8350994f4450314c6b759771c7ad4ef +# Parent 3eb5127e46365242401e37df292fbe290fa0a974 +VT-d: Hardware require RH bit to be set in IRTE when delivery mode is LPR + +Signed-off-by: Sheng Yang + +--- a/xen/drivers/passthrough/vtd/intremap.c ++++ b/xen/drivers/passthrough/vtd/intremap.c +@@ -318,9 +318,10 @@ static int ioapic_rte_to_remap_entry(str + *(((u32 *)&new_rte) + 0) = value; + new_ire.lo.fpd = 0; + new_ire.lo.dm = new_rte.dest_mode; +- new_ire.lo.rh = 0; + new_ire.lo.tm = new_rte.trigger; + new_ire.lo.dlm = new_rte.delivery_mode; ++ /* Hardware require RH = 1 for LPR delivery mode */ ++ new_ire.lo.rh = (new_ire.lo.dlm == dest_LowestPrio); + new_ire.lo.avail = 0; + new_ire.lo.res_1 = 0; + new_ire.lo.vector = new_rte.vector; +@@ -630,9 +631,10 @@ static int msi_msg_to_remap_entry( + /* Set interrupt remapping table entry */ + new_ire.lo.fpd = 0; + new_ire.lo.dm = (msg->address_lo >> MSI_ADDR_DESTMODE_SHIFT) & 0x1; +- new_ire.lo.rh = 0; + new_ire.lo.tm = (msg->data >> MSI_DATA_TRIGGER_SHIFT) & 0x1; + new_ire.lo.dlm = (msg->data >> MSI_DATA_DELIVERY_MODE_SHIFT) & 0x1; ++ /* Hardware require RH = 1 for LPR delivery mode */ ++ new_ire.lo.rh = (new_ire.lo.dlm == dest_LowestPrio); + new_ire.lo.avail = 0; + new_ire.lo.res_1 = 0; + new_ire.lo.vector = (msg->data >> MSI_DATA_VECTOR_SHIFT) & diff --git a/22071-ept-get-entry-lock.patch b/22071-ept-get-entry-lock.patch new file mode 100644 index 0000000..fc621a7 --- /dev/null +++ b/22071-ept-get-entry-lock.patch @@ -0,0 +1,45 @@ +# HG changeset patch +# User Keir Fraser +# Date 1283153992 -3600 +# Node ID c5aed2e049bce2724b035dd6aa09c4c4e609c27c +# Parent 20920c12bc4815b1f755786c0924393809664807 +ept: Put locks around ept_get_entry + +There's a subtle race in ept_get_entry, such that if tries to read an +entry that ept_set_entry is modifying, it gets neither the old entry +nor the new entry, but empty. In the case of multi-cpu +populate-on-demand guests, this manifests as a guest crash when one +vcpu tries to read a page which another page is trying to populate, +and ept_get_entry returns p2m_mmio_dm. + +This bug can also be fixed by making both ept_set_entry and +ept_next_level access-once (i.e., ept_next_level reads full ept_entry +and then works with local value; ept_set_entry construct the entry +locally and then sets it in one write). But there doesn't seem to be +any major performance implications of just making ept_get_entry use +locks; so the simpler, the better. + +Signed-off-by: George Dunlap + +--- a/xen/arch/x86/mm/hap/p2m-ept.c ++++ b/xen/arch/x86/mm/hap/p2m-ept.c +@@ -387,6 +387,10 @@ static mfn_t ept_get_entry(struct domain + int i; + int ret = 0; + mfn_t mfn = _mfn(INVALID_MFN); ++ int do_locking = !p2m_locked_by_me(d->arch.p2m); ++ ++ if ( do_locking ) ++ p2m_lock(d->arch.p2m); + + *t = p2m_mmio_dm; + +@@ -464,6 +468,8 @@ static mfn_t ept_get_entry(struct domain + } + + out: ++ if ( do_locking ) ++ p2m_unlock(d->arch.p2m); + unmap_domain_page(table); + return mfn; + } diff --git a/22084-x86-xsave-off.patch b/22084-x86-xsave-off.patch new file mode 100644 index 0000000..e3e476b --- /dev/null +++ b/22084-x86-xsave-off.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Keir Fraser +# Date 1283332754 -3600 +# Node ID ae0cd4e5cc0149ceb5d3dd61a003aadc008f036e +# Parent 972d90ff31349816cc8c785a8b2defb2f70ed441 +x86 intel: Disable XSAVE support. + +It breaks HVM save/restore. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/cpu/intel.c ++++ b/xen/arch/x86/cpu/intel.c +@@ -20,7 +20,7 @@ + + extern int trap_init_f00f_bug(void); + +-static int use_xsave = 1; ++static int use_xsave; + boolean_param("xsave", use_xsave); + + #ifdef CONFIG_X86_INTEL_USERCOPY diff --git a/32on64-extra-mem.patch b/32on64-extra-mem.patch index c82dfe3..6249b76 100644 --- a/32on64-extra-mem.patch +++ b/32on64-extra-mem.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2917,7 +2917,7 @@ class XendDomainInfo: +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -2920,7 +2920,7 @@ class XendDomainInfo: self.guest_bitsize = self.image.getBitSize() # Make sure there's enough RAM available for the domain diff --git a/bdrv_open2_fix_flags.patch b/bdrv_open2_fix_flags.patch index 3a79db2..0ab9c3d 100644 --- a/bdrv_open2_fix_flags.patch +++ b/bdrv_open2_fix_flags.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/block.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/block.c -+++ xen-4.0.0-testing/tools/ioemu-remote/block.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c @@ -350,7 +350,7 @@ int bdrv_file_open(BlockDriverState **pb int bdrv_open(BlockDriverState *bs, const char *filename, int flags) @@ -18,7 +18,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/block.c - /* Note: for compatibility, we open disk image files as RDWR, and - RDONLY as fallback */ if (!(flags & BDRV_O_FILE)) -- open_flags = BDRV_O_RDWR | (flags & BDRV_O_CACHE_MASK); +- open_flags = (flags & BDRV_O_ACCESS) | (flags & BDRV_O_CACHE_MASK); + open_flags = flags; else open_flags = flags & ~(BDRV_O_FILE | BDRV_O_SNAPSHOT); @@ -28,10 +28,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/block.c ret = drv->bdrv_open(bs, filename, open_flags); if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) { ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR); -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/usb-msd.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/usb-msd.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c @@ -551,7 +551,7 @@ USBDevice *usb_msd_init(const char *file s = qemu_mallocz(sizeof(MSDState)); @@ -41,10 +41,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c goto fail; s->bs = bdrv; *pbs = bdrv; -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-img.c -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-img.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c @@ -32,7 +32,7 @@ #endif @@ -54,7 +54,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c static void QEMU_NORETURN error(const char *fmt, ...) { -@@ -185,7 +185,7 @@ static int read_password(char *buf, int +@@ -185,7 +185,7 @@ static int read_password(char *buf, int #endif static BlockDriverState *bdrv_new_open(const char *filename, @@ -118,7 +118,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c error("Could not open '%s'", filename); } bdrv_get_format(bs, fmt_name, sizeof(fmt_name)); -@@ -810,7 +811,7 @@ static void img_snapshot(int argc, char +@@ -810,7 +811,7 @@ static void img_snapshot(int argc, char if (!bs) error("Not enough memory"); diff --git a/bdrv_open2_flags_2.patch b/bdrv_open2_flags_2.patch index 2213d1a..1fc9e2f 100644 --- a/bdrv_open2_flags_2.patch +++ b/bdrv_open2_flags_2.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -227,6 +227,7 @@ static int open_disk(struct td_state *s, BlockDriver* drv; char* devname; @@ -19,10 +19,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c fprintf(stderr, "Could not open image file %s\n", path); return -ENOMEM; } -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -136,7 +136,8 @@ static void insert_media(void *opaque) else format = &bdrv_raw; @@ -33,19 +33,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c #ifdef CONFIG_STUBDOM { char *buf, *backend, *params_path, *params; -@@ -400,9 +401,9 @@ void xenstore_parse_domain_config(int hv - { - char **e_danger = NULL; - char *buf = NULL; -- char *fpath = NULL, *bpath = NULL, *btype = NULL, -+ char *fpath = NULL, *bpath = NULL, *btype = NULL, *mode = NULL, - *dev = NULL, *params = NULL, *drv = NULL; -- int i, j, ret, is_tap; -+ int i, j, ret, is_tap, flags; - unsigned int len, num, hd_index, pci_devid = 0; - BlockDriverState *bs; - BlockDriver *format; -@@ -464,7 +465,8 @@ void xenstore_parse_domain_config(int hv +@@ -469,7 +470,8 @@ void xenstore_parse_domain_config(int hv } for (i = 0; i < num; i++) { @@ -55,7 +43,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c /* read the backend path */ xenstore_get_backend_path(&bpath, "vbd", danger_path, hvm_domid, e_danger[i]); if (bpath == NULL) -@@ -550,6 +552,17 @@ void xenstore_parse_domain_config(int hv +@@ -555,6 +557,17 @@ void xenstore_parse_domain_config(int hv format = &bdrv_raw; } @@ -73,7 +61,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c #if 0 /* Phantom VBDs are disabled because the use of paths * from guest-controlled areas in xenstore is unsafe. -@@ -617,7 +630,7 @@ void xenstore_parse_domain_config(int hv +@@ -622,7 +635,7 @@ void xenstore_parse_domain_config(int hv #ifdef CONFIG_STUBDOM if (pasprintf(&danger_buf, "%s/device/vbd/%s", danger_path, e_danger[i]) == -1) continue; @@ -82,10 +70,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c pstrcpy(bs->filename, sizeof(bs->filename), params); } #else -@@ -646,7 +659,7 @@ void xenstore_parse_domain_config(int hv - } - } - pstrcpy(bs->filename, sizeof(bs->filename), params); +@@ -668,7 +681,7 @@ void xenstore_parse_domain_config(int hv + + fprintf(stderr, "Using file %s in read-%s mode\n", bs->filename, is_readonly ? "only" : "write"); + - if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { + if (bdrv_open2(bs, params, flags|BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0"); diff --git a/blktap-pv-cdrom.patch b/blktap-pv-cdrom.patch index 64736af..2fec572 100644 --- a/blktap-pv-cdrom.patch +++ b/blktap-pv-cdrom.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/blktap/drivers/block-cdrom.c +Index: xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/blktap/drivers/block-cdrom.c ++++ xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c @@ -0,0 +1,535 @@ +/* block-cdrom.c + * @@ -538,10 +538,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/block-cdrom.c + .td_get_parent_id = tdcdrom_get_parent_id, + .td_validate_parent = tdcdrom_validate_parent +}; -Index: xen-4.0.0-testing/xen/include/public/io/cdromif.h +Index: xen-4.0.1-testing/xen/include/public/io/cdromif.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/xen/include/public/io/cdromif.h ++++ xen-4.0.1-testing/xen/include/public/io/cdromif.h @@ -0,0 +1,122 @@ +/****************************************************************************** + * cdromif.h @@ -665,10 +665,10 @@ Index: xen-4.0.0-testing/xen/include/public/io/cdromif.h + sizeof(struct vcd_generic_command) - sizeof(struct request_sense)) + +#endif -Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile +Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/Makefile -+++ xen-4.0.0-testing/tools/blktap/drivers/Makefile +--- xen-4.0.1-testing.orig/tools/blktap/drivers/Makefile ++++ xen-4.0.1-testing/tools/blktap/drivers/Makefile @@ -28,8 +28,9 @@ CFLAGS += -DMEMSHR MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a endif @@ -676,7 +676,7 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile -LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread -LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz +LDFLAGS_xen := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) -+LDFLAGS_blktapctrl := $(LDFLAGS_xen) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread ++LDFLAGS_blktapctrl := $(LDFLAGS_xen) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread $(LDFLAGS_xen) +LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz $(LDFLAGS_xen) BLK-OBJS-y := block-aio.o @@ -689,10 +689,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile BLK-OBJS-y += aes.o BLK-OBJS-y += tapaio.o BLK-OBJS-$(CONFIG_Linux) += blk_linux.o -Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h +Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.h -+++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h +--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.h ++++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h @@ -137,6 +137,9 @@ struct tap_disk { int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id); int (*td_validate_parent)(struct disk_driver *dd, @@ -737,10 +737,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h }; typedef struct driver_list_entry { -Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h +Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/lib/blktaplib.h -+++ xen-4.0.0-testing/tools/blktap/lib/blktaplib.h +--- xen-4.0.1-testing.orig/tools/blktap/lib/blktaplib.h ++++ xen-4.0.1-testing/tools/blktap/lib/blktaplib.h @@ -220,6 +220,7 @@ typedef struct msg_pid { #define DISK_TYPE_RAM 3 #define DISK_TYPE_QCOW 4 @@ -749,10 +749,10 @@ Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h /* xenstore/xenbus: */ #define DOMNAME "Domain-0" -Index: xen-4.0.0-testing/xen/include/public/io/blkif.h +Index: xen-4.0.1-testing/xen/include/public/io/blkif.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/io/blkif.h -+++ xen-4.0.0-testing/xen/include/public/io/blkif.h +--- xen-4.0.1-testing.orig/xen/include/public/io/blkif.h ++++ xen-4.0.1-testing/xen/include/public/io/blkif.h @@ -76,6 +76,10 @@ * "feature-flush-cache" node! */ @@ -764,10 +764,10 @@ Index: xen-4.0.0-testing/xen/include/public/io/blkif.h /* * Maximum scatter/gather segments per request. -Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.c +Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.c -+++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.c +--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.c ++++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c @@ -735,6 +735,22 @@ static void get_io_request(struct td_sta goto out; } @@ -791,10 +791,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.c default: DPRINTF("Unknown block operation\n"); break; -Index: xen-4.0.0-testing/tools/python/xen/xend/server/BlktapController.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/BlktapController.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/BlktapController.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/BlktapController.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py @@ -20,6 +20,7 @@ blktap1_disk_types = [ 'ram', 'qcow', diff --git a/blktap.patch b/blktap.patch index 59cc25e..eefcac8 100644 --- a/blktap.patch +++ b/blktap.patch @@ -1,10 +1,10 @@ bug #239173 bug #242953 -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -3290,7 +3290,7 @@ class XendDomainInfo: (fn, BOOTLOADER_LOOPBACK_DEVICE)) @@ -14,10 +14,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py 'device': BOOTLOADER_LOOPBACK_DEVICE, } -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -397,9 +397,9 @@ void xenstore_parse_domain_config(int hv { char **e_danger = NULL; @@ -30,7 +30,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c unsigned int len, num, hd_index, pci_devid = 0; BlockDriverState *bs; BlockDriver *format; -@@ -439,6 +439,14 @@ void xenstore_parse_domain_config(int hv +@@ -444,6 +444,14 @@ void xenstore_parse_domain_config(int hv e_danger[i]); if (bpath == NULL) continue; @@ -45,8 +45,8 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c /* read the name of the device */ if (pasprintf(&buf, "%s/dev", bpath) == -1) continue; -@@ -715,6 +723,7 @@ void xenstore_parse_domain_config(int hv - free(danger_type); +@@ -738,6 +746,7 @@ void xenstore_parse_domain_config(int hv + free(mode); free(params); free(dev); + free(btype); diff --git a/blktapctrl-default-to-ioemu.patch b/blktapctrl-default-to-ioemu.patch index f4633c0..6c79a4d 100644 --- a/blktapctrl-default-to-ioemu.patch +++ b/blktapctrl-default-to-ioemu.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h +Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.h -+++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h +--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.h ++++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h @@ -168,7 +168,7 @@ static disk_info_t aio_disk = { "raw image (aio)", "aio", diff --git a/block-dmmd b/block-dmmd index eb52a02..cfe81f0 100644 --- a/block-dmmd +++ b/block-dmmd @@ -98,9 +98,9 @@ function activate_lvm () { # First scan for PVs and VGs; we may then have to activate the VG # first, but can ignore errors: - /sbin/pvscan || : - /sbin/vgscan --mknodes || : - /sbin/vgchange -ay ${1%/*} || : +# /sbin/pvscan || : +# /sbin/vgscan --mknodes || : +# /sbin/vgchange -ay ${1%/*} || : /sbin/lvchange -ay $1 return $? } @@ -110,9 +110,9 @@ function deactivate_lvm () /sbin/lvchange -an $1 if [ $? -eq 0 ]; then # We may have to deactivate the VG now, but can ignore errors: - /sbin/vgchange -an ${1%/*} || : +# /sbin/vgchange -an ${1%/*} || : # Maybe we need to cleanup the LVM cache: - /sbin/vgscan --mknodes || : +# /sbin/vgscan --mknodes || : return 0 fi return 1 diff --git a/block-flags.diff b/block-flags.diff deleted file mode 100644 index 7eae479..0000000 --- a/block-flags.diff +++ /dev/null @@ -1,34 +0,0 @@ -Index: xen-3.5.0-testing/tools/hotplug/Linux/block -=================================================================== ---- xen-3.5.0-testing.orig/tools/hotplug/Linux/block -+++ xen-3.5.0-testing/tools/hotplug/Linux/block -@@ -225,11 +225,14 @@ case "$command" in - ;; - - file) -+ lo_flags="" -+ [ "${mode/S}" = "$mode" ] || lo_flags="-y" - # Canonicalise the file, for sharing check comparison, and the mode - # for ease of use here. - file=$(readlink -f "$p") || fatal "$p does not exist." - test -f "$file" || fatal "$file does not exist." - mode=$(canonicalise_mode "$mode") -+ [ "$mode" = "r" ] && lo_flags="$lo_flags -r" - - claim_lock "block" - -@@ -338,12 +341,12 @@ mount it read-write in a guest domain." - fatal 'Failed to find an unused loop device' - fi - -- losetup "$loopdev" "$file" && losetup_failure="" && break -+ losetup $lo_flags "$loopdev" "$file" && losetup_failure="" && break - done - - if [ "$losetup_failure" ] - then -- fatal 'losetup $loopdev $file' -+ fatal 'losetup $lo_flags $loopdev $file' - fi - - xenstore_write "$XENBUS_PATH/node" "$loopdev" diff --git a/block-losetup-retry.diff b/block-losetup-retry.diff deleted file mode 100644 index ea3d73c..0000000 --- a/block-losetup-retry.diff +++ /dev/null @@ -1,211 +0,0 @@ -Index: xen-3.5.0-testing/tools/hotplug/Linux/block -=================================================================== ---- xen-3.5.0-testing.orig/tools/hotplug/Linux/block -+++ xen-3.5.0-testing/tools/hotplug/Linux/block -@@ -241,107 +241,111 @@ case "$command" in - mount it read-write in a guest domain." - fi - -- loopdev='' -- for dev in /dev/loop* -+ losetup_failure=1 -+ for do_losetup in 1 2 3 - do -- if [ ! -b "$dev" ] -- then -- continue -- fi -- -- f=$(losetup "$dev" 2>/dev/null) || f='' -- -- if [ "$f" ] -- then -- # $dev is in use. Check sharing. -- if [ "x$mode" = 'x!' ] -+ loopdev='' -+ for dev in /dev/loop* -+ do -+ if [ ! -b "$dev" ] - then - continue - fi - -- f=$(echo "$f" | sed -e 's/.*(\(.*\)).*/\1/g') -+ f=$(losetup "$dev" 2>/dev/null) || f='' - -- # $f is the filename, as read from losetup, but the loopback -- # driver truncates filenames at 64 characters, so we need to go -- # trawling through the store if it's longer than that. Truncation -- # is indicated by an asterisk at the end of the filename. -- if expr index "$f" '*' >/dev/null -+ if [ "$f" ] - then -- found="" -- for dom in $(xenstore-list "$XENBUS_BASE_PATH") -- do -- for domdev in $(xenstore-list "$XENBUS_BASE_PATH/$dom") -+ # $dev is in use. Check sharing. -+ if [ "x$mode" = 'x!' ] -+ then -+ continue -+ fi -+ -+ f=$(echo "$f" | sed -e 's/.*(\(.*\)).*/\1/g') -+ -+ # $f is the filename, as read from losetup, but the loopback -+ # driver truncates filenames at 64 characters, so we need to go -+ # trawling through the store if it's longer than that. Truncation -+ # is indicated by an asterisk at the end of the filename. -+ if expr index "$f" '*' >/dev/null -+ then -+ found="" -+ for dom in $(xenstore-list "$XENBUS_BASE_PATH") - do -- d=$(xenstore_read_default \ -- "$XENBUS_BASE_PATH/$dom/$domdev/node" "") -- if [ "$d" = "$dev" ] -- then -- f=$(xenstore_read "$XENBUS_BASE_PATH/$dom/$domdev/params") -- found=1 -- break 2 -- fi -+ for domdev in $(xenstore-list "$XENBUS_BASE_PATH/$dom") -+ do -+ d=$(xenstore_read_default \ -+ "$XENBUS_BASE_PATH/$dom/$domdev/node" "") -+ if [ "$d" = "$dev" ] -+ then -+ f=$(xenstore_read "$XENBUS_BASE_PATH/$dom/$domdev/params") -+ found=1 -+ break 2 -+ fi -+ done - done -- done - -- if [ ! "$found" ] -- then -- # This loopback device is in use by someone else, so skip it. -- log debug "Loopback sharing check skips device $dev." -- continue -+ if [ ! "$found" ] -+ then -+ # This loopback device is in use by someone else, so skip it. -+ log debug "Loopback sharing check skips device $dev." -+ continue -+ fi - fi -- fi - -- # Canonicalise the filename for the comparison. -+ # Canonicalise the filename for the comparison. - -- # I have seen this readlink fails because the filename given by -- # losetup is only the basename. This cannot happen when the loop -- # device is set up through this script, because file is -- # canonicalised above, but it may happen when loop devices are set -- # up some other way. This readlink may also conceivably fail if -- # the file backing this loop device has been removed. -+ # I have seen this readlink fails because the filename given by -+ # losetup is only the basename. This cannot happen when the loop -+ # device is set up through this script, because file is -+ # canonicalised above, but it may happen when loop devices are set -+ # up some other way. This readlink may also conceivably fail if -+ # the file backing this loop device has been removed. - -- # For maximum safety, in the case that $f does not resolve, we -- # assume that $file and $f are in the same directory. -+ # For maximum safety, in the case that $f does not resolve, we -+ # assume that $file and $f are in the same directory. - -- # If you create a loopback filesystem, remove it and continue to -- # run on it, and then create another file with the same name, then -- # this check will block that -- don't do that. -+ # If you create a loopback filesystem, remove it and continue to -+ # run on it, and then create another file with the same name, then -+ # this check will block that -- don't do that. - -- # If you create loop devices through some other mechanism, use -- # relative filenames, and then use the same filename through this -- # script, then this check will block that -- don't do that either. -+ # If you create loop devices through some other mechanism, use -+ # relative filenames, and then use the same filename through this -+ # script, then this check will block that -- don't do that either. - -- f=$(readlink -f "$f" || echo $(dirname "$file")/$(basename "$f")) -+ f=$(readlink -f "$f" || echo $(dirname "$file")/$(basename "$f")) - - -- if [ "$f" = "$file" ] -- then -- check_file_sharing "$file" "$dev" "$mode" -- fi -- else -- # $dev is not in use, so we'll remember it for use later; we want -- # to finish the sharing check first. -+ if [ "$f" = "$file" ] -+ then -+ check_file_sharing "$file" "$dev" "$mode" -+ fi -+ else -+ # $dev is not in use, so we'll remember it for use later; we want -+ # to finish the sharing check first. - -- if [ "$loopdev" = '' ] -- then -- loopdev="$dev" -+ if [ "$loopdev" = '' ] -+ then -+ loopdev="$dev" -+ fi - fi -+ done -+ -+ if [ "$loopdev" = '' ] -+ then -+ release_lock "block" -+ fatal 'Failed to find an unused loop device' - fi -+ -+ losetup "$loopdev" "$file" && losetup_failure="" && break - done - -- if [ "$loopdev" = '' ] -+ if [ "$losetup_failure" ] - then -- release_lock "block" -- fatal 'Failed to find an unused loop device' -+ fatal 'losetup $loopdev $file' - fi - -- if LANG=C losetup -h 2>&1 | grep read-only >/dev/null -- then -- roflag="-$mode"; roflag="${roflag#-w}"; roflag="${roflag#-!}" -- else -- roflag='' -- fi -- do_or_die losetup $roflag "$loopdev" "$file" - xenstore_write "$XENBUS_PATH/node" "$loopdev" - write_dev "$loopdev" - release_lock "block" -@@ -364,8 +368,18 @@ mount it read-write in a guest domain." - - file) - node=$(xenstore_read "$XENBUS_PATH/node") -- losetup -d "$node" -- exit 0 -+ -+ #In case the loopback is temporarily blocked, retry the losetup -d. -+ for i in 1 2 3 4 5 -+ do -+ if losetup -d "$node" -+ then -+ exit 0 -+ fi -+ sleep 1 -+ done -+ log err "losetup -d $node failed." -+ exit 1 - ;; - - "") diff --git a/bridge-bonding.diff b/bridge-bonding.diff index 0d09fed..c9b0e6e 100644 --- a/bridge-bonding.diff +++ b/bridge-bonding.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge @@ -245,6 +245,9 @@ op_start () { claim_lock "network-bridge" diff --git a/bridge-opensuse.patch b/bridge-opensuse.patch index 40b413d..2c3ed96 100644 --- a/bridge-opensuse.patch +++ b/bridge-opensuse.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge @@ -270,19 +270,19 @@ op_stop () { transfer_addrs ${bridge} ${pdev} if ! ifdown ${bridge}; then diff --git a/bridge-record-creation.patch b/bridge-record-creation.patch index 682ddce..870f007 100644 --- a/bridge-record-creation.patch +++ b/bridge-record-creation.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge @@ -253,6 +253,11 @@ op_start () { create_bridge ${tdev} diff --git a/bridge-vlan.diff b/bridge-vlan.diff index 0aa72f0..897daab 100644 --- a/bridge-vlan.diff +++ b/bridge-vlan.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge @@ -193,6 +193,28 @@ antispoofing () { iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT } diff --git a/build-tapdisk-ioemu.patch b/build-tapdisk-ioemu.patch index 3272ce9..9b9c70d 100644 --- a/build-tapdisk-ioemu.patch +++ b/build-tapdisk-ioemu.patch @@ -15,10 +15,10 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 17 ----------------- 4 files changed, 17 insertions(+), 26 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile -+++ xen-4.0.0-testing/tools/ioemu-remote/Makefile +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile @@ -46,14 +46,6 @@ $(filter %-user,$(SUBDIR_RULES)): libqem recurse-all: $(SUBDIR_RULES) @@ -56,10 +56,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile ###################################################################### # libqemu_common.a: Target independent part of system emulation. The # long term path is to suppress *all* target specific code in case of -Index: xen-4.0.0-testing/tools/ioemu-remote/configure +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/configure =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/configure -+++ xen-4.0.0-testing/tools/ioemu-remote/configure +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/configure ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/configure @@ -1511,7 +1511,7 @@ bsd) ;; esac @@ -69,10 +69,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/configure if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then tools="qemu-img\$(EXESUF) $tools" if [ "$linux" = "yes" ] ; then -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-tool.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-tool.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-tool.c -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-tool.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-tool.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-tool.c @@ -68,7 +68,7 @@ void qemu_bh_delete(QEMUBH *bh) qemu_free(bh); } @@ -82,10 +82,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-tool.c IOCanRWHandler *fd_read_poll, IOHandler *fd_read, IOHandler *fd_write, -Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c -+++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c @@ -12,34 +12,12 @@ extern void qemu_aio_init(void); diff --git a/capslock_enable.patch b/capslock_enable.patch index cdcd18e..ee5946c 100644 --- a/capslock_enable.patch +++ b/capslock_enable.patch @@ -1,7 +1,8 @@ -diff -r c2f19aa8a584 tools/ioemu-remote/vnc.c ---- a/tools/ioemu-remote/vnc.c Wed Apr 07 11:13:49 2010 +0800 -+++ b/tools/ioemu-remote/vnc.c Mon May 24 13:56:22 2010 +0800 -@@ -1326,6 +1326,11 @@ +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c +=================================================================== +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vnc.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c +@@ -1326,6 +1326,11 @@ static void do_key_event(VncState *vs, i } break; case 0x3a: /* CapsLock */ diff --git a/cdrom-removable.patch b/cdrom-removable.patch index 6f07661..a879052 100644 --- a/cdrom-removable.patch +++ b/cdrom-removable.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/server/HalDaemon.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/HalDaemon.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xend/server/HalDaemon.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/HalDaemon.py @@ -0,0 +1,243 @@ +#!/usr/bin/env python +# -*- mode: python; -*- @@ -246,10 +246,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/HalDaemon.py + print 'Falling off end' + + -Index: xen-4.0.0-testing/tools/python/xen/xend/server/Hald.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/Hald.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xend/server/Hald.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/Hald.py @@ -0,0 +1,125 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -376,10 +376,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/Hald.py + watcher.run() + time.sleep(10) + watcher.shutdown() -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvServer.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvServer.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py @@ -56,6 +56,7 @@ from xen.web.SrvDir import SrvDir from SrvRoot import SrvRoot @@ -397,10 +397,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py def create(): root = SrvDir() -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -18,6 +18,7 @@ #include "exec-all.h" #include "sysemu.h" @@ -409,7 +409,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c #include "hw.h" #include "pci.h" #include "qemu-timer.h" -@@ -548,6 +549,21 @@ void xenstore_parse_domain_config(int hv +@@ -553,6 +554,21 @@ void xenstore_parse_domain_config(int hv #endif bs = bdrv_new(dev); @@ -431,7 +431,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c /* check if it is a cdrom */ if (danger_type && !strcmp(danger_type, "cdrom")) { bdrv_set_type_hint(bs, BDRV_TYPE_CDROM); -@@ -938,6 +954,50 @@ void xenstore_record_dm_state(const char +@@ -961,6 +977,50 @@ void xenstore_record_dm_state(const char xenstore_record_dm("state", state); } @@ -482,7 +482,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c void xenstore_process_event(void *opaque) { char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL; -@@ -968,6 +1028,11 @@ void xenstore_process_event(void *opaque +@@ -991,6 +1051,11 @@ void xenstore_process_event(void *opaque xenstore_watch_callbacks[i].cb(vec[XS_WATCH_TOKEN], xenstore_watch_callbacks[i].opaque); diff --git a/checkpoint-rename.patch b/checkpoint-rename.patch index 4471a6c..a6032d5 100644 --- a/checkpoint-rename.patch +++ b/checkpoint-rename.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py @@ -165,7 +165,7 @@ def save(fd, dominfo, network, live, dst dominfo.destroy() dominfo.testDeviceComplete() diff --git a/cpu-pools-docs.patch b/cpu-pools-docs.patch index 9e4e493..a04e4ce 100644 --- a/cpu-pools-docs.patch +++ b/cpu-pools-docs.patch @@ -1,5 +1,7 @@ ---- a/docs/xen-api/coversheet.tex -+++ b/docs/xen-api/coversheet.tex +Index: xen-4.0.1-testing/docs/xen-api/coversheet.tex +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/coversheet.tex ++++ xen-4.0.1-testing/docs/xen-api/coversheet.tex @@ -52,6 +52,7 @@ Mike Day, IBM & Daniel Veillard, Red Hat Jim Fehlig, Novell & Tom Wilkie, University of Cambridge \\ Jon Harrop, XenSource & Yosuke Iwamatsu, NEC \\ @@ -8,8 +10,10 @@ \end{tabular} \end{large} ---- a/docs/xen-api/revision-history.tex -+++ b/docs/xen-api/revision-history.tex +Index: xen-4.0.1-testing/docs/xen-api/revision-history.tex +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/revision-history.tex ++++ xen-4.0.1-testing/docs/xen-api/revision-history.tex @@ -50,6 +50,12 @@ between classes. Added host.PSCSI\_HBAs and VM.DSCSI\_HBAs fields.\tabularnewline @@ -23,8 +27,10 @@ \end{tabular} \end{center} \end{flushleft} ---- a/docs/xen-api/xenapi-coversheet.tex -+++ b/docs/xen-api/xenapi-coversheet.tex +Index: xen-4.0.1-testing/docs/xen-api/xenapi-coversheet.tex +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/xenapi-coversheet.tex ++++ xen-4.0.1-testing/docs/xen-api/xenapi-coversheet.tex @@ -17,12 +17,12 @@ \newcommand{\coversheetlogo}{xen.eps} @@ -40,8 +46,10 @@ %% Document authors \newcommand{\docauthors}{ ---- a/docs/xen-api/xenapi-datamodel-graph.dot -+++ b/docs/xen-api/xenapi-datamodel-graph.dot +Index: xen-4.0.1-testing/docs/xen-api/xenapi-datamodel-graph.dot +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/xenapi-datamodel-graph.dot ++++ xen-4.0.1-testing/docs/xen-api/xenapi-datamodel-graph.dot @@ -14,7 +14,7 @@ fontname="Verdana"; node [ shape=box ]; session VM host network VIF PIF SR VDI VBD PBD user; @@ -59,8 +67,10 @@ +cpu_pool -> VM [ arrowhead="crow", arrowtail="none" ] +host -> cpu_pool [ arrowhead="crow", arrowtail="none" ] } ---- a/docs/xen-api/xenapi-datamodel.tex -+++ b/docs/xen-api/xenapi-datamodel.tex +Index: xen-4.0.1-testing/docs/xen-api/xenapi-datamodel.tex +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/xenapi-datamodel.tex ++++ xen-4.0.1-testing/docs/xen-api/xenapi-datamodel.tex @@ -56,6 +56,7 @@ Name & Description \\ {\tt debug} & A basic class for testing \\ {\tt XSPolicy} & A class for handling Xen Security Policies \\ @@ -79,7 +89,7 @@ \hline \end{tabular}\end{center} -@@ -499,6 +503,56 @@ error code and a message describing the +@@ -499,6 +503,56 @@ error code and a message describing the \begin{verbatim}SECURITY_ERROR(xserr, message)\end{verbatim} \begin{center}\rule{10em}{0.1pt}\end{center} diff --git a/cpu-pools-libxc.patch b/cpu-pools-libxc.patch index 65cd57d..7dafe02 100644 --- a/cpu-pools-libxc.patch +++ b/cpu-pools-libxc.patch @@ -1,5 +1,7 @@ ---- a/tools/libxc/Makefile -+++ b/tools/libxc/Makefile +Index: xen-4.0.1-testing/tools/libxc/Makefile +=================================================================== +--- xen-4.0.1-testing.orig/tools/libxc/Makefile ++++ xen-4.0.1-testing/tools/libxc/Makefile @@ -8,6 +8,7 @@ CTRL_SRCS-y := CTRL_SRCS-y += xc_core.c CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c @@ -8,8 +10,10 @@ CTRL_SRCS-y += xc_domain.c CTRL_SRCS-y += xc_evtchn.c CTRL_SRCS-y += xc_misc.c +Index: xen-4.0.1-testing/tools/libxc/xc_cpupool.c +=================================================================== --- /dev/null -+++ b/tools/libxc/xc_cpupool.c ++++ xen-4.0.1-testing/tools/libxc/xc_cpupool.c @@ -0,0 +1,165 @@ +/****************************************************************************** + * xc_cpupool.c @@ -176,8 +180,10 @@ + + return 0; +} ---- a/tools/libxc/xc_domain.c -+++ b/tools/libxc/xc_domain.c +Index: xen-4.0.1-testing/tools/libxc/xc_domain.c +=================================================================== +--- xen-4.0.1-testing.orig/tools/libxc/xc_domain.c ++++ xen-4.0.1-testing/tools/libxc/xc_domain.c @@ -220,6 +220,7 @@ int xc_domain_getinfo(int xc_handle, info->cpu_time = domctl.u.getdomaininfo.cpu_time; info->nr_online_vcpus = domctl.u.getdomaininfo.nr_online_vcpus; @@ -186,9 +192,11 @@ memcpy(info->handle, domctl.u.getdomaininfo.handle, sizeof(xen_domain_handle_t)); ---- a/tools/libxc/xenctrl.h -+++ b/tools/libxc/xenctrl.h -@@ -171,6 +171,7 @@ typedef struct xc_dominfo { +Index: xen-4.0.1-testing/tools/libxc/xenctrl.h +=================================================================== +--- xen-4.0.1-testing.orig/tools/libxc/xenctrl.h ++++ xen-4.0.1-testing/tools/libxc/xenctrl.h +@@ -161,6 +161,7 @@ typedef struct xc_dominfo { unsigned int nr_online_vcpus; unsigned int max_vcpu_id; xen_domain_handle_t handle; @@ -196,7 +204,7 @@ } xc_dominfo_t; typedef xen_domctl_getdomaininfo_t xc_domaininfo_t; -@@ -502,6 +503,100 @@ int xc_domain_setdebugging(int xc_handle +@@ -492,6 +493,100 @@ int xc_domain_setdebugging(int xc_handle unsigned int enable); /* diff --git a/cpu-pools-libxen.patch b/cpu-pools-libxen.patch index bb4ab33..14d4be7 100644 --- a/cpu-pools-libxen.patch +++ b/cpu-pools-libxen.patch @@ -1,17 +1,17 @@ -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_all.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_all.h =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_all.h -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_all.h +--- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_all.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_all.h @@ -37,4 +37,5 @@ #include #include #include +#include #endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool.h @@ -0,0 +1,424 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -437,10 +437,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool.h + + +#endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -472,10 +472,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h +struct xen_cpu_pool_record_opt_set; + +#endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host.h =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_host.h -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host.h +--- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_host.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host.h @@ -29,7 +29,7 @@ #include #include @@ -505,10 +505,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host.h + xen_host host); + #endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host_cpu.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host_cpu.h =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_host_cpu.h -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host_cpu.h +--- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_host_cpu.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host_cpu.h @@ -22,6 +22,7 @@ #include #include @@ -544,10 +544,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host_cpu.h + + #endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_vm.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_vm.h =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_vm.h -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_vm.h +--- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_vm.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_vm.h @@ -34,6 +34,7 @@ #include #include @@ -599,10 +599,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_vm.h +xen_vm_cpu_pool_migrate(xen_session *session, xen_vm vm, xen_cpu_pool cpu_pool); + #endif -Index: xen-4.0.0-testing/tools/libxen/src/xen_cpu_pool.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_cpu_pool.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/libxen/src/xen_cpu_pool.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_cpu_pool.c @@ -0,0 +1,671 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -1275,10 +1275,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_cpu_pool.c + return session->ok; +} + -Index: xen-4.0.0-testing/tools/libxen/src/xen_host.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_host.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_host.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_host.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_host.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_host.c @@ -30,6 +30,7 @@ #include #include @@ -1330,10 +1330,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_host.c + return session->ok; +} + -Index: xen-4.0.0-testing/tools/libxen/src/xen_host_cpu.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_host_cpu.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_host_cpu.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_host_cpu.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_host_cpu.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_host_cpu.c @@ -24,6 +24,7 @@ #include #include @@ -1397,10 +1397,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_host_cpu.c + + + -Index: xen-4.0.0-testing/tools/libxen/src/xen_vm.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_vm.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_vm.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_vm.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_vm.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_vm.c @@ -36,6 +36,7 @@ #include #include @@ -1504,10 +1504,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_vm.c +} + + -Index: xen-4.0.0-testing/tools/libxen/test/test_bindings.c +Index: xen-4.0.1-testing/tools/libxen/test/test_bindings.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/test/test_bindings.c -+++ xen-4.0.0-testing/tools/libxen/test/test_bindings.c +--- xen-4.0.1-testing.orig/tools/libxen/test/test_bindings.c ++++ xen-4.0.1-testing/tools/libxen/test/test_bindings.c @@ -28,6 +28,7 @@ #include diff --git a/cpu-pools-python.patch b/cpu-pools-python.patch index 49b0364..21472db 100644 --- a/cpu-pools-python.patch +++ b/cpu-pools-python.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c +Index: xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/lowlevel/xc/xc.c -+++ xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c +--- xen-4.0.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c ++++ xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c @@ -106,8 +106,8 @@ static PyObject *pyxc_domain_create(XcOb static char *kwd_list[] = { "domid", "ssidref", "handle", "flags", "target", NULL }; @@ -289,10 +289,10 @@ Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c { NULL, NULL, 0, NULL } }; -Index: xen-4.0.0-testing/tools/python/xen/util/sxputils.py +Index: xen-4.0.1-testing/tools/python/xen/util/sxputils.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/util/sxputils.py ++++ xen-4.0.1-testing/tools/python/xen/util/sxputils.py @@ -0,0 +1,64 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -358,10 +358,10 @@ Index: xen-4.0.0-testing/tools/python/xen/util/sxputils.py + return sxphash + + -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py @@ -51,6 +51,7 @@ from XendDPCI import XendDPCI from XendPSCSI import XendPSCSI, XendPSCSI_HBA from XendDSCSI import XendDSCSI, XendDSCSI_HBA @@ -553,10 +553,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py # Xen API: Class VBD # ---------------------------------------------------------------- -Index: xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py @@ -0,0 +1,903 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -1461,10 +1461,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py + + unbound_cpus = classmethod(unbound_cpus) + -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -134,6 +134,7 @@ XENAPI_CFG_TO_LEGACY_CFG = { 'PV_bootloader': 'bootloader', 'PV_bootloader_args': 'bootloader_args', @@ -1505,10 +1505,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py 'superpages': 0, 'description': '', } -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConstants.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConstants.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConstants.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConstants.py @@ -133,6 +133,8 @@ VTPM_DELETE_SCRIPT = auxbin.scripts_dir( XS_VMROOT = "/vm/" @@ -1518,10 +1518,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py NR_PCI_FUNC = 8 NR_PCI_DEV = 32 NR_PCI_DEVFN = NR_PCI_FUNC * NR_PCI_DEV -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -60,6 +60,7 @@ from xen.xend.xenstore.xsutil import Get from xen.xend.xenstore.xswatch import xswatch from xen.xend.XendConstants import * @@ -1574,10 +1574,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py def get_power_state(self): return XEN_API_VM_POWER_STATE[self._stateGet()] def get_platform(self): -Index: xen-4.0.0-testing/tools/python/xen/xend/XendError.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendError.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendError.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendError.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendError.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendError.py @@ -18,6 +18,7 @@ from xmlrpclib import Fault @@ -1613,10 +1613,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendError.py class VDIError(XendAPIError): def __init__(self, error, vdi): XendAPIError.__init__(self) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py @@ -43,6 +43,7 @@ from XendStateStore import XendStateStor from XendMonitor import XendMonitor from XendPPCI import XendPPCI @@ -1690,10 +1690,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py 'max_free_memory', 'max_para_memory', 'max_hvm_memory', -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvServer.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvServer.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py @@ -52,6 +52,7 @@ from xen.xend import XendNode, XendOptio from xen.xend.XendLogging import log from xen.xend.XendClient import XEN_API_SOCKET @@ -1715,10 +1715,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py # Reaching this point means we can auto start domains try: xenddomain().autostart_domains() -Index: xen-4.0.0-testing/tools/python/xen/xend/server/XMLRPCServer.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/XMLRPCServer.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/XMLRPCServer.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/XMLRPCServer.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/XMLRPCServer.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/XMLRPCServer.py @@ -33,6 +33,7 @@ from xen.xend.XendClient import XML_RPC_ from xen.xend.XendConstants import DOM_STATE_RUNNING from xen.xend.XendLogging import log @@ -1750,10 +1750,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/XMLRPCServer.py # Functions in XendNode and XendDmesg for type, lst, n in [(XendNode, ['info', 'pciinfo', 'send_debug_keys', -Index: xen-4.0.0-testing/tools/python/xen/xm/create.dtd +Index: xen-4.0.1-testing/tools/python/xen/xm/create.dtd =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.dtd -+++ xen-4.0.0-testing/tools/python/xen/xm/create.dtd +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.dtd ++++ xen-4.0.1-testing/tools/python/xen/xm/create.dtd @@ -50,6 +50,7 @@ s3_integrity CDATA #REQUIRED vcpus_max CDATA #REQUIRED @@ -1762,10 +1762,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.dtd actions_after_shutdown %NORMAL_EXIT; #REQUIRED actions_after_reboot %NORMAL_EXIT; #REQUIRED actions_after_crash %CRASH_BEHAVIOUR; #REQUIRED -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py @@ -659,6 +659,10 @@ gopts.var('suppress_spurious_page_faults fn=set_bool, default=None, use="""Do not inject spurious page faults into this guest""") @@ -1777,7 +1777,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py gopts.var('pci_msitranslate', val='TRANSLATE', fn=set_int, default=1, use="""Global PCI MSI-INTx translation flag (0=disable; -@@ -1149,6 +1153,8 @@ def make_config(vals): +@@ -1157,6 +1161,8 @@ def make_config(vals): config.append(['localtime', vals.localtime]) if vals.oos: config.append(['oos', vals.oos]) @@ -1786,10 +1786,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py config_image = configure_image(vals) if vals.bootloader: -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py @@ -56,6 +56,7 @@ from xen.util.xmlrpcclient import Server import xen.util.xsm.xsm as security from xen.util.xsm.xsm import XSMError @@ -1939,7 +1939,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py if use_long: map(PrettyPrint.prettyprint, doms) -@@ -1839,6 +1892,13 @@ def xm_info(args): +@@ -1841,6 +1894,13 @@ def xm_info(args): else: return "" @@ -1953,7 +1953,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py info = { "host": getVal(["name_label"]), "release": getVal(["software_version", "release"]), -@@ -1850,6 +1910,7 @@ def xm_info(args): +@@ -1852,6 +1912,7 @@ def xm_info(args): "threads_per_core": getVal(["cpu_configuration", "threads_per_core"]), "cpu_mhz": getCpuMhz(), "hw_caps": getCpuFeatures(), @@ -1961,7 +1961,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py "total_memory": int(host_metrics_record["memory_total"])/1024/1024, "free_memory": int(host_metrics_record["memory_free"])/1024/1024, "xen_major": getVal(["software_version", "xen_major"]), -@@ -3484,6 +3545,169 @@ def xm_tmem_shared_auth(args): +@@ -3486,6 +3547,169 @@ def xm_tmem_shared_auth(args): else: return server.xend.node.tmem_shared_auth(domid,uuid_str,auth) @@ -2131,7 +2131,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py commands = { "shell": xm_shell, -@@ -3569,6 +3793,14 @@ commands = { +@@ -3571,6 +3795,14 @@ commands = { "usb-list-assignable-devices": xm_usb_list_assignable_devices, "usb-hc-create": xm_usb_hc_create, "usb-hc-destroy": xm_usb_hc_destroy, @@ -2146,7 +2146,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py # tmem "tmem-thaw": xm_tmem_thaw, "tmem-freeze": xm_tmem_freeze, -@@ -3602,6 +3834,8 @@ IMPORTED_COMMANDS = [ +@@ -3604,6 +3836,8 @@ IMPORTED_COMMANDS = [ 'resetpolicy', 'getenforce', 'setenforce', @@ -2155,10 +2155,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py ] for c in IMPORTED_COMMANDS: -Index: xen-4.0.0-testing/tools/python/xen/xm/pool-create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/pool-create.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool-create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/pool-create.py @@ -0,0 +1,51 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2211,10 +2211,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/pool-create.py +if __name__ == '__main__': + main(sys.argv) + -Index: xen-4.0.0-testing/tools/python/xen/xm/pool-new.py +Index: xen-4.0.1-testing/tools/python/xen/xm/pool-new.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool-new.py ++++ xen-4.0.1-testing/tools/python/xen/xm/pool-new.py @@ -0,0 +1,50 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2266,10 +2266,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/pool-new.py +if __name__ == '__main__': + main(sys.argv) + -Index: xen-4.0.0-testing/tools/python/xen/xm/pool.py +Index: xen-4.0.1-testing/tools/python/xen/xm/pool.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool.py ++++ xen-4.0.1-testing/tools/python/xen/xm/pool.py @@ -0,0 +1,236 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2507,10 +2507,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/pool.py +def help(): + return str(GOPTS) + -Index: xen-4.0.0-testing/tools/python/xen/xm/xenapi_create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/xenapi_create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/xenapi_create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/xenapi_create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/xenapi_create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/xenapi_create.py @@ -310,6 +310,8 @@ class xenapi_create: get_child_nodes_as_dict(vm, "platform", "key", "value"), "other_config": diff --git a/cpu-pools-xmtest.patch b/cpu-pools-xmtest.patch index dfc3117..8501b53 100644 --- a/cpu-pools-xmtest.patch +++ b/cpu-pools-xmtest.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/xm-test/configure.ac +Index: xen-4.0.1-testing/tools/xm-test/configure.ac =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/configure.ac -+++ xen-4.0.0-testing/tools/xm-test/configure.ac +--- xen-4.0.1-testing.orig/tools/xm-test/configure.ac ++++ xen-4.0.1-testing/tools/xm-test/configure.ac @@ -161,6 +161,7 @@ AC_CONFIG_FILES([ tests/vtpm/Makefile tests/xapi/Makefile @@ -10,16 +10,16 @@ Index: xen-4.0.0-testing/tools/xm-test/configure.ac lib/XmTestReport/xmtest.py lib/XmTestLib/config.py ]) -Index: xen-4.0.0-testing/tools/xm-test/grouptest/cpupool +Index: xen-4.0.1-testing/tools/xm-test/grouptest/cpupool =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/grouptest/cpupool ++++ xen-4.0.1-testing/tools/xm-test/grouptest/cpupool @@ -0,0 +1 @@ +cpupool -Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/NetConfig.py +Index: xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/NetConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/lib/XmTestLib/NetConfig.py -+++ xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/NetConfig.py +--- xen-4.0.1-testing.orig/tools/xm-test/lib/XmTestLib/NetConfig.py ++++ xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/NetConfig.py @@ -56,17 +56,21 @@ def getXendNetConfig(): val = pin.get_val() while val[0] != 'network-script': @@ -51,10 +51,10 @@ Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/NetConfig.py configfile.close() return netenv -Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/XenDomain.py +Index: xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/XenDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/lib/XmTestLib/XenDomain.py -+++ xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/XenDomain.py +--- xen-4.0.1-testing.orig/tools/xm-test/lib/XmTestLib/XenDomain.py ++++ xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/XenDomain.py @@ -181,6 +181,7 @@ class XenDomain: if not self.isManaged: @@ -63,10 +63,10 @@ Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/XenDomain.py else: ret, output = traceCommand("xm new %s" % self.config) if ret != 0: -Index: xen-4.0.0-testing/tools/xm-test/runtest.sh +Index: xen-4.0.1-testing/tools/xm-test/runtest.sh =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/runtest.sh -+++ xen-4.0.0-testing/tools/xm-test/runtest.sh +--- xen-4.0.1-testing.orig/tools/xm-test/runtest.sh ++++ xen-4.0.1-testing/tools/xm-test/runtest.sh @@ -91,7 +91,7 @@ runnable_tests() { echo "Error: ramdisk/initrd.img is from an old version, or is not for this " echo "architecture ($ARCH)." @@ -76,10 +76,10 @@ Index: xen-4.0.0-testing/tools/xm-test/runtest.sh fi # See if xend is running -Index: xen-4.0.0-testing/tools/xm-test/tests/Makefile.am +Index: xen-4.0.1-testing/tools/xm-test/tests/Makefile.am =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/tests/Makefile.am -+++ xen-4.0.0-testing/tools/xm-test/tests/Makefile.am +--- xen-4.0.1-testing.orig/tools/xm-test/tests/Makefile.am ++++ xen-4.0.1-testing/tools/xm-test/tests/Makefile.am @@ -28,7 +28,8 @@ SUBDIRS = \ vcpu-pin \ vtpm \ @@ -90,10 +90,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/Makefile.am EXTRA_DIST = $(SUBDIRS) Makefile.am.template -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py @@ -0,0 +1,72 @@ +#!/usr/bin/python + @@ -167,10 +167,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py +destroyAllDomUs() + + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py @@ -0,0 +1,152 @@ +#!/usr/bin/python + @@ -324,10 +324,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py + FAIL("'Pool-1' not deleted") + + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py @@ -0,0 +1,126 @@ +#!/usr/bin/python + @@ -455,10 +455,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py +for pool in pool_names: + destroyPool(pool, True) + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py @@ -0,0 +1,84 @@ +#!/usr/bin/python + @@ -544,10 +544,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py +# +cleanupPoolsDomains() + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/Makefile.am +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/Makefile.am =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/Makefile.am ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/Makefile.am @@ -0,0 +1,22 @@ +SUBDIRS = + @@ -571,16 +571,16 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/Makefile.am + rm -f *log + rm -f *~ + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/pool1.cfg +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/pool1.cfg =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/pool1.cfg ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/pool1.cfg @@ -0,0 +1 @@ +name="Pool-1" -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/pools.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/pools.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/pools.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/pools.py @@ -0,0 +1,78 @@ +#!/usr/bin/python + @@ -660,10 +660,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/pools.py + break + time.sleep(1) + -Index: xen-4.0.0-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py +Index: xen-4.0.1-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py ++++ xen-4.0.1-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py @@ -0,0 +1,157 @@ +#!/usr/bin/python + @@ -822,10 +822,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py +if pool1 in session.xenapi.cpu_pool.get_all(): + FAIL("cpu_pool.destroy() has not removed pool") + -Index: xen-4.0.0-testing/tools/xm-test/tests/xapi/Makefile.am +Index: xen-4.0.1-testing/tools/xm-test/tests/xapi/Makefile.am =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/tests/xapi/Makefile.am -+++ xen-4.0.0-testing/tools/xm-test/tests/xapi/Makefile.am +--- xen-4.0.1-testing.orig/tools/xm-test/tests/xapi/Makefile.am ++++ xen-4.0.1-testing/tools/xm-test/tests/xapi/Makefile.am @@ -3,7 +3,8 @@ SUBDIRS = TESTS = 01_xapi-vm_basic.test \ 02_xapi-vbd_basic.test \ diff --git a/cpupools-core-fixup.patch b/cpupools-core-fixup.patch index a07a7de..1401cf4 100644 --- a/cpupools-core-fixup.patch +++ b/cpupools-core-fixup.patch @@ -9,9 +9,11 @@ missing adjustments get detected at build time) - remove boot time per-CPU pool assignment messages (bnc#572146) ---- a/xen/arch/x86/domain.c -+++ b/xen/arch/x86/domain.c -@@ -1581,6 +1581,7 @@ int continue_hypercall_on_cpu(int cpu, v +Index: xen-4.0.1-testing/xen/arch/x86/domain.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/domain.c ++++ xen-4.0.1-testing/xen/arch/x86/domain.c +@@ -1585,6 +1585,7 @@ int continue_hypercall_on_cpu(int cpu, v v->arch.schedule_tail = continue_hypercall_on_cpu_helper; v->arch.continue_info = info; @@ -19,7 +21,7 @@ } else { -@@ -1591,8 +1592,7 @@ int continue_hypercall_on_cpu(int cpu, v +@@ -1595,8 +1596,7 @@ int continue_hypercall_on_cpu(int cpu, v info->func = func; info->data = data; @@ -29,8 +31,10 @@ raise_softirq(SCHEDULE_SOFTIRQ); /* Dummy return value will be overwritten by new schedule_tail. */ ---- a/xen/common/sched_credit.c -+++ b/xen/common/sched_credit.c +Index: xen-4.0.1-testing/xen/common/sched_credit.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/sched_credit.c ++++ xen-4.0.1-testing/xen/common/sched_credit.c @@ -176,7 +176,6 @@ struct csched_private { /* * Global variables @@ -54,8 +58,10 @@ .init_domain = csched_dom_init, .destroy_domain = csched_dom_destroy, ---- a/xen/common/softirq.c -+++ b/xen/common/softirq.c +Index: xen-4.0.1-testing/xen/common/softirq.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/softirq.c ++++ xen-4.0.1-testing/xen/common/softirq.c @@ -104,12 +104,15 @@ static void tasklet_schedule_list(struct { BUG_ON(!list_empty(&t->list)); @@ -99,8 +105,10 @@ } /* ---- a/xen/include/public/domctl.h -+++ b/xen/include/public/domctl.h +Index: xen-4.0.1-testing/xen/include/public/domctl.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/public/domctl.h ++++ xen-4.0.1-testing/xen/include/public/domctl.h @@ -35,7 +35,7 @@ #include "xen.h" #include "grant_table.h" @@ -110,8 +118,10 @@ struct xenctl_cpumap { XEN_GUEST_HANDLE_64(uint8) bitmap; ---- a/xen/include/xen/softirq.h -+++ b/xen/include/xen/softirq.h +Index: xen-4.0.1-testing/xen/include/xen/softirq.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/softirq.h ++++ xen-4.0.1-testing/xen/include/xen/softirq.h @@ -50,15 +50,17 @@ struct tasklet bool_t is_scheduled; bool_t is_running; diff --git a/cpupools-core.patch b/cpupools-core.patch index e4e758e..48932a4 100644 --- a/cpupools-core.patch +++ b/cpupools-core.patch @@ -1,7 +1,9 @@ From: Juergen Gross ---- a/xen/arch/x86/acpi/power.c -+++ b/xen/arch/x86/acpi/power.c +Index: xen-4.0.1-testing/xen/arch/x86/acpi/power.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/acpi/power.c ++++ xen-4.0.1-testing/xen/arch/x86/acpi/power.c @@ -234,7 +234,7 @@ static int enter_state(u32 state) return error; } @@ -20,9 +22,11 @@ From: Juergen Gross } static int acpi_get_wake_status(void) ---- a/xen/arch/x86/domain.c -+++ b/xen/arch/x86/domain.c -@@ -1518,42 +1518,52 @@ void sync_vcpu_execstate(struct vcpu *v) +Index: xen-4.0.1-testing/xen/arch/x86/domain.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/domain.c ++++ xen-4.0.1-testing/xen/arch/x86/domain.c +@@ -1522,42 +1522,52 @@ void sync_vcpu_execstate(struct vcpu *v) } struct migrate_info { @@ -92,7 +96,7 @@ From: Juergen Gross info = v->arch.continue_info; if ( info == NULL ) -@@ -1562,16 +1572,12 @@ int continue_hypercall_on_cpu(int cpu, l +@@ -1566,16 +1576,12 @@ int continue_hypercall_on_cpu(int cpu, l if ( info == NULL ) return -ENOMEM; @@ -113,7 +117,7 @@ From: Juergen Gross v->arch.schedule_tail = continue_hypercall_on_cpu_helper; v->arch.continue_info = info; -@@ -1579,17 +1585,17 @@ int continue_hypercall_on_cpu(int cpu, l +@@ -1583,17 +1589,17 @@ int continue_hypercall_on_cpu(int cpu, l else { BUG_ON(info->nest != 0); @@ -135,8 +139,10 @@ From: Juergen Gross return 0; } ---- a/xen/arch/x86/domain_build.c -+++ b/xen/arch/x86/domain_build.c +Index: xen-4.0.1-testing/xen/arch/x86/domain_build.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/domain_build.c ++++ xen-4.0.1-testing/xen/arch/x86/domain_build.c @@ -9,6 +9,7 @@ #include #include @@ -177,8 +183,10 @@ From: Juergen Gross /* Set up CR3 value for write_ptbase */ if ( paging_mode_enabled(d) ) ---- a/xen/arch/x86/microcode.c -+++ b/xen/arch/x86/microcode.c +Index: xen-4.0.1-testing/xen/arch/x86/microcode.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/microcode.c ++++ xen-4.0.1-testing/xen/arch/x86/microcode.c @@ -114,7 +114,7 @@ static int microcode_update_cpu(const vo return err; } @@ -206,9 +214,11 @@ From: Juergen Gross + return continue_hypercall_on_cpu(info->cpu, NULL, + do_microcode_update, info); } ---- a/xen/arch/x86/mm.c -+++ b/xen/arch/x86/mm.c -@@ -242,7 +242,7 @@ void __init arch_init_memory(void) +Index: xen-4.0.1-testing/xen/arch/x86/mm.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/mm.c +@@ -243,7 +243,7 @@ void __init arch_init_memory(void) * Any Xen-heap pages that we will allow to be mapped will have * their domain field set to dom_xen. */ @@ -217,7 +227,7 @@ From: Juergen Gross BUG_ON(dom_xen == NULL); /* -@@ -250,14 +250,14 @@ void __init arch_init_memory(void) +@@ -251,14 +251,14 @@ void __init arch_init_memory(void) * This domain owns I/O pages that are within the range of the page_info * array. Mappings occur at the priv of the caller. */ @@ -234,8 +244,10 @@ From: Juergen Gross BUG_ON(dom_cow == NULL); /* First 1MB of RAM is historically marked as I/O. */ ---- a/xen/arch/x86/platform_hypercall.c -+++ b/xen/arch/x86/platform_hypercall.c +Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/platform_hypercall.c ++++ xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c @@ -19,6 +19,7 @@ #include #include @@ -268,7 +280,7 @@ From: Juergen Gross cpu_frequency_change_helper, NULL); break; -@@ -403,7 +404,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -406,7 +407,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe g_info = &op->u.pcpu_info; /* spin_trylock() avoids deadlock with stop_machine_run(). */ @@ -277,7 +289,7 @@ From: Juergen Gross { ret = -EBUSY; break; -@@ -426,7 +427,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -429,7 +430,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe g_info->max_present = last_cpu(cpu_present_map); @@ -286,7 +298,7 @@ From: Juergen Gross ret = copy_to_guest(u_xenpf_op, op, 1) ? -EFAULT : 0; } -@@ -467,7 +468,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -470,7 +471,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe break; } ret = continue_hypercall_on_cpu( @@ -295,8 +307,10 @@ From: Juergen Gross break; } break; ---- a/xen/arch/x86/setup.c -+++ b/xen/arch/x86/setup.c +Index: xen-4.0.1-testing/xen/arch/x86/setup.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/setup.c ++++ xen-4.0.1-testing/xen/arch/x86/setup.c @@ -2,6 +2,7 @@ #include #include @@ -314,7 +328,7 @@ From: Juergen Gross if ( idle_domain == NULL ) BUG(); idle_domain->vcpu = idle_vcpu; -@@ -1097,8 +1098,13 @@ void __init __start_xen(unsigned long mb +@@ -1122,8 +1123,13 @@ void __init __start_xen(unsigned long mb if ( !tboot_protect_mem_regions() ) panic("Could not protect TXT memory regions\n"); @@ -329,8 +343,10 @@ From: Juergen Gross if ( (dom0 == NULL) || (alloc_dom0_vcpu0() == NULL) ) panic("Error creating domain 0\n"); ---- a/xen/arch/x86/smpboot.c -+++ b/xen/arch/x86/smpboot.c +Index: xen-4.0.1-testing/xen/arch/x86/smpboot.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/smpboot.c ++++ xen-4.0.1-testing/xen/arch/x86/smpboot.c @@ -39,6 +39,7 @@ #include #include @@ -452,8 +468,10 @@ From: Juergen Gross cpufreq_add_cpu(cpu); return 0; } ---- a/xen/arch/x86/sysctl.c -+++ b/xen/arch/x86/sysctl.c +Index: xen-4.0.1-testing/xen/arch/x86/sysctl.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/sysctl.c ++++ xen-4.0.1-testing/xen/arch/x86/sysctl.c @@ -29,7 +29,7 @@ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) @@ -472,8 +490,10 @@ From: Juergen Gross break; case XEN_SYSCTL_CPU_HOTPLUG_STATUS: ret = 0; ---- a/xen/common/Makefile -+++ b/xen/common/Makefile +Index: xen-4.0.1-testing/xen/common/Makefile +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/Makefile ++++ xen-4.0.1-testing/xen/common/Makefile @@ -1,5 +1,6 @@ obj-y += bitmap.o obj-y += cpu.o @@ -481,8 +501,10 @@ From: Juergen Gross obj-y += domctl.o obj-y += domain.o obj-y += event_channel.o +Index: xen-4.0.1-testing/xen/common/cpupool.c +=================================================================== --- /dev/null -+++ b/xen/common/cpupool.c ++++ xen-4.0.1-testing/xen/common/cpupool.c @@ -0,0 +1,585 @@ +/****************************************************************************** + * cpupool.c @@ -1069,8 +1091,10 @@ From: Juergen Gross + * indent-tabs-mode: nil + * End: + */ ---- a/xen/common/domain.c -+++ b/xen/common/domain.c +Index: xen-4.0.1-testing/xen/common/domain.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/domain.c ++++ xen-4.0.1-testing/xen/common/domain.c @@ -209,7 +209,7 @@ static void __init parse_extra_guest_irq custom_param("extra_guest_irqs", parse_extra_guest_irqs); @@ -1080,7 +1104,7 @@ From: Juergen Gross { struct domain *d, **pd; enum { INIT_xsm = 1u<<0, INIT_rangeset = 1u<<1, INIT_evtchn = 1u<<2, -@@ -290,6 +290,9 @@ struct domain *domain_create( +@@ -292,6 +292,9 @@ struct domain *domain_create( goto fail; init_status |= INIT_arch; @@ -1090,7 +1114,7 @@ From: Juergen Gross if ( sched_init_domain(d) != 0 ) goto fail; -@@ -597,6 +600,8 @@ static void complete_domain_destroy(stru +@@ -603,6 +606,8 @@ static void complete_domain_destroy(stru rangeset_domain_destroy(d); @@ -1099,8 +1123,10 @@ From: Juergen Gross sched_destroy_domain(d); /* Free page used by xen oprofile buffer. */ ---- a/xen/common/domctl.c -+++ b/xen/common/domctl.c +Index: xen-4.0.1-testing/xen/common/domctl.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/domctl.c ++++ xen-4.0.1-testing/xen/common/domctl.c @@ -11,6 +11,7 @@ #include #include @@ -1109,7 +1135,7 @@ From: Juergen Gross #include #include #include -@@ -140,10 +141,12 @@ void getdomaininfo(struct domain *d, str +@@ -141,10 +142,12 @@ void getdomaininfo(struct domain *d, str info->shared_info_frame = mfn_to_gmfn(d, __pa(d->shared_info)>>PAGE_SHIFT); BUG_ON(SHARED_M2P(info->shared_info_frame)); @@ -1123,7 +1149,7 @@ From: Juergen Gross { struct domain *d; struct vcpu *v; -@@ -173,7 +176,7 @@ static unsigned int default_vcpu0_locati +@@ -174,7 +177,7 @@ static unsigned int default_vcpu0_locati if ( cpus_weight(per_cpu(cpu_sibling_map, 0)) > 1 ) cpu = next_cpu(cpu, per_cpu(cpu_sibling_map, 0)); cpu_exclude_map = per_cpu(cpu_sibling_map, 0); @@ -1132,7 +1158,7 @@ From: Juergen Gross { if ( cpu_isset(i, cpu_exclude_map) ) continue; -@@ -388,6 +391,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -389,6 +392,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc domid_t dom; static domid_t rover = 0; unsigned int domcr_flags; @@ -1140,7 +1166,7 @@ From: Juergen Gross ret = -EINVAL; if ( supervisor_mode_kernel || -@@ -431,7 +435,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -432,7 +436,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc domcr_flags |= DOMCRF_oos_off; ret = -ENOMEM; @@ -1149,7 +1175,7 @@ From: Juergen Gross if ( d == NULL ) break; -@@ -450,6 +454,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -451,6 +455,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc { struct domain *d; unsigned int i, max = op->u.max_vcpus.max, cpu; @@ -1157,7 +1183,7 @@ From: Juergen Gross ret = -ESRCH; if ( (d = rcu_lock_domain_by_id(op->domain)) == NULL ) -@@ -498,6 +503,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -499,6 +504,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc goto maxvcpu_out; ret = -ENOMEM; @@ -1165,7 +1191,7 @@ From: Juergen Gross if ( max > d->max_vcpus ) { struct vcpu **vcpus; -@@ -521,8 +527,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -522,8 +528,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc continue; cpu = (i == 0) ? @@ -1176,8 +1202,10 @@ From: Juergen Gross if ( alloc_vcpu(d, i, cpu) == NULL ) goto maxvcpu_out; ---- a/xen/common/kexec.c -+++ b/xen/common/kexec.c +Index: xen-4.0.1-testing/xen/common/kexec.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/kexec.c ++++ xen-4.0.1-testing/xen/common/kexec.c @@ -235,7 +235,7 @@ void kexec_crash(void) BUG(); } @@ -1196,8 +1224,10 @@ From: Juergen Gross break; case KEXEC_TYPE_CRASH: kexec_crash(); /* Does not return */ ---- a/xen/common/sched_credit.c -+++ b/xen/common/sched_credit.c +Index: xen-4.0.1-testing/xen/common/sched_credit.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/sched_credit.c ++++ xen-4.0.1-testing/xen/common/sched_credit.c @@ -70,11 +70,15 @@ /* * Useful macros @@ -2086,7 +2116,7 @@ From: Juergen Gross .destroy_vcpu = csched_vcpu_destroy, .sleep = csched_vcpu_sleep, -@@ -1411,6 +1540,13 @@ const struct scheduler sched_credit_def +@@ -1411,6 +1540,13 @@ const struct scheduler sched_credit_def .dump_cpu_state = csched_dump_pcpu, .dump_settings = csched_dump, .init = csched_init, @@ -2100,8 +2130,10 @@ From: Juergen Gross .tick_suspend = csched_tick_suspend, .tick_resume = csched_tick_resume, ---- a/xen/common/sched_sedf.c -+++ b/xen/common/sched_sedf.c +Index: xen-4.0.1-testing/xen/common/sched_sedf.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/sched_sedf.c ++++ xen-4.0.1-testing/xen/common/sched_sedf.c @@ -21,6 +21,9 @@ printk(_a ); \ } while ( 0 ) @@ -2367,7 +2399,7 @@ From: Juergen Gross .name = "Simple EDF Scheduler", .opt_name = "sedf", .sched_id = XEN_SCHEDULER_SEDF, -@@ -1464,9 +1509,15 @@ const struct scheduler sched_sedf_def = +@@ -1464,9 +1509,15 @@ const struct scheduler sched_sedf_def = .init_domain = sedf_init_domain, .destroy_domain = sedf_destroy_domain, @@ -2384,8 +2416,10 @@ From: Juergen Gross .do_schedule = sedf_do_schedule, .pick_cpu = sedf_pick_cpu, .dump_cpu_state = sedf_dump_cpu_state, ---- a/xen/common/schedule.c -+++ b/xen/common/schedule.c +Index: xen-4.0.1-testing/xen/common/schedule.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/schedule.c ++++ xen-4.0.1-testing/xen/common/schedule.c @@ -53,10 +53,11 @@ static void poll_timer_fn(void *data); /* This is global for now so that private implementations can reach it */ @@ -2696,7 +2730,7 @@ From: Juergen Gross /* Block the currently-executing domain until a pertinent event occurs. */ static long do_block(void) { -@@ -762,7 +840,7 @@ long sched_adjust(struct domain *d, stru +@@ -783,7 +861,7 @@ long sched_adjust(struct domain *d, stru struct vcpu *v; long ret; @@ -2705,7 +2739,7 @@ From: Juergen Gross ((op->cmd != XEN_DOMCTL_SCHEDOP_putinfo) && (op->cmd != XEN_DOMCTL_SCHEDOP_getinfo)) ) return -EINVAL; -@@ -789,7 +867,7 @@ long sched_adjust(struct domain *d, stru +@@ -810,7 +888,7 @@ long sched_adjust(struct domain *d, stru if ( d == current->domain ) vcpu_schedule_lock_irq(current); @@ -2714,7 +2748,7 @@ From: Juergen Gross TRACE_1D(TRC_SCHED_ADJDOM, d->domain_id); if ( d == current->domain ) -@@ -836,6 +914,7 @@ static void schedule(void) +@@ -857,6 +935,7 @@ static void schedule(void) { struct vcpu *prev = current, *next = NULL; s_time_t now = NOW(); @@ -2722,7 +2756,7 @@ From: Juergen Gross struct schedule_data *sd; struct task_slice next_slice; -@@ -851,7 +930,7 @@ static void schedule(void) +@@ -872,7 +951,7 @@ static void schedule(void) stop_timer(&sd->s_timer); /* get policy-specific decision on scheduling... */ @@ -2731,7 +2765,7 @@ From: Juergen Gross next = next_slice.task; -@@ -951,6 +1030,19 @@ static void poll_timer_fn(void *data) +@@ -978,6 +1057,19 @@ static void poll_timer_fn(void *data) vcpu_unblock(v); } @@ -2751,7 +2785,7 @@ From: Juergen Gross /* Initialise the data structures. */ void __init scheduler_init(void) { -@@ -958,12 +1050,6 @@ void __init scheduler_init(void) +@@ -985,12 +1077,6 @@ void __init scheduler_init(void) open_softirq(SCHEDULE_SOFTIRQ, schedule); @@ -2764,7 +2798,7 @@ From: Juergen Gross for ( i = 0; schedulers[i] != NULL; i++ ) { ops = *schedulers[i]; -@@ -977,43 +1063,123 @@ void __init scheduler_init(void) +@@ -1004,43 +1090,123 @@ void __init scheduler_init(void) ops = *schedulers[0]; } @@ -2904,8 +2938,10 @@ From: Juergen Gross } #ifdef CONFIG_COMPAT ---- a/xen/common/softirq.c -+++ b/xen/common/softirq.c +Index: xen-4.0.1-testing/xen/common/softirq.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/softirq.c ++++ xen-4.0.1-testing/xen/common/softirq.c @@ -88,9 +88,11 @@ void raise_softirq(unsigned int nr) } @@ -2999,8 +3035,10 @@ From: Juergen Gross open_softirq(TASKLET_SOFTIRQ, tasklet_action); } ---- a/xen/common/sysctl.c -+++ b/xen/common/sysctl.c +Index: xen-4.0.1-testing/xen/common/sysctl.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/sysctl.c ++++ xen-4.0.1-testing/xen/common/sysctl.c @@ -314,6 +314,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc } break; @@ -3016,9 +3054,11 @@ From: Juergen Gross default: ret = arch_do_sysctl(op, u_sysctl); break; ---- a/xen/include/asm-x86/domain.h -+++ b/xen/include/asm-x86/domain.h -@@ -451,7 +451,8 @@ struct arch_vcpu +Index: xen-4.0.1-testing/xen/include/asm-x86/domain.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-x86/domain.h ++++ xen-4.0.1-testing/xen/include/asm-x86/domain.h +@@ -458,7 +458,8 @@ struct arch_vcpu #define hvm_svm hvm_vcpu.u.svm /* Continue the current hypercall via func(data) on specified cpu. */ @@ -3028,8 +3068,10 @@ From: Juergen Gross void vcpu_show_execution_state(struct vcpu *); void vcpu_show_registers(const struct vcpu *); ---- a/xen/include/asm-x86/smp.h -+++ b/xen/include/asm-x86/smp.h +Index: xen-4.0.1-testing/xen/include/asm-x86/smp.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-x86/smp.h ++++ xen-4.0.1-testing/xen/include/asm-x86/smp.h @@ -56,7 +56,6 @@ extern u32 cpu_2_logical_apicid[]; #define CPU_ONLINE 0x0002 /* CPU is up */ #define CPU_DEAD 0x0004 /* CPU is dead */ @@ -3038,8 +3080,10 @@ From: Juergen Gross #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) extern int cpu_down(unsigned int cpu); ---- a/xen/include/public/domctl.h -+++ b/xen/include/public/domctl.h +Index: xen-4.0.1-testing/xen/include/public/domctl.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/public/domctl.h ++++ xen-4.0.1-testing/xen/include/public/domctl.h @@ -60,10 +60,10 @@ struct xen_domctl_createdomain { /* Should domain memory integrity be verifed by tboot during Sx? */ #define _XEN_DOMCTL_CDF_s3_integrity 2 @@ -3068,8 +3112,10 @@ From: Juergen Gross struct xen_domctl { uint32_t cmd; #define XEN_DOMCTL_createdomain 1 ---- a/xen/include/public/sysctl.h -+++ b/xen/include/public/sysctl.h +Index: xen-4.0.1-testing/xen/include/public/sysctl.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/public/sysctl.h ++++ xen-4.0.1-testing/xen/include/public/sysctl.h @@ -491,6 +491,28 @@ struct xen_sysctl_lockprof_op { typedef struct xen_sysctl_lockprof_op xen_sysctl_lockprof_op_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_lockprof_op_t); @@ -3107,8 +3153,10 @@ From: Juergen Gross uint8_t pad[128]; } u; }; ---- a/xen/include/xen/sched-if.h -+++ b/xen/include/xen/sched-if.h +Index: xen-4.0.1-testing/xen/include/xen/sched-if.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/sched-if.h ++++ xen-4.0.1-testing/xen/include/xen/sched-if.h @@ -10,16 +10,29 @@ #include @@ -3203,8 +3251,10 @@ From: Juergen Gross +struct scheduler *scheduler_get_by_id(unsigned int id); + #endif /* __XEN_SCHED_IF_H__ */ ---- a/xen/include/xen/sched.h -+++ b/xen/include/xen/sched.h +Index: xen-4.0.1-testing/xen/include/xen/sched.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/sched.h ++++ xen-4.0.1-testing/xen/include/xen/sched.h @@ -9,6 +9,7 @@ #include #include @@ -3213,7 +3263,7 @@ From: Juergen Gross #include #include #include -@@ -132,8 +133,6 @@ struct vcpu +@@ -132,8 +133,6 @@ struct vcpu bool_t defer_shutdown; /* VCPU is paused following shutdown request (d->is_shutting_down)? */ bool_t paused_for_shutdown; @@ -3222,7 +3272,7 @@ From: Juergen Gross /* * > 0: a single port is being polled; -@@ -211,6 +210,7 @@ struct domain +@@ -209,6 +208,7 @@ struct domain /* Scheduling. */ void *sched_priv; /* scheduler-specific data */ @@ -3230,7 +3280,7 @@ From: Juergen Gross struct domain *next_in_list; struct domain *next_in_hashbucket; -@@ -383,7 +383,7 @@ static inline struct domain *get_current +@@ -381,7 +381,7 @@ static inline struct domain *get_current } struct domain *domain_create( @@ -3239,7 +3289,7 @@ From: Juergen Gross /* DOMCRF_hvm: Create an HVM domain, as opposed to a PV domain. */ #define _DOMCRF_hvm 0 #define DOMCRF_hvm (1U<<_DOMCRF_hvm) -@@ -471,6 +471,7 @@ int sched_init_vcpu(struct vcpu *v, uns +@@ -469,6 +469,7 @@ int sched_init_vcpu(struct vcpu *v, uns void sched_destroy_vcpu(struct vcpu *v); int sched_init_domain(struct domain *d); void sched_destroy_domain(struct domain *d); @@ -3247,7 +3297,7 @@ From: Juergen Gross long sched_adjust(struct domain *, struct xen_domctl_scheduler_op *); int sched_id(void); void sched_tick_suspend(void); -@@ -578,12 +579,14 @@ void domain_pause_by_systemcontroller(st +@@ -576,12 +577,14 @@ void domain_pause_by_systemcontroller(st void domain_unpause_by_systemcontroller(struct domain *d); void cpu_init(void); @@ -3266,7 +3316,7 @@ From: Juergen Gross void vcpu_runstate_get(struct vcpu *v, struct vcpu_runstate_info *runstate); uint64_t get_cpu_idle_time(unsigned int cpu); -@@ -606,6 +609,18 @@ extern enum cpufreq_controller { +@@ -604,6 +607,18 @@ extern enum cpufreq_controller { FREQCTL_none, FREQCTL_dom0_kernel, FREQCTL_xen } cpufreq_controller; @@ -3285,8 +3335,10 @@ From: Juergen Gross #endif /* __SCHED_H__ */ /* ---- a/xen/include/xen/softirq.h -+++ b/xen/include/xen/softirq.h +Index: xen-4.0.1-testing/xen/include/xen/softirq.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/softirq.h ++++ xen-4.0.1-testing/xen/include/xen/softirq.h @@ -58,6 +58,7 @@ struct tasklet struct tasklet name = { LIST_HEAD_INIT(name.list), 0, 0, 0, func, data } diff --git a/del_usb_xend_entry.patch b/del_usb_xend_entry.patch index a5f2187..3114318 100644 --- a/del_usb_xend_entry.patch +++ b/del_usb_xend_entry.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1310,8 +1310,15 @@ class XendDomainInfo: +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -1313,8 +1313,15 @@ class XendDomainInfo: frontpath = self.getDeviceController(deviceClass).frontendPath(dev) backpath = xstransact.Read(frontpath, "backend") thread.start_new_thread(self.getDeviceController(deviceClass).finishDeviceCleanup, (backpath, path)) diff --git a/disable_emulated_device.diff b/disable_emulated_device.diff index 1870b4c..892dbb7 100644 --- a/disable_emulated_device.diff +++ b/disable_emulated_device.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -401,6 +401,11 @@ static int __devinit platform_pci_init(s platform_mmio = mmio_addr; platform_mmiolen = mmio_len; diff --git a/dom-print.patch b/dom-print.patch index 73e7cc7..c918676 100644 --- a/dom-print.patch +++ b/dom-print.patch @@ -1,6 +1,8 @@ ---- a/xen/arch/x86/domain.c -+++ b/xen/arch/x86/domain.c -@@ -144,14 +144,29 @@ void dump_pageframe_info(struct domain * +Index: xen-4.0.1-testing/xen/arch/x86/domain.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/domain.c ++++ xen-4.0.1-testing/xen/arch/x86/domain.c +@@ -144,15 +144,30 @@ void dump_pageframe_info(struct domain * printk("Memory pages belonging to domain %u:\n", d->domain_id); @@ -14,6 +16,7 @@ + unsigned long total[PGT_type_mask + / (PGT_type_mask & -PGT_type_mask) + 1] = {}; + + spin_lock(&d->page_alloc_lock); page_list_for_each ( page, &d->page_list ) { + unsigned int index = (page->u.inuse.type_info & PGT_type_mask) diff --git a/domu-usb-controller.patch b/domu-usb-controller.patch index ec1eaa0..db697e0 100644 --- a/domu-usb-controller.patch +++ b/domu-usb-controller.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -1861,7 +1861,14 @@ class XendConfig(dict): ports = sxp.child(dev_sxp, 'port') for port in ports[1:]: diff --git a/dump-exec-state.patch b/dump-exec-state.patch index bbb9dcb..b18425f 100644 --- a/dump-exec-state.patch +++ b/dump-exec-state.patch @@ -1,6 +1,8 @@ ---- a/xen/arch/ia64/linux-xen/smp.c -+++ b/xen/arch/ia64/linux-xen/smp.c -@@ -94,6 +94,7 @@ static volatile struct call_data_struct +Index: xen-4.0.1-testing/xen/arch/ia64/linux-xen/smp.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/ia64/linux-xen/smp.c ++++ xen-4.0.1-testing/xen/arch/ia64/linux-xen/smp.c +@@ -94,6 +94,7 @@ static volatile struct call_data_struct #define IPI_CALL_FUNC 0 #define IPI_CPU_STOP 1 @@ -32,8 +34,10 @@ int __init setup_profiling_timer (unsigned int multiplier) { ---- a/xen/arch/x86/smp.c -+++ b/xen/arch/x86/smp.c +Index: xen-4.0.1-testing/xen/arch/x86/smp.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/smp.c ++++ xen-4.0.1-testing/xen/arch/x86/smp.c @@ -375,11 +375,24 @@ void smp_send_nmi_allbutself(void) send_IPI_mask(&cpu_online_map, APIC_DM_NMI); } @@ -59,8 +63,10 @@ set_irq_regs(old_regs); } ---- a/xen/common/keyhandler.c -+++ b/xen/common/keyhandler.c +Index: xen-4.0.1-testing/xen/common/keyhandler.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/keyhandler.c ++++ xen-4.0.1-testing/xen/common/keyhandler.c @@ -71,19 +71,52 @@ static struct keyhandler show_handlers_k .desc = "show this message" }; @@ -151,8 +157,10 @@ printk("\n"); ---- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h -+++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h +Index: xen-4.0.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h ++++ xen-4.0.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h @@ -278,7 +278,7 @@ struct switch_stack { # define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) # define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr) @@ -162,8 +170,10 @@ # define guest_kernel_mode(regs) (ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL) # define vmx_guest_kernel_mode(regs) (ia64_psr(regs)->cpl == 0) # define regs_increment_iip(regs) \ ---- a/xen/include/asm-x86/hardirq.h -+++ b/xen/include/asm-x86/hardirq.h +Index: xen-4.0.1-testing/xen/include/asm-x86/hardirq.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-x86/hardirq.h ++++ xen-4.0.1-testing/xen/include/asm-x86/hardirq.h @@ -8,6 +8,7 @@ typedef struct { unsigned long __softirq_pending; unsigned int __local_irq_count; @@ -172,8 +182,10 @@ } __cacheline_aligned irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ ---- a/xen/include/xen/irq_cpustat.h -+++ b/xen/include/xen/irq_cpustat.h +Index: xen-4.0.1-testing/xen/include/xen/irq_cpustat.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/irq_cpustat.h ++++ xen-4.0.1-testing/xen/include/xen/irq_cpustat.h @@ -26,5 +26,6 @@ extern irq_cpustat_t irq_stat[]; #define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending) #define local_irq_count(cpu) __IRQ_STAT((cpu), __local_irq_count) @@ -181,9 +193,11 @@ +#define state_dump_pending(cpu) __IRQ_STAT((cpu), __state_dump_pending) #endif /* __irq_cpustat_h */ ---- a/xen/include/xen/lib.h -+++ b/xen/include/xen/lib.h -@@ -111,4 +111,7 @@ extern int tainted; +Index: xen-4.0.1-testing/xen/include/xen/lib.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/lib.h ++++ xen-4.0.1-testing/xen/include/xen/lib.h +@@ -116,4 +116,7 @@ extern int tainted; extern char *print_tainted(char *str); extern void add_taint(unsigned); @@ -191,8 +205,10 @@ +void dump_execstate(struct cpu_user_regs *); + #endif /* __LIB_H__ */ ---- a/xen/include/xen/smp.h -+++ b/xen/include/xen/smp.h +Index: xen-4.0.1-testing/xen/include/xen/smp.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/smp.h ++++ xen-4.0.1-testing/xen/include/xen/smp.h @@ -13,6 +13,8 @@ extern void smp_send_event_check_mask(co #define smp_send_event_check_cpu(cpu) \ smp_send_event_check_mask(cpumask_of(cpu)) diff --git a/enable_more_nic_pxe.patch b/enable_more_nic_pxe.patch index 6961430..b62bc81 100644 --- a/enable_more_nic_pxe.patch +++ b/enable_more_nic_pxe.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/firmware/etherboot/Config +Index: xen-4.0.1-testing/tools/firmware/etherboot/Config =================================================================== ---- xen-4.0.0-testing.orig/tools/firmware/etherboot/Config -+++ xen-4.0.0-testing/tools/firmware/etherboot/Config +--- xen-4.0.1-testing.orig/tools/firmware/etherboot/Config ++++ xen-4.0.1-testing/tools/firmware/etherboot/Config @@ -1,5 +1,5 @@ -NICS = rtl8139 eepro100 @@ -9,10 +9,10 @@ Index: xen-4.0.0-testing/tools/firmware/etherboot/Config CFLAGS += -UPXE_DHCP_STRICT CFLAGS += -DPXE_DHCP_STRICT -Index: xen-4.0.0-testing/tools/firmware/etherboot/eb-roms.h +Index: xen-4.0.1-testing/tools/firmware/etherboot/eb-roms.h =================================================================== ---- xen-4.0.0-testing.orig/tools/firmware/etherboot/eb-roms.h -+++ xen-4.0.0-testing/tools/firmware/etherboot/eb-roms.h +--- xen-4.0.1-testing.orig/tools/firmware/etherboot/eb-roms.h ++++ xen-4.0.1-testing/tools/firmware/etherboot/eb-roms.h @@ -6367,5 +6367,6149 @@ unsigned etherboot[] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, diff --git a/heaplock.patch b/heaplock.patch new file mode 100644 index 0000000..9593000 --- /dev/null +++ b/heaplock.patch @@ -0,0 +1,41 @@ +From: Keir Fraser +References: bnc#638465 + +--- a/xen/common/page_alloc.c Wed Sep 01 10:22:05 2010 +0100 ++++ b/xen/common/page_alloc.c Tue Sep 07 13:55:34 2010 +0100 +@@ -378,8 +378,6 @@ + total_avail_pages -= request; + ASSERT(total_avail_pages >= 0); + +- spin_unlock(&heap_lock); +- + cpus_clear(mask); + + for ( i = 0; i < (1 << order); i++ ) +@@ -400,6 +398,8 @@ + pg[i].u.inuse.type_info = 0; + page_set_owner(&pg[i], NULL); + } ++ ++ spin_unlock(&heap_lock); + + if ( unlikely(!cpus_empty(mask)) ) + { +@@ -496,6 +496,8 @@ + ASSERT(order <= MAX_ORDER); + ASSERT(node >= 0); + ++ spin_lock(&heap_lock); ++ + for ( i = 0; i < (1 << order); i++ ) + { + /* +@@ -522,8 +524,6 @@ + if ( pg[i].u.free.need_tlbflush ) + pg[i].tlbflush_timestamp = tlbflush_current_time(); + } +- +- spin_lock(&heap_lock); + + avail[node][zone] += 1 << order; + total_avail_pages += 1 << order; diff --git a/hibernate.patch b/hibernate.patch index de5345a..7b647e6 100644 --- a/hibernate.patch +++ b/hibernate.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/firmware/hvmloader/acpi/dsdt.asl +Index: xen-4.0.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl =================================================================== ---- xen-4.0.0-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl -+++ xen-4.0.0-testing/tools/firmware/hvmloader/acpi/dsdt.asl +--- xen-4.0.1-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl ++++ xen-4.0.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl @@ -30,21 +30,9 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, /* * S3 (suspend-to-ram), S4 (suspend-to-disc) and S5 (power-off) type codes: diff --git a/hv_tools.patch b/hv_tools.patch index 7a86790..23985e3 100644 --- a/hv_tools.patch +++ b/hv_tools.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c +Index: xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/lowlevel/xc/xc.c -+++ xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c +--- xen-4.0.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c ++++ xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c @@ -944,16 +944,16 @@ static PyObject *pyxc_hvm_build(XcObject #endif int i; @@ -32,10 +32,10 @@ Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c return Py_BuildValue("{}"); } -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -157,6 +157,7 @@ XENAPI_PLATFORM_CFG_TYPES = { 'nographic': int, 'nomigrate': int, @@ -44,10 +44,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py 'rtc_timeoffset': int, 'parallel': str, 'serial': str, -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +Index: xen-4.0.1-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.1-testing/tools/python/xen/xend/image.py @@ -839,6 +839,7 @@ class HVMImageHandler(ImageHandler): self.apic = int(vmConfig['platform'].get('apic', 0)) @@ -72,10 +72,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/image.py acpi = self.acpi, apic = self.apic) rc['notes'] = { 'SUSPEND_CANCEL': 1 } -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py @@ -242,6 +242,10 @@ gopts.var('viridian', val='VIRIDIAN', use="""Expose Viridian interface to x86 HVM guest? (Default is 0).""") @@ -87,7 +87,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py gopts.var('acpi', val='ACPI', fn=set_int, default=1, use="Disable or enable ACPI of HVM domain.") -@@ -1083,7 +1087,7 @@ def configure_hvm(config_image, vals): +@@ -1091,7 +1095,7 @@ def configure_hvm(config_image, vals): 'timer_mode', 'usb', 'usbdevice', 'vcpus', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten', diff --git a/hv_win7_eoi_bug.patch b/hv_win7_eoi_bug.patch index 03343c9..6d7ff3a 100644 --- a/hv_win7_eoi_bug.patch +++ b/hv_win7_eoi_bug.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hyperv/hv_intercept.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hyperv/hv_intercept.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c @@ -33,6 +33,7 @@ #include diff --git a/hv_xen_base.patch b/hv_xen_base.patch index 5201090..441075c 100644 --- a/hv_xen_base.patch +++ b/hv_xen_base.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h +Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/domain.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/domain.h -+++ xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h +--- xen-4.0.1-testing.orig/xen/include/asm-x86/hvm/domain.h ++++ xen-4.0.1-testing/xen/include/asm-x86/hvm/domain.h @@ -96,6 +96,7 @@ struct hvm_domain { struct vmx_domain vmx; struct svm_domain svm; @@ -10,10 +10,10 @@ Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h }; #endif /* __ASM_X86_HVM_DOMAIN_H__ */ -Index: xen-4.0.0-testing/xen/arch/x86/hvm/Makefile +Index: xen-4.0.1-testing/xen/arch/x86/hvm/Makefile =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/Makefile -+++ xen-4.0.0-testing/xen/arch/x86/hvm/Makefile +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/Makefile ++++ xen-4.0.1-testing/xen/arch/x86/hvm/Makefile @@ -1,5 +1,6 @@ subdir-y += svm subdir-y += vmx @@ -21,10 +21,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/Makefile obj-y += asid.o obj-y += emulate.o -Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hvm.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c @@ -48,6 +48,7 @@ #include #include @@ -107,7 +107,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c return hvm_funcs.msr_write_intercept(regs); } -@@ -2330,6 +2346,10 @@ int hvm_do_hypercall(struct cpu_user_reg +@@ -2344,6 +2360,10 @@ int hvm_do_hypercall(struct cpu_user_reg case 0: break; } @@ -118,7 +118,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c if ( (eax & 0x80000000) && is_viridian_domain(curr->domain) ) return viridian_hypercall(regs); -@@ -2864,6 +2884,18 @@ long do_hvm_op(unsigned long op, XEN_GUE +@@ -2878,6 +2898,18 @@ long do_hvm_op(unsigned long op, XEN_GUE rc = -EINVAL; break; @@ -137,10 +137,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c } if ( rc == 0 ) -Index: xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h +Index: xen-4.0.1-testing/xen/include/public/arch-x86/hvm/save.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/arch-x86/hvm/save.h -+++ xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h +--- xen-4.0.1-testing.orig/xen/include/public/arch-x86/hvm/save.h ++++ xen-4.0.1-testing/xen/include/public/arch-x86/hvm/save.h @@ -431,9 +431,24 @@ struct hvm_viridian_context { DECLARE_HVM_SAVE_TYPE(VIRIDIAN, 15, struct hvm_viridian_context); @@ -167,10 +167,10 @@ Index: xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h +#define HVM_SAVE_CODE_MAX 17 #endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */ -Index: xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c +Index: xen-4.0.1-testing/xen/arch/x86/hvm/vlapic.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/vlapic.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/vlapic.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/vlapic.c @@ -34,6 +34,7 @@ #include #include @@ -187,11 +187,11 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c return X86EMUL_OKAY; } -Index: xen-4.0.0-testing/xen/include/public/hvm/params.h +Index: xen-4.0.1-testing/xen/include/public/hvm/params.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/hvm/params.h -+++ xen-4.0.0-testing/xen/include/public/hvm/params.h -@@ -106,6 +106,8 @@ +--- xen-4.0.1-testing.orig/xen/include/public/hvm/params.h ++++ xen-4.0.1-testing/xen/include/public/hvm/params.h +@@ -109,6 +109,8 @@ /* Boolean: Enable aligning all periodic vpts to reduce interrupts */ #define HVM_PARAM_VPT_ALIGN 16 diff --git a/hv_xen_extension.patch b/hv_xen_extension.patch index aae751a..a355338 100644 --- a/hv_xen_extension.patch +++ b/hv_xen_extension.patch @@ -1,5 +1,7 @@ +Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h +=================================================================== --- /dev/null -+++ b/xen/include/asm-x86/hvm/hvm_extensions.h ++++ xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h @@ -0,0 +1,183 @@ +/**************************************************************************** + | @@ -184,13 +186,17 @@ +int hyperx_initialize(struct domain *d); + +#endif +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/Makefile +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/Makefile ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/Makefile @@ -0,0 +1,2 @@ +obj-y += hv_intercept.o +obj-y += hv_hypercall.o +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_errno.h ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h @@ -0,0 +1,62 @@ +/**************************************************************************** + | @@ -254,8 +260,10 @@ +#define HV_STATUS_NO_MEMORY_256PAGES 0x0103 +#define HV_STATUS_NO_MEMORY_1024PAGES 0x0104 +#endif +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_hypercall.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c @@ -0,0 +1,153 @@ +/**************************************************************************** + | @@ -410,8 +418,10 @@ + return; + } +} +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_hypercall.h ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h @@ -0,0 +1,46 @@ +/**************************************************************************** + | @@ -459,8 +469,10 @@ +#define HV_NOTIFY_LONG_SPIN_WAIT 0x0008 + +#endif /* HV_HYPERCALL_H */ +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_intercept.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c @@ -0,0 +1,1009 @@ +/**************************************************************************** + | @@ -1471,8 +1483,10 @@ + hvm_inject_exception(TRAP_gp_fault, 0, 0); + return (1); +} +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_shim.h ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h @@ -0,0 +1,286 @@ +/**************************************************************************** + | diff --git a/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch b/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch index c8e19ce..15c5549 100644 --- a/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch +++ b/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch @@ -17,10 +17,10 @@ qcow2 image (the header is gone after three loop iterations): Signed-off-by: Kevin Wolf -Index: xen-4.0.0-testing/tools/ioemu-remote/block-qcow2.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block-qcow2.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/block-qcow2.c -+++ xen-4.0.0-testing/tools/ioemu-remote/block-qcow2.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block-qcow2.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block-qcow2.c @@ -916,7 +916,7 @@ static int alloc_cluster_link_l2(BlockDr goto err; diff --git a/ioemu-bdrv-open-CACHE_WB.patch b/ioemu-bdrv-open-CACHE_WB.patch index 272a524..1350a2a 100644 --- a/ioemu-bdrv-open-CACHE_WB.patch +++ b/ioemu-bdrv-open-CACHE_WB.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -249,8 +249,11 @@ static int open_disk(struct td_state *s, drv = blktap_drivers[i].drv; DPRINTF("%s driver specified\n", drv ? drv->format_name : "No"); diff --git a/ioemu-blktap-barriers.patch b/ioemu-blktap-barriers.patch index bbbc1fc..1c6f411 100644 --- a/ioemu-blktap-barriers.patch +++ b/ioemu-blktap-barriers.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -362,6 +362,15 @@ static void qemu_send_responses(void* op } diff --git a/ioemu-blktap-fv-init.patch b/ioemu-blktap-fv-init.patch index 37db5c3..df5fd5b 100644 --- a/ioemu-blktap-fv-init.patch +++ b/ioemu-blktap-fv-init.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_machine_fv.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_machine_fv.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_machine_fv.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_machine_fv.c @@ -268,6 +268,7 @@ void qemu_invalidate_entry(uint8_t *buff #endif /* defined(MAPCACHE) */ diff --git a/ioemu-blktap-image-format.patch b/ioemu-blktap-image-format.patch index cb29e79..5aeb136 100644 --- a/ioemu-blktap-image-format.patch +++ b/ioemu-blktap-image-format.patch @@ -15,10 +15,10 @@ Signed-off-by: Kevin Wolf hw/xen_blktap.h | 14 ++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -220,9 +220,10 @@ static int map_new_dev(struct td_state * return -1; } @@ -64,10 +64,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c msglen = sizeof(msg_hdr_t); msg->type = CTLMSG_IMG_FAIL; msg->len = msglen; -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.h -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.h +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.h @@ -52,4 +52,18 @@ typedef struct fd_list_entry { int init_blktap(void); diff --git a/ioemu-blktap-zero-size.patch b/ioemu-blktap-zero-size.patch index 88f56d8..8a1ba56 100644 --- a/ioemu-blktap-zero-size.patch +++ b/ioemu-blktap-zero-size.patch @@ -12,10 +12,10 @@ Signed-off-by: Kevin Wolf hw/xen_blktap.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -258,6 +258,12 @@ static int open_disk(struct td_state *s, s->size = bs->total_sectors; s->sector_size = 512; @@ -29,10 +29,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c s->info = ((s->flags & TD_RDONLY) ? VDISK_READONLY : 0); #ifndef QEMU_TOOL -Index: xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/DevController.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/DevController.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py @@ -155,7 +155,7 @@ class DevController: (devid, self.deviceClass)) diff --git a/ioemu-debuginfo.patch b/ioemu-debuginfo.patch index b88354a..c0261e6 100644 --- a/ioemu-debuginfo.patch +++ b/ioemu-debuginfo.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile -+++ xen-4.0.0-testing/tools/ioemu-remote/Makefile +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile @@ -243,7 +243,7 @@ endif install: all $(if $(BUILD_DOCS),install-doc) mkdir -p "$(DESTDIR)$(bindir)" @@ -11,10 +11,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)" -Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile.target +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile.target =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile.target -+++ xen-4.0.0-testing/tools/ioemu-remote/Makefile.target +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile.target ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile.target @@ -754,7 +754,7 @@ clean: install: all install-hook diff --git a/ioemu-disable-scsi.patch b/ioemu-disable-scsi.patch index 41ac448..efba103 100644 --- a/ioemu-disable-scsi.patch +++ b/ioemu-disable-scsi.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c 2010-02-18 14:08:08.000000000 -0700 -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c 2010-02-18 14:28:59.000000000 -0700 +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c @@ -359,6 +359,8 @@ static void platform_ioport_write(void * case 4: fprintf(logfile, "Disconnect IDE hard disk...\n"); @@ -11,10 +11,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c fprintf(logfile, "Disconnect netifs...\n"); pci_unplug_netifs(); fprintf(logfile, "Shutdown taps...\n"); -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h 2010-02-18 14:08:08.000000000 -0700 -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h 2010-02-18 14:44:28.000000000 -0700 +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h @@ -57,6 +57,7 @@ void unset_vram_mapping(void *opaque); #endif @@ -23,10 +23,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h void destroy_hvm_domain(void); void unregister_iomem(target_phys_addr_t start); -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pci.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pci.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pci.c 2010-02-18 14:49:36.000000000 -0700 -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/pci.c 2010-02-18 14:53:47.000000000 -0700 +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/pci.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pci.c @@ -892,6 +892,50 @@ void pci_unplug_netifs(void) } } diff --git a/ioemu-vnc-resize.patch b/ioemu-vnc-resize.patch index ef27832..cd98427 100644 --- a/ioemu-vnc-resize.patch +++ b/ioemu-vnc-resize.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/vnc.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/vnc.c -+++ xen-4.0.0-testing/tools/ioemu-remote/vnc.c -@@ -1713,6 +1713,31 @@ static int protocol_client_msg(VncState +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vnc.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c +@@ -1713,6 +1713,31 @@ static int protocol_client_msg(VncState } set_encodings(vs, (int32_t *)(data + 4), limit); diff --git a/libxen_permissive.patch b/libxen_permissive.patch index 2f69b3b..79d6a7b 100644 --- a/libxen_permissive.patch +++ b/libxen_permissive.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/libxen/src/xen_common.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_common.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_common.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_common.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_common.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_common.c @@ -904,8 +904,15 @@ static void parse_into(xen_session *s, x 0 != strcmp((char *)value_node->children->name, "struct") || value_node->children->children == NULL) diff --git a/magic_ioport_compat.patch b/magic_ioport_compat.patch index 179c6be..320fe12 100644 --- a/magic_ioport_compat.patch +++ b/magic_ioport_compat.patch @@ -2,10 +2,10 @@ Make our PV drivers work with older hosts that do not recognize the new PV driv Signed-off-by: K. Y. Srinivasan -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -320,7 +320,10 @@ static int check_platform_magic(struct d if (magic != XEN_IOPORT_MAGIC_VAL) { diff --git a/network-nat-open-SuSEfirewall2-FORWARD.patch b/network-nat-open-SuSEfirewall2-FORWARD.patch index 50b9e2b..b9167de 100644 --- a/network-nat-open-SuSEfirewall2-FORWARD.patch +++ b/network-nat-open-SuSEfirewall2-FORWARD.patch @@ -1,9 +1,9 @@ Open SuSEfirewall2 FORWARD rule when use xen nat -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-nat +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-nat =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-nat -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-nat +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-nat ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-nat @@ -83,6 +83,7 @@ function dhcp_stop() op_start() { echo 1 >/proc/sys/net/ipv4/ip_forward diff --git a/network-nat.patch b/network-nat.patch index 92c016a..7e613ec 100644 --- a/network-nat.patch +++ b/network-nat.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-nat +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-nat =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-nat -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-nat +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-nat ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-nat @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash diff --git a/network-route.patch b/network-route.patch index d4bb037..4ca15f0 100644 --- a/network-route.patch +++ b/network-route.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-route +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-route =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-route -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-route +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-route ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-route @@ -22,7 +22,7 @@ dir=$(dirname "$0") evalVariables "$@" diff --git a/passthrough-hotplug-segfault.patch b/passthrough-hotplug-segfault.patch deleted file mode 100644 index 818bc25..0000000 --- a/passthrough-hotplug-segfault.patch +++ /dev/null @@ -1,90 +0,0 @@ - -Subject: passthrough: fix segmentation fault after hotplug pass-through device -From: Ian Jackson ian.jackson@eu.citrix.com Tue Apr 13 12:07:33 2010 +0100 -Date: Tue Apr 13 12:07:33 2010 +0100: -Git: b5160622517fb2d16d0836172a2e34633c9d94bf - -This patch fixed the QEMU segmentation fault after hotplug -pass-through devices with MSI-X for many times. - -There is a wrong boundary check in cpu_register_io_memory that uses -io_index rather than io_mem_nb. After many times of hotplug of MSI-X -pass-through device, io_mem_read[] got extended to overwrite mmio_cnt, -then cause QEMU segmentation fault. - -This fix sync with upstream QEMU code in exec.c, and free unused -io_mem_XXX element after hot removal. - -Signed-off-by: Zhai Edwin - -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pt-msi.c -=================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pt-msi.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/pt-msi.c -@@ -623,5 +623,11 @@ void pt_msix_delete(struct pt_dev *dev) - dev->msix->table_offset_adjust); - } - -+ if (dev->msix->mmio_index > 0) -+ { -+ cpu_unregister_io_memory(dev->msix->mmio_index); -+ } -+ -+ - free(dev->msix); - } -Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/exec-dm.c -=================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/exec-dm.c -+++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/exec-dm.c -@@ -125,7 +125,7 @@ unsigned long qemu_host_page_mask; - CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; - CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; - void *io_mem_opaque[IO_MEM_NB_ENTRIES]; --static int io_mem_nb = 1; -+char io_mem_used[IO_MEM_NB_ENTRIES]; - - /* log support */ - FILE *logfile; -@@ -310,6 +310,20 @@ void cpu_register_physical_memory(target - mmio[mmio_cnt++].size = size; - } - -+static int get_free_io_mem_idx(void) -+{ -+ int i; -+ -+ /* Leave 1st element empty */ -+ for (i = 1; i= IO_MEM_NB_ENTRIES) -- return -1; -- io_index = io_mem_nb++; -+ io_index = get_free_io_mem_idx(); -+ if (io_index == -1) -+ return io_index; - } else { - if (io_index >= IO_MEM_NB_ENTRIES) - return -1; -@@ -357,6 +371,7 @@ void cpu_unregister_io_memory(int io_tab - io_mem_write[io_index][i] = NULL; - } - io_mem_opaque[io_index] = NULL; -+ io_mem_used[io_index] = 0; - } - - void cpu_physical_memory_set_dirty(ram_addr_t addr) diff --git a/popen2-argument-fix.patch b/popen2-argument-fix.patch index ad4e6ec..b7cce00 100644 --- a/popen2-argument-fix.patch +++ b/popen2-argument-fix.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py +Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/util/blkif.py -+++ xen-4.0.0-testing/tools/python/xen/util/blkif.py +--- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py ++++ xen-4.0.1-testing/tools/python/xen/util/blkif.py @@ -81,7 +81,7 @@ def parse_uname(uname): if typ == "drbd": diff --git a/pv-driver-build.patch b/pv-driver-build.patch index 8e05029..599aaac 100644 --- a/pv-driver-build.patch +++ b/pv-driver-build.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/blkfront/Kbuild -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/blkfront/Kbuild ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild @@ -3,3 +3,4 @@ include $(M)/overrides.mk obj-m += xen-vbd.o diff --git a/pvdrv-import-shared-info.patch b/pvdrv-import-shared-info.patch index b172f2c..56f1716 100644 --- a/pvdrv-import-shared-info.patch +++ b/pvdrv-import-shared-info.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/evtchn.c -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/evtchn.c ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c @@ -40,7 +40,9 @@ #include #endif @@ -12,10 +12,10 @@ Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c #define is_valid_evtchn(x) ((x) != 0) #define evtchn_from_irq(x) (irq_evtchn[irq].evtchn) -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -77,7 +77,6 @@ static uint64_t callback_via; static int __devinit init_xen_info(void) { @@ -44,10 +44,10 @@ Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci. return 0; } -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h @@ -27,6 +27,11 @@ unsigned long alloc_xen_mmio(unsigned long len); void platform_pci_resume(void); diff --git a/pvdrv_emulation_control.patch b/pvdrv_emulation_control.patch index c999e5c..576f4fb 100644 --- a/pvdrv_emulation_control.patch +++ b/pvdrv_emulation_control.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c @@ -365,6 +365,19 @@ static void platform_ioport_write(void * net_tap_shutdown_all(); fprintf(logfile, "Done.\n"); diff --git a/qemu-dm-segfault.patch b/qemu-dm-segfault.patch index 573ac19..8c54410 100644 --- a/qemu-dm-segfault.patch +++ b/qemu-dm-segfault.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/ide.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ide.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/ide.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/ide.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/ide.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ide.c @@ -935,8 +935,9 @@ static inline void ide_dma_submit_check( static inline void ide_set_irq(IDEState *s) diff --git a/qemu-security-etch1.diff b/qemu-security-etch1.diff index 62cc0d5..e9e704f 100644 --- a/qemu-security-etch1.diff +++ b/qemu-security-etch1.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/ne2000.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ne2000.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/ne2000.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/ne2000.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/ne2000.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ne2000.c @@ -218,7 +218,7 @@ static int ne2000_can_receive(void *opaq NE2000State *s = opaque; @@ -11,10 +11,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/ne2000.c return !ne2000_buffer_full(s); } -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pc.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pc.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pc.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/pc.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/pc.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pc.c @@ -409,7 +409,8 @@ static void bochs_bios_write(void *opaqu case 0x400: case 0x401: diff --git a/serial-split.patch b/serial-split.patch index 89f0cce..5d4c6cc 100644 --- a/serial-split.patch +++ b/serial-split.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/misc/serial-split/Makefile +Index: xen-4.0.1-testing/tools/misc/serial-split/Makefile =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/misc/serial-split/Makefile ++++ xen-4.0.1-testing/tools/misc/serial-split/Makefile @@ -0,0 +1,20 @@ +CC ?= gcc +CFLAGS ?= -Wall -Os @@ -23,10 +23,10 @@ Index: xen-4.0.0-testing/tools/misc/serial-split/Makefile + +%.o: %.c Makefile + $(CC) $(CFLAGS) -c -o $@ $< -Index: xen-4.0.0-testing/tools/misc/serial-split/serial-split.c +Index: xen-4.0.1-testing/tools/misc/serial-split/serial-split.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/misc/serial-split/serial-split.c ++++ xen-4.0.1-testing/tools/misc/serial-split/serial-split.c @@ -0,0 +1,422 @@ +/* + * serial-split.c diff --git a/snapshot-ioemu-delete.patch b/snapshot-ioemu-delete.patch index 11dccdd..aefc7d8 100644 --- a/snapshot-ioemu-delete.patch +++ b/snapshot-ioemu-delete.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c -@@ -912,6 +912,18 @@ static void xenstore_process_dm_command_ +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +@@ -935,6 +935,18 @@ static void xenstore_process_dm_command_ } snapshot_name = xs_read(xsh, XBT_NULL, path, &len); @@ -21,10 +21,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c } else if (!strncmp(command, "continue", len)) { fprintf(logfile, "dm-command: continue after state save\n"); xen_pause_requested = 0; -Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/savevm.c -+++ xen-4.0.0-testing/tools/ioemu-remote/savevm.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/savevm.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c @@ -1096,6 +1096,35 @@ the_end: return ret; } @@ -61,10 +61,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c #ifndef CONFIG_DM void do_savevm(const char *name) -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h @@ -42,6 +42,7 @@ enum { /* xen-vl-extra.c */ diff --git a/snapshot-ioemu-restore.patch b/snapshot-ioemu-restore.patch index 54e63b8..9c589c9 100644 --- a/snapshot-ioemu-restore.patch +++ b/snapshot-ioemu-restore.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/blktap/drivers/blktapctrl.c +Index: xen-4.0.1-testing/tools/blktap/drivers/blktapctrl.c =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/blktapctrl.c -+++ xen-4.0.0-testing/tools/blktap/drivers/blktapctrl.c +--- xen-4.0.1-testing.orig/tools/blktap/drivers/blktapctrl.c ++++ xen-4.0.1-testing/tools/blktap/drivers/blktapctrl.c @@ -348,6 +348,7 @@ static int write_msg(int fd, int msgtype msg_dev = (msg_newdev_t *)(buf + sizeof(msg_hdr_t)); msg_dev->devnum = blkif->minor; @@ -10,10 +10,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/blktapctrl.c break; -Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h +Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/lib/blktaplib.h -+++ xen-4.0.0-testing/tools/blktap/lib/blktaplib.h +--- xen-4.0.1-testing.orig/tools/blktap/lib/blktaplib.h ++++ xen-4.0.1-testing/tools/blktap/lib/blktaplib.h @@ -189,6 +189,7 @@ typedef struct msg_hdr { typedef struct msg_newdev { uint8_t devnum; @@ -22,10 +22,10 @@ Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h } msg_newdev_t; typedef struct msg_pid { -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -67,6 +67,8 @@ int write_fd; static pid_t process; fd_list_entry_t *fd_start = NULL; @@ -87,10 +87,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c memset(buf, 0x00, MSG_SIZE); msglen = sizeof(msg_hdr_t); -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -103,6 +103,8 @@ int xenstore_watch_new_callback(const ch } @@ -100,11 +100,11 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c static int pasprintf(char **buf, const char *fmt, ...) { va_list ap; -@@ -644,8 +646,33 @@ void xenstore_parse_domain_config(int hv - } - } - pstrcpy(bs->filename, sizeof(bs->filename), params); -- if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) +@@ -666,8 +668,33 @@ void xenstore_parse_domain_config(int hv + + fprintf(stderr, "Using file %s in read-%s mode\n", bs->filename, is_readonly ? "only" : "write"); + +- if (bdrv_open2(bs, params, flags, format) < 0) + if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0"); + } else { @@ -135,7 +135,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c } #endif -@@ -779,6 +806,23 @@ int xenstore_parse_disable_pf_config () +@@ -802,6 +829,23 @@ int xenstore_parse_disable_pf_config () return disable_pf; } diff --git a/snapshot-ioemu-save.patch b/snapshot-ioemu-save.patch index 27aa63d..ac7f094 100644 --- a/snapshot-ioemu-save.patch +++ b/snapshot-ioemu-save.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/savevm.c -+++ xen-4.0.0-testing/tools/ioemu-remote/savevm.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/savevm.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c @@ -28,6 +28,7 @@ #include "sysemu.h" #include "qemu-timer.h" @@ -97,10 +97,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c #ifndef CONFIG_DM void do_savevm(const char *name) -Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/helper2.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/helper2.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/helper2.c -+++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/helper2.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/i386-dm/helper2.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/helper2.c @@ -112,6 +112,9 @@ int send_vcpu = 0; //the evtchn port for polling the notification, evtchn_port_t *ioreq_local_port; @@ -167,10 +167,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/helper2.c /* Wait to be allowed to continue */ while (xen_pause_requested) { -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h @@ -34,6 +34,15 @@ void qemu_invalidate_map_cache(void) #define mapcache_lock() ((void)0) #define mapcache_unlock() ((void)0) @@ -195,10 +195,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h void xenstore_check_new_media_present(int timeout); void xenstore_write_vncport(int vnc_display); void xenstore_read_vncpasswd(int domid, char *pwbuf, size_t pwbuflen); -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -17,6 +17,7 @@ #include "exec-all.h" @@ -207,7 +207,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c #include "console.h" #include "hw.h" -@@ -839,6 +840,7 @@ static void xenstore_process_dm_command_ +@@ -862,6 +863,7 @@ static void xenstore_process_dm_command_ { char *path = NULL, *command = NULL, *par = NULL; unsigned int len; @@ -215,7 +215,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c if (pasprintf(&path, "/local/domain/0/device-model/%u/command", domid) == -1) { -@@ -854,7 +856,18 @@ static void xenstore_process_dm_command_ +@@ -877,7 +879,18 @@ static void xenstore_process_dm_command_ if (!strncmp(command, "save", len)) { fprintf(logfile, "dm-command: pause and save state\n"); @@ -235,7 +235,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c } else if (!strncmp(command, "continue", len)) { fprintf(logfile, "dm-command: continue after state save\n"); xen_pause_requested = 0; -@@ -987,6 +1000,13 @@ void xenstore_record_dm_state(const char +@@ -1010,6 +1023,13 @@ void xenstore_record_dm_state(const char xenstore_record_dm("state", state); } diff --git a/snapshot-xend.patch b/snapshot-xend.patch index 4e0d8b0..0d11d6a 100644 --- a/snapshot-xend.patch +++ b/snapshot-xend.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +Index: xen-4.0.1-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.1-testing/tools/python/xen/xend/image.py @@ -490,7 +490,7 @@ class ImageHandler: domains.domains_lock.acquire() @@ -43,10 +43,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/image.py def recreate(self): if self.device_model is None: return -Index: xen-4.0.0-testing/tools/python/xen/xend/server/blkif.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/blkif.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/blkif.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/blkif.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/blkif.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/blkif.py @@ -88,6 +88,9 @@ class BlkifController(DevController): if bootable != None: back['bootable'] = str(bootable) @@ -57,10 +57,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/blkif.py if security.on() == xsconstants.XS_POLICY_USE: self.do_access_control(config, uname) -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py @@ -95,6 +95,31 @@ class SrvDomain(SrvDir): def do_save(self, _, req): return self.xd.domain_save(self.dom.domid, req.args['file'][0]) @@ -102,10 +102,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py return self.perform(req) # -Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py @@ -65,7 +65,7 @@ def insert_after(list, pred, value): return @@ -321,10 +321,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py if not paused: dominfo.unpause() -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -242,6 +242,7 @@ XENAPI_CFG_TYPES = { 'memory_sharing': int, 'Description': str, @@ -333,10 +333,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py } # List of legacy configuration keys that have no equivalent in the -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py @@ -53,6 +53,7 @@ from xen.xend.xenstore.xstransact import from xen.xend.xenstore.xswatch import xswatch from xen.util import mkdir, rwlock @@ -533,10 +533,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py def domain_pincpu(self, domid, vcpu, cpumap): """Set which cpus vcpu can use -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py @@ -123,6 +123,14 @@ SUBCOMMAND_HELP = { 'Restore a domain from a saved state.'), 'save' : ('[-c|-f] ', @@ -647,7 +647,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py def xm_save(args): arg_check(args, "save", 2, 4) -@@ -3741,6 +3816,10 @@ commands = { +@@ -3743,6 +3818,10 @@ commands = { "restore": xm_restore, "resume": xm_resume, "save": xm_save, diff --git a/supported_module.diff b/supported_module.diff index b72f0ac..196360b 100644 --- a/supported_module.diff +++ b/supported_module.diff @@ -2,10 +2,10 @@ Make our PV drivers "Novell supported modules" Signed-off-by: K. Y. Srinivasan -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/Module.supported +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/Module.supported =================================================================== --- /dev/null -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/Module.supported ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/Module.supported @@ -0,0 +1,5 @@ +xen-vbd +xen-platform-pci diff --git a/suse-disable-tap2-default.patch b/suse-disable-tap2-default.patch deleted file mode 100644 index adb469c..0000000 --- a/suse-disable-tap2-default.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py -@@ -2522,8 +2522,10 @@ def xm_usb_list_assignable_devices(args) - def parse_block_configuration(args): - dom = args[0] - -- if args[1].startswith('tap:'): -+ if args[1].startswith('tap2:'): - cls = 'tap2' -+ elif args[1].startswith('tap:'): -+ cls = 'tap' - else: - cls = 'vbd' - -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py -@@ -783,8 +783,10 @@ def configure_disks(config_devs, vals): - """Create the config for disks (virtual block devices). - """ - for (uname, dev, mode, backend, protocol) in vals.disk: -- if uname.startswith('tap:'): -+ if uname.startswith('tap2:'): - cls = 'tap2' -+ elif uname.startswith('tap:'): -+ cls = 'tap' - else: - cls = 'vbd' - diff --git a/tapdisk-ioemu-logfile.patch b/tapdisk-ioemu-logfile.patch index 407174f..4b7652c 100644 --- a/tapdisk-ioemu-logfile.patch +++ b/tapdisk-ioemu-logfile.patch @@ -11,11 +11,11 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c -+++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c -@@ -78,15 +78,22 @@ int main(void) +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c +@@ -78,15 +78,22 @@ int main(void) struct timeval tv; void *old_fd_start = NULL; diff --git a/tapdisk-ioemu-shutdown-fix.patch b/tapdisk-ioemu-shutdown-fix.patch index 493c074..55913ea 100644 --- a/tapdisk-ioemu-shutdown-fix.patch +++ b/tapdisk-ioemu-shutdown-fix.patch @@ -16,10 +16,10 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -65,6 +65,7 @@ int read_fd; int write_fd; @@ -46,10 +46,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c case CTLMSG_PID: memset(buf, 0x00, MSG_SIZE); -Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c -+++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c @@ -14,6 +14,7 @@ extern void qemu_aio_init(void); extern void qemu_aio_poll(void); diff --git a/tmp_build.patch b/tmp_build.patch index cf004a7..64425d1 100644 --- a/tmp_build.patch +++ b/tmp_build.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/xenstore/Makefile +Index: xen-4.0.1-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.0-testing/tools/xenstore/Makefile +--- xen-4.0.1-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.1-testing/tools/xenstore/Makefile @@ -61,6 +61,7 @@ $(CLIENTS_DOMU): xenstore xenstore: xenstore_client.o $(LIBXENSTORE) diff --git a/tools-gdbserver-build.diff b/tools-gdbserver-build.diff index 90991a6..10c1b30 100644 --- a/tools-gdbserver-build.diff +++ b/tools-gdbserver-build.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in +Index: xen-4.0.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in =================================================================== ---- xen-4.0.0-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in -+++ xen-4.0.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in +--- xen-4.0.1-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in ++++ xen-4.0.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in @@ -90,7 +90,7 @@ INCLUDE_CFLAGS = -I. -I${srcdir} -I$(src GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS} #PROFILE_CFLAGS = -pg @@ -11,7 +11,7 @@ Index: xen-4.0.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/M # CFLAGS is specifically reserved for setting from the command line # when running make. I.E. "make CFLAGS=-Wmissing-prototypes". -@@ -260,7 +260,7 @@ linux-low.o: linux-low.c $(linux_low_h) +@@ -260,7 +260,7 @@ linux-low.o: linux-low.c $(linux_low_h) $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@ linux-xen-low.o: linux-xen-low.c $(linux_low_h) $(server_h) diff --git a/tools-kboot.diff b/tools-kboot.diff index a074251..dc73508 100644 --- a/tools-kboot.diff +++ b/tools-kboot.diff @@ -13,10 +13,10 @@ Signed-off-by: Gerd Hoffmann tools/kboot/select-kernel | 59 + 9 files changed, 2111 insertions(+) -Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 +Index: xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 =================================================================== --- /dev/null -+++ xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 ++++ xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 @@ -0,0 +1,874 @@ +# +# Automatically generated make config: don't edit @@ -892,10 +892,10 @@ Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 +CONFIG_X86_NO_TSS=y +CONFIG_X86_NO_IDT=y +CONFIG_KTIME_SCALAR=y -Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 +Index: xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 =================================================================== --- /dev/null -+++ xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 ++++ xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 @@ -0,0 +1,653 @@ +# +# Automatically generated make config: don't edit @@ -1550,17 +1550,17 @@ Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 +# CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y -Index: xen-4.0.0-testing/buildconfigs/mk.linux-2.6-xenUboot +Index: xen-4.0.1-testing/buildconfigs/mk.linux-2.6-xenUboot =================================================================== --- /dev/null -+++ xen-4.0.0-testing/buildconfigs/mk.linux-2.6-xenUboot ++++ xen-4.0.1-testing/buildconfigs/mk.linux-2.6-xenUboot @@ -0,0 +1,2 @@ +EXTRAVERSION = xenUboot +include buildconfigs/mk.linux-2.6-xen -Index: xen-4.0.0-testing/tools/kboot/Makefile +Index: xen-4.0.1-testing/tools/kboot/Makefile =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/Makefile ++++ xen-4.0.1-testing/tools/kboot/Makefile @@ -0,0 +1,23 @@ +# +# tools/kboot/Makefile @@ -1585,10 +1585,10 @@ Index: xen-4.0.0-testing/tools/kboot/Makefile +kboot.initramfs: mkinitramfs init select-kernel ../xcutils/xc_kexec + sh ./mkinitramfs | tee $@ + -Index: xen-4.0.0-testing/tools/kboot/README +Index: xen-4.0.1-testing/tools/kboot/README =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/README ++++ xen-4.0.1-testing/tools/kboot/README @@ -0,0 +1,43 @@ + +This is a simple kexec-based boot loader @@ -1633,10 +1633,10 @@ Index: xen-4.0.0-testing/tools/kboot/README + +-- +Gerd Hoffmann -Index: xen-4.0.0-testing/tools/kboot/init +Index: xen-4.0.1-testing/tools/kboot/init =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/init ++++ xen-4.0.1-testing/tools/kboot/init @@ -0,0 +1,309 @@ +#!/bin/sh + @@ -1947,10 +1947,10 @@ Index: xen-4.0.0-testing/tools/kboot/init +msg "bye ..." +banner "boot $guestos" +xc_kexec -e -Index: xen-4.0.0-testing/tools/kboot/mkinitramfs +Index: xen-4.0.1-testing/tools/kboot/mkinitramfs =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/mkinitramfs ++++ xen-4.0.1-testing/tools/kboot/mkinitramfs @@ -0,0 +1,111 @@ +#!/bin/sh + @@ -2063,10 +2063,10 @@ Index: xen-4.0.0-testing/tools/kboot/mkinitramfs + echo "file $LIB/$(basename $lib) $lib 0755 0 0" +done +echo -Index: xen-4.0.0-testing/tools/kboot/select-kernel +Index: xen-4.0.1-testing/tools/kboot/select-kernel =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/select-kernel ++++ xen-4.0.1-testing/tools/kboot/select-kernel @@ -0,0 +1,59 @@ +#!/bin/sh + @@ -2127,10 +2127,10 @@ Index: xen-4.0.0-testing/tools/kboot/select-kernel +msg "using $kernelname" +echo "$kernelname" + -Index: xen-4.0.0-testing/make-kboot +Index: xen-4.0.1-testing/make-kboot =================================================================== --- /dev/null -+++ xen-4.0.0-testing/make-kboot ++++ xen-4.0.1-testing/make-kboot @@ -0,0 +1,37 @@ +#!/bin/sh + diff --git a/tools-xc_kexec.diff b/tools-xc_kexec.diff index 8fc3ec3..1553d27 100644 --- a/tools-xc_kexec.diff +++ b/tools-xc_kexec.diff @@ -23,10 +23,10 @@ Signed-off-by: Gerd Hoffmann tools/xcutils/xc_kexec.c | 503 +++++++++++++++ 19 files changed, 4988 insertions(+), 2 deletions(-) -Index: xen-4.0.0-testing/tools/xcutils/Makefile +Index: xen-4.0.1-testing/tools/xcutils/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/xcutils/Makefile -+++ xen-4.0.0-testing/tools/xcutils/Makefile +--- xen-4.0.1-testing.orig/tools/xcutils/Makefile ++++ xen-4.0.1-testing/tools/xcutils/Makefile @@ -14,7 +14,7 @@ include $(XEN_ROOT)/tools/Rules.mk CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) @@ -55,10 +55,10 @@ Index: xen-4.0.0-testing/tools/xcutils/Makefile + make -C helper clean -include $(DEPS) -Index: xen-4.0.0-testing/tools/xcutils/helper/Makefile +Index: xen-4.0.1-testing/tools/xcutils/helper/Makefile =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/Makefile ++++ xen-4.0.1-testing/tools/xcutils/helper/Makefile @@ -0,0 +1,39 @@ + +XEN_ROOT = ../../.. @@ -99,10 +99,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/Makefile +# dependencies + +$(XEN_TARGET_ARCH)/entry.o: $(XEN_TARGET_ARCH)/entry.S $(XEN_TARGET_ARCH)/offsets.h -Index: xen-4.0.0-testing/tools/xcutils/helper/console.c +Index: xen-4.0.1-testing/tools/xcutils/helper/console.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/console.c ++++ xen-4.0.1-testing/tools/xcutils/helper/console.c @@ -0,0 +1,69 @@ +#include + @@ -173,10 +173,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/console.c + + return printed_len; +} -Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.c +Index: xen-4.0.1-testing/tools/xcutils/helper/ctype.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/ctype.c ++++ xen-4.0.1-testing/tools/xcutils/helper/ctype.c @@ -0,0 +1,35 @@ +/* + * linux/lib/ctype.c @@ -213,10 +213,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.c +_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */ + +EXPORT_SYMBOL(_ctype); -Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.h +Index: xen-4.0.1-testing/tools/xcutils/helper/ctype.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/ctype.h ++++ xen-4.0.1-testing/tools/xcutils/helper/ctype.h @@ -0,0 +1,54 @@ +#ifndef _LINUX_CTYPE_H +#define _LINUX_CTYPE_H @@ -272,10 +272,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.h +#define toupper(c) __toupper(c) + +#endif -Index: xen-4.0.0-testing/tools/xcutils/helper/helper.h +Index: xen-4.0.1-testing/tools/xcutils/helper/helper.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/helper.h ++++ xen-4.0.1-testing/tools/xcutils/helper/helper.h @@ -0,0 +1,107 @@ +#include +#include @@ -384,10 +384,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/helper.h +int sprintf(char * buf, const char *fmt, ...); +int vsscanf(const char * buf, const char * fmt, va_list args); +int sscanf(const char * buf, const char * fmt, ...); -Index: xen-4.0.0-testing/tools/xcutils/helper/main.c +Index: xen-4.0.1-testing/tools/xcutils/helper/main.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/main.c ++++ xen-4.0.1-testing/tools/xcutils/helper/main.c @@ -0,0 +1,651 @@ +#include +#include "hypercall.h" @@ -1040,10 +1040,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/main.c + printk("\r\n"); + start_kernel(); +} -Index: xen-4.0.0-testing/tools/xcutils/helper/make-offsets.c +Index: xen-4.0.1-testing/tools/xcutils/helper/make-offsets.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/make-offsets.c ++++ xen-4.0.1-testing/tools/xcutils/helper/make-offsets.c @@ -0,0 +1,28 @@ +#include +#include @@ -1073,10 +1073,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/make-offsets.c + vcpu_off("cr3", ctrlreg[3]); + return 0; +} -Index: xen-4.0.0-testing/tools/xcutils/helper/printk.c +Index: xen-4.0.1-testing/tools/xcutils/helper/printk.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/printk.c ++++ xen-4.0.1-testing/tools/xcutils/helper/printk.c @@ -0,0 +1,1051 @@ +/* + * linux/kernel/printk.c @@ -2129,10 +2129,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/printk.c + printk_ratelimit_burst); +} +EXPORT_SYMBOL(printk_ratelimit); -Index: xen-4.0.0-testing/tools/xcutils/helper/string.c +Index: xen-4.0.1-testing/tools/xcutils/helper/string.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/string.c ++++ xen-4.0.1-testing/tools/xcutils/helper/string.c @@ -0,0 +1,601 @@ +/* + * linux/lib/string.c @@ -2735,10 +2735,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/string.c +} +EXPORT_SYMBOL(memchr); +#endif -Index: xen-4.0.0-testing/tools/xcutils/helper/vsprintf.c +Index: xen-4.0.1-testing/tools/xcutils/helper/vsprintf.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/vsprintf.c ++++ xen-4.0.1-testing/tools/xcutils/helper/vsprintf.c @@ -0,0 +1,842 @@ +/* + * linux/lib/vsprintf.c @@ -3582,10 +3582,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/vsprintf.c +} + +EXPORT_SYMBOL(sscanf); -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/div64.h +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/div64.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/div64.h ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/div64.h @@ -0,0 +1,48 @@ +#ifndef __I386_DIV64 +#define __I386_DIV64 @@ -3635,10 +3635,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/div64.h + +} +#endif -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/entry.S +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/entry.S =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/entry.S ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/entry.S @@ -0,0 +1,49 @@ +#include "offsets.h" + @@ -3689,10 +3689,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/entry.S + nop + .align 4096 +hypercall_end: -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/hypercall.h +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/hypercall.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/hypercall.h ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/hypercall.h @@ -0,0 +1,359 @@ +/****************************************************************************** + * hypercall.h @@ -4053,10 +4053,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/hypercall.h + + +#endif /* __HYPERCALL_H__ */ -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/div64.h +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/div64.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/div64.h ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/div64.h @@ -0,0 +1,57 @@ +#ifndef _ASM_GENERIC_DIV64_H +#define _ASM_GENERIC_DIV64_H @@ -4115,10 +4115,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/div64.h +#endif /* BITS_PER_LONG */ + +#endif /* _ASM_GENERIC_DIV64_H */ -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/entry.S +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/entry.S =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/entry.S ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/entry.S @@ -0,0 +1,50 @@ +#include "offsets.h" + @@ -4170,10 +4170,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/entry.S + nop + .align 4096 +hypercall_end: -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/hypercall.h +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/hypercall.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/hypercall.h ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/hypercall.h @@ -0,0 +1,354 @@ +/****************************************************************************** + * hypercall.h @@ -4529,10 +4529,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/hypercall.h +} + +#endif /* __HYPERCALL_H__ */ -Index: xen-4.0.0-testing/tools/xcutils/kexec-syscall.h +Index: xen-4.0.1-testing/tools/xcutils/kexec-syscall.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/kexec-syscall.h ++++ xen-4.0.1-testing/tools/xcutils/kexec-syscall.h @@ -0,0 +1,80 @@ +#ifndef KEXEC_SYSCALL_H +#define KEXEC_SYSCALL_H @@ -4614,10 +4614,10 @@ Index: xen-4.0.0-testing/tools/xcutils/kexec-syscall.h +#define KEXEC_MAX_SEGMENTS 16 + +#endif /* KEXEC_SYSCALL_H */ -Index: xen-4.0.0-testing/tools/xcutils/xc_kexec.c +Index: xen-4.0.1-testing/tools/xcutils/xc_kexec.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/xc_kexec.c ++++ xen-4.0.1-testing/tools/xcutils/xc_kexec.c @@ -0,0 +1,503 @@ +#include +#include diff --git a/udev-rules.patch b/udev-rules.patch index 5ef05dd..abc196f 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,9 +1,17 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/xen-backend.rules +Index: xen-4.0.1-testing/tools/hotplug/Linux/xen-backend.rules =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/xen-backend.rules -+++ xen-4.0.0-testing/tools/hotplug/Linux/xen-backend.rules -@@ -9,3 +9,4 @@ SUBSYSTEM=="xen-backend", ACTION=="remov +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/xen-backend.rules ++++ xen-4.0.1-testing/tools/hotplug/Linux/xen-backend.rules +@@ -7,5 +7,10 @@ SUBSYSTEM=="xen-backend", KERNEL=="vif-* + SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="/etc/xen/scripts/vscsi $env{ACTION}" + SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/etc/xen/scripts/xen-hotplug-cleanup" KERNEL=="evtchn", NAME="xen/%k" - KERNEL=="blktap[0-9]*", NAME="xen/%k" - KERNEL=="pci_iomul", NAME="xen/%k" +-KERNEL=="blktap[0-9]*", NAME="xen/%k" +-KERNEL=="pci_iomul", NAME="xen/%k" ++SUBSYSTEM=="xen", KERNEL=="blktap[0-9]*", NAME="xen/%k", MODE="0600" ++SUBSYSTEM=="blktap2", KERNEL=="blktap[0-9]*", NAME="xen/blktap-2/%k", MODE="0600" ++KERNEL=="blktap-control", NAME="xen/blktap-2/control", MODE="0600" ++KERNEL=="gntdev", NAME="xen/%k", MODE="0600" ++KERNEL=="pci_iomul", NAME="xen/%k", MODE="0600" ++KERNEL=="tapdev[a-z]*", NAME="xen/blktap-2/tapdev%m", MODE="0600" +KERNELS=="xen", KERNEL=="xvd*", SUBSYSTEM=="block", OPTIONS+="last_rule" diff --git a/usb-list.patch b/usb-list.patch index ff4f2b5..9b1d0d6 100644 --- a/usb-list.patch +++ b/usb-list.patch @@ -15,11 +15,11 @@ could be referred to: http://www.gossamer-threads.com/lists/xen/devel/181021?search_string=usb-list;#181021 -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py -@@ -2543,10 +2543,22 @@ def xm_usb_list(args): +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py +@@ -2545,10 +2545,22 @@ def xm_usb_list(args): ni = parse_dev_info(x[1]) ni['idx'] = int(x[0]) usbver = sxp.child_value(x[1], 'usb-ver') diff --git a/vif-bridge-no-iptables.patch b/vif-bridge-no-iptables.patch index d19c5ef..14b2c0e 100644 --- a/vif-bridge-no-iptables.patch +++ b/vif-bridge-no-iptables.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/vif-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/vif-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/vif-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/vif-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/vif-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/vif-bridge @@ -91,7 +91,7 @@ case "$command" in ;; esac diff --git a/vif-route-ifup.patch b/vif-route-ifup.patch index 284444d..c424c4c 100644 --- a/vif-route-ifup.patch +++ b/vif-route-ifup.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/vif-route-ifup +Index: xen-4.0.1-testing/tools/hotplug/Linux/vif-route-ifup =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/hotplug/Linux/vif-route-ifup ++++ xen-4.0.1-testing/tools/hotplug/Linux/vif-route-ifup @@ -0,0 +1,34 @@ +#!/bin/bash +#============================================================================ @@ -37,10 +37,10 @@ Index: xen-4.0.0-testing/tools/hotplug/Linux/vif-route-ifup +then + success +fi -Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +Index: xen-4.0.1-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.0-testing/tools/examples/xend-config.sxp +--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.1-testing/tools/examples/xend-config.sxp @@ -184,6 +184,26 @@ #(network-script network-route) #(vif-script vif-route) @@ -68,10 +68,10 @@ Index: xen-4.0.0-testing/tools/examples/xend-config.sxp ## Use the following if network traffic is routed with NAT, as an alternative # to the settings for bridged networking given above. -Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile @@ -9,7 +9,7 @@ XENDOMAINS_SYSCONFIG = init.d/sysconfig. # Xen script dir and scripts to go there. diff --git a/x86-cpufreq-report.patch b/x86-cpufreq-report.patch index 5afbf29..359f246 100644 --- a/x86-cpufreq-report.patch +++ b/x86-cpufreq-report.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c +Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/platform_hypercall.c -+++ xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c +--- xen-4.0.1-testing.orig/xen/arch/x86/platform_hypercall.c ++++ xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c @@ -22,7 +22,7 @@ #include #include @@ -19,7 +19,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c struct xen_platform_op curop, *op = &curop; if ( !IS_PRIV(current->domain) ) -@@ -484,6 +485,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -487,6 +488,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe op->u.mem_add.epfn, op->u.mem_add.pxm); break; @@ -44,10 +44,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c default: ret = -ENOSYS; break; -Index: xen-4.0.0-testing/xen/include/public/platform.h +Index: xen-4.0.1-testing/xen/include/public/platform.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/platform.h -+++ xen-4.0.0-testing/xen/include/public/platform.h +--- xen-4.0.1-testing.orig/xen/include/public/platform.h ++++ xen-4.0.1-testing/xen/include/public/platform.h @@ -355,6 +355,14 @@ struct xenpf_mem_hotadd uint32_t flags; }; diff --git a/x86-extra-trap-info.patch b/x86-extra-trap-info.patch index ac39213..df2c0bc 100644 --- a/x86-extra-trap-info.patch +++ b/x86-extra-trap-info.patch @@ -1,5 +1,7 @@ ---- a/xen/arch/x86/x86_32/entry.S -+++ b/xen/arch/x86/x86_32/entry.S +Index: xen-4.0.1-testing/xen/arch/x86/x86_32/entry.S +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/entry.S ++++ xen-4.0.1-testing/xen/arch/x86/x86_32/entry.S @@ -403,21 +403,33 @@ ring1: /* obtain ss/esp from oldss/olde movl %eax,UREGS_eip+4(%esp) ret @@ -44,8 +46,10 @@ domain_crash_synchronous: pushl $domain_crash_synchronous_string call printk ---- a/xen/arch/x86/x86_64/entry.S -+++ b/xen/arch/x86/x86_64/entry.S +Index: xen-4.0.1-testing/xen/arch/x86/x86_64/entry.S +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/entry.S ++++ xen-4.0.1-testing/xen/arch/x86/x86_64/entry.S @@ -421,17 +421,30 @@ create_bounce_frame: movq %rax,UREGS_rip+8(%rsp) ret diff --git a/x86-ioapic-ack-default.patch b/x86-ioapic-ack-default.patch index 15fa40e..9dccd3f 100644 --- a/x86-ioapic-ack-default.patch +++ b/x86-ioapic-ack-default.patch @@ -1,9 +1,9 @@ Change default IO-APIC ack mode for single IO-APIC systems to old-style. -Index: xen-4.0.0-testing/xen/arch/x86/io_apic.c +Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/io_apic.c -+++ xen-4.0.0-testing/xen/arch/x86/io_apic.c +--- xen-4.0.1-testing.orig/xen/arch/x86/io_apic.c ++++ xen-4.0.1-testing/xen/arch/x86/io_apic.c @@ -1562,7 +1562,7 @@ static unsigned int startup_level_ioapic return 0; /* don't check for pending */ } diff --git a/x86-show-page-walk-early.patch b/x86-show-page-walk-early.patch index dac66f9..196b236 100644 --- a/x86-show-page-walk-early.patch +++ b/x86-show-page-walk-early.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/arch/x86/mm.c +Index: xen-4.0.1-testing/xen/arch/x86/mm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/mm.c +--- xen-4.0.1-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/mm.c @@ -154,6 +154,8 @@ unsigned long __read_mostly pdx_group_va int opt_allow_hugepage; boolean_param("allowhugepage", opt_allow_hugepage); @@ -11,11 +11,11 @@ Index: xen-4.0.0-testing/xen/arch/x86/mm.c #define l1_disallow_mask(d) \ ((d != dom_io) && \ (rangeset_is_empty((d)->iomem_caps) && \ -Index: xen-4.0.0-testing/xen/arch/x86/traps.c +Index: xen-4.0.1-testing/xen/arch/x86/traps.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/traps.c -+++ xen-4.0.0-testing/xen/arch/x86/traps.c -@@ -1352,6 +1352,7 @@ asmlinkage void do_early_page_fault(stru +--- xen-4.0.1-testing.orig/xen/arch/x86/traps.c ++++ xen-4.0.1-testing/xen/arch/x86/traps.c +@@ -1336,6 +1336,7 @@ asmlinkage void do_early_page_fault(stru unsigned long *stk = (unsigned long *)regs; printk("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n", regs->cs, _p(regs->eip), _p(cr2), regs->error_code); @@ -23,10 +23,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/traps.c printk("Stack dump: "); while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 ) printk("%p ", _p(*stk++)); -Index: xen-4.0.0-testing/xen/arch/x86/x86_32/mm.c +Index: xen-4.0.1-testing/xen/arch/x86/x86_32/mm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_32/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_32/mm.c +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/x86_32/mm.c @@ -122,6 +122,8 @@ void __init paging_init(void) #undef CNT #undef MFN @@ -36,10 +36,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/x86_32/mm.c /* Create page tables for ioremap()/map_domain_page_global(). */ for ( i = 0; i < (IOREMAP_MBYTES >> (L2_PAGETABLE_SHIFT - 20)); i++ ) { -Index: xen-4.0.0-testing/xen/arch/x86/x86_32/traps.c +Index: xen-4.0.1-testing/xen/arch/x86/x86_32/traps.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_32/traps.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_32/traps.c +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/traps.c ++++ xen-4.0.1-testing/xen/arch/x86/x86_32/traps.c @@ -161,7 +161,8 @@ void show_page_walk(unsigned long addr) l3t += (cr3 & 0xFE0UL) >> 3; l3e = l3t[l3_table_offset(addr)]; @@ -70,10 +70,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/x86_32/traps.c printk(" L1[0x%03lx] = %"PRIpte" %08lx\n", l1_table_offset(addr), l1e_get_intpte(l1e), pfn); unmap_domain_page(l1t); -Index: xen-4.0.0-testing/xen/arch/x86/x86_64/mm.c +Index: xen-4.0.1-testing/xen/arch/x86/x86_64/mm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_64/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_64/mm.c +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/x86_64/mm.c @@ -725,6 +725,8 @@ void __init paging_init(void) #undef CNT #undef MFN @@ -83,10 +83,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/x86_64/mm.c /* Create user-accessible L2 directory to map the MPT for compat guests. */ BUILD_BUG_ON(l4_table_offset(RDWR_MPT_VIRT_START) != l4_table_offset(HIRO_COMPAT_MPT_VIRT_START)); -Index: xen-4.0.0-testing/xen/arch/x86/x86_64/traps.c +Index: xen-4.0.1-testing/xen/arch/x86/x86_64/traps.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_64/traps.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_64/traps.c +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/traps.c ++++ xen-4.0.1-testing/xen/arch/x86/x86_64/traps.c @@ -176,7 +176,8 @@ void show_page_walk(unsigned long addr) l4t = mfn_to_virt(mfn); l4e = l4t[l4_table_offset(addr)]; @@ -127,10 +127,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/x86_64/traps.c printk(" L1[0x%03lx] = %"PRIpte" %016lx\n", l1_table_offset(addr), l1e_get_intpte(l1e), pfn); } -Index: xen-4.0.0-testing/xen/include/asm-x86/mm.h +Index: xen-4.0.1-testing/xen/include/asm-x86/mm.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/mm.h -+++ xen-4.0.0-testing/xen/include/asm-x86/mm.h +--- xen-4.0.1-testing.orig/xen/include/asm-x86/mm.h ++++ xen-4.0.1-testing/xen/include/asm-x86/mm.h @@ -443,6 +443,8 @@ TYPE_SAFE(unsigned long,mfn); #define SHARED_M2P_ENTRY (~0UL - 1UL) #define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY) diff --git a/xen-4.0.0-testing-src.tar.bz2 b/xen-4.0.0-testing-src.tar.bz2 deleted file mode 100644 index 2736a64..0000000 --- a/xen-4.0.0-testing-src.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dae429f07e7c09ed55f941d3ad7cbfe39f9e29d93da70df13594acaa2ee9f34b -size 23205463 diff --git a/xen-4.0.1-testing-src.tar.bz2 b/xen-4.0.1-testing-src.tar.bz2 new file mode 100644 index 0000000..8b1baff --- /dev/null +++ b/xen-4.0.1-testing-src.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f50525ffe664fa03f425d044e7cde87b264c4cae9336d2c866e312e89dcd0b83 +size 23280495 diff --git a/xen-api-auth.patch b/xen-api-auth.patch index c2407e1..0af4804 100644 --- a/xen-api-auth.patch +++ b/xen-api-auth.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAuthSessions.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAuthSessions.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAuthSessions.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAuthSessions.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAuthSessions.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAuthSessions.py @@ -84,7 +84,7 @@ class XendAuthSessions: # if PAM doesn't exist, let's ignore it return False diff --git a/xen-changeset.diff b/xen-changeset.diff index 358de73..e33760b 100644 --- a/xen-changeset.diff +++ b/xen-changeset.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/Makefile +Index: xen-4.0.1-testing/xen/Makefile =================================================================== ---- xen-4.0.0-testing.orig/xen/Makefile -+++ xen-4.0.0-testing/xen/Makefile +--- xen-4.0.1-testing.orig/xen/Makefile ++++ xen-4.0.1-testing/xen/Makefile @@ -1,3 +1,4 @@ +export XEN_CHANGESET = unavailable # This is the correct place to edit the build version. diff --git a/xen-config.diff b/xen-config.diff index 9616a4c..c10058b 100644 --- a/xen-config.diff +++ b/xen-config.diff @@ -1,17 +1,8 @@ -Index: xen-4.0.0-testing/Config.mk +Index: xen-4.0.1-testing/Config.mk =================================================================== ---- xen-4.0.0-testing.orig/Config.mk -+++ xen-4.0.0-testing/Config.mk -@@ -151,7 +151,7 @@ QEMU_REMOTE=http://xenbits.xensource.com - # Specify which qemu-dm to use. This may be `ioemu' to use the old - # Mercurial in-tree version, or a local directory, or a git URL. - # CONFIG_QEMU ?= ../qemu-xen.git --CONFIG_QEMU ?= $(QEMU_REMOTE) -+CONFIG_QEMU ?= ioemu-remote - - QEMU_TAG := xen-4.0.0 - #QEMU_TAG ?= f1d909f0f854194f5a40d850886d1413fb8b63c2 -@@ -167,9 +167,9 @@ CONFIG_OCAML_XENSTORED ?= n +--- xen-4.0.1-testing.orig/Config.mk ++++ xen-4.0.1-testing/Config.mk +@@ -182,9 +182,9 @@ CONFIG_OCAML_XENSTORED ?= n # Optional components XENSTAT_XENTOP ?= y VTPM_TOOLS ?= n @@ -23,10 +14,10 @@ Index: xen-4.0.0-testing/Config.mk --include $(XEN_ROOT)/.config +#-include $(XEN_ROOT)/.config -Index: xen-4.0.0-testing/tools/libxc/Makefile +Index: xen-4.0.1-testing/tools/libxc/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/libxc/Makefile -+++ xen-4.0.0-testing/tools/libxc/Makefile +--- xen-4.0.1-testing.orig/tools/libxc/Makefile ++++ xen-4.0.1-testing/tools/libxc/Makefile @@ -169,10 +169,10 @@ zlib-options = $(shell \ fi) | grep $(1)) endif diff --git a/xen-destdir.diff b/xen-destdir.diff index 7f1ea07..97e5c7c 100644 --- a/xen-destdir.diff +++ b/xen-destdir.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/docs/Makefile +Index: xen-4.0.1-testing/docs/Makefile =================================================================== ---- xen-4.0.0-testing.orig/docs/Makefile -+++ xen-4.0.0-testing/docs/Makefile +--- xen-4.0.1-testing.orig/docs/Makefile ++++ xen-4.0.1-testing/docs/Makefile @@ -90,7 +90,8 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(MANDIR) cp -dR man1 $(DESTDIR)$(MANDIR) @@ -22,10 +22,10 @@ Index: xen-4.0.0-testing/docs/Makefile + ln -sf $*.html html.done/$*/index.html + rm -rf html/ + -Index: xen-4.0.0-testing/tools/security/Makefile +Index: xen-4.0.1-testing/tools/security/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/security/Makefile -+++ xen-4.0.0-testing/tools/security/Makefile +--- xen-4.0.1-testing.orig/tools/security/Makefile ++++ xen-4.0.1-testing/tools/security/Makefile @@ -60,8 +60,8 @@ install: all $(ACM_CONFIG_FILE) $(INSTALL_DATA) $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR) $(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR) @@ -37,10 +37,10 @@ Index: xen-4.0.0-testing/tools/security/Makefile else .PHONY: all all: -Index: xen-4.0.0-testing/tools/pygrub/Makefile +Index: xen-4.0.1-testing/tools/pygrub/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/pygrub/Makefile -+++ xen-4.0.0-testing/tools/pygrub/Makefile +--- xen-4.0.1-testing.orig/tools/pygrub/Makefile ++++ xen-4.0.1-testing/tools/pygrub/Makefile @@ -11,7 +11,7 @@ build: .PHONY: install install: all @@ -50,10 +50,10 @@ Index: xen-4.0.0-testing/tools/pygrub/Makefile $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(BINDIR)/pygrub $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot -Index: xen-4.0.0-testing/tools/python/Makefile +Index: xen-4.0.1-testing/tools/python/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/python/Makefile -+++ xen-4.0.0-testing/tools/python/Makefile +--- xen-4.0.1-testing.orig/tools/python/Makefile ++++ xen-4.0.1-testing/tools/python/Makefile @@ -60,7 +60,7 @@ refresh-po: $(POTFILE) .PHONY: install install: install-messages install-dtd @@ -63,10 +63,10 @@ Index: xen-4.0.0-testing/tools/python/Makefile install-dtd: all $(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/xen -Index: xen-4.0.0-testing/tools/xenstore/Makefile +Index: xen-4.0.1-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.0-testing/tools/xenstore/Makefile +--- xen-4.0.1-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.1-testing/tools/xenstore/Makefile @@ -10,6 +10,7 @@ CFLAGS += $(CFLAGS_libxenctrl) CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod @@ -121,10 +121,10 @@ Index: xen-4.0.0-testing/tools/xenstore/Makefile $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR) ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR) -Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile @@ -38,18 +38,6 @@ endif UDEV_RULES_DIR = $(CONFIG_DIR)/udev UDEV_RULES = xen-backend.rules xend.rules diff --git a/xen-disable-libxl.diff b/xen-disable-libxl.diff index 3d7bb6f..b4efeb2 100644 --- a/xen-disable-libxl.diff +++ b/xen-disable-libxl.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/Makefile +Index: xen-4.0.1-testing/tools/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/Makefile -+++ xen-4.0.0-testing/tools/Makefile +--- xen-4.0.1-testing.orig/tools/Makefile ++++ xen-4.0.1-testing/tools/Makefile @@ -33,7 +33,7 @@ SUBDIRS-$(CONFIG_Linux) += fs-back SUBDIRS-$(CONFIG_NetBSD) += fs-back SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir @@ -10,4 +10,4 @@ Index: xen-4.0.0-testing/tools/Makefile +#SUBDIRS-y += libxl SUBDIRS-y += remus SUBDIRS-$(CONFIG_X86) += xenpaging - + SUBDIRS-$(CONFIG_X86) += debugger/gdbsx diff --git a/xen-disable-qemu-monitor.diff b/xen-disable-qemu-monitor.diff index e3cdbc6..9082cc0 100644 --- a/xen-disable-qemu-monitor.diff +++ b/xen-disable-qemu-monitor.diff @@ -5,10 +5,10 @@ the "sendkey" command, among other useful things), remove all console commands that can read/write dom0's state. -Index: xen-4.0.0-testing/tools/ioemu-remote/monitor.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/monitor.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/monitor.c -+++ xen-4.0.0-testing/tools/ioemu-remote/monitor.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/monitor.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/monitor.c @@ -1497,6 +1497,7 @@ static const term_cmd_t term_cmds[] = { "device|all", "commit changes to the disk images (if -snapshot is used) or backing files" }, { "info", "s?", do_info, diff --git a/xen-disable-xenpaging.diff b/xen-disable-xenpaging.diff index 1fae149..2e8615f 100644 --- a/xen-disable-xenpaging.diff +++ b/xen-disable-xenpaging.diff @@ -1,13 +1,13 @@ -Index: xen-4.0.0-testing/tools/Makefile +Index: xen-4.0.1-testing/tools/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/Makefile -+++ xen-4.0.0-testing/tools/Makefile +--- xen-4.0.1-testing.orig/tools/Makefile ++++ xen-4.0.1-testing/tools/Makefile @@ -35,7 +35,7 @@ SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir SUBDIRS-y += xenpmd #SUBDIRS-y += libxl SUBDIRS-y += remus -SUBDIRS-$(CONFIG_X86) += xenpaging +#SUBDIRS-$(CONFIG_X86) += xenpaging + SUBDIRS-$(CONFIG_X86) += debugger/gdbsx # These don't cross-compile - ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) diff --git a/xen-domUloader.diff b/xen-domUloader.diff index bc6b974..7e61638 100644 --- a/xen-domUloader.diff +++ b/xen-domUloader.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py +Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/util/blkif.py -+++ xen-4.0.0-testing/tools/python/xen/util/blkif.py +--- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py ++++ xen-4.0.1-testing/tools/python/xen/util/blkif.py @@ -71,8 +71,8 @@ def blkdev_segment(name): 'type' : 'Disk' } return val @@ -35,10 +35,10 @@ Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py def mount_mode(name): mode = None -Index: xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/DevController.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/DevController.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py @@ -592,6 +592,31 @@ class DevController: return (Missing, None) @@ -71,10 +71,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py def backendPath(self, backdom, devid): """Construct backend path given the backend domain and device id. -Index: xen-4.0.0-testing/tools/python/xen/xend/XendBootloader.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendBootloader.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendBootloader.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendBootloader.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendBootloader.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendBootloader.py @@ -12,7 +12,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # @@ -112,10 +112,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendBootloader.py log.error(msg) raise VmError(msg) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -37,7 +37,7 @@ from types import StringTypes import xen.lowlevel.xc diff --git a/xen-extra-fixes.patch b/xen-extra-fixes.patch index cc8613a..0bb6d99 100644 --- a/xen-extra-fixes.patch +++ b/xen-extra-fixes.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/block-vvfat.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block-vvfat.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/block-vvfat.c -+++ xen-4.0.0-testing/tools/ioemu-remote/block-vvfat.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block-vvfat.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block-vvfat.c @@ -865,7 +865,8 @@ static int init_directories(BDRVVVFATSta { direntry_t* entry=array_get_next(&(s->directory)); diff --git a/xen-fixme-doc.diff b/xen-fixme-doc.diff index 031ab21..a5fc801 100644 --- a/xen-fixme-doc.diff +++ b/xen-fixme-doc.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +--- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 @@ -335,16 +335,10 @@ at hda1, which is the root filesystem. =item I @@ -19,10 +19,10 @@ Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 =back =head1 SEE ALSO -Index: xen-4.0.0-testing/docs/man/xm.pod.1 +Index: xen-4.0.1-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.0-testing/docs/man/xm.pod.1 +--- xen-4.0.1-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.1-testing/docs/man/xm.pod.1 @@ -297,7 +297,8 @@ scheduling by the Xen hypervisor. =item B diff --git a/xen-hvm-default-bridge.diff b/xen-hvm-default-bridge.diff index 9e9e535..7d1be40 100644 --- a/xen-hvm-default-bridge.diff +++ b/xen-hvm-default-bridge.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/net.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/net.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/net.h -+++ xen-4.0.0-testing/tools/ioemu-remote/net.h +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/net.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/net.h @@ -107,8 +107,8 @@ void net_host_device_add(const char *dev void net_host_device_remove(int vlan_id, const char *device); @@ -13,10 +13,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/net.h #endif #ifdef __sun__ #define SMBD_COMMAND "/usr/sfw/sbin/smbd" -Index: xen-4.0.0-testing/tools/ioemu-remote/net.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/net.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/net.c -+++ xen-4.0.0-testing/tools/ioemu-remote/net.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/net.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/net.c @@ -1759,9 +1759,10 @@ int net_client_init(const char *device, } if (get_param_value(script_arg, sizeof(script_arg), "scriptarg", p) == 0 && @@ -30,10 +30,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/net.c } } else #endif -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +Index: xen-4.0.1-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.1-testing/tools/python/xen/xend/image.py @@ -912,11 +912,13 @@ class HVMImageHandler(ImageHandler): mac = devinfo.get('mac') if mac is None: @@ -51,10 +51,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/image.py vifname = devinfo.get('vifname') if vifname: vifname = "tap-" + vifname -Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup-Linux +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/qemu-ifup-Linux -+++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup-Linux +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux @@ -1,36 +1,22 @@ #!/bin/sh diff --git a/xen-hvm-default-pae.diff b/xen-hvm-default-pae.diff index 804e407..d6220a3 100644 --- a/xen-hvm-default-pae.diff +++ b/xen-hvm-default-pae.diff @@ -1,9 +1,9 @@ PAE must be on for 64-on-64 to work at all. -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +Index: xen-4.0.1-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.1-testing/tools/python/xen/xend/image.py @@ -1030,7 +1030,7 @@ class X86_HVM_ImageHandler(HVMImageHandl def configure(self, vmConfig): diff --git a/xen-ioemu-hvm-pv-support.diff b/xen-ioemu-hvm-pv-support.diff index a066ac7..419cd16 100644 --- a/xen-ioemu-hvm-pv-support.diff +++ b/xen-ioemu-hvm-pv-support.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c @@ -30,6 +30,8 @@ #include "qemu-xen.h" #include "net.h" diff --git a/xen-max-free-mem.diff b/xen-max-free-mem.diff index 7848538..849f54f 100644 --- a/xen-max-free-mem.diff +++ b/xen-max-free-mem.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py @@ -916,15 +916,39 @@ class XendNode: info['cpu_mhz'] = info['cpu_khz'] / 1000 @@ -57,10 +57,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py 'node_to_cpu', 'node_to_memory', 'node_to_dma32_mem', -Index: xen-4.0.0-testing/tools/python/xen/xend/balloon.py +Index: xen-4.0.1-testing/tools/python/xen/xend/balloon.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/balloon.py -+++ xen-4.0.0-testing/tools/python/xen/xend/balloon.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/balloon.py ++++ xen-4.0.1-testing/tools/python/xen/xend/balloon.py @@ -43,6 +43,8 @@ SLEEP_TIME_GROWTH = 0.1 # label actually shown in the PROC_XEN_BALLOON file. #labels = { 'current' : 'Current allocation', @@ -94,10 +94,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/balloon.py def free(need_mem, dominfo): """Balloon out memory from the privileged domain so that there is the specified required amount (in KiB) free. -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -1473,6 +1473,27 @@ class XendDomainInfo: pci_conf = self.info['devices'][dev_uuid][1] return map(pci_dict_to_bdf_str, pci_conf['devs']) @@ -126,10 +126,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py def setMemoryTarget(self, target): """Set the memory target of this domain. @param target: In MiB. -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py @@ -173,7 +173,7 @@ class SrvDomain(SrvDir): diff --git a/xen-no-dummy-nfs-ip.diff b/xen-no-dummy-nfs-ip.diff index c833618..23e925f 100644 --- a/xen-no-dummy-nfs-ip.diff +++ b/xen-no-dummy-nfs-ip.diff @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py -@@ -1321,9 +1321,8 @@ def preprocess_access_control(vals): +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py +@@ -1331,9 +1331,8 @@ def preprocess_access_control(vals): def preprocess_ip(vals): if vals.ip or vals.dhcp != 'off': diff --git a/xen-paths.diff b/xen-paths.diff index 6fa0817..2950c28 100644 --- a/xen-paths.diff +++ b/xen-paths.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py @@ -73,7 +73,7 @@ gopts.opt('quiet', short='q', use="Quiet.") @@ -11,10 +11,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py use="Search path for configuration scripts. " "The value of PATH is a colon-separated directory list.") -Index: xen-4.0.0-testing/docs/man/xm.pod.1 +Index: xen-4.0.1-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.0-testing/docs/man/xm.pod.1 +--- xen-4.0.1-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.1-testing/docs/man/xm.pod.1 @@ -77,7 +77,7 @@ in the config file. See L format, and possible options used in either the configfile or for I. @@ -33,10 +33,10 @@ Index: xen-4.0.0-testing/docs/man/xm.pod.1 soon as it is run. =item I -Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +--- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 @@ -4,9 +4,9 @@ xmdomain.cfg - xm domain config file for =head1 SYNOPSIS diff --git a/xen-qemu-iscsi-fix.patch b/xen-qemu-iscsi-fix.patch index d8e41ff..6c713ad 100644 --- a/xen-qemu-iscsi-fix.patch +++ b/xen-qemu-iscsi-fix.patch @@ -1,5 +1,7 @@ ---- a/tools/ioemu-remote/xenstore.c -+++ b/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +=================================================================== +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -399,7 +399,7 @@ void xenstore_parse_domain_config(int hv char *buf = NULL; char *fpath = NULL, *bpath = NULL, *btype = NULL, @@ -9,7 +11,7 @@ unsigned int len, num, hd_index, pci_devid = 0; BlockDriverState *bs; BlockDriver *format; -@@ -486,12 +486,7 @@ void xenstore_parse_domain_config(int hv +@@ -491,12 +491,7 @@ void xenstore_parse_domain_config(int hv continue; free(danger_type); danger_type = xs_read(xsh, XBT_NULL, danger_buf, &len); @@ -23,7 +25,7 @@ /* read the name of the device */ if (pasprintf(&buf, "%s/type", bpath) == -1) continue; -@@ -499,6 +494,35 @@ void xenstore_parse_domain_config(int hv +@@ -504,6 +499,35 @@ void xenstore_parse_domain_config(int hv drv = xs_read(xsh, XBT_NULL, buf, &len); if (drv == NULL) continue; diff --git a/xen-rpmoptflags.diff b/xen-rpmoptflags.diff index 1079766..e55b663 100644 --- a/xen-rpmoptflags.diff +++ b/xen-rpmoptflags.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile +Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/Makefile -+++ xen-4.0.0-testing/tools/blktap/drivers/Makefile +--- xen-4.0.1-testing.orig/tools/blktap/drivers/Makefile ++++ xen-4.0.1-testing/tools/blktap/drivers/Makefile @@ -6,7 +6,6 @@ QCOW_UTIL = img2qcow qcow2raw qcow-cr LIBAIO_DIR = ../../libaio/src MEMSHR_DIR = ../../memshr @@ -10,10 +10,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile CFLAGS += -Wno-unused CFLAGS += -I../lib CFLAGS += $(CFLAGS_libxenctrl) -Index: xen-4.0.0-testing/Config.mk +Index: xen-4.0.1-testing/Config.mk =================================================================== ---- xen-4.0.0-testing.orig/Config.mk -+++ xen-4.0.0-testing/Config.mk +--- xen-4.0.1-testing.orig/Config.mk ++++ xen-4.0.1-testing/Config.mk @@ -14,7 +14,7 @@ SHELL ?= /bin/sh # Tools to run on system hosting the build diff --git a/xen-warnings.diff b/xen-warnings.diff index 611e926..efc476a 100644 --- a/xen-warnings.diff +++ b/xen-warnings.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/misc/miniterm/miniterm.c +Index: xen-4.0.1-testing/tools/misc/miniterm/miniterm.c =================================================================== ---- xen-4.0.0-testing.orig/tools/misc/miniterm/miniterm.c -+++ xen-4.0.0-testing/tools/misc/miniterm/miniterm.c +--- xen-4.0.1-testing.orig/tools/misc/miniterm/miniterm.c ++++ xen-4.0.1-testing/tools/misc/miniterm/miniterm.c @@ -157,7 +157,7 @@ int main(int argc, char **argv) case 0: close(1); /* stdout not needed */ @@ -35,10 +35,10 @@ Index: xen-4.0.0-testing/tools/misc/miniterm/miniterm.c break; } -Index: xen-4.0.0-testing/tools/libxc/xc_dom_elfloader.c +Index: xen-4.0.1-testing/tools/libxc/xc_dom_elfloader.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxc/xc_dom_elfloader.c -+++ xen-4.0.0-testing/tools/libxc/xc_dom_elfloader.c +--- xen-4.0.1-testing.orig/tools/libxc/xc_dom_elfloader.c ++++ xen-4.0.1-testing/tools/libxc/xc_dom_elfloader.c @@ -193,8 +193,9 @@ static int xc_dom_load_elf_symtab(struct if ( load ) @@ -50,10 +50,10 @@ Index: xen-4.0.0-testing/tools/libxc/xc_dom_elfloader.c elf_section_start(elf, shdr2), size); } -Index: xen-4.0.0-testing/tools/xenstore/Makefile +Index: xen-4.0.1-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.0-testing/tools/xenstore/Makefile +--- xen-4.0.1-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.1-testing/tools/xenstore/Makefile @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 3.0 MINOR = 0 @@ -63,10 +63,10 @@ Index: xen-4.0.0-testing/tools/xenstore/Makefile CFLAGS += -I. CFLAGS += $(CFLAGS_libxenctrl) -Index: xen-4.0.0-testing/tools/xenstore/xenstored_core.c +Index: xen-4.0.1-testing/tools/xenstore/xenstored_core.c =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/xenstored_core.c -+++ xen-4.0.0-testing/tools/xenstore/xenstored_core.c +--- xen-4.0.1-testing.orig/tools/xenstore/xenstored_core.c ++++ xen-4.0.1-testing/tools/xenstore/xenstored_core.c @@ -77,8 +77,8 @@ static void check_store(void); int quota_nb_entry_per_domain = 1000; @@ -91,10 +91,10 @@ Index: xen-4.0.0-testing/tools/xenstore/xenstored_core.c break; case 'T': tracefile = optarg; -Index: xen-4.0.0-testing/tools/xenstore/xenstored_domain.c +Index: xen-4.0.1-testing/tools/xenstore/xenstored_domain.c =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/xenstored_domain.c -+++ xen-4.0.0-testing/tools/xenstore/xenstored_domain.c +--- xen-4.0.1-testing.orig/tools/xenstore/xenstored_domain.c ++++ xen-4.0.1-testing/tools/xenstore/xenstored_domain.c @@ -212,7 +212,7 @@ void handle_event(void) { evtchn_port_t port; @@ -113,10 +113,10 @@ Index: xen-4.0.0-testing/tools/xenstore/xenstored_domain.c return -1; dom0 = new_domain(NULL, 0, port); -Index: xen-4.0.0-testing/tools/xenstore/xenstored_transaction.c +Index: xen-4.0.1-testing/tools/xenstore/xenstored_transaction.c =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/xenstored_transaction.c -+++ xen-4.0.0-testing/tools/xenstore/xenstored_transaction.c +--- xen-4.0.1-testing.orig/tools/xenstore/xenstored_transaction.c ++++ xen-4.0.1-testing/tools/xenstore/xenstored_transaction.c @@ -82,7 +82,7 @@ struct transaction struct list_head changed_domains; }; @@ -126,10 +126,10 @@ Index: xen-4.0.0-testing/tools/xenstore/xenstored_transaction.c static unsigned int generation; /* Return tdb context to use for this connection. */ -Index: xen-4.0.0-testing/tools/xenstore/xenstore_client.c +Index: xen-4.0.1-testing/tools/xenstore/xenstore_client.c =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/xenstore_client.c -+++ xen-4.0.0-testing/tools/xenstore/xenstore_client.c +--- xen-4.0.1-testing.orig/tools/xenstore/xenstore_client.c ++++ xen-4.0.1-testing/tools/xenstore/xenstore_client.c @@ -251,7 +251,7 @@ do_chmod(char *path, struct xs_permissio char **xsval = xs_directory(xsh, xth, path, &xsval_n); @@ -139,10 +139,10 @@ Index: xen-4.0.0-testing/tools/xenstore/xenstore_client.c for (i = 0; i < xsval_n; i++) { snprintf(buf, MAX_PATH_LEN, "%s/%s", path, xsval[i]); -Index: xen-4.0.0-testing/tools/libxen/src/xen_common.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_common.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_common.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_common.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_common.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_common.c @@ -1057,6 +1057,8 @@ static size_t size_of_member(const abstr default: assert(false); @@ -161,10 +161,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_common.c } -Index: xen-4.0.0-testing/tools/blktap2/drivers/block-remus.c +Index: xen-4.0.1-testing/tools/blktap2/drivers/block-remus.c =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap2/drivers/block-remus.c -+++ xen-4.0.0-testing/tools/blktap2/drivers/block-remus.c +--- xen-4.0.1-testing.orig/tools/blktap2/drivers/block-remus.c ++++ xen-4.0.1-testing/tools/blktap2/drivers/block-remus.c @@ -1579,7 +1579,7 @@ static int tdremus_open(td_driver_t *dri td_flag_t flags) { diff --git a/xen-xm-top-needs-root.diff b/xen-xm-top-needs-root.diff index dfae018..b73f714 100644 --- a/xen-xm-top-needs-root.diff +++ b/xen-xm-top-needs-root.diff @@ -1,11 +1,11 @@ From: Charles Coffing Upstream: no -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py -@@ -2052,6 +2052,10 @@ def xm_debug_keys(args): +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py +@@ -2054,6 +2054,10 @@ def xm_debug_keys(args): def xm_top(args): arg_check(args, "top", 0) diff --git a/xen-xmexample-vti.diff b/xen-xmexample-vti.diff index 4d4a1f4..7634752 100644 --- a/xen-xmexample-vti.diff +++ b/xen-xmexample-vti.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/examples/Makefile +Index: xen-4.0.1-testing/tools/examples/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/Makefile -+++ xen-4.0.0-testing/tools/examples/Makefile +--- xen-4.0.1-testing.orig/tools/examples/Makefile ++++ xen-4.0.1-testing/tools/examples/Makefile @@ -18,7 +18,6 @@ XEN_CONFIGS += xmexample.hvm XEN_CONFIGS += xmexample.hvm-stubdom XEN_CONFIGS += xmexample.pv-grub diff --git a/xen-xmexample.diff b/xen-xmexample.diff index 60e6fcb..496ad66 100644 --- a/xen-xmexample.diff +++ b/xen-xmexample.diff @@ -1,9 +1,9 @@ Change various example paths in the config files to match SUSE. -Index: xen-4.0.0-testing/tools/examples/xmexample1 +Index: xen-4.0.1-testing/tools/examples/xmexample1 =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xmexample1 -+++ xen-4.0.0-testing/tools/examples/xmexample1 +--- xen-4.0.1-testing.orig/tools/examples/xmexample1 ++++ xen-4.0.1-testing/tools/examples/xmexample1 @@ -7,11 +7,13 @@ #============================================================================ @@ -43,10 +43,10 @@ Index: xen-4.0.0-testing/tools/examples/xmexample1 #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.0-testing/tools/examples/xmexample2 +Index: xen-4.0.1-testing/tools/examples/xmexample2 =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xmexample2 -+++ xen-4.0.0-testing/tools/examples/xmexample2 +--- xen-4.0.1-testing.orig/tools/examples/xmexample2 ++++ xen-4.0.1-testing/tools/examples/xmexample2 @@ -35,11 +35,13 @@ xm_vars.var('vmid', xm_vars.check() @@ -86,33 +86,32 @@ Index: xen-4.0.0-testing/tools/examples/xmexample2 #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.0-testing/tools/examples/xmexample3 +Index: xen-4.0.1-testing/tools/examples/xmexample3 =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xmexample3 -+++ xen-4.0.0-testing/tools/examples/xmexample3 +--- xen-4.0.1-testing.orig/tools/examples/xmexample3 ++++ xen-4.0.1-testing/tools/examples/xmexample3 @@ -35,11 +35,13 @@ xm_vars.var('vmid', xm_vars.check() #---------------------------------------------------------------------------- -# Kernel image file. -kernel = "/path/to/domU/kernel" -- --# Optional ramdisk. --#ramdisk = "/boot/initrd.gz" +# Kernel image file and (optional) ramdisk (initrd). +kernel = "/boot/vmlinuz-xen" +ramdisk = "/boot/initrd-xen" -+ + +-# Optional ramdisk. +-#ramdisk = "/boot/initrd.gz" +# Or use domUloader instead of kernel/ramdisk to get kernel from domU FS +#bootloader = "/usr/lib/xen/boot/domUloader.py" +#bootentry = "hda2:/vmlinuz-xen,/initrd-xen" # The domain build function. Default is 'linux'. #builder='linux' -Index: xen-4.0.0-testing/tools/examples/xmexample.hvm +Index: xen-4.0.1-testing/tools/examples/xmexample.hvm =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xmexample.hvm -+++ xen-4.0.0-testing/tools/examples/xmexample.hvm +--- xen-4.0.1-testing.orig/tools/examples/xmexample.hvm ++++ xen-4.0.1-testing/tools/examples/xmexample.hvm @@ -78,7 +78,7 @@ vif = [ 'type=ioemu, bridge=xenbr0' ] # and MODE is r for read-only, w for read-write. @@ -122,11 +121,11 @@ Index: xen-4.0.0-testing/tools/examples/xmexample.hvm #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 -@@ -38,13 +38,13 @@ file. +--- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 +@@ -38,13 +38,13 @@ file. The kernel image for the domain. The format of the parameter is the fully qualified path to the kernel image file, @@ -161,10 +160,10 @@ Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 at hda1, which is the root filesystem. =item I -Index: xen-4.0.0-testing/docs/man/xm.pod.1 +Index: xen-4.0.1-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.0-testing/docs/man/xm.pod.1 +--- xen-4.0.1-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.1-testing/docs/man/xm.pod.1 @@ -163,8 +163,8 @@ soon as it is run. =item I diff --git a/xen.changes b/xen.changes index 7799f54..045a893 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Mon Sep 13 16:24:31 MDT 2010 - carnold@novell.com + +- bnc#636231 - XEN: Unable to disconnect/remove CDROM drive from VM + xend-devid-or-name.patch + +------------------------------------------------------------------- +Mon Sep 13 10:50:56 MDT 2010 - carnold@novell.com + +- Upstream patches from Jan + 22019-x86-cpuidle-online-check.patch + 22051-x86-forced-EOI.patch + 22067-x86-irq-domain.patch + 22068-vtd-irte-RH-bit.patch + 22071-ept-get-entry-lock.patch + 22084-x86-xsave-off.patch + +------------------------------------------------------------------- +Mon Sep 13 10:47:09 MDT 2010 - carnold@novell.com + +- bnc#638465 - hypervisor panic in memory handling + heaplock.patch + +------------------------------------------------------------------- +Thu Sep 9 11:29:45 MDT 2010 - carnold@novell.com + +- Update to Xen 4.0.1. This is a bug fix release. + ------------------------------------------------------------------- Mon Aug 16 18:35:11 MDT 2010 - carnold@novell.com diff --git a/xen.spec b/xen.spec index 2d40b3b..9d31108 100644 --- a/xen.spec +++ b/xen.spec @@ -1,5 +1,5 @@ # -# spec file for package xen (Version 4.0.0_21091_06) +# spec file for package xen (Version 4.0.1_21326_01) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -22,8 +22,8 @@ Name: xen ExclusiveArch: %ix86 x86_64 %define xvers 4.0 %define xvermaj 4 -%define changeset 21091 -%define xen_build_dir xen-4.0.0-testing +%define changeset 21326 +%define xen_build_dir xen-4.0.1-testing %define with_kmp 1 BuildRequires: LibVNCServer-devel SDL-devel acpica automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel texinfo transfig BuildRequires: texlive texlive-latex @@ -38,14 +38,14 @@ BuildRequires: glibc-32bit glibc-devel-32bit %if %{?with_kmp}0 BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11 %endif -Version: 4.0.0_21091_06 -Release: 9 +Version: 4.0.1_21326_01 +Release: 6 License: GPLv2+ Group: System/Kernel AutoReqProv: on PreReq: %insserv_prereq %fillup_prereq Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) -Source0: xen-4.0.0-testing-src.tar.bz2 +Source0: xen-4.0.1-testing-src.tar.bz2 Source2: README.SuSE Source3: boot.xen Source4: boot.local.xenU @@ -75,77 +75,28 @@ Source24: xenapiusers Source25: xen-updown.sh # Upstream patches Patch0: 21089-x86-startup-irq-from-setup-gsi.patch -Patch1: 21109-x86-cpu-hotplug.patch -Patch2: 21128-domain-save-flush.patch -Patch3: 21129-xen-hotplug-cleanup.patch -Patch4: 21150-shadow-race.patch -Patch5: 21151-trace-bounds-check.patch -Patch6: 21160-sysctl-debug-keys.patch -Patch7: 21189-x86-emulate-clflush.patch -Patch8: 21193-blktap-script.patch -Patch9: 21194-ioemu-subtype.patch -Patch10: 21223-xend-preserve-devs.patch -Patch11: 21225-conring-iommu.patch -Patch12: 21234-x86-bad-srat-clear-pxm2node.patch -Patch13: 21235-crashkernel-advanced.patch -Patch14: 21266-vmx-disabled-check.patch -Patch15: 21271-x86-cache-flush-global.patch -Patch16: 21272-x86-dom0-alloc-performance.patch -Patch17: 21273-linux-autconf.patch -Patch18: 21301-svm-lmsl.patch -Patch19: 21304-keyhandler-alternative.patch -Patch20: 21317-xend-blkif-util-tap2.patch -Patch21: passthrough-hotplug-segfault.patch -Patch22: 21331-svm-vintr-during-nmi.patch -Patch23: 21333-xentrace-t_info-size.patch -Patch24: 21340-vtd-dom0-mapping-latency.patch -Patch25: 21346-x86-platform-timer-wrap.patch -Patch26: 21349-x86-memcpy.patch -Patch27: 21360-x86-mce-polling-disabled-init.patch -Patch28: 21372-x86-cross-cpu-wait.patch -Patch29: 21373-dummy-domain-io-caps.patch -Patch30: 21406-x86-microcode-quiet.patch -Patch31: 21408-amd-erratum-383.patch -Patch32: 21421-vts-ats-enabling.patch -Patch33: 21435-vmx-retain-global-controls.patch -Patch34: 21445-x86-tsc-handling-cleanups-v2.patch -Patch35: 21446-iommu-graceful-generic-fail.patch -Patch36: 21453-shadow-avoid-remove-all-after-teardown.patch -Patch37: 21456-compat-hvm-addr-check.patch -Patch38: 21459-block-script.patch -Patch39: 21460-xend-timeoffset.patch -Patch40: 21492-x86-pirq-unbind.patch -Patch41: 21526-x86-nehalem-cpuid-mask.patch -Patch42: 21542-amd-erratum-411.patch -Patch43: 21615-dont-save-xen-heap-pages.patch -Patch44: 21620-x86-signed-domain-irq.patch -Patch45: 21627-cpuidle-wrap.patch -Patch46: 21643-vmx-vpmu-pmc-offset.patch -Patch47: 21653-xend-mac-addr.patch -Patch48: 21678-xend-mac-fix.patch -Patch49: 21682-trace-buffer-range.patch -Patch50: 21683-vtd-kill-timer-conditional.patch -Patch51: 21693-memevent-64bit-only.patch -Patch52: 21695-trace-t_info-readonly.patch -Patch53: 21698-x86-pirq-range-check.patch -Patch54: 21699-p2m-query-for-type-change.patch -Patch55: 21700-32on64-vm86-gpf.patch -Patch56: 21705-trace-printk.patch -Patch57: 21706-trace-security.patch -Patch58: 21712-amd-osvw.patch -Patch59: 21716-iommu-alloc.patch -Patch60: 21717-ir-qi.patch -Patch61: 21718-x2apic-logic.patch -Patch62: 21723-get-domu-state.patch -Patch63: 21744-x86-cpufreq-range-check.patch -Patch64: 21757-x86-mce-avoid-BUG_ON.patch -Patch65: 21847-pscsi.patch -Patch66: 21866-xenapi.patch -Patch67: 21886-kexec-shutdown.patch -Patch68: 21926-x86-pv-NMI-inject.patch -Patch69: 21933-vtd-ioapic-write.patch -Patch70: 21953-msi-enable.patch -Patch71: 21971-pod-accounting.patch +Patch1: 21235-crashkernel-advanced.patch +Patch2: 21271-x86-cache-flush-global.patch +Patch3: 21301-svm-lmsl.patch +Patch4: 21304-keyhandler-alternative.patch +Patch5: 21406-x86-microcode-quiet.patch +Patch6: 21421-vts-ats-enabling.patch +Patch7: 21526-x86-nehalem-cpuid-mask.patch +Patch8: 21542-amd-erratum-411.patch +Patch9: 21615-dont-save-xen-heap-pages.patch +Patch10: 21627-cpuidle-wrap.patch +Patch11: 21653-xend-mac-addr.patch +Patch12: 21678-xend-mac-fix.patch +Patch13: 21683-vtd-kill-timer-conditional.patch +Patch14: 21723-get-domu-state.patch +Patch15: 21847-pscsi.patch +Patch16: 21866-xenapi.patch +Patch17: 22019-x86-cpuidle-online-check.patch +Patch18: 22051-x86-forced-EOI.patch +Patch19: 22067-x86-irq-domain.patch +Patch20: 22068-vtd-irte-RH-bit.patch +Patch21: 22071-ept-get-entry-lock.patch +Patch22: 22084-x86-xsave-off.patch # Our patches Patch300: xen-config.diff Patch301: xend-config.diff @@ -165,8 +116,6 @@ Patch314: xen-max-free-mem.diff Patch315: xen-disable-libxl.diff Patch316: xen-disable-xenpaging.diff Patch317: xen-extra-fixes.patch -Patch320: block-losetup-retry.diff -Patch321: block-flags.diff Patch322: bridge-opensuse.patch Patch323: bridge-vlan.diff Patch324: bridge-bonding.diff @@ -194,7 +143,6 @@ Patch355: tools-gdbserver-build.diff Patch356: ioemu-vnc-resize.patch Patch357: ioemu-debuginfo.patch Patch358: vif-bridge-no-iptables.patch -Patch359: suse-disable-tap2-default.patch # Needs to go upstream Patch360: checkpoint-rename.patch Patch361: xm-save-check-file.patch @@ -210,6 +158,7 @@ Patch370: xend-sysconfig.patch Patch371: domu-usb-controller.patch Patch372: popen2-argument-fix.patch Patch373: usb-list.patch +Patch374: xend-devid-or-name.patch # Patches for snapshot support Patch400: snapshot-ioemu-save.patch Patch401: snapshot-ioemu-restore.patch @@ -227,8 +176,8 @@ Patch421: ioemu-blktap-barriers.patch # Other bug fixes or features Patch423: bdrv_open2_fix_flags.patch Patch424: bdrv_open2_flags_2.patch -Patch425: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch -Patch426: ioemu-bdrv-open-CACHE_WB.patch +Patch425: ioemu-bdrv-open-CACHE_WB.patch +Patch426: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch Patch427: xen-ioemu-hvm-pv-support.diff Patch428: qemu-dm-segfault.patch Patch429: hibernate.patch @@ -253,6 +202,7 @@ Patch511: supported_module.diff Patch512: magic_ioport_compat.patch Patch650: disable_emulated_device.diff Patch651: ioemu-disable-scsi.patch +Patch652: heaplock.patch # novell_shim patches Patch700: hv_tools.patch Patch701: hv_xen_base.patch @@ -615,55 +565,6 @@ Authors: %patch20 -p1 %patch21 -p1 %patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -p1 -%patch36 -p1 -%patch37 -p1 -%patch38 -p1 -%patch39 -p1 -%patch40 -p1 -%patch41 -p1 -%patch42 -p1 -%patch43 -p1 -%patch44 -p1 -%patch45 -p1 -%patch46 -p1 -%patch47 -p1 -%patch48 -p1 -%patch49 -p1 -%patch50 -p1 -%patch51 -p1 -%patch52 -p1 -%patch53 -p1 -%patch54 -p1 -%patch55 -p1 -%patch56 -p1 -%patch57 -p1 -%patch58 -p1 -%patch59 -p1 -%patch60 -p1 -%patch61 -p1 -%patch62 -p1 -%patch63 -p1 -%patch64 -p1 -%patch65 -p1 -%patch66 -p1 -%patch67 -p1 -%patch68 -p1 -%patch69 -p1 -%patch70 -p1 -%patch71 -p1 %patch300 -p1 %patch301 -p1 %patch302 -p1 @@ -682,8 +583,6 @@ Authors: %patch315 -p1 %patch316 -p1 %patch317 -p1 -#%patch320 -p1 -#%patch321 -p1 %patch322 -p1 %patch323 -p1 %patch324 -p1 @@ -711,7 +610,6 @@ Authors: %patch356 -p1 %patch357 -p1 %patch358 -p1 -%patch359 -p1 %patch360 -p1 %patch361 -p1 %patch362 -p1 @@ -726,6 +624,7 @@ Authors: %patch371 -p1 %patch372 -p1 %patch373 -p1 +%patch374 -p1 %patch400 -p1 %patch401 -p1 %patch402 -p1 @@ -764,6 +663,7 @@ Authors: %patch512 -p1 %patch650 -p1 %patch651 -p1 +%patch652 -p1 %patch700 -p1 %patch701 -p1 %patch702 -p1 @@ -936,6 +836,7 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/remus rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages/xen/remus # This is necessary because of the build of libconfig for libxl #rm -rf $RPM_BUILD_ROOT/$RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug %files %defattr(-,root,root) @@ -994,6 +895,7 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages/xen/remus /usr/sbin/td-util /usr/sbin/vhd-update /usr/sbin/vhd-util +/usr/sbin/gdbsx %dir %{_libdir}/xen %dir %{_libdir}/xen/bin %ifarch x86_64 diff --git a/xenapi-console-protocol.patch b/xenapi-console-protocol.patch index 8f9fa92..33b9204 100644 --- a/xenapi-console-protocol.patch +++ b/xenapi-console-protocol.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -3924,6 +3924,14 @@ class XendDomainInfo: if not config.has_key('backend'): config['backend'] = "00000000-0000-0000-0000-000000000000" diff --git a/xend-config.diff b/xend-config.diff index 9f9a903..86564e2 100644 --- a/xend-config.diff +++ b/xend-config.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains +Index: xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xendomains -+++ xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xendomains ++++ xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains @@ -1,4 +1,4 @@ -## Path: System/xen +## Path: System/Virtualization @@ -27,10 +27,10 @@ Index: xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains ## Type: integer ## Default: 300 -Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +Index: xen-4.0.1-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.0-testing/tools/examples/xend-config.sxp +--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.1-testing/tools/examples/xend-config.sxp @@ -58,11 +58,12 @@ diff --git a/xend-core-dump-loc.diff b/xend-core-dump-loc.diff index 7f0e9b2..a4cc321 100644 --- a/xend-core-dump-loc.diff +++ b/xend-core-dump-loc.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -2317,7 +2317,7 @@ class XendDomainInfo: # To prohibit directory traversal based_name = os.path.basename(self.info['name_label']) diff --git a/xend-devid-or-name.patch b/xend-devid-or-name.patch new file mode 100644 index 0000000..22496c3 --- /dev/null +++ b/xend-devid-or-name.patch @@ -0,0 +1,27 @@ +# HG changeset patch +# User Jim Fehlig +# Date 1284948067 21600 +# Node ID 4674ad11feef87a6a57b99313966e0e121588e1c +# Parent 5393151a737b023476f4e571effc547e758cf8c8 +xend: Fix device_configure + +The semantics of XendDomainInfo.py:device_configure() changed with xen upstream +c/s 19610. Previously this method would take a devid in actual id *or* name +form, e.g. it would accept '5632' or 'hdc'. This patch restores that behavior. + + Signed-off-by: Jim Fehlig + +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +=================================================================== +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -1218,6 +1218,9 @@ class XendDomainInfo: + except ValueError: + pass + devid = dev_control.convertToDeviceNumber(dev) ++ else: ++ # devid could be a name, e.g. hdc ++ devid = dev_control.convertToDeviceNumber(devid) + dev_info = self._getDeviceInfo_vbd(devid) + if dev_info is None: + raise VmError("Device %s not connected" % devid) diff --git a/xend-domain-lock.patch b/xend-domain-lock.patch index 8a11cff..72c74ba 100644 --- a/xend-domain-lock.patch +++ b/xend-domain-lock.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +Index: xen-4.0.1-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.0-testing/tools/examples/xend-config.sxp +--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.1-testing/tools/examples/xend-config.sxp @@ -305,6 +305,65 @@ # device assignment could really work properly even after we do this. #(pci-passthrough-strict-check yes) @@ -68,10 +68,10 @@ Index: xen-4.0.0-testing/tools/examples/xend-config.sxp # If we have a very big scsi device configuration, start of xend is slow, # because xend scans all the device paths to build its internal PSCSI device # list. If we need only a few devices for assigning to a guest, we can reduce -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -32,11 +32,12 @@ import re import copy import os @@ -94,7 +94,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py XendTask.log_progress(0, 30, self._constructDomain) XendTask.log_progress(31, 60, self._initDomain) -@@ -2987,6 +2989,11 @@ class XendDomainInfo: +@@ -2990,6 +2992,11 @@ class XendDomainInfo: self._stateSet(DOM_STATE_HALTED) self.domid = None # Do not push into _stateSet()! @@ -106,7 +106,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py finally: self.refresh_shutdown_lock.release() -@@ -4493,6 +4500,74 @@ class XendDomainInfo: +@@ -4496,6 +4503,74 @@ class XendDomainInfo: def has_device(self, dev_class, dev_uuid): return (dev_uuid in self.info['%s_refs' % dev_class.lower()]) @@ -181,10 +181,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py def __str__(self): return '' % \ (str(self.domid), self.info['name_label'], -Index: xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendOptions.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendOptions.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py @@ -154,6 +154,17 @@ class XendOptions: use loose check automatically if necessary.""" pci_dev_assign_strict_check_default = True @@ -228,10 +228,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py def get_vnc_tls(self): return self.get_config_string('vnc-tls', self.xend_vnc_tls) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py @@ -131,6 +131,7 @@ def save(fd, dominfo, network, live, dst dominfo.shutdown('suspend') dominfo.waitForSuspend() @@ -248,10 +248,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py return dominfo except Exception, exn: dominfo.destroy() -Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile @@ -19,6 +19,7 @@ XEN_SCRIPTS += vtpm vtpm-delete XEN_SCRIPTS += xen-hotplug-cleanup XEN_SCRIPTS += external-device-migrate @@ -260,10 +260,10 @@ Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh -Index: xen-4.0.0-testing/tools/hotplug/Linux/domain-lock +Index: xen-4.0.1-testing/tools/hotplug/Linux/domain-lock =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/hotplug/Linux/domain-lock ++++ xen-4.0.1-testing/tools/hotplug/Linux/domain-lock @@ -0,0 +1,83 @@ +#!/bin/bash + @@ -348,10 +348,10 @@ Index: xen-4.0.0-testing/tools/hotplug/Linux/domain-lock + get_status $vm_path + ;; +esac -Index: xen-4.0.0-testing/tools/hotplug/Linux/vm-monitor +Index: xen-4.0.1-testing/tools/hotplug/Linux/vm-monitor =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/hotplug/Linux/vm-monitor ++++ xen-4.0.1-testing/tools/hotplug/Linux/vm-monitor @@ -0,0 +1,41 @@ +#!/bin/bash + diff --git a/xend-sysconfig.patch b/xend-sysconfig.patch index 3a433c8..972fa6b 100644 --- a/xend-sysconfig.patch +++ b/xend-sysconfig.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xend +Index: xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xend =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xend -+++ xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xend +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xend ++++ xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xend @@ -1,11 +1,27 @@ +## Path: System/Virtualization +## Type: string(none,guest,hv,all) diff --git a/xm-create-xflag.patch b/xm-create-xflag.patch index e637b87..0c9ecf9 100644 --- a/xm-create-xflag.patch +++ b/xm-create-xflag.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py @@ -36,7 +36,7 @@ from xen.xend.server.DevConstants import from xen.util import blkif from xen.util import vscsi_util @@ -11,7 +11,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py from xen.util import utils, auxbin from xen.util.pci import dev_dict_to_sxp, \ parse_pci_name_extended, PciDeviceParseError -@@ -1514,7 +1514,7 @@ def main(argv): +@@ -1522,7 +1522,7 @@ def main(argv): except IOError, exn: raise OptionError("Cannot read file %s: %s" % (config, exn[1])) @@ -20,7 +20,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py from xen.xm.xenapi_create import sxp2xml sxp2xml_inst = sxp2xml() doc = sxp2xml_inst.convert_sxp_to_xml(config, transient=True) -@@ -1522,7 +1522,7 @@ def main(argv): +@@ -1530,7 +1530,7 @@ def main(argv): if opts.vals.dryrun and not opts.is_xml: SXPPrettyPrint.prettyprint(config) @@ -29,10 +29,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py from xml.dom.ext import PrettyPrint as XMLPrettyPrint XMLPrettyPrint(doc) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPIConstants.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py @@ -45,8 +45,10 @@ XEN_API_ON_NORMAL_EXIT = [ XEN_API_ON_CRASH_BEHAVIOUR = [ 'destroy', diff --git a/xm-save-check-file.patch b/xm-save-check-file.patch index b118981..f90934a 100644 --- a/xm-save-check-file.patch +++ b/xm-save-check-file.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py @@ -1923,10 +1923,10 @@ class XendAPI(object): bool(live), port, node, ssl, bool(chs)) return xen_api_success_void() @@ -15,10 +15,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py return xen_api_success_void() def VM_restore(self, _, src, paused): -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py @@ -1496,7 +1496,7 @@ class XendDomain: pass sock.close() @@ -38,10 +38,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py if dominfo.getDomid() == DOM0_ID: raise XendError("Cannot save privileged domain %s" % str(domid)) if dominfo._stateGet() != DOM_STATE_RUNNING: -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py @@ -120,7 +120,7 @@ SUBCOMMAND_HELP = { 'reset' : ('', 'Reset a domain.'), 'restore' : (' [-p]', diff --git a/xm-test-cleanup.diff b/xm-test-cleanup.diff index f6d1edc..6aae672 100644 --- a/xm-test-cleanup.diff +++ b/xm-test-cleanup.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py +Index: xen-4.0.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py -+++ xen-4.0.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py +--- xen-4.0.1-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py ++++ xen-4.0.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py @@ -35,3 +35,9 @@ if s != 0: # Make sure it's gone if isDomainRunning(domain.getName()): From 7e89789f0a858dacfcf22a28d119fa244ff8b12f6b0dfb3e247f999361a32f8b Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Mon, 27 Sep 2010 21:07:49 +0000 Subject: [PATCH 4/6] - bnc#640773 - Xen kernel crashing right after grub 21894-intel-unmask-cpuid.patch - Upstream patch from Jan 22148-serial-irq-dest.patch - bnc#628719 - improve check_device_status to handle HA cases check_device_status.patch - bnc#628719 - multi-xvdp mutli-xvdp.patch - bnc#632956 - fix VNC altgr-insert behavior 22135-heap-lock.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=74 --- 21894-intel-unmask-cpuid.patch | 48 ++++++++++++++ 22135-heap-lock.patch | 51 ++++++++++++++ 22148-serial-irq-dest.patch | 24 +++++++ 7410-qemu-alt-gr.patch | 118 +++++++++++++++++++++++++++++++++ capslock_enable.patch | 2 +- check_device_status.patch | 48 ++++++++++++++ heaplock.patch | 41 ------------ multi-xvdp.patch | 87 ++++++++++++++++++++++++ xen-domUloader.diff | 4 +- xen.changes | 27 +++++++- xen.spec | 26 +++++--- xend-domain-lock.patch | 2 +- 12 files changed, 424 insertions(+), 54 deletions(-) create mode 100644 21894-intel-unmask-cpuid.patch create mode 100644 22135-heap-lock.patch create mode 100644 22148-serial-irq-dest.patch create mode 100644 7410-qemu-alt-gr.patch create mode 100644 check_device_status.patch delete mode 100644 heaplock.patch create mode 100644 multi-xvdp.patch diff --git a/21894-intel-unmask-cpuid.patch b/21894-intel-unmask-cpuid.patch new file mode 100644 index 0000000..a6b7507 --- /dev/null +++ b/21894-intel-unmask-cpuid.patch @@ -0,0 +1,48 @@ +# HG changeset patch +# User Keir Fraser +# Date 1280486194 -3600 +# Node ID c9e7850ec9a18d7085c7468407e175bb64513846 +# Parent 754877be695ba3050f140002dbd185a27a437fcc +x86: unmask CPUID levels on Intel CPUs +References: bnc#640773 + +If the CPUID limit bit in MSR_IA32_MISC_ENABLE is set, clear it to +make all CPUID information available. This is required for some +features to work, such as MWAIT in cpuidle, get cpu topology, XSAVE, +etc. + +Signed-off-by: Wei Gang + +--- a/xen/arch/x86/cpu/intel.c ++++ b/xen/arch/x86/cpu/intel.c +@@ -90,6 +90,20 @@ void __devinit early_intel_workaround(st + /* Netburst reports 64 bytes clflush size, but does IO in 128 bytes */ + if (c->x86 == 15 && c->x86_cache_alignment == 64) + c->x86_cache_alignment = 128; ++ ++ /* Unmask CPUID levels if masked: */ ++ if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { ++ u64 misc_enable; ++ ++ rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); ++ ++ if (misc_enable & MSR_IA32_MISC_ENABLE_LIMIT_CPUID) { ++ misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID; ++ wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable); ++ c->cpuid_level = cpuid_eax(0); ++ printk("revised cpuid_level = %d\n", c->cpuid_level); ++ } ++ } + } + + /* +--- a/xen/include/asm-x86/msr-index.h ++++ b/xen/include/asm-x86/msr-index.h +@@ -324,6 +324,7 @@ + #define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1<<11) + #define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1<<12) + #define MSR_IA32_MISC_ENABLE_MONITOR_ENABLE (1<<18) ++#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID (1<<22) + #define MSR_IA32_MISC_ENABLE_XTPR_DISABLE (1<<23) + + /* Intel Model 6 */ diff --git a/22135-heap-lock.patch b/22135-heap-lock.patch new file mode 100644 index 0000000..bdc8a66 --- /dev/null +++ b/22135-heap-lock.patch @@ -0,0 +1,51 @@ +References: bnc#638465 + +# HG changeset patch +# User Keir Fraser +# Date 1284394111 -3600 +# Node ID 69e8bb164683c76e0cd787df21b98c73905a61e6 +# Parent e300bfa3c0323ac08e7b8cd9fb40f9f1ab548543 +page_alloc: Hold heap_lock while adjusting page states to/from PGC_state_free. + +This avoids races with buddy-merging logic in free_heap_pages(). + +Signed-off-by: Keir Fraser + +--- a/xen/common/page_alloc.c ++++ b/xen/common/page_alloc.c +@@ -378,8 +378,6 @@ static struct page_info *alloc_heap_page + total_avail_pages -= request; + ASSERT(total_avail_pages >= 0); + +- spin_unlock(&heap_lock); +- + cpus_clear(mask); + + for ( i = 0; i < (1 << order); i++ ) +@@ -401,6 +399,8 @@ static struct page_info *alloc_heap_page + page_set_owner(&pg[i], NULL); + } + ++ spin_unlock(&heap_lock); ++ + if ( unlikely(!cpus_empty(mask)) ) + { + perfc_incr(need_flush_tlb_flush); +@@ -496,6 +496,8 @@ static void free_heap_pages( + ASSERT(order <= MAX_ORDER); + ASSERT(node >= 0); + ++ spin_lock(&heap_lock); ++ + for ( i = 0; i < (1 << order); i++ ) + { + /* +@@ -523,8 +525,6 @@ static void free_heap_pages( + pg[i].tlbflush_timestamp = tlbflush_current_time(); + } + +- spin_lock(&heap_lock); +- + avail[node][zone] += 1 << order; + total_avail_pages += 1 << order; + diff --git a/22148-serial-irq-dest.patch b/22148-serial-irq-dest.patch new file mode 100644 index 0000000..3c7736b --- /dev/null +++ b/22148-serial-irq-dest.patch @@ -0,0 +1,24 @@ +# HG changeset patch +# User Keir Fraser +# Date 1284395845 -3600 +# Node ID a254d1236c1a52264beb0253352ef64d65a98eb3 +# Parent f0a1229cb0a6505f3240ac59a3bb6ade2acfa1a2 +Fix serial interrupt's destination + +Lowest Priority can't use with invalid cpu_mask, and the default value +of CPU_MASK_ALL may cover CPU which wasn't online. + +From: "Yang, Sheng" +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/smpboot.c ++++ b/xen/arch/x86/smpboot.c +@@ -1602,7 +1602,7 @@ void __init smp_intr_init(void) + irq_vector[irq] = FIRST_HIPRIORITY_VECTOR + seridx + 1; + per_cpu(vector_irq, cpu)[FIRST_HIPRIORITY_VECTOR + seridx + 1] = irq; + irq_cfg[irq].vector = FIRST_HIPRIORITY_VECTOR + seridx + 1; +- irq_cfg[irq].domain = (cpumask_t)CPU_MASK_ALL; ++ irq_cfg[irq].domain = cpu_online_map; + } + + /* IPI for cleanuping vectors after irq move */ diff --git a/7410-qemu-alt-gr.patch b/7410-qemu-alt-gr.patch new file mode 100644 index 0000000..e41ba7a --- /dev/null +++ b/7410-qemu-alt-gr.patch @@ -0,0 +1,118 @@ +# HG changeset patch +# User Ian Jackson +# Date 1284481903 -3600 +# Node ID f71a4c18e34e86e1011662fa42c10ec54bff0688 +# Parent 080b5a094d4e0acab6646125f91f988911409016 +ioemu: fix VNC altgr-insert behavior + +When access to a Xen DomU (Linux) from a VNC client in Windows, alt-gr +key is not working properly with Spanish keyboard. When Alt + another +key pressed, vncserver receives Altgr down, Altgr up and key down +messages in order, that causes incorrect output. + +With following patch, when vncerver receives key down message, it +first check if the keysym needs altgr modifer, if it needs altgr +modifier but altgr is not 'down', sending altgr keycode before sending +key keycode. + +Signed-off-by: Chunyan Liu + +committer: Ian Jackson +git-commit-id: f95d202ed6444dacb15fbea4dee185eb0e048d9a + +diff -r 080b5a094d4e -r f71a4c18e34e keymaps.c +--- a/tools/ioemu-qemu-xen/keymaps.c Wed Sep 08 16:38:09 2010 +0100 ++++ b//tools/ioemu-qemu-xen/keymaps.c Tue Sep 14 17:31:43 2010 +0100 +@@ -51,6 +51,7 @@ + struct key_range *numlock_range; + struct key_range *shift_range; + struct key_range *localstate_range; ++ struct key_range *altgr_range; + } kbd_layout_t; + + static void add_to_key_range(struct key_range **krp, int code) { +@@ -133,7 +134,11 @@ + add_to_key_range(&k->localstate_range, keycode); + //fprintf(stderr, "localstate keysym %04x keycode %d\n", keysym, keycode); + } +- ++ if (rest && strstr(rest, "altgr")) { ++ add_to_key_range(&k->altgr_range, keysym); ++ //fprintf(stderr, "altgr keysym %04x keycode %d\n", keysym, keycode); ++ } ++ + /* if(keycode&0x80) + keycode=(keycode<<8)^0x80e0; */ + if (keysym < MAX_NORMAL_KEYCODE) { +@@ -233,3 +238,16 @@ + return 0; + return 1; + } ++ ++static inline int keysym_is_altgr(void *kbd_layout, int keysym) ++{ ++ kbd_layout_t *k = kbd_layout; ++ struct key_range *kr; ++ ++ for (kr = k->altgr_range; kr; kr = kr->next) ++ if (keysym >= kr->start && keysym <= kr->end){ ++ return 1; ++ } ++ return 0; ++} ++ +diff -r 080b5a094d4e -r f71a4c18e34e vnc.c +--- a/tools/ioemu-qemu-xen/vnc.c Wed Sep 08 16:38:09 2010 +0100 ++++ b/tools/ioemu-qemu-xen/vnc.c Tue Sep 14 17:31:43 2010 +0100 +@@ -1274,12 +1274,27 @@ + } + } + ++static void press_key_altgr_down(VncState *vs, int down) ++{ ++ kbd_put_keycode(0xe0); ++ if (down){ ++ kbd_put_keycode(0xb8 & 0x7f); ++ vs->modifiers_state[0xb8] = 1; ++ } ++ else { ++ kbd_put_keycode(0xb8 | 0x80); ++ vs->modifiers_state[0xb8] = 0; ++ } ++} ++ + static void do_key_event(VncState *vs, int down, uint32_t sym) + { + int keycode; + int shift_keys = 0; + int shift = 0; + int keypad = 0; ++ int altgr = 0; ++ int altgr_keys = 0; + + if (is_graphic_console()) { + if (sym >= 'A' && sym <= 'Z') { +@@ -1289,8 +1304,11 @@ + else { + shift = keysym_is_shift(vs->kbd_layout, sym & 0xFFFF); + } ++ ++ altgr = keysym_is_altgr(vs->kbd_layout, sym & 0xFFFF); + } + shift_keys = vs->modifiers_state[0x2a] | vs->modifiers_state[0x36]; ++ altgr_keys = vs->modifiers_state[0xb8]; + + keycode = keysym2scancode(vs->kbd_layout, sym & 0xFFFF); + if (keycode == 0) { +@@ -1357,6 +1375,11 @@ + } + + if (is_graphic_console()) { ++ ++ if (altgr && !altgr_keys) { ++ press_key_altgr_down(vs, down); ++ } ++ + /* If the shift state needs to change then simulate an additional + keypress before sending this one. Ignore for non shiftable keys. + */ diff --git a/capslock_enable.patch b/capslock_enable.patch index ee5946c..dacca9a 100644 --- a/capslock_enable.patch +++ b/capslock_enable.patch @@ -2,7 +2,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c =================================================================== --- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vnc.c +++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c -@@ -1326,6 +1326,11 @@ static void do_key_event(VncState *vs, i +@@ -1344,6 +1344,11 @@ static void do_key_event(VncState *vs, i } break; case 0x3a: /* CapsLock */ diff --git a/check_device_status.patch b/check_device_status.patch new file mode 100644 index 0000000..983b104 --- /dev/null +++ b/check_device_status.patch @@ -0,0 +1,48 @@ +diff -r ce65e0e03a57 tools/python/xen/xend/server/DevController.py +--- a/tools/python/xen/xend/server/DevController.py Fri Aug 27 16:53:00 2010 +0800 ++++ b/tools/python/xen/xend/server/DevController.py Fri Aug 27 17:13:32 2010 +0800 +@@ -149,7 +149,10 @@ + (status, err) = self.waitForBackend(devid) + + if status == Timeout: +- self.destroyDevice(devid, False) ++ #Clean timeout backend resource ++ dev = self.convertToDeviceNumber(devid) ++ self.writeBackend(dev, HOTPLUG_STATUS_NODE, HOTPLUG_STATUS_ERROR) ++ self.destroyDevice(devid, True) + raise VmError("Device %s (%s) could not be connected. " + "Hotplug scripts not working." % + (devid, self.deviceClass)) +@@ -554,7 +557,17 @@ + + xswatch(statusPath, hotplugStatusCallback, ev, result) + +- ev.wait(DEVICE_CREATE_TIMEOUT) ++ for i in range(1, 50): ++ ev.wait(DEVICE_CREATE_TIMEOUT/50) ++ status = xstransact.Read(statusPath) ++ if status is not None: ++ if status == HOTPLUG_STATUS_ERROR: ++ result['status'] = Error ++ elif status == HOTPLUG_STATUS_BUSY: ++ result['status'] = Busy ++ else: ++ result['status'] = Connected ++ break + + err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE) + +@@ -571,7 +584,12 @@ + + xswatch(statusPath, deviceDestroyCallback, ev, result) + +- ev.wait(DEVICE_DESTROY_TIMEOUT) ++ for i in range(1, 50): ++ ev.wait(DEVICE_DESTROY_TIMEOUT/50) ++ status = xstransact.Read(statusPath) ++ if status is None: ++ result['status'] = Disconnected ++ break + + return result['status'] + diff --git a/heaplock.patch b/heaplock.patch deleted file mode 100644 index 9593000..0000000 --- a/heaplock.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Keir Fraser -References: bnc#638465 - ---- a/xen/common/page_alloc.c Wed Sep 01 10:22:05 2010 +0100 -+++ b/xen/common/page_alloc.c Tue Sep 07 13:55:34 2010 +0100 -@@ -378,8 +378,6 @@ - total_avail_pages -= request; - ASSERT(total_avail_pages >= 0); - -- spin_unlock(&heap_lock); -- - cpus_clear(mask); - - for ( i = 0; i < (1 << order); i++ ) -@@ -400,6 +398,8 @@ - pg[i].u.inuse.type_info = 0; - page_set_owner(&pg[i], NULL); - } -+ -+ spin_unlock(&heap_lock); - - if ( unlikely(!cpus_empty(mask)) ) - { -@@ -496,6 +496,8 @@ - ASSERT(order <= MAX_ORDER); - ASSERT(node >= 0); - -+ spin_lock(&heap_lock); -+ - for ( i = 0; i < (1 << order); i++ ) - { - /* -@@ -522,8 +524,6 @@ - if ( pg[i].u.free.need_tlbflush ) - pg[i].tlbflush_timestamp = tlbflush_current_time(); - } -- -- spin_lock(&heap_lock); - - avail[node][zone] += 1 << order; - total_avail_pages += 1 << order; diff --git a/multi-xvdp.patch b/multi-xvdp.patch new file mode 100644 index 0000000..0da4e79 --- /dev/null +++ b/multi-xvdp.patch @@ -0,0 +1,87 @@ +Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py +=================================================================== +--- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py ++++ xen-4.0.1-testing/tools/python/xen/util/blkif.py +@@ -19,10 +19,12 @@ def blkdev_name_to_number(name): + devname = 'virtual-device' + devnum = None + ++ """ + try: + return (devname, os.stat(n).st_rdev) + except Exception, ex: + pass ++ """ + + scsi_major = [ 8, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135 ] + if re.match( '/dev/sd[a-z]([1-9]|1[0-5])?$', n): +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +=================================================================== +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -73,7 +73,7 @@ from xen.xend.XendPSCSI import XendPSCSI + from xen.xend.XendDSCSI import XendDSCSI, XendDSCSI_HBA + + MIGRATE_TIMEOUT = 30.0 +-BOOTLOADER_LOOPBACK_DEVICE = '/dev/xvdp' ++BOOTLOADER_LOOPBACK_DEVICES = ['/dev/xvdy', '/dev/xvdx', '/dev/xvdw', '/dev/xvdv', '/dev/xvdu', '/dev/xvdt', '/dev/xvds', '/dev/xvdr', '/dev/xvdq', '/dev/xvdp', '/dev/xvdo', '/dev/xvdn', '/dev/xvdm', '/dev/xvdl', '/dev/xvdk', '/dev/xvdj', '/dev/xvdi', '/dev/xvdh', '/dev/xvdg', '/dev/xvdf', '/dev/xvde', '/dev/xvdd'] + + xc = xen.lowlevel.xc.xc() + xoptions = XendOptions.instance() +@@ -3314,20 +3314,27 @@ class XendDomainInfo: + # This is a file, not a device. pygrub can cope with a + # file if it's raw, but if it's QCOW or other such formats + # used through blktap, then we need to mount it first. +- +- log.info("Mounting %s on %s." % +- (fn, BOOTLOADER_LOOPBACK_DEVICE)) +- +- vbd = { +- 'mode': 'RW', +- 'device': BOOTLOADER_LOOPBACK_DEVICE, +- } +- +- from xen.xend import XendDomain +- dom0 = XendDomain.instance().privilegedDomain() +- vbd_uuid = dom0.create_vbd(vbd, disk) +- dom0._waitForDeviceFrontUUID(vbd_uuid) +- fn = BOOTLOADER_LOOPBACK_DEVICE ++ # Try all possible loopback_devices ++ for loopback_device in BOOTLOADER_LOOPBACK_DEVICES: ++ log.info("Mounting %s on %s." % (fn, loopback_device)) ++ vbd = { 'mode' : 'RW', 'device' : loopback_device, } ++ try: ++ from xen.xend import XendDomain ++ dom0 = XendDomain.instance().privilegedDomain() ++ vbd_uuid = dom0.create_vbd(vbd, disk) ++ dom0._waitForDeviceFrontUUID(vbd_uuid) ++ fn = loopback_device ++ break ++ except VmError, e: ++ if str(e).find('already connected.') != -1: ++ continue ++ elif str(e).find('isn\'t accessible') != -1: ++ dom0.destroyDevice('vbd', loopback_device, force = True, rm_cfg = True) ++ continue ++ else: ++ raise ++ else: ++ raise + + try: + blcfg = bootloader(blexec, fn, self, False, +@@ -3335,11 +3342,11 @@ class XendDomainInfo: + finally: + if mounted: + log.info("Unmounting %s from %s." % +- (fn, BOOTLOADER_LOOPBACK_DEVICE)) ++ (fn, loopback_device)) + if devtype in ['tap', 'tap2']: +- dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True) ++ dom0.destroyDevice('tap', loopback_device, rm_cfg = True) + else: +- dom0.destroyDevice('vbd', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True) ++ dom0.destroyDevice('vbd', loopback_device, rm_cfg = True) + + if blcfg is None: + msg = "Had a bootloader specified, but can't find disk" diff --git a/xen-domUloader.diff b/xen-domUloader.diff index 7e61638..ed51a5f 100644 --- a/xen-domUloader.diff +++ b/xen-domUloader.diff @@ -101,11 +101,11 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendBootloader.py + raise VmError(msg) + + avail = False -+ for i in xrange(1, 20): ++ for i in xrange(1, 100): + avail = os.access(disk, os.R_OK) + if avail: + break -+ time.sleep(.05) ++ time.sleep(.1) + + if not avail: + msg = "Disk '%s' isn't accessible" % disk diff --git a/xen.changes b/xen.changes index 045a893..e43d30e 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Mon Sep 27 09:59:37 MDT 2010 - carnold@novell.com + +- bnc#640773 - Xen kernel crashing right after grub + 21894-intel-unmask-cpuid.patch +- Upstream patch from Jan + 22148-serial-irq-dest.patch + +------------------------------------------------------------------- +Tue Sep 23 16:45:11 CST 2010 - cyliu@novell.com + +- bnc#628719 - improve check_device_status to handle HA cases + check_device_status.patch + +------------------------------------------------------------------- +Tue Sep 23 16:43:11 CST 2010 - cyliu@novell.com + +- bnc#628719 - multi-xvdp + mutli-xvdp.patch + +------------------------------------------------------------------- +Tue Sep 20 14:11:31 CST 2010 - cyliu@novell.com + +- bnc#632956 - fix VNC altgr-insert behavior + ------------------------------------------------------------------- Mon Sep 13 16:24:31 MDT 2010 - carnold@novell.com @@ -19,7 +44,7 @@ Mon Sep 13 10:50:56 MDT 2010 - carnold@novell.com Mon Sep 13 10:47:09 MDT 2010 - carnold@novell.com - bnc#638465 - hypervisor panic in memory handling - heaplock.patch + 22135-heap-lock.patch ------------------------------------------------------------------- Thu Sep 9 11:29:45 MDT 2010 - carnold@novell.com diff --git a/xen.spec b/xen.spec index 9d31108..901bdff 100644 --- a/xen.spec +++ b/xen.spec @@ -91,12 +91,16 @@ Patch13: 21683-vtd-kill-timer-conditional.patch Patch14: 21723-get-domu-state.patch Patch15: 21847-pscsi.patch Patch16: 21866-xenapi.patch -Patch17: 22019-x86-cpuidle-online-check.patch -Patch18: 22051-x86-forced-EOI.patch -Patch19: 22067-x86-irq-domain.patch -Patch20: 22068-vtd-irte-RH-bit.patch -Patch21: 22071-ept-get-entry-lock.patch -Patch22: 22084-x86-xsave-off.patch +Patch17: 21894-intel-unmask-cpuid.patch +Patch18: 22019-x86-cpuidle-online-check.patch +Patch19: 22051-x86-forced-EOI.patch +Patch20: 22067-x86-irq-domain.patch +Patch21: 22068-vtd-irte-RH-bit.patch +Patch22: 22071-ept-get-entry-lock.patch +Patch23: 22084-x86-xsave-off.patch +Patch24: 7410-qemu-alt-gr.patch +Patch25: 22135-heap-lock.patch +Patch26: 22148-serial-irq-dest.patch # Our patches Patch300: xen-config.diff Patch301: xend-config.diff @@ -184,6 +188,8 @@ Patch429: hibernate.patch Patch430: del_usb_xend_entry.patch Patch431: capslock_enable.patch Patch432: enable_more_nic_pxe.patch +Patch433: multi-xvdp.patch +Patch434: check_device_status.patch # Jim's domain lock patch Patch450: xend-domain-lock.patch # Hypervisor and PV driver Patches @@ -202,7 +208,6 @@ Patch511: supported_module.diff Patch512: magic_ioport_compat.patch Patch650: disable_emulated_device.diff Patch651: ioemu-disable-scsi.patch -Patch652: heaplock.patch # novell_shim patches Patch700: hv_tools.patch Patch701: hv_xen_base.patch @@ -565,6 +570,10 @@ Authors: %patch20 -p1 %patch21 -p1 %patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 %patch300 -p1 %patch301 -p1 %patch302 -p1 @@ -647,6 +656,8 @@ Authors: %patch430 -p1 %patch431 -p1 %patch432 -p1 +%patch433 -p1 +%patch434 -p1 %patch450 -p1 %patch500 -p1 %patch501 -p1 @@ -663,7 +674,6 @@ Authors: %patch512 -p1 %patch650 -p1 %patch651 -p1 -%patch652 -p1 %patch700 -p1 %patch701 -p1 %patch702 -p1 diff --git a/xend-domain-lock.patch b/xend-domain-lock.patch index 72c74ba..01d5912 100644 --- a/xend-domain-lock.patch +++ b/xend-domain-lock.patch @@ -106,7 +106,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py finally: self.refresh_shutdown_lock.release() -@@ -4496,6 +4503,74 @@ class XendDomainInfo: +@@ -4503,6 +4510,74 @@ class XendDomainInfo: def has_device(self, dev_class, dev_uuid): return (dev_uuid in self.info['%s_refs' % dev_class.lower()]) From 06b9899ef95c15051048486e91160fed2a2cd20701f38c4184be86e33ac0a317 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Mon, 27 Sep 2010 22:07:20 +0000 Subject: [PATCH 5/6] Accepting request 49271 from Virtualization checked in (request 49271) OBS-URL: https://build.opensuse.org/request/show/49271 OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=75 --- 21089-x86-startup-irq-from-setup-gsi.patch | 20 +- 21109-x86-cpu-hotplug.patch | 154 +++++++ 21128-domain-save-flush.patch | 31 ++ 21129-xen-hotplug-cleanup.patch | 22 + 21150-shadow-race.patch | 68 +++ 21151-trace-bounds-check.patch | 205 +++++++++ 21160-sysctl-debug-keys.patch | 27 ++ 21189-x86-emulate-clflush.patch | 53 +++ 21193-blktap-script.patch | 23 + 21194-ioemu-subtype.patch | 12 + 21223-xend-preserve-devs.patch | 32 ++ 21225-conring-iommu.patch | 77 ++++ 21234-x86-bad-srat-clear-pxm2node.patch | 34 ++ 21235-crashkernel-advanced.patch | 22 +- 21266-vmx-disabled-check.patch | 24 ++ 21271-x86-cache-flush-global.patch | 14 +- 21272-x86-dom0-alloc-performance.patch | 99 +++++ 21273-linux-autconf.patch | 26 ++ 21301-svm-lmsl.patch | 28 +- 21304-keyhandler-alternative.patch | 8 +- 21317-xend-blkif-util-tap2.patch | 23 + 21331-svm-vintr-during-nmi.patch | 41 ++ 21333-xentrace-t_info-size.patch | 26 ++ 21340-vtd-dom0-mapping-latency.patch | 56 +++ 21346-x86-platform-timer-wrap.patch | 67 +++ 21349-x86-memcpy.patch | 313 ++++++++++++++ 21360-x86-mce-polling-disabled-init.patch | 20 + 21372-x86-cross-cpu-wait.patch | 42 ++ 21373-dummy-domain-io-caps.patch | 48 +++ 21408-amd-erratum-383.patch | 141 ++++++ 21421-vts-ats-enabling.patch | 30 +- 21435-vmx-retain-global-controls.patch | 45 ++ 21445-x86-tsc-handling-cleanups-v2.patch | 268 ++++++++++++ 21446-iommu-graceful-generic-fail.patch | 29 ++ ...adow-avoid-remove-all-after-teardown.patch | 31 ++ 21456-compat-hvm-addr-check.patch | 22 + 21459-block-script.patch | 27 ++ 21460-xend-timeoffset.patch | 25 ++ 21492-x86-pirq-unbind.patch | 23 + 21526-x86-nehalem-cpuid-mask.patch | 223 ++-------- 21542-amd-erratum-411.patch | 16 +- 21615-dont-save-xen-heap-pages.patch | 22 +- 21620-x86-signed-domain-irq.patch | 34 ++ 21627-cpuidle-wrap.patch | 8 +- 21643-vmx-vpmu-pmc-offset.patch | 25 ++ 21653-xend-mac-addr.patch | 6 +- 21678-xend-mac-fix.patch | 6 +- 21682-trace-buffer-range.patch | 26 ++ 21683-vtd-kill-timer-conditional.patch | 20 +- 21693-memevent-64bit-only.patch | 286 +++++++++++++ 21695-trace-t_info-readonly.patch | 90 ++++ 21698-x86-pirq-range-check.patch | 20 + 21699-p2m-query-for-type-change.patch | 24 ++ 21700-32on64-vm86-gpf.patch | 25 ++ 21705-trace-printk.patch | 51 +++ 21706-trace-security.patch | 396 +++++++++++++++++ 21712-amd-osvw.patch | 400 ++++++++++++++++++ 21723-get-domu-state.patch | 28 +- 21744-x86-cpufreq-range-check.patch | 27 ++ 21847-pscsi.patch | 26 +- 21866-xenapi.patch | 18 +- 21894-intel-unmask-cpuid.patch | 48 --- 22019-x86-cpuidle-online-check.patch | 30 -- 22051-x86-forced-EOI.patch | 203 --------- 22067-x86-irq-domain.patch | 31 -- 22068-vtd-irte-RH-bit.patch | 35 -- 22071-ept-get-entry-lock.patch | 45 -- 22084-x86-xsave-off.patch | 22 - 22135-heap-lock.patch | 51 --- 22148-serial-irq-dest.patch | 24 -- 32on64-extra-mem.patch | 8 +- 7410-qemu-alt-gr.patch | 118 ------ README.SuSE | 7 +- bdrv_open2_fix_flags.patch | 24 +- bdrv_open2_flags_2.patch | 38 +- blktap-pv-cdrom.patch | 46 +- blktap.patch | 18 +- blktapctrl-default-to-ioemu.patch | 6 +- block-dmmd | 10 +- block-flags.diff | 34 ++ block-losetup-retry.diff | 211 +++++++++ bridge-bonding.diff | 6 +- bridge-opensuse.patch | 6 +- bridge-record-creation.patch | 6 +- bridge-vlan.diff | 6 +- build-tapdisk-ioemu.patch | 24 +- capslock_enable.patch | 9 +- cdrom-removable.patch | 26 +- check_device_status.patch | 48 --- checkpoint-rename.patch | 6 +- cpu-pools-docs.patch | 32 +- cpu-pools-libxc.patch | 26 +- cpu-pools-libxen.patch | 60 +-- cpu-pools-python.patch | 110 ++--- cpu-pools-xmtest.patch | 72 ++-- cpupools-core-fixup.patch | 34 +- cpupools-core.patch | 232 +++++----- del_usb_xend_entry.patch | 8 +- disable_emulated_device.diff | 6 +- dom-print.patch | 9 +- domu-usb-controller.patch | 6 +- dump-exec-state.patch | 52 +-- enable_more_nic_pxe.patch | 12 +- hibernate.patch | 6 +- hv_tools.patch | 26 +- hv_win7_eoi_bug.patch | 6 +- hv_xen_base.patch | 42 +- hv_xen_extension.patch | 28 +- ...7615-qcow2-fix-alloc_cluster_link_l2.patch | 6 +- ioemu-bdrv-open-CACHE_WB.patch | 6 +- ioemu-blktap-barriers.patch | 6 +- ioemu-blktap-fv-init.patch | 6 +- ioemu-blktap-image-format.patch | 12 +- ioemu-blktap-zero-size.patch | 12 +- ioemu-debuginfo.patch | 12 +- ioemu-disable-scsi.patch | 18 +- ioemu-vnc-resize.patch | 8 +- libxen_permissive.patch | 6 +- magic_ioport_compat.patch | 6 +- multi-xvdp.patch | 87 ---- network-nat-open-SuSEfirewall2-FORWARD.patch | 6 +- network-nat.patch | 6 +- network-route.patch | 6 +- passthrough-hotplug-segfault.patch | 90 ++++ popen2-argument-fix.patch | 6 +- pv-driver-build.patch | 6 +- pvdrv-import-shared-info.patch | 18 +- pvdrv_emulation_control.patch | 6 +- qemu-dm-segfault.patch | 6 +- qemu-security-etch1.diff | 12 +- serial-split.patch | 8 +- snapshot-ioemu-delete.patch | 20 +- snapshot-ioemu-restore.patch | 36 +- snapshot-ioemu-save.patch | 30 +- snapshot-xend.patch | 44 +- supported_module.diff | 4 +- suse-disable-tap2-default.patch | 32 ++ tapdisk-ioemu-logfile.patch | 8 +- tapdisk-ioemu-shutdown-fix.patch | 12 +- tmp_build.patch | 6 +- tools-gdbserver-build.diff | 8 +- tools-kboot.diff | 36 +- tools-xc_kexec.diff | 78 ++-- udev-rules.patch | 20 +- usb-list.patch | 45 -- vif-bridge-no-iptables.patch | 6 +- vif-route-ifup.patch | 16 +- x86-cpufreq-report.patch | 14 +- x86-extra-trap-info.patch | 12 +- x86-ioapic-ack-default.patch | 10 +- x86-show-page-walk-early.patch | 44 +- xen-4.0.0-testing-src.tar.bz2 | 3 + xen-4.0.1-testing-src.tar.bz2 | 3 - xen-api-auth.patch | 6 +- xen-changeset.diff | 6 +- xen-config.diff | 23 +- xen-destdir.diff | 36 +- xen-disable-libxl.diff | 8 +- xen-disable-qemu-monitor.diff | 6 +- xen-disable-xenpaging.diff | 8 +- xen-domUloader.diff | 28 +- xen-extra-fixes.patch | 6 +- xen-fixme-doc.diff | 12 +- xen-hvm-default-bridge.diff | 24 +- xen-hvm-default-pae.diff | 6 +- xen-ioemu-hvm-pv-support.diff | 6 +- xen-max-free-mem.diff | 24 +- xen-no-dummy-nfs-ip.diff | 8 +- xen-paths.diff | 18 +- xen-qemu-iscsi-fix.patch | 10 +- xen-rpmoptflags.diff | 12 +- xen-warnings.diff | 54 +-- xen-xm-top-needs-root.diff | 8 +- xen-xmexample-vti.diff | 6 +- xen-xmexample.diff | 45 +- xen.changes | 97 +---- xen.spec | 156 +++++-- xenapi-console-protocol.patch | 6 +- xend-config.diff | 12 +- xend-core-dump-loc.diff | 6 +- xend-devid-or-name.patch | 27 -- xend-domain-lock.patch | 42 +- xend-sysconfig.patch | 6 +- xm-create-xflag.patch | 16 +- xm-save-check-file.patch | 18 +- xm-test-cleanup.diff | 6 +- 186 files changed, 5183 insertions(+), 2357 deletions(-) create mode 100644 21109-x86-cpu-hotplug.patch create mode 100644 21128-domain-save-flush.patch create mode 100644 21129-xen-hotplug-cleanup.patch create mode 100644 21150-shadow-race.patch create mode 100644 21151-trace-bounds-check.patch create mode 100644 21160-sysctl-debug-keys.patch create mode 100644 21189-x86-emulate-clflush.patch create mode 100644 21193-blktap-script.patch create mode 100644 21194-ioemu-subtype.patch create mode 100644 21223-xend-preserve-devs.patch create mode 100644 21225-conring-iommu.patch create mode 100644 21234-x86-bad-srat-clear-pxm2node.patch create mode 100644 21266-vmx-disabled-check.patch create mode 100644 21272-x86-dom0-alloc-performance.patch create mode 100644 21273-linux-autconf.patch create mode 100644 21317-xend-blkif-util-tap2.patch create mode 100644 21331-svm-vintr-during-nmi.patch create mode 100644 21333-xentrace-t_info-size.patch create mode 100644 21340-vtd-dom0-mapping-latency.patch create mode 100644 21346-x86-platform-timer-wrap.patch create mode 100644 21349-x86-memcpy.patch create mode 100644 21360-x86-mce-polling-disabled-init.patch create mode 100644 21372-x86-cross-cpu-wait.patch create mode 100644 21373-dummy-domain-io-caps.patch create mode 100644 21408-amd-erratum-383.patch create mode 100644 21435-vmx-retain-global-controls.patch create mode 100644 21445-x86-tsc-handling-cleanups-v2.patch create mode 100644 21446-iommu-graceful-generic-fail.patch create mode 100644 21453-shadow-avoid-remove-all-after-teardown.patch create mode 100644 21456-compat-hvm-addr-check.patch create mode 100644 21459-block-script.patch create mode 100644 21460-xend-timeoffset.patch create mode 100644 21492-x86-pirq-unbind.patch create mode 100644 21620-x86-signed-domain-irq.patch create mode 100644 21643-vmx-vpmu-pmc-offset.patch create mode 100644 21682-trace-buffer-range.patch create mode 100644 21693-memevent-64bit-only.patch create mode 100644 21695-trace-t_info-readonly.patch create mode 100644 21698-x86-pirq-range-check.patch create mode 100644 21699-p2m-query-for-type-change.patch create mode 100644 21700-32on64-vm86-gpf.patch create mode 100644 21705-trace-printk.patch create mode 100644 21706-trace-security.patch create mode 100644 21712-amd-osvw.patch create mode 100644 21744-x86-cpufreq-range-check.patch delete mode 100644 21894-intel-unmask-cpuid.patch delete mode 100644 22019-x86-cpuidle-online-check.patch delete mode 100644 22051-x86-forced-EOI.patch delete mode 100644 22067-x86-irq-domain.patch delete mode 100644 22068-vtd-irte-RH-bit.patch delete mode 100644 22071-ept-get-entry-lock.patch delete mode 100644 22084-x86-xsave-off.patch delete mode 100644 22135-heap-lock.patch delete mode 100644 22148-serial-irq-dest.patch delete mode 100644 7410-qemu-alt-gr.patch create mode 100644 block-flags.diff create mode 100644 block-losetup-retry.diff delete mode 100644 check_device_status.patch delete mode 100644 multi-xvdp.patch create mode 100644 passthrough-hotplug-segfault.patch create mode 100644 suse-disable-tap2-default.patch delete mode 100644 usb-list.patch create mode 100644 xen-4.0.0-testing-src.tar.bz2 delete mode 100644 xen-4.0.1-testing-src.tar.bz2 delete mode 100644 xend-devid-or-name.patch diff --git a/21089-x86-startup-irq-from-setup-gsi.patch b/21089-x86-startup-irq-from-setup-gsi.patch index 63e9eee..4cf20f0 100644 --- a/21089-x86-startup-irq-from-setup-gsi.patch +++ b/21089-x86-startup-irq-from-setup-gsi.patch @@ -54,11 +54,9 @@ up in order for it to be usable. Signed-off-by: Jan Beulich -Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/io_apic.c -+++ xen-4.0.1-testing/xen/arch/x86/io_apic.c -@@ -2231,6 +2231,7 @@ int __init io_apic_get_redir_entries (in +--- a/xen/arch/x86/io_apic.c ++++ b/xen/arch/x86/io_apic.c +@@ -2111,6 +2111,7 @@ int __init io_apic_get_redir_entries (in int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low) { @@ -66,7 +64,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c struct IO_APIC_route_entry entry; unsigned long flags; int vector; -@@ -2282,7 +2283,12 @@ int io_apic_set_pci_routing (int ioapic, +@@ -2162,7 +2163,12 @@ int io_apic_set_pci_routing (int ioapic, io_apic_write(ioapic, 0x11+2*pin, *(((int *)&entry)+1)); io_apic_write(ioapic, 0x10+2*pin, *(((int *)&entry)+0)); set_native_irq_info(irq, TARGET_CPUS); @@ -80,11 +78,9 @@ Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c return 0; } -Index: xen-4.0.1-testing/xen/arch/x86/mpparse.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/mpparse.c -+++ xen-4.0.1-testing/xen/arch/x86/mpparse.c -@@ -1102,6 +1102,8 @@ int mp_register_gsi (u32 gsi, int trigge +--- a/xen/arch/x86/mpparse.c ++++ b/xen/arch/x86/mpparse.c +@@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int trigge int ioapic = -1; int ioapic_pin = 0; int idx, bit = 0; @@ -93,7 +89,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/mpparse.c /* * Mapping between Global System Interrups, which -@@ -1126,8 +1128,13 @@ int mp_register_gsi (u32 gsi, int trigge +@@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, int trigge if (ioapic_renumber_irq) gsi = ioapic_renumber_irq(ioapic, gsi); diff --git a/21109-x86-cpu-hotplug.patch b/21109-x86-cpu-hotplug.patch new file mode 100644 index 0000000..747a683 --- /dev/null +++ b/21109-x86-cpu-hotplug.patch @@ -0,0 +1,154 @@ +# HG changeset patch +# User Keir Fraser +# Date 1270624140 -3600 +# Node ID 7794f61c61f3b0c90e367a87b287850b31645742 +# Parent adce8bc43fcccf8730b1da962be60c457c51fa1b +x86, cpu hotplug: Synchronise vcpu state earlier during cpu offline. + +Needs to happen before non-idle VCPU is fully descheduled after CPU is +removed from cpu_online_map. Else sync_vcpu_execstate() doesn't work +properly. + +Signed-off-by: Keir Fraser + +# HG changeset patch +# User Keir Fraser +# Date 1270737112 -3600 +# Node ID c9e8369e49be7396eca444cfce27e6782e4aa248 +# Parent a33909be109cefb0aef251c7c7e48168ed05512a +Fix two issues for CPU online/offline. + +Firstly, we should return if we fail to get spin lock in cpu_down. +Secondly, in credit scheduler, the idlers need be limited only to +online map. + +Signed-off-by: Jiang, Yunhong + +# HG changeset patch +# User Keir Fraser +# Date 1271090027 -3600 +# Node ID 5d4038d41fd894f9fc71e64043d559d7c465bd15 +# Parent 1d3bec66528900b1b442b6d36f24cd35ca076506 +cpufreq: fix racing issue for cpu hotplug + +To eliminate racing between dbs timer handler and cpufreq_del_cpu, +using kill_timer instead of stop_timer to make sure timer handler +execution finished before other stuff in cpufreq_del_cpu. + +BTW, fix a lost point of cpufreq_statistic_lock taking sequence. + +Signed-off-by: Wei Gang + +--- a/xen/arch/x86/domain.c ++++ b/xen/arch/x86/domain.c +@@ -1442,7 +1442,8 @@ void context_switch(struct vcpu *prev, s + + set_current(next); + +- if ( (per_cpu(curr_vcpu, cpu) == next) || is_idle_vcpu(next) ) ++ if ( (per_cpu(curr_vcpu, cpu) == next) || ++ (is_idle_vcpu(next) && cpu_online(cpu)) ) + { + local_irq_enable(); + } +--- a/xen/arch/x86/smpboot.c ++++ b/xen/arch/x86/smpboot.c +@@ -997,17 +997,13 @@ static int __devinit do_boot_cpu(int api + return boot_error; + } + +-static void idle_task_exit(void) +-{ +- /* Give up lazy state borrowed by this idle vcpu */ +- __sync_lazy_execstate(); +-} +- + void cpu_exit_clear(void) + { + int cpu = raw_smp_processor_id(); + +- idle_task_exit(); ++ /* Previous non-idle state should be synchronised already. */ ++ if (__sync_lazy_execstate()) ++ BUG(); + + cpucount --; + cpu_uninit(); +@@ -1302,6 +1298,13 @@ int __cpu_disable(void) + + remove_siblinginfo(cpu); + ++ /* ++ * If we are running the idle vcpu, sync last non-idle vcpu's state ++ * before changing cpu_online_map. If we are running non-idle vcpu, ++ * we will synchronously sync the state in context_switch() later. ++ */ ++ __sync_lazy_execstate(); ++ + /* It's now safe to remove this processor from the online map */ + cpu_clear(cpu, cpu_online_map); + fixup_irqs(); +@@ -1340,10 +1343,8 @@ int cpu_down(unsigned int cpu) + int err = 0; + + /* spin_trylock() avoids deadlock with stop_machine_run(). */ +- if (!spin_trylock(&cpu_add_remove_lock)) { +- err = -EBUSY; +- goto out; +- } ++ if (!spin_trylock(&cpu_add_remove_lock)) ++ return -EBUSY; + + if (num_online_cpus() == 1) { + err = -EBUSY; +--- a/xen/common/sched_credit.c ++++ b/xen/common/sched_credit.c +@@ -410,7 +410,7 @@ _csched_cpu_pick(struct vcpu *vc, bool_t + * like run two VCPUs on co-hyperthreads while there are idle cores + * or sockets. + */ +- idlers = csched_priv.idlers; ++ cpus_and(idlers, cpu_online_map, csched_priv.idlers); + cpu_set(cpu, idlers); + cpus_and(cpus, cpus, idlers); + cpu_clear(cpu, cpus); +--- a/xen/drivers/acpi/pmstat.c ++++ b/xen/drivers/acpi/pmstat.c +@@ -86,12 +86,13 @@ int do_get_pm_info(struct xen_sysctl_get + case PMSTAT_get_pxstat: + { + uint32_t ct; +- struct pm_px *pxpt = cpufreq_statistic_data[op->cpuid]; ++ struct pm_px *pxpt; + spinlock_t *cpufreq_statistic_lock = + &per_cpu(cpufreq_statistic_lock, op->cpuid); + + spin_lock(cpufreq_statistic_lock); + ++ pxpt = cpufreq_statistic_data[op->cpuid]; + if ( !pxpt || !pxpt->u.pt || !pxpt->u.trans_pt ) + { + spin_unlock(cpufreq_statistic_lock); +--- a/xen/drivers/cpufreq/cpufreq_ondemand.c ++++ b/xen/drivers/cpufreq/cpufreq_ondemand.c +@@ -196,9 +196,8 @@ static void dbs_timer_init(struct cpu_db + { + dbs_info->enable = 1; + +- if ( !dbs_timer[dbs_info->cpu].function ) +- init_timer(&dbs_timer[dbs_info->cpu], do_dbs_timer, +- (void *)dbs_info, dbs_info->cpu); ++ init_timer(&dbs_timer[dbs_info->cpu], do_dbs_timer, ++ (void *)dbs_info, dbs_info->cpu); + + set_timer(&dbs_timer[dbs_info->cpu], NOW()+dbs_tuners_ins.sampling_rate); + +@@ -213,7 +212,7 @@ static void dbs_timer_exit(struct cpu_db + { + dbs_info->enable = 0; + dbs_info->stoppable = 0; +- stop_timer(&dbs_timer[dbs_info->cpu]); ++ kill_timer(&dbs_timer[dbs_info->cpu]); + } + + int cpufreq_governor_dbs(struct cpufreq_policy *policy, unsigned int event) diff --git a/21128-domain-save-flush.patch b/21128-domain-save-flush.patch new file mode 100644 index 0000000..98ae883 --- /dev/null +++ b/21128-domain-save-flush.patch @@ -0,0 +1,31 @@ +# HG changeset patch +# User Keir Fraser +# Date 1271053336 -3600 +# Node ID b5f9c6274d917db5bbe6cb9cc0d59910cc07a8a6 +# Parent 5bc70100b514d98bd3938cdeca1e182726c26df2 +libxc: Flush I/O before xc_domain_save completion + +The final, flushing call to discard_file_cache also discards any +errors from fsync. Call fsync explicitly before leaving, to check if +all VM memory actually made it to the disk. + +Signed-off-by: Daniel Stodden + +Index: xen-4.0.0-testing/tools/libxc/xc_domain_save.c +=================================================================== +--- xen-4.0.0-testing.orig/tools/libxc/xc_domain_save.c ++++ xen-4.0.0-testing/tools/libxc/xc_domain_save.c +@@ -1764,6 +1764,13 @@ int xc_domain_save(int xc_handle, int io + goto out; + } + ++ /* Flush last write and check for errors. */ ++ if ( fsync(io_fd) && errno != EINVAL ) ++ { ++ PERROR("Error when flushing state file"); ++ goto out; ++ } ++ + /* Success! */ + rc = 0; + diff --git a/21129-xen-hotplug-cleanup.patch b/21129-xen-hotplug-cleanup.patch new file mode 100644 index 0000000..9162685 --- /dev/null +++ b/21129-xen-hotplug-cleanup.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Keir Fraser +# Date 1271053401 -3600 +# Node ID bf74d9c31674c9001a7c4aa8d93227552edf53b1 +# Parent b5f9c6274d917db5bbe6cb9cc0d59910cc07a8a6 +blktap2: a little fix to xen-hotplug-cleanup + +Signed-off-by: James (Song Wei) + +Index: xen-4.0.0-testing/tools/hotplug/Linux/xen-hotplug-cleanup +=================================================================== +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/xen-hotplug-cleanup ++++ xen-4.0.0-testing/tools/hotplug/Linux/xen-hotplug-cleanup +@@ -21,7 +21,7 @@ if [ "$vm" != "" ]; then + + # if the vm path does not exist and the device class is 'vbd' then we may have + # a tap2 device +- if [ $(xenstore-read "$vm_dev" 2>/dev/null) != "" ] \ ++ if [ "$(xenstore-read "$vm_dev" 2>/dev/null)" != "" ] \ + && [ "${path_array[1]}" = "vbd" ]; then + vm_dev="$vm/device/tap2/${path_array[3]}" + fi diff --git a/21150-shadow-race.patch b/21150-shadow-race.patch new file mode 100644 index 0000000..75d6b62 --- /dev/null +++ b/21150-shadow-race.patch @@ -0,0 +1,68 @@ +# HG changeset patch +# User Keir Fraser +# Date 1271091116 -3600 +# Node ID 78488a63bbc200095413824cc146134b54635da9 +# Parent b010b792c0f814de725f669d8a6bee738df68963 +x86, shadow: Fix read-to-use race condition + +If OOS mode is enabled, after last possible resync, read the guest l1e +one last time. If it's different than the original read, start over +again. + +This fixes a race which can result in inconsistent in-sync shadow +tables, leading to corruption: + +v1: take page fault, read gl1e from an out-of-sync PT. +v2: modify gl1e, lowering permissions +[v1,v3]: resync l1 which was just read. +v1: propagate change to l1 shadow using stale gl1e + +Now we have an in-sync shadow with more permissions than the guest. + +The resync can happen either as a result of a 3rd vcpu doing a cr3 +update, or under certain conditions by v1 itself. + +Signed-off-by: George Dunlap + +--- a/xen/arch/x86/mm/shadow/multi.c ++++ b/xen/arch/x86/mm/shadow/multi.c +@@ -240,6 +240,23 @@ shadow_check_gwalk(struct vcpu *v, unsig + return !mismatch; + } + ++static int ++shadow_check_gl1e(struct vcpu *v, walk_t *gw) ++{ ++ guest_l1e_t *l1p, nl1e; ++ ++ if ( !mfn_valid(gw->l1mfn) ) ++ return 0; ++ ++ /* Can't just pull-through because mfn may have changed */ ++ l1p = map_domain_page(mfn_x(gw->l1mfn)); ++ nl1e.l1 = l1p[guest_l1_table_offset(gw->va)].l1; ++ unmap_domain_page(l1p); ++ ++ return gw->l1e.l1 != nl1e.l1; ++} ++ ++ + /* Remove write access permissions from a gwalk_t in a batch, and + * return OR-ed result for TLB flush hint and need to rewalk the guest + * pages. +@@ -3235,6 +3252,15 @@ static int sh_page_fault(struct vcpu *v, + shadow_unlock(d); + return 0; + } ++ ++ /* Final check: if someone has synced a page, it's possible that ++ * our l1e is stale. Compare the entries, and rewalk if necessary. */ ++ if ( shadow_check_gl1e(v, &gw) ) ++ { ++ perfc_incr(shadow_inconsistent_gwalk); ++ shadow_unlock(d); ++ goto rewalk; ++ } + #endif /* OOS */ + + /* Calculate the shadow entry and write it */ diff --git a/21151-trace-bounds-check.patch b/21151-trace-bounds-check.patch new file mode 100644 index 0000000..3da6d68 --- /dev/null +++ b/21151-trace-bounds-check.patch @@ -0,0 +1,205 @@ +# HG changeset patch +# User Keir Fraser +# Date 1271091288 -3600 +# Node ID 94cae4dfa25bcf9aaeb93fb374926cb40411ebdf +# Parent 78488a63bbc200095413824cc146134b54635da9 +xentrace: Bounds checking and error handling + +Check tbuf_size to make sure that it will fit on the t_info struct +allocated at boot. Also deal with allocation failures more +gracefully. + +Signed-off-by: George Dunlap + +# HG changeset patch +# User Keir Fraser +# Date 1278093165 -3600 +# Node ID 2f3a68a0b55b1b7df4d6632dfc151040ba08e9ea +# Parent 2846fd19945cb2ab32d1513531c3500278133484 +trace: Fix T_INFO_FIRST_OFFSET calculation + +This wasn't defined correctly, thus allowing in the +num_online_cpus() == NR_CPUS case to pass a corrupted MFN to +Dom0. + +Reported-by: Jan Beulich +Signed-off-by: George Dunlap + +# HG changeset patch +# User Keir Fraser +# Date 1278093190 -3600 +# Node ID 1390e2ab45c7b63d79ba9496d609cf59af4b44ee +# Parent 2f3a68a0b55b1b7df4d6632dfc151040ba08e9ea +trace: improve check_tbuf_size() + +It didn't consider the case of the incoming size not allowing for the +2*data_size range for t_buf->{prod,cons} + +Signed-off-by: Jan Beulich +Signed-off-by: George Dunlap + +--- a/xen/common/trace.c ++++ b/xen/common/trace.c +@@ -48,10 +48,12 @@ integer_param("tbuf_size", opt_tbuf_size + /* Pointers to the meta-data objects for all system trace buffers */ + static struct t_info *t_info; + #define T_INFO_PAGES 2 /* Size fixed at 2 pages for now. */ ++#define T_INFO_SIZE ((T_INFO_PAGES)*(PAGE_SIZE)) + static DEFINE_PER_CPU_READ_MOSTLY(struct t_buf *, t_bufs); + static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, t_data); + static DEFINE_PER_CPU_READ_MOSTLY(spinlock_t, t_lock); + static int data_size; ++static u32 t_info_first_offset __read_mostly; + + /* High water mark for trace buffers; */ + /* Send virtual interrupt when buffer level reaches this point */ +@@ -71,6 +73,39 @@ static cpumask_t tb_cpu_mask = CPU_MASK_ + /* which tracing events are enabled */ + static u32 tb_event_mask = TRC_ALL; + ++/* Return the number of elements _type necessary to store at least _x bytes of data ++ * i.e., sizeof(_type) * ans >= _x. */ ++#define fit_to_type(_type, _x) (((_x)+sizeof(_type)-1) / sizeof(_type)) ++ ++static void calc_tinfo_first_offset(void) ++{ ++ int offset_in_bytes; ++ ++ offset_in_bytes = offsetof(struct t_info, mfn_offset[NR_CPUS]); ++ ++ t_info_first_offset = fit_to_type(uint32_t, offset_in_bytes); ++ ++ gdprintk(XENLOG_INFO, "%s: NR_CPUs %d, offset_in_bytes %d, t_info_first_offset %u\n", ++ __func__, NR_CPUS, offset_in_bytes, (unsigned)t_info_first_offset); ++} ++ ++/** ++ * check_tbuf_size - check to make sure that the proposed size will fit ++ * in the currently sized struct t_info and allows prod and cons to ++ * reach double the value without overflow. ++ */ ++static int check_tbuf_size(u32 pages) ++{ ++ struct t_buf dummy; ++ typeof(dummy.prod) size; ++ ++ size = ((typeof(dummy.prod))pages) * PAGE_SIZE; ++ ++ return (size / PAGE_SIZE != pages) ++ || (size + size < size) ++ || (num_online_cpus() * pages + t_info_first_offset > T_INFO_SIZE / sizeof(uint32_t)); ++} ++ + /** + * alloc_trace_bufs - performs initialization of the per-cpu trace buffers. + * +@@ -87,7 +122,9 @@ static int alloc_trace_bufs(void) + unsigned long nr_pages; + /* Start after a fixed-size array of NR_CPUS */ + uint32_t *t_info_mfn_list = (uint32_t *)t_info; +- int offset = (NR_CPUS * 2 + 1 + 1) / 4; ++ int offset = t_info_first_offset; ++ ++ BUG_ON(check_tbuf_size(opt_tbuf_size)); + + if ( opt_tbuf_size == 0 ) + return -EINVAL; +@@ -180,7 +217,8 @@ out_dealloc: + } + spin_unlock_irqrestore(&per_cpu(t_lock, cpu), flags); + } +- return -EINVAL; ++ ++ return -ENOMEM; + } + + +@@ -197,19 +235,35 @@ static int tb_set_size(int size) + * boot time or via control tools, but not by both. Once buffers + * are created they cannot be destroyed. + */ +- if ( (opt_tbuf_size != 0) || (size <= 0) ) ++ int ret = 0; ++ ++ ++ ++ if ( (opt_tbuf_size != 0) ) + { +- gdprintk(XENLOG_INFO, "tb_set_size from %d to %d not implemented\n", +- opt_tbuf_size, size); ++ if ( size != opt_tbuf_size ) ++ gdprintk(XENLOG_INFO, "tb_set_size from %d to %d not implemented\n", ++ opt_tbuf_size, size); + return -EINVAL; + } + +- opt_tbuf_size = size; +- if ( alloc_trace_bufs() != 0 ) ++ if ( size <= 0 ) + return -EINVAL; + +- printk("Xen trace buffers: initialized\n"); +- return 0; ++ if ( check_tbuf_size(size) ) ++ { ++ gdprintk(XENLOG_INFO, "tb size %d too large\n", size); ++ return -EINVAL; ++ } ++ ++ opt_tbuf_size = size; ++ ++ if ( (ret = alloc_trace_bufs()) == 0 ) ++ printk("Xen trace buffers: initialized\n"); ++ else ++ opt_tbuf_size = 0; ++ ++ return ret; + } + + int trace_will_trace_event(u32 event) +@@ -248,6 +302,10 @@ int trace_will_trace_event(u32 event) + void __init init_trace_bufs(void) + { + int i; ++ ++ /* Calculate offset in u32 of first mfn */ ++ calc_tinfo_first_offset(); ++ + /* t_info size fixed at 2 pages for now. That should be big enough / small enough + * until it's worth making it dynamic. */ + t_info = alloc_xenheap_pages(1, 0); +@@ -265,13 +323,18 @@ void __init init_trace_bufs(void) + share_xen_page_with_privileged_guests( + virt_to_page(t_info) + i, XENSHARE_writable); + +- +- + if ( opt_tbuf_size == 0 ) + { + printk("Xen trace buffers: disabled\n"); + return; + } ++ else if ( check_tbuf_size(opt_tbuf_size) ) ++ { ++ gdprintk(XENLOG_INFO, "Xen trace buffers: " ++ "tb size %d too large, disabling\n", ++ opt_tbuf_size); ++ opt_tbuf_size = 0; ++ } + + if ( alloc_trace_bufs() == 0 ) + { +@@ -279,6 +342,13 @@ void __init init_trace_bufs(void) + wmb(); /* above must be visible before tb_init_done flag set */ + tb_init_done = 1; + } ++ else ++ { ++ gdprintk(XENLOG_INFO, "Xen trace buffers: " ++ "allocation size %d failed, disabling\n", ++ opt_tbuf_size); ++ opt_tbuf_size = 0; ++ } + } + + /** diff --git a/21160-sysctl-debug-keys.patch b/21160-sysctl-debug-keys.patch new file mode 100644 index 0000000..6839cdb --- /dev/null +++ b/21160-sysctl-debug-keys.patch @@ -0,0 +1,27 @@ +# HG changeset patch +# User Keir Fraser +# Date 1271162458 -3600 +# Node ID 859a372efa66e6bcba8e1fd968e521cb16da12ea +# Parent da90dd1a09b93ae41ab451d223ff87dca04356f5 +sysctl: Fix XEN_SYSCTL_debug_keys error path. + +Signed-off-by: Keir Fraser + +--- a/xen/common/sysctl.c ++++ b/xen/common/sysctl.c +@@ -169,12 +169,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc + if ( ret ) + break; + ++ ret = -EFAULT; + for ( i = 0; i < op->u.debug_keys.nr_keys; i++ ) + { + if ( copy_from_guest_offset(&c, op->u.debug_keys.keys, i, 1) ) +- return -EFAULT; ++ goto out; + handle_keypress(c, guest_cpu_user_regs()); + } ++ ret = 0; + } + break; + diff --git a/21189-x86-emulate-clflush.patch b/21189-x86-emulate-clflush.patch new file mode 100644 index 0000000..bf0aa3a --- /dev/null +++ b/21189-x86-emulate-clflush.patch @@ -0,0 +1,53 @@ +# HG changeset patch +# User Keir Fraser +# Date 1271353678 -3600 +# Node ID d18e6a6c618af4f25a9e1a57c9e3eac55921678c +# Parent ffffddc4b1e030cce6bd4d12c4409c94599c1abf +x86_emulate: Emulate CLFLUSH instruction + +We recently found that FreeBSD 8.0 guest failed to install and boot on +Xen. The reason was that FreeBSD detected clflush feature and invoked +this instruction to flush MMIO space. This caused a page fault; but +x86_emulate.c failed to emulate this instruction (not supported). As a +result, a page fault was detected inside FreeBSD. A similar issue was +reported earlier. + +http://lists.xensource.com/archives/html/xen-devel/2010-03/msg00362.html + +From: Wei Huang +Signed-off-by: Keir Fraser + +Index: xen-4.0.0-testing/xen/arch/x86/x86_emulate/x86_emulate.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/x86_emulate/x86_emulate.c ++++ xen-4.0.0-testing/xen/arch/x86/x86_emulate/x86_emulate.c +@@ -227,7 +227,8 @@ static uint8_t twobyte_table[256] = { + DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, 0, 0, + /* 0xA8 - 0xAF */ + ImplicitOps, ImplicitOps, 0, DstBitBase|SrcReg|ModRM, +- DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, 0, DstReg|SrcMem|ModRM, ++ DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, ++ ImplicitOps|ModRM, DstReg|SrcMem|ModRM, + /* 0xB0 - 0xB7 */ + ByteOp|DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, + DstReg|SrcMem|ModRM|Mov, DstBitBase|SrcReg|ModRM, +@@ -4008,6 +4009,19 @@ x86_emulate( + emulate_2op_SrcV_nobyte("bts", src, dst, _regs.eflags); + break; + ++ case 0xae: /* Grp15 */ ++ switch ( modrm_reg & 7 ) ++ { ++ case 7: /* clflush */ ++ fail_if(ops->wbinvd == NULL); ++ if ( (rc = ops->wbinvd(ctxt)) != 0 ) ++ goto done; ++ break; ++ default: ++ goto cannot_emulate; ++ } ++ break; ++ + case 0xaf: /* imul */ + _regs.eflags &= ~(EFLG_OF|EFLG_CF); + switch ( dst.bytes ) diff --git a/21193-blktap-script.patch b/21193-blktap-script.patch new file mode 100644 index 0000000..c568a78 --- /dev/null +++ b/21193-blktap-script.patch @@ -0,0 +1,23 @@ +# HG changeset patch +# User Keir Fraser +# Date 1271663923 -3600 +# Node ID ae1abcdd4a670e34509e39d5280834a75afc0f6a +# Parent 6860c523d2daf1d110b130a9596469a0957b4032 +tools/hotplug/Linux/blktap: remove optional tapdisk: prefix + +Perhaps this should even be further generalized (e.g. to remove any +"[!/]*:" pattern prefixes) to be more forward compatible? + +Signed-off-by: Jan Beulich + +diff -r 6860c523d2da -r ae1abcdd4a67 tools/hotplug/Linux/blktap +--- a/tools/hotplug/Linux/blktap Mon Apr 19 08:55:33 2010 +0100 ++++ b/tools/hotplug/Linux/blktap Mon Apr 19 08:58:43 2010 +0100 +@@ -59,6 +59,7 @@ + if [ -n "$t" ] + then + p=$(xenstore_read "$XENBUS_PATH/params") ++ p=${p#tapdisk:} + # if we have a ':', chew from head including : + if echo $p | grep -q \: + then diff --git a/21194-ioemu-subtype.patch b/21194-ioemu-subtype.patch new file mode 100644 index 0000000..71f2b30 --- /dev/null +++ b/21194-ioemu-subtype.patch @@ -0,0 +1,12 @@ +diff -r c02cc832cb2d tools/python/xen/xend/server/BlktapController.py +--- a/tools/python/xen/xend/server/BlktapController.py Tue Apr 13 18:19:33 2010 +0100 ++++ b/tools/python/xen/xend/server/BlktapController.py Fri Apr 16 12:05:39 2010 -0600 +@@ -189,7 +189,7 @@ + blktap2_installed=1; + + if typ in ('tap'): +- if subtyp in ('tapdisk'): ++ if subtyp in ('tapdisk', 'ioemu'): + if params not in blktap2_disk_types or not blktap2_installed: + # pass this device off to BlktapController + log.warn('WARNING: using deprecated blktap module') diff --git a/21223-xend-preserve-devs.patch b/21223-xend-preserve-devs.patch new file mode 100644 index 0000000..3a0aa2b --- /dev/null +++ b/21223-xend-preserve-devs.patch @@ -0,0 +1,32 @@ +# HG changeset patch +# User Keir Fraser +# Date 1271925757 -3600 +# Node ID 5b72f9832cc21ebdbbd8569836578817353314d8 +# Parent 11d20f17f82c1c6fc6c003c363835a964338b311 +xend: don't drop device config on domain start failure + +If domain creation in xend fails before devices are configured, e.g. +insufficient memory, device config is dropped from xend's managed +domain config. + +Once xend is restarted, the domain's devices are lost. + +This patch fixes a bug in XendConfig where only the device +controller was consulted for device configuration. + +Signed-off-by: Jim Fehlig + +Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +=================================================================== +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +@@ -1166,8 +1166,8 @@ class XendConfig(dict): + config.append(['VDI', dev_cfg.get('VDI', '')]) + + sxpr.append(['device', config]) ++ found = True + +- found = True + except: + log.exception("dumping sxp from device controllers") + pass diff --git a/21225-conring-iommu.patch b/21225-conring-iommu.patch new file mode 100644 index 0000000..619be29 --- /dev/null +++ b/21225-conring-iommu.patch @@ -0,0 +1,77 @@ +References: bnc#600794 + +# HG changeset patch +# User Keir Fraser +# Date 1271954636 -3600 +# Node ID 2b97855a629f1d79e1d075a6d2a8b569018b2094 +# Parent a7947fd90328287dd097294b241753063c858597 +console: Make initial static console buffer __initdata. + +The previous scheme --- freeing an area of BSS --- did not interact +nicely with device passthrough as IOMMU will not have any Xen BSS area +in guest device pagetables. Hence if the freed BSS space gets +allocated to a guest, DMAs to guest's own memory can fail. + +The simple solution here is to always free the static buffer at end of +boot (initmem is specially handled for IOMMUs) and require a +dynamically-allocated buffer always to be created. + +Signed-off-by: Keir Fraser + +--- a/xen/drivers/char/console.c ++++ b/xen/drivers/char/console.c +@@ -65,11 +65,7 @@ size_param("conring_size", opt_conring_s + + #define _CONRING_SIZE 16384 + #define CONRING_IDX_MASK(i) ((i)&(conring_size-1)) +-static char +-#if _CONRING_SIZE >= PAGE_SIZE +- __attribute__((__section__(".bss.page_aligned"), __aligned__(PAGE_SIZE))) +-#endif +- _conring[_CONRING_SIZE]; ++static char __initdata _conring[_CONRING_SIZE]; + static char *__read_mostly conring = _conring; + static uint32_t __read_mostly conring_size = _CONRING_SIZE; + static uint32_t conringc, conringp; +@@ -596,25 +592,20 @@ void __init console_init_preirq(void) + void __init console_init_postirq(void) + { + char *ring; +- unsigned int i; ++ unsigned int i, order; + + serial_init_postirq(); + + if ( !opt_conring_size ) + opt_conring_size = num_present_cpus() << (9 + xenlog_lower_thresh); +- /* Round size down to a power of two. */ +- while ( opt_conring_size & (opt_conring_size - 1) ) +- opt_conring_size &= opt_conring_size - 1; +- if ( opt_conring_size < conring_size ) +- return; +- +- ring = alloc_xenheap_pages(get_order_from_bytes(opt_conring_size), 0); +- if ( ring == NULL ) ++ ++ order = get_order_from_bytes(max(opt_conring_size, conring_size)); ++ while ( (ring = alloc_xenheap_pages(order, 0)) == NULL ) + { +- printk("Unable to allocate console ring of %u bytes.\n", +- opt_conring_size); +- return; ++ BUG_ON(order == 0); ++ order--; + } ++ opt_conring_size = PAGE_SIZE << order; + + spin_lock_irq(&console_lock); + for ( i = conringc ; i != conringp; i++ ) +@@ -625,8 +616,6 @@ void __init console_init_postirq(void) + spin_unlock_irq(&console_lock); + + printk("Allocated console ring of %u KiB.\n", opt_conring_size >> 10); +- +- init_xenheap_pages(__pa(_conring), __pa(_conring + _CONRING_SIZE)); + } + + void __init console_endboot(void) diff --git a/21234-x86-bad-srat-clear-pxm2node.patch b/21234-x86-bad-srat-clear-pxm2node.patch new file mode 100644 index 0000000..2350cb1 --- /dev/null +++ b/21234-x86-bad-srat-clear-pxm2node.patch @@ -0,0 +1,34 @@ +References: bnc#595124 + +# HG changeset patch +# User Keir Fraser +# Date 1272280290 -3600 +# Node ID d01ea51fc929c57c7d5f427e1aafa0de7a436473 +# Parent f766f2142a8515d1dc71783355dc4fc1813d95c4 +x86: make pxm_to_node() return sane values when disabling NUMA internally + +Otherwise, pass-through code may call memory allocation functions with +invalid node IDs, causing the allocations to fail. + +Signed-off-by: Jan Beulich + +--- a/xen/arch/x86/srat.c ++++ b/xen/arch/x86/srat.c +@@ -25,7 +25,7 @@ static struct acpi_table_slit *__read_mo + static nodemask_t nodes_parsed __initdata; + static nodemask_t nodes_found __initdata; + static struct node nodes[MAX_NUMNODES] __initdata; +-static u8 __read_mostly pxm2node[256] = { [0 ... 255] = 0xff }; ++static u8 __read_mostly pxm2node[256] = { [0 ... 255] = NUMA_NO_NODE }; + + + static int num_node_memblks; +@@ -112,6 +112,8 @@ static __init void bad_srat(void) + acpi_numa = -1; + for (i = 0; i < MAX_LOCAL_APIC; i++) + apicid_to_node[i] = NUMA_NO_NODE; ++ for (i = 0; i < ARRAY_SIZE(pxm2node); i++) ++ pxm2node[i] = NUMA_NO_NODE; + } + + #ifdef CONFIG_X86_64 diff --git a/21235-crashkernel-advanced.patch b/21235-crashkernel-advanced.patch index 09e7abe..68a9c42 100644 --- a/21235-crashkernel-advanced.patch +++ b/21235-crashkernel-advanced.patch @@ -33,11 +33,9 @@ This still needs to be hooked up for ia64. Signed-off-by: Jan Beulich -Index: xen-4.0.1-testing/xen/arch/x86/setup.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/setup.c -+++ xen-4.0.1-testing/xen/arch/x86/setup.c -@@ -664,6 +664,11 @@ void __init __start_xen(unsigned long mb +--- a/xen/arch/x86/setup.c ++++ b/xen/arch/x86/setup.c +@@ -642,6 +642,11 @@ void __init __start_xen(unsigned long mb memcpy(&boot_e820, &e820, sizeof(e820)); /* Early kexec reservation (explicit static start address). */ @@ -49,11 +47,9 @@ Index: xen-4.0.1-testing/xen/arch/x86/setup.c kexec_reserve_area(&boot_e820); /* -Index: xen-4.0.1-testing/xen/common/kexec.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/common/kexec.c -+++ xen-4.0.1-testing/xen/common/kexec.c -@@ -49,15 +49,109 @@ static unsigned char vmcoreinfo_data[VMC +--- a/xen/common/kexec.c ++++ b/xen/common/kexec.c +@@ -47,15 +47,109 @@ static unsigned char vmcoreinfo_data[VMC static size_t vmcoreinfo_size = 0; xen_kexec_reserve_t kexec_crash_area; @@ -166,10 +162,8 @@ Index: xen-4.0.1-testing/xen/common/kexec.c static void one_cpu_only(void) { /* Only allow the first cpu to continue - force other cpus to spin */ -Index: xen-4.0.1-testing/xen/include/xen/kexec.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/kexec.h -+++ xen-4.0.1-testing/xen/include/xen/kexec.h +--- a/xen/include/xen/kexec.h ++++ b/xen/include/xen/kexec.h @@ -12,6 +12,8 @@ typedef struct xen_kexec_reserve { extern xen_kexec_reserve_t kexec_crash_area; diff --git a/21266-vmx-disabled-check.patch b/21266-vmx-disabled-check.patch new file mode 100644 index 0000000..3a00114 --- /dev/null +++ b/21266-vmx-disabled-check.patch @@ -0,0 +1,24 @@ +# HG changeset patch +# User Keir Fraser +# Date 1272972545 -3600 +# Node ID 6d21da6feb59db33eceb3aa6bcb8afac15ac7fd8 +# Parent 71cf9b12ac9effe2b7cf0aec058f92ee36430e0a +vmx, tboot: Check the correct in/outside-SMX flag when init'ing VMX. + +Signed-off-by: Shane Wang +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/hvm/vmx/vmcs.c ++++ b/xen/arch/x86/hvm/vmx/vmcs.c +@@ -360,8 +360,9 @@ int vmx_cpu_up(void) + bios_locked = !!(eax & IA32_FEATURE_CONTROL_MSR_LOCK); + if ( bios_locked ) + { +- if ( !(eax & (IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX | +- IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX)) ) ++ if ( !(eax & (tboot_in_measured_env() ++ ? IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX ++ : IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX)) ) + { + printk("CPU%d: VMX disabled by BIOS.\n", cpu); + return 0; diff --git a/21271-x86-cache-flush-global.patch b/21271-x86-cache-flush-global.patch index e740f9a..4bd8bec 100644 --- a/21271-x86-cache-flush-global.patch +++ b/21271-x86-cache-flush-global.patch @@ -12,11 +12,9 @@ the hypervisor. Add a new MMUEXT operation for this. Signed-off-by: Jan Beulich -Index: xen-4.0.1-testing/xen/arch/x86/mm.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.1-testing/xen/arch/x86/mm.c -@@ -2889,6 +2889,27 @@ int do_mmuext_op( +--- a/xen/arch/x86/mm.c ++++ b/xen/arch/x86/mm.c +@@ -2887,6 +2887,27 @@ int do_mmuext_op( } break; @@ -44,10 +42,8 @@ Index: xen-4.0.1-testing/xen/arch/x86/mm.c case MMUEXT_SET_LDT: { unsigned long ptr = op.arg1.linear_addr; -Index: xen-4.0.1-testing/xen/include/public/xen.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/public/xen.h -+++ xen-4.0.1-testing/xen/include/public/xen.h +--- a/xen/include/public/xen.h ++++ b/xen/include/public/xen.h @@ -239,6 +239,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); * * cmd: MMUEXT_FLUSH_CACHE diff --git a/21272-x86-dom0-alloc-performance.patch b/21272-x86-dom0-alloc-performance.patch new file mode 100644 index 0000000..2bafa88 --- /dev/null +++ b/21272-x86-dom0-alloc-performance.patch @@ -0,0 +1,99 @@ +# HG changeset patch +# User Keir Fraser +# Date 1272973341 -3600 +# Node ID b07edd50661e7f768088c08215dabb9becb5c5b6 +# Parent 6c7b905b03ff1cf171187bafe7129e3e213e5787 +x86: fix Dom0 booting time regression +References: bnc#593536 + +Unfortunately the changes in c/s 21035 caused boot time to go up +significantly on certain large systems. To rectify this without going +back to the old behavior, introduce a new memory allocation flag so +that Dom0 allocations can exhaust non-DMA memory before starting to +consume DMA memory. For the latter, the behavior introduced in +aforementioned c/s gets retained, while for the former we can now even +try larger chunks first. + +This builds on the fact that alloc_chunk() gets called with non- +increasing 'max_pages' arguments, end hence it can store locally the +allocation order last used (as larger order allocations can't succeed +during subsequent invocations if they failed once). + +Signed-off-by: Jan Beulich + +--- a/xen/arch/x86/domain_build.c ++++ b/xen/arch/x86/domain_build.c +@@ -125,26 +125,36 @@ string_param("dom0_ioports_disable", opt + static struct page_info * __init alloc_chunk( + struct domain *d, unsigned long max_pages) + { ++ static unsigned int __initdata last_order = MAX_ORDER; ++ static unsigned int __initdata memflags = MEMF_no_dma; + struct page_info *page; +- unsigned int order, free_order; ++ unsigned int order = get_order_from_pages(max_pages), free_order; + +- /* +- * Allocate up to 2MB at a time: It prevents allocating very large chunks +- * from DMA pools before the >4GB pool is fully depleted. +- */ +- if ( max_pages > (2UL << (20 - PAGE_SHIFT)) ) +- max_pages = 2UL << (20 - PAGE_SHIFT); +- order = get_order_from_pages(max_pages); +- if ( (max_pages & (max_pages-1)) != 0 ) +- order--; +- while ( (page = alloc_domheap_pages(d, order, 0)) == NULL ) ++ if ( order > last_order ) ++ order = last_order; ++ else if ( max_pages & (max_pages - 1) ) ++ --order; ++ while ( (page = alloc_domheap_pages(d, order, memflags)) == NULL ) + if ( order-- == 0 ) + break; ++ if ( page ) ++ last_order = order; ++ else if ( memflags ) ++ { ++ /* ++ * Allocate up to 2MB at a time: It prevents allocating very large ++ * chunks from DMA pools before the >4GB pool is fully depleted. ++ */ ++ last_order = 21 - PAGE_SHIFT; ++ memflags = 0; ++ return alloc_chunk(d, max_pages); ++ } ++ + /* + * Make a reasonable attempt at finding a smaller chunk at a higher + * address, to avoid allocating from low memory as much as possible. + */ +- for ( free_order = order; page && order--; ) ++ for ( free_order = order; !memflags && page && order--; ) + { + struct page_info *pg2; + +--- a/xen/common/page_alloc.c ++++ b/xen/common/page_alloc.c +@@ -1157,8 +1157,9 @@ struct page_info *alloc_domheap_pages( + pg = alloc_heap_pages(dma_zone + 1, zone_hi, node, order, memflags); + + if ( (pg == NULL) && +- ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi, +- node, order, memflags)) == NULL) ) ++ ((memflags & MEMF_no_dma) || ++ ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi, ++ node, order, memflags)) == NULL)) ) + return NULL; + + if ( (d != NULL) && assign_pages(d, pg, order, memflags) ) +--- a/xen/include/xen/mm.h ++++ b/xen/include/xen/mm.h +@@ -79,6 +79,8 @@ int assign_pages( + #define MEMF_populate_on_demand (1U<<_MEMF_populate_on_demand) + #define _MEMF_tmem 2 + #define MEMF_tmem (1U<<_MEMF_tmem) ++#define _MEMF_no_dma 3 ++#define MEMF_no_dma (1U<<_MEMF_no_dma) + #define _MEMF_node 8 + #define MEMF_node(n) ((((n)+1)&0xff)<<_MEMF_node) + #define _MEMF_bits 24 diff --git a/21273-linux-autconf.patch b/21273-linux-autconf.patch new file mode 100644 index 0000000..dd18589 --- /dev/null +++ b/21273-linux-autconf.patch @@ -0,0 +1,26 @@ +# HG changeset patch +# User Keir Fraser +# Date 1272973376 -3600 +# Node ID d2373000996d850c46297740fbd11ea1d93d59d9 +# Parent b07edd50661e7f768088c08215dabb9becb5c5b6 +linux pvdrv: generalize location of autoconf.h + +The location of the file in the build tree changed in recent Linux; +since there can be only one such file, using a wild card instead of +an explicit directory name seems the easiest solution. + +Signed-off-by: Jan Beulich + +Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/overrides.mk +=================================================================== +--- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/overrides.mk ++++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/overrides.mk +@@ -11,7 +11,7 @@ ifeq ($(ARCH),ia64) + _XEN_CPPFLAGS += -DCONFIG_VMX_GUEST + endif + +-_XEN_CPPFLAGS += -include $(objtree)/include/linux/autoconf.h ++_XEN_CPPFLAGS += -include $(wildcard $(objtree)/include/*/autoconf.h) + + EXTRA_CFLAGS += $(_XEN_CPPFLAGS) + EXTRA_AFLAGS += $(_XEN_CPPFLAGS) diff --git a/21301-svm-lmsl.patch b/21301-svm-lmsl.patch index 68a95fc..fc81aa2 100644 --- a/21301-svm-lmsl.patch +++ b/21301-svm-lmsl.patch @@ -11,11 +11,9 @@ makes sense to also allow HVM guests to make use of it. Signed-off-by: Jan Beulich -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c -@@ -603,11 +603,12 @@ static int hvm_load_cpu_ctxt(struct doma +--- a/xen/arch/x86/hvm/hvm.c ++++ b/xen/arch/x86/hvm/hvm.c +@@ -629,11 +629,12 @@ static int hvm_load_cpu_ctxt(struct doma return -EINVAL; } @@ -29,7 +27,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c (!cpu_has_ffxsr && (ctxt.msr_efer & EFER_FFXSE)) || ((ctxt.msr_efer & (EFER_LME|EFER_LMA)) == EFER_LMA) ) { -@@ -960,10 +961,11 @@ int hvm_set_efer(uint64_t value) +@@ -984,10 +985,11 @@ int hvm_set_efer(uint64_t value) value &= ~EFER_LMA; @@ -42,11 +40,9 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c (!cpu_has_ffxsr && (value & EFER_FFXSE)) ) { gdprintk(XENLOG_WARNING, "Trying to set reserved bit in " -Index: xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/hvm/svm/svm.c -+++ xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c -@@ -57,6 +57,9 @@ +--- a/xen/arch/x86/hvm/svm/svm.c ++++ b/xen/arch/x86/hvm/svm/svm.c +@@ -56,6 +56,9 @@ u32 svm_feature_flags; @@ -56,7 +52,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c #define set_segment_register(name, value) \ asm volatile ( "movw %%ax ,%%" STR(name) "" : : "a" (value) ) -@@ -871,6 +874,29 @@ static int svm_cpu_up(struct cpuinfo_x86 +@@ -847,6 +850,29 @@ static int svm_cpu_up(struct cpuinfo_x86 /* Initialize core's ASID handling. */ svm_asid_init(c); @@ -86,11 +82,9 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c return 1; } -Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/asm-x86/hvm/hvm.h -+++ xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm.h -@@ -143,6 +143,7 @@ struct hvm_function_table { +--- a/xen/include/asm-x86/hvm/hvm.h ++++ b/xen/include/asm-x86/hvm/hvm.h +@@ -131,6 +131,7 @@ struct hvm_function_table { extern struct hvm_function_table hvm_funcs; extern int hvm_enabled; diff --git a/21304-keyhandler-alternative.patch b/21304-keyhandler-alternative.patch index 7e2b065..b4b5aa4 100644 --- a/21304-keyhandler-alternative.patch +++ b/21304-keyhandler-alternative.patch @@ -11,10 +11,8 @@ a tasklet-based alternative mechanism to handle Dom0 state dumps. Signed-off-by: Jan Beulich -Index: xen-4.0.1-testing/xen/common/keyhandler.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/common/keyhandler.c -+++ xen-4.0.1-testing/xen/common/keyhandler.c +--- a/xen/common/keyhandler.c ++++ b/xen/common/keyhandler.c @@ -19,6 +19,7 @@ static struct keyhandler *key_table[256]; @@ -68,7 +66,7 @@ Index: xen-4.0.1-testing/xen/common/keyhandler.c } static struct keyhandler dump_dom0_registers_keyhandler = { -@@ -434,8 +465,28 @@ static struct keyhandler do_debug_key_ke +@@ -425,8 +456,28 @@ static struct keyhandler do_debug_key_ke .desc = "trap to xendbg" }; diff --git a/21317-xend-blkif-util-tap2.patch b/21317-xend-blkif-util-tap2.patch new file mode 100644 index 0000000..2941e2a --- /dev/null +++ b/21317-xend-blkif-util-tap2.patch @@ -0,0 +1,23 @@ +# HG changeset patch +# User Keir Fraser +# Date 1273220860 -3600 +# Node ID 5ac6e33fa3a7fe6645eaeb7de530a29be2865c34 +# Parent 7af536406c255bdc9d3429679710b0827d52bdaf +xend: support blktap2 in xend blkif utils + +Support tap2 device type in xend blkif utils parse method. + +Signed-off-by: Jim Fehlig + +diff -r 7af536406c25 -r 5ac6e33fa3a7 tools/python/xen/util/blkif.py +--- a/tools/python/xen/util/blkif.py Fri May 07 09:26:49 2010 +0100 ++++ b/tools/python/xen/util/blkif.py Fri May 07 09:27:40 2010 +0100 +@@ -86,7 +86,7 @@ + else: + fn = "/dev/%s" %(fn,) + +- if typ == "tap": ++ if typ in ("tap", "tap2"): + (taptype, fn) = fn.split(":", 1) + return (fn, taptype) + diff --git a/21331-svm-vintr-during-nmi.patch b/21331-svm-vintr-during-nmi.patch new file mode 100644 index 0000000..f31e61e --- /dev/null +++ b/21331-svm-vintr-during-nmi.patch @@ -0,0 +1,41 @@ +# HG changeset patch +# User Keir Fraser +# Date 1273256548 -3600 +# Node ID bbf009817ffbe15a7cbbda8bddd82640f290ce0c +# Parent a97ef0eb0b9d520b8b6b97d240771cc27de978e3 +svm: Avoid VINTR injection during NMI shadow + +It is invalid because we get vmexit via IRET interception in this +case. VINTR is unaware of NMI shadows and may vmexit early, leaving us +in an endless loop of VINTR injections and interceptions. + +Signed-off-by: Wei Wang +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/hvm/svm/intr.c ++++ b/xen/arch/x86/hvm/svm/intr.c +@@ -88,10 +88,21 @@ static void enable_intr_window(struct vc + * guest can accept the real interrupt. + * + * TODO: Better NMI handling. We need a way to skip a MOV SS interrupt +- * shadow. This is hard to do without hardware support. We should also +- * track 'NMI blocking' from NMI injection until IRET. This can be done +- * quite easily in software by intercepting the unblocking IRET. ++ * shadow. This is hard to do without hardware support. Also we should ++ * not be waiting for EFLAGS.IF to become 1. + */ ++ ++ /* ++ * NMI-blocking window is handled by IRET interception. We should not ++ * inject a VINTR in this case as VINTR is unaware of NMI-blocking and ++ * hence we can enter an endless loop (VINTR intercept fires, yet ++ * hvm_interrupt_blocked() still indicates NMI-blocking is active, so ++ * we inject a VINTR, ...). ++ */ ++ if ( (intack.source == hvm_intsrc_nmi) && ++ (vmcb->general1_intercepts & GENERAL1_INTERCEPT_IRET) ) ++ return; ++ + intr = vmcb->vintr; + intr.fields.irq = 1; + intr.fields.vector = 0; diff --git a/21333-xentrace-t_info-size.patch b/21333-xentrace-t_info-size.patch new file mode 100644 index 0000000..91b4f9d --- /dev/null +++ b/21333-xentrace-t_info-size.patch @@ -0,0 +1,26 @@ +# HG changeset patch +# User Keir Fraser +# Date 1273479772 -3600 +# Node ID 93c5beba9d04d3e8d2522241bad14107433c3121 +# Parent 3b6e33ebb57b670a48ad138aecb47cbd32a4e986 +xentrace: fix bug in t_info size + +t_info size should be in bytes, not pages. This fixes a bug +that crashes the hypervisor if the total number of all pages +is more than 1024 but less than 2048. + +Signed-off-by: George Dunlap + +Index: xen-4.0.0-testing/xen/common/trace.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/common/trace.c ++++ xen-4.0.0-testing/xen/common/trace.c +@@ -367,7 +367,7 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc + case XEN_SYSCTL_TBUFOP_get_info: + tbc->evt_mask = tb_event_mask; + tbc->buffer_mfn = t_info ? virt_to_mfn(t_info) : 0; +- tbc->size = T_INFO_PAGES; ++ tbc->size = T_INFO_PAGES * PAGE_SIZE; + break; + case XEN_SYSCTL_TBUFOP_set_cpu_mask: + xenctl_cpumap_to_cpumask(&tb_cpu_mask, &tbc->cpu_mask); diff --git a/21340-vtd-dom0-mapping-latency.patch b/21340-vtd-dom0-mapping-latency.patch new file mode 100644 index 0000000..bd1ba81 --- /dev/null +++ b/21340-vtd-dom0-mapping-latency.patch @@ -0,0 +1,56 @@ +References: bnc#603008 + +# HG changeset patch +# User Keir Fraser +# Date 1273563345 -3600 +# Node ID 220fa418eaae499cdc14359e83092401290a6211 +# Parent 804304d4e05d98289de9a107c6b26c5a1db09cd8 +VT-d: prevent watchdog timer from kicking in when +initializing on systems with huge amounts of memory + +Process pending soft-IRQs every 4G worth of pages initialized for Dom0 +to keep timekeeping happy and prevent the NMI watchdog (when enabled) +from kicking in. + +Signed-off-by: Jan Beulich + +--- a/xen/drivers/passthrough/vtd/ia64/vtd.c ++++ b/xen/drivers/passthrough/vtd/ia64/vtd.c +@@ -19,6 +19,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -110,6 +111,9 @@ static int do_dom0_iommu_mapping(unsigne + iommu_map_page(d, (pfn*tmp+j), (pfn*tmp+j)); + + page_addr += PAGE_SIZE; ++ ++ if (!(pfn & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K)))) ++ process_pending_softirqs(); + } + return 0; + } +--- a/xen/drivers/passthrough/vtd/x86/vtd.c ++++ b/xen/drivers/passthrough/vtd/x86/vtd.c +@@ -19,6 +19,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -153,6 +154,9 @@ void iommu_set_dom0_mapping(struct domai + tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K); + for ( j = 0; j < tmp; j++ ) + iommu_map_page(d, (i*tmp+j), (i*tmp+j)); ++ ++ if (!(i & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K)))) ++ process_pending_softirqs(); + } + } + diff --git a/21346-x86-platform-timer-wrap.patch b/21346-x86-platform-timer-wrap.patch new file mode 100644 index 0000000..1a43c05 --- /dev/null +++ b/21346-x86-platform-timer-wrap.patch @@ -0,0 +1,67 @@ +# HG changeset patch +# User Keir Fraser +# Date 1273573287 -3600 +# Node ID 7d4deb86b9661b8585fc2b5c41334f2b34b0922b +# Parent 2077d6ad60780bbe0631c0dee1ef2e2b8eb03867 +x86: Detect and handle unexpected platform-timer counter wrap. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/time.c ++++ b/xen/arch/x86/time.c +@@ -571,26 +571,48 @@ static u64 plt_stamp64; /* 64-b + static u64 plt_stamp; /* hardware-width platform counter stamp */ + static struct timer plt_overflow_timer; + ++static s_time_t __read_platform_stime(u64 platform_time) ++{ ++ u64 diff = platform_time - platform_timer_stamp; ++ ASSERT(spin_is_locked(&platform_timer_lock)); ++ return (stime_platform_stamp + scale_delta(diff, &plt_scale)); ++} ++ + static void plt_overflow(void *unused) + { ++ int i; + u64 count; ++ s_time_t now, plt_now, plt_wrap; + + spin_lock_irq(&platform_timer_lock); ++ + count = plt_src.read_counter(); + plt_stamp64 += (count - plt_stamp) & plt_mask; + plt_stamp = count; ++ ++ now = NOW(); ++ plt_wrap = __read_platform_stime(plt_stamp64); ++ for ( i = 0; i < 10; i++ ) ++ { ++ plt_now = plt_wrap; ++ plt_wrap = __read_platform_stime(plt_stamp64 + plt_mask + 1); ++ if ( __builtin_llabs(plt_wrap - now) > __builtin_llabs(plt_now - now) ) ++ break; ++ plt_stamp64 += plt_mask + 1; ++ } ++ if ( i != 0 ) ++ { ++ static bool_t warned_once; ++ if ( !test_and_set_bool(warned_once) ) ++ printk("Platform timer appears to have unexpectedly wrapped " ++ "%u%s times.\n", i, (i == 10) ? " or more" : ""); ++ } ++ + spin_unlock_irq(&platform_timer_lock); + + set_timer(&plt_overflow_timer, NOW() + plt_overflow_period); + } + +-static s_time_t __read_platform_stime(u64 platform_time) +-{ +- u64 diff = platform_time - platform_timer_stamp; +- ASSERT(spin_is_locked(&platform_timer_lock)); +- return (stime_platform_stamp + scale_delta(diff, &plt_scale)); +-} +- + static s_time_t read_platform_stime(void) + { + u64 count; diff --git a/21349-x86-memcpy.patch b/21349-x86-memcpy.patch new file mode 100644 index 0000000..0998329 --- /dev/null +++ b/21349-x86-memcpy.patch @@ -0,0 +1,313 @@ +# HG changeset patch +# User Keir Fraser +# Date 1273583128 -3600 +# Node ID d77a88f938c635c3ccfedaa00f946e4d9ed26098 +# Parent 2b5e14e4c5e57b0064d1c0415d9c4629bd0aac9b +x86: Replace our own specialised versions of memset and memcpy with +direct use of gcc's built-in versions. + +This dramatically simplifies our code while also avoiding compile +warnings with certain intermediate versions of gcc. + +This patch is based on an initial version by Jan Beulich. + +Signed-off-by: Keir Fraser + +Index: xen-4.0.0-testing/xen/arch/x86/string.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/string.c ++++ xen-4.0.0-testing/xen/arch/x86/string.c +@@ -14,25 +14,12 @@ void *memcpy(void *dest, const void *src + long d0, d1, d2; + + asm volatile ( +-#ifdef __i386__ +- " rep movsl ; " +-#else +- " rep movsq ; " +- " testb $4,%b4 ; " +- " je 0f ; " +- " movsl ; " +- "0: ; " +-#endif +- " testb $2,%b4 ; " +- " je 1f ; " +- " movsw ; " +- "1: testb $1,%b4 ; " +- " je 2f ; " +- " movsb ; " +- "2: " ++ " rep ; movs"__OS" ; " ++ " mov %4,%3 ; " ++ " rep ; movsb " + : "=&c" (d0), "=&D" (d1), "=&S" (d2) +- : "0" (n/sizeof(long)), "q" (n), "1" (dest), "2" (src) +- : "memory"); ++ : "0" (n/BYTES_PER_LONG), "r" (n%BYTES_PER_LONG), "1" (dest), "2" (src) ++ : "memory" ); + + return dest; + } +@@ -55,7 +42,7 @@ void *memset(void *s, int c, size_t n) + void *memmove(void *dest, const void *src, size_t n) + { + long d0, d1, d2; +- ++ + if ( dest < src ) + return memcpy(dest, src, n); + +Index: xen-4.0.0-testing/xen/include/asm-x86/string.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/string.h ++++ xen-4.0.0-testing/xen/include/asm-x86/string.h +@@ -3,246 +3,14 @@ + + #include + +-static inline void *__variable_memcpy(void *to, const void *from, size_t n) +-{ +- long d0, d1, d2; +- __asm__ __volatile__ ( +- " rep ; movs"__OS"\n" +- " mov %4,%3 \n" +- " rep ; movsb \n" +- : "=&c" (d0), "=&D" (d1), "=&S" (d2) +- : "0" (n/BYTES_PER_LONG), "r" (n%BYTES_PER_LONG), "1" (to), "2" (from) +- : "memory" ); +- return to; +-} +- +-/* +- * This looks horribly ugly, but the compiler can optimize it totally, +- * as the count is constant. +- */ +-static always_inline void * __constant_memcpy( +- void * to, const void * from, size_t n) +-{ +- switch ( n ) +- { +- case 0: +- return to; +- case 1: +- *(u8 *)to = *(const u8 *)from; +- return to; +- case 2: +- *(u16 *)to = *(const u16 *)from; +- return to; +- case 3: +- *(u16 *)to = *(const u16 *)from; +- *(2+(u8 *)to) = *(2+(const u8 *)from); +- return to; +- case 4: +- *(u32 *)to = *(const u32 *)from; +- return to; +- case 5: +- *(u32 *)to = *(const u32 *)from; +- *(4+(u8 *)to) = *(4+(const u8 *)from); +- return to; +- case 6: +- *(u32 *)to = *(const u32 *)from; +- *(2+(u16 *)to) = *(2+(const u16 *)from); +- return to; +- case 7: +- *(u32 *)to = *(const u32 *)from; +- *(2+(u16 *)to) = *(2+(const u16 *)from); +- *(6+(u8 *)to) = *(6+(const u8 *)from); +- return to; +- case 8: +- *(u64 *)to = *(const u64 *)from; +- return to; +- case 12: +- *(u64 *)to = *(const u64 *)from; +- *(2+(u32 *)to) = *(2+(const u32 *)from); +- return to; +- case 16: +- *(u64 *)to = *(const u64 *)from; +- *(1+(u64 *)to) = *(1+(const u64 *)from); +- return to; +- case 20: +- *(u64 *)to = *(const u64 *)from; +- *(1+(u64 *)to) = *(1+(const u64 *)from); +- *(4+(u32 *)to) = *(4+(const u32 *)from); +- return to; +- } +-#define COMMON(x) \ +- __asm__ __volatile__ ( \ +- "rep ; movs"__OS \ +- x \ +- : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ +- : "0" (n/BYTES_PER_LONG), "1" (to), "2" (from) \ +- : "memory" ); +- { +- long d0, d1, d2; +- switch ( n % BYTES_PER_LONG ) +- { +- case 0: COMMON(""); return to; +- case 1: COMMON("\n\tmovsb"); return to; +- case 2: COMMON("\n\tmovsw"); return to; +- case 3: COMMON("\n\tmovsw\n\tmovsb"); return to; +- case 4: COMMON("\n\tmovsl"); return to; +- case 5: COMMON("\n\tmovsl\n\tmovsb"); return to; +- case 6: COMMON("\n\tmovsl\n\tmovsw"); return to; +- case 7: COMMON("\n\tmovsl\n\tmovsw\n\tmovsb"); return to; +- } +- } +-#undef COMMON +- return to; +-} +- + #define __HAVE_ARCH_MEMCPY +-/* align source to a 64-bit boundary */ +-static always_inline +-void *__var_memcpy(void *t, const void *f, size_t n) +-{ +- int off = (unsigned long)f & 0x7; +- /* just do alignment if needed and if size is worth */ +- if ( (n > 32) && off ) { +- size_t n1 = 8 - off; +- __variable_memcpy(t, f, n1); +- __variable_memcpy(t + n1, f + n1, n - n1); +- return t; +- } else { +- return (__variable_memcpy(t, f, n)); +- } +-} +- +-#define memcpy(t,f,n) (__memcpy((t),(f),(n))) +-static always_inline +-void *__memcpy(void *t, const void *f, size_t n) +-{ +- return (__builtin_constant_p(n) ? +- __constant_memcpy((t),(f),(n)) : +- __var_memcpy((t),(f),(n))); +-} ++#define memcpy(t,f,n) (__builtin_memcpy((t),(f),(n))) + +-/* Some version of gcc don't have this builtin. It's non-critical anyway. */ ++/* Some versions of gcc don't have this builtin. It's non-critical anyway. */ + #define __HAVE_ARCH_MEMMOVE + extern void *memmove(void *dest, const void *src, size_t n); + +-static inline void *__memset_generic(void *s, char c, size_t count) +-{ +- long d0, d1; +- __asm__ __volatile__ ( +- "rep ; stosb" +- : "=&c" (d0), "=&D" (d1) : "a" (c), "1" (s), "0" (count) : "memory" ); +- return s; +-} +- +-/* we might want to write optimized versions of these later */ +-#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count)) +- +-/* +- * memset(x,0,y) is a reasonably common thing to do, so we want to fill +- * things 32 bits at a time even when we don't know the size of the +- * area at compile-time.. +- */ +-static inline void *__constant_c_memset(void *s, unsigned long c, size_t count) +-{ +- long d0, d1; +- __asm__ __volatile__( +- " rep ; stos"__OS"\n" +- " mov %3,%4 \n" +- " rep ; stosb \n" +- : "=&c" (d0), "=&D" (d1) +- : "a" (c), "r" (count%BYTES_PER_LONG), +- "0" (count/BYTES_PER_LONG), "1" (s) +- : "memory" ); +- return s; +-} +- +-/* +- * This looks horribly ugly, but the compiler can optimize it totally, +- * as we by now know that both pattern and count is constant.. +- */ +-static always_inline void *__constant_c_and_count_memset( +- void *s, unsigned long pattern, size_t count) +-{ +- switch ( count ) +- { +- case 0: +- return s; +- case 1: +- *(u8 *)s = pattern; +- return s; +- case 2: +- *(u16 *)s = pattern; +- return s; +- case 3: +- *(u16 *)s = pattern; +- *(2+(u8 *)s) = pattern; +- return s; +- case 4: +- *(u32 *)s = pattern; +- return s; +- case 5: +- *(u32 *)s = pattern; +- *(4+(u8 *)s) = pattern; +- return s; +- case 6: +- *(u32 *)s = pattern; +- *(2+(u16 *)s) = pattern; +- return s; +- case 7: +- *(u32 *)s = pattern; +- *(2+(u16 *)s) = pattern; +- *(6+(u8 *)s) = pattern; +- return s; +- case 8: +- *(u64 *)s = pattern; +- return s; +- } +-#define COMMON(x) \ +- __asm__ __volatile__ ( \ +- "rep ; stos"__OS \ +- x \ +- : "=&c" (d0), "=&D" (d1) \ +- : "a" (pattern), "0" (count/BYTES_PER_LONG), "1" (s) \ +- : "memory" ) +- { +- long d0, d1; +- switch ( count % BYTES_PER_LONG ) +- { +- case 0: COMMON(""); return s; +- case 1: COMMON("\n\tstosb"); return s; +- case 2: COMMON("\n\tstosw"); return s; +- case 3: COMMON("\n\tstosw\n\tstosb"); return s; +- case 4: COMMON("\n\tstosl"); return s; +- case 5: COMMON("\n\tstosl\n\tstosb"); return s; +- case 6: COMMON("\n\tstosl\n\tstosw"); return s; +- case 7: COMMON("\n\tstosl\n\tstosw\n\tstosb"); return s; +- } +- } +-#undef COMMON +- return s; +-} +- +-#define __constant_c_x_memset(s, c, count) \ +-(__builtin_constant_p(count) ? \ +- __constant_c_and_count_memset((s),(c),(count)) : \ +- __constant_c_memset((s),(c),(count))) +- +-#define __var_x_memset(s, c, count) \ +-(__builtin_constant_p(count) ? \ +- __constant_count_memset((s),(c),(count)) : \ +- __memset_generic((s),(c),(count))) +- +-#ifdef CONFIG_X86_64 +-#define MEMSET_PATTERN_MUL 0x0101010101010101UL +-#else +-#define MEMSET_PATTERN_MUL 0x01010101UL +-#endif +- + #define __HAVE_ARCH_MEMSET +-#define memset(s, c, count) (__memset((s),(c),(count))) +-#define __memset(s, c, count) \ +-(__builtin_constant_p(c) ? \ +- __constant_c_x_memset((s),(MEMSET_PATTERN_MUL*(unsigned char)(c)),(count)) : \ +- __var_x_memset((s),(c),(count))) ++#define memset(s,c,n) (__builtin_memset((s),(c),(n))) + + #endif /* __X86_STRING_H__ */ diff --git a/21360-x86-mce-polling-disabled-init.patch b/21360-x86-mce-polling-disabled-init.patch new file mode 100644 index 0000000..91b52d3 --- /dev/null +++ b/21360-x86-mce-polling-disabled-init.patch @@ -0,0 +1,20 @@ +# HG changeset patch +# User Keir Fraser +# Date 1273651780 -3600 +# Node ID fa94385978e6317732e2c12000923ca6a5e0d2ed +# Parent 0079f76e906f378f81044da4e135df2fbb878fa5 +mce: MCE polling logic should check mce_disabled during initialisation. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/cpu/mcheck/non-fatal.c ++++ b/xen/arch/x86/cpu/mcheck/non-fatal.c +@@ -91,7 +91,7 @@ static int __init init_nonfatal_mce_chec + struct cpuinfo_x86 *c = &boot_cpu_data; + + /* Check for MCE support */ +- if (!mce_available(c)) ++ if (mce_disabled || !mce_available(c)) + return -ENODEV; + + /* diff --git a/21372-x86-cross-cpu-wait.patch b/21372-x86-cross-cpu-wait.patch new file mode 100644 index 0000000..5ccee8e --- /dev/null +++ b/21372-x86-cross-cpu-wait.patch @@ -0,0 +1,42 @@ +# HG changeset patch +# User Keir Fraser +# Date 1273740260 -3600 +# Node ID 6c22d2dfed4882d5febf98d2afbb96ec9bedd043 +# Parent 97da07c523ddc2565da67b6cfeec006d742bb06d +x86: Fix a few on_{selected,each}_cpus callers who should wait for completion. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c ++++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c +@@ -195,7 +195,7 @@ static void drv_write(struct drv_cmd *cm + cpu_isset(smp_processor_id(), cmd->mask)) + do_drv_write((void *)cmd); + else +- on_selected_cpus(&cmd->mask, do_drv_write, cmd, 0); ++ on_selected_cpus(&cmd->mask, do_drv_write, cmd, 1); + } + + static u32 get_cur_val(cpumask_t mask) +--- a/xen/arch/x86/acpi/cpufreq/powernow.c ++++ b/xen/arch/x86/acpi/cpufreq/powernow.c +@@ -122,7 +122,7 @@ static int powernow_cpufreq_target(struc + + cmd.val = next_perf_state; + +- on_selected_cpus(&cmd.mask, transition_pstate, &cmd, 0); ++ on_selected_cpus(&cmd.mask, transition_pstate, &cmd, 1); + + for_each_cpu_mask(j, online_policy_cpus) + cpufreq_statistic_update(j, perf->state, next_perf_state); +--- a/xen/arch/x86/cpu/mcheck/mce.c ++++ b/xen/arch/x86/cpu/mcheck/mce.c +@@ -1610,7 +1610,7 @@ long do_mca(XEN_GUEST_HANDLE(xen_mc_t) u + add_taint(TAINT_ERROR_INJECT); + + if ( mce_broadcast ) +- on_each_cpu(x86_mc_mceinject, mc_mceinject, 0); ++ on_each_cpu(x86_mc_mceinject, mc_mceinject, 1); + else + on_selected_cpus(cpumask_of(target), x86_mc_mceinject, + mc_mceinject, 1); diff --git a/21373-dummy-domain-io-caps.patch b/21373-dummy-domain-io-caps.patch new file mode 100644 index 0000000..9e967f9 --- /dev/null +++ b/21373-dummy-domain-io-caps.patch @@ -0,0 +1,48 @@ +# HG changeset patch +# User Keir Fraser +# Date 1273741742 -3600 +# Node ID 1ec412805622fd7ec0e88bf3b7ab681d024994bc +# Parent 6c22d2dfed4882d5febf98d2afbb96ec9bedd043 +Even 'dummy' domains (e.g., dom_xen a.k.a. DOMID_XEN) must have valid I/O caps. + +Ensure the rangesets are always initialised. Certain (privileged) +invocations of hypercalls such as mmu_update can end up interrogating +these special domains for possible I/O capabilities. + +Signed-off-by: Keir Fraser + +--- a/xen/common/domain.c ++++ b/xen/common/domain.c +@@ -245,12 +245,17 @@ struct domain *domain_create( + d->disable_migrate = 1; + } + +- if ( domcr_flags & DOMCRF_dummy ) +- return d; +- + rangeset_domain_initialise(d); + init_status |= INIT_rangeset; + ++ d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); ++ d->irq_caps = rangeset_new(d, "Interrupts", 0); ++ if ( (d->iomem_caps == NULL) || (d->irq_caps == NULL) ) ++ goto fail; ++ ++ if ( domcr_flags & DOMCRF_dummy ) ++ return d; ++ + if ( !is_idle_domain(d) ) + { + if ( xsm_domain_create(d, ssidref) != 0 ) +@@ -285,11 +290,6 @@ struct domain *domain_create( + goto fail; + init_status |= INIT_arch; + +- d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); +- d->irq_caps = rangeset_new(d, "Interrupts", 0); +- if ( (d->iomem_caps == NULL) || (d->irq_caps == NULL) ) +- goto fail; +- + if ( sched_init_domain(d) != 0 ) + goto fail; + diff --git a/21408-amd-erratum-383.patch b/21408-amd-erratum-383.patch new file mode 100644 index 0000000..90cc985 --- /dev/null +++ b/21408-amd-erratum-383.patch @@ -0,0 +1,141 @@ +# HG changeset patch +# User Keir Fraser +# Date 1274178085 -3600 +# Node ID f40acba36be886e4b4e87afeacf39688f316dfe4 +# Parent e4028345ad48c442eb55b7bc08afdf1aede0aa2e +svm: Fix for AMD erratum 383 on Family 10h CPUs + +This patches implements the workaround of AMD erratum 383 on family +10h CPUs. It destroys the guest VM when a MC error with a special +pattern is detected. Without this patch, a guest VM failure can +potentially crash Xen hypervisor and the whole system. The erratum +will be published in next version of guide. + +Signed-off-by: Wei Huang +Signed-off-by: Joerg Roedel +Signed-off-by: Christoph Egger + +Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/svm.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c +@@ -72,6 +72,8 @@ static void *hsa[NR_CPUS] __read_mostly; + /* vmcb used for extended host state */ + static void *root_vmcb[NR_CPUS] __read_mostly; + ++static bool_t amd_erratum383_found __read_mostly; ++ + static void inline __update_guest_eip( + struct cpu_user_regs *regs, unsigned int inst_len) + { +@@ -822,6 +824,20 @@ static int svm_cpu_prepare(unsigned int + return 0; + } + ++static void svm_init_erratum_383(struct cpuinfo_x86 *c) ++{ ++ uint64_t msr_content; ++ ++ /* only family 10h is affected */ ++ if ( c->x86 != 0x10 ) ++ return; ++ ++ rdmsrl(MSR_AMD64_DC_CFG, msr_content); ++ wrmsrl(MSR_AMD64_DC_CFG, msr_content | (1ULL << 47)); ++ ++ amd_erratum383_found = 1; ++} ++ + static int svm_cpu_up(struct cpuinfo_x86 *c) + { + u32 eax, edx, phys_hsa_lo, phys_hsa_hi; +@@ -847,6 +863,9 @@ static int svm_cpu_up(struct cpuinfo_x86 + phys_hsa_hi = (u32)(phys_hsa >> 32); + wrmsr(MSR_K8_VM_HSAVE_PA, phys_hsa_lo, phys_hsa_hi); + ++ /* check for erratum 383 */ ++ svm_init_erratum_383(c); ++ + /* Initialize core's ASID handling. */ + svm_asid_init(c); + +@@ -1244,6 +1263,47 @@ static void svm_vmexit_ud_intercept(stru + } + } + ++extern unsigned int nr_mce_banks; /* from mce.h */ ++ ++static int svm_is_erratum_383(struct cpu_user_regs *regs) ++{ ++ uint64_t msr_content; ++ uint32_t i; ++ struct vcpu *v = current; ++ ++ if ( !amd_erratum383_found ) ++ return 0; ++ ++ rdmsrl(MSR_IA32_MC0_STATUS, msr_content); ++ /* Bit 62 may or may not be set for this mce */ ++ msr_content &= ~(1ULL << 62); ++ ++ if ( msr_content != 0xb600000000010015ULL ) ++ return 0; ++ ++ /* Clear MCi_STATUS registers */ ++ for (i = 0; i < nr_mce_banks; i++) ++ wrmsrl(MSR_IA32_MCx_STATUS(i), 0ULL); ++ ++ rdmsrl(MSR_IA32_MCG_STATUS, msr_content); ++ wrmsrl(MSR_IA32_MCG_STATUS, msr_content & ~(1ULL << 2)); ++ ++ /* flush TLB */ ++ flush_tlb_mask(&v->domain->domain_dirty_cpumask); ++ ++ return 1; ++} ++ ++static void svm_vmexit_mce_intercept( ++ struct vcpu *v, struct cpu_user_regs *regs) ++{ ++ if ( svm_is_erratum_383(regs) ) ++ { ++ gdprintk(XENLOG_ERR, "SVM hits AMD erratum 383\n"); ++ domain_crash(v->domain); ++ } ++} ++ + static void wbinvd_ipi(void *info) + { + wbinvd(); +@@ -1432,6 +1492,7 @@ asmlinkage void svm_vmexit_handler(struc + /* Asynchronous event, handled when we STGI'd after the VMEXIT. */ + case VMEXIT_EXCEPTION_MC: + HVMTRACE_0D(MCE); ++ svm_vmexit_mce_intercept(v, regs); + break; + + case VMEXIT_VINTR: +Index: xen-4.0.0-testing/xen/include/asm-x86/msr-index.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/msr-index.h ++++ xen-4.0.0-testing/xen/include/asm-x86/msr-index.h +@@ -146,6 +146,11 @@ + #define MSR_IA32_MC8_ADDR 0x00000422 + #define MSR_IA32_MC8_MISC 0x00000423 + ++#define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) ++#define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x)) ++#define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x)) ++#define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x)) ++ + #define MSR_P6_PERFCTR0 0x000000c1 + #define MSR_P6_PERFCTR1 0x000000c2 + #define MSR_P6_EVNTSEL0 0x00000186 +@@ -224,6 +229,7 @@ + + /* AMD64 MSRs */ + #define MSR_AMD64_NB_CFG 0xc001001f ++#define MSR_AMD64_DC_CFG 0xc0011022 + #define AMD64_NB_CFG_CF8_EXT_ENABLE_BIT 46 + + /* AMD Family10h machine check MSRs */ diff --git a/21421-vts-ats-enabling.patch b/21421-vts-ats-enabling.patch index 49d7db2..0d51bf0 100644 --- a/21421-vts-ats-enabling.patch +++ b/21421-vts-ats-enabling.patch @@ -18,11 +18,9 @@ device is deassigned from a domain. Signed-off-by: Weidong Han -Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/ia64/ats.c -+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c -@@ -47,6 +47,11 @@ int enable_ats_device(int seg, int bus, +--- a/xen/drivers/passthrough/vtd/ia64/ats.c ++++ b/xen/drivers/passthrough/vtd/ia64/ats.c +@@ -47,6 +47,11 @@ int enable_ats_device(int seg, int bus, return 0; } @@ -34,11 +32,9 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c int dev_invalidate_iotlb(struct iommu *iommu, u16 did, u64 addr, unsigned int size_order, u64 type) { -Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/iommu.c -+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c -@@ -1331,6 +1331,9 @@ static int domain_context_mapping(struct +--- a/xen/drivers/passthrough/vtd/iommu.c ++++ b/xen/drivers/passthrough/vtd/iommu.c +@@ -1324,6 +1324,9 @@ static int domain_context_mapping(struct dprintk(VTDPREFIX, "d%d:PCIe: map bdf = %x:%x.%x\n", domain->domain_id, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn); @@ -48,7 +44,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c break; case DEV_TYPE_PCI: -@@ -1460,6 +1463,9 @@ static int domain_context_unmap(struct d +@@ -1453,6 +1456,9 @@ static int domain_context_unmap(struct d dprintk(VTDPREFIX, "d%d:PCIe: unmap bdf = %x:%x.%x\n", domain->domain_id, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); ret = domain_context_unmap_one(domain, iommu, bus, devfn); @@ -58,7 +54,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c break; case DEV_TYPE_PCI: -@@ -1788,8 +1794,6 @@ static void setup_dom0_devices(struct do +@@ -1771,8 +1777,6 @@ static void setup_dom0_devices(struct do list_add(&pdev->domain_list, &d->arch.pdev_list); domain_context_mapping(d, pdev->bus, pdev->devfn); pci_enable_acs(pdev); @@ -67,10 +63,8 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c } } spin_unlock(&pcidevs_lock); -Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/x86/ats.c -+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c +--- a/xen/drivers/passthrough/vtd/x86/ats.c ++++ b/xen/drivers/passthrough/vtd/x86/ats.c @@ -92,6 +92,9 @@ int ats_device(int seg, int bus, int dev pdev = pci_get_pdev(bus, devfn); @@ -81,7 +75,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c if ( !ecap_queued_inval(drhd->iommu->ecap) || !ecap_dev_iotlb(drhd->iommu->ecap) ) return 0; -@@ -144,6 +147,9 @@ int enable_ats_device(int seg, int bus, +@@ -144,6 +147,9 @@ int enable_ats_device(int seg, int bus, value = pci_conf_read16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos + ATS_REG_CTL); @@ -91,7 +85,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c value |= ATS_ENABLE; pci_conf_write16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos + ATS_REG_CTL, value); -@@ -153,10 +159,50 @@ int enable_ats_device(int seg, int bus, +@@ -153,10 +159,50 @@ int enable_ats_device(int seg, int bus, pdev->devfn = devfn; pdev->ats_queue_depth = queue_depth; list_add(&(pdev->list), &ats_devices); diff --git a/21435-vmx-retain-global-controls.patch b/21435-vmx-retain-global-controls.patch new file mode 100644 index 0000000..49329c6 --- /dev/null +++ b/21435-vmx-retain-global-controls.patch @@ -0,0 +1,45 @@ +# HG changeset patch +# User Keir Fraser +# Date 1274298365 -3600 +# Node ID c414129c8e129422d03898ec5822f56b2d2da4f8 +# Parent fe18437da295d0fdad2d852a603144eec62d29cd +vmx: Do not modify global vmx_vm{entry,exit}_control fields in init_vmcs_config() + +The function shoudl only have single-domain effect. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/hvm/vmx/vmcs.c ++++ b/xen/arch/x86/hvm/vmx/vmcs.c +@@ -558,6 +558,8 @@ static int construct_vmcs(struct vcpu *v + struct domain *d = v->domain; + uint16_t sysenter_cs; + unsigned long sysenter_eip; ++ u32 vmexit_ctl = vmx_vmexit_control; ++ u32 vmentry_ctl = vmx_vmentry_control; + + vmx_vmcs_enter(v); + +@@ -584,17 +586,17 @@ static int construct_vmcs(struct vcpu *v + v->arch.hvm_vmx.secondary_exec_control &= + ~(SECONDARY_EXEC_ENABLE_EPT | + SECONDARY_EXEC_UNRESTRICTED_GUEST); +- vmx_vmexit_control &= ~(VM_EXIT_SAVE_GUEST_PAT | +- VM_EXIT_LOAD_HOST_PAT); +- vmx_vmentry_control &= ~VM_ENTRY_LOAD_GUEST_PAT; ++ vmexit_ctl &= ~(VM_EXIT_SAVE_GUEST_PAT | ++ VM_EXIT_LOAD_HOST_PAT); ++ vmentry_ctl &= ~VM_ENTRY_LOAD_GUEST_PAT; + } + + /* Do not enable Monitor Trap Flag unless start single step debug */ + v->arch.hvm_vmx.exec_control &= ~CPU_BASED_MONITOR_TRAP_FLAG; + + __vmwrite(CPU_BASED_VM_EXEC_CONTROL, v->arch.hvm_vmx.exec_control); +- __vmwrite(VM_EXIT_CONTROLS, vmx_vmexit_control); +- __vmwrite(VM_ENTRY_CONTROLS, vmx_vmentry_control); ++ __vmwrite(VM_EXIT_CONTROLS, vmexit_ctl); ++ __vmwrite(VM_ENTRY_CONTROLS, vmentry_ctl); + + if ( cpu_has_vmx_ple ) + { diff --git a/21445-x86-tsc-handling-cleanups-v2.patch b/21445-x86-tsc-handling-cleanups-v2.patch new file mode 100644 index 0000000..db93ecb --- /dev/null +++ b/21445-x86-tsc-handling-cleanups-v2.patch @@ -0,0 +1,268 @@ +# HG changeset patch +# User Keir Fraser +# Date 1278094440 -3600 +# Node ID a9c458ab90e4ecb25383456be653368ecd900ee4 +# Parent 322468d5ab6ceca4afa21977a02f4492308d2ddc +x86: TSC handling cleanups (version 2) + +"I am removing the tsc_scaled variable that is never actually used +because when tsc needs to be scaled vtsc is 1. I am also making this +more explicit in tsc_set_info. I am also removing hvm_domain.gtsc_khz +that is a duplicate of d->arch.tsc_khz. I am using scale_delta(delta, +&d->arch.ns_to_vtsc) to scale the tsc value before returning it to the +guest like in the pv case. I added a feature flag to specify that the +pvclock algorithm is safe to be used in an HVM guest so that the guest +can now use it without hanging." + +Version 2 fixes a bug which breaks PV domU time. + +Signed-off-by: Stefano Stabellini +xen-unstable changeset: 21445:c1ed00d49534 +xen-unstable date: Sat May 22 06:31:47 2010 +0100 + +Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c +@@ -152,32 +152,6 @@ void hvm_set_rdtsc_exiting(struct domain + hvm_funcs.set_rdtsc_exiting(v, enable); + } + +-int hvm_gtsc_need_scale(struct domain *d) +-{ +- uint32_t gtsc_mhz, htsc_mhz; +- +- if ( d->arch.vtsc ) +- return 0; +- +- gtsc_mhz = d->arch.hvm_domain.gtsc_khz / 1000; +- htsc_mhz = (uint32_t)cpu_khz / 1000; +- +- d->arch.hvm_domain.tsc_scaled = (gtsc_mhz && (gtsc_mhz != htsc_mhz)); +- return d->arch.hvm_domain.tsc_scaled; +-} +- +-static u64 hvm_h2g_scale_tsc(struct vcpu *v, u64 host_tsc) +-{ +- uint32_t gtsc_khz, htsc_khz; +- +- if ( !v->domain->arch.hvm_domain.tsc_scaled ) +- return host_tsc; +- +- htsc_khz = cpu_khz; +- gtsc_khz = v->domain->arch.hvm_domain.gtsc_khz; +- return muldiv64(host_tsc, gtsc_khz, htsc_khz); +-} +- + void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc) + { + uint64_t tsc; +@@ -185,11 +159,11 @@ void hvm_set_guest_tsc(struct vcpu *v, u + if ( v->domain->arch.vtsc ) + { + tsc = hvm_get_guest_time(v); ++ tsc = gtime_to_gtsc(v->domain, tsc); + } + else + { + rdtscll(tsc); +- tsc = hvm_h2g_scale_tsc(v, tsc); + } + + v->arch.hvm_vcpu.cache_tsc_offset = guest_tsc - tsc; +@@ -203,12 +177,12 @@ u64 hvm_get_guest_tsc(struct vcpu *v) + if ( v->domain->arch.vtsc ) + { + tsc = hvm_get_guest_time(v); ++ tsc = gtime_to_gtsc(v->domain, tsc); + v->domain->arch.vtsc_kerncount++; + } + else + { + rdtscll(tsc); +- tsc = hvm_h2g_scale_tsc(v, tsc); + } + + return tsc + v->arch.hvm_vcpu.cache_tsc_offset; +Index: xen-4.0.0-testing/xen/arch/x86/hvm/save.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/save.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/save.c +@@ -33,7 +33,7 @@ void arch_hvm_save(struct domain *d, str + hdr->cpuid = eax; + + /* Save guest's preferred TSC. */ +- hdr->gtsc_khz = d->arch.hvm_domain.gtsc_khz; ++ hdr->gtsc_khz = d->arch.tsc_khz; + } + + int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr) +@@ -62,8 +62,8 @@ int arch_hvm_load(struct domain *d, stru + + /* Restore guest's preferred TSC frequency. */ + if ( hdr->gtsc_khz ) +- d->arch.hvm_domain.gtsc_khz = hdr->gtsc_khz; +- if ( hvm_gtsc_need_scale(d) ) ++ d->arch.tsc_khz = hdr->gtsc_khz; ++ if ( d->arch.vtsc ) + { + hvm_set_rdtsc_exiting(d, 1); + gdprintk(XENLOG_WARNING, "Domain %d expects freq %uMHz " +Index: xen-4.0.0-testing/xen/arch/x86/hvm/vpt.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/vpt.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/vpt.c +@@ -32,9 +32,6 @@ void hvm_init_guest_time(struct domain * + spin_lock_init(&pl->pl_time_lock); + pl->stime_offset = -(u64)get_s_time(); + pl->last_guest_time = 0; +- +- d->arch.hvm_domain.gtsc_khz = cpu_khz; +- d->arch.hvm_domain.tsc_scaled = 0; + } + + u64 hvm_get_guest_time(struct vcpu *v) +Index: xen-4.0.0-testing/xen/arch/x86/time.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/time.c ++++ xen-4.0.0-testing/xen/arch/x86/time.c +@@ -850,8 +850,13 @@ static void __update_vcpu_system_time(st + + if ( d->arch.vtsc ) + { +- u64 delta = max_t(s64, t->stime_local_stamp - d->arch.vtsc_offset, 0); +- tsc_stamp = scale_delta(delta, &d->arch.ns_to_vtsc); ++ u64 stime = t->stime_local_stamp; ++ if ( is_hvm_domain(d) ) ++ { ++ struct pl_time *pl = &v->domain->arch.hvm_domain.pl_time; ++ stime += pl->stime_offset + v->arch.hvm_vcpu.stime_offset; ++ } ++ tsc_stamp = gtime_to_gtsc(d, stime); + } + else + { +@@ -874,6 +879,8 @@ static void __update_vcpu_system_time(st + _u.tsc_to_system_mul = t->tsc_scale.mul_frac; + _u.tsc_shift = (s8)t->tsc_scale.shift; + } ++ if ( is_hvm_domain(d) ) ++ _u.tsc_timestamp += v->arch.hvm_vcpu.cache_tsc_offset; + + /* Don't bother unless timestamp record has changed or we are forced. */ + _u.version = u->version; /* make versions match for memcmp test */ +@@ -1640,11 +1647,17 @@ struct tm wallclock_time(void) + * PV SoftTSC Emulation. + */ + ++u64 gtime_to_gtsc(struct domain *d, u64 tsc) ++{ ++ if ( !is_hvm_domain(d) ) ++ tsc = max_t(s64, tsc - d->arch.vtsc_offset, 0); ++ return scale_delta(tsc, &d->arch.ns_to_vtsc); ++} ++ + void pv_soft_rdtsc(struct vcpu *v, struct cpu_user_regs *regs, int rdtscp) + { + s_time_t now = get_s_time(); + struct domain *d = v->domain; +- u64 delta; + + spin_lock(&d->arch.vtsc_lock); + +@@ -1660,8 +1673,7 @@ void pv_soft_rdtsc(struct vcpu *v, struc + + spin_unlock(&d->arch.vtsc_lock); + +- delta = max_t(s64, now - d->arch.vtsc_offset, 0); +- now = scale_delta(delta, &d->arch.ns_to_vtsc); ++ now = gtime_to_gtsc(d, now); + + regs->eax = (uint32_t)now; + regs->edx = (uint32_t)(now >> 32); +@@ -1802,8 +1814,10 @@ void tsc_set_info(struct domain *d, + d->arch.vtsc_offset = get_s_time() - elapsed_nsec; + d->arch.tsc_khz = gtsc_khz ? gtsc_khz : cpu_khz; + set_time_scale(&d->arch.vtsc_to_ns, d->arch.tsc_khz * 1000 ); +- /* use native TSC if initial host has safe TSC and not migrated yet */ +- if ( host_tsc_is_safe() && incarnation == 0 ) ++ /* use native TSC if initial host has safe TSC, has not migrated ++ * yet and tsc_khz == cpu_khz */ ++ if ( host_tsc_is_safe() && incarnation == 0 && ++ d->arch.tsc_khz == cpu_khz ) + d->arch.vtsc = 0; + else + d->arch.ns_to_vtsc = scale_reciprocal(d->arch.vtsc_to_ns); +@@ -1828,7 +1842,7 @@ void tsc_set_info(struct domain *d, + } + d->arch.incarnation = incarnation + 1; + if ( is_hvm_domain(d) ) +- hvm_set_rdtsc_exiting(d, d->arch.vtsc || hvm_gtsc_need_scale(d)); ++ hvm_set_rdtsc_exiting(d, d->arch.vtsc); + } + + /* vtsc may incur measurable performance degradation, diagnose with this */ +Index: xen-4.0.0-testing/xen/common/kernel.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/common/kernel.c ++++ xen-4.0.0-testing/xen/common/kernel.c +@@ -243,6 +243,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL + fi.submap |= (1U << XENFEAT_mmu_pt_update_preserve_ad) | + (1U << XENFEAT_highmem_assist) | + (1U << XENFEAT_gnttab_map_avail_bits); ++ else ++ fi.submap |= (1U << XENFEAT_hvm_safe_pvclock); + #endif + break; + default: +Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/domain.h ++++ xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h +@@ -45,8 +45,6 @@ struct hvm_domain { + struct hvm_ioreq_page ioreq; + struct hvm_ioreq_page buf_ioreq; + +- uint32_t gtsc_khz; /* kHz */ +- bool_t tsc_scaled; + struct pl_time pl_time; + + struct hvm_io_handler io_handler; +Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/hvm.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/hvm.h ++++ xen-4.0.0-testing/xen/include/asm-x86/hvm/hvm.h +@@ -290,7 +290,6 @@ int hvm_event_needs_reinjection(uint8_t + uint8_t hvm_combine_hw_exceptions(uint8_t vec1, uint8_t vec2); + + void hvm_set_rdtsc_exiting(struct domain *d, bool_t enable); +-int hvm_gtsc_need_scale(struct domain *d); + + static inline int + hvm_cpu_prepare(unsigned int cpu) +Index: xen-4.0.0-testing/xen/include/asm-x86/time.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/time.h ++++ xen-4.0.0-testing/xen/include/asm-x86/time.h +@@ -60,6 +60,7 @@ uint64_t acpi_pm_tick_to_ns(uint64_t tic + uint64_t ns_to_acpi_pm_tick(uint64_t ns); + + void pv_soft_rdtsc(struct vcpu *v, struct cpu_user_regs *regs, int rdtscp); ++u64 gtime_to_gtsc(struct domain *d, u64 tsc); + + void tsc_set_info(struct domain *d, uint32_t tsc_mode, uint64_t elapsed_nsec, + uint32_t gtsc_khz, uint32_t incarnation); +Index: xen-4.0.0-testing/xen/include/public/features.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/public/features.h ++++ xen-4.0.0-testing/xen/include/public/features.h +@@ -68,6 +68,9 @@ + */ + #define XENFEAT_gnttab_map_avail_bits 7 + ++/* x86: pvclock algorithm is safe to use on HVM */ ++#define XENFEAT_hvm_safe_pvclock 9 ++ + #define XENFEAT_NR_SUBMAPS 1 + + #endif /* __XEN_PUBLIC_FEATURES_H__ */ diff --git a/21446-iommu-graceful-generic-fail.patch b/21446-iommu-graceful-generic-fail.patch new file mode 100644 index 0000000..4a84654 --- /dev/null +++ b/21446-iommu-graceful-generic-fail.patch @@ -0,0 +1,29 @@ +# HG changeset patch +# User Keir Fraser +# Date 1274506601 -3600 +# Node ID 93410e5e4ad8799932ad31820d0d82c74d1f63a2 +# Parent c1ed00d495342334980be576bbb8a2b1037b89c9 +iommu: Gracefully fail to initialise iommu on generic x86 platforms. + +Signed-off-by: Keir Fraser + +--- a/xen/include/asm-x86/hvm/iommu.h ++++ b/xen/include/asm-x86/hvm/iommu.h +@@ -1,6 +1,8 @@ + #ifndef __ASM_X86_HVM_IOMMU_H__ + #define __ASM_X86_HVM_IOMMU_H__ + ++#include ++ + struct iommu_ops; + extern const struct iommu_ops intel_iommu_ops; + extern const struct iommu_ops amd_iommu_ops; +@@ -31,7 +33,7 @@ static inline int iommu_hardware_setup(v + case X86_VENDOR_AMD: + return amd_iov_detect(); + default: +- BUG(); ++ return -ENODEV; + } + + return 0; diff --git a/21453-shadow-avoid-remove-all-after-teardown.patch b/21453-shadow-avoid-remove-all-after-teardown.patch new file mode 100644 index 0000000..bbb2d73 --- /dev/null +++ b/21453-shadow-avoid-remove-all-after-teardown.patch @@ -0,0 +1,31 @@ +# HG changeset patch +# User Keir Fraser +# Date 1274857281 -3600 +# Node ID 5addb6cb16fd64c664b1e3dd335c76b3426e05e9 +# Parent 459f35d8cac4f19e6eae0a7396f6c97e20ae955c +x86 shadow: Avoid remove-all-shadows after shadow teardown + +If dom0 alters the p2m of a domain that's being destroyed, we can end +up doing a remove-all-shadows after the shadow hash table has been +freed. Since no hash table implies no shadows, just return +immediately. + +Signed-off-by: Tim Deegan + +--- a/xen/arch/x86/mm/shadow/common.c ++++ b/xen/arch/x86/mm/shadow/common.c +@@ -2173,8 +2173,13 @@ static void hash_foreach(struct vcpu *v, + struct domain *d = v->domain; + struct page_info *x; + +- /* Say we're here, to stop hash-lookups reordering the chains */ + ASSERT(shadow_locked_by_me(d)); ++ ++ /* Can be called via p2m code &c after shadow teardown. */ ++ if ( unlikely(!d->arch.paging.shadow.hash_table) ) ++ return; ++ ++ /* Say we're here, to stop hash-lookups reordering the chains */ + ASSERT(d->arch.paging.shadow.hash_walking == 0); + d->arch.paging.shadow.hash_walking = 1; + diff --git a/21456-compat-hvm-addr-check.patch b/21456-compat-hvm-addr-check.patch new file mode 100644 index 0000000..0e1c868 --- /dev/null +++ b/21456-compat-hvm-addr-check.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Keir Fraser +# Date 1274857778 -3600 +# Node ID a69d09da4917c7b57ceed65224e4bbc389601081 +# Parent 32cdd423d4ebab2b2d03a4501be08438c5dc7050 +compat-guest accessor macros do not need address check for hvm guests. + +Signed-off-by: Tim Deegan + +--- a/xen/include/xen/compat.h ++++ b/xen/include/xen/compat.h +@@ -90,8 +90,9 @@ + * Allows use of faster __copy_* functions. + */ + #define compat_handle_okay(hnd, nr) \ ++ (paging_mode_external(current->domain) || \ + compat_array_access_ok((void *)(full_ptr_t)(hnd).c, (nr), \ +- sizeof(**(hnd)._)) ++ sizeof(**(hnd)._))) + + #define __copy_to_compat_offset(hnd, off, ptr, nr) ({ \ + const typeof(*(ptr)) *_s = (ptr); \ diff --git a/21459-block-script.patch b/21459-block-script.patch new file mode 100644 index 0000000..b40a8dc --- /dev/null +++ b/21459-block-script.patch @@ -0,0 +1,27 @@ +# HG changeset patch +# User Jim Fehlig +# Date 1274807602 21600 +# Node ID 14d040342c6618365750b2c3b96ca01ff4a5e5dd +# Parent 93410e5e4ad8799932ad31820d0d82c74d1f63a2 +Allow space in vbd path name + +c/s 20393 breaks existing domain configuration that contains +spaces in the vbd path name. Fixed by this trivial patch which +provides missing quotes. + + Signed-off-by: Jim Fehlig + +diff -r 93410e5e4ad8 -r 14d040342c66 tools/hotplug/Linux/block +--- a/tools/hotplug/Linux/block Sat May 22 06:36:41 2010 +0100 ++++ b/tools/hotplug/Linux/block Tue May 25 11:13:22 2010 -0600 +@@ -272,8 +272,8 @@ + + if [ "x$mode" != 'x!' ] + then +- inode=$(stat -c '%i' $file) +- dev=$(stat -c '%D' $file) ++ inode=$(stat -c '%i' "$file") ++ dev=$(stat -c '%D' "$file") + if [ -z "$inode" ] || [ -z "$dev" ] + then + fatal "Unable to lookup $file: dev: $dev inode: $inode" diff --git a/21460-xend-timeoffset.patch b/21460-xend-timeoffset.patch new file mode 100644 index 0000000..db16ac0 --- /dev/null +++ b/21460-xend-timeoffset.patch @@ -0,0 +1,25 @@ +# HG changeset patch +# User Jim Fehlig +# Date 1274822804 21600 +# Node ID a83e97657ba0f3ea232fe0dfb9edccf8e28aa982 +# Parent 14d040342c6618365750b2c3b96ca01ff4a5e5dd +tools: Fix time offset when localtime=0 + +localtime can be stored in vm config as a string, resulting in +incorrect calculation of rtc_timeoffset. Cast localtime to int +to ensure rtc_timeoffset is calculated properly. + + Signed-off-by: Jim Fehlig + +diff -r 14d040342c66 -r a83e97657ba0 tools/python/xen/xend/image.py +--- a/tools/python/xen/xend/image.py Tue May 25 11:13:22 2010 -0600 ++++ b/tools/python/xen/xend/image.py Tue May 25 15:26:44 2010 -0600 +@@ -129,7 +129,7 @@ + self.dmargs = self.parseDeviceModelArgs(vmConfig) + self.pid = None + rtc_timeoffset = int(vmConfig['platform'].get('rtc_timeoffset', 0)) +- if vmConfig['platform'].get('localtime', 0): ++ if int(vmConfig['platform'].get('localtime', 0)): + if time.localtime(time.time())[8]: + rtc_timeoffset -= time.altzone + else: diff --git a/21492-x86-pirq-unbind.patch b/21492-x86-pirq-unbind.patch new file mode 100644 index 0000000..7981474 --- /dev/null +++ b/21492-x86-pirq-unbind.patch @@ -0,0 +1,23 @@ +# HG changeset patch +# User Keir Fraser +# Date 1275040447 -3600 +# Node ID 96917cf25bf3ad42c6b6cddb7ff4f03857ae9619 +# Parent 95acf74586d782d8d4d39016b3426a1eae127e97 +x86: Fix guest-pointer-array memmove in __pirq_guest_unbind(). + +Thanks to Alex Zefefrt for finding this. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/irq.c ++++ b/xen/arch/x86/irq.c +@@ -1242,7 +1242,8 @@ static irq_guest_action_t *__pirq_guest_ + for ( i = 0; (i < action->nr_guests) && (action->guest[i] != d); i++ ) + continue; + BUG_ON(i == action->nr_guests); +- memmove(&action->guest[i], &action->guest[i+1], IRQ_MAX_GUESTS-i-1); ++ memmove(&action->guest[i], &action->guest[i+1], ++ (action->nr_guests-i-1) * sizeof(action->guest[0])); + action->nr_guests--; + + switch ( action->ack_type ) diff --git a/21526-x86-nehalem-cpuid-mask.patch b/21526-x86-nehalem-cpuid-mask.patch index d876297..a13be19 100644 --- a/21526-x86-nehalem-cpuid-mask.patch +++ b/21526-x86-nehalem-cpuid-mask.patch @@ -8,201 +8,76 @@ Intel: Add CPUID feature mask support for NHM processors. Signed-off-by: Jun Nakajima Signed-off-by: Liping Ke -# HG changeset patch -# User Keir Fraser -# Date 1276604335 -3600 -# Node ID 2501732e291b001711a0dc1c474bb89ce77f3110 -# Parent a2cc1db1af9c8f9b148c80f8b2c3f64bde7542f9 -x86: fix pv cpuid masking - -Invert initial values of the variables parsed into from the command -line, so that completely clearing out one or more of the four bit -fields is possible. - -Further, consolidate the command line parameter specifications into -a single place. - -Finally, as per "Intel Virtualization Technology FlexMigration -Application Note" (http://www.intel.com/Assets/PDF/manual/323850.pdf), -also handle family 6 model 0x1f. - -What remains open is the question whether pv_cpuid() shouldn't also -consume these masks. - -Signed-off-by: Jan Beulich - -Index: xen-4.0.1-testing/xen/arch/x86/cpu/amd.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/cpu/amd.c -+++ xen-4.0.1-testing/xen/arch/x86/cpu/amd.c -@@ -33,14 +33,6 @@ void start_svm(struct cpuinfo_x86 *c); - static char opt_famrev[14]; - string_param("cpuid_mask_cpu", opt_famrev); - --/* Finer-grained CPUID feature control. */ --static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; --integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); --integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); --static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; --integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); --integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); -- - static inline void wrmsr_amd(unsigned int index, unsigned int lo, - unsigned int hi) - { -@@ -61,7 +53,7 @@ static inline void wrmsr_amd(unsigned in - * - * The processor revision string parameter has precedene. - */ --static void __devinit set_cpuidmask(struct cpuinfo_x86 *c) -+static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) - { - static unsigned int feat_ecx, feat_edx; - static unsigned int extfeat_ecx, extfeat_edx; -@@ -76,12 +68,12 @@ static void __devinit set_cpuidmask(stru - ASSERT((status == not_parsed) && (smp_processor_id() == 0)); - status = no_mask; - -- if (opt_cpuid_mask_ecx | opt_cpuid_mask_edx | -- opt_cpuid_mask_ext_ecx | opt_cpuid_mask_ext_edx) { -- feat_ecx = opt_cpuid_mask_ecx ? : ~0U; -- feat_edx = opt_cpuid_mask_edx ? : ~0U; -- extfeat_ecx = opt_cpuid_mask_ext_ecx ? : ~0U; -- extfeat_edx = opt_cpuid_mask_ext_edx ? : ~0U; -+ if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & -+ opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) { -+ feat_ecx = opt_cpuid_mask_ecx; -+ feat_edx = opt_cpuid_mask_edx; -+ extfeat_ecx = opt_cpuid_mask_ext_ecx; -+ extfeat_edx = opt_cpuid_mask_ext_edx; - } else if (*opt_famrev == '\0') { - return; - } else if (!strcmp(opt_famrev, "fam_0f_rev_c")) { -Index: xen-4.0.1-testing/xen/arch/x86/cpu/common.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/cpu/common.c -+++ xen-4.0.1-testing/xen/arch/x86/cpu/common.c -@@ -22,6 +22,15 @@ static int cachesize_override __cpuinitd - static int disable_x86_fxsr __cpuinitdata; - static int disable_x86_serial_nr __cpuinitdata; - -+unsigned int __devinitdata opt_cpuid_mask_ecx = ~0u; -+integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); -+unsigned int __devinitdata opt_cpuid_mask_edx = ~0u; -+integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); -+unsigned int __devinitdata opt_cpuid_mask_ext_ecx = ~0u; +--- a/xen/arch/x86/cpu/intel.c ++++ b/xen/arch/x86/cpu/intel.c +@@ -29,6 +29,9 @@ extern int trap_init_f00f_bug(void); + static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; + integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); + integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); ++static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; +integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); -+unsigned int __devinitdata opt_cpuid_mask_ext_edx = ~0u; +integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); -+ - struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; - /* -Index: xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/cpu/cpu.h -+++ xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h -@@ -21,6 +21,9 @@ struct cpu_dev { - - extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM]; - -+extern unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; -+extern unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; -+ - extern int get_model_name(struct cpuinfo_x86 *c); - extern void display_cacheinfo(struct cpuinfo_x86 *c); - -Index: xen-4.0.1-testing/xen/arch/x86/cpu/intel.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/cpu/intel.c -+++ xen-4.0.1-testing/xen/arch/x86/cpu/intel.c -@@ -20,16 +20,6 @@ - - extern int trap_init_f00f_bug(void); - --/* -- * opt_cpuid_mask_ecx/edx: cpuid.1[ecx, edx] feature mask. -- * For example, E8400[Intel Core 2 Duo Processor series] ecx = 0x0008E3FD, -- * edx = 0xBFEBFBFF when executing CPUID.EAX = 1 normally. If you want to -- * 'rev down' to E8400, you can set these values in these Xen boot parameters. -- */ --static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; --integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); --integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); -- static int use_xsave = 1; boolean_param("xsave", use_xsave); - -@@ -40,24 +30,57 @@ boolean_param("xsave", use_xsave); +@@ -40,24 +43,46 @@ boolean_param("xsave", use_xsave); struct movsl_mask movsl_mask __read_mostly; #endif -static void __devinit set_cpuidmask(void) -+/* -+ * opt_cpuid_mask_ecx/edx: cpuid.1[ecx, edx] feature mask. -+ * For example, E8400[Intel Core 2 Duo Processor series] ecx = 0x0008E3FD, -+ * edx = 0xBFEBFBFF when executing CPUID.EAX = 1 normally. If you want to -+ * 'rev down' to E8400, you can set these values in these Xen boot parameters. -+ */ -+static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) ++static void __devinit set_cpuidmask(struct cpuinfo_x86 *c) { - unsigned int eax, ebx, ecx, edx, model; -+ const char *extra = ""; ++ unsigned int model = c->x86_model; - if (!(opt_cpuid_mask_ecx | opt_cpuid_mask_edx)) -+ if (!~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & -+ opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) ++ if (!(opt_cpuid_mask_ecx | opt_cpuid_mask_edx | ++ opt_cpuid_mask_ext_ecx | opt_cpuid_mask_ext_edx)) return; - cpuid(0x00000001, &eax, &ebx, &ecx, &edx); - model = ((eax & 0xf0000) >> 12) | ((eax & 0xf0) >> 4); - if (!((model == 0x1d) || ((model == 0x17) && ((eax & 0xf) >= 4)))) { -- printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", -- smp_processor_id()); -+ /* Only family 6 supports this feature */ -+ switch ((c->x86 == 6) * c->x86_model) { -+ case 0x17: -+ if ((c->x86_mask & 0x0f) < 4) -+ break; -+ /* fall through */ -+ case 0x1d: -+ wrmsr(MSR_INTEL_CPUID_FEATURE_MASK, -+ opt_cpuid_mask_ecx, -+ opt_cpuid_mask_edx); -+ if (!~(opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) -+ return; -+ extra = "extended "; -+ break; -+/* ++ if (c->x86 != 0x6) /* Only family 6 supports this feature */ ++ return; ++ ++ if ((model == 0x1d) || ((model == 0x17) && (c->x86_mask >= 4))) { ++ wrmsr(MSR_IA32_CPUID_FEATURE_MASK1, ++ opt_cpuid_mask_ecx ? : ~0u, ++ opt_cpuid_mask_edx ? : ~0u); ++ } ++/* + * CPU supports this feature if the processor signature meets the following: + * (CPUID.(EAX=01h):EAX) > 000106A2h, or + * (CPUID.(EAX=01h):EAX) == 000106Exh, 0002065xh, 000206Cxh, 000206Exh, or 000206Fxh + * + */ -+ case 0x1a: -+ if ((c->x86_mask & 0x0f) <= 2) -+ break; -+ /* fall through */ -+ case 0x1e: case 0x1f: -+ case 0x25: case 0x2c: case 0x2e: case 0x2f: -+ wrmsr(MSR_INTEL_CPUID1_FEATURE_MASK, -+ opt_cpuid_mask_ecx, -+ opt_cpuid_mask_edx); -+ wrmsr(MSR_INTEL_CPUID80000001_FEATURE_MASK, -+ opt_cpuid_mask_ext_ecx, -+ opt_cpuid_mask_ext_edx); ++ else if (((model == 0x1a) && (c->x86_mask > 2)) ++ || model == 0x1e ++ || model == 0x25 ++ || model == 0x2c ++ || model == 0x2e ++ || model == 0x2f) { ++ wrmsr(MSR_IA32_CPUID1_FEATURE_MASK, ++ opt_cpuid_mask_ecx ? : ~0u, ++ opt_cpuid_mask_edx ? : ~0u); ++ wrmsr(MSR_IA32_CPUID80000001_FEATURE_MASK, ++ opt_cpuid_mask_ext_ecx ? : ~0u, ++ opt_cpuid_mask_ext_edx ? : ~0u); ++ } ++ else { + printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", + smp_processor_id()); return; } - +- - wrmsr(MSR_IA32_CPUID_FEATURE_MASK1, - opt_cpuid_mask_ecx ? : ~0u, - opt_cpuid_mask_edx ? : ~0u); -+ printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", -+ smp_processor_id()); } void __devinit early_intel_workaround(struct cpuinfo_x86 *c) -@@ -179,7 +202,7 @@ static void __devinit init_intel(struct +@@ -179,7 +204,7 @@ static void __devinit init_intel(struct detect_ht(c); @@ -211,20 +86,14 @@ Index: xen-4.0.1-testing/xen/arch/x86/cpu/intel.c /* Work around errata */ Intel_errata_workarounds(c); -Index: xen-4.0.1-testing/xen/include/asm-x86/msr-index.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/asm-x86/msr-index.h -+++ xen-4.0.1-testing/xen/include/asm-x86/msr-index.h -@@ -156,8 +156,10 @@ - #define MSR_P6_EVNTSEL0 0x00000186 - #define MSR_P6_EVNTSEL1 0x00000187 +--- a/xen/include/asm-x86/msr-index.h ++++ b/xen/include/asm-x86/msr-index.h +@@ -158,6 +158,8 @@ --/* MSR for cpuid feature mask */ --#define MSR_IA32_CPUID_FEATURE_MASK1 0x00000478 -+/* MSRs for Intel cpuid feature mask */ -+#define MSR_INTEL_CPUID_FEATURE_MASK 0x00000478 -+#define MSR_INTEL_CPUID1_FEATURE_MASK 0x00000130 -+#define MSR_INTEL_CPUID80000001_FEATURE_MASK 0x00000131 + /* MSR for cpuid feature mask */ + #define MSR_IA32_CPUID_FEATURE_MASK1 0x00000478 ++#define MSR_IA32_CPUID1_FEATURE_MASK 0x00000130 ++#define MSR_IA32_CPUID80000001_FEATURE_MASK 0x00000131 /* MSRs & bits used for VMX enabling */ #define MSR_IA32_VMX_BASIC 0x480 diff --git a/21542-amd-erratum-411.patch b/21542-amd-erratum-411.patch index b22122c..9322bce 100644 --- a/21542-amd-erratum-411.patch +++ b/21542-amd-erratum-411.patch @@ -9,11 +9,11 @@ Clear APIC TMICT when we mask APIC LVTT. Signed-off-by: Wei Wang -Index: xen-4.0.1-testing/xen/arch/x86/apic.c +Index: xen-4.0.0-testing/xen/arch/x86/apic.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/apic.c -+++ xen-4.0.1-testing/xen/arch/x86/apic.c -@@ -198,6 +198,9 @@ void clear_local_APIC(void) +--- xen-4.0.0-testing.orig/xen/arch/x86/apic.c ++++ xen-4.0.0-testing/xen/arch/x86/apic.c +@@ -195,6 +195,9 @@ void clear_local_APIC(void) maxlvt = get_maxlvt(); @@ -23,7 +23,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/apic.c /* * Masking an LVT entry on a P6 can trigger a local APIC error * if the vector is zero. Mask LVTERR first to prevent this. -@@ -1335,7 +1338,10 @@ void disable_APIC_timer(void) +@@ -1184,7 +1187,10 @@ void disable_APIC_timer(void) { if (using_apic_timer) { unsigned long v; @@ -35,10 +35,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/apic.c v = apic_read(APIC_LVTT); apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED); } -Index: xen-4.0.1-testing/xen/arch/x86/hpet.c +Index: xen-4.0.0-testing/xen/arch/x86/hpet.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/hpet.c -+++ xen-4.0.1-testing/xen/arch/x86/hpet.c +--- xen-4.0.0-testing.orig/xen/arch/x86/hpet.c ++++ xen-4.0.0-testing/xen/arch/x86/hpet.c @@ -659,8 +659,7 @@ void hpet_broadcast_enter(void) if ( hpet_attach_channel ) hpet_attach_channel(cpu, ch); diff --git a/21615-dont-save-xen-heap-pages.patch b/21615-dont-save-xen-heap-pages.patch index b6327cf..782e3d9 100644 --- a/21615-dont-save-xen-heap-pages.patch +++ b/21615-dont-save-xen-heap-pages.patch @@ -17,10 +17,8 @@ guests, meaning that the input to these must be treated as GMFNs. Signed-off-by: Jan Beulich -Index: xen-4.0.1-testing/tools/libxc/xc_domain_save.c -=================================================================== ---- xen-4.0.1-testing.orig/tools/libxc/xc_domain_save.c -+++ xen-4.0.1-testing/tools/libxc/xc_domain_save.c +--- a/tools/libxc/xc_domain_save.c ++++ b/tools/libxc/xc_domain_save.c @@ -1282,58 +1282,64 @@ int xc_domain_save(int xc_handle, int io goto out; } @@ -58,11 +56,11 @@ Index: xen-4.0.1-testing/tools/libxc/xc_domain_save.c - goto out; - } + unsigned long gmfn = pfn_batch[j]; -+ -+ if ( !hvm ) -+ gmfn = pfn_to_mfn(gmfn); - for ( j = 0; j < batch; j++ ) ++ if ( !hvm ) ++ gmfn = pfn_to_mfn(gmfn); ++ + if ( pfn_err[j] ) { - unsigned long mfn = pfn_to_mfn(pfn_batch[j]); @@ -124,11 +122,9 @@ Index: xen-4.0.1-testing/tools/libxc/xc_domain_save.c if ( write_exact(io_fd, &batch, sizeof(unsigned int)) ) { PERROR("Error when writing to state file (2)"); -Index: xen-4.0.1-testing/xen/arch/x86/domctl.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/domctl.c -+++ xen-4.0.1-testing/xen/arch/x86/domctl.c -@@ -206,11 +206,12 @@ long arch_do_domctl( +--- a/xen/arch/x86/domctl.c ++++ b/xen/arch/x86/domctl.c +@@ -207,11 +207,12 @@ long arch_do_domctl( for ( j = 0; j < k; j++ ) { @@ -143,7 +139,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/domctl.c type = XEN_DOMCTL_PFINFO_XTAB; else if ( xsm_getpageframeinfo(page) != 0 ) ; -@@ -305,14 +306,15 @@ long arch_do_domctl( +@@ -306,14 +307,15 @@ long arch_do_domctl( for ( j = 0; j < k; j++ ) { struct page_info *page; diff --git a/21620-x86-signed-domain-irq.patch b/21620-x86-signed-domain-irq.patch new file mode 100644 index 0000000..ee3d1bf --- /dev/null +++ b/21620-x86-signed-domain-irq.patch @@ -0,0 +1,34 @@ +# HG changeset patch +# User Keir Fraser +# Date 1276604463 -3600 +# Node ID b0f7f710f512aba0fca814467e4f5fe7b906ada3 +# Parent 972b7e305138759d4ef42b75d5fe5c6fd2d2e30c +x86: return value of domain_pirq_to_irq() is signed + +That value can, for forcibly unbound PIRQs, validly be negative, and +for the respective check to catch those cases (and prevent using these +negative values as array index), the respective variables must be of +signed type. + +Signed-off-by: Jan Beulich + +--- a/xen/arch/x86/irq.c ++++ b/xen/arch/x86/irq.c +@@ -879,7 +879,7 @@ static void __do_IRQ_guest(int irq) + struct irq_desc *domain_spin_lock_irq_desc( + struct domain *d, int pirq, unsigned long *pflags) + { +- unsigned int irq; ++ int irq; + unsigned long flags; + struct irq_desc *desc; + +@@ -1046,7 +1046,7 @@ extern int ioapic_ack_new; + static int pirq_acktype(struct domain *d, int pirq) + { + struct irq_desc *desc; +- unsigned int irq; ++ int irq; + + irq = domain_pirq_to_irq(d, pirq); + if ( irq <= 0 ) diff --git a/21627-cpuidle-wrap.patch b/21627-cpuidle-wrap.patch index 004a9ea..18da1d3 100644 --- a/21627-cpuidle-wrap.patch +++ b/21627-cpuidle-wrap.patch @@ -7,11 +7,9 @@ cpuidle: fix wrapped ticks calculation for pm timer. Signed-off-by: Wei Gang -Index: xen-4.0.1-testing/xen/arch/x86/acpi/cpu_idle.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/acpi/cpu_idle.c -+++ xen-4.0.1-testing/xen/arch/x86/acpi/cpu_idle.c -@@ -127,9 +127,9 @@ static inline u32 ticks_elapsed(u32 t1, +--- a/xen/arch/x86/acpi/cpu_idle.c ++++ b/xen/arch/x86/acpi/cpu_idle.c +@@ -127,9 +127,9 @@ static inline u32 ticks_elapsed(u32 t1, if ( t2 >= t1 ) return (t2 - t1); else if ( !(acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER) ) diff --git a/21643-vmx-vpmu-pmc-offset.patch b/21643-vmx-vpmu-pmc-offset.patch new file mode 100644 index 0000000..be0eafb --- /dev/null +++ b/21643-vmx-vpmu-pmc-offset.patch @@ -0,0 +1,25 @@ +# HG changeset patch +# User Keir Fraser +# Date 1277110750 -3600 +# Node ID 31708477f0a92be70a940d1c8ff1aa721051bba8 +# Parent 46a4c936b77e483971d2b3eb0b544c61700f824a +vmx: Fix bug in VMX VPMU fixed function PMC offset + +This is a minor fix to the calculation of bit-width of fixed function +perfmon counters in Intel processors. Bits 5-12 of edx register +should be calculated as (edx & 0x1fe0) >>5 instead of using 0x1f70. + +From: "John, Jaiber J" +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/hvm/vmx/vpmu_core2.c ++++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c +@@ -82,7 +82,7 @@ static int core2_get_bitwidth_fix_count( + { + u32 eax, ebx, ecx, edx; + cpuid(0xa, &eax, &ebx, &ecx, &edx); +- return ((edx & 0x1f70) >> 5); ++ return ((edx & 0x1fe0) >> 5); + } + + static int is_core2_vpmu_msr(u32 msr_index, int *type, int *index) diff --git a/21653-xend-mac-addr.patch b/21653-xend-mac-addr.patch index a1b8b5f..293ffdb 100644 --- a/21653-xend-mac-addr.patch +++ b/21653-xend-mac-addr.patch @@ -16,10 +16,10 @@ validity before doing device_add, there will be no problem. Signed-off-by Chunyan Liu -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -847,11 +847,6 @@ class XendDomainInfo: @type dev_config: SXP object (parsed config) """ diff --git a/21678-xend-mac-fix.patch b/21678-xend-mac-fix.patch index b452487..5ff0672 100644 --- a/21678-xend-mac-fix.patch +++ b/21678-xend-mac-fix.patch @@ -16,10 +16,10 @@ change manually as it had been mangled.) Signed-off-by: Ian Jackson Signed-off-by Chunyan Liu -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -847,6 +847,8 @@ class XendDomainInfo: @type dev_config: SXP object (parsed config) """ diff --git a/21682-trace-buffer-range.patch b/21682-trace-buffer-range.patch new file mode 100644 index 0000000..7ba7645 --- /dev/null +++ b/21682-trace-buffer-range.patch @@ -0,0 +1,26 @@ +# HG changeset patch +# User Keir Fraser +# Date 1277738876 -3600 +# Node ID 7e46fdbe8a1187cee2ab609256300d7967f37f06 +# Parent bf64e1081333696c68c9430cbc32c8bd6ee18796 +xentrace: restrict trace buffer MFNs + +Since they're being passed to Dom0 using an array of uint32_t, they +must be representable as 32-bit quantities, and hence the buffer +allocation must specify an upper address boundary. + +Signed-off-by: Jan Beulich +Acked-by: George Dunlap + +--- a/xen/common/trace.c ++++ b/xen/common/trace.c +@@ -152,7 +152,8 @@ static int alloc_trace_bufs(void) + char *rawbuf; + struct t_buf *buf; + +- if ( (rawbuf = alloc_xenheap_pages(order, 0)) == NULL ) ++ if ( (rawbuf = alloc_xenheap_pages( ++ order, MEMF_bits(32 + PAGE_SHIFT))) == NULL ) + { + printk("Xen trace buffers: memory allocation failed\n"); + opt_tbuf_size = 0; diff --git a/21683-vtd-kill-timer-conditional.patch b/21683-vtd-kill-timer-conditional.patch index 77ee382..94b6b9e 100644 --- a/21683-vtd-kill-timer-conditional.patch +++ b/21683-vtd-kill-timer-conditional.patch @@ -7,10 +7,8 @@ vtd: Only kill_timer() an init_timer()'ed timer. Signed-off-by: Keir Fraser -Index: xen-4.0.1-testing/xen/drivers/passthrough/io.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/drivers/passthrough/io.c -+++ xen-4.0.1-testing/xen/drivers/passthrough/io.c +--- a/xen/drivers/passthrough/io.c ++++ b/xen/drivers/passthrough/io.c @@ -27,7 +27,7 @@ static void hvm_dirq_assist(unsigned long _d); @@ -20,10 +18,8 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/io.c { return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE)); } -Index: xen-4.0.1-testing/xen/drivers/passthrough/pci.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/drivers/passthrough/pci.c -+++ xen-4.0.1-testing/xen/drivers/passthrough/pci.c +--- a/xen/drivers/passthrough/pci.c ++++ b/xen/drivers/passthrough/pci.c @@ -257,7 +257,9 @@ static void pci_clean_dpci_irqs(struct d i = find_next_bit(hvm_irq_dpci->mapping, d->nr_pirqs, i + 1) ) { @@ -35,11 +31,9 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/pci.c list_for_each_safe ( digl_list, tmp, &hvm_irq_dpci->mirq[i].digl_list ) -Index: xen-4.0.1-testing/xen/include/xen/iommu.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/iommu.h -+++ xen-4.0.1-testing/xen/include/xen/iommu.h -@@ -103,6 +103,7 @@ void hvm_dpci_isairq_eoi(struct domain * +--- a/xen/include/xen/iommu.h ++++ b/xen/include/xen/iommu.h +@@ -92,6 +92,7 @@ void hvm_dpci_isairq_eoi(struct domain * struct hvm_irq_dpci *domain_get_irq_dpci(struct domain *domain); int domain_set_irq_dpci(struct domain *domain, struct hvm_irq_dpci *dpci); void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci); diff --git a/21693-memevent-64bit-only.patch b/21693-memevent-64bit-only.patch new file mode 100644 index 0000000..5aca3aa --- /dev/null +++ b/21693-memevent-64bit-only.patch @@ -0,0 +1,286 @@ +# HG changeset patch +# User Keir Fraser +# Date 1277831801 -3600 +# Node ID 6b5a5bfaf3577a050c6779b0b62245560fda53f6 +# Parent 3ea84fd20b263a8e443e3bb16d5495cd3dbd8033 +x86: Only build memory-event features on 64-bit Xen + +32-bit Xen doesn't have enough p2m types to support them. + +Signed-off-by: Tim Deegan + +# HG changeset patch +# User Keir Fraser +# Date 1278579370 -3600 +# Node ID a7a680442b738928eb963b31e22a3e428ac111a0 +# Parent 92ac9536ac5abc17f414f024f3df92658cf2ee96 +xend: Continue domain building even if memshr extensions are not +present in the hypervisor. + +Signed-off-by: Keir Fraser + +Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +=================================================================== +--- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.0-testing/tools/python/xen/xend/image.py +@@ -830,8 +830,10 @@ class HVMImageHandler(ImageHandler): + self.acpi = int(vmConfig['platform'].get('acpi', 0)) + self.guest_os_type = vmConfig['platform'].get('guest_os_type') + self.memory_sharing = int(vmConfig['memory_sharing']) +- xc.dom_set_memshr(self.vm.getDomid(), self.memory_sharing) +- ++ try: ++ xc.dom_set_memshr(self.vm.getDomid(), self.memory_sharing) ++ except: ++ pass + + # Return a list of cmd line args to the device models based on the + # xm config file +Index: xen-4.0.0-testing/xen/arch/x86/domctl.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/domctl.c ++++ xen-4.0.0-testing/xen/arch/x86/domctl.c +@@ -1420,6 +1420,7 @@ long arch_do_domctl( + break; + #endif /* XEN_GDBSX_CONFIG */ + ++#ifdef __x86_64__ + case XEN_DOMCTL_mem_event_op: + { + struct domain *d; +@@ -1450,6 +1451,7 @@ long arch_do_domctl( + } + } + break; ++#endif /* __x86_64__ */ + + default: + ret = -ENOSYS; +Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c +@@ -922,6 +922,7 @@ bool_t hvm_hap_nested_page_fault(unsigne + return 1; + } + ++#ifdef __x86_64__ + /* Check if the page has been paged out */ + if ( p2m_is_paged(p2mt) || (p2mt == p2m_ram_paging_out) ) + p2m_mem_paging_populate(current->domain, gfn); +@@ -932,6 +933,7 @@ bool_t hvm_hap_nested_page_fault(unsigne + mem_sharing_unshare_page(current->domain, gfn, 0); + return 1; + } ++#endif + + /* Spurious fault? PoD and log-dirty also take this path. */ + if ( p2m_is_ram(p2mt) ) +Index: xen-4.0.0-testing/xen/arch/x86/mm.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.0-testing/xen/arch/x86/mm.c +@@ -3179,20 +3179,23 @@ int do_mmu_update( + rc = -ENOENT; + break; + } ++#ifdef __x86_64__ + /* XXX: Ugly: pull all the checks into a separate function. + * Don't want to do it now, not to interfere with mem_paging + * patches */ + else if ( p2m_ram_shared == l1e_p2mt ) + { + /* Unshare the page for RW foreign mappings */ +- if(l1e_get_flags(l1e) & _PAGE_RW) ++ if ( l1e_get_flags(l1e) & _PAGE_RW ) + { + rc = mem_sharing_unshare_page(pg_owner, + l1e_get_pfn(l1e), + 0); +- if(rc) break; ++ if ( rc ) ++ break; + } + } ++#endif + + okay = mod_l1_entry(va, l1e, mfn, + cmd == MMU_PT_UPDATE_PRESERVE_AD, v, +@@ -4537,8 +4540,10 @@ long arch_memory_op(int op, XEN_GUEST_HA + return rc; + } + ++#ifdef __x86_64__ + case XENMEM_get_sharing_freed_pages: + return mem_sharing_get_nr_saved_mfns(); ++#endif + + default: + return subarch_memory_op(op, arg); +Index: xen-4.0.0-testing/xen/arch/x86/mm/Makefile +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/mm/Makefile ++++ xen-4.0.0-testing/xen/arch/x86/mm/Makefile +@@ -6,9 +6,9 @@ obj-y += p2m.o + obj-y += guest_walk_2.o + obj-y += guest_walk_3.o + obj-$(x86_64) += guest_walk_4.o +-obj-y += mem_event.o +-obj-y += mem_paging.o +-obj-y += mem_sharing.o ++obj-$(x86_64) += mem_event.o ++obj-$(x86_64) += mem_paging.o ++obj-$(x86_64) += mem_sharing.o + + guest_walk_%.o: guest_walk.c Makefile + $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ +Index: xen-4.0.0-testing/xen/arch/x86/mm/p2m.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/mm/p2m.c ++++ xen-4.0.0-testing/xen/arch/x86/mm/p2m.c +@@ -1708,17 +1708,23 @@ void p2m_teardown(struct domain *d) + { + struct page_info *pg; + struct p2m_domain *p2m = d->arch.p2m; ++#ifdef __x86_64__ + unsigned long gfn; + p2m_type_t t; + mfn_t mfn; ++#endif + + p2m_lock(p2m); +- for(gfn=0; gfn < p2m->max_mapped_pfn; gfn++) ++ ++#ifdef __x86_64__ ++ for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) + { + mfn = p2m->get_entry(d, gfn, &t, p2m_query); +- if(mfn_valid(mfn) && (t == p2m_ram_shared)) ++ if ( mfn_valid(mfn) && (t == p2m_ram_shared) ) + BUG_ON(mem_sharing_unshare_page(d, gfn, MEM_SHARING_DESTROY_GFN)); + } ++#endif ++ + d->arch.phys_table = pagetable_null(); + + while ( (pg = page_list_remove_head(&p2m->pages)) ) +@@ -2410,6 +2416,7 @@ clear_mmio_p2m_entry(struct domain *d, u + return rc; + } + ++#ifdef __x86_64__ + int + set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn) + { +@@ -2592,7 +2599,7 @@ void p2m_mem_paging_resume(struct domain + /* Unpause any domains that were paused because the ring was full */ + mem_event_unpause_vcpus(d); + } +- ++#endif /* __x86_64__ */ + + /* + * Local variables: +Index: xen-4.0.0-testing/xen/include/asm-x86/mem_sharing.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/mem_sharing.h ++++ xen-4.0.0-testing/xen/include/asm-x86/mem_sharing.h +@@ -22,6 +22,8 @@ + #ifndef __MEM_SHARING_H__ + #define __MEM_SHARING_H__ + ++#ifdef __x86_64__ ++ + #define sharing_supported(_d) \ + (is_hvm_domain(_d) && (_d)->arch.hvm_domain.hap_enabled) + +@@ -43,4 +45,10 @@ int mem_sharing_domctl(struct domain *d, + xen_domctl_mem_sharing_op_t *mec); + void mem_sharing_init(void); + ++#else ++ ++#define mem_sharing_init() do { } while (0) ++ ++#endif /* __x86_64__ */ ++ + #endif /* __MEM_SHARING_H__ */ +Index: xen-4.0.0-testing/xen/include/asm-x86/p2m.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/p2m.h ++++ xen-4.0.0-testing/xen/include/asm-x86/p2m.h +@@ -77,11 +77,12 @@ typedef enum { + p2m_grant_map_rw = 7, /* Read/write grant mapping */ + p2m_grant_map_ro = 8, /* Read-only grant mapping */ + ++ /* Likewise, although these are defined in all builds, they can only ++ * be used in 64-bit builds */ + p2m_ram_paging_out = 9, /* Memory that is being paged out */ + p2m_ram_paged = 10, /* Memory that has been paged out */ + p2m_ram_paging_in = 11, /* Memory that is being paged in */ + p2m_ram_paging_in_start = 12, /* Memory that is being paged in */ +- + p2m_ram_shared = 13, /* Shared or sharable memory */ + } p2m_type_t; + +@@ -154,6 +155,7 @@ typedef enum { + #define p2m_is_sharable(_t) (p2m_to_mask(_t) & P2M_SHARABLE_TYPES) + #define p2m_is_shared(_t) (p2m_to_mask(_t) & P2M_SHARED_TYPES) + ++ + /* Populate-on-demand */ + #define POPULATE_ON_DEMAND_MFN (1<<9) + #define POD_PAGE_ORDER 9 +@@ -314,20 +316,21 @@ static inline mfn_t gfn_to_mfn_unshare(s + int must_succeed) + { + mfn_t mfn; +- int ret; + + mfn = gfn_to_mfn(d, gfn, p2mt); +- if(p2m_is_shared(*p2mt)) ++#ifdef __x86_64__ ++ if ( p2m_is_shared(*p2mt) ) + { +- ret = mem_sharing_unshare_page(d, gfn, +- must_succeed ? MEM_SHARING_MUST_SUCCEED : 0); +- if(ret < 0) ++ if ( mem_sharing_unshare_page(d, gfn, ++ must_succeed ++ ? MEM_SHARING_MUST_SUCCEED : 0) ) + { + BUG_ON(must_succeed); + return mfn; + } + mfn = gfn_to_mfn(d, gfn, p2mt); + } ++#endif + + return mfn; + } +@@ -429,10 +432,11 @@ p2m_type_t p2m_change_type(struct domain + /* Set mmio addresses in the p2m table (for pass-through) */ + int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); + int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn); +-/* Modify p2m table for shared gfn */ +-int +-set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); + ++ ++#ifdef __x86_64__ ++/* Modify p2m table for shared gfn */ ++int set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); + /* Check if a nominated gfn is valid to be paged out */ + int p2m_mem_paging_nominate(struct domain *d, unsigned long gfn); + /* Evict a frame */ +@@ -443,6 +447,10 @@ void p2m_mem_paging_populate(struct doma + int p2m_mem_paging_prep(struct domain *d, unsigned long gfn); + /* Resume normal operation (in case a domain was paused) */ + void p2m_mem_paging_resume(struct domain *d); ++#else ++static inline void p2m_mem_paging_populate(struct domain *d, unsigned long gfn) ++{ } ++#endif + + #endif /* _XEN_P2M_H */ + diff --git a/21695-trace-t_info-readonly.patch b/21695-trace-t_info-readonly.patch new file mode 100644 index 0000000..71957ce --- /dev/null +++ b/21695-trace-t_info-readonly.patch @@ -0,0 +1,90 @@ +# HG changeset patch +# User Keir Fraser +# Date 1277831922 -3600 +# Node ID c5f3fe17374cead91fdaa94f60cf7b3115eaa091 +# Parent 2a3a5979e3f16d77f5b526050c45acba186482b0 +trace: share t_info pages only in read-only mode + +There's no need to share writably the t_info pages (Dom0 only wants +[and needs] to read it) + +Signed-off-by: Jan Beulich +Acked-by: George Dunlap + +--- a/tools/xenmon/xenbaked.c ++++ b/tools/xenmon/xenbaked.c +@@ -84,7 +84,7 @@ typedef struct settings_st { + } settings_t; + + struct t_struct { +- struct t_info *t_info; /* Structure with information about individual buffers */ ++ const struct t_info *t_info; /* Structure with information about individual buffers */ + struct t_buf **meta; /* Pointers to trace buffer metadata */ + unsigned char **data; /* Pointers to trace buffer data areas */ + }; +@@ -376,9 +376,8 @@ static struct t_struct *map_tbufs(unsign + } + + /* Map t_info metadata structure */ +- tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, +- tinfo_size, PROT_READ | PROT_WRITE, +- tbufs_mfn); ++ tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, tinfo_size, ++ PROT_READ, tbufs_mfn); + + if ( tbufs.t_info == 0 ) + { +@@ -404,7 +403,8 @@ static struct t_struct *map_tbufs(unsign + for(i=0; imfn_offset[i]; ++ const uint32_t *mfn_list = (const uint32_t *)tbufs.t_info ++ + tbufs.t_info->mfn_offset[i]; + int j; + xen_pfn_t pfn_list[tbufs.t_info->tbuf_size]; + +--- a/tools/xentrace/xentrace.c ++++ b/tools/xentrace/xentrace.c +@@ -62,7 +62,7 @@ typedef struct settings_st { + } settings_t; + + struct t_struct { +- struct t_info *t_info; /* Structure with information about individual buffers */ ++ const struct t_info *t_info; /* Structure with information about individual buffers */ + struct t_buf **meta; /* Pointers to trace buffer metadata */ + unsigned char **data; /* Pointers to trace buffer data areas */ + }; +@@ -459,9 +459,8 @@ static struct t_struct *map_tbufs(unsign + int i; + + /* Map t_info metadata structure */ +- tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, +- tinfo_size, PROT_READ | PROT_WRITE, +- tbufs_mfn); ++ tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, tinfo_size, ++ PROT_READ, tbufs_mfn); + + if ( tbufs.t_info == 0 ) + { +@@ -487,7 +486,8 @@ static struct t_struct *map_tbufs(unsign + for(i=0; imfn_offset[i]; ++ const uint32_t *mfn_list = (const uint32_t *)tbufs.t_info ++ + tbufs.t_info->mfn_offset[i]; + int j; + xen_pfn_t pfn_list[tbufs.t_info->tbuf_size]; + +--- a/xen/common/trace.c ++++ b/xen/common/trace.c +@@ -322,7 +322,7 @@ void __init init_trace_bufs(void) + + for(i=0; i +# Date 1277917869 -3600 +# Node ID 81d6471ff1235fde2c30428b920cb6e00ba546d6 +# Parent a9caa0f2d693a1d0d008b4295e49da3ea1d70334 +x86: fix an off-by-one pirq range check + +Signed-off-by: Jan Beulich + +--- a/xen/arch/x86/irq.c ++++ b/xen/arch/x86/irq.c +@@ -1019,7 +1019,7 @@ static void __pirq_guest_eoi(struct doma + + int pirq_guest_eoi(struct domain *d, int irq) + { +- if ( (irq < 0) || (irq > d->nr_pirqs) ) ++ if ( (irq < 0) || (irq >= d->nr_pirqs) ) + return -EINVAL; + + __pirq_guest_eoi(d, irq); diff --git a/21699-p2m-query-for-type-change.patch b/21699-p2m-query-for-type-change.patch new file mode 100644 index 0000000..b3152cf --- /dev/null +++ b/21699-p2m-query-for-type-change.patch @@ -0,0 +1,24 @@ +# HG changeset patch +# User Keir Fraser +# Date 1277917902 -3600 +# Node ID 7cda3ad44c6d4e799e65b2ffe21e609f50cdb94b +# Parent 81d6471ff1235fde2c30428b920cb6e00ba546d6 +Use gfn_to_mfn_query() rather then gfn_to_mfn() when changing P2M types + +Use gfn_to_mfn_query() rather then gfn_to_mfn() when changing +P2M types since we do not really want to force a PoD allocation +as a side effect. + +Signed-off-by: Paul Durrant + +--- a/xen/arch/x86/mm/p2m.c ++++ b/xen/arch/x86/mm/p2m.c +@@ -2351,7 +2351,7 @@ p2m_type_t p2m_change_type(struct domain + + p2m_lock(d->arch.p2m); + +- mfn = gfn_to_mfn(d, gfn, &pt); ++ mfn = gfn_to_mfn_query(d, gfn, &pt); + if ( pt == ot ) + set_p2m_entry(d, gfn, mfn, 0, nt); + diff --git a/21700-32on64-vm86-gpf.patch b/21700-32on64-vm86-gpf.patch new file mode 100644 index 0000000..241c450 --- /dev/null +++ b/21700-32on64-vm86-gpf.patch @@ -0,0 +1,25 @@ +# HG changeset patch +# User Keir Fraser +# Date 1277917963 -3600 +# Node ID fae04060a4f4e364c5012692b97ae1eeec3a326e +# Parent 7cda3ad44c6d4e799e65b2ffe21e609f50cdb94b +Fix #GPF injection into compat guests in vm86 code + +not to let the guest disable interrupts in the real EFLAGS. + +Signed-off-by: Ian Campbell + +--- a/xen/arch/x86/x86_64/compat/traps.c ++++ b/xen/arch/x86/x86_64/compat/traps.c +@@ -127,9 +127,8 @@ unsigned int compat_iret(void) + ti = &v->arch.guest_context.trap_ctxt[13]; + if ( TI_GET_IF(ti) ) + eflags &= ~X86_EFLAGS_IF; +- regs->_eflags = eflags & ~(X86_EFLAGS_VM|X86_EFLAGS_RF| +- X86_EFLAGS_NT|X86_EFLAGS_TF); +- ++ regs->_eflags &= ~(X86_EFLAGS_VM|X86_EFLAGS_RF| ++ X86_EFLAGS_NT|X86_EFLAGS_TF); + if ( unlikely(__put_user(0, (u32 *)regs->rsp)) ) + goto exit_and_crash; + regs->_eip = ti->address; diff --git a/21705-trace-printk.patch b/21705-trace-printk.patch new file mode 100644 index 0000000..515640e --- /dev/null +++ b/21705-trace-printk.patch @@ -0,0 +1,51 @@ +# HG changeset patch +# User Keir Fraser +# Date 1278093217 -3600 +# Node ID 19f4d637a52b8723ac1fbcf666c146951bee8e57 +# Parent 1390e2ab45c7b63d79ba9496d609cf59af4b44ee +trace: adjust printk()s + +They should be lower level or rate limited. + +Signed-off-by: Jan Beulich +Acked-by: George Dunlap + +--- a/xen/common/trace.c ++++ b/xen/common/trace.c +@@ -137,7 +137,7 @@ static int alloc_trace_bufs(void) + } + + t_info->tbuf_size = opt_tbuf_size; +- printk("tbuf_size %d\n", t_info->tbuf_size); ++ printk(XENLOG_INFO "tbuf_size %d\n", t_info->tbuf_size); + + nr_pages = opt_tbuf_size; + order = get_order_from_pages(nr_pages); +@@ -194,7 +194,7 @@ static int alloc_trace_bufs(void) + /* Write list first, then write per-cpu offset. */ + wmb(); + t_info->mfn_offset[cpu]=offset; +- printk("p%d mfn %"PRIx32" offset %d\n", ++ printk(XENLOG_INFO "p%d mfn %"PRIx32" offset %d\n", + cpu, mfn, offset); + offset+=i; + } +@@ -489,12 +489,13 @@ static inline int __insert_record(struct + /* Double-check once more that we have enough space. + * Don't bugcheck here, in case the userland tool is doing + * something stupid. */ +- if ( calc_bytes_avail(buf) < rec_size ) ++ next = calc_bytes_avail(buf); ++ if ( next < rec_size ) + { +- printk("%s: %u bytes left (%u - ((%u - %u) %% %u) recsize %u.\n", +- __func__, +- calc_bytes_avail(buf), +- data_size, buf->prod, buf->cons, data_size, rec_size); ++ if ( printk_ratelimit() ) ++ printk(XENLOG_WARNING ++ "%s: avail=%u (size=%08x prod=%08x cons=%08x) rec=%u\n", ++ __func__, next, data_size, buf->prod, buf->cons, rec_size); + return 0; + } + rmb(); diff --git a/21706-trace-security.patch b/21706-trace-security.patch new file mode 100644 index 0000000..588ed0c --- /dev/null +++ b/21706-trace-security.patch @@ -0,0 +1,396 @@ +# HG changeset patch +# User Keir Fraser +# Date 1278093394 -3600 +# Node ID ae68758f8862bc43ab6bbe4ad3a8594c28b9bc39 +# Parent 19f4d637a52b8723ac1fbcf666c146951bee8e57 +trace: fix security issues + +After getting a report of 3.2.3's xenmon crashing Xen (as it turned +out this was because c/s 17000 was backported to that tree without +also applying c/s 17515), I figured that the hypervisor shouldn't rely +on any specific state of the actual trace buffer (as it is shared +writable with Dom0) + +[GWD: Volatile quantifiers have been taken out and moved to another +patch] + +To make clear what purpose specific variables have and/or where they +got loaded from, the patch also changes the type of some of them to be +explicitly u32/s32, and removes pointless assertions (like checking an +unsigned variable to be >= 0). + +I also took the prototype adjustment of __trace_var() as an +opportunity to simplify the TRACE_xD() macros. Similar simplification +could be done on the (quite numerous) direct callers of the function. + +Signed-off-by: Jan Beulich +Signed-off-by: George Dunlap + +# HG changeset patch +# User Keir Fraser +# Date 1278314658 -3600 +# Node ID 9074d50d09358cd8349d54c7ab2e2ead81fa1570 +# Parent f483b5ce7be235494156fee164decd73e0472cb7 +trace: insert compiler memory barriers + +This is to ensure fields shared writably with Dom0 get read only once +for any consistency checking followed by actual calculations. + +I realized there was another multiple-read issue, a fix for which is +also included (which at once simplifies __insert_record()). + +Signed-off-by: Jan Beulich + +--- a/xen/common/trace.c ++++ b/xen/common/trace.c +@@ -52,12 +52,12 @@ static struct t_info *t_info; + static DEFINE_PER_CPU_READ_MOSTLY(struct t_buf *, t_bufs); + static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, t_data); + static DEFINE_PER_CPU_READ_MOSTLY(spinlock_t, t_lock); +-static int data_size; ++static u32 data_size; + static u32 t_info_first_offset __read_mostly; + + /* High water mark for trace buffers; */ + /* Send virtual interrupt when buffer level reaches this point */ +-static int t_buf_highwater; ++static u32 t_buf_highwater; + + /* Number of records lost due to per-CPU trace buffer being full. */ + static DEFINE_PER_CPU(unsigned long, lost_records); +@@ -162,7 +162,7 @@ static int alloc_trace_bufs(void) + + spin_lock_irqsave(&per_cpu(t_lock, cpu), flags); + +- buf = per_cpu(t_bufs, cpu) = (struct t_buf *)rawbuf; ++ per_cpu(t_bufs, cpu) = buf = (struct t_buf *)rawbuf; + buf->cons = buf->prod = 0; + per_cpu(t_data, cpu) = (unsigned char *)(buf + 1); + +@@ -213,6 +213,7 @@ out_dealloc: + spin_lock_irqsave(&per_cpu(t_lock, cpu), flags); + if ( (rawbuf = (char *)per_cpu(t_bufs, cpu)) ) + { ++ per_cpu(t_bufs, cpu) = NULL; + ASSERT(!(virt_to_page(rawbuf)->count_info & PGC_allocated)); + free_xenheap_pages(rawbuf, order); + } +@@ -418,19 +419,39 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc + return rc; + } + +-static inline int calc_rec_size(int cycles, int extra) ++static inline unsigned int calc_rec_size(bool_t cycles, unsigned int extra) + { +- int rec_size; +- rec_size = 4; ++ unsigned int rec_size = 4; ++ + if ( cycles ) + rec_size += 8; + rec_size += extra; + return rec_size; + } + +-static inline int calc_unconsumed_bytes(struct t_buf *buf) ++static inline bool_t bogus(u32 prod, u32 cons) + { +- int x = buf->prod - buf->cons; ++ if ( unlikely(prod & 3) || unlikely(prod >= 2 * data_size) || ++ unlikely(cons & 3) || unlikely(cons >= 2 * data_size) ) ++ { ++ tb_init_done = 0; ++ printk(XENLOG_WARNING "trc#%u: bogus prod (%08x) and/or cons (%08x)\n", ++ smp_processor_id(), prod, cons); ++ return 1; ++ } ++ return 0; ++} ++ ++static inline u32 calc_unconsumed_bytes(const struct t_buf *buf) ++{ ++ u32 prod = buf->prod, cons = buf->cons; ++ s32 x; ++ ++ barrier(); /* must read buf->prod and buf->cons only once */ ++ if ( bogus(prod, cons) ) ++ return data_size; ++ ++ x = prod - cons; + if ( x < 0 ) + x += 2*data_size; + +@@ -440,9 +461,16 @@ static inline int calc_unconsumed_bytes( + return x; + } + +-static inline int calc_bytes_to_wrap(struct t_buf *buf) ++static inline u32 calc_bytes_to_wrap(const struct t_buf *buf) + { +- int x = data_size - buf->prod; ++ u32 prod = buf->prod, cons = buf->cons; ++ s32 x; ++ ++ barrier(); /* must read buf->prod and buf->cons only once */ ++ if ( bogus(prod, cons) ) ++ return 0; ++ ++ x = data_size - prod; + if ( x <= 0 ) + x += data_size; + +@@ -452,55 +480,60 @@ static inline int calc_bytes_to_wrap(str + return x; + } + +-static inline int calc_bytes_avail(struct t_buf *buf) ++static inline u32 calc_bytes_avail(const struct t_buf *buf) + { + return data_size - calc_unconsumed_bytes(buf); + } + +-static inline struct t_rec * +-next_record(struct t_buf *buf) ++static inline struct t_rec *next_record(const struct t_buf *buf, ++ uint32_t *next) + { +- int x = buf->prod; ++ u32 x = buf->prod, cons = buf->cons; ++ ++ barrier(); /* must read buf->prod and buf->cons only once */ ++ *next = x; ++ if ( !tb_init_done || bogus(x, cons) ) ++ return NULL; ++ + if ( x >= data_size ) + x -= data_size; + +- ASSERT(x >= 0); + ASSERT(x < data_size); + + return (struct t_rec *)&this_cpu(t_data)[x]; + } + +-static inline int __insert_record(struct t_buf *buf, +- unsigned long event, +- int extra, +- int cycles, +- int rec_size, +- unsigned char *extra_data) ++static inline void __insert_record(struct t_buf *buf, ++ unsigned long event, ++ unsigned int extra, ++ bool_t cycles, ++ unsigned int rec_size, ++ const void *extra_data) + { + struct t_rec *rec; + unsigned char *dst; +- unsigned long extra_word = extra/sizeof(u32); +- int local_rec_size = calc_rec_size(cycles, extra); ++ unsigned int extra_word = extra / sizeof(u32); ++ unsigned int local_rec_size = calc_rec_size(cycles, extra); + uint32_t next; + + BUG_ON(local_rec_size != rec_size); + BUG_ON(extra & 3); + ++ rec = next_record(buf, &next); ++ if ( !rec ) ++ return; + /* Double-check once more that we have enough space. + * Don't bugcheck here, in case the userland tool is doing + * something stupid. */ +- next = calc_bytes_avail(buf); +- if ( next < rec_size ) ++ if ( (unsigned char *)rec + rec_size > this_cpu(t_data) + data_size ) + { + if ( printk_ratelimit() ) + printk(XENLOG_WARNING +- "%s: avail=%u (size=%08x prod=%08x cons=%08x) rec=%u\n", +- __func__, next, data_size, buf->prod, buf->cons, rec_size); +- return 0; ++ "%s: size=%08x prod=%08x cons=%08x rec=%u\n", ++ __func__, data_size, next, buf->cons, rec_size); ++ return; + } +- rmb(); + +- rec = next_record(buf); + rec->event = event; + rec->extra_u32 = extra_word; + dst = (unsigned char *)rec->u.nocycles.extra_u32; +@@ -517,21 +550,19 @@ static inline int __insert_record(struct + + wmb(); + +- next = buf->prod + rec_size; ++ next += rec_size; + if ( next >= 2*data_size ) + next -= 2*data_size; +- ASSERT(next >= 0); + ASSERT(next < 2*data_size); + buf->prod = next; +- +- return rec_size; + } + +-static inline int insert_wrap_record(struct t_buf *buf, int size) ++static inline void insert_wrap_record(struct t_buf *buf, ++ unsigned int size) + { +- int space_left = calc_bytes_to_wrap(buf); +- unsigned long extra_space = space_left - sizeof(u32); +- int cycles = 0; ++ u32 space_left = calc_bytes_to_wrap(buf); ++ unsigned int extra_space = space_left - sizeof(u32); ++ bool_t cycles = 0; + + BUG_ON(space_left > size); + +@@ -543,17 +574,13 @@ static inline int insert_wrap_record(str + ASSERT((extra_space/sizeof(u32)) <= TRACE_EXTRA_MAX); + } + +- return __insert_record(buf, +- TRC_TRACE_WRAP_BUFFER, +- extra_space, +- cycles, +- space_left, +- NULL); ++ __insert_record(buf, TRC_TRACE_WRAP_BUFFER, extra_space, cycles, ++ space_left, NULL); + } + + #define LOST_REC_SIZE (4 + 8 + 16) /* header + tsc + sizeof(struct ed) */ + +-static inline int insert_lost_records(struct t_buf *buf) ++static inline void insert_lost_records(struct t_buf *buf) + { + struct { + u32 lost_records; +@@ -568,12 +595,8 @@ static inline int insert_lost_records(st + + this_cpu(lost_records) = 0; + +- return __insert_record(buf, +- TRC_LOST_RECORDS, +- sizeof(ed), +- 1 /* cycles */, +- LOST_REC_SIZE, +- (unsigned char *)&ed); ++ __insert_record(buf, TRC_LOST_RECORDS, sizeof(ed), 1 /* cycles */, ++ LOST_REC_SIZE, &ed); + } + + /* +@@ -595,13 +618,15 @@ static DECLARE_TASKLET(trace_notify_dom0 + * failure, otherwise 0. Failure occurs only if the trace buffers are not yet + * initialised. + */ +-void __trace_var(u32 event, int cycles, int extra, unsigned char *extra_data) ++void __trace_var(u32 event, bool_t cycles, unsigned int extra, ++ const void *extra_data) + { + struct t_buf *buf; +- unsigned long flags, bytes_to_tail, bytes_to_wrap; +- int rec_size, total_size; +- int extra_word; +- int started_below_highwater = 0; ++ unsigned long flags; ++ u32 bytes_to_tail, bytes_to_wrap; ++ unsigned int rec_size, total_size; ++ unsigned int extra_word; ++ bool_t started_below_highwater; + + if( !tb_init_done ) + return; +@@ -640,7 +665,11 @@ void __trace_var(u32 event, int cycles, + buf = this_cpu(t_bufs); + + if ( unlikely(!buf) ) ++ { ++ /* Make gcc happy */ ++ started_below_highwater = 0; + goto unlock; ++ } + + started_below_highwater = (calc_unconsumed_bytes(buf) < t_buf_highwater); + +@@ -721,8 +750,9 @@ unlock: + spin_unlock_irqrestore(&this_cpu(t_lock), flags); + + /* Notify trace buffer consumer that we've crossed the high water mark. */ +- if ( started_below_highwater && +- (calc_unconsumed_bytes(buf) >= t_buf_highwater) ) ++ if ( likely(buf!=NULL) ++ && started_below_highwater ++ && (calc_unconsumed_bytes(buf) >= t_buf_highwater) ) + tasklet_schedule(&trace_notify_dom0_tasklet); + } + +--- a/xen/include/xen/trace.h ++++ b/xen/include/xen/trace.h +@@ -36,7 +36,7 @@ int tb_control(struct xen_sysctl_tbuf_op + + int trace_will_trace_event(u32 event); + +-void __trace_var(u32 event, int cycles, int extra, unsigned char *extra_data); ++void __trace_var(u32 event, bool_t cycles, unsigned int extra, const void *); + + static inline void trace_var(u32 event, int cycles, int extra, + unsigned char *extra_data) +@@ -57,7 +57,7 @@ static inline void trace_var(u32 event, + { \ + u32 _d[1]; \ + _d[0] = d1; \ +- __trace_var(_e, 1, sizeof(*_d), (unsigned char *)_d); \ ++ __trace_var(_e, 1, sizeof(_d), _d); \ + } \ + } while ( 0 ) + +@@ -68,7 +68,7 @@ static inline void trace_var(u32 event, + u32 _d[2]; \ + _d[0] = d1; \ + _d[1] = d2; \ +- __trace_var(_e, 1, sizeof(*_d)*2, (unsigned char *)_d); \ ++ __trace_var(_e, 1, sizeof(_d), _d); \ + } \ + } while ( 0 ) + +@@ -80,7 +80,7 @@ static inline void trace_var(u32 event, + _d[0] = d1; \ + _d[1] = d2; \ + _d[2] = d3; \ +- __trace_var(_e, 1, sizeof(*_d)*3, (unsigned char *)_d); \ ++ __trace_var(_e, 1, sizeof(_d), _d); \ + } \ + } while ( 0 ) + +@@ -93,7 +93,7 @@ static inline void trace_var(u32 event, + _d[1] = d2; \ + _d[2] = d3; \ + _d[3] = d4; \ +- __trace_var(_e, 1, sizeof(*_d)*4, (unsigned char *)_d); \ ++ __trace_var(_e, 1, sizeof(_d), _d); \ + } \ + } while ( 0 ) + +@@ -107,7 +107,7 @@ static inline void trace_var(u32 event, + _d[2] = d3; \ + _d[3] = d4; \ + _d[4] = d5; \ +- __trace_var(_e, 1, sizeof(*_d)*5, (unsigned char *)_d); \ ++ __trace_var(_e, 1, sizeof(_d), _d); \ + } \ + } while ( 0 ) + +@@ -122,7 +122,7 @@ static inline void trace_var(u32 event, + _d[3] = d4; \ + _d[4] = d5; \ + _d[5] = d6; \ +- __trace_var(_e, 1, sizeof(*_d)*6, (unsigned char *)_d); \ ++ __trace_var(_e, 1, sizeof(_d), _d); \ + } \ + } while ( 0 ) + diff --git a/21712-amd-osvw.patch b/21712-amd-osvw.patch new file mode 100644 index 0000000..096424b --- /dev/null +++ b/21712-amd-osvw.patch @@ -0,0 +1,400 @@ +# HG changeset patch +# User Keir Fraser +# Date 1278093897 -3600 +# Node ID f483b5ce7be235494156fee164decd73e0472cb7 +# Parent 4d091e6e04918ba3ef19cc45ae2fffaee4f18afe +AMD OSVW (OS Visible Workaround) for Xen + +This path enables AMD OSVW (OS Visible Workaround) feature for +Xen. New AMD errata will have a OSVW id assigned in the future. OS is +supposed to check OSVW status MSR to find out whether CPU has a +specific erratum. Legacy errata are also supported in this patch: +traditional family/model/stepping approach will be used if OSVW +feature isn't applicable. This patch is adapted from Hans Rosenfeld's +patch submitted to Linux kernel. + +Signed-off-by: Wei Huang +Signed-off-by: Hans Rosenfeld +Acked-by: Jan Beulich + +Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/cpu/amd.c ++++ xen-4.0.0-testing/xen/arch/x86/cpu/amd.c +@@ -7,11 +7,11 @@ + #include + #include + #include ++#include + #include + #include /* amd_init_cpu */ + + #include "cpu.h" +-#include "amd.h" + + void start_svm(struct cpuinfo_x86 *c); + +@@ -157,6 +157,54 @@ static void __devinit set_cpuidmask(stru + } + + /* ++ * Check for the presence of an AMD erratum. Arguments are defined in amd.h ++ * for each known erratum. Return 1 if erratum is found. ++ */ ++int cpu_has_amd_erratum(const struct cpuinfo_x86 *cpu, int osvw, ...) ++{ ++ va_list ap; ++ u32 range; ++ u32 ms; ++ ++ if (cpu->x86_vendor != X86_VENDOR_AMD) ++ return 0; ++ ++ va_start(ap, osvw); ++ ++ if (osvw) { ++ u16 osvw_id = va_arg(ap, int); ++ ++ if (cpu_has(cpu, X86_FEATURE_OSVW)) { ++ u64 osvw_len; ++ rdmsrl(MSR_AMD_OSVW_ID_LENGTH, osvw_len); ++ ++ if (osvw_id < osvw_len) { ++ u64 osvw_bits; ++ rdmsrl(MSR_AMD_OSVW_STATUS + (osvw_id >> 6), ++ osvw_bits); ++ ++ va_end(ap); ++ return (osvw_bits >> (osvw_id & 0x3f)) & 0x01; ++ } ++ } ++ } ++ ++ /* OSVW unavailable or ID unknown, match family-model-stepping range */ ++ ms = (cpu->x86_model << 8) | cpu->x86_mask; ++ while ((range = va_arg(ap, int))) { ++ if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) && ++ (ms >= AMD_MODEL_RANGE_START(range)) && ++ (ms <= AMD_MODEL_RANGE_END(range))) { ++ va_end(ap); ++ return 1; ++ } ++ } ++ ++ va_end(ap); ++ return 0; ++} ++ ++/* + * amd_flush_filter={on,off}. Forcibly Enable or disable the TLB flush + * filter on AMD 64-bit processors. + */ +Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/cpu/amd.h ++++ /dev/null +@@ -1,103 +0,0 @@ +-/* +- * amd.h - AMD processor specific definitions +- */ +- +-#ifndef __AMD_H__ +-#define __AMD_H__ +- +-#include +- +-/* CPUID masked for use by AMD-V Extended Migration */ +- +-#define X86_FEATURE_BITPOS(_feature_) ((_feature_) % 32) +-#define __bit(_x_) (1U << X86_FEATURE_BITPOS(_x_)) +- +-/* Family 0Fh, Revision C */ +-#define AMD_FEATURES_K8_REV_C_ECX 0 +-#define AMD_FEATURES_K8_REV_C_EDX ( \ +- __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ +- __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ +- __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ +- __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ +- __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ +- __bit(X86_FEATURE_SEP) | __bit(X86_FEATURE_MTRR) | \ +- __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ +- __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ +- __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_CLFLSH)| \ +- __bit(X86_FEATURE_MMX) | __bit(X86_FEATURE_FXSR) | \ +- __bit(X86_FEATURE_XMM) | __bit(X86_FEATURE_XMM2)) +-#define AMD_EXTFEATURES_K8_REV_C_ECX 0 +-#define AMD_EXTFEATURES_K8_REV_C_EDX ( \ +- __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ +- __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ +- __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ +- __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ +- __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ +- __bit(X86_FEATURE_SYSCALL) | __bit(X86_FEATURE_MTRR) | \ +- __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ +- __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ +- __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_NX) | \ +- __bit(X86_FEATURE_MMXEXT) | __bit(X86_FEATURE_MMX) | \ +- __bit(X86_FEATURE_FXSR) | __bit(X86_FEATURE_LM) | \ +- __bit(X86_FEATURE_3DNOWEXT) | __bit(X86_FEATURE_3DNOW)) +- +-/* Family 0Fh, Revision D */ +-#define AMD_FEATURES_K8_REV_D_ECX AMD_FEATURES_K8_REV_C_ECX +-#define AMD_FEATURES_K8_REV_D_EDX AMD_FEATURES_K8_REV_C_EDX +-#define AMD_EXTFEATURES_K8_REV_D_ECX (AMD_EXTFEATURES_K8_REV_C_ECX |\ +- __bit(X86_FEATURE_LAHF_LM)) +-#define AMD_EXTFEATURES_K8_REV_D_EDX (AMD_EXTFEATURES_K8_REV_C_EDX |\ +- __bit(X86_FEATURE_FFXSR)) +- +-/* Family 0Fh, Revision E */ +-#define AMD_FEATURES_K8_REV_E_ECX (AMD_FEATURES_K8_REV_D_ECX | \ +- __bit(X86_FEATURE_XMM3)) +-#define AMD_FEATURES_K8_REV_E_EDX (AMD_FEATURES_K8_REV_D_EDX | \ +- __bit(X86_FEATURE_HT)) +-#define AMD_EXTFEATURES_K8_REV_E_ECX (AMD_EXTFEATURES_K8_REV_D_ECX |\ +- __bit(X86_FEATURE_CMP_LEGACY)) +-#define AMD_EXTFEATURES_K8_REV_E_EDX AMD_EXTFEATURES_K8_REV_D_EDX +- +-/* Family 0Fh, Revision F */ +-#define AMD_FEATURES_K8_REV_F_ECX (AMD_FEATURES_K8_REV_E_ECX | \ +- __bit(X86_FEATURE_CX16)) +-#define AMD_FEATURES_K8_REV_F_EDX AMD_FEATURES_K8_REV_E_EDX +-#define AMD_EXTFEATURES_K8_REV_F_ECX (AMD_EXTFEATURES_K8_REV_E_ECX |\ +- __bit(X86_FEATURE_SVME) | __bit(X86_FEATURE_EXTAPICSPACE) | \ +- __bit(X86_FEATURE_ALTMOVCR)) +-#define AMD_EXTFEATURES_K8_REV_F_EDX (AMD_EXTFEATURES_K8_REV_E_EDX |\ +- __bit(X86_FEATURE_RDTSCP)) +- +-/* Family 0Fh, Revision G */ +-#define AMD_FEATURES_K8_REV_G_ECX AMD_FEATURES_K8_REV_F_ECX +-#define AMD_FEATURES_K8_REV_G_EDX AMD_FEATURES_K8_REV_F_EDX +-#define AMD_EXTFEATURES_K8_REV_G_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ +- __bit(X86_FEATURE_3DNOWPF)) +-#define AMD_EXTFEATURES_K8_REV_G_EDX AMD_EXTFEATURES_K8_REV_F_EDX +- +-/* Family 10h, Revision B */ +-#define AMD_FEATURES_FAM10h_REV_B_ECX (AMD_FEATURES_K8_REV_F_ECX | \ +- __bit(X86_FEATURE_POPCNT) | __bit(X86_FEATURE_MWAIT)) +-#define AMD_FEATURES_FAM10h_REV_B_EDX AMD_FEATURES_K8_REV_F_EDX +-#define AMD_EXTFEATURES_FAM10h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ +- __bit(X86_FEATURE_ABM) | __bit(X86_FEATURE_SSE4A) | \ +- __bit(X86_FEATURE_MISALIGNSSE) | __bit(X86_FEATURE_OSVW) | \ +- __bit(X86_FEATURE_IBS)) +-#define AMD_EXTFEATURES_FAM10h_REV_B_EDX (AMD_EXTFEATURES_K8_REV_F_EDX |\ +- __bit(X86_FEATURE_PAGE1GB)) +- +-/* Family 10h, Revision C */ +-#define AMD_FEATURES_FAM10h_REV_C_ECX AMD_FEATURES_FAM10h_REV_B_ECX +-#define AMD_FEATURES_FAM10h_REV_C_EDX AMD_FEATURES_FAM10h_REV_B_EDX +-#define AMD_EXTFEATURES_FAM10h_REV_C_ECX (AMD_EXTFEATURES_FAM10h_REV_B_ECX |\ +- __bit(X86_FEATURE_SKINIT) | __bit(X86_FEATURE_WDT)) +-#define AMD_EXTFEATURES_FAM10h_REV_C_EDX AMD_EXTFEATURES_FAM10h_REV_B_EDX +- +-/* Family 11h, Revision B */ +-#define AMD_FEATURES_FAM11h_REV_B_ECX AMD_FEATURES_K8_REV_G_ECX +-#define AMD_FEATURES_FAM11h_REV_B_EDX AMD_FEATURES_K8_REV_G_EDX +-#define AMD_EXTFEATURES_FAM11h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_G_ECX |\ +- __bit(X86_FEATURE_SKINIT)) +-#define AMD_EXTFEATURES_FAM11h_REV_B_EDX AMD_EXTFEATURES_K8_REV_G_EDX +- +-#endif /* __AMD_H__ */ +Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/asid.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/asid.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/asid.c +@@ -21,14 +21,14 @@ + #include + #include + #include ++#include + + void svm_asid_init(struct cpuinfo_x86 *c) + { + int nasids = 0; + + /* Check for erratum #170, and leave ASIDs disabled if it's present. */ +- if ( (c->x86 == 0x10) || +- ((c->x86 == 0xf) && (c->x86_model >= 0x68) && (c->x86_mask >= 1)) ) ++ if ( !cpu_has_amd_erratum(c, AMD_ERRATUM_170) ) + nasids = cpuid_ebx(0x8000000A); + + hvm_asid_init(nasids); +Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/svm.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -828,8 +829,8 @@ static void svm_init_erratum_383(struct + { + uint64_t msr_content; + +- /* only family 10h is affected */ +- if ( c->x86 != 0x10 ) ++ /* check whether CPU is affected */ ++ if ( !cpu_has_amd_erratum(c, AMD_ERRATUM_383) ) + return; + + rdmsrl(MSR_AMD64_DC_CFG, msr_content); +Index: xen-4.0.0-testing/xen/include/asm-x86/amd.h +=================================================================== +--- /dev/null ++++ xen-4.0.0-testing/xen/include/asm-x86/amd.h +@@ -0,0 +1,137 @@ ++/* ++ * amd.h - AMD processor specific definitions ++ */ ++ ++#ifndef __AMD_H__ ++#define __AMD_H__ ++ ++#include ++ ++/* CPUID masked for use by AMD-V Extended Migration */ ++ ++#define X86_FEATURE_BITPOS(_feature_) ((_feature_) % 32) ++#define __bit(_x_) (1U << X86_FEATURE_BITPOS(_x_)) ++ ++/* Family 0Fh, Revision C */ ++#define AMD_FEATURES_K8_REV_C_ECX 0 ++#define AMD_FEATURES_K8_REV_C_EDX ( \ ++ __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ ++ __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ ++ __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ ++ __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ ++ __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ ++ __bit(X86_FEATURE_SEP) | __bit(X86_FEATURE_MTRR) | \ ++ __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ ++ __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ ++ __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_CLFLSH)| \ ++ __bit(X86_FEATURE_MMX) | __bit(X86_FEATURE_FXSR) | \ ++ __bit(X86_FEATURE_XMM) | __bit(X86_FEATURE_XMM2)) ++#define AMD_EXTFEATURES_K8_REV_C_ECX 0 ++#define AMD_EXTFEATURES_K8_REV_C_EDX ( \ ++ __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ ++ __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ ++ __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ ++ __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ ++ __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ ++ __bit(X86_FEATURE_SYSCALL) | __bit(X86_FEATURE_MTRR) | \ ++ __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ ++ __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ ++ __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_NX) | \ ++ __bit(X86_FEATURE_MMXEXT) | __bit(X86_FEATURE_MMX) | \ ++ __bit(X86_FEATURE_FXSR) | __bit(X86_FEATURE_LM) | \ ++ __bit(X86_FEATURE_3DNOWEXT) | __bit(X86_FEATURE_3DNOW)) ++ ++/* Family 0Fh, Revision D */ ++#define AMD_FEATURES_K8_REV_D_ECX AMD_FEATURES_K8_REV_C_ECX ++#define AMD_FEATURES_K8_REV_D_EDX AMD_FEATURES_K8_REV_C_EDX ++#define AMD_EXTFEATURES_K8_REV_D_ECX (AMD_EXTFEATURES_K8_REV_C_ECX |\ ++ __bit(X86_FEATURE_LAHF_LM)) ++#define AMD_EXTFEATURES_K8_REV_D_EDX (AMD_EXTFEATURES_K8_REV_C_EDX |\ ++ __bit(X86_FEATURE_FFXSR)) ++ ++/* Family 0Fh, Revision E */ ++#define AMD_FEATURES_K8_REV_E_ECX (AMD_FEATURES_K8_REV_D_ECX | \ ++ __bit(X86_FEATURE_XMM3)) ++#define AMD_FEATURES_K8_REV_E_EDX (AMD_FEATURES_K8_REV_D_EDX | \ ++ __bit(X86_FEATURE_HT)) ++#define AMD_EXTFEATURES_K8_REV_E_ECX (AMD_EXTFEATURES_K8_REV_D_ECX |\ ++ __bit(X86_FEATURE_CMP_LEGACY)) ++#define AMD_EXTFEATURES_K8_REV_E_EDX AMD_EXTFEATURES_K8_REV_D_EDX ++ ++/* Family 0Fh, Revision F */ ++#define AMD_FEATURES_K8_REV_F_ECX (AMD_FEATURES_K8_REV_E_ECX | \ ++ __bit(X86_FEATURE_CX16)) ++#define AMD_FEATURES_K8_REV_F_EDX AMD_FEATURES_K8_REV_E_EDX ++#define AMD_EXTFEATURES_K8_REV_F_ECX (AMD_EXTFEATURES_K8_REV_E_ECX |\ ++ __bit(X86_FEATURE_SVME) | __bit(X86_FEATURE_EXTAPICSPACE) | \ ++ __bit(X86_FEATURE_ALTMOVCR)) ++#define AMD_EXTFEATURES_K8_REV_F_EDX (AMD_EXTFEATURES_K8_REV_E_EDX |\ ++ __bit(X86_FEATURE_RDTSCP)) ++ ++/* Family 0Fh, Revision G */ ++#define AMD_FEATURES_K8_REV_G_ECX AMD_FEATURES_K8_REV_F_ECX ++#define AMD_FEATURES_K8_REV_G_EDX AMD_FEATURES_K8_REV_F_EDX ++#define AMD_EXTFEATURES_K8_REV_G_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ ++ __bit(X86_FEATURE_3DNOWPF)) ++#define AMD_EXTFEATURES_K8_REV_G_EDX AMD_EXTFEATURES_K8_REV_F_EDX ++ ++/* Family 10h, Revision B */ ++#define AMD_FEATURES_FAM10h_REV_B_ECX (AMD_FEATURES_K8_REV_F_ECX | \ ++ __bit(X86_FEATURE_POPCNT) | __bit(X86_FEATURE_MWAIT)) ++#define AMD_FEATURES_FAM10h_REV_B_EDX AMD_FEATURES_K8_REV_F_EDX ++#define AMD_EXTFEATURES_FAM10h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ ++ __bit(X86_FEATURE_ABM) | __bit(X86_FEATURE_SSE4A) | \ ++ __bit(X86_FEATURE_MISALIGNSSE) | __bit(X86_FEATURE_OSVW) | \ ++ __bit(X86_FEATURE_IBS)) ++#define AMD_EXTFEATURES_FAM10h_REV_B_EDX (AMD_EXTFEATURES_K8_REV_F_EDX |\ ++ __bit(X86_FEATURE_PAGE1GB)) ++ ++/* Family 10h, Revision C */ ++#define AMD_FEATURES_FAM10h_REV_C_ECX AMD_FEATURES_FAM10h_REV_B_ECX ++#define AMD_FEATURES_FAM10h_REV_C_EDX AMD_FEATURES_FAM10h_REV_B_EDX ++#define AMD_EXTFEATURES_FAM10h_REV_C_ECX (AMD_EXTFEATURES_FAM10h_REV_B_ECX |\ ++ __bit(X86_FEATURE_SKINIT) | __bit(X86_FEATURE_WDT)) ++#define AMD_EXTFEATURES_FAM10h_REV_C_EDX AMD_EXTFEATURES_FAM10h_REV_B_EDX ++ ++/* Family 11h, Revision B */ ++#define AMD_FEATURES_FAM11h_REV_B_ECX AMD_FEATURES_K8_REV_G_ECX ++#define AMD_FEATURES_FAM11h_REV_B_EDX AMD_FEATURES_K8_REV_G_EDX ++#define AMD_EXTFEATURES_FAM11h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_G_ECX |\ ++ __bit(X86_FEATURE_SKINIT)) ++#define AMD_EXTFEATURES_FAM11h_REV_B_EDX AMD_EXTFEATURES_K8_REV_G_EDX ++ ++/* AMD errata checking ++ * ++ * Errata are defined using the AMD_LEGACY_ERRATUM() or AMD_OSVW_ERRATUM() ++ * macros. The latter is intended for newer errata that have an OSVW id ++ * assigned, which it takes as first argument. Both take a variable number ++ * of family-specific model-stepping ranges created by AMD_MODEL_RANGE(). ++ * ++ * Example 1: ++ * #define AMD_ERRATUM_319 \ ++ * AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0x4, 0x2), \ ++ * AMD_MODEL_RANGE(0x10, 0x8, 0x0, 0x8, 0x0), \ ++ * AMD_MODEL_RANGE(0x10, 0x9, 0x0, 0x9, 0x0)) ++ * Example 2: ++ * #define AMD_ERRATUM_400 \ ++ * AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf), \ ++ * AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf)) ++ */ ++ ++#define AMD_LEGACY_ERRATUM(...) 0 /* legacy */, __VA_ARGS__, 0 ++#define AMD_OSVW_ERRATUM(osvw_id, ...) 1 /* osvw */, osvw_id, __VA_ARGS__, 0 ++#define AMD_MODEL_RANGE(f, m_start, s_start, m_end, s_end) \ ++ ((f << 24) | (m_start << 16) | (s_start << 12) | (m_end << 4) | (s_end)) ++#define AMD_MODEL_RANGE_FAMILY(range) (((range) >> 24) & 0xff) ++#define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff) ++#define AMD_MODEL_RANGE_END(range) ((range) & 0xfff) ++ ++#define AMD_ERRATUM_170 \ ++ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf)) ++ ++#define AMD_ERRATUM_383 \ ++ AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf), \ ++ AMD_MODEL_RANGE(0x12, 0x0, 0x0, 0x1, 0x0)) ++ ++int cpu_has_amd_erratum(const struct cpuinfo_x86 *, int, ...); ++#endif /* __AMD_H__ */ +Index: xen-4.0.0-testing/xen/include/asm-x86/msr-index.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-x86/msr-index.h ++++ xen-4.0.0-testing/xen/include/asm-x86/msr-index.h +@@ -251,6 +251,10 @@ + #define MSR_AMD_PATCHLEVEL 0x0000008b + #define MSR_AMD_PATCHLOADER 0xc0010020 + ++/* AMD OS Visible Workaround MSRs */ ++#define MSR_AMD_OSVW_ID_LENGTH 0xc0010140 ++#define MSR_AMD_OSVW_STATUS 0xc0010141 ++ + /* K6 MSRs */ + #define MSR_K6_EFER 0xc0000080 + #define MSR_K6_STAR 0xc0000081 diff --git a/21723-get-domu-state.patch b/21723-get-domu-state.patch index df79dac..922e954 100644 --- a/21723-get-domu-state.patch +++ b/21723-get-domu-state.patch @@ -16,10 +16,10 @@ VM" or " API" Signed-off-by James (Song Wei) -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py @@ -250,6 +250,18 @@ class XendDomain: @return: path to config file. """ @@ -39,10 +39,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py def _managed_check_point_path(self, domuuid): """Returns absolute path to check point file for managed domain. -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -327,6 +327,8 @@ class XendDomainInfo: @type info: dictionary @ivar domid: Domain ID (if VM has started) @@ -60,10 +60,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py maxmem = self.info.get('memory_static_max', 0) memory = self.info.get('memory_dynamic_max', 0) -Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py @@ -225,6 +225,20 @@ class SrvDomain(SrvDir): self.acceptCommand(req) return self.xd.domain_reset(self.dom.getName()) @@ -85,10 +85,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py def op_usb_add(self, op, req): self.acceptCommand(req) return req.threadRequest(self.do_usb_add, op, req) -Index: xen-4.0.1-testing/tools/python/xen/xm/main.py +Index: xen-4.0.0-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.1-testing/tools/python/xen/xm/main.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.0-testing/tools/python/xen/xm/main.py @@ -165,6 +165,8 @@ SUBCOMMAND_HELP = { #usb 'usb-add' : (' <[host:bus.addr] [host:vendor_id:product_id]>','Add the usb device to FV VM.'), @@ -144,7 +144,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py def xm_dump_core(args): live = False -@@ -1517,6 +1524,32 @@ def xm_usb_add(args): +@@ -1515,6 +1522,32 @@ def xm_usb_add(args): arg_check(args, "usb-add", 2) server.xend.domain.usb_add(args[0],args[1]) @@ -177,7 +177,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py def xm_usb_del(args): arg_check(args, "usb-del", 2) server.xend.domain.usb_del(args[0],args[1]) -@@ -3542,6 +3575,8 @@ commands = { +@@ -3538,6 +3571,8 @@ commands = { #usb "usb-add": xm_usb_add, "usb-del": xm_usb_del, diff --git a/21744-x86-cpufreq-range-check.patch b/21744-x86-cpufreq-range-check.patch new file mode 100644 index 0000000..5d5a65f --- /dev/null +++ b/21744-x86-cpufreq-range-check.patch @@ -0,0 +1,27 @@ +# HG changeset patch +# User Keir Fraser +# Date 1278578686 -3600 +# Node ID df63728e1680ce7827bd58f6bda453f70ed41ad9 +# Parent a0f0ae5be814f19590d5a59d91ab7183cd1a325f +x86/cpufreq: check array index before use + +... rather than after. + +Signed-off-by: Jan Beulich + +--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c ++++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c +@@ -210,9 +210,11 @@ + + if (!cpu_isset(cpu, mask)) + cpu = first_cpu(mask); ++ if (cpu >= NR_CPUS) ++ return 0; ++ + policy = cpufreq_cpu_policy[cpu]; +- +- if (cpu >= NR_CPUS || !policy || !drv_data[policy->cpu]) ++ if (!policy || !drv_data[policy->cpu]) + return 0; + + switch (drv_data[policy->cpu]->cpu_feature) { diff --git a/21847-pscsi.patch b/21847-pscsi.patch index 3ee6164..f7d9df6 100644 --- a/21847-pscsi.patch +++ b/21847-pscsi.patch @@ -37,10 +37,10 @@ Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com Comment from Masaki Kanno : "Well done" Committed-by: Ian Jackson -Index: xen-4.0.1-testing/tools/examples/xend-config.sxp +Index: xen-4.0.0-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.1-testing/tools/examples/xend-config.sxp +--- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.0-testing/tools/examples/xend-config.sxp @@ -277,3 +277,11 @@ # we have to realize this may incur security issue and we can't make sure the # device assignment could really work properly even after we do this. @@ -50,13 +50,13 @@ Index: xen-4.0.1-testing/tools/examples/xend-config.sxp +# because xend scans all the device paths to build its internal PSCSI device +# list. If we need only a few devices for assigning to a guest, we can reduce +# the scan to this device. Set list list of device paths in same syntax like in -+# command lsscsi, e.g. ('16:0:0:0' '15:0') ++# command lsscsi, e.g. ('16:0:0:0' '15:0') +# (pscsi-device-mask ('*')) + -Index: xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py +Index: xen-4.0.0-testing/tools/python/xen/util/vscsi_util.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/util/vscsi_util.py -+++ xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py +--- xen-4.0.0-testing.orig/tools/python/xen/util/vscsi_util.py ++++ xen-4.0.0-testing/tools/python/xen/util/vscsi_util.py @@ -148,11 +148,12 @@ def _vscsi_get_scsidevices_by_sysfs(): return devices @@ -85,10 +85,10 @@ Index: xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py scsi_record = _make_scsi_record(scsi_info) scsi_records.append(scsi_record) return scsi_records -Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py @@ -323,7 +323,12 @@ class XendNode: pscsi_table = {} pscsi_HBA_table = {} @@ -103,10 +103,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py scsi_id = pscsi_record['scsi_id'] if scsi_id: saved_HBA_uuid = None -Index: xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendOptions.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendOptions.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py @@ -164,6 +164,9 @@ class XendOptions: """ print >>sys.stderr, "xend [ERROR]", fmt % args diff --git a/21866-xenapi.patch b/21866-xenapi.patch index 984d8e4..d9a5377 100644 --- a/21866-xenapi.patch +++ b/21866-xenapi.patch @@ -18,10 +18,10 @@ Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com Acked-by: Jim Fehlig Committed-by: Ian Jackson -Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py @@ -1667,7 +1667,8 @@ class XendAPI(object): def VM_set_actions_after_crash(self, session, vm_ref, action): if action not in XEN_API_ON_CRASH_BEHAVIOUR: @@ -32,10 +32,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py def VM_set_HVM_boot_policy(self, session, vm_ref, value): if value != "" and value != "BIOS order": -Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPIConstants.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py @@ -63,6 +63,18 @@ XEN_API_ON_CRASH_BEHAVIOUR_FILTER = { 'rename_restart' : 'rename_restart', } @@ -55,10 +55,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py XEN_API_VBD_MODE = ['RO', 'RW'] XEN_API_VDI_TYPE = ['system', 'user', 'ephemeral'] XEN_API_VBD_TYPE = ['CD', 'Disk'] -Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py @@ -41,6 +41,7 @@ from xen.util.pci import pci_opts_list_f from xen.xend.XendSXPDev import dev_dict_to_sxp from xen.util import xsconstants diff --git a/21894-intel-unmask-cpuid.patch b/21894-intel-unmask-cpuid.patch deleted file mode 100644 index a6b7507..0000000 --- a/21894-intel-unmask-cpuid.patch +++ /dev/null @@ -1,48 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1280486194 -3600 -# Node ID c9e7850ec9a18d7085c7468407e175bb64513846 -# Parent 754877be695ba3050f140002dbd185a27a437fcc -x86: unmask CPUID levels on Intel CPUs -References: bnc#640773 - -If the CPUID limit bit in MSR_IA32_MISC_ENABLE is set, clear it to -make all CPUID information available. This is required for some -features to work, such as MWAIT in cpuidle, get cpu topology, XSAVE, -etc. - -Signed-off-by: Wei Gang - ---- a/xen/arch/x86/cpu/intel.c -+++ b/xen/arch/x86/cpu/intel.c -@@ -90,6 +90,20 @@ void __devinit early_intel_workaround(st - /* Netburst reports 64 bytes clflush size, but does IO in 128 bytes */ - if (c->x86 == 15 && c->x86_cache_alignment == 64) - c->x86_cache_alignment = 128; -+ -+ /* Unmask CPUID levels if masked: */ -+ if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { -+ u64 misc_enable; -+ -+ rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); -+ -+ if (misc_enable & MSR_IA32_MISC_ENABLE_LIMIT_CPUID) { -+ misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID; -+ wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable); -+ c->cpuid_level = cpuid_eax(0); -+ printk("revised cpuid_level = %d\n", c->cpuid_level); -+ } -+ } - } - - /* ---- a/xen/include/asm-x86/msr-index.h -+++ b/xen/include/asm-x86/msr-index.h -@@ -324,6 +324,7 @@ - #define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1<<11) - #define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1<<12) - #define MSR_IA32_MISC_ENABLE_MONITOR_ENABLE (1<<18) -+#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID (1<<22) - #define MSR_IA32_MISC_ENABLE_XTPR_DISABLE (1<<23) - - /* Intel Model 6 */ diff --git a/22019-x86-cpuidle-online-check.patch b/22019-x86-cpuidle-online-check.patch deleted file mode 100644 index 153900d..0000000 --- a/22019-x86-cpuidle-online-check.patch +++ /dev/null @@ -1,30 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1282069957 -3600 -# Node ID 5218db847b58a151d8f320b7141efc984f759b35 -# Parent 542e8cd16a6cf036e89b597ba6343245fcaafa25 -x86 cpuidle: check whether cpu is online in cpu idle control - -We observed a 2.6.18.8 dom0 kernel crash when Xen has maxcpus < num -of physical cores (maxcpus=3D4 for a 12-core system). It appeared that -hypervisor doesn't check whether CPU is online or not. This small -patch fixed the issue. - -Signed-off-by: Uwe Dannowski -Acked-by: Wei Huang - ---- a/xen/arch/x86/acpi/cpuidle_menu.c -+++ b/xen/arch/x86/acpi/cpuidle_menu.c -@@ -270,9 +270,10 @@ static void menu_reflect(struct acpi_pro - - static int menu_enable_device(struct acpi_processor_power *power) - { -- struct menu_device *data = &per_cpu(menu_devices, power->cpu); -+ if (!cpu_online(power->cpu)) -+ return -1; - -- memset(data, 0, sizeof(struct menu_device)); -+ memset(&per_cpu(menu_devices, power->cpu), 0, sizeof(struct menu_device)); - - return 0; - } diff --git a/22051-x86-forced-EOI.patch b/22051-x86-forced-EOI.patch deleted file mode 100644 index 3bd96a5..0000000 --- a/22051-x86-forced-EOI.patch +++ /dev/null @@ -1,203 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1282466228 -3600 -# Node ID 59ff5820534f4c5ec006d1ddca0f4356634c3b22 -# Parent f77261710856aad506dda92cfa3b92b923be4e15 -x86: Automatically EOI guest-bound interrupts if guest takes too long. - -Signed-off-by: Keir Fraser - -Includes the x86 IRQ specific parts of c/s 21508: - -# HG changeset patch -# User Keir Fraser -# Date 1275480791 -3600 -# Node ID 5aabc6f94df5f275647d55caa24780eff0c81355 -# Parent a3bdee5a20daf590ae7a440dad4e3b104b99c620 -timers: Track inactive timers and migrate them on cpu offline. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -46,8 +46,6 @@ static DECLARE_BITMAP(used_vectors, NR_V - - struct irq_cfg __read_mostly *irq_cfg = NULL; - --static struct timer *__read_mostly irq_guest_eoi_timer; -- - static DEFINE_SPINLOCK(vector_lock); - - DEFINE_PER_CPU(vector_irq_t, vector_irq) = { -@@ -274,18 +272,15 @@ int init_irq_data(void) - irq_desc = xmalloc_array(struct irq_desc, nr_irqs); - irq_cfg = xmalloc_array(struct irq_cfg, nr_irqs); - irq_status = xmalloc_array(int, nr_irqs); -- irq_guest_eoi_timer = xmalloc_array(struct timer, nr_irqs); - irq_vector = xmalloc_array(u8, nr_irqs_gsi); - -- if (!irq_desc || !irq_cfg || !irq_status ||! irq_vector || -- !irq_guest_eoi_timer) -+ if ( !irq_desc || !irq_cfg || !irq_status ||! irq_vector ) - return -ENOMEM; - - memset(irq_desc, 0, nr_irqs * sizeof(*irq_desc)); - memset(irq_cfg, 0, nr_irqs * sizeof(*irq_cfg)); - memset(irq_status, 0, nr_irqs * sizeof(*irq_status)); - memset(irq_vector, 0, nr_irqs_gsi * sizeof(*irq_vector)); -- memset(irq_guest_eoi_timer, 0, nr_irqs * sizeof(*irq_guest_eoi_timer)); - - for (irq = 0; irq < nr_irqs; irq++) { - desc = irq_to_desc(irq); -@@ -740,6 +735,7 @@ typedef struct { - #define ACKTYPE_UNMASK 1 /* Unmask PIC hardware (from any CPU) */ - #define ACKTYPE_EOI 2 /* EOI on the CPU that was interrupted */ - cpumask_t cpu_eoi_map; /* CPUs that need to EOI this interrupt */ -+ struct timer eoi_timer; - struct domain *guest[IRQ_MAX_GUESTS]; - } irq_guest_action_t; - -@@ -784,13 +780,55 @@ static void _irq_guest_eoi(struct irq_de - desc->handler->enable(irq); - } - -+static void set_eoi_ready(void *data); -+ - static void irq_guest_eoi_timer_fn(void *data) - { - struct irq_desc *desc = data; -+ unsigned int irq = desc - irq_desc; -+ irq_guest_action_t *action; -+ cpumask_t cpu_eoi_map; - unsigned long flags; - - spin_lock_irqsave(&desc->lock, flags); -- _irq_guest_eoi(desc); -+ -+ if ( !(desc->status & IRQ_GUEST) ) -+ goto out; -+ -+ action = (irq_guest_action_t *)desc->action; -+ -+ if ( action->ack_type != ACKTYPE_NONE ) -+ { -+ unsigned int i; -+ for ( i = 0; i < action->nr_guests; i++ ) -+ { -+ struct domain *d = action->guest[i]; -+ unsigned int pirq = domain_irq_to_pirq(d, irq); -+ if ( test_and_clear_bit(pirq, d->pirq_mask) ) -+ action->in_flight--; -+ } -+ } -+ -+ if ( action->in_flight != 0 ) -+ goto out; -+ -+ switch ( action->ack_type ) -+ { -+ case ACKTYPE_UNMASK: -+ desc->handler->end(irq); -+ break; -+ case ACKTYPE_EOI: -+ cpu_eoi_map = action->cpu_eoi_map; -+ spin_unlock_irq(&desc->lock); -+ on_selected_cpus(&cpu_eoi_map, set_eoi_ready, desc, 0); -+ spin_lock_irq(&desc->lock); -+ break; -+ case ACKTYPE_NONE: -+ _irq_guest_eoi(desc); -+ break; -+ } -+ -+ out: - spin_unlock_irqrestore(&desc->lock, flags); - } - -@@ -847,9 +885,11 @@ static void __do_IRQ_guest(int irq) - } - } - -- if ( already_pending == action->nr_guests ) -+ stop_timer(&action->eoi_timer); -+ -+ if ( (action->ack_type == ACKTYPE_NONE) && -+ (already_pending == action->nr_guests) ) - { -- stop_timer(&irq_guest_eoi_timer[irq]); - desc->handler->disable(irq); - desc->status |= IRQ_GUEST_EOI_PENDING; - for ( i = 0; i < already_pending; ++i ) -@@ -865,10 +905,10 @@ static void __do_IRQ_guest(int irq) - * - skip the timer setup below. - */ - } -- init_timer(&irq_guest_eoi_timer[irq], -- irq_guest_eoi_timer_fn, desc, smp_processor_id()); -- set_timer(&irq_guest_eoi_timer[irq], NOW() + MILLISECS(1)); - } -+ -+ migrate_timer(&action->eoi_timer, smp_processor_id()); -+ set_timer(&action->eoi_timer, NOW() + MILLISECS(1)); - } - - /* -@@ -978,7 +1018,7 @@ static void __pirq_guest_eoi(struct doma - if ( action->ack_type == ACKTYPE_NONE ) - { - ASSERT(!test_bit(pirq, d->pirq_mask)); -- stop_timer(&irq_guest_eoi_timer[irq]); -+ stop_timer(&action->eoi_timer); - _irq_guest_eoi(desc); - } - -@@ -1162,6 +1202,7 @@ int pirq_guest_bind(struct vcpu *v, int - action->shareable = will_share; - action->ack_type = pirq_acktype(v->domain, pirq); - cpus_clear(action->cpu_eoi_map); -+ init_timer(&action->eoi_timer, irq_guest_eoi_timer_fn, desc, 0); - - desc->depth = 0; - desc->status |= IRQ_GUEST; -@@ -1266,7 +1307,7 @@ static irq_guest_action_t *__pirq_guest_ - } - break; - case ACKTYPE_NONE: -- stop_timer(&irq_guest_eoi_timer[irq]); -+ stop_timer(&action->eoi_timer); - _irq_guest_eoi(desc); - break; - } -@@ -1306,9 +1347,7 @@ static irq_guest_action_t *__pirq_guest_ - BUG_ON(!cpus_empty(action->cpu_eoi_map)); - - desc->action = NULL; -- desc->status &= ~IRQ_GUEST; -- desc->status &= ~IRQ_INPROGRESS; -- kill_timer(&irq_guest_eoi_timer[irq]); -+ desc->status &= ~(IRQ_GUEST|IRQ_GUEST_EOI_PENDING|IRQ_INPROGRESS); - desc->handler->shutdown(irq); - - /* Caller frees the old guest descriptor block. */ -@@ -1342,7 +1381,10 @@ void pirq_guest_unbind(struct domain *d, - spin_unlock_irq(&desc->lock); - - if ( oldaction != NULL ) -+ { -+ kill_timer(&oldaction->eoi_timer); - xfree(oldaction); -+ } - } - - static int pirq_guest_force_unbind(struct domain *d, int irq) -@@ -1380,7 +1422,10 @@ static int pirq_guest_force_unbind(struc - spin_unlock_irq(&desc->lock); - - if ( oldaction != NULL ) -+ { -+ kill_timer(&oldaction->eoi_timer); - xfree(oldaction); -+ } - - return bound; - } diff --git a/22067-x86-irq-domain.patch b/22067-x86-irq-domain.patch deleted file mode 100644 index 62f548d..0000000 --- a/22067-x86-irq-domain.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1282817774 -3600 -# Node ID 3eb5127e46365242401e37df292fbe290fa0a974 -# Parent eccfdeb41b803d07bcb4f7fa912a8341fdb19162 -Fix bind_irq_vector() destination - -The "mask" covered all online cpus in the "domain". It should be used -as destination later, instead of using "domain" directly. - -Signed-off-by: Sheng Yang - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -88,14 +88,14 @@ static int __bind_irq_vector(int irq, in - cpus_and(mask, domain, cpu_online_map); - if (cpus_empty(mask)) - return -EINVAL; -- if ((cfg->vector == vector) && cpus_equal(cfg->domain, domain)) -+ if ((cfg->vector == vector) && cpus_equal(cfg->domain, mask)) - return 0; - if (cfg->vector != IRQ_VECTOR_UNASSIGNED) - return -EBUSY; - for_each_cpu_mask(cpu, mask) - per_cpu(vector_irq, cpu)[vector] = irq; - cfg->vector = vector; -- cfg->domain = domain; -+ cfg->domain = mask; - irq_status[irq] = IRQ_USED; - if (IO_APIC_IRQ(irq)) - irq_vector[irq] = vector; diff --git a/22068-vtd-irte-RH-bit.patch b/22068-vtd-irte-RH-bit.patch deleted file mode 100644 index c95a972..0000000 --- a/22068-vtd-irte-RH-bit.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1282817816 -3600 -# Node ID 3c4c3d48a8350994f4450314c6b759771c7ad4ef -# Parent 3eb5127e46365242401e37df292fbe290fa0a974 -VT-d: Hardware require RH bit to be set in IRTE when delivery mode is LPR - -Signed-off-by: Sheng Yang - ---- a/xen/drivers/passthrough/vtd/intremap.c -+++ b/xen/drivers/passthrough/vtd/intremap.c -@@ -318,9 +318,10 @@ static int ioapic_rte_to_remap_entry(str - *(((u32 *)&new_rte) + 0) = value; - new_ire.lo.fpd = 0; - new_ire.lo.dm = new_rte.dest_mode; -- new_ire.lo.rh = 0; - new_ire.lo.tm = new_rte.trigger; - new_ire.lo.dlm = new_rte.delivery_mode; -+ /* Hardware require RH = 1 for LPR delivery mode */ -+ new_ire.lo.rh = (new_ire.lo.dlm == dest_LowestPrio); - new_ire.lo.avail = 0; - new_ire.lo.res_1 = 0; - new_ire.lo.vector = new_rte.vector; -@@ -630,9 +631,10 @@ static int msi_msg_to_remap_entry( - /* Set interrupt remapping table entry */ - new_ire.lo.fpd = 0; - new_ire.lo.dm = (msg->address_lo >> MSI_ADDR_DESTMODE_SHIFT) & 0x1; -- new_ire.lo.rh = 0; - new_ire.lo.tm = (msg->data >> MSI_DATA_TRIGGER_SHIFT) & 0x1; - new_ire.lo.dlm = (msg->data >> MSI_DATA_DELIVERY_MODE_SHIFT) & 0x1; -+ /* Hardware require RH = 1 for LPR delivery mode */ -+ new_ire.lo.rh = (new_ire.lo.dlm == dest_LowestPrio); - new_ire.lo.avail = 0; - new_ire.lo.res_1 = 0; - new_ire.lo.vector = (msg->data >> MSI_DATA_VECTOR_SHIFT) & diff --git a/22071-ept-get-entry-lock.patch b/22071-ept-get-entry-lock.patch deleted file mode 100644 index fc621a7..0000000 --- a/22071-ept-get-entry-lock.patch +++ /dev/null @@ -1,45 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1283153992 -3600 -# Node ID c5aed2e049bce2724b035dd6aa09c4c4e609c27c -# Parent 20920c12bc4815b1f755786c0924393809664807 -ept: Put locks around ept_get_entry - -There's a subtle race in ept_get_entry, such that if tries to read an -entry that ept_set_entry is modifying, it gets neither the old entry -nor the new entry, but empty. In the case of multi-cpu -populate-on-demand guests, this manifests as a guest crash when one -vcpu tries to read a page which another page is trying to populate, -and ept_get_entry returns p2m_mmio_dm. - -This bug can also be fixed by making both ept_set_entry and -ept_next_level access-once (i.e., ept_next_level reads full ept_entry -and then works with local value; ept_set_entry construct the entry -locally and then sets it in one write). But there doesn't seem to be -any major performance implications of just making ept_get_entry use -locks; so the simpler, the better. - -Signed-off-by: George Dunlap - ---- a/xen/arch/x86/mm/hap/p2m-ept.c -+++ b/xen/arch/x86/mm/hap/p2m-ept.c -@@ -387,6 +387,10 @@ static mfn_t ept_get_entry(struct domain - int i; - int ret = 0; - mfn_t mfn = _mfn(INVALID_MFN); -+ int do_locking = !p2m_locked_by_me(d->arch.p2m); -+ -+ if ( do_locking ) -+ p2m_lock(d->arch.p2m); - - *t = p2m_mmio_dm; - -@@ -464,6 +468,8 @@ static mfn_t ept_get_entry(struct domain - } - - out: -+ if ( do_locking ) -+ p2m_unlock(d->arch.p2m); - unmap_domain_page(table); - return mfn; - } diff --git a/22084-x86-xsave-off.patch b/22084-x86-xsave-off.patch deleted file mode 100644 index e3e476b..0000000 --- a/22084-x86-xsave-off.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1283332754 -3600 -# Node ID ae0cd4e5cc0149ceb5d3dd61a003aadc008f036e -# Parent 972d90ff31349816cc8c785a8b2defb2f70ed441 -x86 intel: Disable XSAVE support. - -It breaks HVM save/restore. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/cpu/intel.c -+++ b/xen/arch/x86/cpu/intel.c -@@ -20,7 +20,7 @@ - - extern int trap_init_f00f_bug(void); - --static int use_xsave = 1; -+static int use_xsave; - boolean_param("xsave", use_xsave); - - #ifdef CONFIG_X86_INTEL_USERCOPY diff --git a/22135-heap-lock.patch b/22135-heap-lock.patch deleted file mode 100644 index bdc8a66..0000000 --- a/22135-heap-lock.patch +++ /dev/null @@ -1,51 +0,0 @@ -References: bnc#638465 - -# HG changeset patch -# User Keir Fraser -# Date 1284394111 -3600 -# Node ID 69e8bb164683c76e0cd787df21b98c73905a61e6 -# Parent e300bfa3c0323ac08e7b8cd9fb40f9f1ab548543 -page_alloc: Hold heap_lock while adjusting page states to/from PGC_state_free. - -This avoids races with buddy-merging logic in free_heap_pages(). - -Signed-off-by: Keir Fraser - ---- a/xen/common/page_alloc.c -+++ b/xen/common/page_alloc.c -@@ -378,8 +378,6 @@ static struct page_info *alloc_heap_page - total_avail_pages -= request; - ASSERT(total_avail_pages >= 0); - -- spin_unlock(&heap_lock); -- - cpus_clear(mask); - - for ( i = 0; i < (1 << order); i++ ) -@@ -401,6 +399,8 @@ static struct page_info *alloc_heap_page - page_set_owner(&pg[i], NULL); - } - -+ spin_unlock(&heap_lock); -+ - if ( unlikely(!cpus_empty(mask)) ) - { - perfc_incr(need_flush_tlb_flush); -@@ -496,6 +496,8 @@ static void free_heap_pages( - ASSERT(order <= MAX_ORDER); - ASSERT(node >= 0); - -+ spin_lock(&heap_lock); -+ - for ( i = 0; i < (1 << order); i++ ) - { - /* -@@ -523,8 +525,6 @@ static void free_heap_pages( - pg[i].tlbflush_timestamp = tlbflush_current_time(); - } - -- spin_lock(&heap_lock); -- - avail[node][zone] += 1 << order; - total_avail_pages += 1 << order; - diff --git a/22148-serial-irq-dest.patch b/22148-serial-irq-dest.patch deleted file mode 100644 index 3c7736b..0000000 --- a/22148-serial-irq-dest.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1284395845 -3600 -# Node ID a254d1236c1a52264beb0253352ef64d65a98eb3 -# Parent f0a1229cb0a6505f3240ac59a3bb6ade2acfa1a2 -Fix serial interrupt's destination - -Lowest Priority can't use with invalid cpu_mask, and the default value -of CPU_MASK_ALL may cover CPU which wasn't online. - -From: "Yang, Sheng" -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/smpboot.c -+++ b/xen/arch/x86/smpboot.c -@@ -1602,7 +1602,7 @@ void __init smp_intr_init(void) - irq_vector[irq] = FIRST_HIPRIORITY_VECTOR + seridx + 1; - per_cpu(vector_irq, cpu)[FIRST_HIPRIORITY_VECTOR + seridx + 1] = irq; - irq_cfg[irq].vector = FIRST_HIPRIORITY_VECTOR + seridx + 1; -- irq_cfg[irq].domain = (cpumask_t)CPU_MASK_ALL; -+ irq_cfg[irq].domain = cpu_online_map; - } - - /* IPI for cleanuping vectors after irq move */ diff --git a/32on64-extra-mem.patch b/32on64-extra-mem.patch index 6249b76..c82dfe3 100644 --- a/32on64-extra-mem.patch +++ b/32on64-extra-mem.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2920,7 +2920,7 @@ class XendDomainInfo: +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -2917,7 +2917,7 @@ class XendDomainInfo: self.guest_bitsize = self.image.getBitSize() # Make sure there's enough RAM available for the domain diff --git a/7410-qemu-alt-gr.patch b/7410-qemu-alt-gr.patch deleted file mode 100644 index e41ba7a..0000000 --- a/7410-qemu-alt-gr.patch +++ /dev/null @@ -1,118 +0,0 @@ -# HG changeset patch -# User Ian Jackson -# Date 1284481903 -3600 -# Node ID f71a4c18e34e86e1011662fa42c10ec54bff0688 -# Parent 080b5a094d4e0acab6646125f91f988911409016 -ioemu: fix VNC altgr-insert behavior - -When access to a Xen DomU (Linux) from a VNC client in Windows, alt-gr -key is not working properly with Spanish keyboard. When Alt + another -key pressed, vncserver receives Altgr down, Altgr up and key down -messages in order, that causes incorrect output. - -With following patch, when vncerver receives key down message, it -first check if the keysym needs altgr modifer, if it needs altgr -modifier but altgr is not 'down', sending altgr keycode before sending -key keycode. - -Signed-off-by: Chunyan Liu - -committer: Ian Jackson -git-commit-id: f95d202ed6444dacb15fbea4dee185eb0e048d9a - -diff -r 080b5a094d4e -r f71a4c18e34e keymaps.c ---- a/tools/ioemu-qemu-xen/keymaps.c Wed Sep 08 16:38:09 2010 +0100 -+++ b//tools/ioemu-qemu-xen/keymaps.c Tue Sep 14 17:31:43 2010 +0100 -@@ -51,6 +51,7 @@ - struct key_range *numlock_range; - struct key_range *shift_range; - struct key_range *localstate_range; -+ struct key_range *altgr_range; - } kbd_layout_t; - - static void add_to_key_range(struct key_range **krp, int code) { -@@ -133,7 +134,11 @@ - add_to_key_range(&k->localstate_range, keycode); - //fprintf(stderr, "localstate keysym %04x keycode %d\n", keysym, keycode); - } -- -+ if (rest && strstr(rest, "altgr")) { -+ add_to_key_range(&k->altgr_range, keysym); -+ //fprintf(stderr, "altgr keysym %04x keycode %d\n", keysym, keycode); -+ } -+ - /* if(keycode&0x80) - keycode=(keycode<<8)^0x80e0; */ - if (keysym < MAX_NORMAL_KEYCODE) { -@@ -233,3 +238,16 @@ - return 0; - return 1; - } -+ -+static inline int keysym_is_altgr(void *kbd_layout, int keysym) -+{ -+ kbd_layout_t *k = kbd_layout; -+ struct key_range *kr; -+ -+ for (kr = k->altgr_range; kr; kr = kr->next) -+ if (keysym >= kr->start && keysym <= kr->end){ -+ return 1; -+ } -+ return 0; -+} -+ -diff -r 080b5a094d4e -r f71a4c18e34e vnc.c ---- a/tools/ioemu-qemu-xen/vnc.c Wed Sep 08 16:38:09 2010 +0100 -+++ b/tools/ioemu-qemu-xen/vnc.c Tue Sep 14 17:31:43 2010 +0100 -@@ -1274,12 +1274,27 @@ - } - } - -+static void press_key_altgr_down(VncState *vs, int down) -+{ -+ kbd_put_keycode(0xe0); -+ if (down){ -+ kbd_put_keycode(0xb8 & 0x7f); -+ vs->modifiers_state[0xb8] = 1; -+ } -+ else { -+ kbd_put_keycode(0xb8 | 0x80); -+ vs->modifiers_state[0xb8] = 0; -+ } -+} -+ - static void do_key_event(VncState *vs, int down, uint32_t sym) - { - int keycode; - int shift_keys = 0; - int shift = 0; - int keypad = 0; -+ int altgr = 0; -+ int altgr_keys = 0; - - if (is_graphic_console()) { - if (sym >= 'A' && sym <= 'Z') { -@@ -1289,8 +1304,11 @@ - else { - shift = keysym_is_shift(vs->kbd_layout, sym & 0xFFFF); - } -+ -+ altgr = keysym_is_altgr(vs->kbd_layout, sym & 0xFFFF); - } - shift_keys = vs->modifiers_state[0x2a] | vs->modifiers_state[0x36]; -+ altgr_keys = vs->modifiers_state[0xb8]; - - keycode = keysym2scancode(vs->kbd_layout, sym & 0xFFFF); - if (keycode == 0) { -@@ -1357,6 +1375,11 @@ - } - - if (is_graphic_console()) { -+ -+ if (altgr && !altgr_keys) { -+ press_key_altgr_down(vs, down); -+ } -+ - /* If the shift state needs to change then simulate an additional - keypress before sending this one. Ignore for non shiftable keys. - */ diff --git a/README.SuSE b/README.SuSE index f161bbc..c8bd432 100644 --- a/README.SuSE +++ b/README.SuSE @@ -464,6 +464,9 @@ The hypervisor and domain 0 kernel are a matched set, and usually must be upgraded together. Consult the online documentation for a matrix of supported 32- and 64-bit combinations +A 64-bit paravirtualized VM will not run on 32-bit host but a 32-bit +paravirtualized VM will run on a 64-bit host. + On certain machines with 2GB or less of RAM, domain 0 Linux may fail to boot, printing the following messages: PCI-DMA: Using software bounce buffering for IO (SWIOTLB) @@ -495,8 +498,8 @@ file (viewable with the "xm dmesg" command). If problems persist, check if a newer version is available. Well-tested versions will be shipped with SUSE and via YaST Online Update. More frequent -(but less supported) updates are available on Novell's Forge site: - http://forge.novell.com/modules/xfmod/project/?xenpreview +(but less supported) updates are available on the Xen Technical Preview site: + ftp://ftp.novell.com/forge/XenTechnicalPreview/ Known Issues diff --git a/bdrv_open2_fix_flags.patch b/bdrv_open2_fix_flags.patch index 0ab9c3d..3a79db2 100644 --- a/bdrv_open2_fix_flags.patch +++ b/bdrv_open2_fix_flags.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c +Index: xen-4.0.0-testing/tools/ioemu-remote/block.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/block.c ++++ xen-4.0.0-testing/tools/ioemu-remote/block.c @@ -350,7 +350,7 @@ int bdrv_file_open(BlockDriverState **pb int bdrv_open(BlockDriverState *bs, const char *filename, int flags) @@ -18,7 +18,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c - /* Note: for compatibility, we open disk image files as RDWR, and - RDONLY as fallback */ if (!(flags & BDRV_O_FILE)) -- open_flags = (flags & BDRV_O_ACCESS) | (flags & BDRV_O_CACHE_MASK); +- open_flags = BDRV_O_RDWR | (flags & BDRV_O_CACHE_MASK); + open_flags = flags; else open_flags = flags & ~(BDRV_O_FILE | BDRV_O_SNAPSHOT); @@ -28,10 +28,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c ret = drv->bdrv_open(bs, filename, open_flags); if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) { ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR); -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/usb-msd.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/usb-msd.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c @@ -551,7 +551,7 @@ USBDevice *usb_msd_init(const char *file s = qemu_mallocz(sizeof(MSDState)); @@ -41,10 +41,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c goto fail; s->bs = bdrv; *pbs = bdrv; -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c +Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-img.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-img.c ++++ xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c @@ -32,7 +32,7 @@ #endif @@ -54,7 +54,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c static void QEMU_NORETURN error(const char *fmt, ...) { -@@ -185,7 +185,7 @@ static int read_password(char *buf, int +@@ -185,7 +185,7 @@ static int read_password(char *buf, int #endif static BlockDriverState *bdrv_new_open(const char *filename, @@ -118,7 +118,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c error("Could not open '%s'", filename); } bdrv_get_format(bs, fmt_name, sizeof(fmt_name)); -@@ -810,7 +811,7 @@ static void img_snapshot(int argc, char +@@ -810,7 +811,7 @@ static void img_snapshot(int argc, char if (!bs) error("Not enough memory"); diff --git a/bdrv_open2_flags_2.patch b/bdrv_open2_flags_2.patch index 1fc9e2f..2213d1a 100644 --- a/bdrv_open2_flags_2.patch +++ b/bdrv_open2_flags_2.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c @@ -227,6 +227,7 @@ static int open_disk(struct td_state *s, BlockDriver* drv; char* devname; @@ -19,10 +19,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c fprintf(stderr, "Could not open image file %s\n", path); return -ENOMEM; } -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c ++++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c @@ -136,7 +136,8 @@ static void insert_media(void *opaque) else format = &bdrv_raw; @@ -33,7 +33,19 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c #ifdef CONFIG_STUBDOM { char *buf, *backend, *params_path, *params; -@@ -469,7 +470,8 @@ void xenstore_parse_domain_config(int hv +@@ -400,9 +401,9 @@ void xenstore_parse_domain_config(int hv + { + char **e_danger = NULL; + char *buf = NULL; +- char *fpath = NULL, *bpath = NULL, *btype = NULL, ++ char *fpath = NULL, *bpath = NULL, *btype = NULL, *mode = NULL, + *dev = NULL, *params = NULL, *drv = NULL; +- int i, j, ret, is_tap; ++ int i, j, ret, is_tap, flags; + unsigned int len, num, hd_index, pci_devid = 0; + BlockDriverState *bs; + BlockDriver *format; +@@ -464,7 +465,8 @@ void xenstore_parse_domain_config(int hv } for (i = 0; i < num; i++) { @@ -43,7 +55,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c /* read the backend path */ xenstore_get_backend_path(&bpath, "vbd", danger_path, hvm_domid, e_danger[i]); if (bpath == NULL) -@@ -555,6 +557,17 @@ void xenstore_parse_domain_config(int hv +@@ -550,6 +552,17 @@ void xenstore_parse_domain_config(int hv format = &bdrv_raw; } @@ -61,7 +73,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c #if 0 /* Phantom VBDs are disabled because the use of paths * from guest-controlled areas in xenstore is unsafe. -@@ -622,7 +635,7 @@ void xenstore_parse_domain_config(int hv +@@ -617,7 +630,7 @@ void xenstore_parse_domain_config(int hv #ifdef CONFIG_STUBDOM if (pasprintf(&danger_buf, "%s/device/vbd/%s", danger_path, e_danger[i]) == -1) continue; @@ -70,10 +82,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c pstrcpy(bs->filename, sizeof(bs->filename), params); } #else -@@ -668,7 +681,7 @@ void xenstore_parse_domain_config(int hv - - fprintf(stderr, "Using file %s in read-%s mode\n", bs->filename, is_readonly ? "only" : "write"); - +@@ -646,7 +659,7 @@ void xenstore_parse_domain_config(int hv + } + } + pstrcpy(bs->filename, sizeof(bs->filename), params); - if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { + if (bdrv_open2(bs, params, flags|BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0"); diff --git a/blktap-pv-cdrom.patch b/blktap-pv-cdrom.patch index 2fec572..64736af 100644 --- a/blktap-pv-cdrom.patch +++ b/blktap-pv-cdrom.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c +Index: xen-4.0.0-testing/tools/blktap/drivers/block-cdrom.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c ++++ xen-4.0.0-testing/tools/blktap/drivers/block-cdrom.c @@ -0,0 +1,535 @@ +/* block-cdrom.c + * @@ -538,10 +538,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c + .td_get_parent_id = tdcdrom_get_parent_id, + .td_validate_parent = tdcdrom_validate_parent +}; -Index: xen-4.0.1-testing/xen/include/public/io/cdromif.h +Index: xen-4.0.0-testing/xen/include/public/io/cdromif.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/include/public/io/cdromif.h ++++ xen-4.0.0-testing/xen/include/public/io/cdromif.h @@ -0,0 +1,122 @@ +/****************************************************************************** + * cdromif.h @@ -665,10 +665,10 @@ Index: xen-4.0.1-testing/xen/include/public/io/cdromif.h + sizeof(struct vcd_generic_command) - sizeof(struct request_sense)) + +#endif -Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile +Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap/drivers/Makefile -+++ xen-4.0.1-testing/tools/blktap/drivers/Makefile +--- xen-4.0.0-testing.orig/tools/blktap/drivers/Makefile ++++ xen-4.0.0-testing/tools/blktap/drivers/Makefile @@ -28,8 +28,9 @@ CFLAGS += -DMEMSHR MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a endif @@ -676,7 +676,7 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile -LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread -LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz +LDFLAGS_xen := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) -+LDFLAGS_blktapctrl := $(LDFLAGS_xen) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread $(LDFLAGS_xen) ++LDFLAGS_blktapctrl := $(LDFLAGS_xen) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread +LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz $(LDFLAGS_xen) BLK-OBJS-y := block-aio.o @@ -689,10 +689,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile BLK-OBJS-y += aes.o BLK-OBJS-y += tapaio.o BLK-OBJS-$(CONFIG_Linux) += blk_linux.o -Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h +Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.h -+++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h +--- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.h ++++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h @@ -137,6 +137,9 @@ struct tap_disk { int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id); int (*td_validate_parent)(struct disk_driver *dd, @@ -737,10 +737,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h }; typedef struct driver_list_entry { -Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h +Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap/lib/blktaplib.h -+++ xen-4.0.1-testing/tools/blktap/lib/blktaplib.h +--- xen-4.0.0-testing.orig/tools/blktap/lib/blktaplib.h ++++ xen-4.0.0-testing/tools/blktap/lib/blktaplib.h @@ -220,6 +220,7 @@ typedef struct msg_pid { #define DISK_TYPE_RAM 3 #define DISK_TYPE_QCOW 4 @@ -749,10 +749,10 @@ Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h /* xenstore/xenbus: */ #define DOMNAME "Domain-0" -Index: xen-4.0.1-testing/xen/include/public/io/blkif.h +Index: xen-4.0.0-testing/xen/include/public/io/blkif.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/public/io/blkif.h -+++ xen-4.0.1-testing/xen/include/public/io/blkif.h +--- xen-4.0.0-testing.orig/xen/include/public/io/blkif.h ++++ xen-4.0.0-testing/xen/include/public/io/blkif.h @@ -76,6 +76,10 @@ * "feature-flush-cache" node! */ @@ -764,10 +764,10 @@ Index: xen-4.0.1-testing/xen/include/public/io/blkif.h /* * Maximum scatter/gather segments per request. -Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c +Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.c =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.c -+++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c +--- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.c ++++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.c @@ -735,6 +735,22 @@ static void get_io_request(struct td_sta goto out; } @@ -791,10 +791,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c default: DPRINTF("Unknown block operation\n"); break; -Index: xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/BlktapController.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/BlktapController.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/BlktapController.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/BlktapController.py @@ -20,6 +20,7 @@ blktap1_disk_types = [ 'ram', 'qcow', diff --git a/blktap.patch b/blktap.patch index eefcac8..59cc25e 100644 --- a/blktap.patch +++ b/blktap.patch @@ -1,10 +1,10 @@ bug #239173 bug #242953 -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -3290,7 +3290,7 @@ class XendDomainInfo: (fn, BOOTLOADER_LOOPBACK_DEVICE)) @@ -14,10 +14,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py 'device': BOOTLOADER_LOOPBACK_DEVICE, } -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c ++++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c @@ -397,9 +397,9 @@ void xenstore_parse_domain_config(int hv { char **e_danger = NULL; @@ -30,7 +30,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c unsigned int len, num, hd_index, pci_devid = 0; BlockDriverState *bs; BlockDriver *format; -@@ -444,6 +444,14 @@ void xenstore_parse_domain_config(int hv +@@ -439,6 +439,14 @@ void xenstore_parse_domain_config(int hv e_danger[i]); if (bpath == NULL) continue; @@ -45,8 +45,8 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c /* read the name of the device */ if (pasprintf(&buf, "%s/dev", bpath) == -1) continue; -@@ -738,6 +746,7 @@ void xenstore_parse_domain_config(int hv - free(mode); +@@ -715,6 +723,7 @@ void xenstore_parse_domain_config(int hv + free(danger_type); free(params); free(dev); + free(btype); diff --git a/blktapctrl-default-to-ioemu.patch b/blktapctrl-default-to-ioemu.patch index 6c79a4d..f4633c0 100644 --- a/blktapctrl-default-to-ioemu.patch +++ b/blktapctrl-default-to-ioemu.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h +Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.h -+++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h +--- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.h ++++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h @@ -168,7 +168,7 @@ static disk_info_t aio_disk = { "raw image (aio)", "aio", diff --git a/block-dmmd b/block-dmmd index cfe81f0..eb52a02 100644 --- a/block-dmmd +++ b/block-dmmd @@ -98,9 +98,9 @@ function activate_lvm () { # First scan for PVs and VGs; we may then have to activate the VG # first, but can ignore errors: -# /sbin/pvscan || : -# /sbin/vgscan --mknodes || : -# /sbin/vgchange -ay ${1%/*} || : + /sbin/pvscan || : + /sbin/vgscan --mknodes || : + /sbin/vgchange -ay ${1%/*} || : /sbin/lvchange -ay $1 return $? } @@ -110,9 +110,9 @@ function deactivate_lvm () /sbin/lvchange -an $1 if [ $? -eq 0 ]; then # We may have to deactivate the VG now, but can ignore errors: -# /sbin/vgchange -an ${1%/*} || : + /sbin/vgchange -an ${1%/*} || : # Maybe we need to cleanup the LVM cache: -# /sbin/vgscan --mknodes || : + /sbin/vgscan --mknodes || : return 0 fi return 1 diff --git a/block-flags.diff b/block-flags.diff new file mode 100644 index 0000000..7eae479 --- /dev/null +++ b/block-flags.diff @@ -0,0 +1,34 @@ +Index: xen-3.5.0-testing/tools/hotplug/Linux/block +=================================================================== +--- xen-3.5.0-testing.orig/tools/hotplug/Linux/block ++++ xen-3.5.0-testing/tools/hotplug/Linux/block +@@ -225,11 +225,14 @@ case "$command" in + ;; + + file) ++ lo_flags="" ++ [ "${mode/S}" = "$mode" ] || lo_flags="-y" + # Canonicalise the file, for sharing check comparison, and the mode + # for ease of use here. + file=$(readlink -f "$p") || fatal "$p does not exist." + test -f "$file" || fatal "$file does not exist." + mode=$(canonicalise_mode "$mode") ++ [ "$mode" = "r" ] && lo_flags="$lo_flags -r" + + claim_lock "block" + +@@ -338,12 +341,12 @@ mount it read-write in a guest domain." + fatal 'Failed to find an unused loop device' + fi + +- losetup "$loopdev" "$file" && losetup_failure="" && break ++ losetup $lo_flags "$loopdev" "$file" && losetup_failure="" && break + done + + if [ "$losetup_failure" ] + then +- fatal 'losetup $loopdev $file' ++ fatal 'losetup $lo_flags $loopdev $file' + fi + + xenstore_write "$XENBUS_PATH/node" "$loopdev" diff --git a/block-losetup-retry.diff b/block-losetup-retry.diff new file mode 100644 index 0000000..ea3d73c --- /dev/null +++ b/block-losetup-retry.diff @@ -0,0 +1,211 @@ +Index: xen-3.5.0-testing/tools/hotplug/Linux/block +=================================================================== +--- xen-3.5.0-testing.orig/tools/hotplug/Linux/block ++++ xen-3.5.0-testing/tools/hotplug/Linux/block +@@ -241,107 +241,111 @@ case "$command" in + mount it read-write in a guest domain." + fi + +- loopdev='' +- for dev in /dev/loop* ++ losetup_failure=1 ++ for do_losetup in 1 2 3 + do +- if [ ! -b "$dev" ] +- then +- continue +- fi +- +- f=$(losetup "$dev" 2>/dev/null) || f='' +- +- if [ "$f" ] +- then +- # $dev is in use. Check sharing. +- if [ "x$mode" = 'x!' ] ++ loopdev='' ++ for dev in /dev/loop* ++ do ++ if [ ! -b "$dev" ] + then + continue + fi + +- f=$(echo "$f" | sed -e 's/.*(\(.*\)).*/\1/g') ++ f=$(losetup "$dev" 2>/dev/null) || f='' + +- # $f is the filename, as read from losetup, but the loopback +- # driver truncates filenames at 64 characters, so we need to go +- # trawling through the store if it's longer than that. Truncation +- # is indicated by an asterisk at the end of the filename. +- if expr index "$f" '*' >/dev/null ++ if [ "$f" ] + then +- found="" +- for dom in $(xenstore-list "$XENBUS_BASE_PATH") +- do +- for domdev in $(xenstore-list "$XENBUS_BASE_PATH/$dom") ++ # $dev is in use. Check sharing. ++ if [ "x$mode" = 'x!' ] ++ then ++ continue ++ fi ++ ++ f=$(echo "$f" | sed -e 's/.*(\(.*\)).*/\1/g') ++ ++ # $f is the filename, as read from losetup, but the loopback ++ # driver truncates filenames at 64 characters, so we need to go ++ # trawling through the store if it's longer than that. Truncation ++ # is indicated by an asterisk at the end of the filename. ++ if expr index "$f" '*' >/dev/null ++ then ++ found="" ++ for dom in $(xenstore-list "$XENBUS_BASE_PATH") + do +- d=$(xenstore_read_default \ +- "$XENBUS_BASE_PATH/$dom/$domdev/node" "") +- if [ "$d" = "$dev" ] +- then +- f=$(xenstore_read "$XENBUS_BASE_PATH/$dom/$domdev/params") +- found=1 +- break 2 +- fi ++ for domdev in $(xenstore-list "$XENBUS_BASE_PATH/$dom") ++ do ++ d=$(xenstore_read_default \ ++ "$XENBUS_BASE_PATH/$dom/$domdev/node" "") ++ if [ "$d" = "$dev" ] ++ then ++ f=$(xenstore_read "$XENBUS_BASE_PATH/$dom/$domdev/params") ++ found=1 ++ break 2 ++ fi ++ done + done +- done + +- if [ ! "$found" ] +- then +- # This loopback device is in use by someone else, so skip it. +- log debug "Loopback sharing check skips device $dev." +- continue ++ if [ ! "$found" ] ++ then ++ # This loopback device is in use by someone else, so skip it. ++ log debug "Loopback sharing check skips device $dev." ++ continue ++ fi + fi +- fi + +- # Canonicalise the filename for the comparison. ++ # Canonicalise the filename for the comparison. + +- # I have seen this readlink fails because the filename given by +- # losetup is only the basename. This cannot happen when the loop +- # device is set up through this script, because file is +- # canonicalised above, but it may happen when loop devices are set +- # up some other way. This readlink may also conceivably fail if +- # the file backing this loop device has been removed. ++ # I have seen this readlink fails because the filename given by ++ # losetup is only the basename. This cannot happen when the loop ++ # device is set up through this script, because file is ++ # canonicalised above, but it may happen when loop devices are set ++ # up some other way. This readlink may also conceivably fail if ++ # the file backing this loop device has been removed. + +- # For maximum safety, in the case that $f does not resolve, we +- # assume that $file and $f are in the same directory. ++ # For maximum safety, in the case that $f does not resolve, we ++ # assume that $file and $f are in the same directory. + +- # If you create a loopback filesystem, remove it and continue to +- # run on it, and then create another file with the same name, then +- # this check will block that -- don't do that. ++ # If you create a loopback filesystem, remove it and continue to ++ # run on it, and then create another file with the same name, then ++ # this check will block that -- don't do that. + +- # If you create loop devices through some other mechanism, use +- # relative filenames, and then use the same filename through this +- # script, then this check will block that -- don't do that either. ++ # If you create loop devices through some other mechanism, use ++ # relative filenames, and then use the same filename through this ++ # script, then this check will block that -- don't do that either. + +- f=$(readlink -f "$f" || echo $(dirname "$file")/$(basename "$f")) ++ f=$(readlink -f "$f" || echo $(dirname "$file")/$(basename "$f")) + + +- if [ "$f" = "$file" ] +- then +- check_file_sharing "$file" "$dev" "$mode" +- fi +- else +- # $dev is not in use, so we'll remember it for use later; we want +- # to finish the sharing check first. ++ if [ "$f" = "$file" ] ++ then ++ check_file_sharing "$file" "$dev" "$mode" ++ fi ++ else ++ # $dev is not in use, so we'll remember it for use later; we want ++ # to finish the sharing check first. + +- if [ "$loopdev" = '' ] +- then +- loopdev="$dev" ++ if [ "$loopdev" = '' ] ++ then ++ loopdev="$dev" ++ fi + fi ++ done ++ ++ if [ "$loopdev" = '' ] ++ then ++ release_lock "block" ++ fatal 'Failed to find an unused loop device' + fi ++ ++ losetup "$loopdev" "$file" && losetup_failure="" && break + done + +- if [ "$loopdev" = '' ] ++ if [ "$losetup_failure" ] + then +- release_lock "block" +- fatal 'Failed to find an unused loop device' ++ fatal 'losetup $loopdev $file' + fi + +- if LANG=C losetup -h 2>&1 | grep read-only >/dev/null +- then +- roflag="-$mode"; roflag="${roflag#-w}"; roflag="${roflag#-!}" +- else +- roflag='' +- fi +- do_or_die losetup $roflag "$loopdev" "$file" + xenstore_write "$XENBUS_PATH/node" "$loopdev" + write_dev "$loopdev" + release_lock "block" +@@ -364,8 +368,18 @@ mount it read-write in a guest domain." + + file) + node=$(xenstore_read "$XENBUS_PATH/node") +- losetup -d "$node" +- exit 0 ++ ++ #In case the loopback is temporarily blocked, retry the losetup -d. ++ for i in 1 2 3 4 5 ++ do ++ if losetup -d "$node" ++ then ++ exit 0 ++ fi ++ sleep 1 ++ done ++ log err "losetup -d $node failed." ++ exit 1 + ;; + + "") diff --git a/bridge-bonding.diff b/bridge-bonding.diff index c9b0e6e..0d09fed 100644 --- a/bridge-bonding.diff +++ b/bridge-bonding.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge @@ -245,6 +245,9 @@ op_start () { claim_lock "network-bridge" diff --git a/bridge-opensuse.patch b/bridge-opensuse.patch index 2c3ed96..40b413d 100644 --- a/bridge-opensuse.patch +++ b/bridge-opensuse.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge @@ -270,19 +270,19 @@ op_stop () { transfer_addrs ${bridge} ${pdev} if ! ifdown ${bridge}; then diff --git a/bridge-record-creation.patch b/bridge-record-creation.patch index 870f007..682ddce 100644 --- a/bridge-record-creation.patch +++ b/bridge-record-creation.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge @@ -253,6 +253,11 @@ op_start () { create_bridge ${tdev} diff --git a/bridge-vlan.diff b/bridge-vlan.diff index 897daab..0aa72f0 100644 --- a/bridge-vlan.diff +++ b/bridge-vlan.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge @@ -193,6 +193,28 @@ antispoofing () { iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT } diff --git a/build-tapdisk-ioemu.patch b/build-tapdisk-ioemu.patch index 9b9c70d..3272ce9 100644 --- a/build-tapdisk-ioemu.patch +++ b/build-tapdisk-ioemu.patch @@ -15,10 +15,10 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 17 ----------------- 4 files changed, 17 insertions(+), 26 deletions(-) -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile +Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile +--- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile ++++ xen-4.0.0-testing/tools/ioemu-remote/Makefile @@ -46,14 +46,6 @@ $(filter %-user,$(SUBDIR_RULES)): libqem recurse-all: $(SUBDIR_RULES) @@ -56,10 +56,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile ###################################################################### # libqemu_common.a: Target independent part of system emulation. The # long term path is to suppress *all* target specific code in case of -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/configure +Index: xen-4.0.0-testing/tools/ioemu-remote/configure =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/configure -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/configure +--- xen-4.0.0-testing.orig/tools/ioemu-remote/configure ++++ xen-4.0.0-testing/tools/ioemu-remote/configure @@ -1511,7 +1511,7 @@ bsd) ;; esac @@ -69,10 +69,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/configure if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then tools="qemu-img\$(EXESUF) $tools" if [ "$linux" = "yes" ] ; then -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-tool.c +Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-tool.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-tool.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-tool.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-tool.c ++++ xen-4.0.0-testing/tools/ioemu-remote/qemu-tool.c @@ -68,7 +68,7 @@ void qemu_bh_delete(QEMUBH *bh) qemu_free(bh); } @@ -82,10 +82,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-tool.c IOCanRWHandler *fd_read_poll, IOHandler *fd_read, IOHandler *fd_write, -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c +Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c ++++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c @@ -12,34 +12,12 @@ extern void qemu_aio_init(void); diff --git a/capslock_enable.patch b/capslock_enable.patch index dacca9a..cdcd18e 100644 --- a/capslock_enable.patch +++ b/capslock_enable.patch @@ -1,8 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c -=================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vnc.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c -@@ -1344,6 +1344,11 @@ static void do_key_event(VncState *vs, i +diff -r c2f19aa8a584 tools/ioemu-remote/vnc.c +--- a/tools/ioemu-remote/vnc.c Wed Apr 07 11:13:49 2010 +0800 ++++ b/tools/ioemu-remote/vnc.c Mon May 24 13:56:22 2010 +0800 +@@ -1326,6 +1326,11 @@ } break; case 0x3a: /* CapsLock */ diff --git a/cdrom-removable.patch b/cdrom-removable.patch index a879052..6f07661 100644 --- a/cdrom-removable.patch +++ b/cdrom-removable.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/server/HalDaemon.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/HalDaemon.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/python/xen/xend/server/HalDaemon.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/HalDaemon.py @@ -0,0 +1,243 @@ +#!/usr/bin/env python +# -*- mode: python; -*- @@ -246,10 +246,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/HalDaemon.py + print 'Falling off end' + + -Index: xen-4.0.1-testing/tools/python/xen/xend/server/Hald.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/Hald.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/python/xen/xend/server/Hald.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/Hald.py @@ -0,0 +1,125 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -376,10 +376,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/Hald.py + watcher.run() + time.sleep(10) + watcher.shutdown() -Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvServer.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvServer.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py @@ -56,6 +56,7 @@ from xen.web.SrvDir import SrvDir from SrvRoot import SrvRoot @@ -397,10 +397,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py def create(): root = SrvDir() -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c ++++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c @@ -18,6 +18,7 @@ #include "exec-all.h" #include "sysemu.h" @@ -409,7 +409,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c #include "hw.h" #include "pci.h" #include "qemu-timer.h" -@@ -553,6 +554,21 @@ void xenstore_parse_domain_config(int hv +@@ -548,6 +549,21 @@ void xenstore_parse_domain_config(int hv #endif bs = bdrv_new(dev); @@ -431,7 +431,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c /* check if it is a cdrom */ if (danger_type && !strcmp(danger_type, "cdrom")) { bdrv_set_type_hint(bs, BDRV_TYPE_CDROM); -@@ -961,6 +977,50 @@ void xenstore_record_dm_state(const char +@@ -938,6 +954,50 @@ void xenstore_record_dm_state(const char xenstore_record_dm("state", state); } @@ -482,7 +482,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c void xenstore_process_event(void *opaque) { char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL; -@@ -991,6 +1051,11 @@ void xenstore_process_event(void *opaque +@@ -968,6 +1028,11 @@ void xenstore_process_event(void *opaque xenstore_watch_callbacks[i].cb(vec[XS_WATCH_TOKEN], xenstore_watch_callbacks[i].opaque); diff --git a/check_device_status.patch b/check_device_status.patch deleted file mode 100644 index 983b104..0000000 --- a/check_device_status.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -r ce65e0e03a57 tools/python/xen/xend/server/DevController.py ---- a/tools/python/xen/xend/server/DevController.py Fri Aug 27 16:53:00 2010 +0800 -+++ b/tools/python/xen/xend/server/DevController.py Fri Aug 27 17:13:32 2010 +0800 -@@ -149,7 +149,10 @@ - (status, err) = self.waitForBackend(devid) - - if status == Timeout: -- self.destroyDevice(devid, False) -+ #Clean timeout backend resource -+ dev = self.convertToDeviceNumber(devid) -+ self.writeBackend(dev, HOTPLUG_STATUS_NODE, HOTPLUG_STATUS_ERROR) -+ self.destroyDevice(devid, True) - raise VmError("Device %s (%s) could not be connected. " - "Hotplug scripts not working." % - (devid, self.deviceClass)) -@@ -554,7 +557,17 @@ - - xswatch(statusPath, hotplugStatusCallback, ev, result) - -- ev.wait(DEVICE_CREATE_TIMEOUT) -+ for i in range(1, 50): -+ ev.wait(DEVICE_CREATE_TIMEOUT/50) -+ status = xstransact.Read(statusPath) -+ if status is not None: -+ if status == HOTPLUG_STATUS_ERROR: -+ result['status'] = Error -+ elif status == HOTPLUG_STATUS_BUSY: -+ result['status'] = Busy -+ else: -+ result['status'] = Connected -+ break - - err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE) - -@@ -571,7 +584,12 @@ - - xswatch(statusPath, deviceDestroyCallback, ev, result) - -- ev.wait(DEVICE_DESTROY_TIMEOUT) -+ for i in range(1, 50): -+ ev.wait(DEVICE_DESTROY_TIMEOUT/50) -+ status = xstransact.Read(statusPath) -+ if status is None: -+ result['status'] = Disconnected -+ break - - return result['status'] - diff --git a/checkpoint-rename.patch b/checkpoint-rename.patch index a6032d5..4471a6c 100644 --- a/checkpoint-rename.patch +++ b/checkpoint-rename.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py @@ -165,7 +165,7 @@ def save(fd, dominfo, network, live, dst dominfo.destroy() dominfo.testDeviceComplete() diff --git a/cpu-pools-docs.patch b/cpu-pools-docs.patch index a04e4ce..9e4e493 100644 --- a/cpu-pools-docs.patch +++ b/cpu-pools-docs.patch @@ -1,7 +1,5 @@ -Index: xen-4.0.1-testing/docs/xen-api/coversheet.tex -=================================================================== ---- xen-4.0.1-testing.orig/docs/xen-api/coversheet.tex -+++ xen-4.0.1-testing/docs/xen-api/coversheet.tex +--- a/docs/xen-api/coversheet.tex ++++ b/docs/xen-api/coversheet.tex @@ -52,6 +52,7 @@ Mike Day, IBM & Daniel Veillard, Red Hat Jim Fehlig, Novell & Tom Wilkie, University of Cambridge \\ Jon Harrop, XenSource & Yosuke Iwamatsu, NEC \\ @@ -10,10 +8,8 @@ Index: xen-4.0.1-testing/docs/xen-api/coversheet.tex \end{tabular} \end{large} -Index: xen-4.0.1-testing/docs/xen-api/revision-history.tex -=================================================================== ---- xen-4.0.1-testing.orig/docs/xen-api/revision-history.tex -+++ xen-4.0.1-testing/docs/xen-api/revision-history.tex +--- a/docs/xen-api/revision-history.tex ++++ b/docs/xen-api/revision-history.tex @@ -50,6 +50,12 @@ between classes. Added host.PSCSI\_HBAs and VM.DSCSI\_HBAs fields.\tabularnewline @@ -27,10 +23,8 @@ Index: xen-4.0.1-testing/docs/xen-api/revision-history.tex \end{tabular} \end{center} \end{flushleft} -Index: xen-4.0.1-testing/docs/xen-api/xenapi-coversheet.tex -=================================================================== ---- xen-4.0.1-testing.orig/docs/xen-api/xenapi-coversheet.tex -+++ xen-4.0.1-testing/docs/xen-api/xenapi-coversheet.tex +--- a/docs/xen-api/xenapi-coversheet.tex ++++ b/docs/xen-api/xenapi-coversheet.tex @@ -17,12 +17,12 @@ \newcommand{\coversheetlogo}{xen.eps} @@ -46,10 +40,8 @@ Index: xen-4.0.1-testing/docs/xen-api/xenapi-coversheet.tex %% Document authors \newcommand{\docauthors}{ -Index: xen-4.0.1-testing/docs/xen-api/xenapi-datamodel-graph.dot -=================================================================== ---- xen-4.0.1-testing.orig/docs/xen-api/xenapi-datamodel-graph.dot -+++ xen-4.0.1-testing/docs/xen-api/xenapi-datamodel-graph.dot +--- a/docs/xen-api/xenapi-datamodel-graph.dot ++++ b/docs/xen-api/xenapi-datamodel-graph.dot @@ -14,7 +14,7 @@ fontname="Verdana"; node [ shape=box ]; session VM host network VIF PIF SR VDI VBD PBD user; @@ -67,10 +59,8 @@ Index: xen-4.0.1-testing/docs/xen-api/xenapi-datamodel-graph.dot +cpu_pool -> VM [ arrowhead="crow", arrowtail="none" ] +host -> cpu_pool [ arrowhead="crow", arrowtail="none" ] } -Index: xen-4.0.1-testing/docs/xen-api/xenapi-datamodel.tex -=================================================================== ---- xen-4.0.1-testing.orig/docs/xen-api/xenapi-datamodel.tex -+++ xen-4.0.1-testing/docs/xen-api/xenapi-datamodel.tex +--- a/docs/xen-api/xenapi-datamodel.tex ++++ b/docs/xen-api/xenapi-datamodel.tex @@ -56,6 +56,7 @@ Name & Description \\ {\tt debug} & A basic class for testing \\ {\tt XSPolicy} & A class for handling Xen Security Policies \\ @@ -89,7 +79,7 @@ Index: xen-4.0.1-testing/docs/xen-api/xenapi-datamodel.tex \hline \end{tabular}\end{center} -@@ -499,6 +503,56 @@ error code and a message describing the +@@ -499,6 +503,56 @@ error code and a message describing the \begin{verbatim}SECURITY_ERROR(xserr, message)\end{verbatim} \begin{center}\rule{10em}{0.1pt}\end{center} diff --git a/cpu-pools-libxc.patch b/cpu-pools-libxc.patch index 7dafe02..65cd57d 100644 --- a/cpu-pools-libxc.patch +++ b/cpu-pools-libxc.patch @@ -1,7 +1,5 @@ -Index: xen-4.0.1-testing/tools/libxc/Makefile -=================================================================== ---- xen-4.0.1-testing.orig/tools/libxc/Makefile -+++ xen-4.0.1-testing/tools/libxc/Makefile +--- a/tools/libxc/Makefile ++++ b/tools/libxc/Makefile @@ -8,6 +8,7 @@ CTRL_SRCS-y := CTRL_SRCS-y += xc_core.c CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c @@ -10,10 +8,8 @@ Index: xen-4.0.1-testing/tools/libxc/Makefile CTRL_SRCS-y += xc_domain.c CTRL_SRCS-y += xc_evtchn.c CTRL_SRCS-y += xc_misc.c -Index: xen-4.0.1-testing/tools/libxc/xc_cpupool.c -=================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/libxc/xc_cpupool.c ++++ b/tools/libxc/xc_cpupool.c @@ -0,0 +1,165 @@ +/****************************************************************************** + * xc_cpupool.c @@ -180,10 +176,8 @@ Index: xen-4.0.1-testing/tools/libxc/xc_cpupool.c + + return 0; +} -Index: xen-4.0.1-testing/tools/libxc/xc_domain.c -=================================================================== ---- xen-4.0.1-testing.orig/tools/libxc/xc_domain.c -+++ xen-4.0.1-testing/tools/libxc/xc_domain.c +--- a/tools/libxc/xc_domain.c ++++ b/tools/libxc/xc_domain.c @@ -220,6 +220,7 @@ int xc_domain_getinfo(int xc_handle, info->cpu_time = domctl.u.getdomaininfo.cpu_time; info->nr_online_vcpus = domctl.u.getdomaininfo.nr_online_vcpus; @@ -192,11 +186,9 @@ Index: xen-4.0.1-testing/tools/libxc/xc_domain.c memcpy(info->handle, domctl.u.getdomaininfo.handle, sizeof(xen_domain_handle_t)); -Index: xen-4.0.1-testing/tools/libxc/xenctrl.h -=================================================================== ---- xen-4.0.1-testing.orig/tools/libxc/xenctrl.h -+++ xen-4.0.1-testing/tools/libxc/xenctrl.h -@@ -161,6 +161,7 @@ typedef struct xc_dominfo { +--- a/tools/libxc/xenctrl.h ++++ b/tools/libxc/xenctrl.h +@@ -171,6 +171,7 @@ typedef struct xc_dominfo { unsigned int nr_online_vcpus; unsigned int max_vcpu_id; xen_domain_handle_t handle; @@ -204,7 +196,7 @@ Index: xen-4.0.1-testing/tools/libxc/xenctrl.h } xc_dominfo_t; typedef xen_domctl_getdomaininfo_t xc_domaininfo_t; -@@ -492,6 +493,100 @@ int xc_domain_setdebugging(int xc_handle +@@ -502,6 +503,100 @@ int xc_domain_setdebugging(int xc_handle unsigned int enable); /* diff --git a/cpu-pools-libxen.patch b/cpu-pools-libxen.patch index 14d4be7..bb4ab33 100644 --- a/cpu-pools-libxen.patch +++ b/cpu-pools-libxen.patch @@ -1,17 +1,17 @@ -Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_all.h +Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_all.h =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_all.h -+++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_all.h +--- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_all.h ++++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_all.h @@ -37,4 +37,5 @@ #include #include #include +#include #endif -Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool.h +Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool.h ++++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool.h @@ -0,0 +1,424 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -437,10 +437,10 @@ Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool.h + + +#endif -Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h +Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h ++++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -472,10 +472,10 @@ Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h +struct xen_cpu_pool_record_opt_set; + +#endif -Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host.h +Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host.h =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_host.h -+++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host.h +--- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_host.h ++++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host.h @@ -29,7 +29,7 @@ #include #include @@ -505,10 +505,10 @@ Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host.h + xen_host host); + #endif -Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host_cpu.h +Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host_cpu.h =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_host_cpu.h -+++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host_cpu.h +--- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_host_cpu.h ++++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host_cpu.h @@ -22,6 +22,7 @@ #include #include @@ -544,10 +544,10 @@ Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host_cpu.h + + #endif -Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_vm.h +Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_vm.h =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_vm.h -+++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_vm.h +--- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_vm.h ++++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_vm.h @@ -34,6 +34,7 @@ #include #include @@ -599,10 +599,10 @@ Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_vm.h +xen_vm_cpu_pool_migrate(xen_session *session, xen_vm vm, xen_cpu_pool cpu_pool); + #endif -Index: xen-4.0.1-testing/tools/libxen/src/xen_cpu_pool.c +Index: xen-4.0.0-testing/tools/libxen/src/xen_cpu_pool.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/libxen/src/xen_cpu_pool.c ++++ xen-4.0.0-testing/tools/libxen/src/xen_cpu_pool.c @@ -0,0 +1,671 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -1275,10 +1275,10 @@ Index: xen-4.0.1-testing/tools/libxen/src/xen_cpu_pool.c + return session->ok; +} + -Index: xen-4.0.1-testing/tools/libxen/src/xen_host.c +Index: xen-4.0.0-testing/tools/libxen/src/xen_host.c =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/src/xen_host.c -+++ xen-4.0.1-testing/tools/libxen/src/xen_host.c +--- xen-4.0.0-testing.orig/tools/libxen/src/xen_host.c ++++ xen-4.0.0-testing/tools/libxen/src/xen_host.c @@ -30,6 +30,7 @@ #include #include @@ -1330,10 +1330,10 @@ Index: xen-4.0.1-testing/tools/libxen/src/xen_host.c + return session->ok; +} + -Index: xen-4.0.1-testing/tools/libxen/src/xen_host_cpu.c +Index: xen-4.0.0-testing/tools/libxen/src/xen_host_cpu.c =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/src/xen_host_cpu.c -+++ xen-4.0.1-testing/tools/libxen/src/xen_host_cpu.c +--- xen-4.0.0-testing.orig/tools/libxen/src/xen_host_cpu.c ++++ xen-4.0.0-testing/tools/libxen/src/xen_host_cpu.c @@ -24,6 +24,7 @@ #include #include @@ -1397,10 +1397,10 @@ Index: xen-4.0.1-testing/tools/libxen/src/xen_host_cpu.c + + + -Index: xen-4.0.1-testing/tools/libxen/src/xen_vm.c +Index: xen-4.0.0-testing/tools/libxen/src/xen_vm.c =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/src/xen_vm.c -+++ xen-4.0.1-testing/tools/libxen/src/xen_vm.c +--- xen-4.0.0-testing.orig/tools/libxen/src/xen_vm.c ++++ xen-4.0.0-testing/tools/libxen/src/xen_vm.c @@ -36,6 +36,7 @@ #include #include @@ -1504,10 +1504,10 @@ Index: xen-4.0.1-testing/tools/libxen/src/xen_vm.c +} + + -Index: xen-4.0.1-testing/tools/libxen/test/test_bindings.c +Index: xen-4.0.0-testing/tools/libxen/test/test_bindings.c =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/test/test_bindings.c -+++ xen-4.0.1-testing/tools/libxen/test/test_bindings.c +--- xen-4.0.0-testing.orig/tools/libxen/test/test_bindings.c ++++ xen-4.0.0-testing/tools/libxen/test/test_bindings.c @@ -28,6 +28,7 @@ #include diff --git a/cpu-pools-python.patch b/cpu-pools-python.patch index 21472db..49b0364 100644 --- a/cpu-pools-python.patch +++ b/cpu-pools-python.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c +Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c -+++ xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c +--- xen-4.0.0-testing.orig/tools/python/xen/lowlevel/xc/xc.c ++++ xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c @@ -106,8 +106,8 @@ static PyObject *pyxc_domain_create(XcOb static char *kwd_list[] = { "domid", "ssidref", "handle", "flags", "target", NULL }; @@ -289,10 +289,10 @@ Index: xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c { NULL, NULL, 0, NULL } }; -Index: xen-4.0.1-testing/tools/python/xen/util/sxputils.py +Index: xen-4.0.0-testing/tools/python/xen/util/sxputils.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/python/xen/util/sxputils.py ++++ xen-4.0.0-testing/tools/python/xen/util/sxputils.py @@ -0,0 +1,64 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -358,10 +358,10 @@ Index: xen-4.0.1-testing/tools/python/xen/util/sxputils.py + return sxphash + + -Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py @@ -51,6 +51,7 @@ from XendDPCI import XendDPCI from XendPSCSI import XendPSCSI, XendPSCSI_HBA from XendDSCSI import XendDSCSI, XendDSCSI_HBA @@ -553,10 +553,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py # Xen API: Class VBD # ---------------------------------------------------------------- -Index: xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py @@ -0,0 +1,903 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -1461,10 +1461,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py + + unbound_cpus = classmethod(unbound_cpus) + -Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py @@ -134,6 +134,7 @@ XENAPI_CFG_TO_LEGACY_CFG = { 'PV_bootloader': 'bootloader', 'PV_bootloader_args': 'bootloader_args', @@ -1505,10 +1505,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py 'superpages': 0, 'description': '', } -Index: xen-4.0.1-testing/tools/python/xen/xend/XendConstants.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConstants.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendConstants.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConstants.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py @@ -133,6 +133,8 @@ VTPM_DELETE_SCRIPT = auxbin.scripts_dir( XS_VMROOT = "/vm/" @@ -1518,10 +1518,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendConstants.py NR_PCI_FUNC = 8 NR_PCI_DEV = 32 NR_PCI_DEVFN = NR_PCI_FUNC * NR_PCI_DEV -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -60,6 +60,7 @@ from xen.xend.xenstore.xsutil import Get from xen.xend.xenstore.xswatch import xswatch from xen.xend.XendConstants import * @@ -1574,10 +1574,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py def get_power_state(self): return XEN_API_VM_POWER_STATE[self._stateGet()] def get_platform(self): -Index: xen-4.0.1-testing/tools/python/xen/xend/XendError.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendError.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendError.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendError.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendError.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendError.py @@ -18,6 +18,7 @@ from xmlrpclib import Fault @@ -1613,10 +1613,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendError.py class VDIError(XendAPIError): def __init__(self, error, vdi): XendAPIError.__init__(self) -Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py @@ -43,6 +43,7 @@ from XendStateStore import XendStateStor from XendMonitor import XendMonitor from XendPPCI import XendPPCI @@ -1690,10 +1690,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py 'max_free_memory', 'max_para_memory', 'max_hvm_memory', -Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvServer.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvServer.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py @@ -52,6 +52,7 @@ from xen.xend import XendNode, XendOptio from xen.xend.XendLogging import log from xen.xend.XendClient import XEN_API_SOCKET @@ -1715,10 +1715,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py # Reaching this point means we can auto start domains try: xenddomain().autostart_domains() -Index: xen-4.0.1-testing/tools/python/xen/xend/server/XMLRPCServer.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/XMLRPCServer.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/XMLRPCServer.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/XMLRPCServer.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/XMLRPCServer.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/XMLRPCServer.py @@ -33,6 +33,7 @@ from xen.xend.XendClient import XML_RPC_ from xen.xend.XendConstants import DOM_STATE_RUNNING from xen.xend.XendLogging import log @@ -1750,10 +1750,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/XMLRPCServer.py # Functions in XendNode and XendDmesg for type, lst, n in [(XendNode, ['info', 'pciinfo', 'send_debug_keys', -Index: xen-4.0.1-testing/tools/python/xen/xm/create.dtd +Index: xen-4.0.0-testing/tools/python/xen/xm/create.dtd =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/create.dtd -+++ xen-4.0.1-testing/tools/python/xen/xm/create.dtd +--- xen-4.0.0-testing.orig/tools/python/xen/xm/create.dtd ++++ xen-4.0.0-testing/tools/python/xen/xm/create.dtd @@ -50,6 +50,7 @@ s3_integrity CDATA #REQUIRED vcpus_max CDATA #REQUIRED @@ -1762,10 +1762,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/create.dtd actions_after_shutdown %NORMAL_EXIT; #REQUIRED actions_after_reboot %NORMAL_EXIT; #REQUIRED actions_after_crash %CRASH_BEHAVIOUR; #REQUIRED -Index: xen-4.0.1-testing/tools/python/xen/xm/create.py +Index: xen-4.0.0-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.1-testing/tools/python/xen/xm/create.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.0-testing/tools/python/xen/xm/create.py @@ -659,6 +659,10 @@ gopts.var('suppress_spurious_page_faults fn=set_bool, default=None, use="""Do not inject spurious page faults into this guest""") @@ -1777,7 +1777,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/create.py gopts.var('pci_msitranslate', val='TRANSLATE', fn=set_int, default=1, use="""Global PCI MSI-INTx translation flag (0=disable; -@@ -1157,6 +1161,8 @@ def make_config(vals): +@@ -1149,6 +1153,8 @@ def make_config(vals): config.append(['localtime', vals.localtime]) if vals.oos: config.append(['oos', vals.oos]) @@ -1786,10 +1786,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/create.py config_image = configure_image(vals) if vals.bootloader: -Index: xen-4.0.1-testing/tools/python/xen/xm/main.py +Index: xen-4.0.0-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.1-testing/tools/python/xen/xm/main.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.0-testing/tools/python/xen/xm/main.py @@ -56,6 +56,7 @@ from xen.util.xmlrpcclient import Server import xen.util.xsm.xsm as security from xen.util.xsm.xsm import XSMError @@ -1939,7 +1939,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py if use_long: map(PrettyPrint.prettyprint, doms) -@@ -1841,6 +1894,13 @@ def xm_info(args): +@@ -1839,6 +1892,13 @@ def xm_info(args): else: return "" @@ -1953,7 +1953,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py info = { "host": getVal(["name_label"]), "release": getVal(["software_version", "release"]), -@@ -1852,6 +1912,7 @@ def xm_info(args): +@@ -1850,6 +1910,7 @@ def xm_info(args): "threads_per_core": getVal(["cpu_configuration", "threads_per_core"]), "cpu_mhz": getCpuMhz(), "hw_caps": getCpuFeatures(), @@ -1961,7 +1961,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py "total_memory": int(host_metrics_record["memory_total"])/1024/1024, "free_memory": int(host_metrics_record["memory_free"])/1024/1024, "xen_major": getVal(["software_version", "xen_major"]), -@@ -3486,6 +3547,169 @@ def xm_tmem_shared_auth(args): +@@ -3484,6 +3545,169 @@ def xm_tmem_shared_auth(args): else: return server.xend.node.tmem_shared_auth(domid,uuid_str,auth) @@ -2131,7 +2131,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py commands = { "shell": xm_shell, -@@ -3571,6 +3795,14 @@ commands = { +@@ -3569,6 +3793,14 @@ commands = { "usb-list-assignable-devices": xm_usb_list_assignable_devices, "usb-hc-create": xm_usb_hc_create, "usb-hc-destroy": xm_usb_hc_destroy, @@ -2146,7 +2146,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py # tmem "tmem-thaw": xm_tmem_thaw, "tmem-freeze": xm_tmem_freeze, -@@ -3604,6 +3836,8 @@ IMPORTED_COMMANDS = [ +@@ -3602,6 +3834,8 @@ IMPORTED_COMMANDS = [ 'resetpolicy', 'getenforce', 'setenforce', @@ -2155,10 +2155,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py ] for c in IMPORTED_COMMANDS: -Index: xen-4.0.1-testing/tools/python/xen/xm/pool-create.py +Index: xen-4.0.0-testing/tools/python/xen/xm/pool-create.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/python/xen/xm/pool-create.py ++++ xen-4.0.0-testing/tools/python/xen/xm/pool-create.py @@ -0,0 +1,51 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2211,10 +2211,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/pool-create.py +if __name__ == '__main__': + main(sys.argv) + -Index: xen-4.0.1-testing/tools/python/xen/xm/pool-new.py +Index: xen-4.0.0-testing/tools/python/xen/xm/pool-new.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/python/xen/xm/pool-new.py ++++ xen-4.0.0-testing/tools/python/xen/xm/pool-new.py @@ -0,0 +1,50 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2266,10 +2266,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/pool-new.py +if __name__ == '__main__': + main(sys.argv) + -Index: xen-4.0.1-testing/tools/python/xen/xm/pool.py +Index: xen-4.0.0-testing/tools/python/xen/xm/pool.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/python/xen/xm/pool.py ++++ xen-4.0.0-testing/tools/python/xen/xm/pool.py @@ -0,0 +1,236 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2507,10 +2507,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/pool.py +def help(): + return str(GOPTS) + -Index: xen-4.0.1-testing/tools/python/xen/xm/xenapi_create.py +Index: xen-4.0.0-testing/tools/python/xen/xm/xenapi_create.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/xenapi_create.py -+++ xen-4.0.1-testing/tools/python/xen/xm/xenapi_create.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/xenapi_create.py ++++ xen-4.0.0-testing/tools/python/xen/xm/xenapi_create.py @@ -310,6 +310,8 @@ class xenapi_create: get_child_nodes_as_dict(vm, "platform", "key", "value"), "other_config": diff --git a/cpu-pools-xmtest.patch b/cpu-pools-xmtest.patch index 8501b53..dfc3117 100644 --- a/cpu-pools-xmtest.patch +++ b/cpu-pools-xmtest.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/xm-test/configure.ac +Index: xen-4.0.0-testing/tools/xm-test/configure.ac =================================================================== ---- xen-4.0.1-testing.orig/tools/xm-test/configure.ac -+++ xen-4.0.1-testing/tools/xm-test/configure.ac +--- xen-4.0.0-testing.orig/tools/xm-test/configure.ac ++++ xen-4.0.0-testing/tools/xm-test/configure.ac @@ -161,6 +161,7 @@ AC_CONFIG_FILES([ tests/vtpm/Makefile tests/xapi/Makefile @@ -10,16 +10,16 @@ Index: xen-4.0.1-testing/tools/xm-test/configure.ac lib/XmTestReport/xmtest.py lib/XmTestLib/config.py ]) -Index: xen-4.0.1-testing/tools/xm-test/grouptest/cpupool +Index: xen-4.0.0-testing/tools/xm-test/grouptest/cpupool =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/grouptest/cpupool ++++ xen-4.0.0-testing/tools/xm-test/grouptest/cpupool @@ -0,0 +1 @@ +cpupool -Index: xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/NetConfig.py +Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/NetConfig.py =================================================================== ---- xen-4.0.1-testing.orig/tools/xm-test/lib/XmTestLib/NetConfig.py -+++ xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/NetConfig.py +--- xen-4.0.0-testing.orig/tools/xm-test/lib/XmTestLib/NetConfig.py ++++ xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/NetConfig.py @@ -56,17 +56,21 @@ def getXendNetConfig(): val = pin.get_val() while val[0] != 'network-script': @@ -51,10 +51,10 @@ Index: xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/NetConfig.py configfile.close() return netenv -Index: xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/XenDomain.py +Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/XenDomain.py =================================================================== ---- xen-4.0.1-testing.orig/tools/xm-test/lib/XmTestLib/XenDomain.py -+++ xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/XenDomain.py +--- xen-4.0.0-testing.orig/tools/xm-test/lib/XmTestLib/XenDomain.py ++++ xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/XenDomain.py @@ -181,6 +181,7 @@ class XenDomain: if not self.isManaged: @@ -63,10 +63,10 @@ Index: xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/XenDomain.py else: ret, output = traceCommand("xm new %s" % self.config) if ret != 0: -Index: xen-4.0.1-testing/tools/xm-test/runtest.sh +Index: xen-4.0.0-testing/tools/xm-test/runtest.sh =================================================================== ---- xen-4.0.1-testing.orig/tools/xm-test/runtest.sh -+++ xen-4.0.1-testing/tools/xm-test/runtest.sh +--- xen-4.0.0-testing.orig/tools/xm-test/runtest.sh ++++ xen-4.0.0-testing/tools/xm-test/runtest.sh @@ -91,7 +91,7 @@ runnable_tests() { echo "Error: ramdisk/initrd.img is from an old version, or is not for this " echo "architecture ($ARCH)." @@ -76,10 +76,10 @@ Index: xen-4.0.1-testing/tools/xm-test/runtest.sh fi # See if xend is running -Index: xen-4.0.1-testing/tools/xm-test/tests/Makefile.am +Index: xen-4.0.0-testing/tools/xm-test/tests/Makefile.am =================================================================== ---- xen-4.0.1-testing.orig/tools/xm-test/tests/Makefile.am -+++ xen-4.0.1-testing/tools/xm-test/tests/Makefile.am +--- xen-4.0.0-testing.orig/tools/xm-test/tests/Makefile.am ++++ xen-4.0.0-testing/tools/xm-test/tests/Makefile.am @@ -28,7 +28,8 @@ SUBDIRS = \ vcpu-pin \ vtpm \ @@ -90,10 +90,10 @@ Index: xen-4.0.1-testing/tools/xm-test/tests/Makefile.am EXTRA_DIST = $(SUBDIRS) Makefile.am.template -Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py +Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py ++++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py @@ -0,0 +1,72 @@ +#!/usr/bin/python + @@ -167,10 +167,10 @@ Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py +destroyAllDomUs() + + -Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py +Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py ++++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py @@ -0,0 +1,152 @@ +#!/usr/bin/python + @@ -324,10 +324,10 @@ Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py + FAIL("'Pool-1' not deleted") + + -Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py +Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py ++++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py @@ -0,0 +1,126 @@ +#!/usr/bin/python + @@ -455,10 +455,10 @@ Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py +for pool in pool_names: + destroyPool(pool, True) + -Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py +Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py ++++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py @@ -0,0 +1,84 @@ +#!/usr/bin/python + @@ -544,10 +544,10 @@ Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py +# +cleanupPoolsDomains() + -Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/Makefile.am +Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/Makefile.am =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/Makefile.am ++++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/Makefile.am @@ -0,0 +1,22 @@ +SUBDIRS = + @@ -571,16 +571,16 @@ Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/Makefile.am + rm -f *log + rm -f *~ + -Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/pool1.cfg +Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/pool1.cfg =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/pool1.cfg ++++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/pool1.cfg @@ -0,0 +1 @@ +name="Pool-1" -Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/pools.py +Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/pools.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/pools.py ++++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/pools.py @@ -0,0 +1,78 @@ +#!/usr/bin/python + @@ -660,10 +660,10 @@ Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/pools.py + break + time.sleep(1) + -Index: xen-4.0.1-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py +Index: xen-4.0.0-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py ++++ xen-4.0.0-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py @@ -0,0 +1,157 @@ +#!/usr/bin/python + @@ -822,10 +822,10 @@ Index: xen-4.0.1-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py +if pool1 in session.xenapi.cpu_pool.get_all(): + FAIL("cpu_pool.destroy() has not removed pool") + -Index: xen-4.0.1-testing/tools/xm-test/tests/xapi/Makefile.am +Index: xen-4.0.0-testing/tools/xm-test/tests/xapi/Makefile.am =================================================================== ---- xen-4.0.1-testing.orig/tools/xm-test/tests/xapi/Makefile.am -+++ xen-4.0.1-testing/tools/xm-test/tests/xapi/Makefile.am +--- xen-4.0.0-testing.orig/tools/xm-test/tests/xapi/Makefile.am ++++ xen-4.0.0-testing/tools/xm-test/tests/xapi/Makefile.am @@ -3,7 +3,8 @@ SUBDIRS = TESTS = 01_xapi-vm_basic.test \ 02_xapi-vbd_basic.test \ diff --git a/cpupools-core-fixup.patch b/cpupools-core-fixup.patch index 1401cf4..a07a7de 100644 --- a/cpupools-core-fixup.patch +++ b/cpupools-core-fixup.patch @@ -9,11 +9,9 @@ missing adjustments get detected at build time) - remove boot time per-CPU pool assignment messages (bnc#572146) -Index: xen-4.0.1-testing/xen/arch/x86/domain.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/domain.c -+++ xen-4.0.1-testing/xen/arch/x86/domain.c -@@ -1585,6 +1585,7 @@ int continue_hypercall_on_cpu(int cpu, v +--- a/xen/arch/x86/domain.c ++++ b/xen/arch/x86/domain.c +@@ -1581,6 +1581,7 @@ int continue_hypercall_on_cpu(int cpu, v v->arch.schedule_tail = continue_hypercall_on_cpu_helper; v->arch.continue_info = info; @@ -21,7 +19,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/domain.c } else { -@@ -1595,8 +1596,7 @@ int continue_hypercall_on_cpu(int cpu, v +@@ -1591,8 +1592,7 @@ int continue_hypercall_on_cpu(int cpu, v info->func = func; info->data = data; @@ -31,10 +29,8 @@ Index: xen-4.0.1-testing/xen/arch/x86/domain.c raise_softirq(SCHEDULE_SOFTIRQ); /* Dummy return value will be overwritten by new schedule_tail. */ -Index: xen-4.0.1-testing/xen/common/sched_credit.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/common/sched_credit.c -+++ xen-4.0.1-testing/xen/common/sched_credit.c +--- a/xen/common/sched_credit.c ++++ b/xen/common/sched_credit.c @@ -176,7 +176,6 @@ struct csched_private { /* * Global variables @@ -58,10 +54,8 @@ Index: xen-4.0.1-testing/xen/common/sched_credit.c .init_domain = csched_dom_init, .destroy_domain = csched_dom_destroy, -Index: xen-4.0.1-testing/xen/common/softirq.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/common/softirq.c -+++ xen-4.0.1-testing/xen/common/softirq.c +--- a/xen/common/softirq.c ++++ b/xen/common/softirq.c @@ -104,12 +104,15 @@ static void tasklet_schedule_list(struct { BUG_ON(!list_empty(&t->list)); @@ -105,10 +99,8 @@ Index: xen-4.0.1-testing/xen/common/softirq.c } /* -Index: xen-4.0.1-testing/xen/include/public/domctl.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/public/domctl.h -+++ xen-4.0.1-testing/xen/include/public/domctl.h +--- a/xen/include/public/domctl.h ++++ b/xen/include/public/domctl.h @@ -35,7 +35,7 @@ #include "xen.h" #include "grant_table.h" @@ -118,10 +110,8 @@ Index: xen-4.0.1-testing/xen/include/public/domctl.h struct xenctl_cpumap { XEN_GUEST_HANDLE_64(uint8) bitmap; -Index: xen-4.0.1-testing/xen/include/xen/softirq.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/softirq.h -+++ xen-4.0.1-testing/xen/include/xen/softirq.h +--- a/xen/include/xen/softirq.h ++++ b/xen/include/xen/softirq.h @@ -50,15 +50,17 @@ struct tasklet bool_t is_scheduled; bool_t is_running; diff --git a/cpupools-core.patch b/cpupools-core.patch index 48932a4..09fbf44 100644 --- a/cpupools-core.patch +++ b/cpupools-core.patch @@ -1,9 +1,9 @@ From: Juergen Gross -Index: xen-4.0.1-testing/xen/arch/x86/acpi/power.c +Index: xen-4.0.0-testing/xen/arch/x86/acpi/power.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/acpi/power.c -+++ xen-4.0.1-testing/xen/arch/x86/acpi/power.c +--- xen-4.0.0-testing.orig/xen/arch/x86/acpi/power.c ++++ xen-4.0.0-testing/xen/arch/x86/acpi/power.c @@ -234,7 +234,7 @@ static int enter_state(u32 state) return error; } @@ -22,11 +22,11 @@ Index: xen-4.0.1-testing/xen/arch/x86/acpi/power.c } static int acpi_get_wake_status(void) -Index: xen-4.0.1-testing/xen/arch/x86/domain.c +Index: xen-4.0.0-testing/xen/arch/x86/domain.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/domain.c -+++ xen-4.0.1-testing/xen/arch/x86/domain.c -@@ -1522,42 +1522,52 @@ void sync_vcpu_execstate(struct vcpu *v) +--- xen-4.0.0-testing.orig/xen/arch/x86/domain.c ++++ xen-4.0.0-testing/xen/arch/x86/domain.c +@@ -1518,42 +1518,52 @@ void sync_vcpu_execstate(struct vcpu *v) } struct migrate_info { @@ -96,7 +96,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/domain.c info = v->arch.continue_info; if ( info == NULL ) -@@ -1566,16 +1576,12 @@ int continue_hypercall_on_cpu(int cpu, l +@@ -1562,16 +1572,12 @@ int continue_hypercall_on_cpu(int cpu, l if ( info == NULL ) return -ENOMEM; @@ -117,7 +117,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/domain.c v->arch.schedule_tail = continue_hypercall_on_cpu_helper; v->arch.continue_info = info; -@@ -1583,17 +1589,17 @@ int continue_hypercall_on_cpu(int cpu, l +@@ -1579,17 +1585,17 @@ int continue_hypercall_on_cpu(int cpu, l else { BUG_ON(info->nest != 0); @@ -139,10 +139,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/domain.c return 0; } -Index: xen-4.0.1-testing/xen/arch/x86/domain_build.c +Index: xen-4.0.0-testing/xen/arch/x86/domain_build.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/domain_build.c -+++ xen-4.0.1-testing/xen/arch/x86/domain_build.c +--- xen-4.0.0-testing.orig/xen/arch/x86/domain_build.c ++++ xen-4.0.0-testing/xen/arch/x86/domain_build.c @@ -9,6 +9,7 @@ #include #include @@ -183,10 +183,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/domain_build.c /* Set up CR3 value for write_ptbase */ if ( paging_mode_enabled(d) ) -Index: xen-4.0.1-testing/xen/arch/x86/microcode.c +Index: xen-4.0.0-testing/xen/arch/x86/microcode.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/microcode.c -+++ xen-4.0.1-testing/xen/arch/x86/microcode.c +--- xen-4.0.0-testing.orig/xen/arch/x86/microcode.c ++++ xen-4.0.0-testing/xen/arch/x86/microcode.c @@ -114,7 +114,7 @@ static int microcode_update_cpu(const vo return err; } @@ -214,11 +214,11 @@ Index: xen-4.0.1-testing/xen/arch/x86/microcode.c + return continue_hypercall_on_cpu(info->cpu, NULL, + do_microcode_update, info); } -Index: xen-4.0.1-testing/xen/arch/x86/mm.c +Index: xen-4.0.0-testing/xen/arch/x86/mm.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.1-testing/xen/arch/x86/mm.c -@@ -243,7 +243,7 @@ void __init arch_init_memory(void) +--- xen-4.0.0-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.0-testing/xen/arch/x86/mm.c +@@ -242,7 +242,7 @@ void __init arch_init_memory(void) * Any Xen-heap pages that we will allow to be mapped will have * their domain field set to dom_xen. */ @@ -227,7 +227,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/mm.c BUG_ON(dom_xen == NULL); /* -@@ -251,14 +251,14 @@ void __init arch_init_memory(void) +@@ -250,14 +250,14 @@ void __init arch_init_memory(void) * This domain owns I/O pages that are within the range of the page_info * array. Mappings occur at the priv of the caller. */ @@ -244,10 +244,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/mm.c BUG_ON(dom_cow == NULL); /* First 1MB of RAM is historically marked as I/O. */ -Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c +Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/platform_hypercall.c -+++ xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c +--- xen-4.0.0-testing.orig/xen/arch/x86/platform_hypercall.c ++++ xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c @@ -19,6 +19,7 @@ #include #include @@ -280,7 +280,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c cpu_frequency_change_helper, NULL); break; -@@ -406,7 +407,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -403,7 +404,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe g_info = &op->u.pcpu_info; /* spin_trylock() avoids deadlock with stop_machine_run(). */ @@ -289,7 +289,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c { ret = -EBUSY; break; -@@ -429,7 +430,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -426,7 +427,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe g_info->max_present = last_cpu(cpu_present_map); @@ -298,7 +298,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c ret = copy_to_guest(u_xenpf_op, op, 1) ? -EFAULT : 0; } -@@ -470,7 +471,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -467,7 +468,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe break; } ret = continue_hypercall_on_cpu( @@ -307,10 +307,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c break; } break; -Index: xen-4.0.1-testing/xen/arch/x86/setup.c +Index: xen-4.0.0-testing/xen/arch/x86/setup.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/setup.c -+++ xen-4.0.1-testing/xen/arch/x86/setup.c +--- xen-4.0.0-testing.orig/xen/arch/x86/setup.c ++++ xen-4.0.0-testing/xen/arch/x86/setup.c @@ -2,6 +2,7 @@ #include #include @@ -328,7 +328,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/setup.c if ( idle_domain == NULL ) BUG(); idle_domain->vcpu = idle_vcpu; -@@ -1122,8 +1123,13 @@ void __init __start_xen(unsigned long mb +@@ -1094,8 +1095,13 @@ void __init __start_xen(unsigned long mb if ( !tboot_protect_mem_regions() ) panic("Could not protect TXT memory regions\n"); @@ -343,10 +343,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/setup.c if ( (dom0 == NULL) || (alloc_dom0_vcpu0() == NULL) ) panic("Error creating domain 0\n"); -Index: xen-4.0.1-testing/xen/arch/x86/smpboot.c +Index: xen-4.0.0-testing/xen/arch/x86/smpboot.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/smpboot.c -+++ xen-4.0.1-testing/xen/arch/x86/smpboot.c +--- xen-4.0.0-testing.orig/xen/arch/x86/smpboot.c ++++ xen-4.0.0-testing/xen/arch/x86/smpboot.c @@ -39,6 +39,7 @@ #include #include @@ -468,10 +468,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/smpboot.c cpufreq_add_cpu(cpu); return 0; } -Index: xen-4.0.1-testing/xen/arch/x86/sysctl.c +Index: xen-4.0.0-testing/xen/arch/x86/sysctl.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/sysctl.c -+++ xen-4.0.1-testing/xen/arch/x86/sysctl.c +--- xen-4.0.0-testing.orig/xen/arch/x86/sysctl.c ++++ xen-4.0.0-testing/xen/arch/x86/sysctl.c @@ -29,7 +29,7 @@ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) @@ -490,10 +490,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/sysctl.c break; case XEN_SYSCTL_CPU_HOTPLUG_STATUS: ret = 0; -Index: xen-4.0.1-testing/xen/common/Makefile +Index: xen-4.0.0-testing/xen/common/Makefile =================================================================== ---- xen-4.0.1-testing.orig/xen/common/Makefile -+++ xen-4.0.1-testing/xen/common/Makefile +--- xen-4.0.0-testing.orig/xen/common/Makefile ++++ xen-4.0.0-testing/xen/common/Makefile @@ -1,5 +1,6 @@ obj-y += bitmap.o obj-y += cpu.o @@ -501,10 +501,10 @@ Index: xen-4.0.1-testing/xen/common/Makefile obj-y += domctl.o obj-y += domain.o obj-y += event_channel.o -Index: xen-4.0.1-testing/xen/common/cpupool.c +Index: xen-4.0.0-testing/xen/common/cpupool.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/common/cpupool.c ++++ xen-4.0.0-testing/xen/common/cpupool.c @@ -0,0 +1,585 @@ +/****************************************************************************** + * cpupool.c @@ -1091,10 +1091,10 @@ Index: xen-4.0.1-testing/xen/common/cpupool.c + * indent-tabs-mode: nil + * End: + */ -Index: xen-4.0.1-testing/xen/common/domain.c +Index: xen-4.0.0-testing/xen/common/domain.c =================================================================== ---- xen-4.0.1-testing.orig/xen/common/domain.c -+++ xen-4.0.1-testing/xen/common/domain.c +--- xen-4.0.0-testing.orig/xen/common/domain.c ++++ xen-4.0.0-testing/xen/common/domain.c @@ -209,7 +209,7 @@ static void __init parse_extra_guest_irq custom_param("extra_guest_irqs", parse_extra_guest_irqs); @@ -1104,7 +1104,7 @@ Index: xen-4.0.1-testing/xen/common/domain.c { struct domain *d, **pd; enum { INIT_xsm = 1u<<0, INIT_rangeset = 1u<<1, INIT_evtchn = 1u<<2, -@@ -292,6 +292,9 @@ struct domain *domain_create( +@@ -290,6 +290,9 @@ struct domain *domain_create( goto fail; init_status |= INIT_arch; @@ -1114,7 +1114,7 @@ Index: xen-4.0.1-testing/xen/common/domain.c if ( sched_init_domain(d) != 0 ) goto fail; -@@ -603,6 +606,8 @@ static void complete_domain_destroy(stru +@@ -597,6 +600,8 @@ static void complete_domain_destroy(stru rangeset_domain_destroy(d); @@ -1123,10 +1123,10 @@ Index: xen-4.0.1-testing/xen/common/domain.c sched_destroy_domain(d); /* Free page used by xen oprofile buffer. */ -Index: xen-4.0.1-testing/xen/common/domctl.c +Index: xen-4.0.0-testing/xen/common/domctl.c =================================================================== ---- xen-4.0.1-testing.orig/xen/common/domctl.c -+++ xen-4.0.1-testing/xen/common/domctl.c +--- xen-4.0.0-testing.orig/xen/common/domctl.c ++++ xen-4.0.0-testing/xen/common/domctl.c @@ -11,6 +11,7 @@ #include #include @@ -1135,7 +1135,7 @@ Index: xen-4.0.1-testing/xen/common/domctl.c #include #include #include -@@ -141,10 +142,12 @@ void getdomaininfo(struct domain *d, str +@@ -140,10 +141,12 @@ void getdomaininfo(struct domain *d, str info->shared_info_frame = mfn_to_gmfn(d, __pa(d->shared_info)>>PAGE_SHIFT); BUG_ON(SHARED_M2P(info->shared_info_frame)); @@ -1149,7 +1149,7 @@ Index: xen-4.0.1-testing/xen/common/domctl.c { struct domain *d; struct vcpu *v; -@@ -174,7 +177,7 @@ static unsigned int default_vcpu0_locati +@@ -173,7 +176,7 @@ static unsigned int default_vcpu0_locati if ( cpus_weight(per_cpu(cpu_sibling_map, 0)) > 1 ) cpu = next_cpu(cpu, per_cpu(cpu_sibling_map, 0)); cpu_exclude_map = per_cpu(cpu_sibling_map, 0); @@ -1158,7 +1158,7 @@ Index: xen-4.0.1-testing/xen/common/domctl.c { if ( cpu_isset(i, cpu_exclude_map) ) continue; -@@ -389,6 +392,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -388,6 +391,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc domid_t dom; static domid_t rover = 0; unsigned int domcr_flags; @@ -1166,7 +1166,7 @@ Index: xen-4.0.1-testing/xen/common/domctl.c ret = -EINVAL; if ( supervisor_mode_kernel || -@@ -432,7 +436,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -431,7 +435,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc domcr_flags |= DOMCRF_oos_off; ret = -ENOMEM; @@ -1175,7 +1175,7 @@ Index: xen-4.0.1-testing/xen/common/domctl.c if ( d == NULL ) break; -@@ -451,6 +455,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -450,6 +454,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc { struct domain *d; unsigned int i, max = op->u.max_vcpus.max, cpu; @@ -1183,7 +1183,7 @@ Index: xen-4.0.1-testing/xen/common/domctl.c ret = -ESRCH; if ( (d = rcu_lock_domain_by_id(op->domain)) == NULL ) -@@ -499,6 +504,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -498,6 +503,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc goto maxvcpu_out; ret = -ENOMEM; @@ -1191,7 +1191,7 @@ Index: xen-4.0.1-testing/xen/common/domctl.c if ( max > d->max_vcpus ) { struct vcpu **vcpus; -@@ -522,8 +528,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -521,8 +527,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc continue; cpu = (i == 0) ? @@ -1202,32 +1202,10 @@ Index: xen-4.0.1-testing/xen/common/domctl.c if ( alloc_vcpu(d, i, cpu) == NULL ) goto maxvcpu_out; -Index: xen-4.0.1-testing/xen/common/kexec.c +Index: xen-4.0.0-testing/xen/common/sched_credit.c =================================================================== ---- xen-4.0.1-testing.orig/xen/common/kexec.c -+++ xen-4.0.1-testing/xen/common/kexec.c -@@ -235,7 +235,7 @@ void kexec_crash(void) - BUG(); - } - --static long kexec_reboot(void *_image) -+static long kexec_reboot(void *hdl, void *_image) - { - xen_kexec_image_t *image = _image; - -@@ -584,7 +584,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v - { - case KEXEC_TYPE_DEFAULT: - image = &kexec_image[base + pos]; -- ret = continue_hypercall_on_cpu(0, kexec_reboot, image); -+ ret = continue_hypercall_on_cpu(0, NULL, kexec_reboot, image); - break; - case KEXEC_TYPE_CRASH: - kexec_crash(); /* Does not return */ -Index: xen-4.0.1-testing/xen/common/sched_credit.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/common/sched_credit.c -+++ xen-4.0.1-testing/xen/common/sched_credit.c +--- xen-4.0.0-testing.orig/xen/common/sched_credit.c ++++ xen-4.0.0-testing/xen/common/sched_credit.c @@ -70,11 +70,15 @@ /* * Useful macros @@ -2130,10 +2108,10 @@ Index: xen-4.0.1-testing/xen/common/sched_credit.c .tick_suspend = csched_tick_suspend, .tick_resume = csched_tick_resume, -Index: xen-4.0.1-testing/xen/common/sched_sedf.c +Index: xen-4.0.0-testing/xen/common/sched_sedf.c =================================================================== ---- xen-4.0.1-testing.orig/xen/common/sched_sedf.c -+++ xen-4.0.1-testing/xen/common/sched_sedf.c +--- xen-4.0.0-testing.orig/xen/common/sched_sedf.c ++++ xen-4.0.0-testing/xen/common/sched_sedf.c @@ -21,6 +21,9 @@ printk(_a ); \ } while ( 0 ) @@ -2416,10 +2394,10 @@ Index: xen-4.0.1-testing/xen/common/sched_sedf.c .do_schedule = sedf_do_schedule, .pick_cpu = sedf_pick_cpu, .dump_cpu_state = sedf_dump_cpu_state, -Index: xen-4.0.1-testing/xen/common/schedule.c +Index: xen-4.0.0-testing/xen/common/schedule.c =================================================================== ---- xen-4.0.1-testing.orig/xen/common/schedule.c -+++ xen-4.0.1-testing/xen/common/schedule.c +--- xen-4.0.0-testing.orig/xen/common/schedule.c ++++ xen-4.0.0-testing/xen/common/schedule.c @@ -53,10 +53,11 @@ static void poll_timer_fn(void *data); /* This is global for now so that private implementations can reach it */ @@ -2730,7 +2708,7 @@ Index: xen-4.0.1-testing/xen/common/schedule.c /* Block the currently-executing domain until a pertinent event occurs. */ static long do_block(void) { -@@ -783,7 +861,7 @@ long sched_adjust(struct domain *d, stru +@@ -762,7 +840,7 @@ long sched_adjust(struct domain *d, stru struct vcpu *v; long ret; @@ -2739,7 +2717,7 @@ Index: xen-4.0.1-testing/xen/common/schedule.c ((op->cmd != XEN_DOMCTL_SCHEDOP_putinfo) && (op->cmd != XEN_DOMCTL_SCHEDOP_getinfo)) ) return -EINVAL; -@@ -810,7 +888,7 @@ long sched_adjust(struct domain *d, stru +@@ -789,7 +867,7 @@ long sched_adjust(struct domain *d, stru if ( d == current->domain ) vcpu_schedule_lock_irq(current); @@ -2748,7 +2726,7 @@ Index: xen-4.0.1-testing/xen/common/schedule.c TRACE_1D(TRC_SCHED_ADJDOM, d->domain_id); if ( d == current->domain ) -@@ -857,6 +935,7 @@ static void schedule(void) +@@ -836,6 +914,7 @@ static void schedule(void) { struct vcpu *prev = current, *next = NULL; s_time_t now = NOW(); @@ -2756,7 +2734,7 @@ Index: xen-4.0.1-testing/xen/common/schedule.c struct schedule_data *sd; struct task_slice next_slice; -@@ -872,7 +951,7 @@ static void schedule(void) +@@ -851,7 +930,7 @@ static void schedule(void) stop_timer(&sd->s_timer); /* get policy-specific decision on scheduling... */ @@ -2765,7 +2743,7 @@ Index: xen-4.0.1-testing/xen/common/schedule.c next = next_slice.task; -@@ -978,6 +1057,19 @@ static void poll_timer_fn(void *data) +@@ -951,6 +1030,19 @@ static void poll_timer_fn(void *data) vcpu_unblock(v); } @@ -2785,7 +2763,7 @@ Index: xen-4.0.1-testing/xen/common/schedule.c /* Initialise the data structures. */ void __init scheduler_init(void) { -@@ -985,12 +1077,6 @@ void __init scheduler_init(void) +@@ -958,12 +1050,6 @@ void __init scheduler_init(void) open_softirq(SCHEDULE_SOFTIRQ, schedule); @@ -2798,7 +2776,7 @@ Index: xen-4.0.1-testing/xen/common/schedule.c for ( i = 0; schedulers[i] != NULL; i++ ) { ops = *schedulers[i]; -@@ -1004,43 +1090,123 @@ void __init scheduler_init(void) +@@ -977,43 +1063,123 @@ void __init scheduler_init(void) ops = *schedulers[0]; } @@ -2938,10 +2916,10 @@ Index: xen-4.0.1-testing/xen/common/schedule.c } #ifdef CONFIG_COMPAT -Index: xen-4.0.1-testing/xen/common/softirq.c +Index: xen-4.0.0-testing/xen/common/softirq.c =================================================================== ---- xen-4.0.1-testing.orig/xen/common/softirq.c -+++ xen-4.0.1-testing/xen/common/softirq.c +--- xen-4.0.0-testing.orig/xen/common/softirq.c ++++ xen-4.0.0-testing/xen/common/softirq.c @@ -88,9 +88,11 @@ void raise_softirq(unsigned int nr) } @@ -3035,10 +3013,10 @@ Index: xen-4.0.1-testing/xen/common/softirq.c open_softirq(TASKLET_SOFTIRQ, tasklet_action); } -Index: xen-4.0.1-testing/xen/common/sysctl.c +Index: xen-4.0.0-testing/xen/common/sysctl.c =================================================================== ---- xen-4.0.1-testing.orig/xen/common/sysctl.c -+++ xen-4.0.1-testing/xen/common/sysctl.c +--- xen-4.0.0-testing.orig/xen/common/sysctl.c ++++ xen-4.0.0-testing/xen/common/sysctl.c @@ -314,6 +314,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc } break; @@ -3054,11 +3032,11 @@ Index: xen-4.0.1-testing/xen/common/sysctl.c default: ret = arch_do_sysctl(op, u_sysctl); break; -Index: xen-4.0.1-testing/xen/include/asm-x86/domain.h +Index: xen-4.0.0-testing/xen/include/asm-x86/domain.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/asm-x86/domain.h -+++ xen-4.0.1-testing/xen/include/asm-x86/domain.h -@@ -458,7 +458,8 @@ struct arch_vcpu +--- xen-4.0.0-testing.orig/xen/include/asm-x86/domain.h ++++ xen-4.0.0-testing/xen/include/asm-x86/domain.h +@@ -451,7 +451,8 @@ struct arch_vcpu #define hvm_svm hvm_vcpu.u.svm /* Continue the current hypercall via func(data) on specified cpu. */ @@ -3068,10 +3046,10 @@ Index: xen-4.0.1-testing/xen/include/asm-x86/domain.h void vcpu_show_execution_state(struct vcpu *); void vcpu_show_registers(const struct vcpu *); -Index: xen-4.0.1-testing/xen/include/asm-x86/smp.h +Index: xen-4.0.0-testing/xen/include/asm-x86/smp.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/asm-x86/smp.h -+++ xen-4.0.1-testing/xen/include/asm-x86/smp.h +--- xen-4.0.0-testing.orig/xen/include/asm-x86/smp.h ++++ xen-4.0.0-testing/xen/include/asm-x86/smp.h @@ -56,7 +56,6 @@ extern u32 cpu_2_logical_apicid[]; #define CPU_ONLINE 0x0002 /* CPU is up */ #define CPU_DEAD 0x0004 /* CPU is dead */ @@ -3080,10 +3058,10 @@ Index: xen-4.0.1-testing/xen/include/asm-x86/smp.h #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) extern int cpu_down(unsigned int cpu); -Index: xen-4.0.1-testing/xen/include/public/domctl.h +Index: xen-4.0.0-testing/xen/include/public/domctl.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/public/domctl.h -+++ xen-4.0.1-testing/xen/include/public/domctl.h +--- xen-4.0.0-testing.orig/xen/include/public/domctl.h ++++ xen-4.0.0-testing/xen/include/public/domctl.h @@ -60,10 +60,10 @@ struct xen_domctl_createdomain { /* Should domain memory integrity be verifed by tboot during Sx? */ #define _XEN_DOMCTL_CDF_s3_integrity 2 @@ -3112,10 +3090,10 @@ Index: xen-4.0.1-testing/xen/include/public/domctl.h struct xen_domctl { uint32_t cmd; #define XEN_DOMCTL_createdomain 1 -Index: xen-4.0.1-testing/xen/include/public/sysctl.h +Index: xen-4.0.0-testing/xen/include/public/sysctl.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/public/sysctl.h -+++ xen-4.0.1-testing/xen/include/public/sysctl.h +--- xen-4.0.0-testing.orig/xen/include/public/sysctl.h ++++ xen-4.0.0-testing/xen/include/public/sysctl.h @@ -491,6 +491,28 @@ struct xen_sysctl_lockprof_op { typedef struct xen_sysctl_lockprof_op xen_sysctl_lockprof_op_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_lockprof_op_t); @@ -3153,10 +3131,10 @@ Index: xen-4.0.1-testing/xen/include/public/sysctl.h uint8_t pad[128]; } u; }; -Index: xen-4.0.1-testing/xen/include/xen/sched-if.h +Index: xen-4.0.0-testing/xen/include/xen/sched-if.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/sched-if.h -+++ xen-4.0.1-testing/xen/include/xen/sched-if.h +--- xen-4.0.0-testing.orig/xen/include/xen/sched-if.h ++++ xen-4.0.0-testing/xen/include/xen/sched-if.h @@ -10,16 +10,29 @@ #include @@ -3251,10 +3229,10 @@ Index: xen-4.0.1-testing/xen/include/xen/sched-if.h +struct scheduler *scheduler_get_by_id(unsigned int id); + #endif /* __XEN_SCHED_IF_H__ */ -Index: xen-4.0.1-testing/xen/include/xen/sched.h +Index: xen-4.0.0-testing/xen/include/xen/sched.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/sched.h -+++ xen-4.0.1-testing/xen/include/xen/sched.h +--- xen-4.0.0-testing.orig/xen/include/xen/sched.h ++++ xen-4.0.0-testing/xen/include/xen/sched.h @@ -9,6 +9,7 @@ #include #include @@ -3272,7 +3250,7 @@ Index: xen-4.0.1-testing/xen/include/xen/sched.h /* * > 0: a single port is being polled; -@@ -209,6 +208,7 @@ struct domain +@@ -211,6 +210,7 @@ struct domain /* Scheduling. */ void *sched_priv; /* scheduler-specific data */ @@ -3280,7 +3258,7 @@ Index: xen-4.0.1-testing/xen/include/xen/sched.h struct domain *next_in_list; struct domain *next_in_hashbucket; -@@ -381,7 +381,7 @@ static inline struct domain *get_current +@@ -383,7 +383,7 @@ static inline struct domain *get_current } struct domain *domain_create( @@ -3289,7 +3267,7 @@ Index: xen-4.0.1-testing/xen/include/xen/sched.h /* DOMCRF_hvm: Create an HVM domain, as opposed to a PV domain. */ #define _DOMCRF_hvm 0 #define DOMCRF_hvm (1U<<_DOMCRF_hvm) -@@ -469,6 +469,7 @@ int sched_init_vcpu(struct vcpu *v, uns +@@ -471,6 +471,7 @@ int sched_init_vcpu(struct vcpu *v, uns void sched_destroy_vcpu(struct vcpu *v); int sched_init_domain(struct domain *d); void sched_destroy_domain(struct domain *d); @@ -3297,7 +3275,7 @@ Index: xen-4.0.1-testing/xen/include/xen/sched.h long sched_adjust(struct domain *, struct xen_domctl_scheduler_op *); int sched_id(void); void sched_tick_suspend(void); -@@ -576,12 +577,14 @@ void domain_pause_by_systemcontroller(st +@@ -578,12 +579,14 @@ void domain_pause_by_systemcontroller(st void domain_unpause_by_systemcontroller(struct domain *d); void cpu_init(void); @@ -3316,7 +3294,7 @@ Index: xen-4.0.1-testing/xen/include/xen/sched.h void vcpu_runstate_get(struct vcpu *v, struct vcpu_runstate_info *runstate); uint64_t get_cpu_idle_time(unsigned int cpu); -@@ -604,6 +607,18 @@ extern enum cpufreq_controller { +@@ -606,6 +609,18 @@ extern enum cpufreq_controller { FREQCTL_none, FREQCTL_dom0_kernel, FREQCTL_xen } cpufreq_controller; @@ -3335,10 +3313,10 @@ Index: xen-4.0.1-testing/xen/include/xen/sched.h #endif /* __SCHED_H__ */ /* -Index: xen-4.0.1-testing/xen/include/xen/softirq.h +Index: xen-4.0.0-testing/xen/include/xen/softirq.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/softirq.h -+++ xen-4.0.1-testing/xen/include/xen/softirq.h +--- xen-4.0.0-testing.orig/xen/include/xen/softirq.h ++++ xen-4.0.0-testing/xen/include/xen/softirq.h @@ -58,6 +58,7 @@ struct tasklet struct tasklet name = { LIST_HEAD_INIT(name.list), 0, 0, 0, func, data } diff --git a/del_usb_xend_entry.patch b/del_usb_xend_entry.patch index 3114318..a5f2187 100644 --- a/del_usb_xend_entry.patch +++ b/del_usb_xend_entry.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1313,8 +1313,15 @@ class XendDomainInfo: +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -1310,8 +1310,15 @@ class XendDomainInfo: frontpath = self.getDeviceController(deviceClass).frontendPath(dev) backpath = xstransact.Read(frontpath, "backend") thread.start_new_thread(self.getDeviceController(deviceClass).finishDeviceCleanup, (backpath, path)) diff --git a/disable_emulated_device.diff b/disable_emulated_device.diff index 892dbb7..1870b4c 100644 --- a/disable_emulated_device.diff +++ b/disable_emulated_device.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -401,6 +401,11 @@ static int __devinit platform_pci_init(s platform_mmio = mmio_addr; platform_mmiolen = mmio_len; diff --git a/dom-print.patch b/dom-print.patch index c918676..73e7cc7 100644 --- a/dom-print.patch +++ b/dom-print.patch @@ -1,8 +1,6 @@ -Index: xen-4.0.1-testing/xen/arch/x86/domain.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/domain.c -+++ xen-4.0.1-testing/xen/arch/x86/domain.c -@@ -144,15 +144,30 @@ void dump_pageframe_info(struct domain * +--- a/xen/arch/x86/domain.c ++++ b/xen/arch/x86/domain.c +@@ -144,14 +144,29 @@ void dump_pageframe_info(struct domain * printk("Memory pages belonging to domain %u:\n", d->domain_id); @@ -16,7 +14,6 @@ Index: xen-4.0.1-testing/xen/arch/x86/domain.c + unsigned long total[PGT_type_mask + / (PGT_type_mask & -PGT_type_mask) + 1] = {}; + - spin_lock(&d->page_alloc_lock); page_list_for_each ( page, &d->page_list ) { + unsigned int index = (page->u.inuse.type_info & PGT_type_mask) diff --git a/domu-usb-controller.patch b/domu-usb-controller.patch index db697e0..ec1eaa0 100644 --- a/domu-usb-controller.patch +++ b/domu-usb-controller.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py @@ -1861,7 +1861,14 @@ class XendConfig(dict): ports = sxp.child(dev_sxp, 'port') for port in ports[1:]: diff --git a/dump-exec-state.patch b/dump-exec-state.patch index b18425f..bbb9dcb 100644 --- a/dump-exec-state.patch +++ b/dump-exec-state.patch @@ -1,8 +1,6 @@ -Index: xen-4.0.1-testing/xen/arch/ia64/linux-xen/smp.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/ia64/linux-xen/smp.c -+++ xen-4.0.1-testing/xen/arch/ia64/linux-xen/smp.c -@@ -94,6 +94,7 @@ static volatile struct call_data_struct +--- a/xen/arch/ia64/linux-xen/smp.c ++++ b/xen/arch/ia64/linux-xen/smp.c +@@ -94,6 +94,7 @@ static volatile struct call_data_struct #define IPI_CALL_FUNC 0 #define IPI_CPU_STOP 1 @@ -34,10 +32,8 @@ Index: xen-4.0.1-testing/xen/arch/ia64/linux-xen/smp.c int __init setup_profiling_timer (unsigned int multiplier) { -Index: xen-4.0.1-testing/xen/arch/x86/smp.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/smp.c -+++ xen-4.0.1-testing/xen/arch/x86/smp.c +--- a/xen/arch/x86/smp.c ++++ b/xen/arch/x86/smp.c @@ -375,11 +375,24 @@ void smp_send_nmi_allbutself(void) send_IPI_mask(&cpu_online_map, APIC_DM_NMI); } @@ -63,10 +59,8 @@ Index: xen-4.0.1-testing/xen/arch/x86/smp.c set_irq_regs(old_regs); } -Index: xen-4.0.1-testing/xen/common/keyhandler.c -=================================================================== ---- xen-4.0.1-testing.orig/xen/common/keyhandler.c -+++ xen-4.0.1-testing/xen/common/keyhandler.c +--- a/xen/common/keyhandler.c ++++ b/xen/common/keyhandler.c @@ -71,19 +71,52 @@ static struct keyhandler show_handlers_k .desc = "show this message" }; @@ -157,10 +151,8 @@ Index: xen-4.0.1-testing/xen/common/keyhandler.c printk("\n"); -Index: xen-4.0.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h -+++ xen-4.0.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h +--- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h ++++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h @@ -278,7 +278,7 @@ struct switch_stack { # define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) # define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr) @@ -170,10 +162,8 @@ Index: xen-4.0.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h # define guest_kernel_mode(regs) (ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL) # define vmx_guest_kernel_mode(regs) (ia64_psr(regs)->cpl == 0) # define regs_increment_iip(regs) \ -Index: xen-4.0.1-testing/xen/include/asm-x86/hardirq.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/asm-x86/hardirq.h -+++ xen-4.0.1-testing/xen/include/asm-x86/hardirq.h +--- a/xen/include/asm-x86/hardirq.h ++++ b/xen/include/asm-x86/hardirq.h @@ -8,6 +8,7 @@ typedef struct { unsigned long __softirq_pending; unsigned int __local_irq_count; @@ -182,10 +172,8 @@ Index: xen-4.0.1-testing/xen/include/asm-x86/hardirq.h } __cacheline_aligned irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ -Index: xen-4.0.1-testing/xen/include/xen/irq_cpustat.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/irq_cpustat.h -+++ xen-4.0.1-testing/xen/include/xen/irq_cpustat.h +--- a/xen/include/xen/irq_cpustat.h ++++ b/xen/include/xen/irq_cpustat.h @@ -26,5 +26,6 @@ extern irq_cpustat_t irq_stat[]; #define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending) #define local_irq_count(cpu) __IRQ_STAT((cpu), __local_irq_count) @@ -193,11 +181,9 @@ Index: xen-4.0.1-testing/xen/include/xen/irq_cpustat.h +#define state_dump_pending(cpu) __IRQ_STAT((cpu), __state_dump_pending) #endif /* __irq_cpustat_h */ -Index: xen-4.0.1-testing/xen/include/xen/lib.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/lib.h -+++ xen-4.0.1-testing/xen/include/xen/lib.h -@@ -116,4 +116,7 @@ extern int tainted; +--- a/xen/include/xen/lib.h ++++ b/xen/include/xen/lib.h +@@ -111,4 +111,7 @@ extern int tainted; extern char *print_tainted(char *str); extern void add_taint(unsigned); @@ -205,10 +191,8 @@ Index: xen-4.0.1-testing/xen/include/xen/lib.h +void dump_execstate(struct cpu_user_regs *); + #endif /* __LIB_H__ */ -Index: xen-4.0.1-testing/xen/include/xen/smp.h -=================================================================== ---- xen-4.0.1-testing.orig/xen/include/xen/smp.h -+++ xen-4.0.1-testing/xen/include/xen/smp.h +--- a/xen/include/xen/smp.h ++++ b/xen/include/xen/smp.h @@ -13,6 +13,8 @@ extern void smp_send_event_check_mask(co #define smp_send_event_check_cpu(cpu) \ smp_send_event_check_mask(cpumask_of(cpu)) diff --git a/enable_more_nic_pxe.patch b/enable_more_nic_pxe.patch index b62bc81..6961430 100644 --- a/enable_more_nic_pxe.patch +++ b/enable_more_nic_pxe.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/firmware/etherboot/Config +Index: xen-4.0.0-testing/tools/firmware/etherboot/Config =================================================================== ---- xen-4.0.1-testing.orig/tools/firmware/etherboot/Config -+++ xen-4.0.1-testing/tools/firmware/etherboot/Config +--- xen-4.0.0-testing.orig/tools/firmware/etherboot/Config ++++ xen-4.0.0-testing/tools/firmware/etherboot/Config @@ -1,5 +1,5 @@ -NICS = rtl8139 eepro100 @@ -9,10 +9,10 @@ Index: xen-4.0.1-testing/tools/firmware/etherboot/Config CFLAGS += -UPXE_DHCP_STRICT CFLAGS += -DPXE_DHCP_STRICT -Index: xen-4.0.1-testing/tools/firmware/etherboot/eb-roms.h +Index: xen-4.0.0-testing/tools/firmware/etherboot/eb-roms.h =================================================================== ---- xen-4.0.1-testing.orig/tools/firmware/etherboot/eb-roms.h -+++ xen-4.0.1-testing/tools/firmware/etherboot/eb-roms.h +--- xen-4.0.0-testing.orig/tools/firmware/etherboot/eb-roms.h ++++ xen-4.0.0-testing/tools/firmware/etherboot/eb-roms.h @@ -6367,5 +6367,6149 @@ unsigned etherboot[] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, diff --git a/hibernate.patch b/hibernate.patch index 7b647e6..de5345a 100644 --- a/hibernate.patch +++ b/hibernate.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl +Index: xen-4.0.0-testing/tools/firmware/hvmloader/acpi/dsdt.asl =================================================================== ---- xen-4.0.1-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl -+++ xen-4.0.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl +--- xen-4.0.0-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl ++++ xen-4.0.0-testing/tools/firmware/hvmloader/acpi/dsdt.asl @@ -30,21 +30,9 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, /* * S3 (suspend-to-ram), S4 (suspend-to-disc) and S5 (power-off) type codes: diff --git a/hv_tools.patch b/hv_tools.patch index 23985e3..7a86790 100644 --- a/hv_tools.patch +++ b/hv_tools.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c +Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c -+++ xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c +--- xen-4.0.0-testing.orig/tools/python/xen/lowlevel/xc/xc.c ++++ xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c @@ -944,16 +944,16 @@ static PyObject *pyxc_hvm_build(XcObject #endif int i; @@ -32,10 +32,10 @@ Index: xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c return Py_BuildValue("{}"); } -Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py @@ -157,6 +157,7 @@ XENAPI_PLATFORM_CFG_TYPES = { 'nographic': int, 'nomigrate': int, @@ -44,10 +44,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py 'rtc_timeoffset': int, 'parallel': str, 'serial': str, -Index: xen-4.0.1-testing/tools/python/xen/xend/image.py +Index: xen-4.0.0-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.1-testing/tools/python/xen/xend/image.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.0-testing/tools/python/xen/xend/image.py @@ -839,6 +839,7 @@ class HVMImageHandler(ImageHandler): self.apic = int(vmConfig['platform'].get('apic', 0)) @@ -72,10 +72,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/image.py acpi = self.acpi, apic = self.apic) rc['notes'] = { 'SUSPEND_CANCEL': 1 } -Index: xen-4.0.1-testing/tools/python/xen/xm/create.py +Index: xen-4.0.0-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.1-testing/tools/python/xen/xm/create.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.0-testing/tools/python/xen/xm/create.py @@ -242,6 +242,10 @@ gopts.var('viridian', val='VIRIDIAN', use="""Expose Viridian interface to x86 HVM guest? (Default is 0).""") @@ -87,7 +87,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/create.py gopts.var('acpi', val='ACPI', fn=set_int, default=1, use="Disable or enable ACPI of HVM domain.") -@@ -1091,7 +1095,7 @@ def configure_hvm(config_image, vals): +@@ -1083,7 +1087,7 @@ def configure_hvm(config_image, vals): 'timer_mode', 'usb', 'usbdevice', 'vcpus', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten', diff --git a/hv_win7_eoi_bug.patch b/hv_win7_eoi_bug.patch index 6d7ff3a..03343c9 100644 --- a/hv_win7_eoi_bug.patch +++ b/hv_win7_eoi_bug.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c +Index: xen-4.0.0-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hyperv/hv_intercept.c -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hyperv/hv_intercept.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c @@ -33,6 +33,7 @@ #include diff --git a/hv_xen_base.patch b/hv_xen_base.patch index 441075c..5201090 100644 --- a/hv_xen_base.patch +++ b/hv_xen_base.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/domain.h +Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/asm-x86/hvm/domain.h -+++ xen-4.0.1-testing/xen/include/asm-x86/hvm/domain.h +--- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/domain.h ++++ xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h @@ -96,6 +96,7 @@ struct hvm_domain { struct vmx_domain vmx; struct svm_domain svm; @@ -10,10 +10,10 @@ Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/domain.h }; #endif /* __ASM_X86_HVM_DOMAIN_H__ */ -Index: xen-4.0.1-testing/xen/arch/x86/hvm/Makefile +Index: xen-4.0.0-testing/xen/arch/x86/hvm/Makefile =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/hvm/Makefile -+++ xen-4.0.1-testing/xen/arch/x86/hvm/Makefile +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/Makefile ++++ xen-4.0.0-testing/xen/arch/x86/hvm/Makefile @@ -1,5 +1,6 @@ subdir-y += svm subdir-y += vmx @@ -21,10 +21,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/Makefile obj-y += asid.o obj-y += emulate.o -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c +Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c @@ -48,6 +48,7 @@ #include #include @@ -107,7 +107,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c return hvm_funcs.msr_write_intercept(regs); } -@@ -2344,6 +2360,10 @@ int hvm_do_hypercall(struct cpu_user_reg +@@ -2330,6 +2346,10 @@ int hvm_do_hypercall(struct cpu_user_reg case 0: break; } @@ -118,7 +118,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c if ( (eax & 0x80000000) && is_viridian_domain(curr->domain) ) return viridian_hypercall(regs); -@@ -2878,6 +2898,18 @@ long do_hvm_op(unsigned long op, XEN_GUE +@@ -2864,6 +2884,18 @@ long do_hvm_op(unsigned long op, XEN_GUE rc = -EINVAL; break; @@ -137,10 +137,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c } if ( rc == 0 ) -Index: xen-4.0.1-testing/xen/include/public/arch-x86/hvm/save.h +Index: xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/public/arch-x86/hvm/save.h -+++ xen-4.0.1-testing/xen/include/public/arch-x86/hvm/save.h +--- xen-4.0.0-testing.orig/xen/include/public/arch-x86/hvm/save.h ++++ xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h @@ -431,9 +431,24 @@ struct hvm_viridian_context { DECLARE_HVM_SAVE_TYPE(VIRIDIAN, 15, struct hvm_viridian_context); @@ -167,10 +167,10 @@ Index: xen-4.0.1-testing/xen/include/public/arch-x86/hvm/save.h +#define HVM_SAVE_CODE_MAX 17 #endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */ -Index: xen-4.0.1-testing/xen/arch/x86/hvm/vlapic.c +Index: xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/hvm/vlapic.c -+++ xen-4.0.1-testing/xen/arch/x86/hvm/vlapic.c +--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/vlapic.c ++++ xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c @@ -34,6 +34,7 @@ #include #include @@ -187,11 +187,11 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/vlapic.c return X86EMUL_OKAY; } -Index: xen-4.0.1-testing/xen/include/public/hvm/params.h +Index: xen-4.0.0-testing/xen/include/public/hvm/params.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/public/hvm/params.h -+++ xen-4.0.1-testing/xen/include/public/hvm/params.h -@@ -109,6 +109,8 @@ +--- xen-4.0.0-testing.orig/xen/include/public/hvm/params.h ++++ xen-4.0.0-testing/xen/include/public/hvm/params.h +@@ -106,6 +106,8 @@ /* Boolean: Enable aligning all periodic vpts to reduce interrupts */ #define HVM_PARAM_VPT_ALIGN 16 diff --git a/hv_xen_extension.patch b/hv_xen_extension.patch index a355338..aae751a 100644 --- a/hv_xen_extension.patch +++ b/hv_xen_extension.patch @@ -1,7 +1,5 @@ -Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h -=================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h ++++ b/xen/include/asm-x86/hvm/hvm_extensions.h @@ -0,0 +1,183 @@ +/**************************************************************************** + | @@ -186,17 +184,13 @@ Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h +int hyperx_initialize(struct domain *d); + +#endif -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/Makefile -=================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/Makefile ++++ b/xen/arch/x86/hvm/hyperv/Makefile @@ -0,0 +1,2 @@ +obj-y += hv_intercept.o +obj-y += hv_hypercall.o -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h -=================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h ++++ b/xen/arch/x86/hvm/hyperv/hv_errno.h @@ -0,0 +1,62 @@ +/**************************************************************************** + | @@ -260,10 +254,8 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h +#define HV_STATUS_NO_MEMORY_256PAGES 0x0103 +#define HV_STATUS_NO_MEMORY_1024PAGES 0x0104 +#endif -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c -=================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c ++++ b/xen/arch/x86/hvm/hyperv/hv_hypercall.c @@ -0,0 +1,153 @@ +/**************************************************************************** + | @@ -418,10 +410,8 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c + return; + } +} -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h -=================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h ++++ b/xen/arch/x86/hvm/hyperv/hv_hypercall.h @@ -0,0 +1,46 @@ +/**************************************************************************** + | @@ -469,10 +459,8 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h +#define HV_NOTIFY_LONG_SPIN_WAIT 0x0008 + +#endif /* HV_HYPERCALL_H */ -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c -=================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c ++++ b/xen/arch/x86/hvm/hyperv/hv_intercept.c @@ -0,0 +1,1009 @@ +/**************************************************************************** + | @@ -1483,10 +1471,8 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c + hvm_inject_exception(TRAP_gp_fault, 0, 0); + return (1); +} -Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h -=================================================================== --- /dev/null -+++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h ++++ b/xen/arch/x86/hvm/hyperv/hv_shim.h @@ -0,0 +1,286 @@ +/**************************************************************************** + | diff --git a/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch b/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch index 15c5549..c8e19ce 100644 --- a/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch +++ b/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch @@ -17,10 +17,10 @@ qcow2 image (the header is gone after three loop iterations): Signed-off-by: Kevin Wolf -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block-qcow2.c +Index: xen-4.0.0-testing/tools/ioemu-remote/block-qcow2.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block-qcow2.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block-qcow2.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/block-qcow2.c ++++ xen-4.0.0-testing/tools/ioemu-remote/block-qcow2.c @@ -916,7 +916,7 @@ static int alloc_cluster_link_l2(BlockDr goto err; diff --git a/ioemu-bdrv-open-CACHE_WB.patch b/ioemu-bdrv-open-CACHE_WB.patch index 1350a2a..272a524 100644 --- a/ioemu-bdrv-open-CACHE_WB.patch +++ b/ioemu-bdrv-open-CACHE_WB.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c @@ -249,8 +249,11 @@ static int open_disk(struct td_state *s, drv = blktap_drivers[i].drv; DPRINTF("%s driver specified\n", drv ? drv->format_name : "No"); diff --git a/ioemu-blktap-barriers.patch b/ioemu-blktap-barriers.patch index 1c6f411..bbbc1fc 100644 --- a/ioemu-blktap-barriers.patch +++ b/ioemu-blktap-barriers.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c @@ -362,6 +362,15 @@ static void qemu_send_responses(void* op } diff --git a/ioemu-blktap-fv-init.patch b/ioemu-blktap-fv-init.patch index df5fd5b..37db5c3 100644 --- a/ioemu-blktap-fv-init.patch +++ b/ioemu-blktap-fv-init.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_machine_fv.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_machine_fv.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_machine_fv.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_machine_fv.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c @@ -268,6 +268,7 @@ void qemu_invalidate_entry(uint8_t *buff #endif /* defined(MAPCACHE) */ diff --git a/ioemu-blktap-image-format.patch b/ioemu-blktap-image-format.patch index 5aeb136..cb29e79 100644 --- a/ioemu-blktap-image-format.patch +++ b/ioemu-blktap-image-format.patch @@ -15,10 +15,10 @@ Signed-off-by: Kevin Wolf hw/xen_blktap.h | 14 ++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c @@ -220,9 +220,10 @@ static int map_new_dev(struct td_state * return -1; } @@ -64,10 +64,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c msglen = sizeof(msg_hdr_t); msg->type = CTLMSG_IMG_FAIL; msg->len = msglen; -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.h +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.h =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.h -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.h +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.h ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.h @@ -52,4 +52,18 @@ typedef struct fd_list_entry { int init_blktap(void); diff --git a/ioemu-blktap-zero-size.patch b/ioemu-blktap-zero-size.patch index 8a1ba56..88f56d8 100644 --- a/ioemu-blktap-zero-size.patch +++ b/ioemu-blktap-zero-size.patch @@ -12,10 +12,10 @@ Signed-off-by: Kevin Wolf hw/xen_blktap.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c @@ -258,6 +258,12 @@ static int open_disk(struct td_state *s, s->size = bs->total_sectors; s->sector_size = 512; @@ -29,10 +29,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c s->info = ((s->flags & TD_RDONLY) ? VDISK_READONLY : 0); #ifndef QEMU_TOOL -Index: xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/DevController.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/DevController.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py @@ -155,7 +155,7 @@ class DevController: (devid, self.deviceClass)) diff --git a/ioemu-debuginfo.patch b/ioemu-debuginfo.patch index c0261e6..b88354a 100644 --- a/ioemu-debuginfo.patch +++ b/ioemu-debuginfo.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile +Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile +--- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile ++++ xen-4.0.0-testing/tools/ioemu-remote/Makefile @@ -243,7 +243,7 @@ endif install: all $(if $(BUILD_DOCS),install-doc) mkdir -p "$(DESTDIR)$(bindir)" @@ -11,10 +11,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)" -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile.target +Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile.target =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile.target -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile.target +--- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile.target ++++ xen-4.0.0-testing/tools/ioemu-remote/Makefile.target @@ -754,7 +754,7 @@ clean: install: all install-hook diff --git a/ioemu-disable-scsi.patch b/ioemu-disable-scsi.patch index efba103..41ac448 100644 --- a/ioemu-disable-scsi.patch +++ b/ioemu-disable-scsi.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c 2010-02-18 14:08:08.000000000 -0700 ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c 2010-02-18 14:28:59.000000000 -0700 @@ -359,6 +359,8 @@ static void platform_ioport_write(void * case 4: fprintf(logfile, "Disconnect IDE hard disk...\n"); @@ -11,10 +11,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c fprintf(logfile, "Disconnect netifs...\n"); pci_unplug_netifs(); fprintf(logfile, "Shutdown taps...\n"); -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h +Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h +--- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h 2010-02-18 14:08:08.000000000 -0700 ++++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h 2010-02-18 14:44:28.000000000 -0700 @@ -57,6 +57,7 @@ void unset_vram_mapping(void *opaque); #endif @@ -23,10 +23,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h void destroy_hvm_domain(void); void unregister_iomem(target_phys_addr_t start); -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pci.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pci.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/pci.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pci.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pci.c 2010-02-18 14:49:36.000000000 -0700 ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/pci.c 2010-02-18 14:53:47.000000000 -0700 @@ -892,6 +892,50 @@ void pci_unplug_netifs(void) } } diff --git a/ioemu-vnc-resize.patch b/ioemu-vnc-resize.patch index cd98427..ef27832 100644 --- a/ioemu-vnc-resize.patch +++ b/ioemu-vnc-resize.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c +Index: xen-4.0.0-testing/tools/ioemu-remote/vnc.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vnc.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c -@@ -1713,6 +1713,31 @@ static int protocol_client_msg(VncState +--- xen-4.0.0-testing.orig/tools/ioemu-remote/vnc.c ++++ xen-4.0.0-testing/tools/ioemu-remote/vnc.c +@@ -1713,6 +1713,31 @@ static int protocol_client_msg(VncState } set_encodings(vs, (int32_t *)(data + 4), limit); diff --git a/libxen_permissive.patch b/libxen_permissive.patch index 79d6a7b..2f69b3b 100644 --- a/libxen_permissive.patch +++ b/libxen_permissive.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/libxen/src/xen_common.c +Index: xen-4.0.0-testing/tools/libxen/src/xen_common.c =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/src/xen_common.c -+++ xen-4.0.1-testing/tools/libxen/src/xen_common.c +--- xen-4.0.0-testing.orig/tools/libxen/src/xen_common.c ++++ xen-4.0.0-testing/tools/libxen/src/xen_common.c @@ -904,8 +904,15 @@ static void parse_into(xen_session *s, x 0 != strcmp((char *)value_node->children->name, "struct") || value_node->children->children == NULL) diff --git a/magic_ioport_compat.patch b/magic_ioport_compat.patch index 320fe12..179c6be 100644 --- a/magic_ioport_compat.patch +++ b/magic_ioport_compat.patch @@ -2,10 +2,10 @@ Make our PV drivers work with older hosts that do not recognize the new PV driv Signed-off-by: K. Y. Srinivasan -Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -320,7 +320,10 @@ static int check_platform_magic(struct d if (magic != XEN_IOPORT_MAGIC_VAL) { diff --git a/multi-xvdp.patch b/multi-xvdp.patch deleted file mode 100644 index 0da4e79..0000000 --- a/multi-xvdp.patch +++ /dev/null @@ -1,87 +0,0 @@ -Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py -=================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py -+++ xen-4.0.1-testing/tools/python/xen/util/blkif.py -@@ -19,10 +19,12 @@ def blkdev_name_to_number(name): - devname = 'virtual-device' - devnum = None - -+ """ - try: - return (devname, os.stat(n).st_rdev) - except Exception, ex: - pass -+ """ - - scsi_major = [ 8, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135 ] - if re.match( '/dev/sd[a-z]([1-9]|1[0-5])?$', n): -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -73,7 +73,7 @@ from xen.xend.XendPSCSI import XendPSCSI - from xen.xend.XendDSCSI import XendDSCSI, XendDSCSI_HBA - - MIGRATE_TIMEOUT = 30.0 --BOOTLOADER_LOOPBACK_DEVICE = '/dev/xvdp' -+BOOTLOADER_LOOPBACK_DEVICES = ['/dev/xvdy', '/dev/xvdx', '/dev/xvdw', '/dev/xvdv', '/dev/xvdu', '/dev/xvdt', '/dev/xvds', '/dev/xvdr', '/dev/xvdq', '/dev/xvdp', '/dev/xvdo', '/dev/xvdn', '/dev/xvdm', '/dev/xvdl', '/dev/xvdk', '/dev/xvdj', '/dev/xvdi', '/dev/xvdh', '/dev/xvdg', '/dev/xvdf', '/dev/xvde', '/dev/xvdd'] - - xc = xen.lowlevel.xc.xc() - xoptions = XendOptions.instance() -@@ -3314,20 +3314,27 @@ class XendDomainInfo: - # This is a file, not a device. pygrub can cope with a - # file if it's raw, but if it's QCOW or other such formats - # used through blktap, then we need to mount it first. -- -- log.info("Mounting %s on %s." % -- (fn, BOOTLOADER_LOOPBACK_DEVICE)) -- -- vbd = { -- 'mode': 'RW', -- 'device': BOOTLOADER_LOOPBACK_DEVICE, -- } -- -- from xen.xend import XendDomain -- dom0 = XendDomain.instance().privilegedDomain() -- vbd_uuid = dom0.create_vbd(vbd, disk) -- dom0._waitForDeviceFrontUUID(vbd_uuid) -- fn = BOOTLOADER_LOOPBACK_DEVICE -+ # Try all possible loopback_devices -+ for loopback_device in BOOTLOADER_LOOPBACK_DEVICES: -+ log.info("Mounting %s on %s." % (fn, loopback_device)) -+ vbd = { 'mode' : 'RW', 'device' : loopback_device, } -+ try: -+ from xen.xend import XendDomain -+ dom0 = XendDomain.instance().privilegedDomain() -+ vbd_uuid = dom0.create_vbd(vbd, disk) -+ dom0._waitForDeviceFrontUUID(vbd_uuid) -+ fn = loopback_device -+ break -+ except VmError, e: -+ if str(e).find('already connected.') != -1: -+ continue -+ elif str(e).find('isn\'t accessible') != -1: -+ dom0.destroyDevice('vbd', loopback_device, force = True, rm_cfg = True) -+ continue -+ else: -+ raise -+ else: -+ raise - - try: - blcfg = bootloader(blexec, fn, self, False, -@@ -3335,11 +3342,11 @@ class XendDomainInfo: - finally: - if mounted: - log.info("Unmounting %s from %s." % -- (fn, BOOTLOADER_LOOPBACK_DEVICE)) -+ (fn, loopback_device)) - if devtype in ['tap', 'tap2']: -- dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True) -+ dom0.destroyDevice('tap', loopback_device, rm_cfg = True) - else: -- dom0.destroyDevice('vbd', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True) -+ dom0.destroyDevice('vbd', loopback_device, rm_cfg = True) - - if blcfg is None: - msg = "Had a bootloader specified, but can't find disk" diff --git a/network-nat-open-SuSEfirewall2-FORWARD.patch b/network-nat-open-SuSEfirewall2-FORWARD.patch index b9167de..50b9e2b 100644 --- a/network-nat-open-SuSEfirewall2-FORWARD.patch +++ b/network-nat-open-SuSEfirewall2-FORWARD.patch @@ -1,9 +1,9 @@ Open SuSEfirewall2 FORWARD rule when use xen nat -Index: xen-4.0.1-testing/tools/hotplug/Linux/network-nat +Index: xen-4.0.0-testing/tools/hotplug/Linux/network-nat =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-nat -+++ xen-4.0.1-testing/tools/hotplug/Linux/network-nat +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-nat ++++ xen-4.0.0-testing/tools/hotplug/Linux/network-nat @@ -83,6 +83,7 @@ function dhcp_stop() op_start() { echo 1 >/proc/sys/net/ipv4/ip_forward diff --git a/network-nat.patch b/network-nat.patch index 7e613ec..92c016a 100644 --- a/network-nat.patch +++ b/network-nat.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/network-nat +Index: xen-4.0.0-testing/tools/hotplug/Linux/network-nat =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-nat -+++ xen-4.0.1-testing/tools/hotplug/Linux/network-nat +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-nat ++++ xen-4.0.0-testing/tools/hotplug/Linux/network-nat @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash diff --git a/network-route.patch b/network-route.patch index 4ca15f0..d4bb037 100644 --- a/network-route.patch +++ b/network-route.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/network-route +Index: xen-4.0.0-testing/tools/hotplug/Linux/network-route =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-route -+++ xen-4.0.1-testing/tools/hotplug/Linux/network-route +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-route ++++ xen-4.0.0-testing/tools/hotplug/Linux/network-route @@ -22,7 +22,7 @@ dir=$(dirname "$0") evalVariables "$@" diff --git a/passthrough-hotplug-segfault.patch b/passthrough-hotplug-segfault.patch new file mode 100644 index 0000000..818bc25 --- /dev/null +++ b/passthrough-hotplug-segfault.patch @@ -0,0 +1,90 @@ + +Subject: passthrough: fix segmentation fault after hotplug pass-through device +From: Ian Jackson ian.jackson@eu.citrix.com Tue Apr 13 12:07:33 2010 +0100 +Date: Tue Apr 13 12:07:33 2010 +0100: +Git: b5160622517fb2d16d0836172a2e34633c9d94bf + +This patch fixed the QEMU segmentation fault after hotplug +pass-through devices with MSI-X for many times. + +There is a wrong boundary check in cpu_register_io_memory that uses +io_index rather than io_mem_nb. After many times of hotplug of MSI-X +pass-through device, io_mem_read[] got extended to overwrite mmio_cnt, +then cause QEMU segmentation fault. + +This fix sync with upstream QEMU code in exec.c, and free unused +io_mem_XXX element after hot removal. + +Signed-off-by: Zhai Edwin + +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pt-msi.c +=================================================================== +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pt-msi.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/pt-msi.c +@@ -623,5 +623,11 @@ void pt_msix_delete(struct pt_dev *dev) + dev->msix->table_offset_adjust); + } + ++ if (dev->msix->mmio_index > 0) ++ { ++ cpu_unregister_io_memory(dev->msix->mmio_index); ++ } ++ ++ + free(dev->msix); + } +Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/exec-dm.c +=================================================================== +--- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/exec-dm.c ++++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/exec-dm.c +@@ -125,7 +125,7 @@ unsigned long qemu_host_page_mask; + CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; + CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; + void *io_mem_opaque[IO_MEM_NB_ENTRIES]; +-static int io_mem_nb = 1; ++char io_mem_used[IO_MEM_NB_ENTRIES]; + + /* log support */ + FILE *logfile; +@@ -310,6 +310,20 @@ void cpu_register_physical_memory(target + mmio[mmio_cnt++].size = size; + } + ++static int get_free_io_mem_idx(void) ++{ ++ int i; ++ ++ /* Leave 1st element empty */ ++ for (i = 1; i= IO_MEM_NB_ENTRIES) +- return -1; +- io_index = io_mem_nb++; ++ io_index = get_free_io_mem_idx(); ++ if (io_index == -1) ++ return io_index; + } else { + if (io_index >= IO_MEM_NB_ENTRIES) + return -1; +@@ -357,6 +371,7 @@ void cpu_unregister_io_memory(int io_tab + io_mem_write[io_index][i] = NULL; + } + io_mem_opaque[io_index] = NULL; ++ io_mem_used[io_index] = 0; + } + + void cpu_physical_memory_set_dirty(ram_addr_t addr) diff --git a/popen2-argument-fix.patch b/popen2-argument-fix.patch index b7cce00..ad4e6ec 100644 --- a/popen2-argument-fix.patch +++ b/popen2-argument-fix.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py +Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py -+++ xen-4.0.1-testing/tools/python/xen/util/blkif.py +--- xen-4.0.0-testing.orig/tools/python/xen/util/blkif.py ++++ xen-4.0.0-testing/tools/python/xen/util/blkif.py @@ -81,7 +81,7 @@ def parse_uname(uname): if typ == "drbd": diff --git a/pv-driver-build.patch b/pv-driver-build.patch index 599aaac..8e05029 100644 --- a/pv-driver-build.patch +++ b/pv-driver-build.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild +Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild =================================================================== ---- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/blkfront/Kbuild -+++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild +--- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/blkfront/Kbuild ++++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild @@ -3,3 +3,4 @@ include $(M)/overrides.mk obj-m += xen-vbd.o diff --git a/pvdrv-import-shared-info.patch b/pvdrv-import-shared-info.patch index 56f1716..b172f2c 100644 --- a/pvdrv-import-shared-info.patch +++ b/pvdrv-import-shared-info.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c +Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c =================================================================== ---- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/evtchn.c -+++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c +--- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/evtchn.c ++++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c @@ -40,7 +40,9 @@ #include #endif @@ -12,10 +12,10 @@ Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c #define is_valid_evtchn(x) ((x) != 0) #define evtchn_from_irq(x) (irq_evtchn[irq].evtchn) -Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -77,7 +77,6 @@ static uint64_t callback_via; static int __devinit init_xen_info(void) { @@ -44,10 +44,10 @@ Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci. return 0; } -Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h +Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h =================================================================== ---- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h -+++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h +--- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h ++++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h @@ -27,6 +27,11 @@ unsigned long alloc_xen_mmio(unsigned long len); void platform_pci_resume(void); diff --git a/pvdrv_emulation_control.patch b/pvdrv_emulation_control.patch index 576f4fb..c999e5c 100644 --- a/pvdrv_emulation_control.patch +++ b/pvdrv_emulation_control.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c @@ -365,6 +365,19 @@ static void platform_ioport_write(void * net_tap_shutdown_all(); fprintf(logfile, "Done.\n"); diff --git a/qemu-dm-segfault.patch b/qemu-dm-segfault.patch index 8c54410..573ac19 100644 --- a/qemu-dm-segfault.patch +++ b/qemu-dm-segfault.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ide.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/ide.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/ide.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ide.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/ide.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/ide.c @@ -935,8 +935,9 @@ static inline void ide_dma_submit_check( static inline void ide_set_irq(IDEState *s) diff --git a/qemu-security-etch1.diff b/qemu-security-etch1.diff index e9e704f..62cc0d5 100644 --- a/qemu-security-etch1.diff +++ b/qemu-security-etch1.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ne2000.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/ne2000.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/ne2000.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ne2000.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/ne2000.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/ne2000.c @@ -218,7 +218,7 @@ static int ne2000_can_receive(void *opaq NE2000State *s = opaque; @@ -11,10 +11,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ne2000.c return !ne2000_buffer_full(s); } -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pc.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pc.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/pc.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pc.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pc.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/pc.c @@ -409,7 +409,8 @@ static void bochs_bios_write(void *opaqu case 0x400: case 0x401: diff --git a/serial-split.patch b/serial-split.patch index 5d4c6cc..89f0cce 100644 --- a/serial-split.patch +++ b/serial-split.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/misc/serial-split/Makefile +Index: xen-4.0.0-testing/tools/misc/serial-split/Makefile =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/misc/serial-split/Makefile ++++ xen-4.0.0-testing/tools/misc/serial-split/Makefile @@ -0,0 +1,20 @@ +CC ?= gcc +CFLAGS ?= -Wall -Os @@ -23,10 +23,10 @@ Index: xen-4.0.1-testing/tools/misc/serial-split/Makefile + +%.o: %.c Makefile + $(CC) $(CFLAGS) -c -o $@ $< -Index: xen-4.0.1-testing/tools/misc/serial-split/serial-split.c +Index: xen-4.0.0-testing/tools/misc/serial-split/serial-split.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/misc/serial-split/serial-split.c ++++ xen-4.0.0-testing/tools/misc/serial-split/serial-split.c @@ -0,0 +1,422 @@ +/* + * serial-split.c diff --git a/snapshot-ioemu-delete.patch b/snapshot-ioemu-delete.patch index aefc7d8..11dccdd 100644 --- a/snapshot-ioemu-delete.patch +++ b/snapshot-ioemu-delete.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c -@@ -935,6 +935,18 @@ static void xenstore_process_dm_command_ +--- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c ++++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +@@ -912,6 +912,18 @@ static void xenstore_process_dm_command_ } snapshot_name = xs_read(xsh, XBT_NULL, path, &len); @@ -21,10 +21,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c } else if (!strncmp(command, "continue", len)) { fprintf(logfile, "dm-command: continue after state save\n"); xen_pause_requested = 0; -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c +Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/savevm.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/savevm.c ++++ xen-4.0.0-testing/tools/ioemu-remote/savevm.c @@ -1096,6 +1096,35 @@ the_end: return ret; } @@ -61,10 +61,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c #ifndef CONFIG_DM void do_savevm(const char *name) -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h +Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h +--- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h ++++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h @@ -42,6 +42,7 @@ enum { /* xen-vl-extra.c */ diff --git a/snapshot-ioemu-restore.patch b/snapshot-ioemu-restore.patch index 9c589c9..54e63b8 100644 --- a/snapshot-ioemu-restore.patch +++ b/snapshot-ioemu-restore.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/blktap/drivers/blktapctrl.c +Index: xen-4.0.0-testing/tools/blktap/drivers/blktapctrl.c =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap/drivers/blktapctrl.c -+++ xen-4.0.1-testing/tools/blktap/drivers/blktapctrl.c +--- xen-4.0.0-testing.orig/tools/blktap/drivers/blktapctrl.c ++++ xen-4.0.0-testing/tools/blktap/drivers/blktapctrl.c @@ -348,6 +348,7 @@ static int write_msg(int fd, int msgtype msg_dev = (msg_newdev_t *)(buf + sizeof(msg_hdr_t)); msg_dev->devnum = blkif->minor; @@ -10,10 +10,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/blktapctrl.c break; -Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h +Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap/lib/blktaplib.h -+++ xen-4.0.1-testing/tools/blktap/lib/blktaplib.h +--- xen-4.0.0-testing.orig/tools/blktap/lib/blktaplib.h ++++ xen-4.0.0-testing/tools/blktap/lib/blktaplib.h @@ -189,6 +189,7 @@ typedef struct msg_hdr { typedef struct msg_newdev { uint8_t devnum; @@ -22,10 +22,10 @@ Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h } msg_newdev_t; typedef struct msg_pid { -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c @@ -67,6 +67,8 @@ int write_fd; static pid_t process; fd_list_entry_t *fd_start = NULL; @@ -87,10 +87,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c memset(buf, 0x00, MSG_SIZE); msglen = sizeof(msg_hdr_t); -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c ++++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c @@ -103,6 +103,8 @@ int xenstore_watch_new_callback(const ch } @@ -100,11 +100,11 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c static int pasprintf(char **buf, const char *fmt, ...) { va_list ap; -@@ -666,8 +668,33 @@ void xenstore_parse_domain_config(int hv - - fprintf(stderr, "Using file %s in read-%s mode\n", bs->filename, is_readonly ? "only" : "write"); - -- if (bdrv_open2(bs, params, flags, format) < 0) +@@ -644,8 +646,33 @@ void xenstore_parse_domain_config(int hv + } + } + pstrcpy(bs->filename, sizeof(bs->filename), params); +- if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) + if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0"); + } else { @@ -135,7 +135,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c } #endif -@@ -802,6 +829,23 @@ int xenstore_parse_disable_pf_config () +@@ -779,6 +806,23 @@ int xenstore_parse_disable_pf_config () return disable_pf; } diff --git a/snapshot-ioemu-save.patch b/snapshot-ioemu-save.patch index ac7f094..27aa63d 100644 --- a/snapshot-ioemu-save.patch +++ b/snapshot-ioemu-save.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c +Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/savevm.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/savevm.c ++++ xen-4.0.0-testing/tools/ioemu-remote/savevm.c @@ -28,6 +28,7 @@ #include "sysemu.h" #include "qemu-timer.h" @@ -97,10 +97,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c #ifndef CONFIG_DM void do_savevm(const char *name) -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/helper2.c +Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/helper2.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/i386-dm/helper2.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/helper2.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/helper2.c ++++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/helper2.c @@ -112,6 +112,9 @@ int send_vcpu = 0; //the evtchn port for polling the notification, evtchn_port_t *ioreq_local_port; @@ -167,10 +167,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/helper2.c /* Wait to be allowed to continue */ while (xen_pause_requested) { -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h +Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h +--- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h ++++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h @@ -34,6 +34,15 @@ void qemu_invalidate_map_cache(void) #define mapcache_lock() ((void)0) #define mapcache_unlock() ((void)0) @@ -195,10 +195,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h void xenstore_check_new_media_present(int timeout); void xenstore_write_vncport(int vnc_display); void xenstore_read_vncpasswd(int domid, char *pwbuf, size_t pwbuflen); -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c ++++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c @@ -17,6 +17,7 @@ #include "exec-all.h" @@ -207,7 +207,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c #include "console.h" #include "hw.h" -@@ -862,6 +863,7 @@ static void xenstore_process_dm_command_ +@@ -839,6 +840,7 @@ static void xenstore_process_dm_command_ { char *path = NULL, *command = NULL, *par = NULL; unsigned int len; @@ -215,7 +215,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c if (pasprintf(&path, "/local/domain/0/device-model/%u/command", domid) == -1) { -@@ -877,7 +879,18 @@ static void xenstore_process_dm_command_ +@@ -854,7 +856,18 @@ static void xenstore_process_dm_command_ if (!strncmp(command, "save", len)) { fprintf(logfile, "dm-command: pause and save state\n"); @@ -235,7 +235,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c } else if (!strncmp(command, "continue", len)) { fprintf(logfile, "dm-command: continue after state save\n"); xen_pause_requested = 0; -@@ -1010,6 +1023,13 @@ void xenstore_record_dm_state(const char +@@ -987,6 +1000,13 @@ void xenstore_record_dm_state(const char xenstore_record_dm("state", state); } diff --git a/snapshot-xend.patch b/snapshot-xend.patch index 0d11d6a..7a22802 100644 --- a/snapshot-xend.patch +++ b/snapshot-xend.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/image.py +Index: xen-4.0.0-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.1-testing/tools/python/xen/xend/image.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.0-testing/tools/python/xen/xend/image.py @@ -490,7 +490,7 @@ class ImageHandler: domains.domains_lock.acquire() @@ -43,10 +43,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/image.py def recreate(self): if self.device_model is None: return -Index: xen-4.0.1-testing/tools/python/xen/xend/server/blkif.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/blkif.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/blkif.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/blkif.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/blkif.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/blkif.py @@ -88,6 +88,9 @@ class BlkifController(DevController): if bootable != None: back['bootable'] = str(bootable) @@ -57,10 +57,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/blkif.py if security.on() == xsconstants.XS_POLICY_USE: self.do_access_control(config, uname) -Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py @@ -95,6 +95,31 @@ class SrvDomain(SrvDir): def do_save(self, _, req): return self.xd.domain_save(self.dom.domid, req.args['file'][0]) @@ -102,10 +102,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py return self.perform(req) # -Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py @@ -65,7 +65,7 @@ def insert_after(list, pred, value): return @@ -321,10 +321,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py if not paused: dominfo.unpause() -Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py @@ -242,6 +242,7 @@ XENAPI_CFG_TYPES = { 'memory_sharing': int, 'Description': str, @@ -333,10 +333,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py } # List of legacy configuration keys that have no equivalent in the -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py @@ -53,6 +53,7 @@ from xen.xend.xenstore.xstransact import from xen.xend.xenstore.xswatch import xswatch from xen.util import mkdir, rwlock @@ -533,10 +533,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py def domain_pincpu(self, domid, vcpu, cpumap): """Set which cpus vcpu can use -Index: xen-4.0.1-testing/tools/python/xen/xm/main.py +Index: xen-4.0.0-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.1-testing/tools/python/xen/xm/main.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.0-testing/tools/python/xen/xm/main.py @@ -123,6 +123,14 @@ SUBCOMMAND_HELP = { 'Restore a domain from a saved state.'), 'save' : ('[-c|-f] ', @@ -647,7 +647,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/main.py def xm_save(args): arg_check(args, "save", 2, 4) -@@ -3743,6 +3818,10 @@ commands = { +@@ -3729,6 +3804,10 @@ commands = { "restore": xm_restore, "resume": xm_resume, "save": xm_save, diff --git a/supported_module.diff b/supported_module.diff index 196360b..b72f0ac 100644 --- a/supported_module.diff +++ b/supported_module.diff @@ -2,10 +2,10 @@ Make our PV drivers "Novell supported modules" Signed-off-by: K. Y. Srinivasan -Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/Module.supported +Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/Module.supported =================================================================== --- /dev/null -+++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/Module.supported ++++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/Module.supported @@ -0,0 +1,5 @@ +xen-vbd +xen-platform-pci diff --git a/suse-disable-tap2-default.patch b/suse-disable-tap2-default.patch new file mode 100644 index 0000000..adb469c --- /dev/null +++ b/suse-disable-tap2-default.patch @@ -0,0 +1,32 @@ +Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +=================================================================== +--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.0-testing/tools/python/xen/xm/main.py +@@ -2522,8 +2522,10 @@ def xm_usb_list_assignable_devices(args) + def parse_block_configuration(args): + dom = args[0] + +- if args[1].startswith('tap:'): ++ if args[1].startswith('tap2:'): + cls = 'tap2' ++ elif args[1].startswith('tap:'): ++ cls = 'tap' + else: + cls = 'vbd' + +Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +=================================================================== +--- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.0-testing/tools/python/xen/xm/create.py +@@ -783,8 +783,10 @@ def configure_disks(config_devs, vals): + """Create the config for disks (virtual block devices). + """ + for (uname, dev, mode, backend, protocol) in vals.disk: +- if uname.startswith('tap:'): ++ if uname.startswith('tap2:'): + cls = 'tap2' ++ elif uname.startswith('tap:'): ++ cls = 'tap' + else: + cls = 'vbd' + diff --git a/tapdisk-ioemu-logfile.patch b/tapdisk-ioemu-logfile.patch index 4b7652c..407174f 100644 --- a/tapdisk-ioemu-logfile.patch +++ b/tapdisk-ioemu-logfile.patch @@ -11,11 +11,11 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c +Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c -@@ -78,15 +78,22 @@ int main(void) +--- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c ++++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +@@ -78,15 +78,22 @@ int main(void) struct timeval tv; void *old_fd_start = NULL; diff --git a/tapdisk-ioemu-shutdown-fix.patch b/tapdisk-ioemu-shutdown-fix.patch index 55913ea..493c074 100644 --- a/tapdisk-ioemu-shutdown-fix.patch +++ b/tapdisk-ioemu-shutdown-fix.patch @@ -16,10 +16,10 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c @@ -65,6 +65,7 @@ int read_fd; int write_fd; @@ -46,10 +46,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c case CTLMSG_PID: memset(buf, 0x00, MSG_SIZE); -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c +Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c ++++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c @@ -14,6 +14,7 @@ extern void qemu_aio_init(void); extern void qemu_aio_poll(void); diff --git a/tmp_build.patch b/tmp_build.patch index 64425d1..cf004a7 100644 --- a/tmp_build.patch +++ b/tmp_build.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/xenstore/Makefile +Index: xen-4.0.0-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.1-testing/tools/xenstore/Makefile +--- xen-4.0.0-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.0-testing/tools/xenstore/Makefile @@ -61,6 +61,7 @@ $(CLIENTS_DOMU): xenstore xenstore: xenstore_client.o $(LIBXENSTORE) diff --git a/tools-gdbserver-build.diff b/tools-gdbserver-build.diff index 10c1b30..90991a6 100644 --- a/tools-gdbserver-build.diff +++ b/tools-gdbserver-build.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in +Index: xen-4.0.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in =================================================================== ---- xen-4.0.1-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in -+++ xen-4.0.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in +--- xen-4.0.0-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in ++++ xen-4.0.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in @@ -90,7 +90,7 @@ INCLUDE_CFLAGS = -I. -I${srcdir} -I$(src GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS} #PROFILE_CFLAGS = -pg @@ -11,7 +11,7 @@ Index: xen-4.0.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/M # CFLAGS is specifically reserved for setting from the command line # when running make. I.E. "make CFLAGS=-Wmissing-prototypes". -@@ -260,7 +260,7 @@ linux-low.o: linux-low.c $(linux_low_h) +@@ -260,7 +260,7 @@ linux-low.o: linux-low.c $(linux_low_h) $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@ linux-xen-low.o: linux-xen-low.c $(linux_low_h) $(server_h) diff --git a/tools-kboot.diff b/tools-kboot.diff index dc73508..a074251 100644 --- a/tools-kboot.diff +++ b/tools-kboot.diff @@ -13,10 +13,10 @@ Signed-off-by: Gerd Hoffmann tools/kboot/select-kernel | 59 + 9 files changed, 2111 insertions(+) -Index: xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 +Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 =================================================================== --- /dev/null -+++ xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 ++++ xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 @@ -0,0 +1,874 @@ +# +# Automatically generated make config: don't edit @@ -892,10 +892,10 @@ Index: xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 +CONFIG_X86_NO_TSS=y +CONFIG_X86_NO_IDT=y +CONFIG_KTIME_SCALAR=y -Index: xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 +Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 =================================================================== --- /dev/null -+++ xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 ++++ xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 @@ -0,0 +1,653 @@ +# +# Automatically generated make config: don't edit @@ -1550,17 +1550,17 @@ Index: xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 +# CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y -Index: xen-4.0.1-testing/buildconfigs/mk.linux-2.6-xenUboot +Index: xen-4.0.0-testing/buildconfigs/mk.linux-2.6-xenUboot =================================================================== --- /dev/null -+++ xen-4.0.1-testing/buildconfigs/mk.linux-2.6-xenUboot ++++ xen-4.0.0-testing/buildconfigs/mk.linux-2.6-xenUboot @@ -0,0 +1,2 @@ +EXTRAVERSION = xenUboot +include buildconfigs/mk.linux-2.6-xen -Index: xen-4.0.1-testing/tools/kboot/Makefile +Index: xen-4.0.0-testing/tools/kboot/Makefile =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/kboot/Makefile ++++ xen-4.0.0-testing/tools/kboot/Makefile @@ -0,0 +1,23 @@ +# +# tools/kboot/Makefile @@ -1585,10 +1585,10 @@ Index: xen-4.0.1-testing/tools/kboot/Makefile +kboot.initramfs: mkinitramfs init select-kernel ../xcutils/xc_kexec + sh ./mkinitramfs | tee $@ + -Index: xen-4.0.1-testing/tools/kboot/README +Index: xen-4.0.0-testing/tools/kboot/README =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/kboot/README ++++ xen-4.0.0-testing/tools/kboot/README @@ -0,0 +1,43 @@ + +This is a simple kexec-based boot loader @@ -1633,10 +1633,10 @@ Index: xen-4.0.1-testing/tools/kboot/README + +-- +Gerd Hoffmann -Index: xen-4.0.1-testing/tools/kboot/init +Index: xen-4.0.0-testing/tools/kboot/init =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/kboot/init ++++ xen-4.0.0-testing/tools/kboot/init @@ -0,0 +1,309 @@ +#!/bin/sh + @@ -1947,10 +1947,10 @@ Index: xen-4.0.1-testing/tools/kboot/init +msg "bye ..." +banner "boot $guestos" +xc_kexec -e -Index: xen-4.0.1-testing/tools/kboot/mkinitramfs +Index: xen-4.0.0-testing/tools/kboot/mkinitramfs =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/kboot/mkinitramfs ++++ xen-4.0.0-testing/tools/kboot/mkinitramfs @@ -0,0 +1,111 @@ +#!/bin/sh + @@ -2063,10 +2063,10 @@ Index: xen-4.0.1-testing/tools/kboot/mkinitramfs + echo "file $LIB/$(basename $lib) $lib 0755 0 0" +done +echo -Index: xen-4.0.1-testing/tools/kboot/select-kernel +Index: xen-4.0.0-testing/tools/kboot/select-kernel =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/kboot/select-kernel ++++ xen-4.0.0-testing/tools/kboot/select-kernel @@ -0,0 +1,59 @@ +#!/bin/sh + @@ -2127,10 +2127,10 @@ Index: xen-4.0.1-testing/tools/kboot/select-kernel +msg "using $kernelname" +echo "$kernelname" + -Index: xen-4.0.1-testing/make-kboot +Index: xen-4.0.0-testing/make-kboot =================================================================== --- /dev/null -+++ xen-4.0.1-testing/make-kboot ++++ xen-4.0.0-testing/make-kboot @@ -0,0 +1,37 @@ +#!/bin/sh + diff --git a/tools-xc_kexec.diff b/tools-xc_kexec.diff index 1553d27..8fc3ec3 100644 --- a/tools-xc_kexec.diff +++ b/tools-xc_kexec.diff @@ -23,10 +23,10 @@ Signed-off-by: Gerd Hoffmann tools/xcutils/xc_kexec.c | 503 +++++++++++++++ 19 files changed, 4988 insertions(+), 2 deletions(-) -Index: xen-4.0.1-testing/tools/xcutils/Makefile +Index: xen-4.0.0-testing/tools/xcutils/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/xcutils/Makefile -+++ xen-4.0.1-testing/tools/xcutils/Makefile +--- xen-4.0.0-testing.orig/tools/xcutils/Makefile ++++ xen-4.0.0-testing/tools/xcutils/Makefile @@ -14,7 +14,7 @@ include $(XEN_ROOT)/tools/Rules.mk CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) @@ -55,10 +55,10 @@ Index: xen-4.0.1-testing/tools/xcutils/Makefile + make -C helper clean -include $(DEPS) -Index: xen-4.0.1-testing/tools/xcutils/helper/Makefile +Index: xen-4.0.0-testing/tools/xcutils/helper/Makefile =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/Makefile ++++ xen-4.0.0-testing/tools/xcutils/helper/Makefile @@ -0,0 +1,39 @@ + +XEN_ROOT = ../../.. @@ -99,10 +99,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/Makefile +# dependencies + +$(XEN_TARGET_ARCH)/entry.o: $(XEN_TARGET_ARCH)/entry.S $(XEN_TARGET_ARCH)/offsets.h -Index: xen-4.0.1-testing/tools/xcutils/helper/console.c +Index: xen-4.0.0-testing/tools/xcutils/helper/console.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/console.c ++++ xen-4.0.0-testing/tools/xcutils/helper/console.c @@ -0,0 +1,69 @@ +#include + @@ -173,10 +173,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/console.c + + return printed_len; +} -Index: xen-4.0.1-testing/tools/xcutils/helper/ctype.c +Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/ctype.c ++++ xen-4.0.0-testing/tools/xcutils/helper/ctype.c @@ -0,0 +1,35 @@ +/* + * linux/lib/ctype.c @@ -213,10 +213,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/ctype.c +_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */ + +EXPORT_SYMBOL(_ctype); -Index: xen-4.0.1-testing/tools/xcutils/helper/ctype.h +Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/ctype.h ++++ xen-4.0.0-testing/tools/xcutils/helper/ctype.h @@ -0,0 +1,54 @@ +#ifndef _LINUX_CTYPE_H +#define _LINUX_CTYPE_H @@ -272,10 +272,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/ctype.h +#define toupper(c) __toupper(c) + +#endif -Index: xen-4.0.1-testing/tools/xcutils/helper/helper.h +Index: xen-4.0.0-testing/tools/xcutils/helper/helper.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/helper.h ++++ xen-4.0.0-testing/tools/xcutils/helper/helper.h @@ -0,0 +1,107 @@ +#include +#include @@ -384,10 +384,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/helper.h +int sprintf(char * buf, const char *fmt, ...); +int vsscanf(const char * buf, const char * fmt, va_list args); +int sscanf(const char * buf, const char * fmt, ...); -Index: xen-4.0.1-testing/tools/xcutils/helper/main.c +Index: xen-4.0.0-testing/tools/xcutils/helper/main.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/main.c ++++ xen-4.0.0-testing/tools/xcutils/helper/main.c @@ -0,0 +1,651 @@ +#include +#include "hypercall.h" @@ -1040,10 +1040,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/main.c + printk("\r\n"); + start_kernel(); +} -Index: xen-4.0.1-testing/tools/xcutils/helper/make-offsets.c +Index: xen-4.0.0-testing/tools/xcutils/helper/make-offsets.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/make-offsets.c ++++ xen-4.0.0-testing/tools/xcutils/helper/make-offsets.c @@ -0,0 +1,28 @@ +#include +#include @@ -1073,10 +1073,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/make-offsets.c + vcpu_off("cr3", ctrlreg[3]); + return 0; +} -Index: xen-4.0.1-testing/tools/xcutils/helper/printk.c +Index: xen-4.0.0-testing/tools/xcutils/helper/printk.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/printk.c ++++ xen-4.0.0-testing/tools/xcutils/helper/printk.c @@ -0,0 +1,1051 @@ +/* + * linux/kernel/printk.c @@ -2129,10 +2129,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/printk.c + printk_ratelimit_burst); +} +EXPORT_SYMBOL(printk_ratelimit); -Index: xen-4.0.1-testing/tools/xcutils/helper/string.c +Index: xen-4.0.0-testing/tools/xcutils/helper/string.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/string.c ++++ xen-4.0.0-testing/tools/xcutils/helper/string.c @@ -0,0 +1,601 @@ +/* + * linux/lib/string.c @@ -2735,10 +2735,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/string.c +} +EXPORT_SYMBOL(memchr); +#endif -Index: xen-4.0.1-testing/tools/xcutils/helper/vsprintf.c +Index: xen-4.0.0-testing/tools/xcutils/helper/vsprintf.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/vsprintf.c ++++ xen-4.0.0-testing/tools/xcutils/helper/vsprintf.c @@ -0,0 +1,842 @@ +/* + * linux/lib/vsprintf.c @@ -3582,10 +3582,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/vsprintf.c +} + +EXPORT_SYMBOL(sscanf); -Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/div64.h +Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/div64.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/div64.h ++++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/div64.h @@ -0,0 +1,48 @@ +#ifndef __I386_DIV64 +#define __I386_DIV64 @@ -3635,10 +3635,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/div64.h + +} +#endif -Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/entry.S +Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/entry.S =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/entry.S ++++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/entry.S @@ -0,0 +1,49 @@ +#include "offsets.h" + @@ -3689,10 +3689,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/entry.S + nop + .align 4096 +hypercall_end: -Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/hypercall.h +Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/hypercall.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/hypercall.h ++++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/hypercall.h @@ -0,0 +1,359 @@ +/****************************************************************************** + * hypercall.h @@ -4053,10 +4053,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/hypercall.h + + +#endif /* __HYPERCALL_H__ */ -Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/div64.h +Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/div64.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/div64.h ++++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/div64.h @@ -0,0 +1,57 @@ +#ifndef _ASM_GENERIC_DIV64_H +#define _ASM_GENERIC_DIV64_H @@ -4115,10 +4115,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/div64.h +#endif /* BITS_PER_LONG */ + +#endif /* _ASM_GENERIC_DIV64_H */ -Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/entry.S +Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/entry.S =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/entry.S ++++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/entry.S @@ -0,0 +1,50 @@ +#include "offsets.h" + @@ -4170,10 +4170,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/entry.S + nop + .align 4096 +hypercall_end: -Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/hypercall.h +Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/hypercall.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/hypercall.h ++++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/hypercall.h @@ -0,0 +1,354 @@ +/****************************************************************************** + * hypercall.h @@ -4529,10 +4529,10 @@ Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/hypercall.h +} + +#endif /* __HYPERCALL_H__ */ -Index: xen-4.0.1-testing/tools/xcutils/kexec-syscall.h +Index: xen-4.0.0-testing/tools/xcutils/kexec-syscall.h =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/kexec-syscall.h ++++ xen-4.0.0-testing/tools/xcutils/kexec-syscall.h @@ -0,0 +1,80 @@ +#ifndef KEXEC_SYSCALL_H +#define KEXEC_SYSCALL_H @@ -4614,10 +4614,10 @@ Index: xen-4.0.1-testing/tools/xcutils/kexec-syscall.h +#define KEXEC_MAX_SEGMENTS 16 + +#endif /* KEXEC_SYSCALL_H */ -Index: xen-4.0.1-testing/tools/xcutils/xc_kexec.c +Index: xen-4.0.0-testing/tools/xcutils/xc_kexec.c =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/xcutils/xc_kexec.c ++++ xen-4.0.0-testing/tools/xcutils/xc_kexec.c @@ -0,0 +1,503 @@ +#include +#include diff --git a/udev-rules.patch b/udev-rules.patch index abc196f..5ef05dd 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,17 +1,9 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/xen-backend.rules +Index: xen-4.0.0-testing/tools/hotplug/Linux/xen-backend.rules =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/xen-backend.rules -+++ xen-4.0.1-testing/tools/hotplug/Linux/xen-backend.rules -@@ -7,5 +7,10 @@ SUBSYSTEM=="xen-backend", KERNEL=="vif-* - SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="/etc/xen/scripts/vscsi $env{ACTION}" - SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/etc/xen/scripts/xen-hotplug-cleanup" +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/xen-backend.rules ++++ xen-4.0.0-testing/tools/hotplug/Linux/xen-backend.rules +@@ -9,3 +9,4 @@ SUBSYSTEM=="xen-backend", ACTION=="remov KERNEL=="evtchn", NAME="xen/%k" --KERNEL=="blktap[0-9]*", NAME="xen/%k" --KERNEL=="pci_iomul", NAME="xen/%k" -+SUBSYSTEM=="xen", KERNEL=="blktap[0-9]*", NAME="xen/%k", MODE="0600" -+SUBSYSTEM=="blktap2", KERNEL=="blktap[0-9]*", NAME="xen/blktap-2/%k", MODE="0600" -+KERNEL=="blktap-control", NAME="xen/blktap-2/control", MODE="0600" -+KERNEL=="gntdev", NAME="xen/%k", MODE="0600" -+KERNEL=="pci_iomul", NAME="xen/%k", MODE="0600" -+KERNEL=="tapdev[a-z]*", NAME="xen/blktap-2/tapdev%m", MODE="0600" + KERNEL=="blktap[0-9]*", NAME="xen/%k" + KERNEL=="pci_iomul", NAME="xen/%k" +KERNELS=="xen", KERNEL=="xvd*", SUBSYSTEM=="block", OPTIONS+="last_rule" diff --git a/usb-list.patch b/usb-list.patch deleted file mode 100644 index 9b1d0d6..0000000 --- a/usb-list.patch +++ /dev/null @@ -1,45 +0,0 @@ -"usb-hc-create" does not check usb-ver parameter. It allows 2/2.0/2.0usb/2.0aaa. While low level -driver doing hc create, it gets an integer by vssanf %d from usb-ver string, so there is no problem. -But 2/2.0/2.0usb/2.0aaa will be saved into VM config. - -After that, while doing "usb-list", it cannot handle "2.0/2.0usb/2.0aaa" and will cause error: -Idx BE state usb-ver BE-path -Error: Invalid argument. -Usage: xm usb-list - -This patch is to let "usb-list" handle all usb-ver cases as low level driver does and won't cause error. - -About this problem, I've submitted two patches to upstream before, but got no response. Information -could be referred to: - http://www.gossamer-threads.com/lists/xen/devel/178406?search_string=usb-list;#178406 - http://www.gossamer-threads.com/lists/xen/devel/181021?search_string=usb-list;#181021 - - -Index: xen-4.0.1-testing/tools/python/xen/xm/main.py -=================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.1-testing/tools/python/xen/xm/main.py -@@ -2545,10 +2545,22 @@ def xm_usb_list(args): - ni = parse_dev_info(x[1]) - ni['idx'] = int(x[0]) - usbver = sxp.child_value(x[1], 'usb-ver') -+ -+ substr = re.search("^\d{1,}", usbver) -+ if substr: -+ usbver = substr.group() -+ else: -+ print "Unknown usb-ver" -+ continue -+ - if int(usbver) == 1: - ni['usb-ver'] = 'USB1.1' -- else: -+ elif int(usbver) == 2: - ni['usb-ver'] = 'USB2.0' -+ else: -+ print "Unknown usb-ver" -+ continue -+ - print "%(idx)-3d %(backend-id)-3d %(state)-5d %(usb-ver)-7s %(be-path)-30s " % ni - - ports = sxp.child(x[1], 'port') diff --git a/vif-bridge-no-iptables.patch b/vif-bridge-no-iptables.patch index 14b2c0e..d19c5ef 100644 --- a/vif-bridge-no-iptables.patch +++ b/vif-bridge-no-iptables.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/vif-bridge +Index: xen-4.0.0-testing/tools/hotplug/Linux/vif-bridge =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/vif-bridge -+++ xen-4.0.1-testing/tools/hotplug/Linux/vif-bridge +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/vif-bridge ++++ xen-4.0.0-testing/tools/hotplug/Linux/vif-bridge @@ -91,7 +91,7 @@ case "$command" in ;; esac diff --git a/vif-route-ifup.patch b/vif-route-ifup.patch index c424c4c..284444d 100644 --- a/vif-route-ifup.patch +++ b/vif-route-ifup.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/vif-route-ifup +Index: xen-4.0.0-testing/tools/hotplug/Linux/vif-route-ifup =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/hotplug/Linux/vif-route-ifup ++++ xen-4.0.0-testing/tools/hotplug/Linux/vif-route-ifup @@ -0,0 +1,34 @@ +#!/bin/bash +#============================================================================ @@ -37,10 +37,10 @@ Index: xen-4.0.1-testing/tools/hotplug/Linux/vif-route-ifup +then + success +fi -Index: xen-4.0.1-testing/tools/examples/xend-config.sxp +Index: xen-4.0.0-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.1-testing/tools/examples/xend-config.sxp +--- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.0-testing/tools/examples/xend-config.sxp @@ -184,6 +184,26 @@ #(network-script network-route) #(vif-script vif-route) @@ -68,10 +68,10 @@ Index: xen-4.0.1-testing/tools/examples/xend-config.sxp ## Use the following if network traffic is routed with NAT, as an alternative # to the settings for bridged networking given above. -Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile @@ -9,7 +9,7 @@ XENDOMAINS_SYSCONFIG = init.d/sysconfig. # Xen script dir and scripts to go there. diff --git a/x86-cpufreq-report.patch b/x86-cpufreq-report.patch index 359f246..5afbf29 100644 --- a/x86-cpufreq-report.patch +++ b/x86-cpufreq-report.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c +Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/platform_hypercall.c -+++ xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c +--- xen-4.0.0-testing.orig/xen/arch/x86/platform_hypercall.c ++++ xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c @@ -22,7 +22,7 @@ #include #include @@ -19,7 +19,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c struct xen_platform_op curop, *op = &curop; if ( !IS_PRIV(current->domain) ) -@@ -487,6 +488,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -484,6 +485,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe op->u.mem_add.epfn, op->u.mem_add.pxm); break; @@ -44,10 +44,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c default: ret = -ENOSYS; break; -Index: xen-4.0.1-testing/xen/include/public/platform.h +Index: xen-4.0.0-testing/xen/include/public/platform.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/public/platform.h -+++ xen-4.0.1-testing/xen/include/public/platform.h +--- xen-4.0.0-testing.orig/xen/include/public/platform.h ++++ xen-4.0.0-testing/xen/include/public/platform.h @@ -355,6 +355,14 @@ struct xenpf_mem_hotadd uint32_t flags; }; diff --git a/x86-extra-trap-info.patch b/x86-extra-trap-info.patch index df2c0bc..2339519 100644 --- a/x86-extra-trap-info.patch +++ b/x86-extra-trap-info.patch @@ -1,7 +1,5 @@ -Index: xen-4.0.1-testing/xen/arch/x86/x86_32/entry.S -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/entry.S -+++ xen-4.0.1-testing/xen/arch/x86/x86_32/entry.S +--- 2010-01-06.orig/xen/arch/x86/x86_32/entry.S 2009-12-02 10:02:49.000000000 +0100 ++++ 2010-01-06/xen/arch/x86/x86_32/entry.S 2010-01-06 11:23:45.000000000 +0100 @@ -403,21 +403,33 @@ ring1: /* obtain ss/esp from oldss/olde movl %eax,UREGS_eip+4(%esp) ret @@ -46,10 +44,8 @@ Index: xen-4.0.1-testing/xen/arch/x86/x86_32/entry.S domain_crash_synchronous: pushl $domain_crash_synchronous_string call printk -Index: xen-4.0.1-testing/xen/arch/x86/x86_64/entry.S -=================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/entry.S -+++ xen-4.0.1-testing/xen/arch/x86/x86_64/entry.S +--- 2010-01-06.orig/xen/arch/x86/x86_64/entry.S 2009-12-02 10:02:49.000000000 +0100 ++++ 2010-01-06/xen/arch/x86/x86_64/entry.S 2010-01-06 11:23:45.000000000 +0100 @@ -421,17 +421,30 @@ create_bounce_frame: movq %rax,UREGS_rip+8(%rsp) ret diff --git a/x86-ioapic-ack-default.patch b/x86-ioapic-ack-default.patch index 9dccd3f..cb989d6 100644 --- a/x86-ioapic-ack-default.patch +++ b/x86-ioapic-ack-default.patch @@ -1,10 +1,10 @@ Change default IO-APIC ack mode for single IO-APIC systems to old-style. -Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c +Index: xen-4.0.0-testing/xen/arch/x86/io_apic.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/io_apic.c -+++ xen-4.0.1-testing/xen/arch/x86/io_apic.c -@@ -1562,7 +1562,7 @@ static unsigned int startup_level_ioapic +--- xen-4.0.0-testing.orig/xen/arch/x86/io_apic.c ++++ xen-4.0.0-testing/xen/arch/x86/io_apic.c +@@ -1442,7 +1442,7 @@ static unsigned int startup_level_ioapic return 0; /* don't check for pending */ } @@ -13,7 +13,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c static void setup_ioapic_ack(char *s) { if ( !strcmp(s, "old") ) -@@ -2066,6 +2066,8 @@ void __init setup_IO_APIC(void) +@@ -1946,6 +1946,8 @@ void __init setup_IO_APIC(void) else io_apic_irqs = ~PIC_IRQS; diff --git a/x86-show-page-walk-early.patch b/x86-show-page-walk-early.patch index 196b236..dac66f9 100644 --- a/x86-show-page-walk-early.patch +++ b/x86-show-page-walk-early.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/xen/arch/x86/mm.c +Index: xen-4.0.0-testing/xen/arch/x86/mm.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.1-testing/xen/arch/x86/mm.c +--- xen-4.0.0-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.0-testing/xen/arch/x86/mm.c @@ -154,6 +154,8 @@ unsigned long __read_mostly pdx_group_va int opt_allow_hugepage; boolean_param("allowhugepage", opt_allow_hugepage); @@ -11,11 +11,11 @@ Index: xen-4.0.1-testing/xen/arch/x86/mm.c #define l1_disallow_mask(d) \ ((d != dom_io) && \ (rangeset_is_empty((d)->iomem_caps) && \ -Index: xen-4.0.1-testing/xen/arch/x86/traps.c +Index: xen-4.0.0-testing/xen/arch/x86/traps.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/traps.c -+++ xen-4.0.1-testing/xen/arch/x86/traps.c -@@ -1336,6 +1336,7 @@ asmlinkage void do_early_page_fault(stru +--- xen-4.0.0-testing.orig/xen/arch/x86/traps.c ++++ xen-4.0.0-testing/xen/arch/x86/traps.c +@@ -1352,6 +1352,7 @@ asmlinkage void do_early_page_fault(stru unsigned long *stk = (unsigned long *)regs; printk("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n", regs->cs, _p(regs->eip), _p(cr2), regs->error_code); @@ -23,10 +23,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/traps.c printk("Stack dump: "); while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 ) printk("%p ", _p(*stk++)); -Index: xen-4.0.1-testing/xen/arch/x86/x86_32/mm.c +Index: xen-4.0.0-testing/xen/arch/x86/x86_32/mm.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/mm.c -+++ xen-4.0.1-testing/xen/arch/x86/x86_32/mm.c +--- xen-4.0.0-testing.orig/xen/arch/x86/x86_32/mm.c ++++ xen-4.0.0-testing/xen/arch/x86/x86_32/mm.c @@ -122,6 +122,8 @@ void __init paging_init(void) #undef CNT #undef MFN @@ -36,10 +36,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/x86_32/mm.c /* Create page tables for ioremap()/map_domain_page_global(). */ for ( i = 0; i < (IOREMAP_MBYTES >> (L2_PAGETABLE_SHIFT - 20)); i++ ) { -Index: xen-4.0.1-testing/xen/arch/x86/x86_32/traps.c +Index: xen-4.0.0-testing/xen/arch/x86/x86_32/traps.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/traps.c -+++ xen-4.0.1-testing/xen/arch/x86/x86_32/traps.c +--- xen-4.0.0-testing.orig/xen/arch/x86/x86_32/traps.c ++++ xen-4.0.0-testing/xen/arch/x86/x86_32/traps.c @@ -161,7 +161,8 @@ void show_page_walk(unsigned long addr) l3t += (cr3 & 0xFE0UL) >> 3; l3e = l3t[l3_table_offset(addr)]; @@ -70,10 +70,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/x86_32/traps.c printk(" L1[0x%03lx] = %"PRIpte" %08lx\n", l1_table_offset(addr), l1e_get_intpte(l1e), pfn); unmap_domain_page(l1t); -Index: xen-4.0.1-testing/xen/arch/x86/x86_64/mm.c +Index: xen-4.0.0-testing/xen/arch/x86/x86_64/mm.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/mm.c -+++ xen-4.0.1-testing/xen/arch/x86/x86_64/mm.c +--- xen-4.0.0-testing.orig/xen/arch/x86/x86_64/mm.c ++++ xen-4.0.0-testing/xen/arch/x86/x86_64/mm.c @@ -725,6 +725,8 @@ void __init paging_init(void) #undef CNT #undef MFN @@ -83,10 +83,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/x86_64/mm.c /* Create user-accessible L2 directory to map the MPT for compat guests. */ BUILD_BUG_ON(l4_table_offset(RDWR_MPT_VIRT_START) != l4_table_offset(HIRO_COMPAT_MPT_VIRT_START)); -Index: xen-4.0.1-testing/xen/arch/x86/x86_64/traps.c +Index: xen-4.0.0-testing/xen/arch/x86/x86_64/traps.c =================================================================== ---- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/traps.c -+++ xen-4.0.1-testing/xen/arch/x86/x86_64/traps.c +--- xen-4.0.0-testing.orig/xen/arch/x86/x86_64/traps.c ++++ xen-4.0.0-testing/xen/arch/x86/x86_64/traps.c @@ -176,7 +176,8 @@ void show_page_walk(unsigned long addr) l4t = mfn_to_virt(mfn); l4e = l4t[l4_table_offset(addr)]; @@ -127,10 +127,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/x86_64/traps.c printk(" L1[0x%03lx] = %"PRIpte" %016lx\n", l1_table_offset(addr), l1e_get_intpte(l1e), pfn); } -Index: xen-4.0.1-testing/xen/include/asm-x86/mm.h +Index: xen-4.0.0-testing/xen/include/asm-x86/mm.h =================================================================== ---- xen-4.0.1-testing.orig/xen/include/asm-x86/mm.h -+++ xen-4.0.1-testing/xen/include/asm-x86/mm.h +--- xen-4.0.0-testing.orig/xen/include/asm-x86/mm.h ++++ xen-4.0.0-testing/xen/include/asm-x86/mm.h @@ -443,6 +443,8 @@ TYPE_SAFE(unsigned long,mfn); #define SHARED_M2P_ENTRY (~0UL - 1UL) #define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY) diff --git a/xen-4.0.0-testing-src.tar.bz2 b/xen-4.0.0-testing-src.tar.bz2 new file mode 100644 index 0000000..2736a64 --- /dev/null +++ b/xen-4.0.0-testing-src.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dae429f07e7c09ed55f941d3ad7cbfe39f9e29d93da70df13594acaa2ee9f34b +size 23205463 diff --git a/xen-4.0.1-testing-src.tar.bz2 b/xen-4.0.1-testing-src.tar.bz2 deleted file mode 100644 index 8b1baff..0000000 --- a/xen-4.0.1-testing-src.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f50525ffe664fa03f425d044e7cde87b264c4cae9336d2c866e312e89dcd0b83 -size 23280495 diff --git a/xen-api-auth.patch b/xen-api-auth.patch index 0af4804..c2407e1 100644 --- a/xen-api-auth.patch +++ b/xen-api-auth.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendAuthSessions.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendAuthSessions.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAuthSessions.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendAuthSessions.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAuthSessions.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendAuthSessions.py @@ -84,7 +84,7 @@ class XendAuthSessions: # if PAM doesn't exist, let's ignore it return False diff --git a/xen-changeset.diff b/xen-changeset.diff index e33760b..358de73 100644 --- a/xen-changeset.diff +++ b/xen-changeset.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/xen/Makefile +Index: xen-4.0.0-testing/xen/Makefile =================================================================== ---- xen-4.0.1-testing.orig/xen/Makefile -+++ xen-4.0.1-testing/xen/Makefile +--- xen-4.0.0-testing.orig/xen/Makefile ++++ xen-4.0.0-testing/xen/Makefile @@ -1,3 +1,4 @@ +export XEN_CHANGESET = unavailable # This is the correct place to edit the build version. diff --git a/xen-config.diff b/xen-config.diff index c10058b..9616a4c 100644 --- a/xen-config.diff +++ b/xen-config.diff @@ -1,8 +1,17 @@ -Index: xen-4.0.1-testing/Config.mk +Index: xen-4.0.0-testing/Config.mk =================================================================== ---- xen-4.0.1-testing.orig/Config.mk -+++ xen-4.0.1-testing/Config.mk -@@ -182,9 +182,9 @@ CONFIG_OCAML_XENSTORED ?= n +--- xen-4.0.0-testing.orig/Config.mk ++++ xen-4.0.0-testing/Config.mk +@@ -151,7 +151,7 @@ QEMU_REMOTE=http://xenbits.xensource.com + # Specify which qemu-dm to use. This may be `ioemu' to use the old + # Mercurial in-tree version, or a local directory, or a git URL. + # CONFIG_QEMU ?= ../qemu-xen.git +-CONFIG_QEMU ?= $(QEMU_REMOTE) ++CONFIG_QEMU ?= ioemu-remote + + QEMU_TAG := xen-4.0.0 + #QEMU_TAG ?= f1d909f0f854194f5a40d850886d1413fb8b63c2 +@@ -167,9 +167,9 @@ CONFIG_OCAML_XENSTORED ?= n # Optional components XENSTAT_XENTOP ?= y VTPM_TOOLS ?= n @@ -14,10 +23,10 @@ Index: xen-4.0.1-testing/Config.mk --include $(XEN_ROOT)/.config +#-include $(XEN_ROOT)/.config -Index: xen-4.0.1-testing/tools/libxc/Makefile +Index: xen-4.0.0-testing/tools/libxc/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/libxc/Makefile -+++ xen-4.0.1-testing/tools/libxc/Makefile +--- xen-4.0.0-testing.orig/tools/libxc/Makefile ++++ xen-4.0.0-testing/tools/libxc/Makefile @@ -169,10 +169,10 @@ zlib-options = $(shell \ fi) | grep $(1)) endif diff --git a/xen-destdir.diff b/xen-destdir.diff index 97e5c7c..7f1ea07 100644 --- a/xen-destdir.diff +++ b/xen-destdir.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/docs/Makefile +Index: xen-4.0.0-testing/docs/Makefile =================================================================== ---- xen-4.0.1-testing.orig/docs/Makefile -+++ xen-4.0.1-testing/docs/Makefile +--- xen-4.0.0-testing.orig/docs/Makefile ++++ xen-4.0.0-testing/docs/Makefile @@ -90,7 +90,8 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(MANDIR) cp -dR man1 $(DESTDIR)$(MANDIR) @@ -22,10 +22,10 @@ Index: xen-4.0.1-testing/docs/Makefile + ln -sf $*.html html.done/$*/index.html + rm -rf html/ + -Index: xen-4.0.1-testing/tools/security/Makefile +Index: xen-4.0.0-testing/tools/security/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/security/Makefile -+++ xen-4.0.1-testing/tools/security/Makefile +--- xen-4.0.0-testing.orig/tools/security/Makefile ++++ xen-4.0.0-testing/tools/security/Makefile @@ -60,8 +60,8 @@ install: all $(ACM_CONFIG_FILE) $(INSTALL_DATA) $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR) $(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR) @@ -37,10 +37,10 @@ Index: xen-4.0.1-testing/tools/security/Makefile else .PHONY: all all: -Index: xen-4.0.1-testing/tools/pygrub/Makefile +Index: xen-4.0.0-testing/tools/pygrub/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/pygrub/Makefile -+++ xen-4.0.1-testing/tools/pygrub/Makefile +--- xen-4.0.0-testing.orig/tools/pygrub/Makefile ++++ xen-4.0.0-testing/tools/pygrub/Makefile @@ -11,7 +11,7 @@ build: .PHONY: install install: all @@ -50,10 +50,10 @@ Index: xen-4.0.1-testing/tools/pygrub/Makefile $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(BINDIR)/pygrub $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot -Index: xen-4.0.1-testing/tools/python/Makefile +Index: xen-4.0.0-testing/tools/python/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/python/Makefile -+++ xen-4.0.1-testing/tools/python/Makefile +--- xen-4.0.0-testing.orig/tools/python/Makefile ++++ xen-4.0.0-testing/tools/python/Makefile @@ -60,7 +60,7 @@ refresh-po: $(POTFILE) .PHONY: install install: install-messages install-dtd @@ -63,10 +63,10 @@ Index: xen-4.0.1-testing/tools/python/Makefile install-dtd: all $(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/xen -Index: xen-4.0.1-testing/tools/xenstore/Makefile +Index: xen-4.0.0-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.1-testing/tools/xenstore/Makefile +--- xen-4.0.0-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.0-testing/tools/xenstore/Makefile @@ -10,6 +10,7 @@ CFLAGS += $(CFLAGS_libxenctrl) CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod @@ -121,10 +121,10 @@ Index: xen-4.0.1-testing/tools/xenstore/Makefile $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR) ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR) -Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile @@ -38,18 +38,6 @@ endif UDEV_RULES_DIR = $(CONFIG_DIR)/udev UDEV_RULES = xen-backend.rules xend.rules diff --git a/xen-disable-libxl.diff b/xen-disable-libxl.diff index b4efeb2..3d7bb6f 100644 --- a/xen-disable-libxl.diff +++ b/xen-disable-libxl.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/Makefile +Index: xen-4.0.0-testing/tools/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/Makefile -+++ xen-4.0.1-testing/tools/Makefile +--- xen-4.0.0-testing.orig/tools/Makefile ++++ xen-4.0.0-testing/tools/Makefile @@ -33,7 +33,7 @@ SUBDIRS-$(CONFIG_Linux) += fs-back SUBDIRS-$(CONFIG_NetBSD) += fs-back SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir @@ -10,4 +10,4 @@ Index: xen-4.0.1-testing/tools/Makefile +#SUBDIRS-y += libxl SUBDIRS-y += remus SUBDIRS-$(CONFIG_X86) += xenpaging - SUBDIRS-$(CONFIG_X86) += debugger/gdbsx + diff --git a/xen-disable-qemu-monitor.diff b/xen-disable-qemu-monitor.diff index 9082cc0..e3cdbc6 100644 --- a/xen-disable-qemu-monitor.diff +++ b/xen-disable-qemu-monitor.diff @@ -5,10 +5,10 @@ the "sendkey" command, among other useful things), remove all console commands that can read/write dom0's state. -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/monitor.c +Index: xen-4.0.0-testing/tools/ioemu-remote/monitor.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/monitor.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/monitor.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/monitor.c ++++ xen-4.0.0-testing/tools/ioemu-remote/monitor.c @@ -1497,6 +1497,7 @@ static const term_cmd_t term_cmds[] = { "device|all", "commit changes to the disk images (if -snapshot is used) or backing files" }, { "info", "s?", do_info, diff --git a/xen-disable-xenpaging.diff b/xen-disable-xenpaging.diff index 2e8615f..1fae149 100644 --- a/xen-disable-xenpaging.diff +++ b/xen-disable-xenpaging.diff @@ -1,13 +1,13 @@ -Index: xen-4.0.1-testing/tools/Makefile +Index: xen-4.0.0-testing/tools/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/Makefile -+++ xen-4.0.1-testing/tools/Makefile +--- xen-4.0.0-testing.orig/tools/Makefile ++++ xen-4.0.0-testing/tools/Makefile @@ -35,7 +35,7 @@ SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir SUBDIRS-y += xenpmd #SUBDIRS-y += libxl SUBDIRS-y += remus -SUBDIRS-$(CONFIG_X86) += xenpaging +#SUBDIRS-$(CONFIG_X86) += xenpaging - SUBDIRS-$(CONFIG_X86) += debugger/gdbsx # These don't cross-compile + ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) diff --git a/xen-domUloader.diff b/xen-domUloader.diff index ed51a5f..bc6b974 100644 --- a/xen-domUloader.diff +++ b/xen-domUloader.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py +Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py -+++ xen-4.0.1-testing/tools/python/xen/util/blkif.py +--- xen-4.0.0-testing.orig/tools/python/xen/util/blkif.py ++++ xen-4.0.0-testing/tools/python/xen/util/blkif.py @@ -71,8 +71,8 @@ def blkdev_segment(name): 'type' : 'Disk' } return val @@ -35,10 +35,10 @@ Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py def mount_mode(name): mode = None -Index: xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/DevController.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/DevController.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py @@ -592,6 +592,31 @@ class DevController: return (Missing, None) @@ -71,10 +71,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py def backendPath(self, backdom, devid): """Construct backend path given the backend domain and device id. -Index: xen-4.0.1-testing/tools/python/xen/xend/XendBootloader.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendBootloader.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendBootloader.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendBootloader.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendBootloader.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendBootloader.py @@ -12,7 +12,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # @@ -101,21 +101,21 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendBootloader.py + raise VmError(msg) + + avail = False -+ for i in xrange(1, 100): ++ for i in xrange(1, 20): + avail = os.access(disk, os.R_OK) + if avail: + break -+ time.sleep(.1) ++ time.sleep(.05) + + if not avail: + msg = "Disk '%s' isn't accessible" % disk log.error(msg) raise VmError(msg) -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -37,7 +37,7 @@ from types import StringTypes import xen.lowlevel.xc diff --git a/xen-extra-fixes.patch b/xen-extra-fixes.patch index 0bb6d99..cc8613a 100644 --- a/xen-extra-fixes.patch +++ b/xen-extra-fixes.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block-vvfat.c +Index: xen-4.0.0-testing/tools/ioemu-remote/block-vvfat.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block-vvfat.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block-vvfat.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/block-vvfat.c ++++ xen-4.0.0-testing/tools/ioemu-remote/block-vvfat.c @@ -865,7 +865,8 @@ static int init_directories(BDRVVVFATSta { direntry_t* entry=array_get_next(&(s->directory)); diff --git a/xen-fixme-doc.diff b/xen-fixme-doc.diff index a5fc801..031ab21 100644 --- a/xen-fixme-doc.diff +++ b/xen-fixme-doc.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 +--- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 @@ -335,16 +335,10 @@ at hda1, which is the root filesystem. =item I @@ -19,10 +19,10 @@ Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 =back =head1 SEE ALSO -Index: xen-4.0.1-testing/docs/man/xm.pod.1 +Index: xen-4.0.0-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.1-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.1-testing/docs/man/xm.pod.1 +--- xen-4.0.0-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.0-testing/docs/man/xm.pod.1 @@ -297,7 +297,8 @@ scheduling by the Xen hypervisor. =item B diff --git a/xen-hvm-default-bridge.diff b/xen-hvm-default-bridge.diff index 7d1be40..9e9e535 100644 --- a/xen-hvm-default-bridge.diff +++ b/xen-hvm-default-bridge.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/net.h +Index: xen-4.0.0-testing/tools/ioemu-remote/net.h =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/net.h -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/net.h +--- xen-4.0.0-testing.orig/tools/ioemu-remote/net.h ++++ xen-4.0.0-testing/tools/ioemu-remote/net.h @@ -107,8 +107,8 @@ void net_host_device_add(const char *dev void net_host_device_remove(int vlan_id, const char *device); @@ -13,10 +13,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/net.h #endif #ifdef __sun__ #define SMBD_COMMAND "/usr/sfw/sbin/smbd" -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/net.c +Index: xen-4.0.0-testing/tools/ioemu-remote/net.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/net.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/net.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/net.c ++++ xen-4.0.0-testing/tools/ioemu-remote/net.c @@ -1759,9 +1759,10 @@ int net_client_init(const char *device, } if (get_param_value(script_arg, sizeof(script_arg), "scriptarg", p) == 0 && @@ -30,10 +30,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/net.c } } else #endif -Index: xen-4.0.1-testing/tools/python/xen/xend/image.py +Index: xen-4.0.0-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.1-testing/tools/python/xen/xend/image.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.0-testing/tools/python/xen/xend/image.py @@ -912,11 +912,13 @@ class HVMImageHandler(ImageHandler): mac = devinfo.get('mac') if mac is None: @@ -51,10 +51,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/image.py vifname = devinfo.get('vifname') if vifname: vifname = "tap-" + vifname -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux +Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup-Linux =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux +--- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/qemu-ifup-Linux ++++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup-Linux @@ -1,36 +1,22 @@ #!/bin/sh diff --git a/xen-hvm-default-pae.diff b/xen-hvm-default-pae.diff index d6220a3..804e407 100644 --- a/xen-hvm-default-pae.diff +++ b/xen-hvm-default-pae.diff @@ -1,9 +1,9 @@ PAE must be on for 64-on-64 to work at all. -Index: xen-4.0.1-testing/tools/python/xen/xend/image.py +Index: xen-4.0.0-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.1-testing/tools/python/xen/xend/image.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.0-testing/tools/python/xen/xend/image.py @@ -1030,7 +1030,7 @@ class X86_HVM_ImageHandler(HVMImageHandl def configure(self, vmConfig): diff --git a/xen-ioemu-hvm-pv-support.diff b/xen-ioemu-hvm-pv-support.diff index 419cd16..a066ac7 100644 --- a/xen-ioemu-hvm-pv-support.diff +++ b/xen-ioemu-hvm-pv-support.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c +Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c =================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c +--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c ++++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c @@ -30,6 +30,8 @@ #include "qemu-xen.h" #include "net.h" diff --git a/xen-max-free-mem.diff b/xen-max-free-mem.diff index 849f54f..7848538 100644 --- a/xen-max-free-mem.diff +++ b/xen-max-free-mem.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py @@ -916,15 +916,39 @@ class XendNode: info['cpu_mhz'] = info['cpu_khz'] / 1000 @@ -57,10 +57,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py 'node_to_cpu', 'node_to_memory', 'node_to_dma32_mem', -Index: xen-4.0.1-testing/tools/python/xen/xend/balloon.py +Index: xen-4.0.0-testing/tools/python/xen/xend/balloon.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/balloon.py -+++ xen-4.0.1-testing/tools/python/xen/xend/balloon.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/balloon.py ++++ xen-4.0.0-testing/tools/python/xen/xend/balloon.py @@ -43,6 +43,8 @@ SLEEP_TIME_GROWTH = 0.1 # label actually shown in the PROC_XEN_BALLOON file. #labels = { 'current' : 'Current allocation', @@ -94,10 +94,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/balloon.py def free(need_mem, dominfo): """Balloon out memory from the privileged domain so that there is the specified required amount (in KiB) free. -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -1473,6 +1473,27 @@ class XendDomainInfo: pci_conf = self.info['devices'][dev_uuid][1] return map(pci_dict_to_bdf_str, pci_conf['devs']) @@ -126,10 +126,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py def setMemoryTarget(self, target): """Set the memory target of this domain. @param target: In MiB. -Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py @@ -173,7 +173,7 @@ class SrvDomain(SrvDir): diff --git a/xen-no-dummy-nfs-ip.diff b/xen-no-dummy-nfs-ip.diff index 23e925f..c833618 100644 --- a/xen-no-dummy-nfs-ip.diff +++ b/xen-no-dummy-nfs-ip.diff @@ -1,8 +1,8 @@ -Index: xen-4.0.1-testing/tools/python/xen/xm/create.py +Index: xen-4.0.0-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.1-testing/tools/python/xen/xm/create.py -@@ -1331,9 +1331,8 @@ def preprocess_access_control(vals): +--- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.0-testing/tools/python/xen/xm/create.py +@@ -1321,9 +1321,8 @@ def preprocess_access_control(vals): def preprocess_ip(vals): if vals.ip or vals.dhcp != 'off': diff --git a/xen-paths.diff b/xen-paths.diff index 2950c28..6fa0817 100644 --- a/xen-paths.diff +++ b/xen-paths.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xm/create.py +Index: xen-4.0.0-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.1-testing/tools/python/xen/xm/create.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.0-testing/tools/python/xen/xm/create.py @@ -73,7 +73,7 @@ gopts.opt('quiet', short='q', use="Quiet.") @@ -11,10 +11,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/create.py use="Search path for configuration scripts. " "The value of PATH is a colon-separated directory list.") -Index: xen-4.0.1-testing/docs/man/xm.pod.1 +Index: xen-4.0.0-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.1-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.1-testing/docs/man/xm.pod.1 +--- xen-4.0.0-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.0-testing/docs/man/xm.pod.1 @@ -77,7 +77,7 @@ in the config file. See L format, and possible options used in either the configfile or for I. @@ -33,10 +33,10 @@ Index: xen-4.0.1-testing/docs/man/xm.pod.1 soon as it is run. =item I -Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 +--- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 @@ -4,9 +4,9 @@ xmdomain.cfg - xm domain config file for =head1 SYNOPSIS diff --git a/xen-qemu-iscsi-fix.patch b/xen-qemu-iscsi-fix.patch index 6c713ad..d8e41ff 100644 --- a/xen-qemu-iscsi-fix.patch +++ b/xen-qemu-iscsi-fix.patch @@ -1,7 +1,5 @@ -Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c -=================================================================== ---- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c -+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +--- a/tools/ioemu-remote/xenstore.c ++++ b/tools/ioemu-remote/xenstore.c @@ -399,7 +399,7 @@ void xenstore_parse_domain_config(int hv char *buf = NULL; char *fpath = NULL, *bpath = NULL, *btype = NULL, @@ -11,7 +9,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c unsigned int len, num, hd_index, pci_devid = 0; BlockDriverState *bs; BlockDriver *format; -@@ -491,12 +491,7 @@ void xenstore_parse_domain_config(int hv +@@ -486,12 +486,7 @@ void xenstore_parse_domain_config(int hv continue; free(danger_type); danger_type = xs_read(xsh, XBT_NULL, danger_buf, &len); @@ -25,7 +23,7 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c /* read the name of the device */ if (pasprintf(&buf, "%s/type", bpath) == -1) continue; -@@ -504,6 +499,35 @@ void xenstore_parse_domain_config(int hv +@@ -499,6 +494,35 @@ void xenstore_parse_domain_config(int hv drv = xs_read(xsh, XBT_NULL, buf, &len); if (drv == NULL) continue; diff --git a/xen-rpmoptflags.diff b/xen-rpmoptflags.diff index e55b663..1079766 100644 --- a/xen-rpmoptflags.diff +++ b/xen-rpmoptflags.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile +Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap/drivers/Makefile -+++ xen-4.0.1-testing/tools/blktap/drivers/Makefile +--- xen-4.0.0-testing.orig/tools/blktap/drivers/Makefile ++++ xen-4.0.0-testing/tools/blktap/drivers/Makefile @@ -6,7 +6,6 @@ QCOW_UTIL = img2qcow qcow2raw qcow-cr LIBAIO_DIR = ../../libaio/src MEMSHR_DIR = ../../memshr @@ -10,10 +10,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile CFLAGS += -Wno-unused CFLAGS += -I../lib CFLAGS += $(CFLAGS_libxenctrl) -Index: xen-4.0.1-testing/Config.mk +Index: xen-4.0.0-testing/Config.mk =================================================================== ---- xen-4.0.1-testing.orig/Config.mk -+++ xen-4.0.1-testing/Config.mk +--- xen-4.0.0-testing.orig/Config.mk ++++ xen-4.0.0-testing/Config.mk @@ -14,7 +14,7 @@ SHELL ?= /bin/sh # Tools to run on system hosting the build diff --git a/xen-warnings.diff b/xen-warnings.diff index efc476a..611e926 100644 --- a/xen-warnings.diff +++ b/xen-warnings.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/misc/miniterm/miniterm.c +Index: xen-4.0.0-testing/tools/misc/miniterm/miniterm.c =================================================================== ---- xen-4.0.1-testing.orig/tools/misc/miniterm/miniterm.c -+++ xen-4.0.1-testing/tools/misc/miniterm/miniterm.c +--- xen-4.0.0-testing.orig/tools/misc/miniterm/miniterm.c ++++ xen-4.0.0-testing/tools/misc/miniterm/miniterm.c @@ -157,7 +157,7 @@ int main(int argc, char **argv) case 0: close(1); /* stdout not needed */ @@ -35,10 +35,10 @@ Index: xen-4.0.1-testing/tools/misc/miniterm/miniterm.c break; } -Index: xen-4.0.1-testing/tools/libxc/xc_dom_elfloader.c +Index: xen-4.0.0-testing/tools/libxc/xc_dom_elfloader.c =================================================================== ---- xen-4.0.1-testing.orig/tools/libxc/xc_dom_elfloader.c -+++ xen-4.0.1-testing/tools/libxc/xc_dom_elfloader.c +--- xen-4.0.0-testing.orig/tools/libxc/xc_dom_elfloader.c ++++ xen-4.0.0-testing/tools/libxc/xc_dom_elfloader.c @@ -193,8 +193,9 @@ static int xc_dom_load_elf_symtab(struct if ( load ) @@ -50,10 +50,10 @@ Index: xen-4.0.1-testing/tools/libxc/xc_dom_elfloader.c elf_section_start(elf, shdr2), size); } -Index: xen-4.0.1-testing/tools/xenstore/Makefile +Index: xen-4.0.0-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.1-testing/tools/xenstore/Makefile +--- xen-4.0.0-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.0-testing/tools/xenstore/Makefile @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 3.0 MINOR = 0 @@ -63,10 +63,10 @@ Index: xen-4.0.1-testing/tools/xenstore/Makefile CFLAGS += -I. CFLAGS += $(CFLAGS_libxenctrl) -Index: xen-4.0.1-testing/tools/xenstore/xenstored_core.c +Index: xen-4.0.0-testing/tools/xenstore/xenstored_core.c =================================================================== ---- xen-4.0.1-testing.orig/tools/xenstore/xenstored_core.c -+++ xen-4.0.1-testing/tools/xenstore/xenstored_core.c +--- xen-4.0.0-testing.orig/tools/xenstore/xenstored_core.c ++++ xen-4.0.0-testing/tools/xenstore/xenstored_core.c @@ -77,8 +77,8 @@ static void check_store(void); int quota_nb_entry_per_domain = 1000; @@ -91,10 +91,10 @@ Index: xen-4.0.1-testing/tools/xenstore/xenstored_core.c break; case 'T': tracefile = optarg; -Index: xen-4.0.1-testing/tools/xenstore/xenstored_domain.c +Index: xen-4.0.0-testing/tools/xenstore/xenstored_domain.c =================================================================== ---- xen-4.0.1-testing.orig/tools/xenstore/xenstored_domain.c -+++ xen-4.0.1-testing/tools/xenstore/xenstored_domain.c +--- xen-4.0.0-testing.orig/tools/xenstore/xenstored_domain.c ++++ xen-4.0.0-testing/tools/xenstore/xenstored_domain.c @@ -212,7 +212,7 @@ void handle_event(void) { evtchn_port_t port; @@ -113,10 +113,10 @@ Index: xen-4.0.1-testing/tools/xenstore/xenstored_domain.c return -1; dom0 = new_domain(NULL, 0, port); -Index: xen-4.0.1-testing/tools/xenstore/xenstored_transaction.c +Index: xen-4.0.0-testing/tools/xenstore/xenstored_transaction.c =================================================================== ---- xen-4.0.1-testing.orig/tools/xenstore/xenstored_transaction.c -+++ xen-4.0.1-testing/tools/xenstore/xenstored_transaction.c +--- xen-4.0.0-testing.orig/tools/xenstore/xenstored_transaction.c ++++ xen-4.0.0-testing/tools/xenstore/xenstored_transaction.c @@ -82,7 +82,7 @@ struct transaction struct list_head changed_domains; }; @@ -126,10 +126,10 @@ Index: xen-4.0.1-testing/tools/xenstore/xenstored_transaction.c static unsigned int generation; /* Return tdb context to use for this connection. */ -Index: xen-4.0.1-testing/tools/xenstore/xenstore_client.c +Index: xen-4.0.0-testing/tools/xenstore/xenstore_client.c =================================================================== ---- xen-4.0.1-testing.orig/tools/xenstore/xenstore_client.c -+++ xen-4.0.1-testing/tools/xenstore/xenstore_client.c +--- xen-4.0.0-testing.orig/tools/xenstore/xenstore_client.c ++++ xen-4.0.0-testing/tools/xenstore/xenstore_client.c @@ -251,7 +251,7 @@ do_chmod(char *path, struct xs_permissio char **xsval = xs_directory(xsh, xth, path, &xsval_n); @@ -139,10 +139,10 @@ Index: xen-4.0.1-testing/tools/xenstore/xenstore_client.c for (i = 0; i < xsval_n; i++) { snprintf(buf, MAX_PATH_LEN, "%s/%s", path, xsval[i]); -Index: xen-4.0.1-testing/tools/libxen/src/xen_common.c +Index: xen-4.0.0-testing/tools/libxen/src/xen_common.c =================================================================== ---- xen-4.0.1-testing.orig/tools/libxen/src/xen_common.c -+++ xen-4.0.1-testing/tools/libxen/src/xen_common.c +--- xen-4.0.0-testing.orig/tools/libxen/src/xen_common.c ++++ xen-4.0.0-testing/tools/libxen/src/xen_common.c @@ -1057,6 +1057,8 @@ static size_t size_of_member(const abstr default: assert(false); @@ -161,10 +161,10 @@ Index: xen-4.0.1-testing/tools/libxen/src/xen_common.c } -Index: xen-4.0.1-testing/tools/blktap2/drivers/block-remus.c +Index: xen-4.0.0-testing/tools/blktap2/drivers/block-remus.c =================================================================== ---- xen-4.0.1-testing.orig/tools/blktap2/drivers/block-remus.c -+++ xen-4.0.1-testing/tools/blktap2/drivers/block-remus.c +--- xen-4.0.0-testing.orig/tools/blktap2/drivers/block-remus.c ++++ xen-4.0.0-testing/tools/blktap2/drivers/block-remus.c @@ -1579,7 +1579,7 @@ static int tdremus_open(td_driver_t *dri td_flag_t flags) { diff --git a/xen-xm-top-needs-root.diff b/xen-xm-top-needs-root.diff index b73f714..dfae018 100644 --- a/xen-xm-top-needs-root.diff +++ b/xen-xm-top-needs-root.diff @@ -1,11 +1,11 @@ From: Charles Coffing Upstream: no -Index: xen-4.0.1-testing/tools/python/xen/xm/main.py +Index: xen-4.0.0-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.1-testing/tools/python/xen/xm/main.py -@@ -2054,6 +2054,10 @@ def xm_debug_keys(args): +--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.0-testing/tools/python/xen/xm/main.py +@@ -2052,6 +2052,10 @@ def xm_debug_keys(args): def xm_top(args): arg_check(args, "top", 0) diff --git a/xen-xmexample-vti.diff b/xen-xmexample-vti.diff index 7634752..4d4a1f4 100644 --- a/xen-xmexample-vti.diff +++ b/xen-xmexample-vti.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/examples/Makefile +Index: xen-4.0.0-testing/tools/examples/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/Makefile -+++ xen-4.0.1-testing/tools/examples/Makefile +--- xen-4.0.0-testing.orig/tools/examples/Makefile ++++ xen-4.0.0-testing/tools/examples/Makefile @@ -18,7 +18,6 @@ XEN_CONFIGS += xmexample.hvm XEN_CONFIGS += xmexample.hvm-stubdom XEN_CONFIGS += xmexample.pv-grub diff --git a/xen-xmexample.diff b/xen-xmexample.diff index 496ad66..60e6fcb 100644 --- a/xen-xmexample.diff +++ b/xen-xmexample.diff @@ -1,9 +1,9 @@ Change various example paths in the config files to match SUSE. -Index: xen-4.0.1-testing/tools/examples/xmexample1 +Index: xen-4.0.0-testing/tools/examples/xmexample1 =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/xmexample1 -+++ xen-4.0.1-testing/tools/examples/xmexample1 +--- xen-4.0.0-testing.orig/tools/examples/xmexample1 ++++ xen-4.0.0-testing/tools/examples/xmexample1 @@ -7,11 +7,13 @@ #============================================================================ @@ -43,10 +43,10 @@ Index: xen-4.0.1-testing/tools/examples/xmexample1 #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.1-testing/tools/examples/xmexample2 +Index: xen-4.0.0-testing/tools/examples/xmexample2 =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/xmexample2 -+++ xen-4.0.1-testing/tools/examples/xmexample2 +--- xen-4.0.0-testing.orig/tools/examples/xmexample2 ++++ xen-4.0.0-testing/tools/examples/xmexample2 @@ -35,11 +35,13 @@ xm_vars.var('vmid', xm_vars.check() @@ -86,32 +86,33 @@ Index: xen-4.0.1-testing/tools/examples/xmexample2 #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.1-testing/tools/examples/xmexample3 +Index: xen-4.0.0-testing/tools/examples/xmexample3 =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/xmexample3 -+++ xen-4.0.1-testing/tools/examples/xmexample3 +--- xen-4.0.0-testing.orig/tools/examples/xmexample3 ++++ xen-4.0.0-testing/tools/examples/xmexample3 @@ -35,11 +35,13 @@ xm_vars.var('vmid', xm_vars.check() #---------------------------------------------------------------------------- -# Kernel image file. -kernel = "/path/to/domU/kernel" +- +-# Optional ramdisk. +-#ramdisk = "/boot/initrd.gz" +# Kernel image file and (optional) ramdisk (initrd). +kernel = "/boot/vmlinuz-xen" +ramdisk = "/boot/initrd-xen" - --# Optional ramdisk. --#ramdisk = "/boot/initrd.gz" ++ +# Or use domUloader instead of kernel/ramdisk to get kernel from domU FS +#bootloader = "/usr/lib/xen/boot/domUloader.py" +#bootentry = "hda2:/vmlinuz-xen,/initrd-xen" # The domain build function. Default is 'linux'. #builder='linux' -Index: xen-4.0.1-testing/tools/examples/xmexample.hvm +Index: xen-4.0.0-testing/tools/examples/xmexample.hvm =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/xmexample.hvm -+++ xen-4.0.1-testing/tools/examples/xmexample.hvm +--- xen-4.0.0-testing.orig/tools/examples/xmexample.hvm ++++ xen-4.0.0-testing/tools/examples/xmexample.hvm @@ -78,7 +78,7 @@ vif = [ 'type=ioemu, bridge=xenbr0' ] # and MODE is r for read-only, w for read-write. @@ -121,11 +122,11 @@ Index: xen-4.0.1-testing/tools/examples/xmexample.hvm #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 -@@ -38,13 +38,13 @@ file. +--- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +@@ -38,13 +38,13 @@ file. The kernel image for the domain. The format of the parameter is the fully qualified path to the kernel image file, @@ -160,10 +161,10 @@ Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 at hda1, which is the root filesystem. =item I -Index: xen-4.0.1-testing/docs/man/xm.pod.1 +Index: xen-4.0.0-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.1-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.1-testing/docs/man/xm.pod.1 +--- xen-4.0.0-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.0-testing/docs/man/xm.pod.1 @@ -163,8 +163,8 @@ soon as it is run. =item I diff --git a/xen.changes b/xen.changes index e43d30e..4bfe29f 100644 --- a/xen.changes +++ b/xen.changes @@ -1,109 +1,22 @@ ------------------------------------------------------------------- -Mon Sep 27 09:59:37 MDT 2010 - carnold@novell.com - -- bnc#640773 - Xen kernel crashing right after grub - 21894-intel-unmask-cpuid.patch -- Upstream patch from Jan - 22148-serial-irq-dest.patch - -------------------------------------------------------------------- -Tue Sep 23 16:45:11 CST 2010 - cyliu@novell.com - -- bnc#628719 - improve check_device_status to handle HA cases - check_device_status.patch - -------------------------------------------------------------------- -Tue Sep 23 16:43:11 CST 2010 - cyliu@novell.com - -- bnc#628719 - multi-xvdp - mutli-xvdp.patch - -------------------------------------------------------------------- -Tue Sep 20 14:11:31 CST 2010 - cyliu@novell.com - -- bnc#632956 - fix VNC altgr-insert behavior - -------------------------------------------------------------------- -Mon Sep 13 16:24:31 MDT 2010 - carnold@novell.com - -- bnc#636231 - XEN: Unable to disconnect/remove CDROM drive from VM - xend-devid-or-name.patch - -------------------------------------------------------------------- -Mon Sep 13 10:50:56 MDT 2010 - carnold@novell.com - -- Upstream patches from Jan - 22019-x86-cpuidle-online-check.patch - 22051-x86-forced-EOI.patch - 22067-x86-irq-domain.patch - 22068-vtd-irte-RH-bit.patch - 22071-ept-get-entry-lock.patch - 22084-x86-xsave-off.patch - -------------------------------------------------------------------- -Mon Sep 13 10:47:09 MDT 2010 - carnold@novell.com - -- bnc#638465 - hypervisor panic in memory handling - 22135-heap-lock.patch - -------------------------------------------------------------------- -Thu Sep 9 11:29:45 MDT 2010 - carnold@novell.com - -- Update to Xen 4.0.1. This is a bug fix release. - -------------------------------------------------------------------- -Mon Aug 16 18:35:11 MDT 2010 - carnold@novell.com - -- bnc#626262 - Populate-on-demand memory problem on xen with hvm - guest - 21971-pod-accounting.patch - -------------------------------------------------------------------- -Mon Aug 16 17:03:58 CST 2010 - cyliu@novell.com - -- bnc#584204 - xm usb-list broken - usb-list.patch - -------------------------------------------------------------------- -Thu Aug 12 06:13:44 MDT 2010 - carnold@novell.com - -- bnc#625520 - TP-L3: NMI cannot be triggered for xen kernel - 21926-x86-pv-NMI-inject.patch - -------------------------------------------------------------------- -Mon Aug 9 09:47:09 MDT 2010 - carnold@novell.com - -- bnc#613529 - TP-L3: kdump kernel hangs when crash was initiated - from xen kernel - 21886-kexec-shutdown.patch - -------------------------------------------------------------------- -Mon Aug 2 16:42:41 MDT 2010 - carnold@novell.com - -- Upstream Intel patches to improve X2APIC handling. - 21716-iommu-alloc.patch - 21717-ir-qi.patch - 21718-x2apic-logic.patch - -------------------------------------------------------------------- -Tue Jul 27 16:23:09 MDT 2010 - jfehlig@novell.com +Tue Jul 27 16:32:57 MDT 2010 - jfehlig@novell.com - bnc#623833 - Error in Xend-API method VM_set_actions_after_crash 21866-xenapi.patch ------------------------------------------------------------------- -Tue Jul 27 15:37:51 MDT 2010 - jfehlig@novell.com +Tue Jul 27 15:39:17 MDT 2010 - jfehlig@novell.com - bnc#625003 - Fix vm config options coredump-{restart,destroy} Added hunk to xm-create-xflag.patch ------------------------------------------------------------------- -Mon Jul 26 16:53:02 MDT 2010 - jfehlig@novell.com +Mon Jul 26 16:49:39 MDT 2010 - jfehlig@novell.com - bnc#605186 - Squelch harmless error messages in block-iscsi ------------------------------------------------------------------- -Mon Jul 26 16:22:56 MDT 2010 - jfehlig@novell.com +Mon Jul 26 16:45:21 MDT 2010 - jfehlig@novell.com - bnc#623438 - Add ability to control SCSI device path scanning in xend @@ -154,8 +67,6 @@ Tue Jul 6 11:31:33 MDT 2010 - carnold@novell.com 21706-trace-security.patch 21712-amd-osvw.patch 21744-x86-cpufreq-range-check.patch - 21933-vtd-ioapic-write.patch - 21953-msi-enable.patch ------------------------------------------------------------------- Fri Jun 25 15:43:35 CST 2010 - jsong@novell.com diff --git a/xen.spec b/xen.spec index 901bdff..4fb35ef 100644 --- a/xen.spec +++ b/xen.spec @@ -1,5 +1,5 @@ # -# spec file for package xen (Version 4.0.1_21326_01) +# spec file for package xen (Version 4.0.0_21091_05) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -22,8 +22,8 @@ Name: xen ExclusiveArch: %ix86 x86_64 %define xvers 4.0 %define xvermaj 4 -%define changeset 21326 -%define xen_build_dir xen-4.0.1-testing +%define changeset 21091 +%define xen_build_dir xen-4.0.0-testing %define with_kmp 1 BuildRequires: LibVNCServer-devel SDL-devel acpica automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel texinfo transfig BuildRequires: texlive texlive-latex @@ -38,14 +38,14 @@ BuildRequires: glibc-32bit glibc-devel-32bit %if %{?with_kmp}0 BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11 %endif -Version: 4.0.1_21326_01 -Release: 6 +Version: 4.0.0_21091_05 +Release: 9 License: GPLv2+ Group: System/Kernel AutoReqProv: on PreReq: %insserv_prereq %fillup_prereq Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) -Source0: xen-4.0.1-testing-src.tar.bz2 +Source0: xen-4.0.0-testing-src.tar.bz2 Source2: README.SuSE Source3: boot.xen Source4: boot.local.xenU @@ -75,32 +75,68 @@ Source24: xenapiusers Source25: xen-updown.sh # Upstream patches Patch0: 21089-x86-startup-irq-from-setup-gsi.patch -Patch1: 21235-crashkernel-advanced.patch -Patch2: 21271-x86-cache-flush-global.patch -Patch3: 21301-svm-lmsl.patch -Patch4: 21304-keyhandler-alternative.patch -Patch5: 21406-x86-microcode-quiet.patch -Patch6: 21421-vts-ats-enabling.patch -Patch7: 21526-x86-nehalem-cpuid-mask.patch -Patch8: 21542-amd-erratum-411.patch -Patch9: 21615-dont-save-xen-heap-pages.patch -Patch10: 21627-cpuidle-wrap.patch -Patch11: 21653-xend-mac-addr.patch -Patch12: 21678-xend-mac-fix.patch -Patch13: 21683-vtd-kill-timer-conditional.patch -Patch14: 21723-get-domu-state.patch -Patch15: 21847-pscsi.patch -Patch16: 21866-xenapi.patch -Patch17: 21894-intel-unmask-cpuid.patch -Patch18: 22019-x86-cpuidle-online-check.patch -Patch19: 22051-x86-forced-EOI.patch -Patch20: 22067-x86-irq-domain.patch -Patch21: 22068-vtd-irte-RH-bit.patch -Patch22: 22071-ept-get-entry-lock.patch -Patch23: 22084-x86-xsave-off.patch -Patch24: 7410-qemu-alt-gr.patch -Patch25: 22135-heap-lock.patch -Patch26: 22148-serial-irq-dest.patch +Patch1: 21109-x86-cpu-hotplug.patch +Patch2: 21128-domain-save-flush.patch +Patch3: 21129-xen-hotplug-cleanup.patch +Patch4: 21150-shadow-race.patch +Patch5: 21151-trace-bounds-check.patch +Patch6: 21160-sysctl-debug-keys.patch +Patch7: 21189-x86-emulate-clflush.patch +Patch8: 21193-blktap-script.patch +Patch9: 21194-ioemu-subtype.patch +Patch10: 21223-xend-preserve-devs.patch +Patch11: 21225-conring-iommu.patch +Patch12: 21234-x86-bad-srat-clear-pxm2node.patch +Patch13: 21235-crashkernel-advanced.patch +Patch14: 21266-vmx-disabled-check.patch +Patch15: 21271-x86-cache-flush-global.patch +Patch16: 21272-x86-dom0-alloc-performance.patch +Patch17: 21273-linux-autconf.patch +Patch18: 21301-svm-lmsl.patch +Patch19: 21304-keyhandler-alternative.patch +Patch20: 21317-xend-blkif-util-tap2.patch +Patch21: passthrough-hotplug-segfault.patch +Patch22: 21331-svm-vintr-during-nmi.patch +Patch23: 21333-xentrace-t_info-size.patch +Patch24: 21340-vtd-dom0-mapping-latency.patch +Patch25: 21346-x86-platform-timer-wrap.patch +Patch26: 21349-x86-memcpy.patch +Patch27: 21360-x86-mce-polling-disabled-init.patch +Patch28: 21372-x86-cross-cpu-wait.patch +Patch29: 21373-dummy-domain-io-caps.patch +Patch30: 21406-x86-microcode-quiet.patch +Patch31: 21408-amd-erratum-383.patch +Patch32: 21421-vts-ats-enabling.patch +Patch33: 21435-vmx-retain-global-controls.patch +Patch34: 21445-x86-tsc-handling-cleanups-v2.patch +Patch35: 21446-iommu-graceful-generic-fail.patch +Patch36: 21453-shadow-avoid-remove-all-after-teardown.patch +Patch37: 21456-compat-hvm-addr-check.patch +Patch38: 21459-block-script.patch +Patch39: 21460-xend-timeoffset.patch +Patch40: 21492-x86-pirq-unbind.patch +Patch41: 21526-x86-nehalem-cpuid-mask.patch +Patch42: 21542-amd-erratum-411.patch +Patch43: 21615-dont-save-xen-heap-pages.patch +Patch44: 21620-x86-signed-domain-irq.patch +Patch45: 21627-cpuidle-wrap.patch +Patch46: 21643-vmx-vpmu-pmc-offset.patch +Patch47: 21653-xend-mac-addr.patch +Patch48: 21678-xend-mac-fix.patch +Patch49: 21682-trace-buffer-range.patch +Patch50: 21683-vtd-kill-timer-conditional.patch +Patch51: 21693-memevent-64bit-only.patch +Patch52: 21695-trace-t_info-readonly.patch +Patch53: 21698-x86-pirq-range-check.patch +Patch54: 21699-p2m-query-for-type-change.patch +Patch55: 21700-32on64-vm86-gpf.patch +Patch56: 21705-trace-printk.patch +Patch57: 21706-trace-security.patch +Patch58: 21712-amd-osvw.patch +Patch59: 21723-get-domu-state.patch +Patch60: 21744-x86-cpufreq-range-check.patch +Patch61: 21847-pscsi.patch +Patch62: 21866-xenapi.patch # Our patches Patch300: xen-config.diff Patch301: xend-config.diff @@ -120,6 +156,8 @@ Patch314: xen-max-free-mem.diff Patch315: xen-disable-libxl.diff Patch316: xen-disable-xenpaging.diff Patch317: xen-extra-fixes.patch +Patch320: block-losetup-retry.diff +Patch321: block-flags.diff Patch322: bridge-opensuse.patch Patch323: bridge-vlan.diff Patch324: bridge-bonding.diff @@ -147,6 +185,7 @@ Patch355: tools-gdbserver-build.diff Patch356: ioemu-vnc-resize.patch Patch357: ioemu-debuginfo.patch Patch358: vif-bridge-no-iptables.patch +Patch359: suse-disable-tap2-default.patch # Needs to go upstream Patch360: checkpoint-rename.patch Patch361: xm-save-check-file.patch @@ -161,8 +200,6 @@ Patch369: cpu-pools-docs.patch Patch370: xend-sysconfig.patch Patch371: domu-usb-controller.patch Patch372: popen2-argument-fix.patch -Patch373: usb-list.patch -Patch374: xend-devid-or-name.patch # Patches for snapshot support Patch400: snapshot-ioemu-save.patch Patch401: snapshot-ioemu-restore.patch @@ -180,16 +217,14 @@ Patch421: ioemu-blktap-barriers.patch # Other bug fixes or features Patch423: bdrv_open2_fix_flags.patch Patch424: bdrv_open2_flags_2.patch -Patch425: ioemu-bdrv-open-CACHE_WB.patch -Patch426: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch +Patch425: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch +Patch426: ioemu-bdrv-open-CACHE_WB.patch Patch427: xen-ioemu-hvm-pv-support.diff Patch428: qemu-dm-segfault.patch Patch429: hibernate.patch Patch430: del_usb_xend_entry.patch Patch431: capslock_enable.patch Patch432: enable_more_nic_pxe.patch -Patch433: multi-xvdp.patch -Patch434: check_device_status.patch # Jim's domain lock patch Patch450: xend-domain-lock.patch # Hypervisor and PV driver Patches @@ -574,6 +609,42 @@ Authors: %patch24 -p1 %patch25 -p1 %patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +%patch43 -p1 +%patch44 -p1 +%patch45 -p1 +%patch46 -p1 +%patch47 -p1 +%patch48 -p1 +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 +%patch52 -p1 +%patch53 -p1 +%patch54 -p1 +%patch55 -p1 +%patch56 -p1 +%patch57 -p1 +%patch58 -p1 +%patch59 -p1 +%patch60 -p1 +%patch61 -p1 +%patch62 -p1 %patch300 -p1 %patch301 -p1 %patch302 -p1 @@ -592,6 +663,8 @@ Authors: %patch315 -p1 %patch316 -p1 %patch317 -p1 +#%patch320 -p1 +#%patch321 -p1 %patch322 -p1 %patch323 -p1 %patch324 -p1 @@ -619,6 +692,7 @@ Authors: %patch356 -p1 %patch357 -p1 %patch358 -p1 +%patch359 -p1 %patch360 -p1 %patch361 -p1 %patch362 -p1 @@ -632,8 +706,6 @@ Authors: %patch370 -p1 %patch371 -p1 %patch372 -p1 -%patch373 -p1 -%patch374 -p1 %patch400 -p1 %patch401 -p1 %patch402 -p1 @@ -656,8 +728,6 @@ Authors: %patch430 -p1 %patch431 -p1 %patch432 -p1 -%patch433 -p1 -%patch434 -p1 %patch450 -p1 %patch500 -p1 %patch501 -p1 @@ -846,7 +916,6 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/remus rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages/xen/remus # This is necessary because of the build of libconfig for libxl #rm -rf $RPM_BUILD_ROOT/$RPM_BUILD_ROOT -rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug %files %defattr(-,root,root) @@ -905,7 +974,6 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug /usr/sbin/td-util /usr/sbin/vhd-update /usr/sbin/vhd-util -/usr/sbin/gdbsx %dir %{_libdir}/xen %dir %{_libdir}/xen/bin %ifarch x86_64 diff --git a/xenapi-console-protocol.patch b/xenapi-console-protocol.patch index 33b9204..8f9fa92 100644 --- a/xenapi-console-protocol.patch +++ b/xenapi-console-protocol.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -3924,6 +3924,14 @@ class XendDomainInfo: if not config.has_key('backend'): config['backend'] = "00000000-0000-0000-0000-000000000000" diff --git a/xend-config.diff b/xend-config.diff index 86564e2..9f9a903 100644 --- a/xend-config.diff +++ b/xend-config.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains +Index: xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xendomains -+++ xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xendomains ++++ xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains @@ -1,4 +1,4 @@ -## Path: System/xen +## Path: System/Virtualization @@ -27,10 +27,10 @@ Index: xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains ## Type: integer ## Default: 300 -Index: xen-4.0.1-testing/tools/examples/xend-config.sxp +Index: xen-4.0.0-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.1-testing/tools/examples/xend-config.sxp +--- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.0-testing/tools/examples/xend-config.sxp @@ -58,11 +58,12 @@ diff --git a/xend-core-dump-loc.diff b/xend-core-dump-loc.diff index a4cc321..7f0e9b2 100644 --- a/xend-core-dump-loc.diff +++ b/xend-core-dump-loc.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -2317,7 +2317,7 @@ class XendDomainInfo: # To prohibit directory traversal based_name = os.path.basename(self.info['name_label']) diff --git a/xend-devid-or-name.patch b/xend-devid-or-name.patch deleted file mode 100644 index 22496c3..0000000 --- a/xend-devid-or-name.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User Jim Fehlig -# Date 1284948067 21600 -# Node ID 4674ad11feef87a6a57b99313966e0e121588e1c -# Parent 5393151a737b023476f4e571effc547e758cf8c8 -xend: Fix device_configure - -The semantics of XendDomainInfo.py:device_configure() changed with xen upstream -c/s 19610. Previously this method would take a devid in actual id *or* name -form, e.g. it would accept '5632' or 'hdc'. This patch restores that behavior. - - Signed-off-by: Jim Fehlig - -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1218,6 +1218,9 @@ class XendDomainInfo: - except ValueError: - pass - devid = dev_control.convertToDeviceNumber(dev) -+ else: -+ # devid could be a name, e.g. hdc -+ devid = dev_control.convertToDeviceNumber(devid) - dev_info = self._getDeviceInfo_vbd(devid) - if dev_info is None: - raise VmError("Device %s not connected" % devid) diff --git a/xend-domain-lock.patch b/xend-domain-lock.patch index 01d5912..8a11cff 100644 --- a/xend-domain-lock.patch +++ b/xend-domain-lock.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/examples/xend-config.sxp +Index: xen-4.0.0-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.1-testing/tools/examples/xend-config.sxp +--- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.0-testing/tools/examples/xend-config.sxp @@ -305,6 +305,65 @@ # device assignment could really work properly even after we do this. #(pci-passthrough-strict-check yes) @@ -68,10 +68,10 @@ Index: xen-4.0.1-testing/tools/examples/xend-config.sxp # If we have a very big scsi device configuration, start of xend is slow, # because xend scans all the device paths to build its internal PSCSI device # list. If we need only a few devices for assigning to a guest, we can reduce -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py @@ -32,11 +32,12 @@ import re import copy import os @@ -94,7 +94,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py XendTask.log_progress(0, 30, self._constructDomain) XendTask.log_progress(31, 60, self._initDomain) -@@ -2990,6 +2992,11 @@ class XendDomainInfo: +@@ -2987,6 +2989,11 @@ class XendDomainInfo: self._stateSet(DOM_STATE_HALTED) self.domid = None # Do not push into _stateSet()! @@ -106,7 +106,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py finally: self.refresh_shutdown_lock.release() -@@ -4503,6 +4510,74 @@ class XendDomainInfo: +@@ -4493,6 +4500,74 @@ class XendDomainInfo: def has_device(self, dev_class, dev_uuid): return (dev_uuid in self.info['%s_refs' % dev_class.lower()]) @@ -181,10 +181,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py def __str__(self): return '' % \ (str(self.domid), self.info['name_label'], -Index: xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendOptions.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendOptions.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py @@ -154,6 +154,17 @@ class XendOptions: use loose check automatically if necessary.""" pci_dev_assign_strict_check_default = True @@ -228,10 +228,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py def get_vnc_tls(self): return self.get_config_string('vnc-tls', self.xend_vnc_tls) -Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py @@ -131,6 +131,7 @@ def save(fd, dominfo, network, live, dst dominfo.shutdown('suspend') dominfo.waitForSuspend() @@ -248,10 +248,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py return dominfo except Exception, exn: dominfo.destroy() -Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile @@ -19,6 +19,7 @@ XEN_SCRIPTS += vtpm vtpm-delete XEN_SCRIPTS += xen-hotplug-cleanup XEN_SCRIPTS += external-device-migrate @@ -260,10 +260,10 @@ Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh -Index: xen-4.0.1-testing/tools/hotplug/Linux/domain-lock +Index: xen-4.0.0-testing/tools/hotplug/Linux/domain-lock =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/hotplug/Linux/domain-lock ++++ xen-4.0.0-testing/tools/hotplug/Linux/domain-lock @@ -0,0 +1,83 @@ +#!/bin/bash + @@ -348,10 +348,10 @@ Index: xen-4.0.1-testing/tools/hotplug/Linux/domain-lock + get_status $vm_path + ;; +esac -Index: xen-4.0.1-testing/tools/hotplug/Linux/vm-monitor +Index: xen-4.0.0-testing/tools/hotplug/Linux/vm-monitor =================================================================== --- /dev/null -+++ xen-4.0.1-testing/tools/hotplug/Linux/vm-monitor ++++ xen-4.0.0-testing/tools/hotplug/Linux/vm-monitor @@ -0,0 +1,41 @@ +#!/bin/bash + diff --git a/xend-sysconfig.patch b/xend-sysconfig.patch index 972fa6b..3a433c8 100644 --- a/xend-sysconfig.patch +++ b/xend-sysconfig.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xend +Index: xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xend =================================================================== ---- xen-4.0.1-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xend -+++ xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xend +--- xen-4.0.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xend ++++ xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xend @@ -1,11 +1,27 @@ +## Path: System/Virtualization +## Type: string(none,guest,hv,all) diff --git a/xm-create-xflag.patch b/xm-create-xflag.patch index 0c9ecf9..e637b87 100644 --- a/xm-create-xflag.patch +++ b/xm-create-xflag.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xm/create.py +Index: xen-4.0.0-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.1-testing/tools/python/xen/xm/create.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.0-testing/tools/python/xen/xm/create.py @@ -36,7 +36,7 @@ from xen.xend.server.DevConstants import from xen.util import blkif from xen.util import vscsi_util @@ -11,7 +11,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/create.py from xen.util import utils, auxbin from xen.util.pci import dev_dict_to_sxp, \ parse_pci_name_extended, PciDeviceParseError -@@ -1522,7 +1522,7 @@ def main(argv): +@@ -1514,7 +1514,7 @@ def main(argv): except IOError, exn: raise OptionError("Cannot read file %s: %s" % (config, exn[1])) @@ -20,7 +20,7 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/create.py from xen.xm.xenapi_create import sxp2xml sxp2xml_inst = sxp2xml() doc = sxp2xml_inst.convert_sxp_to_xml(config, transient=True) -@@ -1530,7 +1530,7 @@ def main(argv): +@@ -1522,7 +1522,7 @@ def main(argv): if opts.vals.dryrun and not opts.is_xml: SXPPrettyPrint.prettyprint(config) @@ -29,10 +29,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xm/create.py from xml.dom.ext import PrettyPrint as XMLPrettyPrint XMLPrettyPrint(doc) -Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPIConstants.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py @@ -45,8 +45,10 @@ XEN_API_ON_NORMAL_EXIT = [ XEN_API_ON_CRASH_BEHAVIOUR = [ 'destroy', diff --git a/xm-save-check-file.patch b/xm-save-check-file.patch index f90934a..b118981 100644 --- a/xm-save-check-file.patch +++ b/xm-save-check-file.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py @@ -1923,10 +1923,10 @@ class XendAPI(object): bool(live), port, node, ssl, bool(chs)) return xen_api_success_void() @@ -15,10 +15,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py return xen_api_success_void() def VM_restore(self, _, src, paused): -Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py @@ -1496,7 +1496,7 @@ class XendDomain: pass sock.close() @@ -38,10 +38,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py if dominfo.getDomid() == DOM0_ID: raise XendError("Cannot save privileged domain %s" % str(domid)) if dominfo._stateGet() != DOM_STATE_RUNNING: -Index: xen-4.0.1-testing/tools/python/xen/xm/main.py +Index: xen-4.0.0-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.1-testing/tools/python/xen/xm/main.py +--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.0-testing/tools/python/xen/xm/main.py @@ -120,7 +120,7 @@ SUBCOMMAND_HELP = { 'reset' : ('', 'Reset a domain.'), 'restore' : (' [-p]', diff --git a/xm-test-cleanup.diff b/xm-test-cleanup.diff index 6aae672..f6d1edc 100644 --- a/xm-test-cleanup.diff +++ b/xm-test-cleanup.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py +Index: xen-4.0.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py =================================================================== ---- xen-4.0.1-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py -+++ xen-4.0.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py +--- xen-4.0.0-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py ++++ xen-4.0.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py @@ -35,3 +35,9 @@ if s != 0: # Make sure it's gone if isDomainRunning(domain.getName()): From 163148b4261c2a1a03e3f302347c81c66d2826d56bd1881c8f7d996b54030915 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Mon, 27 Sep 2010 22:07:21 +0000 Subject: [PATCH 6/6] Updating link to change in openSUSE:Factory/xen revision 99.0 OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=87c8ac43897718b61dbcbca0296d6c2a --- 21089-x86-startup-irq-from-setup-gsi.patch | 20 +- 21109-x86-cpu-hotplug.patch | 154 ------- 21128-domain-save-flush.patch | 31 -- 21129-xen-hotplug-cleanup.patch | 22 - 21150-shadow-race.patch | 68 --- 21151-trace-bounds-check.patch | 205 --------- 21160-sysctl-debug-keys.patch | 27 -- 21189-x86-emulate-clflush.patch | 53 --- 21193-blktap-script.patch | 23 - 21194-ioemu-subtype.patch | 12 - 21223-xend-preserve-devs.patch | 32 -- 21225-conring-iommu.patch | 77 ---- 21234-x86-bad-srat-clear-pxm2node.patch | 34 -- 21235-crashkernel-advanced.patch | 22 +- 21266-vmx-disabled-check.patch | 24 -- 21271-x86-cache-flush-global.patch | 14 +- 21272-x86-dom0-alloc-performance.patch | 99 ----- 21273-linux-autconf.patch | 26 -- 21301-svm-lmsl.patch | 28 +- 21304-keyhandler-alternative.patch | 8 +- 21317-xend-blkif-util-tap2.patch | 23 - 21331-svm-vintr-during-nmi.patch | 41 -- 21333-xentrace-t_info-size.patch | 26 -- 21340-vtd-dom0-mapping-latency.patch | 56 --- 21346-x86-platform-timer-wrap.patch | 67 --- 21349-x86-memcpy.patch | 313 -------------- 21360-x86-mce-polling-disabled-init.patch | 20 - 21372-x86-cross-cpu-wait.patch | 42 -- 21373-dummy-domain-io-caps.patch | 48 --- 21408-amd-erratum-383.patch | 141 ------ 21421-vts-ats-enabling.patch | 30 +- 21435-vmx-retain-global-controls.patch | 45 -- 21445-x86-tsc-handling-cleanups-v2.patch | 268 ------------ 21446-iommu-graceful-generic-fail.patch | 29 -- ...adow-avoid-remove-all-after-teardown.patch | 31 -- 21456-compat-hvm-addr-check.patch | 22 - 21459-block-script.patch | 27 -- 21460-xend-timeoffset.patch | 25 -- 21492-x86-pirq-unbind.patch | 23 - 21526-x86-nehalem-cpuid-mask.patch | 227 +++++++--- 21542-amd-erratum-411.patch | 16 +- 21615-dont-save-xen-heap-pages.patch | 22 +- 21620-x86-signed-domain-irq.patch | 34 -- 21627-cpuidle-wrap.patch | 8 +- 21643-vmx-vpmu-pmc-offset.patch | 25 -- 21653-xend-mac-addr.patch | 6 +- 21678-xend-mac-fix.patch | 6 +- 21682-trace-buffer-range.patch | 26 -- 21683-vtd-kill-timer-conditional.patch | 20 +- 21693-memevent-64bit-only.patch | 286 ------------- 21695-trace-t_info-readonly.patch | 90 ---- 21698-x86-pirq-range-check.patch | 20 - 21699-p2m-query-for-type-change.patch | 24 -- 21700-32on64-vm86-gpf.patch | 25 -- 21705-trace-printk.patch | 51 --- 21706-trace-security.patch | 396 ----------------- 21712-amd-osvw.patch | 400 ------------------ 21723-get-domu-state.patch | 28 +- 21744-x86-cpufreq-range-check.patch | 27 -- 21847-pscsi.patch | 26 +- 21866-xenapi.patch | 18 +- 21894-intel-unmask-cpuid.patch | 48 +++ 22019-x86-cpuidle-online-check.patch | 30 ++ 22051-x86-forced-EOI.patch | 203 +++++++++ 22067-x86-irq-domain.patch | 31 ++ 22068-vtd-irte-RH-bit.patch | 35 ++ 22071-ept-get-entry-lock.patch | 45 ++ 22084-x86-xsave-off.patch | 22 + 22135-heap-lock.patch | 51 +++ 22148-serial-irq-dest.patch | 24 ++ 32on64-extra-mem.patch | 8 +- 7410-qemu-alt-gr.patch | 118 ++++++ README.SuSE | 7 +- bdrv_open2_fix_flags.patch | 24 +- bdrv_open2_flags_2.patch | 38 +- blktap-pv-cdrom.patch | 46 +- blktap.patch | 18 +- blktapctrl-default-to-ioemu.patch | 6 +- block-dmmd | 10 +- block-flags.diff | 34 -- block-losetup-retry.diff | 211 --------- bridge-bonding.diff | 6 +- bridge-opensuse.patch | 6 +- bridge-record-creation.patch | 6 +- bridge-vlan.diff | 6 +- build-tapdisk-ioemu.patch | 24 +- capslock_enable.patch | 9 +- cdrom-removable.patch | 26 +- check_device_status.patch | 48 +++ checkpoint-rename.patch | 6 +- cpu-pools-docs.patch | 32 +- cpu-pools-libxc.patch | 26 +- cpu-pools-libxen.patch | 60 +-- cpu-pools-python.patch | 110 ++--- cpu-pools-xmtest.patch | 72 ++-- cpupools-core-fixup.patch | 34 +- cpupools-core.patch | 232 +++++----- del_usb_xend_entry.patch | 8 +- disable_emulated_device.diff | 6 +- dom-print.patch | 9 +- domu-usb-controller.patch | 6 +- dump-exec-state.patch | 52 ++- enable_more_nic_pxe.patch | 12 +- hibernate.patch | 6 +- hv_tools.patch | 26 +- hv_win7_eoi_bug.patch | 6 +- hv_xen_base.patch | 42 +- hv_xen_extension.patch | 28 +- ...7615-qcow2-fix-alloc_cluster_link_l2.patch | 6 +- ioemu-bdrv-open-CACHE_WB.patch | 6 +- ioemu-blktap-barriers.patch | 6 +- ioemu-blktap-fv-init.patch | 6 +- ioemu-blktap-image-format.patch | 12 +- ioemu-blktap-zero-size.patch | 12 +- ioemu-debuginfo.patch | 12 +- ioemu-disable-scsi.patch | 18 +- ioemu-vnc-resize.patch | 8 +- libxen_permissive.patch | 6 +- magic_ioport_compat.patch | 6 +- multi-xvdp.patch | 87 ++++ network-nat-open-SuSEfirewall2-FORWARD.patch | 6 +- network-nat.patch | 6 +- network-route.patch | 6 +- passthrough-hotplug-segfault.patch | 90 ---- popen2-argument-fix.patch | 6 +- pv-driver-build.patch | 6 +- pvdrv-import-shared-info.patch | 18 +- pvdrv_emulation_control.patch | 6 +- qemu-dm-segfault.patch | 6 +- qemu-security-etch1.diff | 12 +- serial-split.patch | 8 +- snapshot-ioemu-delete.patch | 20 +- snapshot-ioemu-restore.patch | 36 +- snapshot-ioemu-save.patch | 30 +- snapshot-xend.patch | 44 +- supported_module.diff | 4 +- suse-disable-tap2-default.patch | 32 -- tapdisk-ioemu-logfile.patch | 8 +- tapdisk-ioemu-shutdown-fix.patch | 12 +- tmp_build.patch | 6 +- tools-gdbserver-build.diff | 8 +- tools-kboot.diff | 36 +- tools-xc_kexec.diff | 78 ++-- udev-rules.patch | 20 +- usb-list.patch | 45 ++ vif-bridge-no-iptables.patch | 6 +- vif-route-ifup.patch | 16 +- x86-cpufreq-report.patch | 14 +- x86-extra-trap-info.patch | 12 +- x86-ioapic-ack-default.patch | 10 +- x86-show-page-walk-early.patch | 44 +- xen-4.0.0-testing-src.tar.bz2 | 3 - xen-4.0.1-testing-src.tar.bz2 | 3 + xen-api-auth.patch | 6 +- xen-changeset.diff | 6 +- xen-config.diff | 23 +- xen-destdir.diff | 36 +- xen-disable-libxl.diff | 8 +- xen-disable-qemu-monitor.diff | 6 +- xen-disable-xenpaging.diff | 8 +- xen-domUloader.diff | 28 +- xen-extra-fixes.patch | 6 +- xen-fixme-doc.diff | 12 +- xen-hvm-default-bridge.diff | 24 +- xen-hvm-default-pae.diff | 6 +- xen-ioemu-hvm-pv-support.diff | 6 +- xen-max-free-mem.diff | 24 +- xen-no-dummy-nfs-ip.diff | 8 +- xen-paths.diff | 18 +- xen-qemu-iscsi-fix.patch | 10 +- xen-rpmoptflags.diff | 12 +- xen-warnings.diff | 54 +-- xen-xm-top-needs-root.diff | 8 +- xen-xmexample-vti.diff | 6 +- xen-xmexample.diff | 45 +- xen.changes | 97 ++++- xen.spec | 156 ++----- xenapi-console-protocol.patch | 6 +- xend-config.diff | 12 +- xend-core-dump-loc.diff | 6 +- xend-devid-or-name.patch | 27 ++ xend-domain-lock.patch | 42 +- xend-sysconfig.patch | 6 +- xm-create-xflag.patch | 16 +- xm-save-check-file.patch | 18 +- xm-test-cleanup.diff | 6 +- 186 files changed, 2359 insertions(+), 5185 deletions(-) delete mode 100644 21109-x86-cpu-hotplug.patch delete mode 100644 21128-domain-save-flush.patch delete mode 100644 21129-xen-hotplug-cleanup.patch delete mode 100644 21150-shadow-race.patch delete mode 100644 21151-trace-bounds-check.patch delete mode 100644 21160-sysctl-debug-keys.patch delete mode 100644 21189-x86-emulate-clflush.patch delete mode 100644 21193-blktap-script.patch delete mode 100644 21194-ioemu-subtype.patch delete mode 100644 21223-xend-preserve-devs.patch delete mode 100644 21225-conring-iommu.patch delete mode 100644 21234-x86-bad-srat-clear-pxm2node.patch delete mode 100644 21266-vmx-disabled-check.patch delete mode 100644 21272-x86-dom0-alloc-performance.patch delete mode 100644 21273-linux-autconf.patch delete mode 100644 21317-xend-blkif-util-tap2.patch delete mode 100644 21331-svm-vintr-during-nmi.patch delete mode 100644 21333-xentrace-t_info-size.patch delete mode 100644 21340-vtd-dom0-mapping-latency.patch delete mode 100644 21346-x86-platform-timer-wrap.patch delete mode 100644 21349-x86-memcpy.patch delete mode 100644 21360-x86-mce-polling-disabled-init.patch delete mode 100644 21372-x86-cross-cpu-wait.patch delete mode 100644 21373-dummy-domain-io-caps.patch delete mode 100644 21408-amd-erratum-383.patch delete mode 100644 21435-vmx-retain-global-controls.patch delete mode 100644 21445-x86-tsc-handling-cleanups-v2.patch delete mode 100644 21446-iommu-graceful-generic-fail.patch delete mode 100644 21453-shadow-avoid-remove-all-after-teardown.patch delete mode 100644 21456-compat-hvm-addr-check.patch delete mode 100644 21459-block-script.patch delete mode 100644 21460-xend-timeoffset.patch delete mode 100644 21492-x86-pirq-unbind.patch delete mode 100644 21620-x86-signed-domain-irq.patch delete mode 100644 21643-vmx-vpmu-pmc-offset.patch delete mode 100644 21682-trace-buffer-range.patch delete mode 100644 21693-memevent-64bit-only.patch delete mode 100644 21695-trace-t_info-readonly.patch delete mode 100644 21698-x86-pirq-range-check.patch delete mode 100644 21699-p2m-query-for-type-change.patch delete mode 100644 21700-32on64-vm86-gpf.patch delete mode 100644 21705-trace-printk.patch delete mode 100644 21706-trace-security.patch delete mode 100644 21712-amd-osvw.patch delete mode 100644 21744-x86-cpufreq-range-check.patch create mode 100644 21894-intel-unmask-cpuid.patch create mode 100644 22019-x86-cpuidle-online-check.patch create mode 100644 22051-x86-forced-EOI.patch create mode 100644 22067-x86-irq-domain.patch create mode 100644 22068-vtd-irte-RH-bit.patch create mode 100644 22071-ept-get-entry-lock.patch create mode 100644 22084-x86-xsave-off.patch create mode 100644 22135-heap-lock.patch create mode 100644 22148-serial-irq-dest.patch create mode 100644 7410-qemu-alt-gr.patch delete mode 100644 block-flags.diff delete mode 100644 block-losetup-retry.diff create mode 100644 check_device_status.patch create mode 100644 multi-xvdp.patch delete mode 100644 passthrough-hotplug-segfault.patch delete mode 100644 suse-disable-tap2-default.patch create mode 100644 usb-list.patch delete mode 100644 xen-4.0.0-testing-src.tar.bz2 create mode 100644 xen-4.0.1-testing-src.tar.bz2 create mode 100644 xend-devid-or-name.patch diff --git a/21089-x86-startup-irq-from-setup-gsi.patch b/21089-x86-startup-irq-from-setup-gsi.patch index 4cf20f0..63e9eee 100644 --- a/21089-x86-startup-irq-from-setup-gsi.patch +++ b/21089-x86-startup-irq-from-setup-gsi.patch @@ -54,9 +54,11 @@ up in order for it to be usable. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/io_apic.c -+++ b/xen/arch/x86/io_apic.c -@@ -2111,6 +2111,7 @@ int __init io_apic_get_redir_entries (in +Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/io_apic.c ++++ xen-4.0.1-testing/xen/arch/x86/io_apic.c +@@ -2231,6 +2231,7 @@ int __init io_apic_get_redir_entries (in int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low) { @@ -64,7 +66,7 @@ Signed-off-by: Jan Beulich struct IO_APIC_route_entry entry; unsigned long flags; int vector; -@@ -2162,7 +2163,12 @@ int io_apic_set_pci_routing (int ioapic, +@@ -2282,7 +2283,12 @@ int io_apic_set_pci_routing (int ioapic, io_apic_write(ioapic, 0x11+2*pin, *(((int *)&entry)+1)); io_apic_write(ioapic, 0x10+2*pin, *(((int *)&entry)+0)); set_native_irq_info(irq, TARGET_CPUS); @@ -78,9 +80,11 @@ Signed-off-by: Jan Beulich return 0; } ---- a/xen/arch/x86/mpparse.c -+++ b/xen/arch/x86/mpparse.c -@@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int trigge +Index: xen-4.0.1-testing/xen/arch/x86/mpparse.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/mpparse.c ++++ xen-4.0.1-testing/xen/arch/x86/mpparse.c +@@ -1102,6 +1102,8 @@ int mp_register_gsi (u32 gsi, int trigge int ioapic = -1; int ioapic_pin = 0; int idx, bit = 0; @@ -89,7 +93,7 @@ Signed-off-by: Jan Beulich /* * Mapping between Global System Interrups, which -@@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, int trigge +@@ -1126,8 +1128,13 @@ int mp_register_gsi (u32 gsi, int trigge if (ioapic_renumber_irq) gsi = ioapic_renumber_irq(ioapic, gsi); diff --git a/21109-x86-cpu-hotplug.patch b/21109-x86-cpu-hotplug.patch deleted file mode 100644 index 747a683..0000000 --- a/21109-x86-cpu-hotplug.patch +++ /dev/null @@ -1,154 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1270624140 -3600 -# Node ID 7794f61c61f3b0c90e367a87b287850b31645742 -# Parent adce8bc43fcccf8730b1da962be60c457c51fa1b -x86, cpu hotplug: Synchronise vcpu state earlier during cpu offline. - -Needs to happen before non-idle VCPU is fully descheduled after CPU is -removed from cpu_online_map. Else sync_vcpu_execstate() doesn't work -properly. - -Signed-off-by: Keir Fraser - -# HG changeset patch -# User Keir Fraser -# Date 1270737112 -3600 -# Node ID c9e8369e49be7396eca444cfce27e6782e4aa248 -# Parent a33909be109cefb0aef251c7c7e48168ed05512a -Fix two issues for CPU online/offline. - -Firstly, we should return if we fail to get spin lock in cpu_down. -Secondly, in credit scheduler, the idlers need be limited only to -online map. - -Signed-off-by: Jiang, Yunhong - -# HG changeset patch -# User Keir Fraser -# Date 1271090027 -3600 -# Node ID 5d4038d41fd894f9fc71e64043d559d7c465bd15 -# Parent 1d3bec66528900b1b442b6d36f24cd35ca076506 -cpufreq: fix racing issue for cpu hotplug - -To eliminate racing between dbs timer handler and cpufreq_del_cpu, -using kill_timer instead of stop_timer to make sure timer handler -execution finished before other stuff in cpufreq_del_cpu. - -BTW, fix a lost point of cpufreq_statistic_lock taking sequence. - -Signed-off-by: Wei Gang - ---- a/xen/arch/x86/domain.c -+++ b/xen/arch/x86/domain.c -@@ -1442,7 +1442,8 @@ void context_switch(struct vcpu *prev, s - - set_current(next); - -- if ( (per_cpu(curr_vcpu, cpu) == next) || is_idle_vcpu(next) ) -+ if ( (per_cpu(curr_vcpu, cpu) == next) || -+ (is_idle_vcpu(next) && cpu_online(cpu)) ) - { - local_irq_enable(); - } ---- a/xen/arch/x86/smpboot.c -+++ b/xen/arch/x86/smpboot.c -@@ -997,17 +997,13 @@ static int __devinit do_boot_cpu(int api - return boot_error; - } - --static void idle_task_exit(void) --{ -- /* Give up lazy state borrowed by this idle vcpu */ -- __sync_lazy_execstate(); --} -- - void cpu_exit_clear(void) - { - int cpu = raw_smp_processor_id(); - -- idle_task_exit(); -+ /* Previous non-idle state should be synchronised already. */ -+ if (__sync_lazy_execstate()) -+ BUG(); - - cpucount --; - cpu_uninit(); -@@ -1302,6 +1298,13 @@ int __cpu_disable(void) - - remove_siblinginfo(cpu); - -+ /* -+ * If we are running the idle vcpu, sync last non-idle vcpu's state -+ * before changing cpu_online_map. If we are running non-idle vcpu, -+ * we will synchronously sync the state in context_switch() later. -+ */ -+ __sync_lazy_execstate(); -+ - /* It's now safe to remove this processor from the online map */ - cpu_clear(cpu, cpu_online_map); - fixup_irqs(); -@@ -1340,10 +1343,8 @@ int cpu_down(unsigned int cpu) - int err = 0; - - /* spin_trylock() avoids deadlock with stop_machine_run(). */ -- if (!spin_trylock(&cpu_add_remove_lock)) { -- err = -EBUSY; -- goto out; -- } -+ if (!spin_trylock(&cpu_add_remove_lock)) -+ return -EBUSY; - - if (num_online_cpus() == 1) { - err = -EBUSY; ---- a/xen/common/sched_credit.c -+++ b/xen/common/sched_credit.c -@@ -410,7 +410,7 @@ _csched_cpu_pick(struct vcpu *vc, bool_t - * like run two VCPUs on co-hyperthreads while there are idle cores - * or sockets. - */ -- idlers = csched_priv.idlers; -+ cpus_and(idlers, cpu_online_map, csched_priv.idlers); - cpu_set(cpu, idlers); - cpus_and(cpus, cpus, idlers); - cpu_clear(cpu, cpus); ---- a/xen/drivers/acpi/pmstat.c -+++ b/xen/drivers/acpi/pmstat.c -@@ -86,12 +86,13 @@ int do_get_pm_info(struct xen_sysctl_get - case PMSTAT_get_pxstat: - { - uint32_t ct; -- struct pm_px *pxpt = cpufreq_statistic_data[op->cpuid]; -+ struct pm_px *pxpt; - spinlock_t *cpufreq_statistic_lock = - &per_cpu(cpufreq_statistic_lock, op->cpuid); - - spin_lock(cpufreq_statistic_lock); - -+ pxpt = cpufreq_statistic_data[op->cpuid]; - if ( !pxpt || !pxpt->u.pt || !pxpt->u.trans_pt ) - { - spin_unlock(cpufreq_statistic_lock); ---- a/xen/drivers/cpufreq/cpufreq_ondemand.c -+++ b/xen/drivers/cpufreq/cpufreq_ondemand.c -@@ -196,9 +196,8 @@ static void dbs_timer_init(struct cpu_db - { - dbs_info->enable = 1; - -- if ( !dbs_timer[dbs_info->cpu].function ) -- init_timer(&dbs_timer[dbs_info->cpu], do_dbs_timer, -- (void *)dbs_info, dbs_info->cpu); -+ init_timer(&dbs_timer[dbs_info->cpu], do_dbs_timer, -+ (void *)dbs_info, dbs_info->cpu); - - set_timer(&dbs_timer[dbs_info->cpu], NOW()+dbs_tuners_ins.sampling_rate); - -@@ -213,7 +212,7 @@ static void dbs_timer_exit(struct cpu_db - { - dbs_info->enable = 0; - dbs_info->stoppable = 0; -- stop_timer(&dbs_timer[dbs_info->cpu]); -+ kill_timer(&dbs_timer[dbs_info->cpu]); - } - - int cpufreq_governor_dbs(struct cpufreq_policy *policy, unsigned int event) diff --git a/21128-domain-save-flush.patch b/21128-domain-save-flush.patch deleted file mode 100644 index 98ae883..0000000 --- a/21128-domain-save-flush.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271053336 -3600 -# Node ID b5f9c6274d917db5bbe6cb9cc0d59910cc07a8a6 -# Parent 5bc70100b514d98bd3938cdeca1e182726c26df2 -libxc: Flush I/O before xc_domain_save completion - -The final, flushing call to discard_file_cache also discards any -errors from fsync. Call fsync explicitly before leaving, to check if -all VM memory actually made it to the disk. - -Signed-off-by: Daniel Stodden - -Index: xen-4.0.0-testing/tools/libxc/xc_domain_save.c -=================================================================== ---- xen-4.0.0-testing.orig/tools/libxc/xc_domain_save.c -+++ xen-4.0.0-testing/tools/libxc/xc_domain_save.c -@@ -1764,6 +1764,13 @@ int xc_domain_save(int xc_handle, int io - goto out; - } - -+ /* Flush last write and check for errors. */ -+ if ( fsync(io_fd) && errno != EINVAL ) -+ { -+ PERROR("Error when flushing state file"); -+ goto out; -+ } -+ - /* Success! */ - rc = 0; - diff --git a/21129-xen-hotplug-cleanup.patch b/21129-xen-hotplug-cleanup.patch deleted file mode 100644 index 9162685..0000000 --- a/21129-xen-hotplug-cleanup.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271053401 -3600 -# Node ID bf74d9c31674c9001a7c4aa8d93227552edf53b1 -# Parent b5f9c6274d917db5bbe6cb9cc0d59910cc07a8a6 -blktap2: a little fix to xen-hotplug-cleanup - -Signed-off-by: James (Song Wei) - -Index: xen-4.0.0-testing/tools/hotplug/Linux/xen-hotplug-cleanup -=================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/xen-hotplug-cleanup -+++ xen-4.0.0-testing/tools/hotplug/Linux/xen-hotplug-cleanup -@@ -21,7 +21,7 @@ if [ "$vm" != "" ]; then - - # if the vm path does not exist and the device class is 'vbd' then we may have - # a tap2 device -- if [ $(xenstore-read "$vm_dev" 2>/dev/null) != "" ] \ -+ if [ "$(xenstore-read "$vm_dev" 2>/dev/null)" != "" ] \ - && [ "${path_array[1]}" = "vbd" ]; then - vm_dev="$vm/device/tap2/${path_array[3]}" - fi diff --git a/21150-shadow-race.patch b/21150-shadow-race.patch deleted file mode 100644 index 75d6b62..0000000 --- a/21150-shadow-race.patch +++ /dev/null @@ -1,68 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271091116 -3600 -# Node ID 78488a63bbc200095413824cc146134b54635da9 -# Parent b010b792c0f814de725f669d8a6bee738df68963 -x86, shadow: Fix read-to-use race condition - -If OOS mode is enabled, after last possible resync, read the guest l1e -one last time. If it's different than the original read, start over -again. - -This fixes a race which can result in inconsistent in-sync shadow -tables, leading to corruption: - -v1: take page fault, read gl1e from an out-of-sync PT. -v2: modify gl1e, lowering permissions -[v1,v3]: resync l1 which was just read. -v1: propagate change to l1 shadow using stale gl1e - -Now we have an in-sync shadow with more permissions than the guest. - -The resync can happen either as a result of a 3rd vcpu doing a cr3 -update, or under certain conditions by v1 itself. - -Signed-off-by: George Dunlap - ---- a/xen/arch/x86/mm/shadow/multi.c -+++ b/xen/arch/x86/mm/shadow/multi.c -@@ -240,6 +240,23 @@ shadow_check_gwalk(struct vcpu *v, unsig - return !mismatch; - } - -+static int -+shadow_check_gl1e(struct vcpu *v, walk_t *gw) -+{ -+ guest_l1e_t *l1p, nl1e; -+ -+ if ( !mfn_valid(gw->l1mfn) ) -+ return 0; -+ -+ /* Can't just pull-through because mfn may have changed */ -+ l1p = map_domain_page(mfn_x(gw->l1mfn)); -+ nl1e.l1 = l1p[guest_l1_table_offset(gw->va)].l1; -+ unmap_domain_page(l1p); -+ -+ return gw->l1e.l1 != nl1e.l1; -+} -+ -+ - /* Remove write access permissions from a gwalk_t in a batch, and - * return OR-ed result for TLB flush hint and need to rewalk the guest - * pages. -@@ -3235,6 +3252,15 @@ static int sh_page_fault(struct vcpu *v, - shadow_unlock(d); - return 0; - } -+ -+ /* Final check: if someone has synced a page, it's possible that -+ * our l1e is stale. Compare the entries, and rewalk if necessary. */ -+ if ( shadow_check_gl1e(v, &gw) ) -+ { -+ perfc_incr(shadow_inconsistent_gwalk); -+ shadow_unlock(d); -+ goto rewalk; -+ } - #endif /* OOS */ - - /* Calculate the shadow entry and write it */ diff --git a/21151-trace-bounds-check.patch b/21151-trace-bounds-check.patch deleted file mode 100644 index 3da6d68..0000000 --- a/21151-trace-bounds-check.patch +++ /dev/null @@ -1,205 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271091288 -3600 -# Node ID 94cae4dfa25bcf9aaeb93fb374926cb40411ebdf -# Parent 78488a63bbc200095413824cc146134b54635da9 -xentrace: Bounds checking and error handling - -Check tbuf_size to make sure that it will fit on the t_info struct -allocated at boot. Also deal with allocation failures more -gracefully. - -Signed-off-by: George Dunlap - -# HG changeset patch -# User Keir Fraser -# Date 1278093165 -3600 -# Node ID 2f3a68a0b55b1b7df4d6632dfc151040ba08e9ea -# Parent 2846fd19945cb2ab32d1513531c3500278133484 -trace: Fix T_INFO_FIRST_OFFSET calculation - -This wasn't defined correctly, thus allowing in the -num_online_cpus() == NR_CPUS case to pass a corrupted MFN to -Dom0. - -Reported-by: Jan Beulich -Signed-off-by: George Dunlap - -# HG changeset patch -# User Keir Fraser -# Date 1278093190 -3600 -# Node ID 1390e2ab45c7b63d79ba9496d609cf59af4b44ee -# Parent 2f3a68a0b55b1b7df4d6632dfc151040ba08e9ea -trace: improve check_tbuf_size() - -It didn't consider the case of the incoming size not allowing for the -2*data_size range for t_buf->{prod,cons} - -Signed-off-by: Jan Beulich -Signed-off-by: George Dunlap - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -48,10 +48,12 @@ integer_param("tbuf_size", opt_tbuf_size - /* Pointers to the meta-data objects for all system trace buffers */ - static struct t_info *t_info; - #define T_INFO_PAGES 2 /* Size fixed at 2 pages for now. */ -+#define T_INFO_SIZE ((T_INFO_PAGES)*(PAGE_SIZE)) - static DEFINE_PER_CPU_READ_MOSTLY(struct t_buf *, t_bufs); - static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, t_data); - static DEFINE_PER_CPU_READ_MOSTLY(spinlock_t, t_lock); - static int data_size; -+static u32 t_info_first_offset __read_mostly; - - /* High water mark for trace buffers; */ - /* Send virtual interrupt when buffer level reaches this point */ -@@ -71,6 +73,39 @@ static cpumask_t tb_cpu_mask = CPU_MASK_ - /* which tracing events are enabled */ - static u32 tb_event_mask = TRC_ALL; - -+/* Return the number of elements _type necessary to store at least _x bytes of data -+ * i.e., sizeof(_type) * ans >= _x. */ -+#define fit_to_type(_type, _x) (((_x)+sizeof(_type)-1) / sizeof(_type)) -+ -+static void calc_tinfo_first_offset(void) -+{ -+ int offset_in_bytes; -+ -+ offset_in_bytes = offsetof(struct t_info, mfn_offset[NR_CPUS]); -+ -+ t_info_first_offset = fit_to_type(uint32_t, offset_in_bytes); -+ -+ gdprintk(XENLOG_INFO, "%s: NR_CPUs %d, offset_in_bytes %d, t_info_first_offset %u\n", -+ __func__, NR_CPUS, offset_in_bytes, (unsigned)t_info_first_offset); -+} -+ -+/** -+ * check_tbuf_size - check to make sure that the proposed size will fit -+ * in the currently sized struct t_info and allows prod and cons to -+ * reach double the value without overflow. -+ */ -+static int check_tbuf_size(u32 pages) -+{ -+ struct t_buf dummy; -+ typeof(dummy.prod) size; -+ -+ size = ((typeof(dummy.prod))pages) * PAGE_SIZE; -+ -+ return (size / PAGE_SIZE != pages) -+ || (size + size < size) -+ || (num_online_cpus() * pages + t_info_first_offset > T_INFO_SIZE / sizeof(uint32_t)); -+} -+ - /** - * alloc_trace_bufs - performs initialization of the per-cpu trace buffers. - * -@@ -87,7 +122,9 @@ static int alloc_trace_bufs(void) - unsigned long nr_pages; - /* Start after a fixed-size array of NR_CPUS */ - uint32_t *t_info_mfn_list = (uint32_t *)t_info; -- int offset = (NR_CPUS * 2 + 1 + 1) / 4; -+ int offset = t_info_first_offset; -+ -+ BUG_ON(check_tbuf_size(opt_tbuf_size)); - - if ( opt_tbuf_size == 0 ) - return -EINVAL; -@@ -180,7 +217,8 @@ out_dealloc: - } - spin_unlock_irqrestore(&per_cpu(t_lock, cpu), flags); - } -- return -EINVAL; -+ -+ return -ENOMEM; - } - - -@@ -197,19 +235,35 @@ static int tb_set_size(int size) - * boot time or via control tools, but not by both. Once buffers - * are created they cannot be destroyed. - */ -- if ( (opt_tbuf_size != 0) || (size <= 0) ) -+ int ret = 0; -+ -+ -+ -+ if ( (opt_tbuf_size != 0) ) - { -- gdprintk(XENLOG_INFO, "tb_set_size from %d to %d not implemented\n", -- opt_tbuf_size, size); -+ if ( size != opt_tbuf_size ) -+ gdprintk(XENLOG_INFO, "tb_set_size from %d to %d not implemented\n", -+ opt_tbuf_size, size); - return -EINVAL; - } - -- opt_tbuf_size = size; -- if ( alloc_trace_bufs() != 0 ) -+ if ( size <= 0 ) - return -EINVAL; - -- printk("Xen trace buffers: initialized\n"); -- return 0; -+ if ( check_tbuf_size(size) ) -+ { -+ gdprintk(XENLOG_INFO, "tb size %d too large\n", size); -+ return -EINVAL; -+ } -+ -+ opt_tbuf_size = size; -+ -+ if ( (ret = alloc_trace_bufs()) == 0 ) -+ printk("Xen trace buffers: initialized\n"); -+ else -+ opt_tbuf_size = 0; -+ -+ return ret; - } - - int trace_will_trace_event(u32 event) -@@ -248,6 +302,10 @@ int trace_will_trace_event(u32 event) - void __init init_trace_bufs(void) - { - int i; -+ -+ /* Calculate offset in u32 of first mfn */ -+ calc_tinfo_first_offset(); -+ - /* t_info size fixed at 2 pages for now. That should be big enough / small enough - * until it's worth making it dynamic. */ - t_info = alloc_xenheap_pages(1, 0); -@@ -265,13 +323,18 @@ void __init init_trace_bufs(void) - share_xen_page_with_privileged_guests( - virt_to_page(t_info) + i, XENSHARE_writable); - -- -- - if ( opt_tbuf_size == 0 ) - { - printk("Xen trace buffers: disabled\n"); - return; - } -+ else if ( check_tbuf_size(opt_tbuf_size) ) -+ { -+ gdprintk(XENLOG_INFO, "Xen trace buffers: " -+ "tb size %d too large, disabling\n", -+ opt_tbuf_size); -+ opt_tbuf_size = 0; -+ } - - if ( alloc_trace_bufs() == 0 ) - { -@@ -279,6 +342,13 @@ void __init init_trace_bufs(void) - wmb(); /* above must be visible before tb_init_done flag set */ - tb_init_done = 1; - } -+ else -+ { -+ gdprintk(XENLOG_INFO, "Xen trace buffers: " -+ "allocation size %d failed, disabling\n", -+ opt_tbuf_size); -+ opt_tbuf_size = 0; -+ } - } - - /** diff --git a/21160-sysctl-debug-keys.patch b/21160-sysctl-debug-keys.patch deleted file mode 100644 index 6839cdb..0000000 --- a/21160-sysctl-debug-keys.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271162458 -3600 -# Node ID 859a372efa66e6bcba8e1fd968e521cb16da12ea -# Parent da90dd1a09b93ae41ab451d223ff87dca04356f5 -sysctl: Fix XEN_SYSCTL_debug_keys error path. - -Signed-off-by: Keir Fraser - ---- a/xen/common/sysctl.c -+++ b/xen/common/sysctl.c -@@ -169,12 +169,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc - if ( ret ) - break; - -+ ret = -EFAULT; - for ( i = 0; i < op->u.debug_keys.nr_keys; i++ ) - { - if ( copy_from_guest_offset(&c, op->u.debug_keys.keys, i, 1) ) -- return -EFAULT; -+ goto out; - handle_keypress(c, guest_cpu_user_regs()); - } -+ ret = 0; - } - break; - diff --git a/21189-x86-emulate-clflush.patch b/21189-x86-emulate-clflush.patch deleted file mode 100644 index bf0aa3a..0000000 --- a/21189-x86-emulate-clflush.patch +++ /dev/null @@ -1,53 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271353678 -3600 -# Node ID d18e6a6c618af4f25a9e1a57c9e3eac55921678c -# Parent ffffddc4b1e030cce6bd4d12c4409c94599c1abf -x86_emulate: Emulate CLFLUSH instruction - -We recently found that FreeBSD 8.0 guest failed to install and boot on -Xen. The reason was that FreeBSD detected clflush feature and invoked -this instruction to flush MMIO space. This caused a page fault; but -x86_emulate.c failed to emulate this instruction (not supported). As a -result, a page fault was detected inside FreeBSD. A similar issue was -reported earlier. - -http://lists.xensource.com/archives/html/xen-devel/2010-03/msg00362.html - -From: Wei Huang -Signed-off-by: Keir Fraser - -Index: xen-4.0.0-testing/xen/arch/x86/x86_emulate/x86_emulate.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_emulate/x86_emulate.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_emulate/x86_emulate.c -@@ -227,7 +227,8 @@ static uint8_t twobyte_table[256] = { - DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, 0, 0, - /* 0xA8 - 0xAF */ - ImplicitOps, ImplicitOps, 0, DstBitBase|SrcReg|ModRM, -- DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, 0, DstReg|SrcMem|ModRM, -+ DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, -+ ImplicitOps|ModRM, DstReg|SrcMem|ModRM, - /* 0xB0 - 0xB7 */ - ByteOp|DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, - DstReg|SrcMem|ModRM|Mov, DstBitBase|SrcReg|ModRM, -@@ -4008,6 +4009,19 @@ x86_emulate( - emulate_2op_SrcV_nobyte("bts", src, dst, _regs.eflags); - break; - -+ case 0xae: /* Grp15 */ -+ switch ( modrm_reg & 7 ) -+ { -+ case 7: /* clflush */ -+ fail_if(ops->wbinvd == NULL); -+ if ( (rc = ops->wbinvd(ctxt)) != 0 ) -+ goto done; -+ break; -+ default: -+ goto cannot_emulate; -+ } -+ break; -+ - case 0xaf: /* imul */ - _regs.eflags &= ~(EFLG_OF|EFLG_CF); - switch ( dst.bytes ) diff --git a/21193-blktap-script.patch b/21193-blktap-script.patch deleted file mode 100644 index c568a78..0000000 --- a/21193-blktap-script.patch +++ /dev/null @@ -1,23 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271663923 -3600 -# Node ID ae1abcdd4a670e34509e39d5280834a75afc0f6a -# Parent 6860c523d2daf1d110b130a9596469a0957b4032 -tools/hotplug/Linux/blktap: remove optional tapdisk: prefix - -Perhaps this should even be further generalized (e.g. to remove any -"[!/]*:" pattern prefixes) to be more forward compatible? - -Signed-off-by: Jan Beulich - -diff -r 6860c523d2da -r ae1abcdd4a67 tools/hotplug/Linux/blktap ---- a/tools/hotplug/Linux/blktap Mon Apr 19 08:55:33 2010 +0100 -+++ b/tools/hotplug/Linux/blktap Mon Apr 19 08:58:43 2010 +0100 -@@ -59,6 +59,7 @@ - if [ -n "$t" ] - then - p=$(xenstore_read "$XENBUS_PATH/params") -+ p=${p#tapdisk:} - # if we have a ':', chew from head including : - if echo $p | grep -q \: - then diff --git a/21194-ioemu-subtype.patch b/21194-ioemu-subtype.patch deleted file mode 100644 index 71f2b30..0000000 --- a/21194-ioemu-subtype.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -r c02cc832cb2d tools/python/xen/xend/server/BlktapController.py ---- a/tools/python/xen/xend/server/BlktapController.py Tue Apr 13 18:19:33 2010 +0100 -+++ b/tools/python/xen/xend/server/BlktapController.py Fri Apr 16 12:05:39 2010 -0600 -@@ -189,7 +189,7 @@ - blktap2_installed=1; - - if typ in ('tap'): -- if subtyp in ('tapdisk'): -+ if subtyp in ('tapdisk', 'ioemu'): - if params not in blktap2_disk_types or not blktap2_installed: - # pass this device off to BlktapController - log.warn('WARNING: using deprecated blktap module') diff --git a/21223-xend-preserve-devs.patch b/21223-xend-preserve-devs.patch deleted file mode 100644 index 3a0aa2b..0000000 --- a/21223-xend-preserve-devs.patch +++ /dev/null @@ -1,32 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1271925757 -3600 -# Node ID 5b72f9832cc21ebdbbd8569836578817353314d8 -# Parent 11d20f17f82c1c6fc6c003c363835a964338b311 -xend: don't drop device config on domain start failure - -If domain creation in xend fails before devices are configured, e.g. -insufficient memory, device config is dropped from xend's managed -domain config. - -Once xend is restarted, the domain's devices are lost. - -This patch fixes a bug in XendConfig where only the device -controller was consulted for device configuration. - -Signed-off-by: Jim Fehlig - -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py -@@ -1166,8 +1166,8 @@ class XendConfig(dict): - config.append(['VDI', dev_cfg.get('VDI', '')]) - - sxpr.append(['device', config]) -+ found = True - -- found = True - except: - log.exception("dumping sxp from device controllers") - pass diff --git a/21225-conring-iommu.patch b/21225-conring-iommu.patch deleted file mode 100644 index 619be29..0000000 --- a/21225-conring-iommu.patch +++ /dev/null @@ -1,77 +0,0 @@ -References: bnc#600794 - -# HG changeset patch -# User Keir Fraser -# Date 1271954636 -3600 -# Node ID 2b97855a629f1d79e1d075a6d2a8b569018b2094 -# Parent a7947fd90328287dd097294b241753063c858597 -console: Make initial static console buffer __initdata. - -The previous scheme --- freeing an area of BSS --- did not interact -nicely with device passthrough as IOMMU will not have any Xen BSS area -in guest device pagetables. Hence if the freed BSS space gets -allocated to a guest, DMAs to guest's own memory can fail. - -The simple solution here is to always free the static buffer at end of -boot (initmem is specially handled for IOMMUs) and require a -dynamically-allocated buffer always to be created. - -Signed-off-by: Keir Fraser - ---- a/xen/drivers/char/console.c -+++ b/xen/drivers/char/console.c -@@ -65,11 +65,7 @@ size_param("conring_size", opt_conring_s - - #define _CONRING_SIZE 16384 - #define CONRING_IDX_MASK(i) ((i)&(conring_size-1)) --static char --#if _CONRING_SIZE >= PAGE_SIZE -- __attribute__((__section__(".bss.page_aligned"), __aligned__(PAGE_SIZE))) --#endif -- _conring[_CONRING_SIZE]; -+static char __initdata _conring[_CONRING_SIZE]; - static char *__read_mostly conring = _conring; - static uint32_t __read_mostly conring_size = _CONRING_SIZE; - static uint32_t conringc, conringp; -@@ -596,25 +592,20 @@ void __init console_init_preirq(void) - void __init console_init_postirq(void) - { - char *ring; -- unsigned int i; -+ unsigned int i, order; - - serial_init_postirq(); - - if ( !opt_conring_size ) - opt_conring_size = num_present_cpus() << (9 + xenlog_lower_thresh); -- /* Round size down to a power of two. */ -- while ( opt_conring_size & (opt_conring_size - 1) ) -- opt_conring_size &= opt_conring_size - 1; -- if ( opt_conring_size < conring_size ) -- return; -- -- ring = alloc_xenheap_pages(get_order_from_bytes(opt_conring_size), 0); -- if ( ring == NULL ) -+ -+ order = get_order_from_bytes(max(opt_conring_size, conring_size)); -+ while ( (ring = alloc_xenheap_pages(order, 0)) == NULL ) - { -- printk("Unable to allocate console ring of %u bytes.\n", -- opt_conring_size); -- return; -+ BUG_ON(order == 0); -+ order--; - } -+ opt_conring_size = PAGE_SIZE << order; - - spin_lock_irq(&console_lock); - for ( i = conringc ; i != conringp; i++ ) -@@ -625,8 +616,6 @@ void __init console_init_postirq(void) - spin_unlock_irq(&console_lock); - - printk("Allocated console ring of %u KiB.\n", opt_conring_size >> 10); -- -- init_xenheap_pages(__pa(_conring), __pa(_conring + _CONRING_SIZE)); - } - - void __init console_endboot(void) diff --git a/21234-x86-bad-srat-clear-pxm2node.patch b/21234-x86-bad-srat-clear-pxm2node.patch deleted file mode 100644 index 2350cb1..0000000 --- a/21234-x86-bad-srat-clear-pxm2node.patch +++ /dev/null @@ -1,34 +0,0 @@ -References: bnc#595124 - -# HG changeset patch -# User Keir Fraser -# Date 1272280290 -3600 -# Node ID d01ea51fc929c57c7d5f427e1aafa0de7a436473 -# Parent f766f2142a8515d1dc71783355dc4fc1813d95c4 -x86: make pxm_to_node() return sane values when disabling NUMA internally - -Otherwise, pass-through code may call memory allocation functions with -invalid node IDs, causing the allocations to fail. - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/srat.c -+++ b/xen/arch/x86/srat.c -@@ -25,7 +25,7 @@ static struct acpi_table_slit *__read_mo - static nodemask_t nodes_parsed __initdata; - static nodemask_t nodes_found __initdata; - static struct node nodes[MAX_NUMNODES] __initdata; --static u8 __read_mostly pxm2node[256] = { [0 ... 255] = 0xff }; -+static u8 __read_mostly pxm2node[256] = { [0 ... 255] = NUMA_NO_NODE }; - - - static int num_node_memblks; -@@ -112,6 +112,8 @@ static __init void bad_srat(void) - acpi_numa = -1; - for (i = 0; i < MAX_LOCAL_APIC; i++) - apicid_to_node[i] = NUMA_NO_NODE; -+ for (i = 0; i < ARRAY_SIZE(pxm2node); i++) -+ pxm2node[i] = NUMA_NO_NODE; - } - - #ifdef CONFIG_X86_64 diff --git a/21235-crashkernel-advanced.patch b/21235-crashkernel-advanced.patch index 68a9c42..09e7abe 100644 --- a/21235-crashkernel-advanced.patch +++ b/21235-crashkernel-advanced.patch @@ -33,9 +33,11 @@ This still needs to be hooked up for ia64. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/setup.c -+++ b/xen/arch/x86/setup.c -@@ -642,6 +642,11 @@ void __init __start_xen(unsigned long mb +Index: xen-4.0.1-testing/xen/arch/x86/setup.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/setup.c ++++ xen-4.0.1-testing/xen/arch/x86/setup.c +@@ -664,6 +664,11 @@ void __init __start_xen(unsigned long mb memcpy(&boot_e820, &e820, sizeof(e820)); /* Early kexec reservation (explicit static start address). */ @@ -47,9 +49,11 @@ Signed-off-by: Jan Beulich kexec_reserve_area(&boot_e820); /* ---- a/xen/common/kexec.c -+++ b/xen/common/kexec.c -@@ -47,15 +47,109 @@ static unsigned char vmcoreinfo_data[VMC +Index: xen-4.0.1-testing/xen/common/kexec.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/kexec.c ++++ xen-4.0.1-testing/xen/common/kexec.c +@@ -49,15 +49,109 @@ static unsigned char vmcoreinfo_data[VMC static size_t vmcoreinfo_size = 0; xen_kexec_reserve_t kexec_crash_area; @@ -162,8 +166,10 @@ Signed-off-by: Jan Beulich static void one_cpu_only(void) { /* Only allow the first cpu to continue - force other cpus to spin */ ---- a/xen/include/xen/kexec.h -+++ b/xen/include/xen/kexec.h +Index: xen-4.0.1-testing/xen/include/xen/kexec.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/kexec.h ++++ xen-4.0.1-testing/xen/include/xen/kexec.h @@ -12,6 +12,8 @@ typedef struct xen_kexec_reserve { extern xen_kexec_reserve_t kexec_crash_area; diff --git a/21266-vmx-disabled-check.patch b/21266-vmx-disabled-check.patch deleted file mode 100644 index 3a00114..0000000 --- a/21266-vmx-disabled-check.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1272972545 -3600 -# Node ID 6d21da6feb59db33eceb3aa6bcb8afac15ac7fd8 -# Parent 71cf9b12ac9effe2b7cf0aec058f92ee36430e0a -vmx, tboot: Check the correct in/outside-SMX flag when init'ing VMX. - -Signed-off-by: Shane Wang -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/hvm/vmx/vmcs.c -+++ b/xen/arch/x86/hvm/vmx/vmcs.c -@@ -360,8 +360,9 @@ int vmx_cpu_up(void) - bios_locked = !!(eax & IA32_FEATURE_CONTROL_MSR_LOCK); - if ( bios_locked ) - { -- if ( !(eax & (IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX | -- IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX)) ) -+ if ( !(eax & (tboot_in_measured_env() -+ ? IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX -+ : IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX)) ) - { - printk("CPU%d: VMX disabled by BIOS.\n", cpu); - return 0; diff --git a/21271-x86-cache-flush-global.patch b/21271-x86-cache-flush-global.patch index 4bd8bec..e740f9a 100644 --- a/21271-x86-cache-flush-global.patch +++ b/21271-x86-cache-flush-global.patch @@ -12,9 +12,11 @@ the hypervisor. Add a new MMUEXT operation for this. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/mm.c -+++ b/xen/arch/x86/mm.c -@@ -2887,6 +2887,27 @@ int do_mmuext_op( +Index: xen-4.0.1-testing/xen/arch/x86/mm.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/mm.c +@@ -2889,6 +2889,27 @@ int do_mmuext_op( } break; @@ -42,8 +44,10 @@ Signed-off-by: Jan Beulich case MMUEXT_SET_LDT: { unsigned long ptr = op.arg1.linear_addr; ---- a/xen/include/public/xen.h -+++ b/xen/include/public/xen.h +Index: xen-4.0.1-testing/xen/include/public/xen.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/public/xen.h ++++ xen-4.0.1-testing/xen/include/public/xen.h @@ -239,6 +239,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); * * cmd: MMUEXT_FLUSH_CACHE diff --git a/21272-x86-dom0-alloc-performance.patch b/21272-x86-dom0-alloc-performance.patch deleted file mode 100644 index 2bafa88..0000000 --- a/21272-x86-dom0-alloc-performance.patch +++ /dev/null @@ -1,99 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1272973341 -3600 -# Node ID b07edd50661e7f768088c08215dabb9becb5c5b6 -# Parent 6c7b905b03ff1cf171187bafe7129e3e213e5787 -x86: fix Dom0 booting time regression -References: bnc#593536 - -Unfortunately the changes in c/s 21035 caused boot time to go up -significantly on certain large systems. To rectify this without going -back to the old behavior, introduce a new memory allocation flag so -that Dom0 allocations can exhaust non-DMA memory before starting to -consume DMA memory. For the latter, the behavior introduced in -aforementioned c/s gets retained, while for the former we can now even -try larger chunks first. - -This builds on the fact that alloc_chunk() gets called with non- -increasing 'max_pages' arguments, end hence it can store locally the -allocation order last used (as larger order allocations can't succeed -during subsequent invocations if they failed once). - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/domain_build.c -+++ b/xen/arch/x86/domain_build.c -@@ -125,26 +125,36 @@ string_param("dom0_ioports_disable", opt - static struct page_info * __init alloc_chunk( - struct domain *d, unsigned long max_pages) - { -+ static unsigned int __initdata last_order = MAX_ORDER; -+ static unsigned int __initdata memflags = MEMF_no_dma; - struct page_info *page; -- unsigned int order, free_order; -+ unsigned int order = get_order_from_pages(max_pages), free_order; - -- /* -- * Allocate up to 2MB at a time: It prevents allocating very large chunks -- * from DMA pools before the >4GB pool is fully depleted. -- */ -- if ( max_pages > (2UL << (20 - PAGE_SHIFT)) ) -- max_pages = 2UL << (20 - PAGE_SHIFT); -- order = get_order_from_pages(max_pages); -- if ( (max_pages & (max_pages-1)) != 0 ) -- order--; -- while ( (page = alloc_domheap_pages(d, order, 0)) == NULL ) -+ if ( order > last_order ) -+ order = last_order; -+ else if ( max_pages & (max_pages - 1) ) -+ --order; -+ while ( (page = alloc_domheap_pages(d, order, memflags)) == NULL ) - if ( order-- == 0 ) - break; -+ if ( page ) -+ last_order = order; -+ else if ( memflags ) -+ { -+ /* -+ * Allocate up to 2MB at a time: It prevents allocating very large -+ * chunks from DMA pools before the >4GB pool is fully depleted. -+ */ -+ last_order = 21 - PAGE_SHIFT; -+ memflags = 0; -+ return alloc_chunk(d, max_pages); -+ } -+ - /* - * Make a reasonable attempt at finding a smaller chunk at a higher - * address, to avoid allocating from low memory as much as possible. - */ -- for ( free_order = order; page && order--; ) -+ for ( free_order = order; !memflags && page && order--; ) - { - struct page_info *pg2; - ---- a/xen/common/page_alloc.c -+++ b/xen/common/page_alloc.c -@@ -1157,8 +1157,9 @@ struct page_info *alloc_domheap_pages( - pg = alloc_heap_pages(dma_zone + 1, zone_hi, node, order, memflags); - - if ( (pg == NULL) && -- ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi, -- node, order, memflags)) == NULL) ) -+ ((memflags & MEMF_no_dma) || -+ ((pg = alloc_heap_pages(MEMZONE_XEN + 1, zone_hi, -+ node, order, memflags)) == NULL)) ) - return NULL; - - if ( (d != NULL) && assign_pages(d, pg, order, memflags) ) ---- a/xen/include/xen/mm.h -+++ b/xen/include/xen/mm.h -@@ -79,6 +79,8 @@ int assign_pages( - #define MEMF_populate_on_demand (1U<<_MEMF_populate_on_demand) - #define _MEMF_tmem 2 - #define MEMF_tmem (1U<<_MEMF_tmem) -+#define _MEMF_no_dma 3 -+#define MEMF_no_dma (1U<<_MEMF_no_dma) - #define _MEMF_node 8 - #define MEMF_node(n) ((((n)+1)&0xff)<<_MEMF_node) - #define _MEMF_bits 24 diff --git a/21273-linux-autconf.patch b/21273-linux-autconf.patch deleted file mode 100644 index dd18589..0000000 --- a/21273-linux-autconf.patch +++ /dev/null @@ -1,26 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1272973376 -3600 -# Node ID d2373000996d850c46297740fbd11ea1d93d59d9 -# Parent b07edd50661e7f768088c08215dabb9becb5c5b6 -linux pvdrv: generalize location of autoconf.h - -The location of the file in the build tree changed in recent Linux; -since there can be only one such file, using a wild card instead of -an explicit directory name seems the easiest solution. - -Signed-off-by: Jan Beulich - -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/overrides.mk -=================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/overrides.mk -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/overrides.mk -@@ -11,7 +11,7 @@ ifeq ($(ARCH),ia64) - _XEN_CPPFLAGS += -DCONFIG_VMX_GUEST - endif - --_XEN_CPPFLAGS += -include $(objtree)/include/linux/autoconf.h -+_XEN_CPPFLAGS += -include $(wildcard $(objtree)/include/*/autoconf.h) - - EXTRA_CFLAGS += $(_XEN_CPPFLAGS) - EXTRA_AFLAGS += $(_XEN_CPPFLAGS) diff --git a/21301-svm-lmsl.patch b/21301-svm-lmsl.patch index fc81aa2..68a95fc 100644 --- a/21301-svm-lmsl.patch +++ b/21301-svm-lmsl.patch @@ -11,9 +11,11 @@ makes sense to also allow HVM guests to make use of it. Signed-off-by: Jan Beulich ---- a/xen/arch/x86/hvm/hvm.c -+++ b/xen/arch/x86/hvm/hvm.c -@@ -629,11 +629,12 @@ static int hvm_load_cpu_ctxt(struct doma +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hvm.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c +@@ -603,11 +603,12 @@ static int hvm_load_cpu_ctxt(struct doma return -EINVAL; } @@ -27,7 +29,7 @@ Signed-off-by: Jan Beulich (!cpu_has_ffxsr && (ctxt.msr_efer & EFER_FFXSE)) || ((ctxt.msr_efer & (EFER_LME|EFER_LMA)) == EFER_LMA) ) { -@@ -984,10 +985,11 @@ int hvm_set_efer(uint64_t value) +@@ -960,10 +961,11 @@ int hvm_set_efer(uint64_t value) value &= ~EFER_LMA; @@ -40,9 +42,11 @@ Signed-off-by: Jan Beulich (!cpu_has_ffxsr && (value & EFER_FFXSE)) ) { gdprintk(XENLOG_WARNING, "Trying to set reserved bit in " ---- a/xen/arch/x86/hvm/svm/svm.c -+++ b/xen/arch/x86/hvm/svm/svm.c -@@ -56,6 +56,9 @@ +Index: xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/svm/svm.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c +@@ -57,6 +57,9 @@ u32 svm_feature_flags; @@ -52,7 +56,7 @@ Signed-off-by: Jan Beulich #define set_segment_register(name, value) \ asm volatile ( "movw %%ax ,%%" STR(name) "" : : "a" (value) ) -@@ -847,6 +850,29 @@ static int svm_cpu_up(struct cpuinfo_x86 +@@ -871,6 +874,29 @@ static int svm_cpu_up(struct cpuinfo_x86 /* Initialize core's ASID handling. */ svm_asid_init(c); @@ -82,9 +86,11 @@ Signed-off-by: Jan Beulich return 1; } ---- a/xen/include/asm-x86/hvm/hvm.h -+++ b/xen/include/asm-x86/hvm/hvm.h -@@ -131,6 +131,7 @@ struct hvm_function_table { +Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-x86/hvm/hvm.h ++++ xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm.h +@@ -143,6 +143,7 @@ struct hvm_function_table { extern struct hvm_function_table hvm_funcs; extern int hvm_enabled; diff --git a/21304-keyhandler-alternative.patch b/21304-keyhandler-alternative.patch index b4b5aa4..7e2b065 100644 --- a/21304-keyhandler-alternative.patch +++ b/21304-keyhandler-alternative.patch @@ -11,8 +11,10 @@ a tasklet-based alternative mechanism to handle Dom0 state dumps. Signed-off-by: Jan Beulich ---- a/xen/common/keyhandler.c -+++ b/xen/common/keyhandler.c +Index: xen-4.0.1-testing/xen/common/keyhandler.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/keyhandler.c ++++ xen-4.0.1-testing/xen/common/keyhandler.c @@ -19,6 +19,7 @@ static struct keyhandler *key_table[256]; @@ -66,7 +68,7 @@ Signed-off-by: Jan Beulich } static struct keyhandler dump_dom0_registers_keyhandler = { -@@ -425,8 +456,28 @@ static struct keyhandler do_debug_key_ke +@@ -434,8 +465,28 @@ static struct keyhandler do_debug_key_ke .desc = "trap to xendbg" }; diff --git a/21317-xend-blkif-util-tap2.patch b/21317-xend-blkif-util-tap2.patch deleted file mode 100644 index 2941e2a..0000000 --- a/21317-xend-blkif-util-tap2.patch +++ /dev/null @@ -1,23 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273220860 -3600 -# Node ID 5ac6e33fa3a7fe6645eaeb7de530a29be2865c34 -# Parent 7af536406c255bdc9d3429679710b0827d52bdaf -xend: support blktap2 in xend blkif utils - -Support tap2 device type in xend blkif utils parse method. - -Signed-off-by: Jim Fehlig - -diff -r 7af536406c25 -r 5ac6e33fa3a7 tools/python/xen/util/blkif.py ---- a/tools/python/xen/util/blkif.py Fri May 07 09:26:49 2010 +0100 -+++ b/tools/python/xen/util/blkif.py Fri May 07 09:27:40 2010 +0100 -@@ -86,7 +86,7 @@ - else: - fn = "/dev/%s" %(fn,) - -- if typ == "tap": -+ if typ in ("tap", "tap2"): - (taptype, fn) = fn.split(":", 1) - return (fn, taptype) - diff --git a/21331-svm-vintr-during-nmi.patch b/21331-svm-vintr-during-nmi.patch deleted file mode 100644 index f31e61e..0000000 --- a/21331-svm-vintr-during-nmi.patch +++ /dev/null @@ -1,41 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273256548 -3600 -# Node ID bbf009817ffbe15a7cbbda8bddd82640f290ce0c -# Parent a97ef0eb0b9d520b8b6b97d240771cc27de978e3 -svm: Avoid VINTR injection during NMI shadow - -It is invalid because we get vmexit via IRET interception in this -case. VINTR is unaware of NMI shadows and may vmexit early, leaving us -in an endless loop of VINTR injections and interceptions. - -Signed-off-by: Wei Wang -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/hvm/svm/intr.c -+++ b/xen/arch/x86/hvm/svm/intr.c -@@ -88,10 +88,21 @@ static void enable_intr_window(struct vc - * guest can accept the real interrupt. - * - * TODO: Better NMI handling. We need a way to skip a MOV SS interrupt -- * shadow. This is hard to do without hardware support. We should also -- * track 'NMI blocking' from NMI injection until IRET. This can be done -- * quite easily in software by intercepting the unblocking IRET. -+ * shadow. This is hard to do without hardware support. Also we should -+ * not be waiting for EFLAGS.IF to become 1. - */ -+ -+ /* -+ * NMI-blocking window is handled by IRET interception. We should not -+ * inject a VINTR in this case as VINTR is unaware of NMI-blocking and -+ * hence we can enter an endless loop (VINTR intercept fires, yet -+ * hvm_interrupt_blocked() still indicates NMI-blocking is active, so -+ * we inject a VINTR, ...). -+ */ -+ if ( (intack.source == hvm_intsrc_nmi) && -+ (vmcb->general1_intercepts & GENERAL1_INTERCEPT_IRET) ) -+ return; -+ - intr = vmcb->vintr; - intr.fields.irq = 1; - intr.fields.vector = 0; diff --git a/21333-xentrace-t_info-size.patch b/21333-xentrace-t_info-size.patch deleted file mode 100644 index 91b4f9d..0000000 --- a/21333-xentrace-t_info-size.patch +++ /dev/null @@ -1,26 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273479772 -3600 -# Node ID 93c5beba9d04d3e8d2522241bad14107433c3121 -# Parent 3b6e33ebb57b670a48ad138aecb47cbd32a4e986 -xentrace: fix bug in t_info size - -t_info size should be in bytes, not pages. This fixes a bug -that crashes the hypervisor if the total number of all pages -is more than 1024 but less than 2048. - -Signed-off-by: George Dunlap - -Index: xen-4.0.0-testing/xen/common/trace.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/trace.c -+++ xen-4.0.0-testing/xen/common/trace.c -@@ -367,7 +367,7 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc - case XEN_SYSCTL_TBUFOP_get_info: - tbc->evt_mask = tb_event_mask; - tbc->buffer_mfn = t_info ? virt_to_mfn(t_info) : 0; -- tbc->size = T_INFO_PAGES; -+ tbc->size = T_INFO_PAGES * PAGE_SIZE; - break; - case XEN_SYSCTL_TBUFOP_set_cpu_mask: - xenctl_cpumap_to_cpumask(&tb_cpu_mask, &tbc->cpu_mask); diff --git a/21340-vtd-dom0-mapping-latency.patch b/21340-vtd-dom0-mapping-latency.patch deleted file mode 100644 index bd1ba81..0000000 --- a/21340-vtd-dom0-mapping-latency.patch +++ /dev/null @@ -1,56 +0,0 @@ -References: bnc#603008 - -# HG changeset patch -# User Keir Fraser -# Date 1273563345 -3600 -# Node ID 220fa418eaae499cdc14359e83092401290a6211 -# Parent 804304d4e05d98289de9a107c6b26c5a1db09cd8 -VT-d: prevent watchdog timer from kicking in when -initializing on systems with huge amounts of memory - -Process pending soft-IRQs every 4G worth of pages initialized for Dom0 -to keep timekeeping happy and prevent the NMI watchdog (when enabled) -from kicking in. - -Signed-off-by: Jan Beulich - ---- a/xen/drivers/passthrough/vtd/ia64/vtd.c -+++ b/xen/drivers/passthrough/vtd/ia64/vtd.c -@@ -19,6 +19,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -110,6 +111,9 @@ static int do_dom0_iommu_mapping(unsigne - iommu_map_page(d, (pfn*tmp+j), (pfn*tmp+j)); - - page_addr += PAGE_SIZE; -+ -+ if (!(pfn & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K)))) -+ process_pending_softirqs(); - } - return 0; - } ---- a/xen/drivers/passthrough/vtd/x86/vtd.c -+++ b/xen/drivers/passthrough/vtd/x86/vtd.c -@@ -19,6 +19,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -153,6 +154,9 @@ void iommu_set_dom0_mapping(struct domai - tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K); - for ( j = 0; j < tmp; j++ ) - iommu_map_page(d, (i*tmp+j), (i*tmp+j)); -+ -+ if (!(i & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K)))) -+ process_pending_softirqs(); - } - } - diff --git a/21346-x86-platform-timer-wrap.patch b/21346-x86-platform-timer-wrap.patch deleted file mode 100644 index 1a43c05..0000000 --- a/21346-x86-platform-timer-wrap.patch +++ /dev/null @@ -1,67 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273573287 -3600 -# Node ID 7d4deb86b9661b8585fc2b5c41334f2b34b0922b -# Parent 2077d6ad60780bbe0631c0dee1ef2e2b8eb03867 -x86: Detect and handle unexpected platform-timer counter wrap. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/time.c -+++ b/xen/arch/x86/time.c -@@ -571,26 +571,48 @@ static u64 plt_stamp64; /* 64-b - static u64 plt_stamp; /* hardware-width platform counter stamp */ - static struct timer plt_overflow_timer; - -+static s_time_t __read_platform_stime(u64 platform_time) -+{ -+ u64 diff = platform_time - platform_timer_stamp; -+ ASSERT(spin_is_locked(&platform_timer_lock)); -+ return (stime_platform_stamp + scale_delta(diff, &plt_scale)); -+} -+ - static void plt_overflow(void *unused) - { -+ int i; - u64 count; -+ s_time_t now, plt_now, plt_wrap; - - spin_lock_irq(&platform_timer_lock); -+ - count = plt_src.read_counter(); - plt_stamp64 += (count - plt_stamp) & plt_mask; - plt_stamp = count; -+ -+ now = NOW(); -+ plt_wrap = __read_platform_stime(plt_stamp64); -+ for ( i = 0; i < 10; i++ ) -+ { -+ plt_now = plt_wrap; -+ plt_wrap = __read_platform_stime(plt_stamp64 + plt_mask + 1); -+ if ( __builtin_llabs(plt_wrap - now) > __builtin_llabs(plt_now - now) ) -+ break; -+ plt_stamp64 += plt_mask + 1; -+ } -+ if ( i != 0 ) -+ { -+ static bool_t warned_once; -+ if ( !test_and_set_bool(warned_once) ) -+ printk("Platform timer appears to have unexpectedly wrapped " -+ "%u%s times.\n", i, (i == 10) ? " or more" : ""); -+ } -+ - spin_unlock_irq(&platform_timer_lock); - - set_timer(&plt_overflow_timer, NOW() + plt_overflow_period); - } - --static s_time_t __read_platform_stime(u64 platform_time) --{ -- u64 diff = platform_time - platform_timer_stamp; -- ASSERT(spin_is_locked(&platform_timer_lock)); -- return (stime_platform_stamp + scale_delta(diff, &plt_scale)); --} -- - static s_time_t read_platform_stime(void) - { - u64 count; diff --git a/21349-x86-memcpy.patch b/21349-x86-memcpy.patch deleted file mode 100644 index 0998329..0000000 --- a/21349-x86-memcpy.patch +++ /dev/null @@ -1,313 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273583128 -3600 -# Node ID d77a88f938c635c3ccfedaa00f946e4d9ed26098 -# Parent 2b5e14e4c5e57b0064d1c0415d9c4629bd0aac9b -x86: Replace our own specialised versions of memset and memcpy with -direct use of gcc's built-in versions. - -This dramatically simplifies our code while also avoiding compile -warnings with certain intermediate versions of gcc. - -This patch is based on an initial version by Jan Beulich. - -Signed-off-by: Keir Fraser - -Index: xen-4.0.0-testing/xen/arch/x86/string.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/string.c -+++ xen-4.0.0-testing/xen/arch/x86/string.c -@@ -14,25 +14,12 @@ void *memcpy(void *dest, const void *src - long d0, d1, d2; - - asm volatile ( --#ifdef __i386__ -- " rep movsl ; " --#else -- " rep movsq ; " -- " testb $4,%b4 ; " -- " je 0f ; " -- " movsl ; " -- "0: ; " --#endif -- " testb $2,%b4 ; " -- " je 1f ; " -- " movsw ; " -- "1: testb $1,%b4 ; " -- " je 2f ; " -- " movsb ; " -- "2: " -+ " rep ; movs"__OS" ; " -+ " mov %4,%3 ; " -+ " rep ; movsb " - : "=&c" (d0), "=&D" (d1), "=&S" (d2) -- : "0" (n/sizeof(long)), "q" (n), "1" (dest), "2" (src) -- : "memory"); -+ : "0" (n/BYTES_PER_LONG), "r" (n%BYTES_PER_LONG), "1" (dest), "2" (src) -+ : "memory" ); - - return dest; - } -@@ -55,7 +42,7 @@ void *memset(void *s, int c, size_t n) - void *memmove(void *dest, const void *src, size_t n) - { - long d0, d1, d2; -- -+ - if ( dest < src ) - return memcpy(dest, src, n); - -Index: xen-4.0.0-testing/xen/include/asm-x86/string.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/string.h -+++ xen-4.0.0-testing/xen/include/asm-x86/string.h -@@ -3,246 +3,14 @@ - - #include - --static inline void *__variable_memcpy(void *to, const void *from, size_t n) --{ -- long d0, d1, d2; -- __asm__ __volatile__ ( -- " rep ; movs"__OS"\n" -- " mov %4,%3 \n" -- " rep ; movsb \n" -- : "=&c" (d0), "=&D" (d1), "=&S" (d2) -- : "0" (n/BYTES_PER_LONG), "r" (n%BYTES_PER_LONG), "1" (to), "2" (from) -- : "memory" ); -- return to; --} -- --/* -- * This looks horribly ugly, but the compiler can optimize it totally, -- * as the count is constant. -- */ --static always_inline void * __constant_memcpy( -- void * to, const void * from, size_t n) --{ -- switch ( n ) -- { -- case 0: -- return to; -- case 1: -- *(u8 *)to = *(const u8 *)from; -- return to; -- case 2: -- *(u16 *)to = *(const u16 *)from; -- return to; -- case 3: -- *(u16 *)to = *(const u16 *)from; -- *(2+(u8 *)to) = *(2+(const u8 *)from); -- return to; -- case 4: -- *(u32 *)to = *(const u32 *)from; -- return to; -- case 5: -- *(u32 *)to = *(const u32 *)from; -- *(4+(u8 *)to) = *(4+(const u8 *)from); -- return to; -- case 6: -- *(u32 *)to = *(const u32 *)from; -- *(2+(u16 *)to) = *(2+(const u16 *)from); -- return to; -- case 7: -- *(u32 *)to = *(const u32 *)from; -- *(2+(u16 *)to) = *(2+(const u16 *)from); -- *(6+(u8 *)to) = *(6+(const u8 *)from); -- return to; -- case 8: -- *(u64 *)to = *(const u64 *)from; -- return to; -- case 12: -- *(u64 *)to = *(const u64 *)from; -- *(2+(u32 *)to) = *(2+(const u32 *)from); -- return to; -- case 16: -- *(u64 *)to = *(const u64 *)from; -- *(1+(u64 *)to) = *(1+(const u64 *)from); -- return to; -- case 20: -- *(u64 *)to = *(const u64 *)from; -- *(1+(u64 *)to) = *(1+(const u64 *)from); -- *(4+(u32 *)to) = *(4+(const u32 *)from); -- return to; -- } --#define COMMON(x) \ -- __asm__ __volatile__ ( \ -- "rep ; movs"__OS \ -- x \ -- : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ -- : "0" (n/BYTES_PER_LONG), "1" (to), "2" (from) \ -- : "memory" ); -- { -- long d0, d1, d2; -- switch ( n % BYTES_PER_LONG ) -- { -- case 0: COMMON(""); return to; -- case 1: COMMON("\n\tmovsb"); return to; -- case 2: COMMON("\n\tmovsw"); return to; -- case 3: COMMON("\n\tmovsw\n\tmovsb"); return to; -- case 4: COMMON("\n\tmovsl"); return to; -- case 5: COMMON("\n\tmovsl\n\tmovsb"); return to; -- case 6: COMMON("\n\tmovsl\n\tmovsw"); return to; -- case 7: COMMON("\n\tmovsl\n\tmovsw\n\tmovsb"); return to; -- } -- } --#undef COMMON -- return to; --} -- - #define __HAVE_ARCH_MEMCPY --/* align source to a 64-bit boundary */ --static always_inline --void *__var_memcpy(void *t, const void *f, size_t n) --{ -- int off = (unsigned long)f & 0x7; -- /* just do alignment if needed and if size is worth */ -- if ( (n > 32) && off ) { -- size_t n1 = 8 - off; -- __variable_memcpy(t, f, n1); -- __variable_memcpy(t + n1, f + n1, n - n1); -- return t; -- } else { -- return (__variable_memcpy(t, f, n)); -- } --} -- --#define memcpy(t,f,n) (__memcpy((t),(f),(n))) --static always_inline --void *__memcpy(void *t, const void *f, size_t n) --{ -- return (__builtin_constant_p(n) ? -- __constant_memcpy((t),(f),(n)) : -- __var_memcpy((t),(f),(n))); --} -+#define memcpy(t,f,n) (__builtin_memcpy((t),(f),(n))) - --/* Some version of gcc don't have this builtin. It's non-critical anyway. */ -+/* Some versions of gcc don't have this builtin. It's non-critical anyway. */ - #define __HAVE_ARCH_MEMMOVE - extern void *memmove(void *dest, const void *src, size_t n); - --static inline void *__memset_generic(void *s, char c, size_t count) --{ -- long d0, d1; -- __asm__ __volatile__ ( -- "rep ; stosb" -- : "=&c" (d0), "=&D" (d1) : "a" (c), "1" (s), "0" (count) : "memory" ); -- return s; --} -- --/* we might want to write optimized versions of these later */ --#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count)) -- --/* -- * memset(x,0,y) is a reasonably common thing to do, so we want to fill -- * things 32 bits at a time even when we don't know the size of the -- * area at compile-time.. -- */ --static inline void *__constant_c_memset(void *s, unsigned long c, size_t count) --{ -- long d0, d1; -- __asm__ __volatile__( -- " rep ; stos"__OS"\n" -- " mov %3,%4 \n" -- " rep ; stosb \n" -- : "=&c" (d0), "=&D" (d1) -- : "a" (c), "r" (count%BYTES_PER_LONG), -- "0" (count/BYTES_PER_LONG), "1" (s) -- : "memory" ); -- return s; --} -- --/* -- * This looks horribly ugly, but the compiler can optimize it totally, -- * as we by now know that both pattern and count is constant.. -- */ --static always_inline void *__constant_c_and_count_memset( -- void *s, unsigned long pattern, size_t count) --{ -- switch ( count ) -- { -- case 0: -- return s; -- case 1: -- *(u8 *)s = pattern; -- return s; -- case 2: -- *(u16 *)s = pattern; -- return s; -- case 3: -- *(u16 *)s = pattern; -- *(2+(u8 *)s) = pattern; -- return s; -- case 4: -- *(u32 *)s = pattern; -- return s; -- case 5: -- *(u32 *)s = pattern; -- *(4+(u8 *)s) = pattern; -- return s; -- case 6: -- *(u32 *)s = pattern; -- *(2+(u16 *)s) = pattern; -- return s; -- case 7: -- *(u32 *)s = pattern; -- *(2+(u16 *)s) = pattern; -- *(6+(u8 *)s) = pattern; -- return s; -- case 8: -- *(u64 *)s = pattern; -- return s; -- } --#define COMMON(x) \ -- __asm__ __volatile__ ( \ -- "rep ; stos"__OS \ -- x \ -- : "=&c" (d0), "=&D" (d1) \ -- : "a" (pattern), "0" (count/BYTES_PER_LONG), "1" (s) \ -- : "memory" ) -- { -- long d0, d1; -- switch ( count % BYTES_PER_LONG ) -- { -- case 0: COMMON(""); return s; -- case 1: COMMON("\n\tstosb"); return s; -- case 2: COMMON("\n\tstosw"); return s; -- case 3: COMMON("\n\tstosw\n\tstosb"); return s; -- case 4: COMMON("\n\tstosl"); return s; -- case 5: COMMON("\n\tstosl\n\tstosb"); return s; -- case 6: COMMON("\n\tstosl\n\tstosw"); return s; -- case 7: COMMON("\n\tstosl\n\tstosw\n\tstosb"); return s; -- } -- } --#undef COMMON -- return s; --} -- --#define __constant_c_x_memset(s, c, count) \ --(__builtin_constant_p(count) ? \ -- __constant_c_and_count_memset((s),(c),(count)) : \ -- __constant_c_memset((s),(c),(count))) -- --#define __var_x_memset(s, c, count) \ --(__builtin_constant_p(count) ? \ -- __constant_count_memset((s),(c),(count)) : \ -- __memset_generic((s),(c),(count))) -- --#ifdef CONFIG_X86_64 --#define MEMSET_PATTERN_MUL 0x0101010101010101UL --#else --#define MEMSET_PATTERN_MUL 0x01010101UL --#endif -- - #define __HAVE_ARCH_MEMSET --#define memset(s, c, count) (__memset((s),(c),(count))) --#define __memset(s, c, count) \ --(__builtin_constant_p(c) ? \ -- __constant_c_x_memset((s),(MEMSET_PATTERN_MUL*(unsigned char)(c)),(count)) : \ -- __var_x_memset((s),(c),(count))) -+#define memset(s,c,n) (__builtin_memset((s),(c),(n))) - - #endif /* __X86_STRING_H__ */ diff --git a/21360-x86-mce-polling-disabled-init.patch b/21360-x86-mce-polling-disabled-init.patch deleted file mode 100644 index 91b52d3..0000000 --- a/21360-x86-mce-polling-disabled-init.patch +++ /dev/null @@ -1,20 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273651780 -3600 -# Node ID fa94385978e6317732e2c12000923ca6a5e0d2ed -# Parent 0079f76e906f378f81044da4e135df2fbb878fa5 -mce: MCE polling logic should check mce_disabled during initialisation. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/cpu/mcheck/non-fatal.c -+++ b/xen/arch/x86/cpu/mcheck/non-fatal.c -@@ -91,7 +91,7 @@ static int __init init_nonfatal_mce_chec - struct cpuinfo_x86 *c = &boot_cpu_data; - - /* Check for MCE support */ -- if (!mce_available(c)) -+ if (mce_disabled || !mce_available(c)) - return -ENODEV; - - /* diff --git a/21372-x86-cross-cpu-wait.patch b/21372-x86-cross-cpu-wait.patch deleted file mode 100644 index 5ccee8e..0000000 --- a/21372-x86-cross-cpu-wait.patch +++ /dev/null @@ -1,42 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273740260 -3600 -# Node ID 6c22d2dfed4882d5febf98d2afbb96ec9bedd043 -# Parent 97da07c523ddc2565da67b6cfeec006d742bb06d -x86: Fix a few on_{selected,each}_cpus callers who should wait for completion. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/acpi/cpufreq/cpufreq.c -+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c -@@ -195,7 +195,7 @@ static void drv_write(struct drv_cmd *cm - cpu_isset(smp_processor_id(), cmd->mask)) - do_drv_write((void *)cmd); - else -- on_selected_cpus(&cmd->mask, do_drv_write, cmd, 0); -+ on_selected_cpus(&cmd->mask, do_drv_write, cmd, 1); - } - - static u32 get_cur_val(cpumask_t mask) ---- a/xen/arch/x86/acpi/cpufreq/powernow.c -+++ b/xen/arch/x86/acpi/cpufreq/powernow.c -@@ -122,7 +122,7 @@ static int powernow_cpufreq_target(struc - - cmd.val = next_perf_state; - -- on_selected_cpus(&cmd.mask, transition_pstate, &cmd, 0); -+ on_selected_cpus(&cmd.mask, transition_pstate, &cmd, 1); - - for_each_cpu_mask(j, online_policy_cpus) - cpufreq_statistic_update(j, perf->state, next_perf_state); ---- a/xen/arch/x86/cpu/mcheck/mce.c -+++ b/xen/arch/x86/cpu/mcheck/mce.c -@@ -1610,7 +1610,7 @@ long do_mca(XEN_GUEST_HANDLE(xen_mc_t) u - add_taint(TAINT_ERROR_INJECT); - - if ( mce_broadcast ) -- on_each_cpu(x86_mc_mceinject, mc_mceinject, 0); -+ on_each_cpu(x86_mc_mceinject, mc_mceinject, 1); - else - on_selected_cpus(cpumask_of(target), x86_mc_mceinject, - mc_mceinject, 1); diff --git a/21373-dummy-domain-io-caps.patch b/21373-dummy-domain-io-caps.patch deleted file mode 100644 index 9e967f9..0000000 --- a/21373-dummy-domain-io-caps.patch +++ /dev/null @@ -1,48 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273741742 -3600 -# Node ID 1ec412805622fd7ec0e88bf3b7ab681d024994bc -# Parent 6c22d2dfed4882d5febf98d2afbb96ec9bedd043 -Even 'dummy' domains (e.g., dom_xen a.k.a. DOMID_XEN) must have valid I/O caps. - -Ensure the rangesets are always initialised. Certain (privileged) -invocations of hypercalls such as mmu_update can end up interrogating -these special domains for possible I/O capabilities. - -Signed-off-by: Keir Fraser - ---- a/xen/common/domain.c -+++ b/xen/common/domain.c -@@ -245,12 +245,17 @@ struct domain *domain_create( - d->disable_migrate = 1; - } - -- if ( domcr_flags & DOMCRF_dummy ) -- return d; -- - rangeset_domain_initialise(d); - init_status |= INIT_rangeset; - -+ d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); -+ d->irq_caps = rangeset_new(d, "Interrupts", 0); -+ if ( (d->iomem_caps == NULL) || (d->irq_caps == NULL) ) -+ goto fail; -+ -+ if ( domcr_flags & DOMCRF_dummy ) -+ return d; -+ - if ( !is_idle_domain(d) ) - { - if ( xsm_domain_create(d, ssidref) != 0 ) -@@ -285,11 +290,6 @@ struct domain *domain_create( - goto fail; - init_status |= INIT_arch; - -- d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); -- d->irq_caps = rangeset_new(d, "Interrupts", 0); -- if ( (d->iomem_caps == NULL) || (d->irq_caps == NULL) ) -- goto fail; -- - if ( sched_init_domain(d) != 0 ) - goto fail; - diff --git a/21408-amd-erratum-383.patch b/21408-amd-erratum-383.patch deleted file mode 100644 index 90cc985..0000000 --- a/21408-amd-erratum-383.patch +++ /dev/null @@ -1,141 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274178085 -3600 -# Node ID f40acba36be886e4b4e87afeacf39688f316dfe4 -# Parent e4028345ad48c442eb55b7bc08afdf1aede0aa2e -svm: Fix for AMD erratum 383 on Family 10h CPUs - -This patches implements the workaround of AMD erratum 383 on family -10h CPUs. It destroys the guest VM when a MC error with a special -pattern is detected. Without this patch, a guest VM failure can -potentially crash Xen hypervisor and the whole system. The erratum -will be published in next version of guide. - -Signed-off-by: Wei Huang -Signed-off-by: Joerg Roedel -Signed-off-by: Christoph Egger - -Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/svm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c -@@ -72,6 +72,8 @@ static void *hsa[NR_CPUS] __read_mostly; - /* vmcb used for extended host state */ - static void *root_vmcb[NR_CPUS] __read_mostly; - -+static bool_t amd_erratum383_found __read_mostly; -+ - static void inline __update_guest_eip( - struct cpu_user_regs *regs, unsigned int inst_len) - { -@@ -822,6 +824,20 @@ static int svm_cpu_prepare(unsigned int - return 0; - } - -+static void svm_init_erratum_383(struct cpuinfo_x86 *c) -+{ -+ uint64_t msr_content; -+ -+ /* only family 10h is affected */ -+ if ( c->x86 != 0x10 ) -+ return; -+ -+ rdmsrl(MSR_AMD64_DC_CFG, msr_content); -+ wrmsrl(MSR_AMD64_DC_CFG, msr_content | (1ULL << 47)); -+ -+ amd_erratum383_found = 1; -+} -+ - static int svm_cpu_up(struct cpuinfo_x86 *c) - { - u32 eax, edx, phys_hsa_lo, phys_hsa_hi; -@@ -847,6 +863,9 @@ static int svm_cpu_up(struct cpuinfo_x86 - phys_hsa_hi = (u32)(phys_hsa >> 32); - wrmsr(MSR_K8_VM_HSAVE_PA, phys_hsa_lo, phys_hsa_hi); - -+ /* check for erratum 383 */ -+ svm_init_erratum_383(c); -+ - /* Initialize core's ASID handling. */ - svm_asid_init(c); - -@@ -1244,6 +1263,47 @@ static void svm_vmexit_ud_intercept(stru - } - } - -+extern unsigned int nr_mce_banks; /* from mce.h */ -+ -+static int svm_is_erratum_383(struct cpu_user_regs *regs) -+{ -+ uint64_t msr_content; -+ uint32_t i; -+ struct vcpu *v = current; -+ -+ if ( !amd_erratum383_found ) -+ return 0; -+ -+ rdmsrl(MSR_IA32_MC0_STATUS, msr_content); -+ /* Bit 62 may or may not be set for this mce */ -+ msr_content &= ~(1ULL << 62); -+ -+ if ( msr_content != 0xb600000000010015ULL ) -+ return 0; -+ -+ /* Clear MCi_STATUS registers */ -+ for (i = 0; i < nr_mce_banks; i++) -+ wrmsrl(MSR_IA32_MCx_STATUS(i), 0ULL); -+ -+ rdmsrl(MSR_IA32_MCG_STATUS, msr_content); -+ wrmsrl(MSR_IA32_MCG_STATUS, msr_content & ~(1ULL << 2)); -+ -+ /* flush TLB */ -+ flush_tlb_mask(&v->domain->domain_dirty_cpumask); -+ -+ return 1; -+} -+ -+static void svm_vmexit_mce_intercept( -+ struct vcpu *v, struct cpu_user_regs *regs) -+{ -+ if ( svm_is_erratum_383(regs) ) -+ { -+ gdprintk(XENLOG_ERR, "SVM hits AMD erratum 383\n"); -+ domain_crash(v->domain); -+ } -+} -+ - static void wbinvd_ipi(void *info) - { - wbinvd(); -@@ -1432,6 +1492,7 @@ asmlinkage void svm_vmexit_handler(struc - /* Asynchronous event, handled when we STGI'd after the VMEXIT. */ - case VMEXIT_EXCEPTION_MC: - HVMTRACE_0D(MCE); -+ svm_vmexit_mce_intercept(v, regs); - break; - - case VMEXIT_VINTR: -Index: xen-4.0.0-testing/xen/include/asm-x86/msr-index.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/msr-index.h -+++ xen-4.0.0-testing/xen/include/asm-x86/msr-index.h -@@ -146,6 +146,11 @@ - #define MSR_IA32_MC8_ADDR 0x00000422 - #define MSR_IA32_MC8_MISC 0x00000423 - -+#define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) -+#define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x)) -+#define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x)) -+#define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x)) -+ - #define MSR_P6_PERFCTR0 0x000000c1 - #define MSR_P6_PERFCTR1 0x000000c2 - #define MSR_P6_EVNTSEL0 0x00000186 -@@ -224,6 +229,7 @@ - - /* AMD64 MSRs */ - #define MSR_AMD64_NB_CFG 0xc001001f -+#define MSR_AMD64_DC_CFG 0xc0011022 - #define AMD64_NB_CFG_CF8_EXT_ENABLE_BIT 46 - - /* AMD Family10h machine check MSRs */ diff --git a/21421-vts-ats-enabling.patch b/21421-vts-ats-enabling.patch index 0d51bf0..49d7db2 100644 --- a/21421-vts-ats-enabling.patch +++ b/21421-vts-ats-enabling.patch @@ -18,9 +18,11 @@ device is deassigned from a domain. Signed-off-by: Weidong Han ---- a/xen/drivers/passthrough/vtd/ia64/ats.c -+++ b/xen/drivers/passthrough/vtd/ia64/ats.c -@@ -47,6 +47,11 @@ int enable_ats_device(int seg, int bus, +Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/ia64/ats.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c +@@ -47,6 +47,11 @@ int enable_ats_device(int seg, int bus, return 0; } @@ -32,9 +34,11 @@ Signed-off-by: Weidong Han int dev_invalidate_iotlb(struct iommu *iommu, u16 did, u64 addr, unsigned int size_order, u64 type) { ---- a/xen/drivers/passthrough/vtd/iommu.c -+++ b/xen/drivers/passthrough/vtd/iommu.c -@@ -1324,6 +1324,9 @@ static int domain_context_mapping(struct +Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/iommu.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c +@@ -1331,6 +1331,9 @@ static int domain_context_mapping(struct dprintk(VTDPREFIX, "d%d:PCIe: map bdf = %x:%x.%x\n", domain->domain_id, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn); @@ -44,7 +48,7 @@ Signed-off-by: Weidong Han break; case DEV_TYPE_PCI: -@@ -1453,6 +1456,9 @@ static int domain_context_unmap(struct d +@@ -1460,6 +1463,9 @@ static int domain_context_unmap(struct d dprintk(VTDPREFIX, "d%d:PCIe: unmap bdf = %x:%x.%x\n", domain->domain_id, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); ret = domain_context_unmap_one(domain, iommu, bus, devfn); @@ -54,7 +58,7 @@ Signed-off-by: Weidong Han break; case DEV_TYPE_PCI: -@@ -1771,8 +1777,6 @@ static void setup_dom0_devices(struct do +@@ -1788,8 +1794,6 @@ static void setup_dom0_devices(struct do list_add(&pdev->domain_list, &d->arch.pdev_list); domain_context_mapping(d, pdev->bus, pdev->devfn); pci_enable_acs(pdev); @@ -63,8 +67,10 @@ Signed-off-by: Weidong Han } } spin_unlock(&pcidevs_lock); ---- a/xen/drivers/passthrough/vtd/x86/ats.c -+++ b/xen/drivers/passthrough/vtd/x86/ats.c +Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/x86/ats.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c @@ -92,6 +92,9 @@ int ats_device(int seg, int bus, int dev pdev = pci_get_pdev(bus, devfn); @@ -75,7 +81,7 @@ Signed-off-by: Weidong Han if ( !ecap_queued_inval(drhd->iommu->ecap) || !ecap_dev_iotlb(drhd->iommu->ecap) ) return 0; -@@ -144,6 +147,9 @@ int enable_ats_device(int seg, int bus, +@@ -144,6 +147,9 @@ int enable_ats_device(int seg, int bus, value = pci_conf_read16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos + ATS_REG_CTL); @@ -85,7 +91,7 @@ Signed-off-by: Weidong Han value |= ATS_ENABLE; pci_conf_write16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos + ATS_REG_CTL, value); -@@ -153,10 +159,50 @@ int enable_ats_device(int seg, int bus, +@@ -153,10 +159,50 @@ int enable_ats_device(int seg, int bus, pdev->devfn = devfn; pdev->ats_queue_depth = queue_depth; list_add(&(pdev->list), &ats_devices); diff --git a/21435-vmx-retain-global-controls.patch b/21435-vmx-retain-global-controls.patch deleted file mode 100644 index 49329c6..0000000 --- a/21435-vmx-retain-global-controls.patch +++ /dev/null @@ -1,45 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274298365 -3600 -# Node ID c414129c8e129422d03898ec5822f56b2d2da4f8 -# Parent fe18437da295d0fdad2d852a603144eec62d29cd -vmx: Do not modify global vmx_vm{entry,exit}_control fields in init_vmcs_config() - -The function shoudl only have single-domain effect. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/hvm/vmx/vmcs.c -+++ b/xen/arch/x86/hvm/vmx/vmcs.c -@@ -558,6 +558,8 @@ static int construct_vmcs(struct vcpu *v - struct domain *d = v->domain; - uint16_t sysenter_cs; - unsigned long sysenter_eip; -+ u32 vmexit_ctl = vmx_vmexit_control; -+ u32 vmentry_ctl = vmx_vmentry_control; - - vmx_vmcs_enter(v); - -@@ -584,17 +586,17 @@ static int construct_vmcs(struct vcpu *v - v->arch.hvm_vmx.secondary_exec_control &= - ~(SECONDARY_EXEC_ENABLE_EPT | - SECONDARY_EXEC_UNRESTRICTED_GUEST); -- vmx_vmexit_control &= ~(VM_EXIT_SAVE_GUEST_PAT | -- VM_EXIT_LOAD_HOST_PAT); -- vmx_vmentry_control &= ~VM_ENTRY_LOAD_GUEST_PAT; -+ vmexit_ctl &= ~(VM_EXIT_SAVE_GUEST_PAT | -+ VM_EXIT_LOAD_HOST_PAT); -+ vmentry_ctl &= ~VM_ENTRY_LOAD_GUEST_PAT; - } - - /* Do not enable Monitor Trap Flag unless start single step debug */ - v->arch.hvm_vmx.exec_control &= ~CPU_BASED_MONITOR_TRAP_FLAG; - - __vmwrite(CPU_BASED_VM_EXEC_CONTROL, v->arch.hvm_vmx.exec_control); -- __vmwrite(VM_EXIT_CONTROLS, vmx_vmexit_control); -- __vmwrite(VM_ENTRY_CONTROLS, vmx_vmentry_control); -+ __vmwrite(VM_EXIT_CONTROLS, vmexit_ctl); -+ __vmwrite(VM_ENTRY_CONTROLS, vmentry_ctl); - - if ( cpu_has_vmx_ple ) - { diff --git a/21445-x86-tsc-handling-cleanups-v2.patch b/21445-x86-tsc-handling-cleanups-v2.patch deleted file mode 100644 index db93ecb..0000000 --- a/21445-x86-tsc-handling-cleanups-v2.patch +++ /dev/null @@ -1,268 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278094440 -3600 -# Node ID a9c458ab90e4ecb25383456be653368ecd900ee4 -# Parent 322468d5ab6ceca4afa21977a02f4492308d2ddc -x86: TSC handling cleanups (version 2) - -"I am removing the tsc_scaled variable that is never actually used -because when tsc needs to be scaled vtsc is 1. I am also making this -more explicit in tsc_set_info. I am also removing hvm_domain.gtsc_khz -that is a duplicate of d->arch.tsc_khz. I am using scale_delta(delta, -&d->arch.ns_to_vtsc) to scale the tsc value before returning it to the -guest like in the pv case. I added a feature flag to specify that the -pvclock algorithm is safe to be used in an HVM guest so that the guest -can now use it without hanging." - -Version 2 fixes a bug which breaks PV domU time. - -Signed-off-by: Stefano Stabellini -xen-unstable changeset: 21445:c1ed00d49534 -xen-unstable date: Sat May 22 06:31:47 2010 +0100 - -Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c -@@ -152,32 +152,6 @@ void hvm_set_rdtsc_exiting(struct domain - hvm_funcs.set_rdtsc_exiting(v, enable); - } - --int hvm_gtsc_need_scale(struct domain *d) --{ -- uint32_t gtsc_mhz, htsc_mhz; -- -- if ( d->arch.vtsc ) -- return 0; -- -- gtsc_mhz = d->arch.hvm_domain.gtsc_khz / 1000; -- htsc_mhz = (uint32_t)cpu_khz / 1000; -- -- d->arch.hvm_domain.tsc_scaled = (gtsc_mhz && (gtsc_mhz != htsc_mhz)); -- return d->arch.hvm_domain.tsc_scaled; --} -- --static u64 hvm_h2g_scale_tsc(struct vcpu *v, u64 host_tsc) --{ -- uint32_t gtsc_khz, htsc_khz; -- -- if ( !v->domain->arch.hvm_domain.tsc_scaled ) -- return host_tsc; -- -- htsc_khz = cpu_khz; -- gtsc_khz = v->domain->arch.hvm_domain.gtsc_khz; -- return muldiv64(host_tsc, gtsc_khz, htsc_khz); --} -- - void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc) - { - uint64_t tsc; -@@ -185,11 +159,11 @@ void hvm_set_guest_tsc(struct vcpu *v, u - if ( v->domain->arch.vtsc ) - { - tsc = hvm_get_guest_time(v); -+ tsc = gtime_to_gtsc(v->domain, tsc); - } - else - { - rdtscll(tsc); -- tsc = hvm_h2g_scale_tsc(v, tsc); - } - - v->arch.hvm_vcpu.cache_tsc_offset = guest_tsc - tsc; -@@ -203,12 +177,12 @@ u64 hvm_get_guest_tsc(struct vcpu *v) - if ( v->domain->arch.vtsc ) - { - tsc = hvm_get_guest_time(v); -+ tsc = gtime_to_gtsc(v->domain, tsc); - v->domain->arch.vtsc_kerncount++; - } - else - { - rdtscll(tsc); -- tsc = hvm_h2g_scale_tsc(v, tsc); - } - - return tsc + v->arch.hvm_vcpu.cache_tsc_offset; -Index: xen-4.0.0-testing/xen/arch/x86/hvm/save.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/save.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/save.c -@@ -33,7 +33,7 @@ void arch_hvm_save(struct domain *d, str - hdr->cpuid = eax; - - /* Save guest's preferred TSC. */ -- hdr->gtsc_khz = d->arch.hvm_domain.gtsc_khz; -+ hdr->gtsc_khz = d->arch.tsc_khz; - } - - int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr) -@@ -62,8 +62,8 @@ int arch_hvm_load(struct domain *d, stru - - /* Restore guest's preferred TSC frequency. */ - if ( hdr->gtsc_khz ) -- d->arch.hvm_domain.gtsc_khz = hdr->gtsc_khz; -- if ( hvm_gtsc_need_scale(d) ) -+ d->arch.tsc_khz = hdr->gtsc_khz; -+ if ( d->arch.vtsc ) - { - hvm_set_rdtsc_exiting(d, 1); - gdprintk(XENLOG_WARNING, "Domain %d expects freq %uMHz " -Index: xen-4.0.0-testing/xen/arch/x86/hvm/vpt.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/vpt.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/vpt.c -@@ -32,9 +32,6 @@ void hvm_init_guest_time(struct domain * - spin_lock_init(&pl->pl_time_lock); - pl->stime_offset = -(u64)get_s_time(); - pl->last_guest_time = 0; -- -- d->arch.hvm_domain.gtsc_khz = cpu_khz; -- d->arch.hvm_domain.tsc_scaled = 0; - } - - u64 hvm_get_guest_time(struct vcpu *v) -Index: xen-4.0.0-testing/xen/arch/x86/time.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/time.c -+++ xen-4.0.0-testing/xen/arch/x86/time.c -@@ -850,8 +850,13 @@ static void __update_vcpu_system_time(st - - if ( d->arch.vtsc ) - { -- u64 delta = max_t(s64, t->stime_local_stamp - d->arch.vtsc_offset, 0); -- tsc_stamp = scale_delta(delta, &d->arch.ns_to_vtsc); -+ u64 stime = t->stime_local_stamp; -+ if ( is_hvm_domain(d) ) -+ { -+ struct pl_time *pl = &v->domain->arch.hvm_domain.pl_time; -+ stime += pl->stime_offset + v->arch.hvm_vcpu.stime_offset; -+ } -+ tsc_stamp = gtime_to_gtsc(d, stime); - } - else - { -@@ -874,6 +879,8 @@ static void __update_vcpu_system_time(st - _u.tsc_to_system_mul = t->tsc_scale.mul_frac; - _u.tsc_shift = (s8)t->tsc_scale.shift; - } -+ if ( is_hvm_domain(d) ) -+ _u.tsc_timestamp += v->arch.hvm_vcpu.cache_tsc_offset; - - /* Don't bother unless timestamp record has changed or we are forced. */ - _u.version = u->version; /* make versions match for memcmp test */ -@@ -1640,11 +1647,17 @@ struct tm wallclock_time(void) - * PV SoftTSC Emulation. - */ - -+u64 gtime_to_gtsc(struct domain *d, u64 tsc) -+{ -+ if ( !is_hvm_domain(d) ) -+ tsc = max_t(s64, tsc - d->arch.vtsc_offset, 0); -+ return scale_delta(tsc, &d->arch.ns_to_vtsc); -+} -+ - void pv_soft_rdtsc(struct vcpu *v, struct cpu_user_regs *regs, int rdtscp) - { - s_time_t now = get_s_time(); - struct domain *d = v->domain; -- u64 delta; - - spin_lock(&d->arch.vtsc_lock); - -@@ -1660,8 +1673,7 @@ void pv_soft_rdtsc(struct vcpu *v, struc - - spin_unlock(&d->arch.vtsc_lock); - -- delta = max_t(s64, now - d->arch.vtsc_offset, 0); -- now = scale_delta(delta, &d->arch.ns_to_vtsc); -+ now = gtime_to_gtsc(d, now); - - regs->eax = (uint32_t)now; - regs->edx = (uint32_t)(now >> 32); -@@ -1802,8 +1814,10 @@ void tsc_set_info(struct domain *d, - d->arch.vtsc_offset = get_s_time() - elapsed_nsec; - d->arch.tsc_khz = gtsc_khz ? gtsc_khz : cpu_khz; - set_time_scale(&d->arch.vtsc_to_ns, d->arch.tsc_khz * 1000 ); -- /* use native TSC if initial host has safe TSC and not migrated yet */ -- if ( host_tsc_is_safe() && incarnation == 0 ) -+ /* use native TSC if initial host has safe TSC, has not migrated -+ * yet and tsc_khz == cpu_khz */ -+ if ( host_tsc_is_safe() && incarnation == 0 && -+ d->arch.tsc_khz == cpu_khz ) - d->arch.vtsc = 0; - else - d->arch.ns_to_vtsc = scale_reciprocal(d->arch.vtsc_to_ns); -@@ -1828,7 +1842,7 @@ void tsc_set_info(struct domain *d, - } - d->arch.incarnation = incarnation + 1; - if ( is_hvm_domain(d) ) -- hvm_set_rdtsc_exiting(d, d->arch.vtsc || hvm_gtsc_need_scale(d)); -+ hvm_set_rdtsc_exiting(d, d->arch.vtsc); - } - - /* vtsc may incur measurable performance degradation, diagnose with this */ -Index: xen-4.0.0-testing/xen/common/kernel.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/common/kernel.c -+++ xen-4.0.0-testing/xen/common/kernel.c -@@ -243,6 +243,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL - fi.submap |= (1U << XENFEAT_mmu_pt_update_preserve_ad) | - (1U << XENFEAT_highmem_assist) | - (1U << XENFEAT_gnttab_map_avail_bits); -+ else -+ fi.submap |= (1U << XENFEAT_hvm_safe_pvclock); - #endif - break; - default: -Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/domain.h -+++ xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h -@@ -45,8 +45,6 @@ struct hvm_domain { - struct hvm_ioreq_page ioreq; - struct hvm_ioreq_page buf_ioreq; - -- uint32_t gtsc_khz; /* kHz */ -- bool_t tsc_scaled; - struct pl_time pl_time; - - struct hvm_io_handler io_handler; -Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/hvm.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/hvm.h -+++ xen-4.0.0-testing/xen/include/asm-x86/hvm/hvm.h -@@ -290,7 +290,6 @@ int hvm_event_needs_reinjection(uint8_t - uint8_t hvm_combine_hw_exceptions(uint8_t vec1, uint8_t vec2); - - void hvm_set_rdtsc_exiting(struct domain *d, bool_t enable); --int hvm_gtsc_need_scale(struct domain *d); - - static inline int - hvm_cpu_prepare(unsigned int cpu) -Index: xen-4.0.0-testing/xen/include/asm-x86/time.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/time.h -+++ xen-4.0.0-testing/xen/include/asm-x86/time.h -@@ -60,6 +60,7 @@ uint64_t acpi_pm_tick_to_ns(uint64_t tic - uint64_t ns_to_acpi_pm_tick(uint64_t ns); - - void pv_soft_rdtsc(struct vcpu *v, struct cpu_user_regs *regs, int rdtscp); -+u64 gtime_to_gtsc(struct domain *d, u64 tsc); - - void tsc_set_info(struct domain *d, uint32_t tsc_mode, uint64_t elapsed_nsec, - uint32_t gtsc_khz, uint32_t incarnation); -Index: xen-4.0.0-testing/xen/include/public/features.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/features.h -+++ xen-4.0.0-testing/xen/include/public/features.h -@@ -68,6 +68,9 @@ - */ - #define XENFEAT_gnttab_map_avail_bits 7 - -+/* x86: pvclock algorithm is safe to use on HVM */ -+#define XENFEAT_hvm_safe_pvclock 9 -+ - #define XENFEAT_NR_SUBMAPS 1 - - #endif /* __XEN_PUBLIC_FEATURES_H__ */ diff --git a/21446-iommu-graceful-generic-fail.patch b/21446-iommu-graceful-generic-fail.patch deleted file mode 100644 index 4a84654..0000000 --- a/21446-iommu-graceful-generic-fail.patch +++ /dev/null @@ -1,29 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274506601 -3600 -# Node ID 93410e5e4ad8799932ad31820d0d82c74d1f63a2 -# Parent c1ed00d495342334980be576bbb8a2b1037b89c9 -iommu: Gracefully fail to initialise iommu on generic x86 platforms. - -Signed-off-by: Keir Fraser - ---- a/xen/include/asm-x86/hvm/iommu.h -+++ b/xen/include/asm-x86/hvm/iommu.h -@@ -1,6 +1,8 @@ - #ifndef __ASM_X86_HVM_IOMMU_H__ - #define __ASM_X86_HVM_IOMMU_H__ - -+#include -+ - struct iommu_ops; - extern const struct iommu_ops intel_iommu_ops; - extern const struct iommu_ops amd_iommu_ops; -@@ -31,7 +33,7 @@ static inline int iommu_hardware_setup(v - case X86_VENDOR_AMD: - return amd_iov_detect(); - default: -- BUG(); -+ return -ENODEV; - } - - return 0; diff --git a/21453-shadow-avoid-remove-all-after-teardown.patch b/21453-shadow-avoid-remove-all-after-teardown.patch deleted file mode 100644 index bbb2d73..0000000 --- a/21453-shadow-avoid-remove-all-after-teardown.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274857281 -3600 -# Node ID 5addb6cb16fd64c664b1e3dd335c76b3426e05e9 -# Parent 459f35d8cac4f19e6eae0a7396f6c97e20ae955c -x86 shadow: Avoid remove-all-shadows after shadow teardown - -If dom0 alters the p2m of a domain that's being destroyed, we can end -up doing a remove-all-shadows after the shadow hash table has been -freed. Since no hash table implies no shadows, just return -immediately. - -Signed-off-by: Tim Deegan - ---- a/xen/arch/x86/mm/shadow/common.c -+++ b/xen/arch/x86/mm/shadow/common.c -@@ -2173,8 +2173,13 @@ static void hash_foreach(struct vcpu *v, - struct domain *d = v->domain; - struct page_info *x; - -- /* Say we're here, to stop hash-lookups reordering the chains */ - ASSERT(shadow_locked_by_me(d)); -+ -+ /* Can be called via p2m code &c after shadow teardown. */ -+ if ( unlikely(!d->arch.paging.shadow.hash_table) ) -+ return; -+ -+ /* Say we're here, to stop hash-lookups reordering the chains */ - ASSERT(d->arch.paging.shadow.hash_walking == 0); - d->arch.paging.shadow.hash_walking = 1; - diff --git a/21456-compat-hvm-addr-check.patch b/21456-compat-hvm-addr-check.patch deleted file mode 100644 index 0e1c868..0000000 --- a/21456-compat-hvm-addr-check.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1274857778 -3600 -# Node ID a69d09da4917c7b57ceed65224e4bbc389601081 -# Parent 32cdd423d4ebab2b2d03a4501be08438c5dc7050 -compat-guest accessor macros do not need address check for hvm guests. - -Signed-off-by: Tim Deegan - ---- a/xen/include/xen/compat.h -+++ b/xen/include/xen/compat.h -@@ -90,8 +90,9 @@ - * Allows use of faster __copy_* functions. - */ - #define compat_handle_okay(hnd, nr) \ -+ (paging_mode_external(current->domain) || \ - compat_array_access_ok((void *)(full_ptr_t)(hnd).c, (nr), \ -- sizeof(**(hnd)._)) -+ sizeof(**(hnd)._))) - - #define __copy_to_compat_offset(hnd, off, ptr, nr) ({ \ - const typeof(*(ptr)) *_s = (ptr); \ diff --git a/21459-block-script.patch b/21459-block-script.patch deleted file mode 100644 index b40a8dc..0000000 --- a/21459-block-script.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User Jim Fehlig -# Date 1274807602 21600 -# Node ID 14d040342c6618365750b2c3b96ca01ff4a5e5dd -# Parent 93410e5e4ad8799932ad31820d0d82c74d1f63a2 -Allow space in vbd path name - -c/s 20393 breaks existing domain configuration that contains -spaces in the vbd path name. Fixed by this trivial patch which -provides missing quotes. - - Signed-off-by: Jim Fehlig - -diff -r 93410e5e4ad8 -r 14d040342c66 tools/hotplug/Linux/block ---- a/tools/hotplug/Linux/block Sat May 22 06:36:41 2010 +0100 -+++ b/tools/hotplug/Linux/block Tue May 25 11:13:22 2010 -0600 -@@ -272,8 +272,8 @@ - - if [ "x$mode" != 'x!' ] - then -- inode=$(stat -c '%i' $file) -- dev=$(stat -c '%D' $file) -+ inode=$(stat -c '%i' "$file") -+ dev=$(stat -c '%D' "$file") - if [ -z "$inode" ] || [ -z "$dev" ] - then - fatal "Unable to lookup $file: dev: $dev inode: $inode" diff --git a/21460-xend-timeoffset.patch b/21460-xend-timeoffset.patch deleted file mode 100644 index db16ac0..0000000 --- a/21460-xend-timeoffset.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Jim Fehlig -# Date 1274822804 21600 -# Node ID a83e97657ba0f3ea232fe0dfb9edccf8e28aa982 -# Parent 14d040342c6618365750b2c3b96ca01ff4a5e5dd -tools: Fix time offset when localtime=0 - -localtime can be stored in vm config as a string, resulting in -incorrect calculation of rtc_timeoffset. Cast localtime to int -to ensure rtc_timeoffset is calculated properly. - - Signed-off-by: Jim Fehlig - -diff -r 14d040342c66 -r a83e97657ba0 tools/python/xen/xend/image.py ---- a/tools/python/xen/xend/image.py Tue May 25 11:13:22 2010 -0600 -+++ b/tools/python/xen/xend/image.py Tue May 25 15:26:44 2010 -0600 -@@ -129,7 +129,7 @@ - self.dmargs = self.parseDeviceModelArgs(vmConfig) - self.pid = None - rtc_timeoffset = int(vmConfig['platform'].get('rtc_timeoffset', 0)) -- if vmConfig['platform'].get('localtime', 0): -+ if int(vmConfig['platform'].get('localtime', 0)): - if time.localtime(time.time())[8]: - rtc_timeoffset -= time.altzone - else: diff --git a/21492-x86-pirq-unbind.patch b/21492-x86-pirq-unbind.patch deleted file mode 100644 index 7981474..0000000 --- a/21492-x86-pirq-unbind.patch +++ /dev/null @@ -1,23 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1275040447 -3600 -# Node ID 96917cf25bf3ad42c6b6cddb7ff4f03857ae9619 -# Parent 95acf74586d782d8d4d39016b3426a1eae127e97 -x86: Fix guest-pointer-array memmove in __pirq_guest_unbind(). - -Thanks to Alex Zefefrt for finding this. - -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -1242,7 +1242,8 @@ static irq_guest_action_t *__pirq_guest_ - for ( i = 0; (i < action->nr_guests) && (action->guest[i] != d); i++ ) - continue; - BUG_ON(i == action->nr_guests); -- memmove(&action->guest[i], &action->guest[i+1], IRQ_MAX_GUESTS-i-1); -+ memmove(&action->guest[i], &action->guest[i+1], -+ (action->nr_guests-i-1) * sizeof(action->guest[0])); - action->nr_guests--; - - switch ( action->ack_type ) diff --git a/21526-x86-nehalem-cpuid-mask.patch b/21526-x86-nehalem-cpuid-mask.patch index a13be19..d876297 100644 --- a/21526-x86-nehalem-cpuid-mask.patch +++ b/21526-x86-nehalem-cpuid-mask.patch @@ -8,76 +8,201 @@ Intel: Add CPUID feature mask support for NHM processors. Signed-off-by: Jun Nakajima Signed-off-by: Liping Ke ---- a/xen/arch/x86/cpu/intel.c -+++ b/xen/arch/x86/cpu/intel.c -@@ -29,6 +29,9 @@ extern int trap_init_f00f_bug(void); - static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; - integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); - integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); -+static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; -+integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); -+integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); +# HG changeset patch +# User Keir Fraser +# Date 1276604335 -3600 +# Node ID 2501732e291b001711a0dc1c474bb89ce77f3110 +# Parent a2cc1db1af9c8f9b148c80f8b2c3f64bde7542f9 +x86: fix pv cpuid masking + +Invert initial values of the variables parsed into from the command +line, so that completely clearing out one or more of the four bit +fields is possible. + +Further, consolidate the command line parameter specifications into +a single place. + +Finally, as per "Intel Virtualization Technology FlexMigration +Application Note" (http://www.intel.com/Assets/PDF/manual/323850.pdf), +also handle family 6 model 0x1f. + +What remains open is the question whether pv_cpuid() shouldn't also +consume these masks. + +Signed-off-by: Jan Beulich + +Index: xen-4.0.1-testing/xen/arch/x86/cpu/amd.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/amd.c ++++ xen-4.0.1-testing/xen/arch/x86/cpu/amd.c +@@ -33,14 +33,6 @@ void start_svm(struct cpuinfo_x86 *c); + static char opt_famrev[14]; + string_param("cpuid_mask_cpu", opt_famrev); +-/* Finer-grained CPUID feature control. */ +-static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; +-integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); +-integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); +-static unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; +-integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); +-integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); +- + static inline void wrmsr_amd(unsigned int index, unsigned int lo, + unsigned int hi) + { +@@ -61,7 +53,7 @@ static inline void wrmsr_amd(unsigned in + * + * The processor revision string parameter has precedene. + */ +-static void __devinit set_cpuidmask(struct cpuinfo_x86 *c) ++static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) + { + static unsigned int feat_ecx, feat_edx; + static unsigned int extfeat_ecx, extfeat_edx; +@@ -76,12 +68,12 @@ static void __devinit set_cpuidmask(stru + ASSERT((status == not_parsed) && (smp_processor_id() == 0)); + status = no_mask; + +- if (opt_cpuid_mask_ecx | opt_cpuid_mask_edx | +- opt_cpuid_mask_ext_ecx | opt_cpuid_mask_ext_edx) { +- feat_ecx = opt_cpuid_mask_ecx ? : ~0U; +- feat_edx = opt_cpuid_mask_edx ? : ~0U; +- extfeat_ecx = opt_cpuid_mask_ext_ecx ? : ~0U; +- extfeat_edx = opt_cpuid_mask_ext_edx ? : ~0U; ++ if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & ++ opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) { ++ feat_ecx = opt_cpuid_mask_ecx; ++ feat_edx = opt_cpuid_mask_edx; ++ extfeat_ecx = opt_cpuid_mask_ext_ecx; ++ extfeat_edx = opt_cpuid_mask_ext_edx; + } else if (*opt_famrev == '\0') { + return; + } else if (!strcmp(opt_famrev, "fam_0f_rev_c")) { +Index: xen-4.0.1-testing/xen/arch/x86/cpu/common.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/common.c ++++ xen-4.0.1-testing/xen/arch/x86/cpu/common.c +@@ -22,6 +22,15 @@ static int cachesize_override __cpuinitd + static int disable_x86_fxsr __cpuinitdata; + static int disable_x86_serial_nr __cpuinitdata; + ++unsigned int __devinitdata opt_cpuid_mask_ecx = ~0u; ++integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); ++unsigned int __devinitdata opt_cpuid_mask_edx = ~0u; ++integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); ++unsigned int __devinitdata opt_cpuid_mask_ext_ecx = ~0u; ++integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx); ++unsigned int __devinitdata opt_cpuid_mask_ext_edx = ~0u; ++integer_param("cpuid_mask_ext_edx", opt_cpuid_mask_ext_edx); ++ + struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; + + /* +Index: xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/cpu.h ++++ xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h +@@ -21,6 +21,9 @@ struct cpu_dev { + + extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM]; + ++extern unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; ++extern unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; ++ + extern int get_model_name(struct cpuinfo_x86 *c); + extern void display_cacheinfo(struct cpuinfo_x86 *c); + +Index: xen-4.0.1-testing/xen/arch/x86/cpu/intel.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/intel.c ++++ xen-4.0.1-testing/xen/arch/x86/cpu/intel.c +@@ -20,16 +20,6 @@ + + extern int trap_init_f00f_bug(void); + +-/* +- * opt_cpuid_mask_ecx/edx: cpuid.1[ecx, edx] feature mask. +- * For example, E8400[Intel Core 2 Duo Processor series] ecx = 0x0008E3FD, +- * edx = 0xBFEBFBFF when executing CPUID.EAX = 1 normally. If you want to +- * 'rev down' to E8400, you can set these values in these Xen boot parameters. +- */ +-static unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; +-integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); +-integer_param("cpuid_mask_edx", opt_cpuid_mask_edx); +- static int use_xsave = 1; boolean_param("xsave", use_xsave); -@@ -40,24 +43,46 @@ boolean_param("xsave", use_xsave); + +@@ -40,24 +30,57 @@ boolean_param("xsave", use_xsave); struct movsl_mask movsl_mask __read_mostly; #endif -static void __devinit set_cpuidmask(void) -+static void __devinit set_cpuidmask(struct cpuinfo_x86 *c) ++/* ++ * opt_cpuid_mask_ecx/edx: cpuid.1[ecx, edx] feature mask. ++ * For example, E8400[Intel Core 2 Duo Processor series] ecx = 0x0008E3FD, ++ * edx = 0xBFEBFBFF when executing CPUID.EAX = 1 normally. If you want to ++ * 'rev down' to E8400, you can set these values in these Xen boot parameters. ++ */ ++static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) { - unsigned int eax, ebx, ecx, edx, model; -+ unsigned int model = c->x86_model; ++ const char *extra = ""; - if (!(opt_cpuid_mask_ecx | opt_cpuid_mask_edx)) -+ if (!(opt_cpuid_mask_ecx | opt_cpuid_mask_edx | -+ opt_cpuid_mask_ext_ecx | opt_cpuid_mask_ext_edx)) ++ if (!~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & ++ opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) return; - cpuid(0x00000001, &eax, &ebx, &ecx, &edx); - model = ((eax & 0xf0000) >> 12) | ((eax & 0xf0) >> 4); - if (!((model == 0x1d) || ((model == 0x17) && ((eax & 0xf) >= 4)))) { -+ if (c->x86 != 0x6) /* Only family 6 supports this feature */ -+ return; -+ -+ if ((model == 0x1d) || ((model == 0x17) && (c->x86_mask >= 4))) { -+ wrmsr(MSR_IA32_CPUID_FEATURE_MASK1, -+ opt_cpuid_mask_ecx ? : ~0u, -+ opt_cpuid_mask_edx ? : ~0u); -+ } -+/* +- printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", +- smp_processor_id()); ++ /* Only family 6 supports this feature */ ++ switch ((c->x86 == 6) * c->x86_model) { ++ case 0x17: ++ if ((c->x86_mask & 0x0f) < 4) ++ break; ++ /* fall through */ ++ case 0x1d: ++ wrmsr(MSR_INTEL_CPUID_FEATURE_MASK, ++ opt_cpuid_mask_ecx, ++ opt_cpuid_mask_edx); ++ if (!~(opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) ++ return; ++ extra = "extended "; ++ break; ++/* + * CPU supports this feature if the processor signature meets the following: + * (CPUID.(EAX=01h):EAX) > 000106A2h, or + * (CPUID.(EAX=01h):EAX) == 000106Exh, 0002065xh, 000206Cxh, 000206Exh, or 000206Fxh + * + */ -+ else if (((model == 0x1a) && (c->x86_mask > 2)) -+ || model == 0x1e -+ || model == 0x25 -+ || model == 0x2c -+ || model == 0x2e -+ || model == 0x2f) { -+ wrmsr(MSR_IA32_CPUID1_FEATURE_MASK, -+ opt_cpuid_mask_ecx ? : ~0u, -+ opt_cpuid_mask_edx ? : ~0u); -+ wrmsr(MSR_IA32_CPUID80000001_FEATURE_MASK, -+ opt_cpuid_mask_ext_ecx ? : ~0u, -+ opt_cpuid_mask_ext_edx ? : ~0u); -+ } -+ else { - printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", - smp_processor_id()); ++ case 0x1a: ++ if ((c->x86_mask & 0x0f) <= 2) ++ break; ++ /* fall through */ ++ case 0x1e: case 0x1f: ++ case 0x25: case 0x2c: case 0x2e: case 0x2f: ++ wrmsr(MSR_INTEL_CPUID1_FEATURE_MASK, ++ opt_cpuid_mask_ecx, ++ opt_cpuid_mask_edx); ++ wrmsr(MSR_INTEL_CPUID80000001_FEATURE_MASK, ++ opt_cpuid_mask_ext_ecx, ++ opt_cpuid_mask_ext_edx); return; } -- + - wrmsr(MSR_IA32_CPUID_FEATURE_MASK1, - opt_cpuid_mask_ecx ? : ~0u, - opt_cpuid_mask_edx ? : ~0u); ++ printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n", ++ smp_processor_id()); } void __devinit early_intel_workaround(struct cpuinfo_x86 *c) -@@ -179,7 +204,7 @@ static void __devinit init_intel(struct +@@ -179,7 +202,7 @@ static void __devinit init_intel(struct detect_ht(c); @@ -86,14 +211,20 @@ Signed-off-by: Liping Ke /* Work around errata */ Intel_errata_workarounds(c); ---- a/xen/include/asm-x86/msr-index.h -+++ b/xen/include/asm-x86/msr-index.h -@@ -158,6 +158,8 @@ +Index: xen-4.0.1-testing/xen/include/asm-x86/msr-index.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-x86/msr-index.h ++++ xen-4.0.1-testing/xen/include/asm-x86/msr-index.h +@@ -156,8 +156,10 @@ + #define MSR_P6_EVNTSEL0 0x00000186 + #define MSR_P6_EVNTSEL1 0x00000187 - /* MSR for cpuid feature mask */ - #define MSR_IA32_CPUID_FEATURE_MASK1 0x00000478 -+#define MSR_IA32_CPUID1_FEATURE_MASK 0x00000130 -+#define MSR_IA32_CPUID80000001_FEATURE_MASK 0x00000131 +-/* MSR for cpuid feature mask */ +-#define MSR_IA32_CPUID_FEATURE_MASK1 0x00000478 ++/* MSRs for Intel cpuid feature mask */ ++#define MSR_INTEL_CPUID_FEATURE_MASK 0x00000478 ++#define MSR_INTEL_CPUID1_FEATURE_MASK 0x00000130 ++#define MSR_INTEL_CPUID80000001_FEATURE_MASK 0x00000131 /* MSRs & bits used for VMX enabling */ #define MSR_IA32_VMX_BASIC 0x480 diff --git a/21542-amd-erratum-411.patch b/21542-amd-erratum-411.patch index 9322bce..b22122c 100644 --- a/21542-amd-erratum-411.patch +++ b/21542-amd-erratum-411.patch @@ -9,11 +9,11 @@ Clear APIC TMICT when we mask APIC LVTT. Signed-off-by: Wei Wang -Index: xen-4.0.0-testing/xen/arch/x86/apic.c +Index: xen-4.0.1-testing/xen/arch/x86/apic.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/apic.c -+++ xen-4.0.0-testing/xen/arch/x86/apic.c -@@ -195,6 +195,9 @@ void clear_local_APIC(void) +--- xen-4.0.1-testing.orig/xen/arch/x86/apic.c ++++ xen-4.0.1-testing/xen/arch/x86/apic.c +@@ -198,6 +198,9 @@ void clear_local_APIC(void) maxlvt = get_maxlvt(); @@ -23,7 +23,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/apic.c /* * Masking an LVT entry on a P6 can trigger a local APIC error * if the vector is zero. Mask LVTERR first to prevent this. -@@ -1184,7 +1187,10 @@ void disable_APIC_timer(void) +@@ -1335,7 +1338,10 @@ void disable_APIC_timer(void) { if (using_apic_timer) { unsigned long v; @@ -35,10 +35,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/apic.c v = apic_read(APIC_LVTT); apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED); } -Index: xen-4.0.0-testing/xen/arch/x86/hpet.c +Index: xen-4.0.1-testing/xen/arch/x86/hpet.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hpet.c -+++ xen-4.0.0-testing/xen/arch/x86/hpet.c +--- xen-4.0.1-testing.orig/xen/arch/x86/hpet.c ++++ xen-4.0.1-testing/xen/arch/x86/hpet.c @@ -659,8 +659,7 @@ void hpet_broadcast_enter(void) if ( hpet_attach_channel ) hpet_attach_channel(cpu, ch); diff --git a/21615-dont-save-xen-heap-pages.patch b/21615-dont-save-xen-heap-pages.patch index 782e3d9..b6327cf 100644 --- a/21615-dont-save-xen-heap-pages.patch +++ b/21615-dont-save-xen-heap-pages.patch @@ -17,8 +17,10 @@ guests, meaning that the input to these must be treated as GMFNs. Signed-off-by: Jan Beulich ---- a/tools/libxc/xc_domain_save.c -+++ b/tools/libxc/xc_domain_save.c +Index: xen-4.0.1-testing/tools/libxc/xc_domain_save.c +=================================================================== +--- xen-4.0.1-testing.orig/tools/libxc/xc_domain_save.c ++++ xen-4.0.1-testing/tools/libxc/xc_domain_save.c @@ -1282,58 +1282,64 @@ int xc_domain_save(int xc_handle, int io goto out; } @@ -56,11 +58,11 @@ Signed-off-by: Jan Beulich - goto out; - } + unsigned long gmfn = pfn_batch[j]; - -- for ( j = 0; j < batch; j++ ) ++ + if ( !hvm ) + gmfn = pfn_to_mfn(gmfn); -+ + +- for ( j = 0; j < batch; j++ ) + if ( pfn_err[j] ) { - unsigned long mfn = pfn_to_mfn(pfn_batch[j]); @@ -122,9 +124,11 @@ Signed-off-by: Jan Beulich if ( write_exact(io_fd, &batch, sizeof(unsigned int)) ) { PERROR("Error when writing to state file (2)"); ---- a/xen/arch/x86/domctl.c -+++ b/xen/arch/x86/domctl.c -@@ -207,11 +207,12 @@ long arch_do_domctl( +Index: xen-4.0.1-testing/xen/arch/x86/domctl.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/domctl.c ++++ xen-4.0.1-testing/xen/arch/x86/domctl.c +@@ -206,11 +206,12 @@ long arch_do_domctl( for ( j = 0; j < k; j++ ) { @@ -139,7 +143,7 @@ Signed-off-by: Jan Beulich type = XEN_DOMCTL_PFINFO_XTAB; else if ( xsm_getpageframeinfo(page) != 0 ) ; -@@ -306,14 +307,15 @@ long arch_do_domctl( +@@ -305,14 +306,15 @@ long arch_do_domctl( for ( j = 0; j < k; j++ ) { struct page_info *page; diff --git a/21620-x86-signed-domain-irq.patch b/21620-x86-signed-domain-irq.patch deleted file mode 100644 index ee3d1bf..0000000 --- a/21620-x86-signed-domain-irq.patch +++ /dev/null @@ -1,34 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1276604463 -3600 -# Node ID b0f7f710f512aba0fca814467e4f5fe7b906ada3 -# Parent 972b7e305138759d4ef42b75d5fe5c6fd2d2e30c -x86: return value of domain_pirq_to_irq() is signed - -That value can, for forcibly unbound PIRQs, validly be negative, and -for the respective check to catch those cases (and prevent using these -negative values as array index), the respective variables must be of -signed type. - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -879,7 +879,7 @@ static void __do_IRQ_guest(int irq) - struct irq_desc *domain_spin_lock_irq_desc( - struct domain *d, int pirq, unsigned long *pflags) - { -- unsigned int irq; -+ int irq; - unsigned long flags; - struct irq_desc *desc; - -@@ -1046,7 +1046,7 @@ extern int ioapic_ack_new; - static int pirq_acktype(struct domain *d, int pirq) - { - struct irq_desc *desc; -- unsigned int irq; -+ int irq; - - irq = domain_pirq_to_irq(d, pirq); - if ( irq <= 0 ) diff --git a/21627-cpuidle-wrap.patch b/21627-cpuidle-wrap.patch index 18da1d3..004a9ea 100644 --- a/21627-cpuidle-wrap.patch +++ b/21627-cpuidle-wrap.patch @@ -7,9 +7,11 @@ cpuidle: fix wrapped ticks calculation for pm timer. Signed-off-by: Wei Gang ---- a/xen/arch/x86/acpi/cpu_idle.c -+++ b/xen/arch/x86/acpi/cpu_idle.c -@@ -127,9 +127,9 @@ static inline u32 ticks_elapsed(u32 t1, +Index: xen-4.0.1-testing/xen/arch/x86/acpi/cpu_idle.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/acpi/cpu_idle.c ++++ xen-4.0.1-testing/xen/arch/x86/acpi/cpu_idle.c +@@ -127,9 +127,9 @@ static inline u32 ticks_elapsed(u32 t1, if ( t2 >= t1 ) return (t2 - t1); else if ( !(acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER) ) diff --git a/21643-vmx-vpmu-pmc-offset.patch b/21643-vmx-vpmu-pmc-offset.patch deleted file mode 100644 index be0eafb..0000000 --- a/21643-vmx-vpmu-pmc-offset.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277110750 -3600 -# Node ID 31708477f0a92be70a940d1c8ff1aa721051bba8 -# Parent 46a4c936b77e483971d2b3eb0b544c61700f824a -vmx: Fix bug in VMX VPMU fixed function PMC offset - -This is a minor fix to the calculation of bit-width of fixed function -perfmon counters in Intel processors. Bits 5-12 of edx register -should be calculated as (edx & 0x1fe0) >>5 instead of using 0x1f70. - -From: "John, Jaiber J" -Signed-off-by: Keir Fraser - ---- a/xen/arch/x86/hvm/vmx/vpmu_core2.c -+++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c -@@ -82,7 +82,7 @@ static int core2_get_bitwidth_fix_count( - { - u32 eax, ebx, ecx, edx; - cpuid(0xa, &eax, &ebx, &ecx, &edx); -- return ((edx & 0x1f70) >> 5); -+ return ((edx & 0x1fe0) >> 5); - } - - static int is_core2_vpmu_msr(u32 msr_index, int *type, int *index) diff --git a/21653-xend-mac-addr.patch b/21653-xend-mac-addr.patch index 293ffdb..a1b8b5f 100644 --- a/21653-xend-mac-addr.patch +++ b/21653-xend-mac-addr.patch @@ -16,10 +16,10 @@ validity before doing device_add, there will be no problem. Signed-off-by Chunyan Liu -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -847,11 +847,6 @@ class XendDomainInfo: @type dev_config: SXP object (parsed config) """ diff --git a/21678-xend-mac-fix.patch b/21678-xend-mac-fix.patch index 5ff0672..b452487 100644 --- a/21678-xend-mac-fix.patch +++ b/21678-xend-mac-fix.patch @@ -16,10 +16,10 @@ change manually as it had been mangled.) Signed-off-by: Ian Jackson Signed-off-by Chunyan Liu -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -847,6 +847,8 @@ class XendDomainInfo: @type dev_config: SXP object (parsed config) """ diff --git a/21682-trace-buffer-range.patch b/21682-trace-buffer-range.patch deleted file mode 100644 index 7ba7645..0000000 --- a/21682-trace-buffer-range.patch +++ /dev/null @@ -1,26 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277738876 -3600 -# Node ID 7e46fdbe8a1187cee2ab609256300d7967f37f06 -# Parent bf64e1081333696c68c9430cbc32c8bd6ee18796 -xentrace: restrict trace buffer MFNs - -Since they're being passed to Dom0 using an array of uint32_t, they -must be representable as 32-bit quantities, and hence the buffer -allocation must specify an upper address boundary. - -Signed-off-by: Jan Beulich -Acked-by: George Dunlap - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -152,7 +152,8 @@ static int alloc_trace_bufs(void) - char *rawbuf; - struct t_buf *buf; - -- if ( (rawbuf = alloc_xenheap_pages(order, 0)) == NULL ) -+ if ( (rawbuf = alloc_xenheap_pages( -+ order, MEMF_bits(32 + PAGE_SHIFT))) == NULL ) - { - printk("Xen trace buffers: memory allocation failed\n"); - opt_tbuf_size = 0; diff --git a/21683-vtd-kill-timer-conditional.patch b/21683-vtd-kill-timer-conditional.patch index 94b6b9e..77ee382 100644 --- a/21683-vtd-kill-timer-conditional.patch +++ b/21683-vtd-kill-timer-conditional.patch @@ -7,8 +7,10 @@ vtd: Only kill_timer() an init_timer()'ed timer. Signed-off-by: Keir Fraser ---- a/xen/drivers/passthrough/io.c -+++ b/xen/drivers/passthrough/io.c +Index: xen-4.0.1-testing/xen/drivers/passthrough/io.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/io.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/io.c @@ -27,7 +27,7 @@ static void hvm_dirq_assist(unsigned long _d); @@ -18,8 +20,10 @@ Signed-off-by: Keir Fraser { return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE)); } ---- a/xen/drivers/passthrough/pci.c -+++ b/xen/drivers/passthrough/pci.c +Index: xen-4.0.1-testing/xen/drivers/passthrough/pci.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/drivers/passthrough/pci.c ++++ xen-4.0.1-testing/xen/drivers/passthrough/pci.c @@ -257,7 +257,9 @@ static void pci_clean_dpci_irqs(struct d i = find_next_bit(hvm_irq_dpci->mapping, d->nr_pirqs, i + 1) ) { @@ -31,9 +35,11 @@ Signed-off-by: Keir Fraser list_for_each_safe ( digl_list, tmp, &hvm_irq_dpci->mirq[i].digl_list ) ---- a/xen/include/xen/iommu.h -+++ b/xen/include/xen/iommu.h -@@ -92,6 +92,7 @@ void hvm_dpci_isairq_eoi(struct domain * +Index: xen-4.0.1-testing/xen/include/xen/iommu.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/iommu.h ++++ xen-4.0.1-testing/xen/include/xen/iommu.h +@@ -103,6 +103,7 @@ void hvm_dpci_isairq_eoi(struct domain * struct hvm_irq_dpci *domain_get_irq_dpci(struct domain *domain); int domain_set_irq_dpci(struct domain *domain, struct hvm_irq_dpci *dpci); void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci); diff --git a/21693-memevent-64bit-only.patch b/21693-memevent-64bit-only.patch deleted file mode 100644 index 5aca3aa..0000000 --- a/21693-memevent-64bit-only.patch +++ /dev/null @@ -1,286 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277831801 -3600 -# Node ID 6b5a5bfaf3577a050c6779b0b62245560fda53f6 -# Parent 3ea84fd20b263a8e443e3bb16d5495cd3dbd8033 -x86: Only build memory-event features on 64-bit Xen - -32-bit Xen doesn't have enough p2m types to support them. - -Signed-off-by: Tim Deegan - -# HG changeset patch -# User Keir Fraser -# Date 1278579370 -3600 -# Node ID a7a680442b738928eb963b31e22a3e428ac111a0 -# Parent 92ac9536ac5abc17f414f024f3df92658cf2ee96 -xend: Continue domain building even if memshr extensions are not -present in the hypervisor. - -Signed-off-by: Keir Fraser - -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py -@@ -830,8 +830,10 @@ class HVMImageHandler(ImageHandler): - self.acpi = int(vmConfig['platform'].get('acpi', 0)) - self.guest_os_type = vmConfig['platform'].get('guest_os_type') - self.memory_sharing = int(vmConfig['memory_sharing']) -- xc.dom_set_memshr(self.vm.getDomid(), self.memory_sharing) -- -+ try: -+ xc.dom_set_memshr(self.vm.getDomid(), self.memory_sharing) -+ except: -+ pass - - # Return a list of cmd line args to the device models based on the - # xm config file -Index: xen-4.0.0-testing/xen/arch/x86/domctl.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/domctl.c -+++ xen-4.0.0-testing/xen/arch/x86/domctl.c -@@ -1420,6 +1420,7 @@ long arch_do_domctl( - break; - #endif /* XEN_GDBSX_CONFIG */ - -+#ifdef __x86_64__ - case XEN_DOMCTL_mem_event_op: - { - struct domain *d; -@@ -1450,6 +1451,7 @@ long arch_do_domctl( - } - } - break; -+#endif /* __x86_64__ */ - - default: - ret = -ENOSYS; -Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c -@@ -922,6 +922,7 @@ bool_t hvm_hap_nested_page_fault(unsigne - return 1; - } - -+#ifdef __x86_64__ - /* Check if the page has been paged out */ - if ( p2m_is_paged(p2mt) || (p2mt == p2m_ram_paging_out) ) - p2m_mem_paging_populate(current->domain, gfn); -@@ -932,6 +933,7 @@ bool_t hvm_hap_nested_page_fault(unsigne - mem_sharing_unshare_page(current->domain, gfn, 0); - return 1; - } -+#endif - - /* Spurious fault? PoD and log-dirty also take this path. */ - if ( p2m_is_ram(p2mt) ) -Index: xen-4.0.0-testing/xen/arch/x86/mm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/mm.c -@@ -3179,20 +3179,23 @@ int do_mmu_update( - rc = -ENOENT; - break; - } -+#ifdef __x86_64__ - /* XXX: Ugly: pull all the checks into a separate function. - * Don't want to do it now, not to interfere with mem_paging - * patches */ - else if ( p2m_ram_shared == l1e_p2mt ) - { - /* Unshare the page for RW foreign mappings */ -- if(l1e_get_flags(l1e) & _PAGE_RW) -+ if ( l1e_get_flags(l1e) & _PAGE_RW ) - { - rc = mem_sharing_unshare_page(pg_owner, - l1e_get_pfn(l1e), - 0); -- if(rc) break; -+ if ( rc ) -+ break; - } - } -+#endif - - okay = mod_l1_entry(va, l1e, mfn, - cmd == MMU_PT_UPDATE_PRESERVE_AD, v, -@@ -4537,8 +4540,10 @@ long arch_memory_op(int op, XEN_GUEST_HA - return rc; - } - -+#ifdef __x86_64__ - case XENMEM_get_sharing_freed_pages: - return mem_sharing_get_nr_saved_mfns(); -+#endif - - default: - return subarch_memory_op(op, arg); -Index: xen-4.0.0-testing/xen/arch/x86/mm/Makefile -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm/Makefile -+++ xen-4.0.0-testing/xen/arch/x86/mm/Makefile -@@ -6,9 +6,9 @@ obj-y += p2m.o - obj-y += guest_walk_2.o - obj-y += guest_walk_3.o - obj-$(x86_64) += guest_walk_4.o --obj-y += mem_event.o --obj-y += mem_paging.o --obj-y += mem_sharing.o -+obj-$(x86_64) += mem_event.o -+obj-$(x86_64) += mem_paging.o -+obj-$(x86_64) += mem_sharing.o - - guest_walk_%.o: guest_walk.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ -Index: xen-4.0.0-testing/xen/arch/x86/mm/p2m.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm/p2m.c -+++ xen-4.0.0-testing/xen/arch/x86/mm/p2m.c -@@ -1708,17 +1708,23 @@ void p2m_teardown(struct domain *d) - { - struct page_info *pg; - struct p2m_domain *p2m = d->arch.p2m; -+#ifdef __x86_64__ - unsigned long gfn; - p2m_type_t t; - mfn_t mfn; -+#endif - - p2m_lock(p2m); -- for(gfn=0; gfn < p2m->max_mapped_pfn; gfn++) -+ -+#ifdef __x86_64__ -+ for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) - { - mfn = p2m->get_entry(d, gfn, &t, p2m_query); -- if(mfn_valid(mfn) && (t == p2m_ram_shared)) -+ if ( mfn_valid(mfn) && (t == p2m_ram_shared) ) - BUG_ON(mem_sharing_unshare_page(d, gfn, MEM_SHARING_DESTROY_GFN)); - } -+#endif -+ - d->arch.phys_table = pagetable_null(); - - while ( (pg = page_list_remove_head(&p2m->pages)) ) -@@ -2410,6 +2416,7 @@ clear_mmio_p2m_entry(struct domain *d, u - return rc; - } - -+#ifdef __x86_64__ - int - set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn) - { -@@ -2592,7 +2599,7 @@ void p2m_mem_paging_resume(struct domain - /* Unpause any domains that were paused because the ring was full */ - mem_event_unpause_vcpus(d); - } -- -+#endif /* __x86_64__ */ - - /* - * Local variables: -Index: xen-4.0.0-testing/xen/include/asm-x86/mem_sharing.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/mem_sharing.h -+++ xen-4.0.0-testing/xen/include/asm-x86/mem_sharing.h -@@ -22,6 +22,8 @@ - #ifndef __MEM_SHARING_H__ - #define __MEM_SHARING_H__ - -+#ifdef __x86_64__ -+ - #define sharing_supported(_d) \ - (is_hvm_domain(_d) && (_d)->arch.hvm_domain.hap_enabled) - -@@ -43,4 +45,10 @@ int mem_sharing_domctl(struct domain *d, - xen_domctl_mem_sharing_op_t *mec); - void mem_sharing_init(void); - -+#else -+ -+#define mem_sharing_init() do { } while (0) -+ -+#endif /* __x86_64__ */ -+ - #endif /* __MEM_SHARING_H__ */ -Index: xen-4.0.0-testing/xen/include/asm-x86/p2m.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/p2m.h -+++ xen-4.0.0-testing/xen/include/asm-x86/p2m.h -@@ -77,11 +77,12 @@ typedef enum { - p2m_grant_map_rw = 7, /* Read/write grant mapping */ - p2m_grant_map_ro = 8, /* Read-only grant mapping */ - -+ /* Likewise, although these are defined in all builds, they can only -+ * be used in 64-bit builds */ - p2m_ram_paging_out = 9, /* Memory that is being paged out */ - p2m_ram_paged = 10, /* Memory that has been paged out */ - p2m_ram_paging_in = 11, /* Memory that is being paged in */ - p2m_ram_paging_in_start = 12, /* Memory that is being paged in */ -- - p2m_ram_shared = 13, /* Shared or sharable memory */ - } p2m_type_t; - -@@ -154,6 +155,7 @@ typedef enum { - #define p2m_is_sharable(_t) (p2m_to_mask(_t) & P2M_SHARABLE_TYPES) - #define p2m_is_shared(_t) (p2m_to_mask(_t) & P2M_SHARED_TYPES) - -+ - /* Populate-on-demand */ - #define POPULATE_ON_DEMAND_MFN (1<<9) - #define POD_PAGE_ORDER 9 -@@ -314,20 +316,21 @@ static inline mfn_t gfn_to_mfn_unshare(s - int must_succeed) - { - mfn_t mfn; -- int ret; - - mfn = gfn_to_mfn(d, gfn, p2mt); -- if(p2m_is_shared(*p2mt)) -+#ifdef __x86_64__ -+ if ( p2m_is_shared(*p2mt) ) - { -- ret = mem_sharing_unshare_page(d, gfn, -- must_succeed ? MEM_SHARING_MUST_SUCCEED : 0); -- if(ret < 0) -+ if ( mem_sharing_unshare_page(d, gfn, -+ must_succeed -+ ? MEM_SHARING_MUST_SUCCEED : 0) ) - { - BUG_ON(must_succeed); - return mfn; - } - mfn = gfn_to_mfn(d, gfn, p2mt); - } -+#endif - - return mfn; - } -@@ -429,10 +432,11 @@ p2m_type_t p2m_change_type(struct domain - /* Set mmio addresses in the p2m table (for pass-through) */ - int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); - int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn); --/* Modify p2m table for shared gfn */ --int --set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); - -+ -+#ifdef __x86_64__ -+/* Modify p2m table for shared gfn */ -+int set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn); - /* Check if a nominated gfn is valid to be paged out */ - int p2m_mem_paging_nominate(struct domain *d, unsigned long gfn); - /* Evict a frame */ -@@ -443,6 +447,10 @@ void p2m_mem_paging_populate(struct doma - int p2m_mem_paging_prep(struct domain *d, unsigned long gfn); - /* Resume normal operation (in case a domain was paused) */ - void p2m_mem_paging_resume(struct domain *d); -+#else -+static inline void p2m_mem_paging_populate(struct domain *d, unsigned long gfn) -+{ } -+#endif - - #endif /* _XEN_P2M_H */ - diff --git a/21695-trace-t_info-readonly.patch b/21695-trace-t_info-readonly.patch deleted file mode 100644 index 71957ce..0000000 --- a/21695-trace-t_info-readonly.patch +++ /dev/null @@ -1,90 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277831922 -3600 -# Node ID c5f3fe17374cead91fdaa94f60cf7b3115eaa091 -# Parent 2a3a5979e3f16d77f5b526050c45acba186482b0 -trace: share t_info pages only in read-only mode - -There's no need to share writably the t_info pages (Dom0 only wants -[and needs] to read it) - -Signed-off-by: Jan Beulich -Acked-by: George Dunlap - ---- a/tools/xenmon/xenbaked.c -+++ b/tools/xenmon/xenbaked.c -@@ -84,7 +84,7 @@ typedef struct settings_st { - } settings_t; - - struct t_struct { -- struct t_info *t_info; /* Structure with information about individual buffers */ -+ const struct t_info *t_info; /* Structure with information about individual buffers */ - struct t_buf **meta; /* Pointers to trace buffer metadata */ - unsigned char **data; /* Pointers to trace buffer data areas */ - }; -@@ -376,9 +376,8 @@ static struct t_struct *map_tbufs(unsign - } - - /* Map t_info metadata structure */ -- tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, -- tinfo_size, PROT_READ | PROT_WRITE, -- tbufs_mfn); -+ tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, tinfo_size, -+ PROT_READ, tbufs_mfn); - - if ( tbufs.t_info == 0 ) - { -@@ -404,7 +403,8 @@ static struct t_struct *map_tbufs(unsign - for(i=0; imfn_offset[i]; -+ const uint32_t *mfn_list = (const uint32_t *)tbufs.t_info -+ + tbufs.t_info->mfn_offset[i]; - int j; - xen_pfn_t pfn_list[tbufs.t_info->tbuf_size]; - ---- a/tools/xentrace/xentrace.c -+++ b/tools/xentrace/xentrace.c -@@ -62,7 +62,7 @@ typedef struct settings_st { - } settings_t; - - struct t_struct { -- struct t_info *t_info; /* Structure with information about individual buffers */ -+ const struct t_info *t_info; /* Structure with information about individual buffers */ - struct t_buf **meta; /* Pointers to trace buffer metadata */ - unsigned char **data; /* Pointers to trace buffer data areas */ - }; -@@ -459,9 +459,8 @@ static struct t_struct *map_tbufs(unsign - int i; - - /* Map t_info metadata structure */ -- tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, -- tinfo_size, PROT_READ | PROT_WRITE, -- tbufs_mfn); -+ tbufs.t_info = xc_map_foreign_range(xc_handle, DOMID_XEN, tinfo_size, -+ PROT_READ, tbufs_mfn); - - if ( tbufs.t_info == 0 ) - { -@@ -487,7 +486,8 @@ static struct t_struct *map_tbufs(unsign - for(i=0; imfn_offset[i]; -+ const uint32_t *mfn_list = (const uint32_t *)tbufs.t_info -+ + tbufs.t_info->mfn_offset[i]; - int j; - xen_pfn_t pfn_list[tbufs.t_info->tbuf_size]; - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -322,7 +322,7 @@ void __init init_trace_bufs(void) - - for(i=0; i -# Date 1277917869 -3600 -# Node ID 81d6471ff1235fde2c30428b920cb6e00ba546d6 -# Parent a9caa0f2d693a1d0d008b4295e49da3ea1d70334 -x86: fix an off-by-one pirq range check - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/irq.c -+++ b/xen/arch/x86/irq.c -@@ -1019,7 +1019,7 @@ static void __pirq_guest_eoi(struct doma - - int pirq_guest_eoi(struct domain *d, int irq) - { -- if ( (irq < 0) || (irq > d->nr_pirqs) ) -+ if ( (irq < 0) || (irq >= d->nr_pirqs) ) - return -EINVAL; - - __pirq_guest_eoi(d, irq); diff --git a/21699-p2m-query-for-type-change.patch b/21699-p2m-query-for-type-change.patch deleted file mode 100644 index b3152cf..0000000 --- a/21699-p2m-query-for-type-change.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277917902 -3600 -# Node ID 7cda3ad44c6d4e799e65b2ffe21e609f50cdb94b -# Parent 81d6471ff1235fde2c30428b920cb6e00ba546d6 -Use gfn_to_mfn_query() rather then gfn_to_mfn() when changing P2M types - -Use gfn_to_mfn_query() rather then gfn_to_mfn() when changing -P2M types since we do not really want to force a PoD allocation -as a side effect. - -Signed-off-by: Paul Durrant - ---- a/xen/arch/x86/mm/p2m.c -+++ b/xen/arch/x86/mm/p2m.c -@@ -2351,7 +2351,7 @@ p2m_type_t p2m_change_type(struct domain - - p2m_lock(d->arch.p2m); - -- mfn = gfn_to_mfn(d, gfn, &pt); -+ mfn = gfn_to_mfn_query(d, gfn, &pt); - if ( pt == ot ) - set_p2m_entry(d, gfn, mfn, 0, nt); - diff --git a/21700-32on64-vm86-gpf.patch b/21700-32on64-vm86-gpf.patch deleted file mode 100644 index 241c450..0000000 --- a/21700-32on64-vm86-gpf.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1277917963 -3600 -# Node ID fae04060a4f4e364c5012692b97ae1eeec3a326e -# Parent 7cda3ad44c6d4e799e65b2ffe21e609f50cdb94b -Fix #GPF injection into compat guests in vm86 code - -not to let the guest disable interrupts in the real EFLAGS. - -Signed-off-by: Ian Campbell - ---- a/xen/arch/x86/x86_64/compat/traps.c -+++ b/xen/arch/x86/x86_64/compat/traps.c -@@ -127,9 +127,8 @@ unsigned int compat_iret(void) - ti = &v->arch.guest_context.trap_ctxt[13]; - if ( TI_GET_IF(ti) ) - eflags &= ~X86_EFLAGS_IF; -- regs->_eflags = eflags & ~(X86_EFLAGS_VM|X86_EFLAGS_RF| -- X86_EFLAGS_NT|X86_EFLAGS_TF); -- -+ regs->_eflags &= ~(X86_EFLAGS_VM|X86_EFLAGS_RF| -+ X86_EFLAGS_NT|X86_EFLAGS_TF); - if ( unlikely(__put_user(0, (u32 *)regs->rsp)) ) - goto exit_and_crash; - regs->_eip = ti->address; diff --git a/21705-trace-printk.patch b/21705-trace-printk.patch deleted file mode 100644 index 515640e..0000000 --- a/21705-trace-printk.patch +++ /dev/null @@ -1,51 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278093217 -3600 -# Node ID 19f4d637a52b8723ac1fbcf666c146951bee8e57 -# Parent 1390e2ab45c7b63d79ba9496d609cf59af4b44ee -trace: adjust printk()s - -They should be lower level or rate limited. - -Signed-off-by: Jan Beulich -Acked-by: George Dunlap - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -137,7 +137,7 @@ static int alloc_trace_bufs(void) - } - - t_info->tbuf_size = opt_tbuf_size; -- printk("tbuf_size %d\n", t_info->tbuf_size); -+ printk(XENLOG_INFO "tbuf_size %d\n", t_info->tbuf_size); - - nr_pages = opt_tbuf_size; - order = get_order_from_pages(nr_pages); -@@ -194,7 +194,7 @@ static int alloc_trace_bufs(void) - /* Write list first, then write per-cpu offset. */ - wmb(); - t_info->mfn_offset[cpu]=offset; -- printk("p%d mfn %"PRIx32" offset %d\n", -+ printk(XENLOG_INFO "p%d mfn %"PRIx32" offset %d\n", - cpu, mfn, offset); - offset+=i; - } -@@ -489,12 +489,13 @@ static inline int __insert_record(struct - /* Double-check once more that we have enough space. - * Don't bugcheck here, in case the userland tool is doing - * something stupid. */ -- if ( calc_bytes_avail(buf) < rec_size ) -+ next = calc_bytes_avail(buf); -+ if ( next < rec_size ) - { -- printk("%s: %u bytes left (%u - ((%u - %u) %% %u) recsize %u.\n", -- __func__, -- calc_bytes_avail(buf), -- data_size, buf->prod, buf->cons, data_size, rec_size); -+ if ( printk_ratelimit() ) -+ printk(XENLOG_WARNING -+ "%s: avail=%u (size=%08x prod=%08x cons=%08x) rec=%u\n", -+ __func__, next, data_size, buf->prod, buf->cons, rec_size); - return 0; - } - rmb(); diff --git a/21706-trace-security.patch b/21706-trace-security.patch deleted file mode 100644 index 588ed0c..0000000 --- a/21706-trace-security.patch +++ /dev/null @@ -1,396 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278093394 -3600 -# Node ID ae68758f8862bc43ab6bbe4ad3a8594c28b9bc39 -# Parent 19f4d637a52b8723ac1fbcf666c146951bee8e57 -trace: fix security issues - -After getting a report of 3.2.3's xenmon crashing Xen (as it turned -out this was because c/s 17000 was backported to that tree without -also applying c/s 17515), I figured that the hypervisor shouldn't rely -on any specific state of the actual trace buffer (as it is shared -writable with Dom0) - -[GWD: Volatile quantifiers have been taken out and moved to another -patch] - -To make clear what purpose specific variables have and/or where they -got loaded from, the patch also changes the type of some of them to be -explicitly u32/s32, and removes pointless assertions (like checking an -unsigned variable to be >= 0). - -I also took the prototype adjustment of __trace_var() as an -opportunity to simplify the TRACE_xD() macros. Similar simplification -could be done on the (quite numerous) direct callers of the function. - -Signed-off-by: Jan Beulich -Signed-off-by: George Dunlap - -# HG changeset patch -# User Keir Fraser -# Date 1278314658 -3600 -# Node ID 9074d50d09358cd8349d54c7ab2e2ead81fa1570 -# Parent f483b5ce7be235494156fee164decd73e0472cb7 -trace: insert compiler memory barriers - -This is to ensure fields shared writably with Dom0 get read only once -for any consistency checking followed by actual calculations. - -I realized there was another multiple-read issue, a fix for which is -also included (which at once simplifies __insert_record()). - -Signed-off-by: Jan Beulich - ---- a/xen/common/trace.c -+++ b/xen/common/trace.c -@@ -52,12 +52,12 @@ static struct t_info *t_info; - static DEFINE_PER_CPU_READ_MOSTLY(struct t_buf *, t_bufs); - static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, t_data); - static DEFINE_PER_CPU_READ_MOSTLY(spinlock_t, t_lock); --static int data_size; -+static u32 data_size; - static u32 t_info_first_offset __read_mostly; - - /* High water mark for trace buffers; */ - /* Send virtual interrupt when buffer level reaches this point */ --static int t_buf_highwater; -+static u32 t_buf_highwater; - - /* Number of records lost due to per-CPU trace buffer being full. */ - static DEFINE_PER_CPU(unsigned long, lost_records); -@@ -162,7 +162,7 @@ static int alloc_trace_bufs(void) - - spin_lock_irqsave(&per_cpu(t_lock, cpu), flags); - -- buf = per_cpu(t_bufs, cpu) = (struct t_buf *)rawbuf; -+ per_cpu(t_bufs, cpu) = buf = (struct t_buf *)rawbuf; - buf->cons = buf->prod = 0; - per_cpu(t_data, cpu) = (unsigned char *)(buf + 1); - -@@ -213,6 +213,7 @@ out_dealloc: - spin_lock_irqsave(&per_cpu(t_lock, cpu), flags); - if ( (rawbuf = (char *)per_cpu(t_bufs, cpu)) ) - { -+ per_cpu(t_bufs, cpu) = NULL; - ASSERT(!(virt_to_page(rawbuf)->count_info & PGC_allocated)); - free_xenheap_pages(rawbuf, order); - } -@@ -418,19 +419,39 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc - return rc; - } - --static inline int calc_rec_size(int cycles, int extra) -+static inline unsigned int calc_rec_size(bool_t cycles, unsigned int extra) - { -- int rec_size; -- rec_size = 4; -+ unsigned int rec_size = 4; -+ - if ( cycles ) - rec_size += 8; - rec_size += extra; - return rec_size; - } - --static inline int calc_unconsumed_bytes(struct t_buf *buf) -+static inline bool_t bogus(u32 prod, u32 cons) - { -- int x = buf->prod - buf->cons; -+ if ( unlikely(prod & 3) || unlikely(prod >= 2 * data_size) || -+ unlikely(cons & 3) || unlikely(cons >= 2 * data_size) ) -+ { -+ tb_init_done = 0; -+ printk(XENLOG_WARNING "trc#%u: bogus prod (%08x) and/or cons (%08x)\n", -+ smp_processor_id(), prod, cons); -+ return 1; -+ } -+ return 0; -+} -+ -+static inline u32 calc_unconsumed_bytes(const struct t_buf *buf) -+{ -+ u32 prod = buf->prod, cons = buf->cons; -+ s32 x; -+ -+ barrier(); /* must read buf->prod and buf->cons only once */ -+ if ( bogus(prod, cons) ) -+ return data_size; -+ -+ x = prod - cons; - if ( x < 0 ) - x += 2*data_size; - -@@ -440,9 +461,16 @@ static inline int calc_unconsumed_bytes( - return x; - } - --static inline int calc_bytes_to_wrap(struct t_buf *buf) -+static inline u32 calc_bytes_to_wrap(const struct t_buf *buf) - { -- int x = data_size - buf->prod; -+ u32 prod = buf->prod, cons = buf->cons; -+ s32 x; -+ -+ barrier(); /* must read buf->prod and buf->cons only once */ -+ if ( bogus(prod, cons) ) -+ return 0; -+ -+ x = data_size - prod; - if ( x <= 0 ) - x += data_size; - -@@ -452,55 +480,60 @@ static inline int calc_bytes_to_wrap(str - return x; - } - --static inline int calc_bytes_avail(struct t_buf *buf) -+static inline u32 calc_bytes_avail(const struct t_buf *buf) - { - return data_size - calc_unconsumed_bytes(buf); - } - --static inline struct t_rec * --next_record(struct t_buf *buf) -+static inline struct t_rec *next_record(const struct t_buf *buf, -+ uint32_t *next) - { -- int x = buf->prod; -+ u32 x = buf->prod, cons = buf->cons; -+ -+ barrier(); /* must read buf->prod and buf->cons only once */ -+ *next = x; -+ if ( !tb_init_done || bogus(x, cons) ) -+ return NULL; -+ - if ( x >= data_size ) - x -= data_size; - -- ASSERT(x >= 0); - ASSERT(x < data_size); - - return (struct t_rec *)&this_cpu(t_data)[x]; - } - --static inline int __insert_record(struct t_buf *buf, -- unsigned long event, -- int extra, -- int cycles, -- int rec_size, -- unsigned char *extra_data) -+static inline void __insert_record(struct t_buf *buf, -+ unsigned long event, -+ unsigned int extra, -+ bool_t cycles, -+ unsigned int rec_size, -+ const void *extra_data) - { - struct t_rec *rec; - unsigned char *dst; -- unsigned long extra_word = extra/sizeof(u32); -- int local_rec_size = calc_rec_size(cycles, extra); -+ unsigned int extra_word = extra / sizeof(u32); -+ unsigned int local_rec_size = calc_rec_size(cycles, extra); - uint32_t next; - - BUG_ON(local_rec_size != rec_size); - BUG_ON(extra & 3); - -+ rec = next_record(buf, &next); -+ if ( !rec ) -+ return; - /* Double-check once more that we have enough space. - * Don't bugcheck here, in case the userland tool is doing - * something stupid. */ -- next = calc_bytes_avail(buf); -- if ( next < rec_size ) -+ if ( (unsigned char *)rec + rec_size > this_cpu(t_data) + data_size ) - { - if ( printk_ratelimit() ) - printk(XENLOG_WARNING -- "%s: avail=%u (size=%08x prod=%08x cons=%08x) rec=%u\n", -- __func__, next, data_size, buf->prod, buf->cons, rec_size); -- return 0; -+ "%s: size=%08x prod=%08x cons=%08x rec=%u\n", -+ __func__, data_size, next, buf->cons, rec_size); -+ return; - } -- rmb(); - -- rec = next_record(buf); - rec->event = event; - rec->extra_u32 = extra_word; - dst = (unsigned char *)rec->u.nocycles.extra_u32; -@@ -517,21 +550,19 @@ static inline int __insert_record(struct - - wmb(); - -- next = buf->prod + rec_size; -+ next += rec_size; - if ( next >= 2*data_size ) - next -= 2*data_size; -- ASSERT(next >= 0); - ASSERT(next < 2*data_size); - buf->prod = next; -- -- return rec_size; - } - --static inline int insert_wrap_record(struct t_buf *buf, int size) -+static inline void insert_wrap_record(struct t_buf *buf, -+ unsigned int size) - { -- int space_left = calc_bytes_to_wrap(buf); -- unsigned long extra_space = space_left - sizeof(u32); -- int cycles = 0; -+ u32 space_left = calc_bytes_to_wrap(buf); -+ unsigned int extra_space = space_left - sizeof(u32); -+ bool_t cycles = 0; - - BUG_ON(space_left > size); - -@@ -543,17 +574,13 @@ static inline int insert_wrap_record(str - ASSERT((extra_space/sizeof(u32)) <= TRACE_EXTRA_MAX); - } - -- return __insert_record(buf, -- TRC_TRACE_WRAP_BUFFER, -- extra_space, -- cycles, -- space_left, -- NULL); -+ __insert_record(buf, TRC_TRACE_WRAP_BUFFER, extra_space, cycles, -+ space_left, NULL); - } - - #define LOST_REC_SIZE (4 + 8 + 16) /* header + tsc + sizeof(struct ed) */ - --static inline int insert_lost_records(struct t_buf *buf) -+static inline void insert_lost_records(struct t_buf *buf) - { - struct { - u32 lost_records; -@@ -568,12 +595,8 @@ static inline int insert_lost_records(st - - this_cpu(lost_records) = 0; - -- return __insert_record(buf, -- TRC_LOST_RECORDS, -- sizeof(ed), -- 1 /* cycles */, -- LOST_REC_SIZE, -- (unsigned char *)&ed); -+ __insert_record(buf, TRC_LOST_RECORDS, sizeof(ed), 1 /* cycles */, -+ LOST_REC_SIZE, &ed); - } - - /* -@@ -595,13 +618,15 @@ static DECLARE_TASKLET(trace_notify_dom0 - * failure, otherwise 0. Failure occurs only if the trace buffers are not yet - * initialised. - */ --void __trace_var(u32 event, int cycles, int extra, unsigned char *extra_data) -+void __trace_var(u32 event, bool_t cycles, unsigned int extra, -+ const void *extra_data) - { - struct t_buf *buf; -- unsigned long flags, bytes_to_tail, bytes_to_wrap; -- int rec_size, total_size; -- int extra_word; -- int started_below_highwater = 0; -+ unsigned long flags; -+ u32 bytes_to_tail, bytes_to_wrap; -+ unsigned int rec_size, total_size; -+ unsigned int extra_word; -+ bool_t started_below_highwater; - - if( !tb_init_done ) - return; -@@ -640,7 +665,11 @@ void __trace_var(u32 event, int cycles, - buf = this_cpu(t_bufs); - - if ( unlikely(!buf) ) -+ { -+ /* Make gcc happy */ -+ started_below_highwater = 0; - goto unlock; -+ } - - started_below_highwater = (calc_unconsumed_bytes(buf) < t_buf_highwater); - -@@ -721,8 +750,9 @@ unlock: - spin_unlock_irqrestore(&this_cpu(t_lock), flags); - - /* Notify trace buffer consumer that we've crossed the high water mark. */ -- if ( started_below_highwater && -- (calc_unconsumed_bytes(buf) >= t_buf_highwater) ) -+ if ( likely(buf!=NULL) -+ && started_below_highwater -+ && (calc_unconsumed_bytes(buf) >= t_buf_highwater) ) - tasklet_schedule(&trace_notify_dom0_tasklet); - } - ---- a/xen/include/xen/trace.h -+++ b/xen/include/xen/trace.h -@@ -36,7 +36,7 @@ int tb_control(struct xen_sysctl_tbuf_op - - int trace_will_trace_event(u32 event); - --void __trace_var(u32 event, int cycles, int extra, unsigned char *extra_data); -+void __trace_var(u32 event, bool_t cycles, unsigned int extra, const void *); - - static inline void trace_var(u32 event, int cycles, int extra, - unsigned char *extra_data) -@@ -57,7 +57,7 @@ static inline void trace_var(u32 event, - { \ - u32 _d[1]; \ - _d[0] = d1; \ -- __trace_var(_e, 1, sizeof(*_d), (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -68,7 +68,7 @@ static inline void trace_var(u32 event, - u32 _d[2]; \ - _d[0] = d1; \ - _d[1] = d2; \ -- __trace_var(_e, 1, sizeof(*_d)*2, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -80,7 +80,7 @@ static inline void trace_var(u32 event, - _d[0] = d1; \ - _d[1] = d2; \ - _d[2] = d3; \ -- __trace_var(_e, 1, sizeof(*_d)*3, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -93,7 +93,7 @@ static inline void trace_var(u32 event, - _d[1] = d2; \ - _d[2] = d3; \ - _d[3] = d4; \ -- __trace_var(_e, 1, sizeof(*_d)*4, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -107,7 +107,7 @@ static inline void trace_var(u32 event, - _d[2] = d3; \ - _d[3] = d4; \ - _d[4] = d5; \ -- __trace_var(_e, 1, sizeof(*_d)*5, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - -@@ -122,7 +122,7 @@ static inline void trace_var(u32 event, - _d[3] = d4; \ - _d[4] = d5; \ - _d[5] = d6; \ -- __trace_var(_e, 1, sizeof(*_d)*6, (unsigned char *)_d); \ -+ __trace_var(_e, 1, sizeof(_d), _d); \ - } \ - } while ( 0 ) - diff --git a/21712-amd-osvw.patch b/21712-amd-osvw.patch deleted file mode 100644 index 096424b..0000000 --- a/21712-amd-osvw.patch +++ /dev/null @@ -1,400 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278093897 -3600 -# Node ID f483b5ce7be235494156fee164decd73e0472cb7 -# Parent 4d091e6e04918ba3ef19cc45ae2fffaee4f18afe -AMD OSVW (OS Visible Workaround) for Xen - -This path enables AMD OSVW (OS Visible Workaround) feature for -Xen. New AMD errata will have a OSVW id assigned in the future. OS is -supposed to check OSVW status MSR to find out whether CPU has a -specific erratum. Legacy errata are also supported in this patch: -traditional family/model/stepping approach will be used if OSVW -feature isn't applicable. This patch is adapted from Hans Rosenfeld's -patch submitted to Linux kernel. - -Signed-off-by: Wei Huang -Signed-off-by: Hans Rosenfeld -Acked-by: Jan Beulich - -Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/cpu/amd.c -+++ xen-4.0.0-testing/xen/arch/x86/cpu/amd.c -@@ -7,11 +7,11 @@ - #include - #include - #include -+#include - #include - #include /* amd_init_cpu */ - - #include "cpu.h" --#include "amd.h" - - void start_svm(struct cpuinfo_x86 *c); - -@@ -157,6 +157,54 @@ static void __devinit set_cpuidmask(stru - } - - /* -+ * Check for the presence of an AMD erratum. Arguments are defined in amd.h -+ * for each known erratum. Return 1 if erratum is found. -+ */ -+int cpu_has_amd_erratum(const struct cpuinfo_x86 *cpu, int osvw, ...) -+{ -+ va_list ap; -+ u32 range; -+ u32 ms; -+ -+ if (cpu->x86_vendor != X86_VENDOR_AMD) -+ return 0; -+ -+ va_start(ap, osvw); -+ -+ if (osvw) { -+ u16 osvw_id = va_arg(ap, int); -+ -+ if (cpu_has(cpu, X86_FEATURE_OSVW)) { -+ u64 osvw_len; -+ rdmsrl(MSR_AMD_OSVW_ID_LENGTH, osvw_len); -+ -+ if (osvw_id < osvw_len) { -+ u64 osvw_bits; -+ rdmsrl(MSR_AMD_OSVW_STATUS + (osvw_id >> 6), -+ osvw_bits); -+ -+ va_end(ap); -+ return (osvw_bits >> (osvw_id & 0x3f)) & 0x01; -+ } -+ } -+ } -+ -+ /* OSVW unavailable or ID unknown, match family-model-stepping range */ -+ ms = (cpu->x86_model << 8) | cpu->x86_mask; -+ while ((range = va_arg(ap, int))) { -+ if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) && -+ (ms >= AMD_MODEL_RANGE_START(range)) && -+ (ms <= AMD_MODEL_RANGE_END(range))) { -+ va_end(ap); -+ return 1; -+ } -+ } -+ -+ va_end(ap); -+ return 0; -+} -+ -+/* - * amd_flush_filter={on,off}. Forcibly Enable or disable the TLB flush - * filter on AMD 64-bit processors. - */ -Index: xen-4.0.0-testing/xen/arch/x86/cpu/amd.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/cpu/amd.h -+++ /dev/null -@@ -1,103 +0,0 @@ --/* -- * amd.h - AMD processor specific definitions -- */ -- --#ifndef __AMD_H__ --#define __AMD_H__ -- --#include -- --/* CPUID masked for use by AMD-V Extended Migration */ -- --#define X86_FEATURE_BITPOS(_feature_) ((_feature_) % 32) --#define __bit(_x_) (1U << X86_FEATURE_BITPOS(_x_)) -- --/* Family 0Fh, Revision C */ --#define AMD_FEATURES_K8_REV_C_ECX 0 --#define AMD_FEATURES_K8_REV_C_EDX ( \ -- __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ -- __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ -- __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ -- __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ -- __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ -- __bit(X86_FEATURE_SEP) | __bit(X86_FEATURE_MTRR) | \ -- __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ -- __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ -- __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_CLFLSH)| \ -- __bit(X86_FEATURE_MMX) | __bit(X86_FEATURE_FXSR) | \ -- __bit(X86_FEATURE_XMM) | __bit(X86_FEATURE_XMM2)) --#define AMD_EXTFEATURES_K8_REV_C_ECX 0 --#define AMD_EXTFEATURES_K8_REV_C_EDX ( \ -- __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ -- __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ -- __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ -- __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ -- __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ -- __bit(X86_FEATURE_SYSCALL) | __bit(X86_FEATURE_MTRR) | \ -- __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ -- __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ -- __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_NX) | \ -- __bit(X86_FEATURE_MMXEXT) | __bit(X86_FEATURE_MMX) | \ -- __bit(X86_FEATURE_FXSR) | __bit(X86_FEATURE_LM) | \ -- __bit(X86_FEATURE_3DNOWEXT) | __bit(X86_FEATURE_3DNOW)) -- --/* Family 0Fh, Revision D */ --#define AMD_FEATURES_K8_REV_D_ECX AMD_FEATURES_K8_REV_C_ECX --#define AMD_FEATURES_K8_REV_D_EDX AMD_FEATURES_K8_REV_C_EDX --#define AMD_EXTFEATURES_K8_REV_D_ECX (AMD_EXTFEATURES_K8_REV_C_ECX |\ -- __bit(X86_FEATURE_LAHF_LM)) --#define AMD_EXTFEATURES_K8_REV_D_EDX (AMD_EXTFEATURES_K8_REV_C_EDX |\ -- __bit(X86_FEATURE_FFXSR)) -- --/* Family 0Fh, Revision E */ --#define AMD_FEATURES_K8_REV_E_ECX (AMD_FEATURES_K8_REV_D_ECX | \ -- __bit(X86_FEATURE_XMM3)) --#define AMD_FEATURES_K8_REV_E_EDX (AMD_FEATURES_K8_REV_D_EDX | \ -- __bit(X86_FEATURE_HT)) --#define AMD_EXTFEATURES_K8_REV_E_ECX (AMD_EXTFEATURES_K8_REV_D_ECX |\ -- __bit(X86_FEATURE_CMP_LEGACY)) --#define AMD_EXTFEATURES_K8_REV_E_EDX AMD_EXTFEATURES_K8_REV_D_EDX -- --/* Family 0Fh, Revision F */ --#define AMD_FEATURES_K8_REV_F_ECX (AMD_FEATURES_K8_REV_E_ECX | \ -- __bit(X86_FEATURE_CX16)) --#define AMD_FEATURES_K8_REV_F_EDX AMD_FEATURES_K8_REV_E_EDX --#define AMD_EXTFEATURES_K8_REV_F_ECX (AMD_EXTFEATURES_K8_REV_E_ECX |\ -- __bit(X86_FEATURE_SVME) | __bit(X86_FEATURE_EXTAPICSPACE) | \ -- __bit(X86_FEATURE_ALTMOVCR)) --#define AMD_EXTFEATURES_K8_REV_F_EDX (AMD_EXTFEATURES_K8_REV_E_EDX |\ -- __bit(X86_FEATURE_RDTSCP)) -- --/* Family 0Fh, Revision G */ --#define AMD_FEATURES_K8_REV_G_ECX AMD_FEATURES_K8_REV_F_ECX --#define AMD_FEATURES_K8_REV_G_EDX AMD_FEATURES_K8_REV_F_EDX --#define AMD_EXTFEATURES_K8_REV_G_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ -- __bit(X86_FEATURE_3DNOWPF)) --#define AMD_EXTFEATURES_K8_REV_G_EDX AMD_EXTFEATURES_K8_REV_F_EDX -- --/* Family 10h, Revision B */ --#define AMD_FEATURES_FAM10h_REV_B_ECX (AMD_FEATURES_K8_REV_F_ECX | \ -- __bit(X86_FEATURE_POPCNT) | __bit(X86_FEATURE_MWAIT)) --#define AMD_FEATURES_FAM10h_REV_B_EDX AMD_FEATURES_K8_REV_F_EDX --#define AMD_EXTFEATURES_FAM10h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ -- __bit(X86_FEATURE_ABM) | __bit(X86_FEATURE_SSE4A) | \ -- __bit(X86_FEATURE_MISALIGNSSE) | __bit(X86_FEATURE_OSVW) | \ -- __bit(X86_FEATURE_IBS)) --#define AMD_EXTFEATURES_FAM10h_REV_B_EDX (AMD_EXTFEATURES_K8_REV_F_EDX |\ -- __bit(X86_FEATURE_PAGE1GB)) -- --/* Family 10h, Revision C */ --#define AMD_FEATURES_FAM10h_REV_C_ECX AMD_FEATURES_FAM10h_REV_B_ECX --#define AMD_FEATURES_FAM10h_REV_C_EDX AMD_FEATURES_FAM10h_REV_B_EDX --#define AMD_EXTFEATURES_FAM10h_REV_C_ECX (AMD_EXTFEATURES_FAM10h_REV_B_ECX |\ -- __bit(X86_FEATURE_SKINIT) | __bit(X86_FEATURE_WDT)) --#define AMD_EXTFEATURES_FAM10h_REV_C_EDX AMD_EXTFEATURES_FAM10h_REV_B_EDX -- --/* Family 11h, Revision B */ --#define AMD_FEATURES_FAM11h_REV_B_ECX AMD_FEATURES_K8_REV_G_ECX --#define AMD_FEATURES_FAM11h_REV_B_EDX AMD_FEATURES_K8_REV_G_EDX --#define AMD_EXTFEATURES_FAM11h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_G_ECX |\ -- __bit(X86_FEATURE_SKINIT)) --#define AMD_EXTFEATURES_FAM11h_REV_B_EDX AMD_EXTFEATURES_K8_REV_G_EDX -- --#endif /* __AMD_H__ */ -Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/asid.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/asid.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/asid.c -@@ -21,14 +21,14 @@ - #include - #include - #include -+#include - - void svm_asid_init(struct cpuinfo_x86 *c) - { - int nasids = 0; - - /* Check for erratum #170, and leave ASIDs disabled if it's present. */ -- if ( (c->x86 == 0x10) || -- ((c->x86 == 0xf) && (c->x86_model >= 0x68) && (c->x86_mask >= 1)) ) -+ if ( !cpu_has_amd_erratum(c, AMD_ERRATUM_170) ) - nasids = cpuid_ebx(0x8000000A); - - hvm_asid_init(nasids); -Index: xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c -=================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/svm/svm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/svm/svm.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -828,8 +829,8 @@ static void svm_init_erratum_383(struct - { - uint64_t msr_content; - -- /* only family 10h is affected */ -- if ( c->x86 != 0x10 ) -+ /* check whether CPU is affected */ -+ if ( !cpu_has_amd_erratum(c, AMD_ERRATUM_383) ) - return; - - rdmsrl(MSR_AMD64_DC_CFG, msr_content); -Index: xen-4.0.0-testing/xen/include/asm-x86/amd.h -=================================================================== ---- /dev/null -+++ xen-4.0.0-testing/xen/include/asm-x86/amd.h -@@ -0,0 +1,137 @@ -+/* -+ * amd.h - AMD processor specific definitions -+ */ -+ -+#ifndef __AMD_H__ -+#define __AMD_H__ -+ -+#include -+ -+/* CPUID masked for use by AMD-V Extended Migration */ -+ -+#define X86_FEATURE_BITPOS(_feature_) ((_feature_) % 32) -+#define __bit(_x_) (1U << X86_FEATURE_BITPOS(_x_)) -+ -+/* Family 0Fh, Revision C */ -+#define AMD_FEATURES_K8_REV_C_ECX 0 -+#define AMD_FEATURES_K8_REV_C_EDX ( \ -+ __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ -+ __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ -+ __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ -+ __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ -+ __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ -+ __bit(X86_FEATURE_SEP) | __bit(X86_FEATURE_MTRR) | \ -+ __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ -+ __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ -+ __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_CLFLSH)| \ -+ __bit(X86_FEATURE_MMX) | __bit(X86_FEATURE_FXSR) | \ -+ __bit(X86_FEATURE_XMM) | __bit(X86_FEATURE_XMM2)) -+#define AMD_EXTFEATURES_K8_REV_C_ECX 0 -+#define AMD_EXTFEATURES_K8_REV_C_EDX ( \ -+ __bit(X86_FEATURE_FPU) | __bit(X86_FEATURE_VME) | \ -+ __bit(X86_FEATURE_DE) | __bit(X86_FEATURE_PSE) | \ -+ __bit(X86_FEATURE_TSC) | __bit(X86_FEATURE_MSR) | \ -+ __bit(X86_FEATURE_PAE) | __bit(X86_FEATURE_MCE) | \ -+ __bit(X86_FEATURE_CX8) | __bit(X86_FEATURE_APIC) | \ -+ __bit(X86_FEATURE_SYSCALL) | __bit(X86_FEATURE_MTRR) | \ -+ __bit(X86_FEATURE_PGE) | __bit(X86_FEATURE_MCA) | \ -+ __bit(X86_FEATURE_CMOV) | __bit(X86_FEATURE_PAT) | \ -+ __bit(X86_FEATURE_PSE36) | __bit(X86_FEATURE_NX) | \ -+ __bit(X86_FEATURE_MMXEXT) | __bit(X86_FEATURE_MMX) | \ -+ __bit(X86_FEATURE_FXSR) | __bit(X86_FEATURE_LM) | \ -+ __bit(X86_FEATURE_3DNOWEXT) | __bit(X86_FEATURE_3DNOW)) -+ -+/* Family 0Fh, Revision D */ -+#define AMD_FEATURES_K8_REV_D_ECX AMD_FEATURES_K8_REV_C_ECX -+#define AMD_FEATURES_K8_REV_D_EDX AMD_FEATURES_K8_REV_C_EDX -+#define AMD_EXTFEATURES_K8_REV_D_ECX (AMD_EXTFEATURES_K8_REV_C_ECX |\ -+ __bit(X86_FEATURE_LAHF_LM)) -+#define AMD_EXTFEATURES_K8_REV_D_EDX (AMD_EXTFEATURES_K8_REV_C_EDX |\ -+ __bit(X86_FEATURE_FFXSR)) -+ -+/* Family 0Fh, Revision E */ -+#define AMD_FEATURES_K8_REV_E_ECX (AMD_FEATURES_K8_REV_D_ECX | \ -+ __bit(X86_FEATURE_XMM3)) -+#define AMD_FEATURES_K8_REV_E_EDX (AMD_FEATURES_K8_REV_D_EDX | \ -+ __bit(X86_FEATURE_HT)) -+#define AMD_EXTFEATURES_K8_REV_E_ECX (AMD_EXTFEATURES_K8_REV_D_ECX |\ -+ __bit(X86_FEATURE_CMP_LEGACY)) -+#define AMD_EXTFEATURES_K8_REV_E_EDX AMD_EXTFEATURES_K8_REV_D_EDX -+ -+/* Family 0Fh, Revision F */ -+#define AMD_FEATURES_K8_REV_F_ECX (AMD_FEATURES_K8_REV_E_ECX | \ -+ __bit(X86_FEATURE_CX16)) -+#define AMD_FEATURES_K8_REV_F_EDX AMD_FEATURES_K8_REV_E_EDX -+#define AMD_EXTFEATURES_K8_REV_F_ECX (AMD_EXTFEATURES_K8_REV_E_ECX |\ -+ __bit(X86_FEATURE_SVME) | __bit(X86_FEATURE_EXTAPICSPACE) | \ -+ __bit(X86_FEATURE_ALTMOVCR)) -+#define AMD_EXTFEATURES_K8_REV_F_EDX (AMD_EXTFEATURES_K8_REV_E_EDX |\ -+ __bit(X86_FEATURE_RDTSCP)) -+ -+/* Family 0Fh, Revision G */ -+#define AMD_FEATURES_K8_REV_G_ECX AMD_FEATURES_K8_REV_F_ECX -+#define AMD_FEATURES_K8_REV_G_EDX AMD_FEATURES_K8_REV_F_EDX -+#define AMD_EXTFEATURES_K8_REV_G_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ -+ __bit(X86_FEATURE_3DNOWPF)) -+#define AMD_EXTFEATURES_K8_REV_G_EDX AMD_EXTFEATURES_K8_REV_F_EDX -+ -+/* Family 10h, Revision B */ -+#define AMD_FEATURES_FAM10h_REV_B_ECX (AMD_FEATURES_K8_REV_F_ECX | \ -+ __bit(X86_FEATURE_POPCNT) | __bit(X86_FEATURE_MWAIT)) -+#define AMD_FEATURES_FAM10h_REV_B_EDX AMD_FEATURES_K8_REV_F_EDX -+#define AMD_EXTFEATURES_FAM10h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_F_ECX |\ -+ __bit(X86_FEATURE_ABM) | __bit(X86_FEATURE_SSE4A) | \ -+ __bit(X86_FEATURE_MISALIGNSSE) | __bit(X86_FEATURE_OSVW) | \ -+ __bit(X86_FEATURE_IBS)) -+#define AMD_EXTFEATURES_FAM10h_REV_B_EDX (AMD_EXTFEATURES_K8_REV_F_EDX |\ -+ __bit(X86_FEATURE_PAGE1GB)) -+ -+/* Family 10h, Revision C */ -+#define AMD_FEATURES_FAM10h_REV_C_ECX AMD_FEATURES_FAM10h_REV_B_ECX -+#define AMD_FEATURES_FAM10h_REV_C_EDX AMD_FEATURES_FAM10h_REV_B_EDX -+#define AMD_EXTFEATURES_FAM10h_REV_C_ECX (AMD_EXTFEATURES_FAM10h_REV_B_ECX |\ -+ __bit(X86_FEATURE_SKINIT) | __bit(X86_FEATURE_WDT)) -+#define AMD_EXTFEATURES_FAM10h_REV_C_EDX AMD_EXTFEATURES_FAM10h_REV_B_EDX -+ -+/* Family 11h, Revision B */ -+#define AMD_FEATURES_FAM11h_REV_B_ECX AMD_FEATURES_K8_REV_G_ECX -+#define AMD_FEATURES_FAM11h_REV_B_EDX AMD_FEATURES_K8_REV_G_EDX -+#define AMD_EXTFEATURES_FAM11h_REV_B_ECX (AMD_EXTFEATURES_K8_REV_G_ECX |\ -+ __bit(X86_FEATURE_SKINIT)) -+#define AMD_EXTFEATURES_FAM11h_REV_B_EDX AMD_EXTFEATURES_K8_REV_G_EDX -+ -+/* AMD errata checking -+ * -+ * Errata are defined using the AMD_LEGACY_ERRATUM() or AMD_OSVW_ERRATUM() -+ * macros. The latter is intended for newer errata that have an OSVW id -+ * assigned, which it takes as first argument. Both take a variable number -+ * of family-specific model-stepping ranges created by AMD_MODEL_RANGE(). -+ * -+ * Example 1: -+ * #define AMD_ERRATUM_319 \ -+ * AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0x4, 0x2), \ -+ * AMD_MODEL_RANGE(0x10, 0x8, 0x0, 0x8, 0x0), \ -+ * AMD_MODEL_RANGE(0x10, 0x9, 0x0, 0x9, 0x0)) -+ * Example 2: -+ * #define AMD_ERRATUM_400 \ -+ * AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf), \ -+ * AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf)) -+ */ -+ -+#define AMD_LEGACY_ERRATUM(...) 0 /* legacy */, __VA_ARGS__, 0 -+#define AMD_OSVW_ERRATUM(osvw_id, ...) 1 /* osvw */, osvw_id, __VA_ARGS__, 0 -+#define AMD_MODEL_RANGE(f, m_start, s_start, m_end, s_end) \ -+ ((f << 24) | (m_start << 16) | (s_start << 12) | (m_end << 4) | (s_end)) -+#define AMD_MODEL_RANGE_FAMILY(range) (((range) >> 24) & 0xff) -+#define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff) -+#define AMD_MODEL_RANGE_END(range) ((range) & 0xfff) -+ -+#define AMD_ERRATUM_170 \ -+ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf)) -+ -+#define AMD_ERRATUM_383 \ -+ AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf), \ -+ AMD_MODEL_RANGE(0x12, 0x0, 0x0, 0x1, 0x0)) -+ -+int cpu_has_amd_erratum(const struct cpuinfo_x86 *, int, ...); -+#endif /* __AMD_H__ */ -Index: xen-4.0.0-testing/xen/include/asm-x86/msr-index.h -=================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/msr-index.h -+++ xen-4.0.0-testing/xen/include/asm-x86/msr-index.h -@@ -251,6 +251,10 @@ - #define MSR_AMD_PATCHLEVEL 0x0000008b - #define MSR_AMD_PATCHLOADER 0xc0010020 - -+/* AMD OS Visible Workaround MSRs */ -+#define MSR_AMD_OSVW_ID_LENGTH 0xc0010140 -+#define MSR_AMD_OSVW_STATUS 0xc0010141 -+ - /* K6 MSRs */ - #define MSR_K6_EFER 0xc0000080 - #define MSR_K6_STAR 0xc0000081 diff --git a/21723-get-domu-state.patch b/21723-get-domu-state.patch index 922e954..df79dac 100644 --- a/21723-get-domu-state.patch +++ b/21723-get-domu-state.patch @@ -16,10 +16,10 @@ VM" or " API" Signed-off-by James (Song Wei) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py @@ -250,6 +250,18 @@ class XendDomain: @return: path to config file. """ @@ -39,10 +39,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py def _managed_check_point_path(self, domuuid): """Returns absolute path to check point file for managed domain. -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -327,6 +327,8 @@ class XendDomainInfo: @type info: dictionary @ivar domid: Domain ID (if VM has started) @@ -60,10 +60,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py maxmem = self.info.get('memory_static_max', 0) memory = self.info.get('memory_dynamic_max', 0) -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py @@ -225,6 +225,20 @@ class SrvDomain(SrvDir): self.acceptCommand(req) return self.xd.domain_reset(self.dom.getName()) @@ -85,10 +85,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py def op_usb_add(self, op, req): self.acceptCommand(req) return req.threadRequest(self.do_usb_add, op, req) -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py @@ -165,6 +165,8 @@ SUBCOMMAND_HELP = { #usb 'usb-add' : (' <[host:bus.addr] [host:vendor_id:product_id]>','Add the usb device to FV VM.'), @@ -144,7 +144,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py def xm_dump_core(args): live = False -@@ -1515,6 +1522,32 @@ def xm_usb_add(args): +@@ -1517,6 +1524,32 @@ def xm_usb_add(args): arg_check(args, "usb-add", 2) server.xend.domain.usb_add(args[0],args[1]) @@ -177,7 +177,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py def xm_usb_del(args): arg_check(args, "usb-del", 2) server.xend.domain.usb_del(args[0],args[1]) -@@ -3538,6 +3571,8 @@ commands = { +@@ -3542,6 +3575,8 @@ commands = { #usb "usb-add": xm_usb_add, "usb-del": xm_usb_del, diff --git a/21744-x86-cpufreq-range-check.patch b/21744-x86-cpufreq-range-check.patch deleted file mode 100644 index 5d5a65f..0000000 --- a/21744-x86-cpufreq-range-check.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1278578686 -3600 -# Node ID df63728e1680ce7827bd58f6bda453f70ed41ad9 -# Parent a0f0ae5be814f19590d5a59d91ab7183cd1a325f -x86/cpufreq: check array index before use - -... rather than after. - -Signed-off-by: Jan Beulich - ---- a/xen/arch/x86/acpi/cpufreq/cpufreq.c -+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c -@@ -210,9 +210,11 @@ - - if (!cpu_isset(cpu, mask)) - cpu = first_cpu(mask); -+ if (cpu >= NR_CPUS) -+ return 0; -+ - policy = cpufreq_cpu_policy[cpu]; -- -- if (cpu >= NR_CPUS || !policy || !drv_data[policy->cpu]) -+ if (!policy || !drv_data[policy->cpu]) - return 0; - - switch (drv_data[policy->cpu]->cpu_feature) { diff --git a/21847-pscsi.patch b/21847-pscsi.patch index f7d9df6..3ee6164 100644 --- a/21847-pscsi.patch +++ b/21847-pscsi.patch @@ -37,10 +37,10 @@ Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com Comment from Masaki Kanno : "Well done" Committed-by: Ian Jackson -Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +Index: xen-4.0.1-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.0-testing/tools/examples/xend-config.sxp +--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.1-testing/tools/examples/xend-config.sxp @@ -277,3 +277,11 @@ # we have to realize this may incur security issue and we can't make sure the # device assignment could really work properly even after we do this. @@ -50,13 +50,13 @@ Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +# because xend scans all the device paths to build its internal PSCSI device +# list. If we need only a few devices for assigning to a guest, we can reduce +# the scan to this device. Set list list of device paths in same syntax like in -+# command lsscsi, e.g. ('16:0:0:0' '15:0') ++# command lsscsi, e.g. ('16:0:0:0' '15:0') +# (pscsi-device-mask ('*')) + -Index: xen-4.0.0-testing/tools/python/xen/util/vscsi_util.py +Index: xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/util/vscsi_util.py -+++ xen-4.0.0-testing/tools/python/xen/util/vscsi_util.py +--- xen-4.0.1-testing.orig/tools/python/xen/util/vscsi_util.py ++++ xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py @@ -148,11 +148,12 @@ def _vscsi_get_scsidevices_by_sysfs(): return devices @@ -85,10 +85,10 @@ Index: xen-4.0.0-testing/tools/python/xen/util/vscsi_util.py scsi_record = _make_scsi_record(scsi_info) scsi_records.append(scsi_record) return scsi_records -Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py @@ -323,7 +323,12 @@ class XendNode: pscsi_table = {} pscsi_HBA_table = {} @@ -103,10 +103,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py scsi_id = pscsi_record['scsi_id'] if scsi_id: saved_HBA_uuid = None -Index: xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendOptions.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendOptions.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py @@ -164,6 +164,9 @@ class XendOptions: """ print >>sys.stderr, "xend [ERROR]", fmt % args diff --git a/21866-xenapi.patch b/21866-xenapi.patch index d9a5377..984d8e4 100644 --- a/21866-xenapi.patch +++ b/21866-xenapi.patch @@ -18,10 +18,10 @@ Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com Acked-by: Jim Fehlig Committed-by: Ian Jackson -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py @@ -1667,7 +1667,8 @@ class XendAPI(object): def VM_set_actions_after_crash(self, session, vm_ref, action): if action not in XEN_API_ON_CRASH_BEHAVIOUR: @@ -32,10 +32,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py def VM_set_HVM_boot_policy(self, session, vm_ref, value): if value != "" and value != "BIOS order": -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPIConstants.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py @@ -63,6 +63,18 @@ XEN_API_ON_CRASH_BEHAVIOUR_FILTER = { 'rename_restart' : 'rename_restart', } @@ -55,10 +55,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py XEN_API_VBD_MODE = ['RO', 'RW'] XEN_API_VDI_TYPE = ['system', 'user', 'ephemeral'] XEN_API_VBD_TYPE = ['CD', 'Disk'] -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -41,6 +41,7 @@ from xen.util.pci import pci_opts_list_f from xen.xend.XendSXPDev import dev_dict_to_sxp from xen.util import xsconstants diff --git a/21894-intel-unmask-cpuid.patch b/21894-intel-unmask-cpuid.patch new file mode 100644 index 0000000..a6b7507 --- /dev/null +++ b/21894-intel-unmask-cpuid.patch @@ -0,0 +1,48 @@ +# HG changeset patch +# User Keir Fraser +# Date 1280486194 -3600 +# Node ID c9e7850ec9a18d7085c7468407e175bb64513846 +# Parent 754877be695ba3050f140002dbd185a27a437fcc +x86: unmask CPUID levels on Intel CPUs +References: bnc#640773 + +If the CPUID limit bit in MSR_IA32_MISC_ENABLE is set, clear it to +make all CPUID information available. This is required for some +features to work, such as MWAIT in cpuidle, get cpu topology, XSAVE, +etc. + +Signed-off-by: Wei Gang + +--- a/xen/arch/x86/cpu/intel.c ++++ b/xen/arch/x86/cpu/intel.c +@@ -90,6 +90,20 @@ void __devinit early_intel_workaround(st + /* Netburst reports 64 bytes clflush size, but does IO in 128 bytes */ + if (c->x86 == 15 && c->x86_cache_alignment == 64) + c->x86_cache_alignment = 128; ++ ++ /* Unmask CPUID levels if masked: */ ++ if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { ++ u64 misc_enable; ++ ++ rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); ++ ++ if (misc_enable & MSR_IA32_MISC_ENABLE_LIMIT_CPUID) { ++ misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID; ++ wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable); ++ c->cpuid_level = cpuid_eax(0); ++ printk("revised cpuid_level = %d\n", c->cpuid_level); ++ } ++ } + } + + /* +--- a/xen/include/asm-x86/msr-index.h ++++ b/xen/include/asm-x86/msr-index.h +@@ -324,6 +324,7 @@ + #define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1<<11) + #define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1<<12) + #define MSR_IA32_MISC_ENABLE_MONITOR_ENABLE (1<<18) ++#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID (1<<22) + #define MSR_IA32_MISC_ENABLE_XTPR_DISABLE (1<<23) + + /* Intel Model 6 */ diff --git a/22019-x86-cpuidle-online-check.patch b/22019-x86-cpuidle-online-check.patch new file mode 100644 index 0000000..153900d --- /dev/null +++ b/22019-x86-cpuidle-online-check.patch @@ -0,0 +1,30 @@ +# HG changeset patch +# User Keir Fraser +# Date 1282069957 -3600 +# Node ID 5218db847b58a151d8f320b7141efc984f759b35 +# Parent 542e8cd16a6cf036e89b597ba6343245fcaafa25 +x86 cpuidle: check whether cpu is online in cpu idle control + +We observed a 2.6.18.8 dom0 kernel crash when Xen has maxcpus < num +of physical cores (maxcpus=3D4 for a 12-core system). It appeared that +hypervisor doesn't check whether CPU is online or not. This small +patch fixed the issue. + +Signed-off-by: Uwe Dannowski +Acked-by: Wei Huang + +--- a/xen/arch/x86/acpi/cpuidle_menu.c ++++ b/xen/arch/x86/acpi/cpuidle_menu.c +@@ -270,9 +270,10 @@ static void menu_reflect(struct acpi_pro + + static int menu_enable_device(struct acpi_processor_power *power) + { +- struct menu_device *data = &per_cpu(menu_devices, power->cpu); ++ if (!cpu_online(power->cpu)) ++ return -1; + +- memset(data, 0, sizeof(struct menu_device)); ++ memset(&per_cpu(menu_devices, power->cpu), 0, sizeof(struct menu_device)); + + return 0; + } diff --git a/22051-x86-forced-EOI.patch b/22051-x86-forced-EOI.patch new file mode 100644 index 0000000..3bd96a5 --- /dev/null +++ b/22051-x86-forced-EOI.patch @@ -0,0 +1,203 @@ +# HG changeset patch +# User Keir Fraser +# Date 1282466228 -3600 +# Node ID 59ff5820534f4c5ec006d1ddca0f4356634c3b22 +# Parent f77261710856aad506dda92cfa3b92b923be4e15 +x86: Automatically EOI guest-bound interrupts if guest takes too long. + +Signed-off-by: Keir Fraser + +Includes the x86 IRQ specific parts of c/s 21508: + +# HG changeset patch +# User Keir Fraser +# Date 1275480791 -3600 +# Node ID 5aabc6f94df5f275647d55caa24780eff0c81355 +# Parent a3bdee5a20daf590ae7a440dad4e3b104b99c620 +timers: Track inactive timers and migrate them on cpu offline. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/irq.c ++++ b/xen/arch/x86/irq.c +@@ -46,8 +46,6 @@ static DECLARE_BITMAP(used_vectors, NR_V + + struct irq_cfg __read_mostly *irq_cfg = NULL; + +-static struct timer *__read_mostly irq_guest_eoi_timer; +- + static DEFINE_SPINLOCK(vector_lock); + + DEFINE_PER_CPU(vector_irq_t, vector_irq) = { +@@ -274,18 +272,15 @@ int init_irq_data(void) + irq_desc = xmalloc_array(struct irq_desc, nr_irqs); + irq_cfg = xmalloc_array(struct irq_cfg, nr_irqs); + irq_status = xmalloc_array(int, nr_irqs); +- irq_guest_eoi_timer = xmalloc_array(struct timer, nr_irqs); + irq_vector = xmalloc_array(u8, nr_irqs_gsi); + +- if (!irq_desc || !irq_cfg || !irq_status ||! irq_vector || +- !irq_guest_eoi_timer) ++ if ( !irq_desc || !irq_cfg || !irq_status ||! irq_vector ) + return -ENOMEM; + + memset(irq_desc, 0, nr_irqs * sizeof(*irq_desc)); + memset(irq_cfg, 0, nr_irqs * sizeof(*irq_cfg)); + memset(irq_status, 0, nr_irqs * sizeof(*irq_status)); + memset(irq_vector, 0, nr_irqs_gsi * sizeof(*irq_vector)); +- memset(irq_guest_eoi_timer, 0, nr_irqs * sizeof(*irq_guest_eoi_timer)); + + for (irq = 0; irq < nr_irqs; irq++) { + desc = irq_to_desc(irq); +@@ -740,6 +735,7 @@ typedef struct { + #define ACKTYPE_UNMASK 1 /* Unmask PIC hardware (from any CPU) */ + #define ACKTYPE_EOI 2 /* EOI on the CPU that was interrupted */ + cpumask_t cpu_eoi_map; /* CPUs that need to EOI this interrupt */ ++ struct timer eoi_timer; + struct domain *guest[IRQ_MAX_GUESTS]; + } irq_guest_action_t; + +@@ -784,13 +780,55 @@ static void _irq_guest_eoi(struct irq_de + desc->handler->enable(irq); + } + ++static void set_eoi_ready(void *data); ++ + static void irq_guest_eoi_timer_fn(void *data) + { + struct irq_desc *desc = data; ++ unsigned int irq = desc - irq_desc; ++ irq_guest_action_t *action; ++ cpumask_t cpu_eoi_map; + unsigned long flags; + + spin_lock_irqsave(&desc->lock, flags); +- _irq_guest_eoi(desc); ++ ++ if ( !(desc->status & IRQ_GUEST) ) ++ goto out; ++ ++ action = (irq_guest_action_t *)desc->action; ++ ++ if ( action->ack_type != ACKTYPE_NONE ) ++ { ++ unsigned int i; ++ for ( i = 0; i < action->nr_guests; i++ ) ++ { ++ struct domain *d = action->guest[i]; ++ unsigned int pirq = domain_irq_to_pirq(d, irq); ++ if ( test_and_clear_bit(pirq, d->pirq_mask) ) ++ action->in_flight--; ++ } ++ } ++ ++ if ( action->in_flight != 0 ) ++ goto out; ++ ++ switch ( action->ack_type ) ++ { ++ case ACKTYPE_UNMASK: ++ desc->handler->end(irq); ++ break; ++ case ACKTYPE_EOI: ++ cpu_eoi_map = action->cpu_eoi_map; ++ spin_unlock_irq(&desc->lock); ++ on_selected_cpus(&cpu_eoi_map, set_eoi_ready, desc, 0); ++ spin_lock_irq(&desc->lock); ++ break; ++ case ACKTYPE_NONE: ++ _irq_guest_eoi(desc); ++ break; ++ } ++ ++ out: + spin_unlock_irqrestore(&desc->lock, flags); + } + +@@ -847,9 +885,11 @@ static void __do_IRQ_guest(int irq) + } + } + +- if ( already_pending == action->nr_guests ) ++ stop_timer(&action->eoi_timer); ++ ++ if ( (action->ack_type == ACKTYPE_NONE) && ++ (already_pending == action->nr_guests) ) + { +- stop_timer(&irq_guest_eoi_timer[irq]); + desc->handler->disable(irq); + desc->status |= IRQ_GUEST_EOI_PENDING; + for ( i = 0; i < already_pending; ++i ) +@@ -865,10 +905,10 @@ static void __do_IRQ_guest(int irq) + * - skip the timer setup below. + */ + } +- init_timer(&irq_guest_eoi_timer[irq], +- irq_guest_eoi_timer_fn, desc, smp_processor_id()); +- set_timer(&irq_guest_eoi_timer[irq], NOW() + MILLISECS(1)); + } ++ ++ migrate_timer(&action->eoi_timer, smp_processor_id()); ++ set_timer(&action->eoi_timer, NOW() + MILLISECS(1)); + } + + /* +@@ -978,7 +1018,7 @@ static void __pirq_guest_eoi(struct doma + if ( action->ack_type == ACKTYPE_NONE ) + { + ASSERT(!test_bit(pirq, d->pirq_mask)); +- stop_timer(&irq_guest_eoi_timer[irq]); ++ stop_timer(&action->eoi_timer); + _irq_guest_eoi(desc); + } + +@@ -1162,6 +1202,7 @@ int pirq_guest_bind(struct vcpu *v, int + action->shareable = will_share; + action->ack_type = pirq_acktype(v->domain, pirq); + cpus_clear(action->cpu_eoi_map); ++ init_timer(&action->eoi_timer, irq_guest_eoi_timer_fn, desc, 0); + + desc->depth = 0; + desc->status |= IRQ_GUEST; +@@ -1266,7 +1307,7 @@ static irq_guest_action_t *__pirq_guest_ + } + break; + case ACKTYPE_NONE: +- stop_timer(&irq_guest_eoi_timer[irq]); ++ stop_timer(&action->eoi_timer); + _irq_guest_eoi(desc); + break; + } +@@ -1306,9 +1347,7 @@ static irq_guest_action_t *__pirq_guest_ + BUG_ON(!cpus_empty(action->cpu_eoi_map)); + + desc->action = NULL; +- desc->status &= ~IRQ_GUEST; +- desc->status &= ~IRQ_INPROGRESS; +- kill_timer(&irq_guest_eoi_timer[irq]); ++ desc->status &= ~(IRQ_GUEST|IRQ_GUEST_EOI_PENDING|IRQ_INPROGRESS); + desc->handler->shutdown(irq); + + /* Caller frees the old guest descriptor block. */ +@@ -1342,7 +1381,10 @@ void pirq_guest_unbind(struct domain *d, + spin_unlock_irq(&desc->lock); + + if ( oldaction != NULL ) ++ { ++ kill_timer(&oldaction->eoi_timer); + xfree(oldaction); ++ } + } + + static int pirq_guest_force_unbind(struct domain *d, int irq) +@@ -1380,7 +1422,10 @@ static int pirq_guest_force_unbind(struc + spin_unlock_irq(&desc->lock); + + if ( oldaction != NULL ) ++ { ++ kill_timer(&oldaction->eoi_timer); + xfree(oldaction); ++ } + + return bound; + } diff --git a/22067-x86-irq-domain.patch b/22067-x86-irq-domain.patch new file mode 100644 index 0000000..62f548d --- /dev/null +++ b/22067-x86-irq-domain.patch @@ -0,0 +1,31 @@ +# HG changeset patch +# User Keir Fraser +# Date 1282817774 -3600 +# Node ID 3eb5127e46365242401e37df292fbe290fa0a974 +# Parent eccfdeb41b803d07bcb4f7fa912a8341fdb19162 +Fix bind_irq_vector() destination + +The "mask" covered all online cpus in the "domain". It should be used +as destination later, instead of using "domain" directly. + +Signed-off-by: Sheng Yang + +--- a/xen/arch/x86/irq.c ++++ b/xen/arch/x86/irq.c +@@ -88,14 +88,14 @@ static int __bind_irq_vector(int irq, in + cpus_and(mask, domain, cpu_online_map); + if (cpus_empty(mask)) + return -EINVAL; +- if ((cfg->vector == vector) && cpus_equal(cfg->domain, domain)) ++ if ((cfg->vector == vector) && cpus_equal(cfg->domain, mask)) + return 0; + if (cfg->vector != IRQ_VECTOR_UNASSIGNED) + return -EBUSY; + for_each_cpu_mask(cpu, mask) + per_cpu(vector_irq, cpu)[vector] = irq; + cfg->vector = vector; +- cfg->domain = domain; ++ cfg->domain = mask; + irq_status[irq] = IRQ_USED; + if (IO_APIC_IRQ(irq)) + irq_vector[irq] = vector; diff --git a/22068-vtd-irte-RH-bit.patch b/22068-vtd-irte-RH-bit.patch new file mode 100644 index 0000000..c95a972 --- /dev/null +++ b/22068-vtd-irte-RH-bit.patch @@ -0,0 +1,35 @@ +# HG changeset patch +# User Keir Fraser +# Date 1282817816 -3600 +# Node ID 3c4c3d48a8350994f4450314c6b759771c7ad4ef +# Parent 3eb5127e46365242401e37df292fbe290fa0a974 +VT-d: Hardware require RH bit to be set in IRTE when delivery mode is LPR + +Signed-off-by: Sheng Yang + +--- a/xen/drivers/passthrough/vtd/intremap.c ++++ b/xen/drivers/passthrough/vtd/intremap.c +@@ -318,9 +318,10 @@ static int ioapic_rte_to_remap_entry(str + *(((u32 *)&new_rte) + 0) = value; + new_ire.lo.fpd = 0; + new_ire.lo.dm = new_rte.dest_mode; +- new_ire.lo.rh = 0; + new_ire.lo.tm = new_rte.trigger; + new_ire.lo.dlm = new_rte.delivery_mode; ++ /* Hardware require RH = 1 for LPR delivery mode */ ++ new_ire.lo.rh = (new_ire.lo.dlm == dest_LowestPrio); + new_ire.lo.avail = 0; + new_ire.lo.res_1 = 0; + new_ire.lo.vector = new_rte.vector; +@@ -630,9 +631,10 @@ static int msi_msg_to_remap_entry( + /* Set interrupt remapping table entry */ + new_ire.lo.fpd = 0; + new_ire.lo.dm = (msg->address_lo >> MSI_ADDR_DESTMODE_SHIFT) & 0x1; +- new_ire.lo.rh = 0; + new_ire.lo.tm = (msg->data >> MSI_DATA_TRIGGER_SHIFT) & 0x1; + new_ire.lo.dlm = (msg->data >> MSI_DATA_DELIVERY_MODE_SHIFT) & 0x1; ++ /* Hardware require RH = 1 for LPR delivery mode */ ++ new_ire.lo.rh = (new_ire.lo.dlm == dest_LowestPrio); + new_ire.lo.avail = 0; + new_ire.lo.res_1 = 0; + new_ire.lo.vector = (msg->data >> MSI_DATA_VECTOR_SHIFT) & diff --git a/22071-ept-get-entry-lock.patch b/22071-ept-get-entry-lock.patch new file mode 100644 index 0000000..fc621a7 --- /dev/null +++ b/22071-ept-get-entry-lock.patch @@ -0,0 +1,45 @@ +# HG changeset patch +# User Keir Fraser +# Date 1283153992 -3600 +# Node ID c5aed2e049bce2724b035dd6aa09c4c4e609c27c +# Parent 20920c12bc4815b1f755786c0924393809664807 +ept: Put locks around ept_get_entry + +There's a subtle race in ept_get_entry, such that if tries to read an +entry that ept_set_entry is modifying, it gets neither the old entry +nor the new entry, but empty. In the case of multi-cpu +populate-on-demand guests, this manifests as a guest crash when one +vcpu tries to read a page which another page is trying to populate, +and ept_get_entry returns p2m_mmio_dm. + +This bug can also be fixed by making both ept_set_entry and +ept_next_level access-once (i.e., ept_next_level reads full ept_entry +and then works with local value; ept_set_entry construct the entry +locally and then sets it in one write). But there doesn't seem to be +any major performance implications of just making ept_get_entry use +locks; so the simpler, the better. + +Signed-off-by: George Dunlap + +--- a/xen/arch/x86/mm/hap/p2m-ept.c ++++ b/xen/arch/x86/mm/hap/p2m-ept.c +@@ -387,6 +387,10 @@ static mfn_t ept_get_entry(struct domain + int i; + int ret = 0; + mfn_t mfn = _mfn(INVALID_MFN); ++ int do_locking = !p2m_locked_by_me(d->arch.p2m); ++ ++ if ( do_locking ) ++ p2m_lock(d->arch.p2m); + + *t = p2m_mmio_dm; + +@@ -464,6 +468,8 @@ static mfn_t ept_get_entry(struct domain + } + + out: ++ if ( do_locking ) ++ p2m_unlock(d->arch.p2m); + unmap_domain_page(table); + return mfn; + } diff --git a/22084-x86-xsave-off.patch b/22084-x86-xsave-off.patch new file mode 100644 index 0000000..e3e476b --- /dev/null +++ b/22084-x86-xsave-off.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Keir Fraser +# Date 1283332754 -3600 +# Node ID ae0cd4e5cc0149ceb5d3dd61a003aadc008f036e +# Parent 972d90ff31349816cc8c785a8b2defb2f70ed441 +x86 intel: Disable XSAVE support. + +It breaks HVM save/restore. + +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/cpu/intel.c ++++ b/xen/arch/x86/cpu/intel.c +@@ -20,7 +20,7 @@ + + extern int trap_init_f00f_bug(void); + +-static int use_xsave = 1; ++static int use_xsave; + boolean_param("xsave", use_xsave); + + #ifdef CONFIG_X86_INTEL_USERCOPY diff --git a/22135-heap-lock.patch b/22135-heap-lock.patch new file mode 100644 index 0000000..bdc8a66 --- /dev/null +++ b/22135-heap-lock.patch @@ -0,0 +1,51 @@ +References: bnc#638465 + +# HG changeset patch +# User Keir Fraser +# Date 1284394111 -3600 +# Node ID 69e8bb164683c76e0cd787df21b98c73905a61e6 +# Parent e300bfa3c0323ac08e7b8cd9fb40f9f1ab548543 +page_alloc: Hold heap_lock while adjusting page states to/from PGC_state_free. + +This avoids races with buddy-merging logic in free_heap_pages(). + +Signed-off-by: Keir Fraser + +--- a/xen/common/page_alloc.c ++++ b/xen/common/page_alloc.c +@@ -378,8 +378,6 @@ static struct page_info *alloc_heap_page + total_avail_pages -= request; + ASSERT(total_avail_pages >= 0); + +- spin_unlock(&heap_lock); +- + cpus_clear(mask); + + for ( i = 0; i < (1 << order); i++ ) +@@ -401,6 +399,8 @@ static struct page_info *alloc_heap_page + page_set_owner(&pg[i], NULL); + } + ++ spin_unlock(&heap_lock); ++ + if ( unlikely(!cpus_empty(mask)) ) + { + perfc_incr(need_flush_tlb_flush); +@@ -496,6 +496,8 @@ static void free_heap_pages( + ASSERT(order <= MAX_ORDER); + ASSERT(node >= 0); + ++ spin_lock(&heap_lock); ++ + for ( i = 0; i < (1 << order); i++ ) + { + /* +@@ -523,8 +525,6 @@ static void free_heap_pages( + pg[i].tlbflush_timestamp = tlbflush_current_time(); + } + +- spin_lock(&heap_lock); +- + avail[node][zone] += 1 << order; + total_avail_pages += 1 << order; + diff --git a/22148-serial-irq-dest.patch b/22148-serial-irq-dest.patch new file mode 100644 index 0000000..3c7736b --- /dev/null +++ b/22148-serial-irq-dest.patch @@ -0,0 +1,24 @@ +# HG changeset patch +# User Keir Fraser +# Date 1284395845 -3600 +# Node ID a254d1236c1a52264beb0253352ef64d65a98eb3 +# Parent f0a1229cb0a6505f3240ac59a3bb6ade2acfa1a2 +Fix serial interrupt's destination + +Lowest Priority can't use with invalid cpu_mask, and the default value +of CPU_MASK_ALL may cover CPU which wasn't online. + +From: "Yang, Sheng" +Signed-off-by: Keir Fraser + +--- a/xen/arch/x86/smpboot.c ++++ b/xen/arch/x86/smpboot.c +@@ -1602,7 +1602,7 @@ void __init smp_intr_init(void) + irq_vector[irq] = FIRST_HIPRIORITY_VECTOR + seridx + 1; + per_cpu(vector_irq, cpu)[FIRST_HIPRIORITY_VECTOR + seridx + 1] = irq; + irq_cfg[irq].vector = FIRST_HIPRIORITY_VECTOR + seridx + 1; +- irq_cfg[irq].domain = (cpumask_t)CPU_MASK_ALL; ++ irq_cfg[irq].domain = cpu_online_map; + } + + /* IPI for cleanuping vectors after irq move */ diff --git a/32on64-extra-mem.patch b/32on64-extra-mem.patch index c82dfe3..6249b76 100644 --- a/32on64-extra-mem.patch +++ b/32on64-extra-mem.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2917,7 +2917,7 @@ class XendDomainInfo: +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -2920,7 +2920,7 @@ class XendDomainInfo: self.guest_bitsize = self.image.getBitSize() # Make sure there's enough RAM available for the domain diff --git a/7410-qemu-alt-gr.patch b/7410-qemu-alt-gr.patch new file mode 100644 index 0000000..e41ba7a --- /dev/null +++ b/7410-qemu-alt-gr.patch @@ -0,0 +1,118 @@ +# HG changeset patch +# User Ian Jackson +# Date 1284481903 -3600 +# Node ID f71a4c18e34e86e1011662fa42c10ec54bff0688 +# Parent 080b5a094d4e0acab6646125f91f988911409016 +ioemu: fix VNC altgr-insert behavior + +When access to a Xen DomU (Linux) from a VNC client in Windows, alt-gr +key is not working properly with Spanish keyboard. When Alt + another +key pressed, vncserver receives Altgr down, Altgr up and key down +messages in order, that causes incorrect output. + +With following patch, when vncerver receives key down message, it +first check if the keysym needs altgr modifer, if it needs altgr +modifier but altgr is not 'down', sending altgr keycode before sending +key keycode. + +Signed-off-by: Chunyan Liu + +committer: Ian Jackson +git-commit-id: f95d202ed6444dacb15fbea4dee185eb0e048d9a + +diff -r 080b5a094d4e -r f71a4c18e34e keymaps.c +--- a/tools/ioemu-qemu-xen/keymaps.c Wed Sep 08 16:38:09 2010 +0100 ++++ b//tools/ioemu-qemu-xen/keymaps.c Tue Sep 14 17:31:43 2010 +0100 +@@ -51,6 +51,7 @@ + struct key_range *numlock_range; + struct key_range *shift_range; + struct key_range *localstate_range; ++ struct key_range *altgr_range; + } kbd_layout_t; + + static void add_to_key_range(struct key_range **krp, int code) { +@@ -133,7 +134,11 @@ + add_to_key_range(&k->localstate_range, keycode); + //fprintf(stderr, "localstate keysym %04x keycode %d\n", keysym, keycode); + } +- ++ if (rest && strstr(rest, "altgr")) { ++ add_to_key_range(&k->altgr_range, keysym); ++ //fprintf(stderr, "altgr keysym %04x keycode %d\n", keysym, keycode); ++ } ++ + /* if(keycode&0x80) + keycode=(keycode<<8)^0x80e0; */ + if (keysym < MAX_NORMAL_KEYCODE) { +@@ -233,3 +238,16 @@ + return 0; + return 1; + } ++ ++static inline int keysym_is_altgr(void *kbd_layout, int keysym) ++{ ++ kbd_layout_t *k = kbd_layout; ++ struct key_range *kr; ++ ++ for (kr = k->altgr_range; kr; kr = kr->next) ++ if (keysym >= kr->start && keysym <= kr->end){ ++ return 1; ++ } ++ return 0; ++} ++ +diff -r 080b5a094d4e -r f71a4c18e34e vnc.c +--- a/tools/ioemu-qemu-xen/vnc.c Wed Sep 08 16:38:09 2010 +0100 ++++ b/tools/ioemu-qemu-xen/vnc.c Tue Sep 14 17:31:43 2010 +0100 +@@ -1274,12 +1274,27 @@ + } + } + ++static void press_key_altgr_down(VncState *vs, int down) ++{ ++ kbd_put_keycode(0xe0); ++ if (down){ ++ kbd_put_keycode(0xb8 & 0x7f); ++ vs->modifiers_state[0xb8] = 1; ++ } ++ else { ++ kbd_put_keycode(0xb8 | 0x80); ++ vs->modifiers_state[0xb8] = 0; ++ } ++} ++ + static void do_key_event(VncState *vs, int down, uint32_t sym) + { + int keycode; + int shift_keys = 0; + int shift = 0; + int keypad = 0; ++ int altgr = 0; ++ int altgr_keys = 0; + + if (is_graphic_console()) { + if (sym >= 'A' && sym <= 'Z') { +@@ -1289,8 +1304,11 @@ + else { + shift = keysym_is_shift(vs->kbd_layout, sym & 0xFFFF); + } ++ ++ altgr = keysym_is_altgr(vs->kbd_layout, sym & 0xFFFF); + } + shift_keys = vs->modifiers_state[0x2a] | vs->modifiers_state[0x36]; ++ altgr_keys = vs->modifiers_state[0xb8]; + + keycode = keysym2scancode(vs->kbd_layout, sym & 0xFFFF); + if (keycode == 0) { +@@ -1357,6 +1375,11 @@ + } + + if (is_graphic_console()) { ++ ++ if (altgr && !altgr_keys) { ++ press_key_altgr_down(vs, down); ++ } ++ + /* If the shift state needs to change then simulate an additional + keypress before sending this one. Ignore for non shiftable keys. + */ diff --git a/README.SuSE b/README.SuSE index c8bd432..f161bbc 100644 --- a/README.SuSE +++ b/README.SuSE @@ -464,9 +464,6 @@ The hypervisor and domain 0 kernel are a matched set, and usually must be upgraded together. Consult the online documentation for a matrix of supported 32- and 64-bit combinations -A 64-bit paravirtualized VM will not run on 32-bit host but a 32-bit -paravirtualized VM will run on a 64-bit host. - On certain machines with 2GB or less of RAM, domain 0 Linux may fail to boot, printing the following messages: PCI-DMA: Using software bounce buffering for IO (SWIOTLB) @@ -498,8 +495,8 @@ file (viewable with the "xm dmesg" command). If problems persist, check if a newer version is available. Well-tested versions will be shipped with SUSE and via YaST Online Update. More frequent -(but less supported) updates are available on the Xen Technical Preview site: - ftp://ftp.novell.com/forge/XenTechnicalPreview/ +(but less supported) updates are available on Novell's Forge site: + http://forge.novell.com/modules/xfmod/project/?xenpreview Known Issues diff --git a/bdrv_open2_fix_flags.patch b/bdrv_open2_fix_flags.patch index 3a79db2..0ab9c3d 100644 --- a/bdrv_open2_fix_flags.patch +++ b/bdrv_open2_fix_flags.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/block.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/block.c -+++ xen-4.0.0-testing/tools/ioemu-remote/block.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c @@ -350,7 +350,7 @@ int bdrv_file_open(BlockDriverState **pb int bdrv_open(BlockDriverState *bs, const char *filename, int flags) @@ -18,7 +18,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/block.c - /* Note: for compatibility, we open disk image files as RDWR, and - RDONLY as fallback */ if (!(flags & BDRV_O_FILE)) -- open_flags = BDRV_O_RDWR | (flags & BDRV_O_CACHE_MASK); +- open_flags = (flags & BDRV_O_ACCESS) | (flags & BDRV_O_CACHE_MASK); + open_flags = flags; else open_flags = flags & ~(BDRV_O_FILE | BDRV_O_SNAPSHOT); @@ -28,10 +28,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/block.c ret = drv->bdrv_open(bs, filename, open_flags); if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) { ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR); -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/usb-msd.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/usb-msd.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c @@ -551,7 +551,7 @@ USBDevice *usb_msd_init(const char *file s = qemu_mallocz(sizeof(MSDState)); @@ -41,10 +41,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c goto fail; s->bs = bdrv; *pbs = bdrv; -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-img.c -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-img.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c @@ -32,7 +32,7 @@ #endif @@ -54,7 +54,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c static void QEMU_NORETURN error(const char *fmt, ...) { -@@ -185,7 +185,7 @@ static int read_password(char *buf, int +@@ -185,7 +185,7 @@ static int read_password(char *buf, int #endif static BlockDriverState *bdrv_new_open(const char *filename, @@ -118,7 +118,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c error("Could not open '%s'", filename); } bdrv_get_format(bs, fmt_name, sizeof(fmt_name)); -@@ -810,7 +811,7 @@ static void img_snapshot(int argc, char +@@ -810,7 +811,7 @@ static void img_snapshot(int argc, char if (!bs) error("Not enough memory"); diff --git a/bdrv_open2_flags_2.patch b/bdrv_open2_flags_2.patch index 2213d1a..1fc9e2f 100644 --- a/bdrv_open2_flags_2.patch +++ b/bdrv_open2_flags_2.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -227,6 +227,7 @@ static int open_disk(struct td_state *s, BlockDriver* drv; char* devname; @@ -19,10 +19,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c fprintf(stderr, "Could not open image file %s\n", path); return -ENOMEM; } -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -136,7 +136,8 @@ static void insert_media(void *opaque) else format = &bdrv_raw; @@ -33,19 +33,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c #ifdef CONFIG_STUBDOM { char *buf, *backend, *params_path, *params; -@@ -400,9 +401,9 @@ void xenstore_parse_domain_config(int hv - { - char **e_danger = NULL; - char *buf = NULL; -- char *fpath = NULL, *bpath = NULL, *btype = NULL, -+ char *fpath = NULL, *bpath = NULL, *btype = NULL, *mode = NULL, - *dev = NULL, *params = NULL, *drv = NULL; -- int i, j, ret, is_tap; -+ int i, j, ret, is_tap, flags; - unsigned int len, num, hd_index, pci_devid = 0; - BlockDriverState *bs; - BlockDriver *format; -@@ -464,7 +465,8 @@ void xenstore_parse_domain_config(int hv +@@ -469,7 +470,8 @@ void xenstore_parse_domain_config(int hv } for (i = 0; i < num; i++) { @@ -55,7 +43,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c /* read the backend path */ xenstore_get_backend_path(&bpath, "vbd", danger_path, hvm_domid, e_danger[i]); if (bpath == NULL) -@@ -550,6 +552,17 @@ void xenstore_parse_domain_config(int hv +@@ -555,6 +557,17 @@ void xenstore_parse_domain_config(int hv format = &bdrv_raw; } @@ -73,7 +61,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c #if 0 /* Phantom VBDs are disabled because the use of paths * from guest-controlled areas in xenstore is unsafe. -@@ -617,7 +630,7 @@ void xenstore_parse_domain_config(int hv +@@ -622,7 +635,7 @@ void xenstore_parse_domain_config(int hv #ifdef CONFIG_STUBDOM if (pasprintf(&danger_buf, "%s/device/vbd/%s", danger_path, e_danger[i]) == -1) continue; @@ -82,10 +70,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c pstrcpy(bs->filename, sizeof(bs->filename), params); } #else -@@ -646,7 +659,7 @@ void xenstore_parse_domain_config(int hv - } - } - pstrcpy(bs->filename, sizeof(bs->filename), params); +@@ -668,7 +681,7 @@ void xenstore_parse_domain_config(int hv + + fprintf(stderr, "Using file %s in read-%s mode\n", bs->filename, is_readonly ? "only" : "write"); + - if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { + if (bdrv_open2(bs, params, flags|BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0"); diff --git a/blktap-pv-cdrom.patch b/blktap-pv-cdrom.patch index 64736af..2fec572 100644 --- a/blktap-pv-cdrom.patch +++ b/blktap-pv-cdrom.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/blktap/drivers/block-cdrom.c +Index: xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/blktap/drivers/block-cdrom.c ++++ xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c @@ -0,0 +1,535 @@ +/* block-cdrom.c + * @@ -538,10 +538,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/block-cdrom.c + .td_get_parent_id = tdcdrom_get_parent_id, + .td_validate_parent = tdcdrom_validate_parent +}; -Index: xen-4.0.0-testing/xen/include/public/io/cdromif.h +Index: xen-4.0.1-testing/xen/include/public/io/cdromif.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/xen/include/public/io/cdromif.h ++++ xen-4.0.1-testing/xen/include/public/io/cdromif.h @@ -0,0 +1,122 @@ +/****************************************************************************** + * cdromif.h @@ -665,10 +665,10 @@ Index: xen-4.0.0-testing/xen/include/public/io/cdromif.h + sizeof(struct vcd_generic_command) - sizeof(struct request_sense)) + +#endif -Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile +Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/Makefile -+++ xen-4.0.0-testing/tools/blktap/drivers/Makefile +--- xen-4.0.1-testing.orig/tools/blktap/drivers/Makefile ++++ xen-4.0.1-testing/tools/blktap/drivers/Makefile @@ -28,8 +28,9 @@ CFLAGS += -DMEMSHR MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a endif @@ -676,7 +676,7 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile -LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread -LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz +LDFLAGS_xen := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) -+LDFLAGS_blktapctrl := $(LDFLAGS_xen) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread ++LDFLAGS_blktapctrl := $(LDFLAGS_xen) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm -lpthread $(LDFLAGS_xen) +LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz $(LDFLAGS_xen) BLK-OBJS-y := block-aio.o @@ -689,10 +689,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile BLK-OBJS-y += aes.o BLK-OBJS-y += tapaio.o BLK-OBJS-$(CONFIG_Linux) += blk_linux.o -Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h +Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.h -+++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h +--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.h ++++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h @@ -137,6 +137,9 @@ struct tap_disk { int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id); int (*td_validate_parent)(struct disk_driver *dd, @@ -737,10 +737,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h }; typedef struct driver_list_entry { -Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h +Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/lib/blktaplib.h -+++ xen-4.0.0-testing/tools/blktap/lib/blktaplib.h +--- xen-4.0.1-testing.orig/tools/blktap/lib/blktaplib.h ++++ xen-4.0.1-testing/tools/blktap/lib/blktaplib.h @@ -220,6 +220,7 @@ typedef struct msg_pid { #define DISK_TYPE_RAM 3 #define DISK_TYPE_QCOW 4 @@ -749,10 +749,10 @@ Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h /* xenstore/xenbus: */ #define DOMNAME "Domain-0" -Index: xen-4.0.0-testing/xen/include/public/io/blkif.h +Index: xen-4.0.1-testing/xen/include/public/io/blkif.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/io/blkif.h -+++ xen-4.0.0-testing/xen/include/public/io/blkif.h +--- xen-4.0.1-testing.orig/xen/include/public/io/blkif.h ++++ xen-4.0.1-testing/xen/include/public/io/blkif.h @@ -76,6 +76,10 @@ * "feature-flush-cache" node! */ @@ -764,10 +764,10 @@ Index: xen-4.0.0-testing/xen/include/public/io/blkif.h /* * Maximum scatter/gather segments per request. -Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.c +Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.c -+++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.c +--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.c ++++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c @@ -735,6 +735,22 @@ static void get_io_request(struct td_sta goto out; } @@ -791,10 +791,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.c default: DPRINTF("Unknown block operation\n"); break; -Index: xen-4.0.0-testing/tools/python/xen/xend/server/BlktapController.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/BlktapController.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/BlktapController.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/BlktapController.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py @@ -20,6 +20,7 @@ blktap1_disk_types = [ 'ram', 'qcow', diff --git a/blktap.patch b/blktap.patch index 59cc25e..eefcac8 100644 --- a/blktap.patch +++ b/blktap.patch @@ -1,10 +1,10 @@ bug #239173 bug #242953 -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -3290,7 +3290,7 @@ class XendDomainInfo: (fn, BOOTLOADER_LOOPBACK_DEVICE)) @@ -14,10 +14,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py 'device': BOOTLOADER_LOOPBACK_DEVICE, } -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -397,9 +397,9 @@ void xenstore_parse_domain_config(int hv { char **e_danger = NULL; @@ -30,7 +30,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c unsigned int len, num, hd_index, pci_devid = 0; BlockDriverState *bs; BlockDriver *format; -@@ -439,6 +439,14 @@ void xenstore_parse_domain_config(int hv +@@ -444,6 +444,14 @@ void xenstore_parse_domain_config(int hv e_danger[i]); if (bpath == NULL) continue; @@ -45,8 +45,8 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c /* read the name of the device */ if (pasprintf(&buf, "%s/dev", bpath) == -1) continue; -@@ -715,6 +723,7 @@ void xenstore_parse_domain_config(int hv - free(danger_type); +@@ -738,6 +746,7 @@ void xenstore_parse_domain_config(int hv + free(mode); free(params); free(dev); + free(btype); diff --git a/blktapctrl-default-to-ioemu.patch b/blktapctrl-default-to-ioemu.patch index f4633c0..6c79a4d 100644 --- a/blktapctrl-default-to-ioemu.patch +++ b/blktapctrl-default-to-ioemu.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h +Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/tapdisk.h -+++ xen-4.0.0-testing/tools/blktap/drivers/tapdisk.h +--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.h ++++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h @@ -168,7 +168,7 @@ static disk_info_t aio_disk = { "raw image (aio)", "aio", diff --git a/block-dmmd b/block-dmmd index eb52a02..cfe81f0 100644 --- a/block-dmmd +++ b/block-dmmd @@ -98,9 +98,9 @@ function activate_lvm () { # First scan for PVs and VGs; we may then have to activate the VG # first, but can ignore errors: - /sbin/pvscan || : - /sbin/vgscan --mknodes || : - /sbin/vgchange -ay ${1%/*} || : +# /sbin/pvscan || : +# /sbin/vgscan --mknodes || : +# /sbin/vgchange -ay ${1%/*} || : /sbin/lvchange -ay $1 return $? } @@ -110,9 +110,9 @@ function deactivate_lvm () /sbin/lvchange -an $1 if [ $? -eq 0 ]; then # We may have to deactivate the VG now, but can ignore errors: - /sbin/vgchange -an ${1%/*} || : +# /sbin/vgchange -an ${1%/*} || : # Maybe we need to cleanup the LVM cache: - /sbin/vgscan --mknodes || : +# /sbin/vgscan --mknodes || : return 0 fi return 1 diff --git a/block-flags.diff b/block-flags.diff deleted file mode 100644 index 7eae479..0000000 --- a/block-flags.diff +++ /dev/null @@ -1,34 +0,0 @@ -Index: xen-3.5.0-testing/tools/hotplug/Linux/block -=================================================================== ---- xen-3.5.0-testing.orig/tools/hotplug/Linux/block -+++ xen-3.5.0-testing/tools/hotplug/Linux/block -@@ -225,11 +225,14 @@ case "$command" in - ;; - - file) -+ lo_flags="" -+ [ "${mode/S}" = "$mode" ] || lo_flags="-y" - # Canonicalise the file, for sharing check comparison, and the mode - # for ease of use here. - file=$(readlink -f "$p") || fatal "$p does not exist." - test -f "$file" || fatal "$file does not exist." - mode=$(canonicalise_mode "$mode") -+ [ "$mode" = "r" ] && lo_flags="$lo_flags -r" - - claim_lock "block" - -@@ -338,12 +341,12 @@ mount it read-write in a guest domain." - fatal 'Failed to find an unused loop device' - fi - -- losetup "$loopdev" "$file" && losetup_failure="" && break -+ losetup $lo_flags "$loopdev" "$file" && losetup_failure="" && break - done - - if [ "$losetup_failure" ] - then -- fatal 'losetup $loopdev $file' -+ fatal 'losetup $lo_flags $loopdev $file' - fi - - xenstore_write "$XENBUS_PATH/node" "$loopdev" diff --git a/block-losetup-retry.diff b/block-losetup-retry.diff deleted file mode 100644 index ea3d73c..0000000 --- a/block-losetup-retry.diff +++ /dev/null @@ -1,211 +0,0 @@ -Index: xen-3.5.0-testing/tools/hotplug/Linux/block -=================================================================== ---- xen-3.5.0-testing.orig/tools/hotplug/Linux/block -+++ xen-3.5.0-testing/tools/hotplug/Linux/block -@@ -241,107 +241,111 @@ case "$command" in - mount it read-write in a guest domain." - fi - -- loopdev='' -- for dev in /dev/loop* -+ losetup_failure=1 -+ for do_losetup in 1 2 3 - do -- if [ ! -b "$dev" ] -- then -- continue -- fi -- -- f=$(losetup "$dev" 2>/dev/null) || f='' -- -- if [ "$f" ] -- then -- # $dev is in use. Check sharing. -- if [ "x$mode" = 'x!' ] -+ loopdev='' -+ for dev in /dev/loop* -+ do -+ if [ ! -b "$dev" ] - then - continue - fi - -- f=$(echo "$f" | sed -e 's/.*(\(.*\)).*/\1/g') -+ f=$(losetup "$dev" 2>/dev/null) || f='' - -- # $f is the filename, as read from losetup, but the loopback -- # driver truncates filenames at 64 characters, so we need to go -- # trawling through the store if it's longer than that. Truncation -- # is indicated by an asterisk at the end of the filename. -- if expr index "$f" '*' >/dev/null -+ if [ "$f" ] - then -- found="" -- for dom in $(xenstore-list "$XENBUS_BASE_PATH") -- do -- for domdev in $(xenstore-list "$XENBUS_BASE_PATH/$dom") -+ # $dev is in use. Check sharing. -+ if [ "x$mode" = 'x!' ] -+ then -+ continue -+ fi -+ -+ f=$(echo "$f" | sed -e 's/.*(\(.*\)).*/\1/g') -+ -+ # $f is the filename, as read from losetup, but the loopback -+ # driver truncates filenames at 64 characters, so we need to go -+ # trawling through the store if it's longer than that. Truncation -+ # is indicated by an asterisk at the end of the filename. -+ if expr index "$f" '*' >/dev/null -+ then -+ found="" -+ for dom in $(xenstore-list "$XENBUS_BASE_PATH") - do -- d=$(xenstore_read_default \ -- "$XENBUS_BASE_PATH/$dom/$domdev/node" "") -- if [ "$d" = "$dev" ] -- then -- f=$(xenstore_read "$XENBUS_BASE_PATH/$dom/$domdev/params") -- found=1 -- break 2 -- fi -+ for domdev in $(xenstore-list "$XENBUS_BASE_PATH/$dom") -+ do -+ d=$(xenstore_read_default \ -+ "$XENBUS_BASE_PATH/$dom/$domdev/node" "") -+ if [ "$d" = "$dev" ] -+ then -+ f=$(xenstore_read "$XENBUS_BASE_PATH/$dom/$domdev/params") -+ found=1 -+ break 2 -+ fi -+ done - done -- done - -- if [ ! "$found" ] -- then -- # This loopback device is in use by someone else, so skip it. -- log debug "Loopback sharing check skips device $dev." -- continue -+ if [ ! "$found" ] -+ then -+ # This loopback device is in use by someone else, so skip it. -+ log debug "Loopback sharing check skips device $dev." -+ continue -+ fi - fi -- fi - -- # Canonicalise the filename for the comparison. -+ # Canonicalise the filename for the comparison. - -- # I have seen this readlink fails because the filename given by -- # losetup is only the basename. This cannot happen when the loop -- # device is set up through this script, because file is -- # canonicalised above, but it may happen when loop devices are set -- # up some other way. This readlink may also conceivably fail if -- # the file backing this loop device has been removed. -+ # I have seen this readlink fails because the filename given by -+ # losetup is only the basename. This cannot happen when the loop -+ # device is set up through this script, because file is -+ # canonicalised above, but it may happen when loop devices are set -+ # up some other way. This readlink may also conceivably fail if -+ # the file backing this loop device has been removed. - -- # For maximum safety, in the case that $f does not resolve, we -- # assume that $file and $f are in the same directory. -+ # For maximum safety, in the case that $f does not resolve, we -+ # assume that $file and $f are in the same directory. - -- # If you create a loopback filesystem, remove it and continue to -- # run on it, and then create another file with the same name, then -- # this check will block that -- don't do that. -+ # If you create a loopback filesystem, remove it and continue to -+ # run on it, and then create another file with the same name, then -+ # this check will block that -- don't do that. - -- # If you create loop devices through some other mechanism, use -- # relative filenames, and then use the same filename through this -- # script, then this check will block that -- don't do that either. -+ # If you create loop devices through some other mechanism, use -+ # relative filenames, and then use the same filename through this -+ # script, then this check will block that -- don't do that either. - -- f=$(readlink -f "$f" || echo $(dirname "$file")/$(basename "$f")) -+ f=$(readlink -f "$f" || echo $(dirname "$file")/$(basename "$f")) - - -- if [ "$f" = "$file" ] -- then -- check_file_sharing "$file" "$dev" "$mode" -- fi -- else -- # $dev is not in use, so we'll remember it for use later; we want -- # to finish the sharing check first. -+ if [ "$f" = "$file" ] -+ then -+ check_file_sharing "$file" "$dev" "$mode" -+ fi -+ else -+ # $dev is not in use, so we'll remember it for use later; we want -+ # to finish the sharing check first. - -- if [ "$loopdev" = '' ] -- then -- loopdev="$dev" -+ if [ "$loopdev" = '' ] -+ then -+ loopdev="$dev" -+ fi - fi -+ done -+ -+ if [ "$loopdev" = '' ] -+ then -+ release_lock "block" -+ fatal 'Failed to find an unused loop device' - fi -+ -+ losetup "$loopdev" "$file" && losetup_failure="" && break - done - -- if [ "$loopdev" = '' ] -+ if [ "$losetup_failure" ] - then -- release_lock "block" -- fatal 'Failed to find an unused loop device' -+ fatal 'losetup $loopdev $file' - fi - -- if LANG=C losetup -h 2>&1 | grep read-only >/dev/null -- then -- roflag="-$mode"; roflag="${roflag#-w}"; roflag="${roflag#-!}" -- else -- roflag='' -- fi -- do_or_die losetup $roflag "$loopdev" "$file" - xenstore_write "$XENBUS_PATH/node" "$loopdev" - write_dev "$loopdev" - release_lock "block" -@@ -364,8 +368,18 @@ mount it read-write in a guest domain." - - file) - node=$(xenstore_read "$XENBUS_PATH/node") -- losetup -d "$node" -- exit 0 -+ -+ #In case the loopback is temporarily blocked, retry the losetup -d. -+ for i in 1 2 3 4 5 -+ do -+ if losetup -d "$node" -+ then -+ exit 0 -+ fi -+ sleep 1 -+ done -+ log err "losetup -d $node failed." -+ exit 1 - ;; - - "") diff --git a/bridge-bonding.diff b/bridge-bonding.diff index 0d09fed..c9b0e6e 100644 --- a/bridge-bonding.diff +++ b/bridge-bonding.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge @@ -245,6 +245,9 @@ op_start () { claim_lock "network-bridge" diff --git a/bridge-opensuse.patch b/bridge-opensuse.patch index 40b413d..2c3ed96 100644 --- a/bridge-opensuse.patch +++ b/bridge-opensuse.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge @@ -270,19 +270,19 @@ op_stop () { transfer_addrs ${bridge} ${pdev} if ! ifdown ${bridge}; then diff --git a/bridge-record-creation.patch b/bridge-record-creation.patch index 682ddce..870f007 100644 --- a/bridge-record-creation.patch +++ b/bridge-record-creation.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge @@ -253,6 +253,11 @@ op_start () { create_bridge ${tdev} diff --git a/bridge-vlan.diff b/bridge-vlan.diff index 0aa72f0..897daab 100644 --- a/bridge-vlan.diff +++ b/bridge-vlan.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-bridge @@ -193,6 +193,28 @@ antispoofing () { iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT } diff --git a/build-tapdisk-ioemu.patch b/build-tapdisk-ioemu.patch index 3272ce9..9b9c70d 100644 --- a/build-tapdisk-ioemu.patch +++ b/build-tapdisk-ioemu.patch @@ -15,10 +15,10 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 17 ----------------- 4 files changed, 17 insertions(+), 26 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile -+++ xen-4.0.0-testing/tools/ioemu-remote/Makefile +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile @@ -46,14 +46,6 @@ $(filter %-user,$(SUBDIR_RULES)): libqem recurse-all: $(SUBDIR_RULES) @@ -56,10 +56,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile ###################################################################### # libqemu_common.a: Target independent part of system emulation. The # long term path is to suppress *all* target specific code in case of -Index: xen-4.0.0-testing/tools/ioemu-remote/configure +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/configure =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/configure -+++ xen-4.0.0-testing/tools/ioemu-remote/configure +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/configure ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/configure @@ -1511,7 +1511,7 @@ bsd) ;; esac @@ -69,10 +69,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/configure if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then tools="qemu-img\$(EXESUF) $tools" if [ "$linux" = "yes" ] ; then -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-tool.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-tool.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-tool.c -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-tool.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-tool.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-tool.c @@ -68,7 +68,7 @@ void qemu_bh_delete(QEMUBH *bh) qemu_free(bh); } @@ -82,10 +82,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-tool.c IOCanRWHandler *fd_read_poll, IOHandler *fd_read, IOHandler *fd_write, -Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c -+++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c @@ -12,34 +12,12 @@ extern void qemu_aio_init(void); diff --git a/capslock_enable.patch b/capslock_enable.patch index cdcd18e..dacca9a 100644 --- a/capslock_enable.patch +++ b/capslock_enable.patch @@ -1,7 +1,8 @@ -diff -r c2f19aa8a584 tools/ioemu-remote/vnc.c ---- a/tools/ioemu-remote/vnc.c Wed Apr 07 11:13:49 2010 +0800 -+++ b/tools/ioemu-remote/vnc.c Mon May 24 13:56:22 2010 +0800 -@@ -1326,6 +1326,11 @@ +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c +=================================================================== +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vnc.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c +@@ -1344,6 +1344,11 @@ static void do_key_event(VncState *vs, i } break; case 0x3a: /* CapsLock */ diff --git a/cdrom-removable.patch b/cdrom-removable.patch index 6f07661..a879052 100644 --- a/cdrom-removable.patch +++ b/cdrom-removable.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/server/HalDaemon.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/HalDaemon.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xend/server/HalDaemon.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/HalDaemon.py @@ -0,0 +1,243 @@ +#!/usr/bin/env python +# -*- mode: python; -*- @@ -246,10 +246,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/HalDaemon.py + print 'Falling off end' + + -Index: xen-4.0.0-testing/tools/python/xen/xend/server/Hald.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/Hald.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xend/server/Hald.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/Hald.py @@ -0,0 +1,125 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -376,10 +376,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/Hald.py + watcher.run() + time.sleep(10) + watcher.shutdown() -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvServer.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvServer.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py @@ -56,6 +56,7 @@ from xen.web.SrvDir import SrvDir from SrvRoot import SrvRoot @@ -397,10 +397,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py def create(): root = SrvDir() -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -18,6 +18,7 @@ #include "exec-all.h" #include "sysemu.h" @@ -409,7 +409,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c #include "hw.h" #include "pci.h" #include "qemu-timer.h" -@@ -548,6 +549,21 @@ void xenstore_parse_domain_config(int hv +@@ -553,6 +554,21 @@ void xenstore_parse_domain_config(int hv #endif bs = bdrv_new(dev); @@ -431,7 +431,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c /* check if it is a cdrom */ if (danger_type && !strcmp(danger_type, "cdrom")) { bdrv_set_type_hint(bs, BDRV_TYPE_CDROM); -@@ -938,6 +954,50 @@ void xenstore_record_dm_state(const char +@@ -961,6 +977,50 @@ void xenstore_record_dm_state(const char xenstore_record_dm("state", state); } @@ -482,7 +482,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c void xenstore_process_event(void *opaque) { char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL; -@@ -968,6 +1028,11 @@ void xenstore_process_event(void *opaque +@@ -991,6 +1051,11 @@ void xenstore_process_event(void *opaque xenstore_watch_callbacks[i].cb(vec[XS_WATCH_TOKEN], xenstore_watch_callbacks[i].opaque); diff --git a/check_device_status.patch b/check_device_status.patch new file mode 100644 index 0000000..983b104 --- /dev/null +++ b/check_device_status.patch @@ -0,0 +1,48 @@ +diff -r ce65e0e03a57 tools/python/xen/xend/server/DevController.py +--- a/tools/python/xen/xend/server/DevController.py Fri Aug 27 16:53:00 2010 +0800 ++++ b/tools/python/xen/xend/server/DevController.py Fri Aug 27 17:13:32 2010 +0800 +@@ -149,7 +149,10 @@ + (status, err) = self.waitForBackend(devid) + + if status == Timeout: +- self.destroyDevice(devid, False) ++ #Clean timeout backend resource ++ dev = self.convertToDeviceNumber(devid) ++ self.writeBackend(dev, HOTPLUG_STATUS_NODE, HOTPLUG_STATUS_ERROR) ++ self.destroyDevice(devid, True) + raise VmError("Device %s (%s) could not be connected. " + "Hotplug scripts not working." % + (devid, self.deviceClass)) +@@ -554,7 +557,17 @@ + + xswatch(statusPath, hotplugStatusCallback, ev, result) + +- ev.wait(DEVICE_CREATE_TIMEOUT) ++ for i in range(1, 50): ++ ev.wait(DEVICE_CREATE_TIMEOUT/50) ++ status = xstransact.Read(statusPath) ++ if status is not None: ++ if status == HOTPLUG_STATUS_ERROR: ++ result['status'] = Error ++ elif status == HOTPLUG_STATUS_BUSY: ++ result['status'] = Busy ++ else: ++ result['status'] = Connected ++ break + + err = xstransact.Read(backpath, HOTPLUG_ERROR_NODE) + +@@ -571,7 +584,12 @@ + + xswatch(statusPath, deviceDestroyCallback, ev, result) + +- ev.wait(DEVICE_DESTROY_TIMEOUT) ++ for i in range(1, 50): ++ ev.wait(DEVICE_DESTROY_TIMEOUT/50) ++ status = xstransact.Read(statusPath) ++ if status is None: ++ result['status'] = Disconnected ++ break + + return result['status'] + diff --git a/checkpoint-rename.patch b/checkpoint-rename.patch index 4471a6c..a6032d5 100644 --- a/checkpoint-rename.patch +++ b/checkpoint-rename.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py @@ -165,7 +165,7 @@ def save(fd, dominfo, network, live, dst dominfo.destroy() dominfo.testDeviceComplete() diff --git a/cpu-pools-docs.patch b/cpu-pools-docs.patch index 9e4e493..a04e4ce 100644 --- a/cpu-pools-docs.patch +++ b/cpu-pools-docs.patch @@ -1,5 +1,7 @@ ---- a/docs/xen-api/coversheet.tex -+++ b/docs/xen-api/coversheet.tex +Index: xen-4.0.1-testing/docs/xen-api/coversheet.tex +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/coversheet.tex ++++ xen-4.0.1-testing/docs/xen-api/coversheet.tex @@ -52,6 +52,7 @@ Mike Day, IBM & Daniel Veillard, Red Hat Jim Fehlig, Novell & Tom Wilkie, University of Cambridge \\ Jon Harrop, XenSource & Yosuke Iwamatsu, NEC \\ @@ -8,8 +10,10 @@ \end{tabular} \end{large} ---- a/docs/xen-api/revision-history.tex -+++ b/docs/xen-api/revision-history.tex +Index: xen-4.0.1-testing/docs/xen-api/revision-history.tex +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/revision-history.tex ++++ xen-4.0.1-testing/docs/xen-api/revision-history.tex @@ -50,6 +50,12 @@ between classes. Added host.PSCSI\_HBAs and VM.DSCSI\_HBAs fields.\tabularnewline @@ -23,8 +27,10 @@ \end{tabular} \end{center} \end{flushleft} ---- a/docs/xen-api/xenapi-coversheet.tex -+++ b/docs/xen-api/xenapi-coversheet.tex +Index: xen-4.0.1-testing/docs/xen-api/xenapi-coversheet.tex +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/xenapi-coversheet.tex ++++ xen-4.0.1-testing/docs/xen-api/xenapi-coversheet.tex @@ -17,12 +17,12 @@ \newcommand{\coversheetlogo}{xen.eps} @@ -40,8 +46,10 @@ %% Document authors \newcommand{\docauthors}{ ---- a/docs/xen-api/xenapi-datamodel-graph.dot -+++ b/docs/xen-api/xenapi-datamodel-graph.dot +Index: xen-4.0.1-testing/docs/xen-api/xenapi-datamodel-graph.dot +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/xenapi-datamodel-graph.dot ++++ xen-4.0.1-testing/docs/xen-api/xenapi-datamodel-graph.dot @@ -14,7 +14,7 @@ fontname="Verdana"; node [ shape=box ]; session VM host network VIF PIF SR VDI VBD PBD user; @@ -59,8 +67,10 @@ +cpu_pool -> VM [ arrowhead="crow", arrowtail="none" ] +host -> cpu_pool [ arrowhead="crow", arrowtail="none" ] } ---- a/docs/xen-api/xenapi-datamodel.tex -+++ b/docs/xen-api/xenapi-datamodel.tex +Index: xen-4.0.1-testing/docs/xen-api/xenapi-datamodel.tex +=================================================================== +--- xen-4.0.1-testing.orig/docs/xen-api/xenapi-datamodel.tex ++++ xen-4.0.1-testing/docs/xen-api/xenapi-datamodel.tex @@ -56,6 +56,7 @@ Name & Description \\ {\tt debug} & A basic class for testing \\ {\tt XSPolicy} & A class for handling Xen Security Policies \\ @@ -79,7 +89,7 @@ \hline \end{tabular}\end{center} -@@ -499,6 +503,56 @@ error code and a message describing the +@@ -499,6 +503,56 @@ error code and a message describing the \begin{verbatim}SECURITY_ERROR(xserr, message)\end{verbatim} \begin{center}\rule{10em}{0.1pt}\end{center} diff --git a/cpu-pools-libxc.patch b/cpu-pools-libxc.patch index 65cd57d..7dafe02 100644 --- a/cpu-pools-libxc.patch +++ b/cpu-pools-libxc.patch @@ -1,5 +1,7 @@ ---- a/tools/libxc/Makefile -+++ b/tools/libxc/Makefile +Index: xen-4.0.1-testing/tools/libxc/Makefile +=================================================================== +--- xen-4.0.1-testing.orig/tools/libxc/Makefile ++++ xen-4.0.1-testing/tools/libxc/Makefile @@ -8,6 +8,7 @@ CTRL_SRCS-y := CTRL_SRCS-y += xc_core.c CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c @@ -8,8 +10,10 @@ CTRL_SRCS-y += xc_domain.c CTRL_SRCS-y += xc_evtchn.c CTRL_SRCS-y += xc_misc.c +Index: xen-4.0.1-testing/tools/libxc/xc_cpupool.c +=================================================================== --- /dev/null -+++ b/tools/libxc/xc_cpupool.c ++++ xen-4.0.1-testing/tools/libxc/xc_cpupool.c @@ -0,0 +1,165 @@ +/****************************************************************************** + * xc_cpupool.c @@ -176,8 +180,10 @@ + + return 0; +} ---- a/tools/libxc/xc_domain.c -+++ b/tools/libxc/xc_domain.c +Index: xen-4.0.1-testing/tools/libxc/xc_domain.c +=================================================================== +--- xen-4.0.1-testing.orig/tools/libxc/xc_domain.c ++++ xen-4.0.1-testing/tools/libxc/xc_domain.c @@ -220,6 +220,7 @@ int xc_domain_getinfo(int xc_handle, info->cpu_time = domctl.u.getdomaininfo.cpu_time; info->nr_online_vcpus = domctl.u.getdomaininfo.nr_online_vcpus; @@ -186,9 +192,11 @@ memcpy(info->handle, domctl.u.getdomaininfo.handle, sizeof(xen_domain_handle_t)); ---- a/tools/libxc/xenctrl.h -+++ b/tools/libxc/xenctrl.h -@@ -171,6 +171,7 @@ typedef struct xc_dominfo { +Index: xen-4.0.1-testing/tools/libxc/xenctrl.h +=================================================================== +--- xen-4.0.1-testing.orig/tools/libxc/xenctrl.h ++++ xen-4.0.1-testing/tools/libxc/xenctrl.h +@@ -161,6 +161,7 @@ typedef struct xc_dominfo { unsigned int nr_online_vcpus; unsigned int max_vcpu_id; xen_domain_handle_t handle; @@ -196,7 +204,7 @@ } xc_dominfo_t; typedef xen_domctl_getdomaininfo_t xc_domaininfo_t; -@@ -502,6 +503,100 @@ int xc_domain_setdebugging(int xc_handle +@@ -492,6 +493,100 @@ int xc_domain_setdebugging(int xc_handle unsigned int enable); /* diff --git a/cpu-pools-libxen.patch b/cpu-pools-libxen.patch index bb4ab33..14d4be7 100644 --- a/cpu-pools-libxen.patch +++ b/cpu-pools-libxen.patch @@ -1,17 +1,17 @@ -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_all.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_all.h =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_all.h -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_all.h +--- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_all.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_all.h @@ -37,4 +37,5 @@ #include #include #include +#include #endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool.h @@ -0,0 +1,424 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -437,10 +437,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool.h + + +#endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -472,10 +472,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_cpu_pool_decl.h +struct xen_cpu_pool_record_opt_set; + +#endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host.h =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_host.h -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host.h +--- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_host.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host.h @@ -29,7 +29,7 @@ #include #include @@ -505,10 +505,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host.h + xen_host host); + #endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host_cpu.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host_cpu.h =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_host_cpu.h -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host_cpu.h +--- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_host_cpu.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_host_cpu.h @@ -22,6 +22,7 @@ #include #include @@ -544,10 +544,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_host_cpu.h + + #endif -Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_vm.h +Index: xen-4.0.1-testing/tools/libxen/include/xen/api/xen_vm.h =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/include/xen/api/xen_vm.h -+++ xen-4.0.0-testing/tools/libxen/include/xen/api/xen_vm.h +--- xen-4.0.1-testing.orig/tools/libxen/include/xen/api/xen_vm.h ++++ xen-4.0.1-testing/tools/libxen/include/xen/api/xen_vm.h @@ -34,6 +34,7 @@ #include #include @@ -599,10 +599,10 @@ Index: xen-4.0.0-testing/tools/libxen/include/xen/api/xen_vm.h +xen_vm_cpu_pool_migrate(xen_session *session, xen_vm vm, xen_cpu_pool cpu_pool); + #endif -Index: xen-4.0.0-testing/tools/libxen/src/xen_cpu_pool.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_cpu_pool.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/libxen/src/xen_cpu_pool.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_cpu_pool.c @@ -0,0 +1,671 @@ +/* + * Copyright (c) 2006-2007, XenSource Inc. @@ -1275,10 +1275,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_cpu_pool.c + return session->ok; +} + -Index: xen-4.0.0-testing/tools/libxen/src/xen_host.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_host.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_host.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_host.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_host.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_host.c @@ -30,6 +30,7 @@ #include #include @@ -1330,10 +1330,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_host.c + return session->ok; +} + -Index: xen-4.0.0-testing/tools/libxen/src/xen_host_cpu.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_host_cpu.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_host_cpu.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_host_cpu.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_host_cpu.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_host_cpu.c @@ -24,6 +24,7 @@ #include #include @@ -1397,10 +1397,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_host_cpu.c + + + -Index: xen-4.0.0-testing/tools/libxen/src/xen_vm.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_vm.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_vm.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_vm.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_vm.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_vm.c @@ -36,6 +36,7 @@ #include #include @@ -1504,10 +1504,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_vm.c +} + + -Index: xen-4.0.0-testing/tools/libxen/test/test_bindings.c +Index: xen-4.0.1-testing/tools/libxen/test/test_bindings.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/test/test_bindings.c -+++ xen-4.0.0-testing/tools/libxen/test/test_bindings.c +--- xen-4.0.1-testing.orig/tools/libxen/test/test_bindings.c ++++ xen-4.0.1-testing/tools/libxen/test/test_bindings.c @@ -28,6 +28,7 @@ #include diff --git a/cpu-pools-python.patch b/cpu-pools-python.patch index 49b0364..21472db 100644 --- a/cpu-pools-python.patch +++ b/cpu-pools-python.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c +Index: xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/lowlevel/xc/xc.c -+++ xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c +--- xen-4.0.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c ++++ xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c @@ -106,8 +106,8 @@ static PyObject *pyxc_domain_create(XcOb static char *kwd_list[] = { "domid", "ssidref", "handle", "flags", "target", NULL }; @@ -289,10 +289,10 @@ Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c { NULL, NULL, 0, NULL } }; -Index: xen-4.0.0-testing/tools/python/xen/util/sxputils.py +Index: xen-4.0.1-testing/tools/python/xen/util/sxputils.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/util/sxputils.py ++++ xen-4.0.1-testing/tools/python/xen/util/sxputils.py @@ -0,0 +1,64 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -358,10 +358,10 @@ Index: xen-4.0.0-testing/tools/python/xen/util/sxputils.py + return sxphash + + -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py @@ -51,6 +51,7 @@ from XendDPCI import XendDPCI from XendPSCSI import XendPSCSI, XendPSCSI_HBA from XendDSCSI import XendDSCSI, XendDSCSI_HBA @@ -553,10 +553,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py # Xen API: Class VBD # ---------------------------------------------------------------- -Index: xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py @@ -0,0 +1,903 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -1461,10 +1461,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py + + unbound_cpus = classmethod(unbound_cpus) + -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -134,6 +134,7 @@ XENAPI_CFG_TO_LEGACY_CFG = { 'PV_bootloader': 'bootloader', 'PV_bootloader_args': 'bootloader_args', @@ -1505,10 +1505,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py 'superpages': 0, 'description': '', } -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConstants.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConstants.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConstants.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConstants.py @@ -133,6 +133,8 @@ VTPM_DELETE_SCRIPT = auxbin.scripts_dir( XS_VMROOT = "/vm/" @@ -1518,10 +1518,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py NR_PCI_FUNC = 8 NR_PCI_DEV = 32 NR_PCI_DEVFN = NR_PCI_FUNC * NR_PCI_DEV -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -60,6 +60,7 @@ from xen.xend.xenstore.xsutil import Get from xen.xend.xenstore.xswatch import xswatch from xen.xend.XendConstants import * @@ -1574,10 +1574,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py def get_power_state(self): return XEN_API_VM_POWER_STATE[self._stateGet()] def get_platform(self): -Index: xen-4.0.0-testing/tools/python/xen/xend/XendError.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendError.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendError.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendError.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendError.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendError.py @@ -18,6 +18,7 @@ from xmlrpclib import Fault @@ -1613,10 +1613,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendError.py class VDIError(XendAPIError): def __init__(self, error, vdi): XendAPIError.__init__(self) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py @@ -43,6 +43,7 @@ from XendStateStore import XendStateStor from XendMonitor import XendMonitor from XendPPCI import XendPPCI @@ -1690,10 +1690,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py 'max_free_memory', 'max_para_memory', 'max_hvm_memory', -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvServer.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvServer.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvServer.py @@ -52,6 +52,7 @@ from xen.xend import XendNode, XendOptio from xen.xend.XendLogging import log from xen.xend.XendClient import XEN_API_SOCKET @@ -1715,10 +1715,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvServer.py # Reaching this point means we can auto start domains try: xenddomain().autostart_domains() -Index: xen-4.0.0-testing/tools/python/xen/xend/server/XMLRPCServer.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/XMLRPCServer.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/XMLRPCServer.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/XMLRPCServer.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/XMLRPCServer.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/XMLRPCServer.py @@ -33,6 +33,7 @@ from xen.xend.XendClient import XML_RPC_ from xen.xend.XendConstants import DOM_STATE_RUNNING from xen.xend.XendLogging import log @@ -1750,10 +1750,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/XMLRPCServer.py # Functions in XendNode and XendDmesg for type, lst, n in [(XendNode, ['info', 'pciinfo', 'send_debug_keys', -Index: xen-4.0.0-testing/tools/python/xen/xm/create.dtd +Index: xen-4.0.1-testing/tools/python/xen/xm/create.dtd =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.dtd -+++ xen-4.0.0-testing/tools/python/xen/xm/create.dtd +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.dtd ++++ xen-4.0.1-testing/tools/python/xen/xm/create.dtd @@ -50,6 +50,7 @@ s3_integrity CDATA #REQUIRED vcpus_max CDATA #REQUIRED @@ -1762,10 +1762,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.dtd actions_after_shutdown %NORMAL_EXIT; #REQUIRED actions_after_reboot %NORMAL_EXIT; #REQUIRED actions_after_crash %CRASH_BEHAVIOUR; #REQUIRED -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py @@ -659,6 +659,10 @@ gopts.var('suppress_spurious_page_faults fn=set_bool, default=None, use="""Do not inject spurious page faults into this guest""") @@ -1777,7 +1777,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py gopts.var('pci_msitranslate', val='TRANSLATE', fn=set_int, default=1, use="""Global PCI MSI-INTx translation flag (0=disable; -@@ -1149,6 +1153,8 @@ def make_config(vals): +@@ -1157,6 +1161,8 @@ def make_config(vals): config.append(['localtime', vals.localtime]) if vals.oos: config.append(['oos', vals.oos]) @@ -1786,10 +1786,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py config_image = configure_image(vals) if vals.bootloader: -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py @@ -56,6 +56,7 @@ from xen.util.xmlrpcclient import Server import xen.util.xsm.xsm as security from xen.util.xsm.xsm import XSMError @@ -1939,7 +1939,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py if use_long: map(PrettyPrint.prettyprint, doms) -@@ -1839,6 +1892,13 @@ def xm_info(args): +@@ -1841,6 +1894,13 @@ def xm_info(args): else: return "" @@ -1953,7 +1953,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py info = { "host": getVal(["name_label"]), "release": getVal(["software_version", "release"]), -@@ -1850,6 +1910,7 @@ def xm_info(args): +@@ -1852,6 +1912,7 @@ def xm_info(args): "threads_per_core": getVal(["cpu_configuration", "threads_per_core"]), "cpu_mhz": getCpuMhz(), "hw_caps": getCpuFeatures(), @@ -1961,7 +1961,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py "total_memory": int(host_metrics_record["memory_total"])/1024/1024, "free_memory": int(host_metrics_record["memory_free"])/1024/1024, "xen_major": getVal(["software_version", "xen_major"]), -@@ -3484,6 +3545,169 @@ def xm_tmem_shared_auth(args): +@@ -3486,6 +3547,169 @@ def xm_tmem_shared_auth(args): else: return server.xend.node.tmem_shared_auth(domid,uuid_str,auth) @@ -2131,7 +2131,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py commands = { "shell": xm_shell, -@@ -3569,6 +3793,14 @@ commands = { +@@ -3571,6 +3795,14 @@ commands = { "usb-list-assignable-devices": xm_usb_list_assignable_devices, "usb-hc-create": xm_usb_hc_create, "usb-hc-destroy": xm_usb_hc_destroy, @@ -2146,7 +2146,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py # tmem "tmem-thaw": xm_tmem_thaw, "tmem-freeze": xm_tmem_freeze, -@@ -3602,6 +3834,8 @@ IMPORTED_COMMANDS = [ +@@ -3604,6 +3836,8 @@ IMPORTED_COMMANDS = [ 'resetpolicy', 'getenforce', 'setenforce', @@ -2155,10 +2155,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py ] for c in IMPORTED_COMMANDS: -Index: xen-4.0.0-testing/tools/python/xen/xm/pool-create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/pool-create.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool-create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/pool-create.py @@ -0,0 +1,51 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2211,10 +2211,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/pool-create.py +if __name__ == '__main__': + main(sys.argv) + -Index: xen-4.0.0-testing/tools/python/xen/xm/pool-new.py +Index: xen-4.0.1-testing/tools/python/xen/xm/pool-new.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool-new.py ++++ xen-4.0.1-testing/tools/python/xen/xm/pool-new.py @@ -0,0 +1,50 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2266,10 +2266,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/pool-new.py +if __name__ == '__main__': + main(sys.argv) + -Index: xen-4.0.0-testing/tools/python/xen/xm/pool.py +Index: xen-4.0.1-testing/tools/python/xen/xm/pool.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool.py ++++ xen-4.0.1-testing/tools/python/xen/xm/pool.py @@ -0,0 +1,236 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2507,10 +2507,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/pool.py +def help(): + return str(GOPTS) + -Index: xen-4.0.0-testing/tools/python/xen/xm/xenapi_create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/xenapi_create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/xenapi_create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/xenapi_create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/xenapi_create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/xenapi_create.py @@ -310,6 +310,8 @@ class xenapi_create: get_child_nodes_as_dict(vm, "platform", "key", "value"), "other_config": diff --git a/cpu-pools-xmtest.patch b/cpu-pools-xmtest.patch index dfc3117..8501b53 100644 --- a/cpu-pools-xmtest.patch +++ b/cpu-pools-xmtest.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/xm-test/configure.ac +Index: xen-4.0.1-testing/tools/xm-test/configure.ac =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/configure.ac -+++ xen-4.0.0-testing/tools/xm-test/configure.ac +--- xen-4.0.1-testing.orig/tools/xm-test/configure.ac ++++ xen-4.0.1-testing/tools/xm-test/configure.ac @@ -161,6 +161,7 @@ AC_CONFIG_FILES([ tests/vtpm/Makefile tests/xapi/Makefile @@ -10,16 +10,16 @@ Index: xen-4.0.0-testing/tools/xm-test/configure.ac lib/XmTestReport/xmtest.py lib/XmTestLib/config.py ]) -Index: xen-4.0.0-testing/tools/xm-test/grouptest/cpupool +Index: xen-4.0.1-testing/tools/xm-test/grouptest/cpupool =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/grouptest/cpupool ++++ xen-4.0.1-testing/tools/xm-test/grouptest/cpupool @@ -0,0 +1 @@ +cpupool -Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/NetConfig.py +Index: xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/NetConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/lib/XmTestLib/NetConfig.py -+++ xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/NetConfig.py +--- xen-4.0.1-testing.orig/tools/xm-test/lib/XmTestLib/NetConfig.py ++++ xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/NetConfig.py @@ -56,17 +56,21 @@ def getXendNetConfig(): val = pin.get_val() while val[0] != 'network-script': @@ -51,10 +51,10 @@ Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/NetConfig.py configfile.close() return netenv -Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/XenDomain.py +Index: xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/XenDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/lib/XmTestLib/XenDomain.py -+++ xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/XenDomain.py +--- xen-4.0.1-testing.orig/tools/xm-test/lib/XmTestLib/XenDomain.py ++++ xen-4.0.1-testing/tools/xm-test/lib/XmTestLib/XenDomain.py @@ -181,6 +181,7 @@ class XenDomain: if not self.isManaged: @@ -63,10 +63,10 @@ Index: xen-4.0.0-testing/tools/xm-test/lib/XmTestLib/XenDomain.py else: ret, output = traceCommand("xm new %s" % self.config) if ret != 0: -Index: xen-4.0.0-testing/tools/xm-test/runtest.sh +Index: xen-4.0.1-testing/tools/xm-test/runtest.sh =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/runtest.sh -+++ xen-4.0.0-testing/tools/xm-test/runtest.sh +--- xen-4.0.1-testing.orig/tools/xm-test/runtest.sh ++++ xen-4.0.1-testing/tools/xm-test/runtest.sh @@ -91,7 +91,7 @@ runnable_tests() { echo "Error: ramdisk/initrd.img is from an old version, or is not for this " echo "architecture ($ARCH)." @@ -76,10 +76,10 @@ Index: xen-4.0.0-testing/tools/xm-test/runtest.sh fi # See if xend is running -Index: xen-4.0.0-testing/tools/xm-test/tests/Makefile.am +Index: xen-4.0.1-testing/tools/xm-test/tests/Makefile.am =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/tests/Makefile.am -+++ xen-4.0.0-testing/tools/xm-test/tests/Makefile.am +--- xen-4.0.1-testing.orig/tools/xm-test/tests/Makefile.am ++++ xen-4.0.1-testing/tools/xm-test/tests/Makefile.am @@ -28,7 +28,8 @@ SUBDIRS = \ vcpu-pin \ vtpm \ @@ -90,10 +90,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/Makefile.am EXTRA_DIST = $(SUBDIRS) Makefile.am.template -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py @@ -0,0 +1,72 @@ +#!/usr/bin/python + @@ -167,10 +167,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/01_cpupool_basic_pos.py +destroyAllDomUs() + + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py @@ -0,0 +1,152 @@ +#!/usr/bin/python + @@ -324,10 +324,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/02_cpupool_manage_pos.py + FAIL("'Pool-1' not deleted") + + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py @@ -0,0 +1,126 @@ +#!/usr/bin/python + @@ -455,10 +455,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/03_cpupool_domain.py +for pool in pool_names: + destroyPool(pool, True) + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py @@ -0,0 +1,84 @@ +#!/usr/bin/python + @@ -544,10 +544,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/04_cpupool_migrate.py +# +cleanupPoolsDomains() + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/Makefile.am +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/Makefile.am =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/Makefile.am ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/Makefile.am @@ -0,0 +1,22 @@ +SUBDIRS = + @@ -571,16 +571,16 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/Makefile.am + rm -f *log + rm -f *~ + -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/pool1.cfg +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/pool1.cfg =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/pool1.cfg ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/pool1.cfg @@ -0,0 +1 @@ +name="Pool-1" -Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/pools.py +Index: xen-4.0.1-testing/tools/xm-test/tests/cpupool/pools.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/cpupool/pools.py ++++ xen-4.0.1-testing/tools/xm-test/tests/cpupool/pools.py @@ -0,0 +1,78 @@ +#!/usr/bin/python + @@ -660,10 +660,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/cpupool/pools.py + break + time.sleep(1) + -Index: xen-4.0.0-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py +Index: xen-4.0.1-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py ++++ xen-4.0.1-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py @@ -0,0 +1,157 @@ +#!/usr/bin/python + @@ -822,10 +822,10 @@ Index: xen-4.0.0-testing/tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py +if pool1 in session.xenapi.cpu_pool.get_all(): + FAIL("cpu_pool.destroy() has not removed pool") + -Index: xen-4.0.0-testing/tools/xm-test/tests/xapi/Makefile.am +Index: xen-4.0.1-testing/tools/xm-test/tests/xapi/Makefile.am =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/tests/xapi/Makefile.am -+++ xen-4.0.0-testing/tools/xm-test/tests/xapi/Makefile.am +--- xen-4.0.1-testing.orig/tools/xm-test/tests/xapi/Makefile.am ++++ xen-4.0.1-testing/tools/xm-test/tests/xapi/Makefile.am @@ -3,7 +3,8 @@ SUBDIRS = TESTS = 01_xapi-vm_basic.test \ 02_xapi-vbd_basic.test \ diff --git a/cpupools-core-fixup.patch b/cpupools-core-fixup.patch index a07a7de..1401cf4 100644 --- a/cpupools-core-fixup.patch +++ b/cpupools-core-fixup.patch @@ -9,9 +9,11 @@ missing adjustments get detected at build time) - remove boot time per-CPU pool assignment messages (bnc#572146) ---- a/xen/arch/x86/domain.c -+++ b/xen/arch/x86/domain.c -@@ -1581,6 +1581,7 @@ int continue_hypercall_on_cpu(int cpu, v +Index: xen-4.0.1-testing/xen/arch/x86/domain.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/domain.c ++++ xen-4.0.1-testing/xen/arch/x86/domain.c +@@ -1585,6 +1585,7 @@ int continue_hypercall_on_cpu(int cpu, v v->arch.schedule_tail = continue_hypercall_on_cpu_helper; v->arch.continue_info = info; @@ -19,7 +21,7 @@ } else { -@@ -1591,8 +1592,7 @@ int continue_hypercall_on_cpu(int cpu, v +@@ -1595,8 +1596,7 @@ int continue_hypercall_on_cpu(int cpu, v info->func = func; info->data = data; @@ -29,8 +31,10 @@ raise_softirq(SCHEDULE_SOFTIRQ); /* Dummy return value will be overwritten by new schedule_tail. */ ---- a/xen/common/sched_credit.c -+++ b/xen/common/sched_credit.c +Index: xen-4.0.1-testing/xen/common/sched_credit.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/sched_credit.c ++++ xen-4.0.1-testing/xen/common/sched_credit.c @@ -176,7 +176,6 @@ struct csched_private { /* * Global variables @@ -54,8 +58,10 @@ .init_domain = csched_dom_init, .destroy_domain = csched_dom_destroy, ---- a/xen/common/softirq.c -+++ b/xen/common/softirq.c +Index: xen-4.0.1-testing/xen/common/softirq.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/softirq.c ++++ xen-4.0.1-testing/xen/common/softirq.c @@ -104,12 +104,15 @@ static void tasklet_schedule_list(struct { BUG_ON(!list_empty(&t->list)); @@ -99,8 +105,10 @@ } /* ---- a/xen/include/public/domctl.h -+++ b/xen/include/public/domctl.h +Index: xen-4.0.1-testing/xen/include/public/domctl.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/public/domctl.h ++++ xen-4.0.1-testing/xen/include/public/domctl.h @@ -35,7 +35,7 @@ #include "xen.h" #include "grant_table.h" @@ -110,8 +118,10 @@ struct xenctl_cpumap { XEN_GUEST_HANDLE_64(uint8) bitmap; ---- a/xen/include/xen/softirq.h -+++ b/xen/include/xen/softirq.h +Index: xen-4.0.1-testing/xen/include/xen/softirq.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/softirq.h ++++ xen-4.0.1-testing/xen/include/xen/softirq.h @@ -50,15 +50,17 @@ struct tasklet bool_t is_scheduled; bool_t is_running; diff --git a/cpupools-core.patch b/cpupools-core.patch index 09fbf44..48932a4 100644 --- a/cpupools-core.patch +++ b/cpupools-core.patch @@ -1,9 +1,9 @@ From: Juergen Gross -Index: xen-4.0.0-testing/xen/arch/x86/acpi/power.c +Index: xen-4.0.1-testing/xen/arch/x86/acpi/power.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/acpi/power.c -+++ xen-4.0.0-testing/xen/arch/x86/acpi/power.c +--- xen-4.0.1-testing.orig/xen/arch/x86/acpi/power.c ++++ xen-4.0.1-testing/xen/arch/x86/acpi/power.c @@ -234,7 +234,7 @@ static int enter_state(u32 state) return error; } @@ -22,11 +22,11 @@ Index: xen-4.0.0-testing/xen/arch/x86/acpi/power.c } static int acpi_get_wake_status(void) -Index: xen-4.0.0-testing/xen/arch/x86/domain.c +Index: xen-4.0.1-testing/xen/arch/x86/domain.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/domain.c -+++ xen-4.0.0-testing/xen/arch/x86/domain.c -@@ -1518,42 +1518,52 @@ void sync_vcpu_execstate(struct vcpu *v) +--- xen-4.0.1-testing.orig/xen/arch/x86/domain.c ++++ xen-4.0.1-testing/xen/arch/x86/domain.c +@@ -1522,42 +1522,52 @@ void sync_vcpu_execstate(struct vcpu *v) } struct migrate_info { @@ -96,7 +96,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/domain.c info = v->arch.continue_info; if ( info == NULL ) -@@ -1562,16 +1572,12 @@ int continue_hypercall_on_cpu(int cpu, l +@@ -1566,16 +1576,12 @@ int continue_hypercall_on_cpu(int cpu, l if ( info == NULL ) return -ENOMEM; @@ -117,7 +117,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/domain.c v->arch.schedule_tail = continue_hypercall_on_cpu_helper; v->arch.continue_info = info; -@@ -1579,17 +1585,17 @@ int continue_hypercall_on_cpu(int cpu, l +@@ -1583,17 +1589,17 @@ int continue_hypercall_on_cpu(int cpu, l else { BUG_ON(info->nest != 0); @@ -139,10 +139,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/domain.c return 0; } -Index: xen-4.0.0-testing/xen/arch/x86/domain_build.c +Index: xen-4.0.1-testing/xen/arch/x86/domain_build.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/domain_build.c -+++ xen-4.0.0-testing/xen/arch/x86/domain_build.c +--- xen-4.0.1-testing.orig/xen/arch/x86/domain_build.c ++++ xen-4.0.1-testing/xen/arch/x86/domain_build.c @@ -9,6 +9,7 @@ #include #include @@ -183,10 +183,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/domain_build.c /* Set up CR3 value for write_ptbase */ if ( paging_mode_enabled(d) ) -Index: xen-4.0.0-testing/xen/arch/x86/microcode.c +Index: xen-4.0.1-testing/xen/arch/x86/microcode.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/microcode.c -+++ xen-4.0.0-testing/xen/arch/x86/microcode.c +--- xen-4.0.1-testing.orig/xen/arch/x86/microcode.c ++++ xen-4.0.1-testing/xen/arch/x86/microcode.c @@ -114,7 +114,7 @@ static int microcode_update_cpu(const vo return err; } @@ -214,11 +214,11 @@ Index: xen-4.0.0-testing/xen/arch/x86/microcode.c + return continue_hypercall_on_cpu(info->cpu, NULL, + do_microcode_update, info); } -Index: xen-4.0.0-testing/xen/arch/x86/mm.c +Index: xen-4.0.1-testing/xen/arch/x86/mm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/mm.c -@@ -242,7 +242,7 @@ void __init arch_init_memory(void) +--- xen-4.0.1-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/mm.c +@@ -243,7 +243,7 @@ void __init arch_init_memory(void) * Any Xen-heap pages that we will allow to be mapped will have * their domain field set to dom_xen. */ @@ -227,7 +227,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/mm.c BUG_ON(dom_xen == NULL); /* -@@ -250,14 +250,14 @@ void __init arch_init_memory(void) +@@ -251,14 +251,14 @@ void __init arch_init_memory(void) * This domain owns I/O pages that are within the range of the page_info * array. Mappings occur at the priv of the caller. */ @@ -244,10 +244,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/mm.c BUG_ON(dom_cow == NULL); /* First 1MB of RAM is historically marked as I/O. */ -Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c +Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/platform_hypercall.c -+++ xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c +--- xen-4.0.1-testing.orig/xen/arch/x86/platform_hypercall.c ++++ xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c @@ -19,6 +19,7 @@ #include #include @@ -280,7 +280,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c cpu_frequency_change_helper, NULL); break; -@@ -403,7 +404,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -406,7 +407,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe g_info = &op->u.pcpu_info; /* spin_trylock() avoids deadlock with stop_machine_run(). */ @@ -289,7 +289,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c { ret = -EBUSY; break; -@@ -426,7 +427,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -429,7 +430,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe g_info->max_present = last_cpu(cpu_present_map); @@ -298,7 +298,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c ret = copy_to_guest(u_xenpf_op, op, 1) ? -EFAULT : 0; } -@@ -467,7 +468,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -470,7 +471,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe break; } ret = continue_hypercall_on_cpu( @@ -307,10 +307,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c break; } break; -Index: xen-4.0.0-testing/xen/arch/x86/setup.c +Index: xen-4.0.1-testing/xen/arch/x86/setup.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/setup.c -+++ xen-4.0.0-testing/xen/arch/x86/setup.c +--- xen-4.0.1-testing.orig/xen/arch/x86/setup.c ++++ xen-4.0.1-testing/xen/arch/x86/setup.c @@ -2,6 +2,7 @@ #include #include @@ -328,7 +328,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/setup.c if ( idle_domain == NULL ) BUG(); idle_domain->vcpu = idle_vcpu; -@@ -1094,8 +1095,13 @@ void __init __start_xen(unsigned long mb +@@ -1122,8 +1123,13 @@ void __init __start_xen(unsigned long mb if ( !tboot_protect_mem_regions() ) panic("Could not protect TXT memory regions\n"); @@ -343,10 +343,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/setup.c if ( (dom0 == NULL) || (alloc_dom0_vcpu0() == NULL) ) panic("Error creating domain 0\n"); -Index: xen-4.0.0-testing/xen/arch/x86/smpboot.c +Index: xen-4.0.1-testing/xen/arch/x86/smpboot.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/smpboot.c -+++ xen-4.0.0-testing/xen/arch/x86/smpboot.c +--- xen-4.0.1-testing.orig/xen/arch/x86/smpboot.c ++++ xen-4.0.1-testing/xen/arch/x86/smpboot.c @@ -39,6 +39,7 @@ #include #include @@ -468,10 +468,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/smpboot.c cpufreq_add_cpu(cpu); return 0; } -Index: xen-4.0.0-testing/xen/arch/x86/sysctl.c +Index: xen-4.0.1-testing/xen/arch/x86/sysctl.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/sysctl.c -+++ xen-4.0.0-testing/xen/arch/x86/sysctl.c +--- xen-4.0.1-testing.orig/xen/arch/x86/sysctl.c ++++ xen-4.0.1-testing/xen/arch/x86/sysctl.c @@ -29,7 +29,7 @@ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) @@ -490,10 +490,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/sysctl.c break; case XEN_SYSCTL_CPU_HOTPLUG_STATUS: ret = 0; -Index: xen-4.0.0-testing/xen/common/Makefile +Index: xen-4.0.1-testing/xen/common/Makefile =================================================================== ---- xen-4.0.0-testing.orig/xen/common/Makefile -+++ xen-4.0.0-testing/xen/common/Makefile +--- xen-4.0.1-testing.orig/xen/common/Makefile ++++ xen-4.0.1-testing/xen/common/Makefile @@ -1,5 +1,6 @@ obj-y += bitmap.o obj-y += cpu.o @@ -501,10 +501,10 @@ Index: xen-4.0.0-testing/xen/common/Makefile obj-y += domctl.o obj-y += domain.o obj-y += event_channel.o -Index: xen-4.0.0-testing/xen/common/cpupool.c +Index: xen-4.0.1-testing/xen/common/cpupool.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/xen/common/cpupool.c ++++ xen-4.0.1-testing/xen/common/cpupool.c @@ -0,0 +1,585 @@ +/****************************************************************************** + * cpupool.c @@ -1091,10 +1091,10 @@ Index: xen-4.0.0-testing/xen/common/cpupool.c + * indent-tabs-mode: nil + * End: + */ -Index: xen-4.0.0-testing/xen/common/domain.c +Index: xen-4.0.1-testing/xen/common/domain.c =================================================================== ---- xen-4.0.0-testing.orig/xen/common/domain.c -+++ xen-4.0.0-testing/xen/common/domain.c +--- xen-4.0.1-testing.orig/xen/common/domain.c ++++ xen-4.0.1-testing/xen/common/domain.c @@ -209,7 +209,7 @@ static void __init parse_extra_guest_irq custom_param("extra_guest_irqs", parse_extra_guest_irqs); @@ -1104,7 +1104,7 @@ Index: xen-4.0.0-testing/xen/common/domain.c { struct domain *d, **pd; enum { INIT_xsm = 1u<<0, INIT_rangeset = 1u<<1, INIT_evtchn = 1u<<2, -@@ -290,6 +290,9 @@ struct domain *domain_create( +@@ -292,6 +292,9 @@ struct domain *domain_create( goto fail; init_status |= INIT_arch; @@ -1114,7 +1114,7 @@ Index: xen-4.0.0-testing/xen/common/domain.c if ( sched_init_domain(d) != 0 ) goto fail; -@@ -597,6 +600,8 @@ static void complete_domain_destroy(stru +@@ -603,6 +606,8 @@ static void complete_domain_destroy(stru rangeset_domain_destroy(d); @@ -1123,10 +1123,10 @@ Index: xen-4.0.0-testing/xen/common/domain.c sched_destroy_domain(d); /* Free page used by xen oprofile buffer. */ -Index: xen-4.0.0-testing/xen/common/domctl.c +Index: xen-4.0.1-testing/xen/common/domctl.c =================================================================== ---- xen-4.0.0-testing.orig/xen/common/domctl.c -+++ xen-4.0.0-testing/xen/common/domctl.c +--- xen-4.0.1-testing.orig/xen/common/domctl.c ++++ xen-4.0.1-testing/xen/common/domctl.c @@ -11,6 +11,7 @@ #include #include @@ -1135,7 +1135,7 @@ Index: xen-4.0.0-testing/xen/common/domctl.c #include #include #include -@@ -140,10 +141,12 @@ void getdomaininfo(struct domain *d, str +@@ -141,10 +142,12 @@ void getdomaininfo(struct domain *d, str info->shared_info_frame = mfn_to_gmfn(d, __pa(d->shared_info)>>PAGE_SHIFT); BUG_ON(SHARED_M2P(info->shared_info_frame)); @@ -1149,7 +1149,7 @@ Index: xen-4.0.0-testing/xen/common/domctl.c { struct domain *d; struct vcpu *v; -@@ -173,7 +176,7 @@ static unsigned int default_vcpu0_locati +@@ -174,7 +177,7 @@ static unsigned int default_vcpu0_locati if ( cpus_weight(per_cpu(cpu_sibling_map, 0)) > 1 ) cpu = next_cpu(cpu, per_cpu(cpu_sibling_map, 0)); cpu_exclude_map = per_cpu(cpu_sibling_map, 0); @@ -1158,7 +1158,7 @@ Index: xen-4.0.0-testing/xen/common/domctl.c { if ( cpu_isset(i, cpu_exclude_map) ) continue; -@@ -388,6 +391,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -389,6 +392,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc domid_t dom; static domid_t rover = 0; unsigned int domcr_flags; @@ -1166,7 +1166,7 @@ Index: xen-4.0.0-testing/xen/common/domctl.c ret = -EINVAL; if ( supervisor_mode_kernel || -@@ -431,7 +435,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -432,7 +436,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc domcr_flags |= DOMCRF_oos_off; ret = -ENOMEM; @@ -1175,7 +1175,7 @@ Index: xen-4.0.0-testing/xen/common/domctl.c if ( d == NULL ) break; -@@ -450,6 +454,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -451,6 +455,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc { struct domain *d; unsigned int i, max = op->u.max_vcpus.max, cpu; @@ -1183,7 +1183,7 @@ Index: xen-4.0.0-testing/xen/common/domctl.c ret = -ESRCH; if ( (d = rcu_lock_domain_by_id(op->domain)) == NULL ) -@@ -498,6 +503,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -499,6 +504,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc goto maxvcpu_out; ret = -ENOMEM; @@ -1191,7 +1191,7 @@ Index: xen-4.0.0-testing/xen/common/domctl.c if ( max > d->max_vcpus ) { struct vcpu **vcpus; -@@ -521,8 +527,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc +@@ -522,8 +528,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc continue; cpu = (i == 0) ? @@ -1202,10 +1202,32 @@ Index: xen-4.0.0-testing/xen/common/domctl.c if ( alloc_vcpu(d, i, cpu) == NULL ) goto maxvcpu_out; -Index: xen-4.0.0-testing/xen/common/sched_credit.c +Index: xen-4.0.1-testing/xen/common/kexec.c =================================================================== ---- xen-4.0.0-testing.orig/xen/common/sched_credit.c -+++ xen-4.0.0-testing/xen/common/sched_credit.c +--- xen-4.0.1-testing.orig/xen/common/kexec.c ++++ xen-4.0.1-testing/xen/common/kexec.c +@@ -235,7 +235,7 @@ void kexec_crash(void) + BUG(); + } + +-static long kexec_reboot(void *_image) ++static long kexec_reboot(void *hdl, void *_image) + { + xen_kexec_image_t *image = _image; + +@@ -584,7 +584,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v + { + case KEXEC_TYPE_DEFAULT: + image = &kexec_image[base + pos]; +- ret = continue_hypercall_on_cpu(0, kexec_reboot, image); ++ ret = continue_hypercall_on_cpu(0, NULL, kexec_reboot, image); + break; + case KEXEC_TYPE_CRASH: + kexec_crash(); /* Does not return */ +Index: xen-4.0.1-testing/xen/common/sched_credit.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/sched_credit.c ++++ xen-4.0.1-testing/xen/common/sched_credit.c @@ -70,11 +70,15 @@ /* * Useful macros @@ -2108,10 +2130,10 @@ Index: xen-4.0.0-testing/xen/common/sched_credit.c .tick_suspend = csched_tick_suspend, .tick_resume = csched_tick_resume, -Index: xen-4.0.0-testing/xen/common/sched_sedf.c +Index: xen-4.0.1-testing/xen/common/sched_sedf.c =================================================================== ---- xen-4.0.0-testing.orig/xen/common/sched_sedf.c -+++ xen-4.0.0-testing/xen/common/sched_sedf.c +--- xen-4.0.1-testing.orig/xen/common/sched_sedf.c ++++ xen-4.0.1-testing/xen/common/sched_sedf.c @@ -21,6 +21,9 @@ printk(_a ); \ } while ( 0 ) @@ -2394,10 +2416,10 @@ Index: xen-4.0.0-testing/xen/common/sched_sedf.c .do_schedule = sedf_do_schedule, .pick_cpu = sedf_pick_cpu, .dump_cpu_state = sedf_dump_cpu_state, -Index: xen-4.0.0-testing/xen/common/schedule.c +Index: xen-4.0.1-testing/xen/common/schedule.c =================================================================== ---- xen-4.0.0-testing.orig/xen/common/schedule.c -+++ xen-4.0.0-testing/xen/common/schedule.c +--- xen-4.0.1-testing.orig/xen/common/schedule.c ++++ xen-4.0.1-testing/xen/common/schedule.c @@ -53,10 +53,11 @@ static void poll_timer_fn(void *data); /* This is global for now so that private implementations can reach it */ @@ -2708,7 +2730,7 @@ Index: xen-4.0.0-testing/xen/common/schedule.c /* Block the currently-executing domain until a pertinent event occurs. */ static long do_block(void) { -@@ -762,7 +840,7 @@ long sched_adjust(struct domain *d, stru +@@ -783,7 +861,7 @@ long sched_adjust(struct domain *d, stru struct vcpu *v; long ret; @@ -2717,7 +2739,7 @@ Index: xen-4.0.0-testing/xen/common/schedule.c ((op->cmd != XEN_DOMCTL_SCHEDOP_putinfo) && (op->cmd != XEN_DOMCTL_SCHEDOP_getinfo)) ) return -EINVAL; -@@ -789,7 +867,7 @@ long sched_adjust(struct domain *d, stru +@@ -810,7 +888,7 @@ long sched_adjust(struct domain *d, stru if ( d == current->domain ) vcpu_schedule_lock_irq(current); @@ -2726,7 +2748,7 @@ Index: xen-4.0.0-testing/xen/common/schedule.c TRACE_1D(TRC_SCHED_ADJDOM, d->domain_id); if ( d == current->domain ) -@@ -836,6 +914,7 @@ static void schedule(void) +@@ -857,6 +935,7 @@ static void schedule(void) { struct vcpu *prev = current, *next = NULL; s_time_t now = NOW(); @@ -2734,7 +2756,7 @@ Index: xen-4.0.0-testing/xen/common/schedule.c struct schedule_data *sd; struct task_slice next_slice; -@@ -851,7 +930,7 @@ static void schedule(void) +@@ -872,7 +951,7 @@ static void schedule(void) stop_timer(&sd->s_timer); /* get policy-specific decision on scheduling... */ @@ -2743,7 +2765,7 @@ Index: xen-4.0.0-testing/xen/common/schedule.c next = next_slice.task; -@@ -951,6 +1030,19 @@ static void poll_timer_fn(void *data) +@@ -978,6 +1057,19 @@ static void poll_timer_fn(void *data) vcpu_unblock(v); } @@ -2763,7 +2785,7 @@ Index: xen-4.0.0-testing/xen/common/schedule.c /* Initialise the data structures. */ void __init scheduler_init(void) { -@@ -958,12 +1050,6 @@ void __init scheduler_init(void) +@@ -985,12 +1077,6 @@ void __init scheduler_init(void) open_softirq(SCHEDULE_SOFTIRQ, schedule); @@ -2776,7 +2798,7 @@ Index: xen-4.0.0-testing/xen/common/schedule.c for ( i = 0; schedulers[i] != NULL; i++ ) { ops = *schedulers[i]; -@@ -977,43 +1063,123 @@ void __init scheduler_init(void) +@@ -1004,43 +1090,123 @@ void __init scheduler_init(void) ops = *schedulers[0]; } @@ -2916,10 +2938,10 @@ Index: xen-4.0.0-testing/xen/common/schedule.c } #ifdef CONFIG_COMPAT -Index: xen-4.0.0-testing/xen/common/softirq.c +Index: xen-4.0.1-testing/xen/common/softirq.c =================================================================== ---- xen-4.0.0-testing.orig/xen/common/softirq.c -+++ xen-4.0.0-testing/xen/common/softirq.c +--- xen-4.0.1-testing.orig/xen/common/softirq.c ++++ xen-4.0.1-testing/xen/common/softirq.c @@ -88,9 +88,11 @@ void raise_softirq(unsigned int nr) } @@ -3013,10 +3035,10 @@ Index: xen-4.0.0-testing/xen/common/softirq.c open_softirq(TASKLET_SOFTIRQ, tasklet_action); } -Index: xen-4.0.0-testing/xen/common/sysctl.c +Index: xen-4.0.1-testing/xen/common/sysctl.c =================================================================== ---- xen-4.0.0-testing.orig/xen/common/sysctl.c -+++ xen-4.0.0-testing/xen/common/sysctl.c +--- xen-4.0.1-testing.orig/xen/common/sysctl.c ++++ xen-4.0.1-testing/xen/common/sysctl.c @@ -314,6 +314,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc } break; @@ -3032,11 +3054,11 @@ Index: xen-4.0.0-testing/xen/common/sysctl.c default: ret = arch_do_sysctl(op, u_sysctl); break; -Index: xen-4.0.0-testing/xen/include/asm-x86/domain.h +Index: xen-4.0.1-testing/xen/include/asm-x86/domain.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/domain.h -+++ xen-4.0.0-testing/xen/include/asm-x86/domain.h -@@ -451,7 +451,8 @@ struct arch_vcpu +--- xen-4.0.1-testing.orig/xen/include/asm-x86/domain.h ++++ xen-4.0.1-testing/xen/include/asm-x86/domain.h +@@ -458,7 +458,8 @@ struct arch_vcpu #define hvm_svm hvm_vcpu.u.svm /* Continue the current hypercall via func(data) on specified cpu. */ @@ -3046,10 +3068,10 @@ Index: xen-4.0.0-testing/xen/include/asm-x86/domain.h void vcpu_show_execution_state(struct vcpu *); void vcpu_show_registers(const struct vcpu *); -Index: xen-4.0.0-testing/xen/include/asm-x86/smp.h +Index: xen-4.0.1-testing/xen/include/asm-x86/smp.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/smp.h -+++ xen-4.0.0-testing/xen/include/asm-x86/smp.h +--- xen-4.0.1-testing.orig/xen/include/asm-x86/smp.h ++++ xen-4.0.1-testing/xen/include/asm-x86/smp.h @@ -56,7 +56,6 @@ extern u32 cpu_2_logical_apicid[]; #define CPU_ONLINE 0x0002 /* CPU is up */ #define CPU_DEAD 0x0004 /* CPU is dead */ @@ -3058,10 +3080,10 @@ Index: xen-4.0.0-testing/xen/include/asm-x86/smp.h #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) extern int cpu_down(unsigned int cpu); -Index: xen-4.0.0-testing/xen/include/public/domctl.h +Index: xen-4.0.1-testing/xen/include/public/domctl.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/domctl.h -+++ xen-4.0.0-testing/xen/include/public/domctl.h +--- xen-4.0.1-testing.orig/xen/include/public/domctl.h ++++ xen-4.0.1-testing/xen/include/public/domctl.h @@ -60,10 +60,10 @@ struct xen_domctl_createdomain { /* Should domain memory integrity be verifed by tboot during Sx? */ #define _XEN_DOMCTL_CDF_s3_integrity 2 @@ -3090,10 +3112,10 @@ Index: xen-4.0.0-testing/xen/include/public/domctl.h struct xen_domctl { uint32_t cmd; #define XEN_DOMCTL_createdomain 1 -Index: xen-4.0.0-testing/xen/include/public/sysctl.h +Index: xen-4.0.1-testing/xen/include/public/sysctl.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/sysctl.h -+++ xen-4.0.0-testing/xen/include/public/sysctl.h +--- xen-4.0.1-testing.orig/xen/include/public/sysctl.h ++++ xen-4.0.1-testing/xen/include/public/sysctl.h @@ -491,6 +491,28 @@ struct xen_sysctl_lockprof_op { typedef struct xen_sysctl_lockprof_op xen_sysctl_lockprof_op_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_lockprof_op_t); @@ -3131,10 +3153,10 @@ Index: xen-4.0.0-testing/xen/include/public/sysctl.h uint8_t pad[128]; } u; }; -Index: xen-4.0.0-testing/xen/include/xen/sched-if.h +Index: xen-4.0.1-testing/xen/include/xen/sched-if.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/xen/sched-if.h -+++ xen-4.0.0-testing/xen/include/xen/sched-if.h +--- xen-4.0.1-testing.orig/xen/include/xen/sched-if.h ++++ xen-4.0.1-testing/xen/include/xen/sched-if.h @@ -10,16 +10,29 @@ #include @@ -3229,10 +3251,10 @@ Index: xen-4.0.0-testing/xen/include/xen/sched-if.h +struct scheduler *scheduler_get_by_id(unsigned int id); + #endif /* __XEN_SCHED_IF_H__ */ -Index: xen-4.0.0-testing/xen/include/xen/sched.h +Index: xen-4.0.1-testing/xen/include/xen/sched.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/xen/sched.h -+++ xen-4.0.0-testing/xen/include/xen/sched.h +--- xen-4.0.1-testing.orig/xen/include/xen/sched.h ++++ xen-4.0.1-testing/xen/include/xen/sched.h @@ -9,6 +9,7 @@ #include #include @@ -3250,7 +3272,7 @@ Index: xen-4.0.0-testing/xen/include/xen/sched.h /* * > 0: a single port is being polled; -@@ -211,6 +210,7 @@ struct domain +@@ -209,6 +208,7 @@ struct domain /* Scheduling. */ void *sched_priv; /* scheduler-specific data */ @@ -3258,7 +3280,7 @@ Index: xen-4.0.0-testing/xen/include/xen/sched.h struct domain *next_in_list; struct domain *next_in_hashbucket; -@@ -383,7 +383,7 @@ static inline struct domain *get_current +@@ -381,7 +381,7 @@ static inline struct domain *get_current } struct domain *domain_create( @@ -3267,7 +3289,7 @@ Index: xen-4.0.0-testing/xen/include/xen/sched.h /* DOMCRF_hvm: Create an HVM domain, as opposed to a PV domain. */ #define _DOMCRF_hvm 0 #define DOMCRF_hvm (1U<<_DOMCRF_hvm) -@@ -471,6 +471,7 @@ int sched_init_vcpu(struct vcpu *v, uns +@@ -469,6 +469,7 @@ int sched_init_vcpu(struct vcpu *v, uns void sched_destroy_vcpu(struct vcpu *v); int sched_init_domain(struct domain *d); void sched_destroy_domain(struct domain *d); @@ -3275,7 +3297,7 @@ Index: xen-4.0.0-testing/xen/include/xen/sched.h long sched_adjust(struct domain *, struct xen_domctl_scheduler_op *); int sched_id(void); void sched_tick_suspend(void); -@@ -578,12 +579,14 @@ void domain_pause_by_systemcontroller(st +@@ -576,12 +577,14 @@ void domain_pause_by_systemcontroller(st void domain_unpause_by_systemcontroller(struct domain *d); void cpu_init(void); @@ -3294,7 +3316,7 @@ Index: xen-4.0.0-testing/xen/include/xen/sched.h void vcpu_runstate_get(struct vcpu *v, struct vcpu_runstate_info *runstate); uint64_t get_cpu_idle_time(unsigned int cpu); -@@ -606,6 +609,18 @@ extern enum cpufreq_controller { +@@ -604,6 +607,18 @@ extern enum cpufreq_controller { FREQCTL_none, FREQCTL_dom0_kernel, FREQCTL_xen } cpufreq_controller; @@ -3313,10 +3335,10 @@ Index: xen-4.0.0-testing/xen/include/xen/sched.h #endif /* __SCHED_H__ */ /* -Index: xen-4.0.0-testing/xen/include/xen/softirq.h +Index: xen-4.0.1-testing/xen/include/xen/softirq.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/xen/softirq.h -+++ xen-4.0.0-testing/xen/include/xen/softirq.h +--- xen-4.0.1-testing.orig/xen/include/xen/softirq.h ++++ xen-4.0.1-testing/xen/include/xen/softirq.h @@ -58,6 +58,7 @@ struct tasklet struct tasklet name = { LIST_HEAD_INIT(name.list), 0, 0, 0, func, data } diff --git a/del_usb_xend_entry.patch b/del_usb_xend_entry.patch index a5f2187..3114318 100644 --- a/del_usb_xend_entry.patch +++ b/del_usb_xend_entry.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1310,8 +1310,15 @@ class XendDomainInfo: +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -1313,8 +1313,15 @@ class XendDomainInfo: frontpath = self.getDeviceController(deviceClass).frontendPath(dev) backpath = xstransact.Read(frontpath, "backend") thread.start_new_thread(self.getDeviceController(deviceClass).finishDeviceCleanup, (backpath, path)) diff --git a/disable_emulated_device.diff b/disable_emulated_device.diff index 1870b4c..892dbb7 100644 --- a/disable_emulated_device.diff +++ b/disable_emulated_device.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -401,6 +401,11 @@ static int __devinit platform_pci_init(s platform_mmio = mmio_addr; platform_mmiolen = mmio_len; diff --git a/dom-print.patch b/dom-print.patch index 73e7cc7..c918676 100644 --- a/dom-print.patch +++ b/dom-print.patch @@ -1,6 +1,8 @@ ---- a/xen/arch/x86/domain.c -+++ b/xen/arch/x86/domain.c -@@ -144,14 +144,29 @@ void dump_pageframe_info(struct domain * +Index: xen-4.0.1-testing/xen/arch/x86/domain.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/domain.c ++++ xen-4.0.1-testing/xen/arch/x86/domain.c +@@ -144,15 +144,30 @@ void dump_pageframe_info(struct domain * printk("Memory pages belonging to domain %u:\n", d->domain_id); @@ -14,6 +16,7 @@ + unsigned long total[PGT_type_mask + / (PGT_type_mask & -PGT_type_mask) + 1] = {}; + + spin_lock(&d->page_alloc_lock); page_list_for_each ( page, &d->page_list ) { + unsigned int index = (page->u.inuse.type_info & PGT_type_mask) diff --git a/domu-usb-controller.patch b/domu-usb-controller.patch index ec1eaa0..db697e0 100644 --- a/domu-usb-controller.patch +++ b/domu-usb-controller.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -1861,7 +1861,14 @@ class XendConfig(dict): ports = sxp.child(dev_sxp, 'port') for port in ports[1:]: diff --git a/dump-exec-state.patch b/dump-exec-state.patch index bbb9dcb..b18425f 100644 --- a/dump-exec-state.patch +++ b/dump-exec-state.patch @@ -1,6 +1,8 @@ ---- a/xen/arch/ia64/linux-xen/smp.c -+++ b/xen/arch/ia64/linux-xen/smp.c -@@ -94,6 +94,7 @@ static volatile struct call_data_struct +Index: xen-4.0.1-testing/xen/arch/ia64/linux-xen/smp.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/ia64/linux-xen/smp.c ++++ xen-4.0.1-testing/xen/arch/ia64/linux-xen/smp.c +@@ -94,6 +94,7 @@ static volatile struct call_data_struct #define IPI_CALL_FUNC 0 #define IPI_CPU_STOP 1 @@ -32,8 +34,10 @@ int __init setup_profiling_timer (unsigned int multiplier) { ---- a/xen/arch/x86/smp.c -+++ b/xen/arch/x86/smp.c +Index: xen-4.0.1-testing/xen/arch/x86/smp.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/smp.c ++++ xen-4.0.1-testing/xen/arch/x86/smp.c @@ -375,11 +375,24 @@ void smp_send_nmi_allbutself(void) send_IPI_mask(&cpu_online_map, APIC_DM_NMI); } @@ -59,8 +63,10 @@ set_irq_regs(old_regs); } ---- a/xen/common/keyhandler.c -+++ b/xen/common/keyhandler.c +Index: xen-4.0.1-testing/xen/common/keyhandler.c +=================================================================== +--- xen-4.0.1-testing.orig/xen/common/keyhandler.c ++++ xen-4.0.1-testing/xen/common/keyhandler.c @@ -71,19 +71,52 @@ static struct keyhandler show_handlers_k .desc = "show this message" }; @@ -151,8 +157,10 @@ printk("\n"); ---- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h -+++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h +Index: xen-4.0.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h ++++ xen-4.0.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h @@ -278,7 +278,7 @@ struct switch_stack { # define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) # define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr) @@ -162,8 +170,10 @@ # define guest_kernel_mode(regs) (ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL) # define vmx_guest_kernel_mode(regs) (ia64_psr(regs)->cpl == 0) # define regs_increment_iip(regs) \ ---- a/xen/include/asm-x86/hardirq.h -+++ b/xen/include/asm-x86/hardirq.h +Index: xen-4.0.1-testing/xen/include/asm-x86/hardirq.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/asm-x86/hardirq.h ++++ xen-4.0.1-testing/xen/include/asm-x86/hardirq.h @@ -8,6 +8,7 @@ typedef struct { unsigned long __softirq_pending; unsigned int __local_irq_count; @@ -172,8 +182,10 @@ } __cacheline_aligned irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ ---- a/xen/include/xen/irq_cpustat.h -+++ b/xen/include/xen/irq_cpustat.h +Index: xen-4.0.1-testing/xen/include/xen/irq_cpustat.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/irq_cpustat.h ++++ xen-4.0.1-testing/xen/include/xen/irq_cpustat.h @@ -26,5 +26,6 @@ extern irq_cpustat_t irq_stat[]; #define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending) #define local_irq_count(cpu) __IRQ_STAT((cpu), __local_irq_count) @@ -181,9 +193,11 @@ +#define state_dump_pending(cpu) __IRQ_STAT((cpu), __state_dump_pending) #endif /* __irq_cpustat_h */ ---- a/xen/include/xen/lib.h -+++ b/xen/include/xen/lib.h -@@ -111,4 +111,7 @@ extern int tainted; +Index: xen-4.0.1-testing/xen/include/xen/lib.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/lib.h ++++ xen-4.0.1-testing/xen/include/xen/lib.h +@@ -116,4 +116,7 @@ extern int tainted; extern char *print_tainted(char *str); extern void add_taint(unsigned); @@ -191,8 +205,10 @@ +void dump_execstate(struct cpu_user_regs *); + #endif /* __LIB_H__ */ ---- a/xen/include/xen/smp.h -+++ b/xen/include/xen/smp.h +Index: xen-4.0.1-testing/xen/include/xen/smp.h +=================================================================== +--- xen-4.0.1-testing.orig/xen/include/xen/smp.h ++++ xen-4.0.1-testing/xen/include/xen/smp.h @@ -13,6 +13,8 @@ extern void smp_send_event_check_mask(co #define smp_send_event_check_cpu(cpu) \ smp_send_event_check_mask(cpumask_of(cpu)) diff --git a/enable_more_nic_pxe.patch b/enable_more_nic_pxe.patch index 6961430..b62bc81 100644 --- a/enable_more_nic_pxe.patch +++ b/enable_more_nic_pxe.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/firmware/etherboot/Config +Index: xen-4.0.1-testing/tools/firmware/etherboot/Config =================================================================== ---- xen-4.0.0-testing.orig/tools/firmware/etherboot/Config -+++ xen-4.0.0-testing/tools/firmware/etherboot/Config +--- xen-4.0.1-testing.orig/tools/firmware/etherboot/Config ++++ xen-4.0.1-testing/tools/firmware/etherboot/Config @@ -1,5 +1,5 @@ -NICS = rtl8139 eepro100 @@ -9,10 +9,10 @@ Index: xen-4.0.0-testing/tools/firmware/etherboot/Config CFLAGS += -UPXE_DHCP_STRICT CFLAGS += -DPXE_DHCP_STRICT -Index: xen-4.0.0-testing/tools/firmware/etherboot/eb-roms.h +Index: xen-4.0.1-testing/tools/firmware/etherboot/eb-roms.h =================================================================== ---- xen-4.0.0-testing.orig/tools/firmware/etherboot/eb-roms.h -+++ xen-4.0.0-testing/tools/firmware/etherboot/eb-roms.h +--- xen-4.0.1-testing.orig/tools/firmware/etherboot/eb-roms.h ++++ xen-4.0.1-testing/tools/firmware/etherboot/eb-roms.h @@ -6367,5 +6367,6149 @@ unsigned etherboot[] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, diff --git a/hibernate.patch b/hibernate.patch index de5345a..7b647e6 100644 --- a/hibernate.patch +++ b/hibernate.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/firmware/hvmloader/acpi/dsdt.asl +Index: xen-4.0.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl =================================================================== ---- xen-4.0.0-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl -+++ xen-4.0.0-testing/tools/firmware/hvmloader/acpi/dsdt.asl +--- xen-4.0.1-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl ++++ xen-4.0.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl @@ -30,21 +30,9 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, /* * S3 (suspend-to-ram), S4 (suspend-to-disc) and S5 (power-off) type codes: diff --git a/hv_tools.patch b/hv_tools.patch index 7a86790..23985e3 100644 --- a/hv_tools.patch +++ b/hv_tools.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c +Index: xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/lowlevel/xc/xc.c -+++ xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c +--- xen-4.0.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c ++++ xen-4.0.1-testing/tools/python/xen/lowlevel/xc/xc.c @@ -944,16 +944,16 @@ static PyObject *pyxc_hvm_build(XcObject #endif int i; @@ -32,10 +32,10 @@ Index: xen-4.0.0-testing/tools/python/xen/lowlevel/xc/xc.c return Py_BuildValue("{}"); } -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -157,6 +157,7 @@ XENAPI_PLATFORM_CFG_TYPES = { 'nographic': int, 'nomigrate': int, @@ -44,10 +44,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py 'rtc_timeoffset': int, 'parallel': str, 'serial': str, -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +Index: xen-4.0.1-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.1-testing/tools/python/xen/xend/image.py @@ -839,6 +839,7 @@ class HVMImageHandler(ImageHandler): self.apic = int(vmConfig['platform'].get('apic', 0)) @@ -72,10 +72,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/image.py acpi = self.acpi, apic = self.apic) rc['notes'] = { 'SUSPEND_CANCEL': 1 } -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py @@ -242,6 +242,10 @@ gopts.var('viridian', val='VIRIDIAN', use="""Expose Viridian interface to x86 HVM guest? (Default is 0).""") @@ -87,7 +87,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py gopts.var('acpi', val='ACPI', fn=set_int, default=1, use="Disable or enable ACPI of HVM domain.") -@@ -1083,7 +1087,7 @@ def configure_hvm(config_image, vals): +@@ -1091,7 +1095,7 @@ def configure_hvm(config_image, vals): 'timer_mode', 'usb', 'usbdevice', 'vcpus', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten', diff --git a/hv_win7_eoi_bug.patch b/hv_win7_eoi_bug.patch index 03343c9..6d7ff3a 100644 --- a/hv_win7_eoi_bug.patch +++ b/hv_win7_eoi_bug.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hyperv/hv_intercept.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hyperv/hv_intercept.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c @@ -33,6 +33,7 @@ #include diff --git a/hv_xen_base.patch b/hv_xen_base.patch index 5201090..441075c 100644 --- a/hv_xen_base.patch +++ b/hv_xen_base.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h +Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/domain.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/domain.h -+++ xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h +--- xen-4.0.1-testing.orig/xen/include/asm-x86/hvm/domain.h ++++ xen-4.0.1-testing/xen/include/asm-x86/hvm/domain.h @@ -96,6 +96,7 @@ struct hvm_domain { struct vmx_domain vmx; struct svm_domain svm; @@ -10,10 +10,10 @@ Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h }; #endif /* __ASM_X86_HVM_DOMAIN_H__ */ -Index: xen-4.0.0-testing/xen/arch/x86/hvm/Makefile +Index: xen-4.0.1-testing/xen/arch/x86/hvm/Makefile =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/Makefile -+++ xen-4.0.0-testing/xen/arch/x86/hvm/Makefile +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/Makefile ++++ xen-4.0.1-testing/xen/arch/x86/hvm/Makefile @@ -1,5 +1,6 @@ subdir-y += svm subdir-y += vmx @@ -21,10 +21,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/Makefile obj-y += asid.o obj-y += emulate.o -Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hvm.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c @@ -48,6 +48,7 @@ #include #include @@ -107,7 +107,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c return hvm_funcs.msr_write_intercept(regs); } -@@ -2330,6 +2346,10 @@ int hvm_do_hypercall(struct cpu_user_reg +@@ -2344,6 +2360,10 @@ int hvm_do_hypercall(struct cpu_user_reg case 0: break; } @@ -118,7 +118,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c if ( (eax & 0x80000000) && is_viridian_domain(curr->domain) ) return viridian_hypercall(regs); -@@ -2864,6 +2884,18 @@ long do_hvm_op(unsigned long op, XEN_GUE +@@ -2878,6 +2898,18 @@ long do_hvm_op(unsigned long op, XEN_GUE rc = -EINVAL; break; @@ -137,10 +137,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c } if ( rc == 0 ) -Index: xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h +Index: xen-4.0.1-testing/xen/include/public/arch-x86/hvm/save.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/arch-x86/hvm/save.h -+++ xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h +--- xen-4.0.1-testing.orig/xen/include/public/arch-x86/hvm/save.h ++++ xen-4.0.1-testing/xen/include/public/arch-x86/hvm/save.h @@ -431,9 +431,24 @@ struct hvm_viridian_context { DECLARE_HVM_SAVE_TYPE(VIRIDIAN, 15, struct hvm_viridian_context); @@ -167,10 +167,10 @@ Index: xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h +#define HVM_SAVE_CODE_MAX 17 #endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */ -Index: xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c +Index: xen-4.0.1-testing/xen/arch/x86/hvm/vlapic.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/hvm/vlapic.c -+++ xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c +--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/vlapic.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/vlapic.c @@ -34,6 +34,7 @@ #include #include @@ -187,11 +187,11 @@ Index: xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c return X86EMUL_OKAY; } -Index: xen-4.0.0-testing/xen/include/public/hvm/params.h +Index: xen-4.0.1-testing/xen/include/public/hvm/params.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/hvm/params.h -+++ xen-4.0.0-testing/xen/include/public/hvm/params.h -@@ -106,6 +106,8 @@ +--- xen-4.0.1-testing.orig/xen/include/public/hvm/params.h ++++ xen-4.0.1-testing/xen/include/public/hvm/params.h +@@ -109,6 +109,8 @@ /* Boolean: Enable aligning all periodic vpts to reduce interrupts */ #define HVM_PARAM_VPT_ALIGN 16 diff --git a/hv_xen_extension.patch b/hv_xen_extension.patch index aae751a..a355338 100644 --- a/hv_xen_extension.patch +++ b/hv_xen_extension.patch @@ -1,5 +1,7 @@ +Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h +=================================================================== --- /dev/null -+++ b/xen/include/asm-x86/hvm/hvm_extensions.h ++++ xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h @@ -0,0 +1,183 @@ +/**************************************************************************** + | @@ -184,13 +186,17 @@ +int hyperx_initialize(struct domain *d); + +#endif +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/Makefile +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/Makefile ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/Makefile @@ -0,0 +1,2 @@ +obj-y += hv_intercept.o +obj-y += hv_hypercall.o +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_errno.h ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h @@ -0,0 +1,62 @@ +/**************************************************************************** + | @@ -254,8 +260,10 @@ +#define HV_STATUS_NO_MEMORY_256PAGES 0x0103 +#define HV_STATUS_NO_MEMORY_1024PAGES 0x0104 +#endif +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_hypercall.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c @@ -0,0 +1,153 @@ +/**************************************************************************** + | @@ -410,8 +418,10 @@ + return; + } +} +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_hypercall.h ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h @@ -0,0 +1,46 @@ +/**************************************************************************** + | @@ -459,8 +469,10 @@ +#define HV_NOTIFY_LONG_SPIN_WAIT 0x0008 + +#endif /* HV_HYPERCALL_H */ +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_intercept.c ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c @@ -0,0 +1,1009 @@ +/**************************************************************************** + | @@ -1471,8 +1483,10 @@ + hvm_inject_exception(TRAP_gp_fault, 0, 0); + return (1); +} +Index: xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h +=================================================================== --- /dev/null -+++ b/xen/arch/x86/hvm/hyperv/hv_shim.h ++++ xen-4.0.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h @@ -0,0 +1,286 @@ +/**************************************************************************** + | diff --git a/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch b/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch index c8e19ce..15c5549 100644 --- a/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch +++ b/ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch @@ -17,10 +17,10 @@ qcow2 image (the header is gone after three loop iterations): Signed-off-by: Kevin Wolf -Index: xen-4.0.0-testing/tools/ioemu-remote/block-qcow2.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block-qcow2.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/block-qcow2.c -+++ xen-4.0.0-testing/tools/ioemu-remote/block-qcow2.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block-qcow2.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block-qcow2.c @@ -916,7 +916,7 @@ static int alloc_cluster_link_l2(BlockDr goto err; diff --git a/ioemu-bdrv-open-CACHE_WB.patch b/ioemu-bdrv-open-CACHE_WB.patch index 272a524..1350a2a 100644 --- a/ioemu-bdrv-open-CACHE_WB.patch +++ b/ioemu-bdrv-open-CACHE_WB.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -249,8 +249,11 @@ static int open_disk(struct td_state *s, drv = blktap_drivers[i].drv; DPRINTF("%s driver specified\n", drv ? drv->format_name : "No"); diff --git a/ioemu-blktap-barriers.patch b/ioemu-blktap-barriers.patch index bbbc1fc..1c6f411 100644 --- a/ioemu-blktap-barriers.patch +++ b/ioemu-blktap-barriers.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -362,6 +362,15 @@ static void qemu_send_responses(void* op } diff --git a/ioemu-blktap-fv-init.patch b/ioemu-blktap-fv-init.patch index 37db5c3..df5fd5b 100644 --- a/ioemu-blktap-fv-init.patch +++ b/ioemu-blktap-fv-init.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_machine_fv.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_machine_fv.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_machine_fv.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_machine_fv.c @@ -268,6 +268,7 @@ void qemu_invalidate_entry(uint8_t *buff #endif /* defined(MAPCACHE) */ diff --git a/ioemu-blktap-image-format.patch b/ioemu-blktap-image-format.patch index cb29e79..5aeb136 100644 --- a/ioemu-blktap-image-format.patch +++ b/ioemu-blktap-image-format.patch @@ -15,10 +15,10 @@ Signed-off-by: Kevin Wolf hw/xen_blktap.h | 14 ++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -220,9 +220,10 @@ static int map_new_dev(struct td_state * return -1; } @@ -64,10 +64,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c msglen = sizeof(msg_hdr_t); msg->type = CTLMSG_IMG_FAIL; msg->len = msglen; -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.h -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.h +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.h @@ -52,4 +52,18 @@ typedef struct fd_list_entry { int init_blktap(void); diff --git a/ioemu-blktap-zero-size.patch b/ioemu-blktap-zero-size.patch index 88f56d8..8a1ba56 100644 --- a/ioemu-blktap-zero-size.patch +++ b/ioemu-blktap-zero-size.patch @@ -12,10 +12,10 @@ Signed-off-by: Kevin Wolf hw/xen_blktap.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -258,6 +258,12 @@ static int open_disk(struct td_state *s, s->size = bs->total_sectors; s->sector_size = 512; @@ -29,10 +29,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c s->info = ((s->flags & TD_RDONLY) ? VDISK_READONLY : 0); #ifndef QEMU_TOOL -Index: xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/DevController.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/DevController.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py @@ -155,7 +155,7 @@ class DevController: (devid, self.deviceClass)) diff --git a/ioemu-debuginfo.patch b/ioemu-debuginfo.patch index b88354a..c0261e6 100644 --- a/ioemu-debuginfo.patch +++ b/ioemu-debuginfo.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile -+++ xen-4.0.0-testing/tools/ioemu-remote/Makefile +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile @@ -243,7 +243,7 @@ endif install: all $(if $(BUILD_DOCS),install-doc) mkdir -p "$(DESTDIR)$(bindir)" @@ -11,10 +11,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)" -Index: xen-4.0.0-testing/tools/ioemu-remote/Makefile.target +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile.target =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/Makefile.target -+++ xen-4.0.0-testing/tools/ioemu-remote/Makefile.target +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/Makefile.target ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/Makefile.target @@ -754,7 +754,7 @@ clean: install: all install-hook diff --git a/ioemu-disable-scsi.patch b/ioemu-disable-scsi.patch index 41ac448..efba103 100644 --- a/ioemu-disable-scsi.patch +++ b/ioemu-disable-scsi.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c 2010-02-18 14:08:08.000000000 -0700 -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c 2010-02-18 14:28:59.000000000 -0700 +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c @@ -359,6 +359,8 @@ static void platform_ioport_write(void * case 4: fprintf(logfile, "Disconnect IDE hard disk...\n"); @@ -11,10 +11,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c fprintf(logfile, "Disconnect netifs...\n"); pci_unplug_netifs(); fprintf(logfile, "Shutdown taps...\n"); -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h 2010-02-18 14:08:08.000000000 -0700 -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h 2010-02-18 14:44:28.000000000 -0700 +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h @@ -57,6 +57,7 @@ void unset_vram_mapping(void *opaque); #endif @@ -23,10 +23,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h void destroy_hvm_domain(void); void unregister_iomem(target_phys_addr_t start); -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pci.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pci.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pci.c 2010-02-18 14:49:36.000000000 -0700 -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/pci.c 2010-02-18 14:53:47.000000000 -0700 +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/pci.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pci.c @@ -892,6 +892,50 @@ void pci_unplug_netifs(void) } } diff --git a/ioemu-vnc-resize.patch b/ioemu-vnc-resize.patch index ef27832..cd98427 100644 --- a/ioemu-vnc-resize.patch +++ b/ioemu-vnc-resize.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/vnc.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/vnc.c -+++ xen-4.0.0-testing/tools/ioemu-remote/vnc.c -@@ -1713,6 +1713,31 @@ static int protocol_client_msg(VncState +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vnc.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c +@@ -1713,6 +1713,31 @@ static int protocol_client_msg(VncState } set_encodings(vs, (int32_t *)(data + 4), limit); diff --git a/libxen_permissive.patch b/libxen_permissive.patch index 2f69b3b..79d6a7b 100644 --- a/libxen_permissive.patch +++ b/libxen_permissive.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/libxen/src/xen_common.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_common.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_common.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_common.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_common.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_common.c @@ -904,8 +904,15 @@ static void parse_into(xen_session *s, x 0 != strcmp((char *)value_node->children->name, "struct") || value_node->children->children == NULL) diff --git a/magic_ioport_compat.patch b/magic_ioport_compat.patch index 179c6be..320fe12 100644 --- a/magic_ioport_compat.patch +++ b/magic_ioport_compat.patch @@ -2,10 +2,10 @@ Make our PV drivers work with older hosts that do not recognize the new PV driv Signed-off-by: K. Y. Srinivasan -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -320,7 +320,10 @@ static int check_platform_magic(struct d if (magic != XEN_IOPORT_MAGIC_VAL) { diff --git a/multi-xvdp.patch b/multi-xvdp.patch new file mode 100644 index 0000000..0da4e79 --- /dev/null +++ b/multi-xvdp.patch @@ -0,0 +1,87 @@ +Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py +=================================================================== +--- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py ++++ xen-4.0.1-testing/tools/python/xen/util/blkif.py +@@ -19,10 +19,12 @@ def blkdev_name_to_number(name): + devname = 'virtual-device' + devnum = None + ++ """ + try: + return (devname, os.stat(n).st_rdev) + except Exception, ex: + pass ++ """ + + scsi_major = [ 8, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135 ] + if re.match( '/dev/sd[a-z]([1-9]|1[0-5])?$', n): +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +=================================================================== +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -73,7 +73,7 @@ from xen.xend.XendPSCSI import XendPSCSI + from xen.xend.XendDSCSI import XendDSCSI, XendDSCSI_HBA + + MIGRATE_TIMEOUT = 30.0 +-BOOTLOADER_LOOPBACK_DEVICE = '/dev/xvdp' ++BOOTLOADER_LOOPBACK_DEVICES = ['/dev/xvdy', '/dev/xvdx', '/dev/xvdw', '/dev/xvdv', '/dev/xvdu', '/dev/xvdt', '/dev/xvds', '/dev/xvdr', '/dev/xvdq', '/dev/xvdp', '/dev/xvdo', '/dev/xvdn', '/dev/xvdm', '/dev/xvdl', '/dev/xvdk', '/dev/xvdj', '/dev/xvdi', '/dev/xvdh', '/dev/xvdg', '/dev/xvdf', '/dev/xvde', '/dev/xvdd'] + + xc = xen.lowlevel.xc.xc() + xoptions = XendOptions.instance() +@@ -3314,20 +3314,27 @@ class XendDomainInfo: + # This is a file, not a device. pygrub can cope with a + # file if it's raw, but if it's QCOW or other such formats + # used through blktap, then we need to mount it first. +- +- log.info("Mounting %s on %s." % +- (fn, BOOTLOADER_LOOPBACK_DEVICE)) +- +- vbd = { +- 'mode': 'RW', +- 'device': BOOTLOADER_LOOPBACK_DEVICE, +- } +- +- from xen.xend import XendDomain +- dom0 = XendDomain.instance().privilegedDomain() +- vbd_uuid = dom0.create_vbd(vbd, disk) +- dom0._waitForDeviceFrontUUID(vbd_uuid) +- fn = BOOTLOADER_LOOPBACK_DEVICE ++ # Try all possible loopback_devices ++ for loopback_device in BOOTLOADER_LOOPBACK_DEVICES: ++ log.info("Mounting %s on %s." % (fn, loopback_device)) ++ vbd = { 'mode' : 'RW', 'device' : loopback_device, } ++ try: ++ from xen.xend import XendDomain ++ dom0 = XendDomain.instance().privilegedDomain() ++ vbd_uuid = dom0.create_vbd(vbd, disk) ++ dom0._waitForDeviceFrontUUID(vbd_uuid) ++ fn = loopback_device ++ break ++ except VmError, e: ++ if str(e).find('already connected.') != -1: ++ continue ++ elif str(e).find('isn\'t accessible') != -1: ++ dom0.destroyDevice('vbd', loopback_device, force = True, rm_cfg = True) ++ continue ++ else: ++ raise ++ else: ++ raise + + try: + blcfg = bootloader(blexec, fn, self, False, +@@ -3335,11 +3342,11 @@ class XendDomainInfo: + finally: + if mounted: + log.info("Unmounting %s from %s." % +- (fn, BOOTLOADER_LOOPBACK_DEVICE)) ++ (fn, loopback_device)) + if devtype in ['tap', 'tap2']: +- dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True) ++ dom0.destroyDevice('tap', loopback_device, rm_cfg = True) + else: +- dom0.destroyDevice('vbd', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True) ++ dom0.destroyDevice('vbd', loopback_device, rm_cfg = True) + + if blcfg is None: + msg = "Had a bootloader specified, but can't find disk" diff --git a/network-nat-open-SuSEfirewall2-FORWARD.patch b/network-nat-open-SuSEfirewall2-FORWARD.patch index 50b9e2b..b9167de 100644 --- a/network-nat-open-SuSEfirewall2-FORWARD.patch +++ b/network-nat-open-SuSEfirewall2-FORWARD.patch @@ -1,9 +1,9 @@ Open SuSEfirewall2 FORWARD rule when use xen nat -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-nat +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-nat =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-nat -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-nat +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-nat ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-nat @@ -83,6 +83,7 @@ function dhcp_stop() op_start() { echo 1 >/proc/sys/net/ipv4/ip_forward diff --git a/network-nat.patch b/network-nat.patch index 92c016a..7e613ec 100644 --- a/network-nat.patch +++ b/network-nat.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-nat +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-nat =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-nat -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-nat +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-nat ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-nat @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash diff --git a/network-route.patch b/network-route.patch index d4bb037..4ca15f0 100644 --- a/network-route.patch +++ b/network-route.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/network-route +Index: xen-4.0.1-testing/tools/hotplug/Linux/network-route =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/network-route -+++ xen-4.0.0-testing/tools/hotplug/Linux/network-route +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/network-route ++++ xen-4.0.1-testing/tools/hotplug/Linux/network-route @@ -22,7 +22,7 @@ dir=$(dirname "$0") evalVariables "$@" diff --git a/passthrough-hotplug-segfault.patch b/passthrough-hotplug-segfault.patch deleted file mode 100644 index 818bc25..0000000 --- a/passthrough-hotplug-segfault.patch +++ /dev/null @@ -1,90 +0,0 @@ - -Subject: passthrough: fix segmentation fault after hotplug pass-through device -From: Ian Jackson ian.jackson@eu.citrix.com Tue Apr 13 12:07:33 2010 +0100 -Date: Tue Apr 13 12:07:33 2010 +0100: -Git: b5160622517fb2d16d0836172a2e34633c9d94bf - -This patch fixed the QEMU segmentation fault after hotplug -pass-through devices with MSI-X for many times. - -There is a wrong boundary check in cpu_register_io_memory that uses -io_index rather than io_mem_nb. After many times of hotplug of MSI-X -pass-through device, io_mem_read[] got extended to overwrite mmio_cnt, -then cause QEMU segmentation fault. - -This fix sync with upstream QEMU code in exec.c, and free unused -io_mem_XXX element after hot removal. - -Signed-off-by: Zhai Edwin - -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pt-msi.c -=================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pt-msi.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/pt-msi.c -@@ -623,5 +623,11 @@ void pt_msix_delete(struct pt_dev *dev) - dev->msix->table_offset_adjust); - } - -+ if (dev->msix->mmio_index > 0) -+ { -+ cpu_unregister_io_memory(dev->msix->mmio_index); -+ } -+ -+ - free(dev->msix); - } -Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/exec-dm.c -=================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/exec-dm.c -+++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/exec-dm.c -@@ -125,7 +125,7 @@ unsigned long qemu_host_page_mask; - CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; - CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; - void *io_mem_opaque[IO_MEM_NB_ENTRIES]; --static int io_mem_nb = 1; -+char io_mem_used[IO_MEM_NB_ENTRIES]; - - /* log support */ - FILE *logfile; -@@ -310,6 +310,20 @@ void cpu_register_physical_memory(target - mmio[mmio_cnt++].size = size; - } - -+static int get_free_io_mem_idx(void) -+{ -+ int i; -+ -+ /* Leave 1st element empty */ -+ for (i = 1; i= IO_MEM_NB_ENTRIES) -- return -1; -- io_index = io_mem_nb++; -+ io_index = get_free_io_mem_idx(); -+ if (io_index == -1) -+ return io_index; - } else { - if (io_index >= IO_MEM_NB_ENTRIES) - return -1; -@@ -357,6 +371,7 @@ void cpu_unregister_io_memory(int io_tab - io_mem_write[io_index][i] = NULL; - } - io_mem_opaque[io_index] = NULL; -+ io_mem_used[io_index] = 0; - } - - void cpu_physical_memory_set_dirty(ram_addr_t addr) diff --git a/popen2-argument-fix.patch b/popen2-argument-fix.patch index ad4e6ec..b7cce00 100644 --- a/popen2-argument-fix.patch +++ b/popen2-argument-fix.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py +Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/util/blkif.py -+++ xen-4.0.0-testing/tools/python/xen/util/blkif.py +--- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py ++++ xen-4.0.1-testing/tools/python/xen/util/blkif.py @@ -81,7 +81,7 @@ def parse_uname(uname): if typ == "drbd": diff --git a/pv-driver-build.patch b/pv-driver-build.patch index 8e05029..599aaac 100644 --- a/pv-driver-build.patch +++ b/pv-driver-build.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/blkfront/Kbuild -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/blkfront/Kbuild ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild @@ -3,3 +3,4 @@ include $(M)/overrides.mk obj-m += xen-vbd.o diff --git a/pvdrv-import-shared-info.patch b/pvdrv-import-shared-info.patch index b172f2c..56f1716 100644 --- a/pvdrv-import-shared-info.patch +++ b/pvdrv-import-shared-info.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/evtchn.c -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/evtchn.c ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c @@ -40,7 +40,9 @@ #include #endif @@ -12,10 +12,10 @@ Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/evtchn.c #define is_valid_evtchn(x) ((x) != 0) #define evtchn_from_irq(x) (irq_evtchn[irq].evtchn) -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -77,7 +77,6 @@ static uint64_t callback_via; static int __devinit init_xen_info(void) { @@ -44,10 +44,10 @@ Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci. return 0; } -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h =================================================================== ---- xen-4.0.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h +--- xen-4.0.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.h @@ -27,6 +27,11 @@ unsigned long alloc_xen_mmio(unsigned long len); void platform_pci_resume(void); diff --git a/pvdrv_emulation_control.patch b/pvdrv_emulation_control.patch index c999e5c..576f4fb 100644 --- a/pvdrv_emulation_control.patch +++ b/pvdrv_emulation_control.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c @@ -365,6 +365,19 @@ static void platform_ioport_write(void * net_tap_shutdown_all(); fprintf(logfile, "Done.\n"); diff --git a/qemu-dm-segfault.patch b/qemu-dm-segfault.patch index 573ac19..8c54410 100644 --- a/qemu-dm-segfault.patch +++ b/qemu-dm-segfault.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/ide.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ide.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/ide.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/ide.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/ide.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ide.c @@ -935,8 +935,9 @@ static inline void ide_dma_submit_check( static inline void ide_set_irq(IDEState *s) diff --git a/qemu-security-etch1.diff b/qemu-security-etch1.diff index 62cc0d5..e9e704f 100644 --- a/qemu-security-etch1.diff +++ b/qemu-security-etch1.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/ne2000.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ne2000.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/ne2000.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/ne2000.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/ne2000.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/ne2000.c @@ -218,7 +218,7 @@ static int ne2000_can_receive(void *opaq NE2000State *s = opaque; @@ -11,10 +11,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/ne2000.c return !ne2000_buffer_full(s); } -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/pc.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pc.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/pc.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/pc.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/pc.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/pc.c @@ -409,7 +409,8 @@ static void bochs_bios_write(void *opaqu case 0x400: case 0x401: diff --git a/serial-split.patch b/serial-split.patch index 89f0cce..5d4c6cc 100644 --- a/serial-split.patch +++ b/serial-split.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/misc/serial-split/Makefile +Index: xen-4.0.1-testing/tools/misc/serial-split/Makefile =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/misc/serial-split/Makefile ++++ xen-4.0.1-testing/tools/misc/serial-split/Makefile @@ -0,0 +1,20 @@ +CC ?= gcc +CFLAGS ?= -Wall -Os @@ -23,10 +23,10 @@ Index: xen-4.0.0-testing/tools/misc/serial-split/Makefile + +%.o: %.c Makefile + $(CC) $(CFLAGS) -c -o $@ $< -Index: xen-4.0.0-testing/tools/misc/serial-split/serial-split.c +Index: xen-4.0.1-testing/tools/misc/serial-split/serial-split.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/misc/serial-split/serial-split.c ++++ xen-4.0.1-testing/tools/misc/serial-split/serial-split.c @@ -0,0 +1,422 @@ +/* + * serial-split.c diff --git a/snapshot-ioemu-delete.patch b/snapshot-ioemu-delete.patch index 11dccdd..aefc7d8 100644 --- a/snapshot-ioemu-delete.patch +++ b/snapshot-ioemu-delete.patch @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c -@@ -912,6 +912,18 @@ static void xenstore_process_dm_command_ +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +@@ -935,6 +935,18 @@ static void xenstore_process_dm_command_ } snapshot_name = xs_read(xsh, XBT_NULL, path, &len); @@ -21,10 +21,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c } else if (!strncmp(command, "continue", len)) { fprintf(logfile, "dm-command: continue after state save\n"); xen_pause_requested = 0; -Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/savevm.c -+++ xen-4.0.0-testing/tools/ioemu-remote/savevm.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/savevm.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c @@ -1096,6 +1096,35 @@ the_end: return ret; } @@ -61,10 +61,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c #ifndef CONFIG_DM void do_savevm(const char *name) -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h @@ -42,6 +42,7 @@ enum { /* xen-vl-extra.c */ diff --git a/snapshot-ioemu-restore.patch b/snapshot-ioemu-restore.patch index 54e63b8..9c589c9 100644 --- a/snapshot-ioemu-restore.patch +++ b/snapshot-ioemu-restore.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/blktap/drivers/blktapctrl.c +Index: xen-4.0.1-testing/tools/blktap/drivers/blktapctrl.c =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/blktapctrl.c -+++ xen-4.0.0-testing/tools/blktap/drivers/blktapctrl.c +--- xen-4.0.1-testing.orig/tools/blktap/drivers/blktapctrl.c ++++ xen-4.0.1-testing/tools/blktap/drivers/blktapctrl.c @@ -348,6 +348,7 @@ static int write_msg(int fd, int msgtype msg_dev = (msg_newdev_t *)(buf + sizeof(msg_hdr_t)); msg_dev->devnum = blkif->minor; @@ -10,10 +10,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/blktapctrl.c break; -Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h +Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/lib/blktaplib.h -+++ xen-4.0.0-testing/tools/blktap/lib/blktaplib.h +--- xen-4.0.1-testing.orig/tools/blktap/lib/blktaplib.h ++++ xen-4.0.1-testing/tools/blktap/lib/blktaplib.h @@ -189,6 +189,7 @@ typedef struct msg_hdr { typedef struct msg_newdev { uint8_t devnum; @@ -22,10 +22,10 @@ Index: xen-4.0.0-testing/tools/blktap/lib/blktaplib.h } msg_newdev_t; typedef struct msg_pid { -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -67,6 +67,8 @@ int write_fd; static pid_t process; fd_list_entry_t *fd_start = NULL; @@ -87,10 +87,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c memset(buf, 0x00, MSG_SIZE); msglen = sizeof(msg_hdr_t); -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -103,6 +103,8 @@ int xenstore_watch_new_callback(const ch } @@ -100,11 +100,11 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c static int pasprintf(char **buf, const char *fmt, ...) { va_list ap; -@@ -644,8 +646,33 @@ void xenstore_parse_domain_config(int hv - } - } - pstrcpy(bs->filename, sizeof(bs->filename), params); -- if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) +@@ -666,8 +668,33 @@ void xenstore_parse_domain_config(int hv + + fprintf(stderr, "Using file %s in read-%s mode\n", bs->filename, is_readonly ? "only" : "write"); + +- if (bdrv_open2(bs, params, flags, format) < 0) + if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) { fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0"); + } else { @@ -135,7 +135,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c } #endif -@@ -779,6 +806,23 @@ int xenstore_parse_disable_pf_config () +@@ -802,6 +829,23 @@ int xenstore_parse_disable_pf_config () return disable_pf; } diff --git a/snapshot-ioemu-save.patch b/snapshot-ioemu-save.patch index 27aa63d..ac7f094 100644 --- a/snapshot-ioemu-save.patch +++ b/snapshot-ioemu-save.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/savevm.c -+++ xen-4.0.0-testing/tools/ioemu-remote/savevm.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/savevm.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/savevm.c @@ -28,6 +28,7 @@ #include "sysemu.h" #include "qemu-timer.h" @@ -97,10 +97,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/savevm.c #ifndef CONFIG_DM void do_savevm(const char *name) -Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/helper2.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/helper2.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/helper2.c -+++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/helper2.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/i386-dm/helper2.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/helper2.c @@ -112,6 +112,9 @@ int send_vcpu = 0; //the evtchn port for polling the notification, evtchn_port_t *ioreq_local_port; @@ -167,10 +167,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/helper2.c /* Wait to be allowed to continue */ while (xen_pause_requested) { -Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-xen.h -+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-xen.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-xen.h @@ -34,6 +34,15 @@ void qemu_invalidate_map_cache(void) #define mapcache_lock() ((void)0) #define mapcache_unlock() ((void)0) @@ -195,10 +195,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-xen.h void xenstore_check_new_media_present(int timeout); void xenstore_write_vncport(int vnc_display); void xenstore_read_vncpasswd(int domid, char *pwbuf, size_t pwbuflen); -Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/xenstore.c -+++ xen-4.0.0-testing/tools/ioemu-remote/xenstore.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -17,6 +17,7 @@ #include "exec-all.h" @@ -207,7 +207,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c #include "console.h" #include "hw.h" -@@ -839,6 +840,7 @@ static void xenstore_process_dm_command_ +@@ -862,6 +863,7 @@ static void xenstore_process_dm_command_ { char *path = NULL, *command = NULL, *par = NULL; unsigned int len; @@ -215,7 +215,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c if (pasprintf(&path, "/local/domain/0/device-model/%u/command", domid) == -1) { -@@ -854,7 +856,18 @@ static void xenstore_process_dm_command_ +@@ -877,7 +879,18 @@ static void xenstore_process_dm_command_ if (!strncmp(command, "save", len)) { fprintf(logfile, "dm-command: pause and save state\n"); @@ -235,7 +235,7 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/xenstore.c } else if (!strncmp(command, "continue", len)) { fprintf(logfile, "dm-command: continue after state save\n"); xen_pause_requested = 0; -@@ -987,6 +1000,13 @@ void xenstore_record_dm_state(const char +@@ -1010,6 +1023,13 @@ void xenstore_record_dm_state(const char xenstore_record_dm("state", state); } diff --git a/snapshot-xend.patch b/snapshot-xend.patch index 7a22802..0d11d6a 100644 --- a/snapshot-xend.patch +++ b/snapshot-xend.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +Index: xen-4.0.1-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.1-testing/tools/python/xen/xend/image.py @@ -490,7 +490,7 @@ class ImageHandler: domains.domains_lock.acquire() @@ -43,10 +43,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/image.py def recreate(self): if self.device_model is None: return -Index: xen-4.0.0-testing/tools/python/xen/xend/server/blkif.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/blkif.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/blkif.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/blkif.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/blkif.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/blkif.py @@ -88,6 +88,9 @@ class BlkifController(DevController): if bootable != None: back['bootable'] = str(bootable) @@ -57,10 +57,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/blkif.py if security.on() == xsconstants.XS_POLICY_USE: self.do_access_control(config, uname) -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py @@ -95,6 +95,31 @@ class SrvDomain(SrvDir): def do_save(self, _, req): return self.xd.domain_save(self.dom.domid, req.args['file'][0]) @@ -102,10 +102,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py return self.perform(req) # -Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py @@ -65,7 +65,7 @@ def insert_after(list, pred, value): return @@ -321,10 +321,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py if not paused: dominfo.unpause() -Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py @@ -242,6 +242,7 @@ XENAPI_CFG_TYPES = { 'memory_sharing': int, 'Description': str, @@ -333,10 +333,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py } # List of legacy configuration keys that have no equivalent in the -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py @@ -53,6 +53,7 @@ from xen.xend.xenstore.xstransact import from xen.xend.xenstore.xswatch import xswatch from xen.util import mkdir, rwlock @@ -533,10 +533,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py def domain_pincpu(self, domid, vcpu, cpumap): """Set which cpus vcpu can use -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py @@ -123,6 +123,14 @@ SUBCOMMAND_HELP = { 'Restore a domain from a saved state.'), 'save' : ('[-c|-f] ', @@ -647,7 +647,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py def xm_save(args): arg_check(args, "save", 2, 4) -@@ -3729,6 +3804,10 @@ commands = { +@@ -3743,6 +3818,10 @@ commands = { "restore": xm_restore, "resume": xm_resume, "save": xm_save, diff --git a/supported_module.diff b/supported_module.diff index b72f0ac..196360b 100644 --- a/supported_module.diff +++ b/supported_module.diff @@ -2,10 +2,10 @@ Make our PV drivers "Novell supported modules" Signed-off-by: K. Y. Srinivasan -Index: xen-4.0.0-testing/unmodified_drivers/linux-2.6/Module.supported +Index: xen-4.0.1-testing/unmodified_drivers/linux-2.6/Module.supported =================================================================== --- /dev/null -+++ xen-4.0.0-testing/unmodified_drivers/linux-2.6/Module.supported ++++ xen-4.0.1-testing/unmodified_drivers/linux-2.6/Module.supported @@ -0,0 +1,5 @@ +xen-vbd +xen-platform-pci diff --git a/suse-disable-tap2-default.patch b/suse-disable-tap2-default.patch deleted file mode 100644 index adb469c..0000000 --- a/suse-disable-tap2-default.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py -@@ -2522,8 +2522,10 @@ def xm_usb_list_assignable_devices(args) - def parse_block_configuration(args): - dom = args[0] - -- if args[1].startswith('tap:'): -+ if args[1].startswith('tap2:'): - cls = 'tap2' -+ elif args[1].startswith('tap:'): -+ cls = 'tap' - else: - cls = 'vbd' - -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py -@@ -783,8 +783,10 @@ def configure_disks(config_devs, vals): - """Create the config for disks (virtual block devices). - """ - for (uname, dev, mode, backend, protocol) in vals.disk: -- if uname.startswith('tap:'): -+ if uname.startswith('tap2:'): - cls = 'tap2' -+ elif uname.startswith('tap:'): -+ cls = 'tap' - else: - cls = 'vbd' - diff --git a/tapdisk-ioemu-logfile.patch b/tapdisk-ioemu-logfile.patch index 407174f..4b7652c 100644 --- a/tapdisk-ioemu-logfile.patch +++ b/tapdisk-ioemu-logfile.patch @@ -11,11 +11,11 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c -+++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c -@@ -78,15 +78,22 @@ int main(void) +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c +@@ -78,15 +78,22 @@ int main(void) struct timeval tv; void *old_fd_start = NULL; diff --git a/tapdisk-ioemu-shutdown-fix.patch b/tapdisk-ioemu-shutdown-fix.patch index 493c074..55913ea 100644 --- a/tapdisk-ioemu-shutdown-fix.patch +++ b/tapdisk-ioemu-shutdown-fix.patch @@ -16,10 +16,10 @@ Signed-off-by: Kevin Wolf tapdisk-ioemu.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c @@ -65,6 +65,7 @@ int read_fd; int write_fd; @@ -46,10 +46,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_blktap.c case CTLMSG_PID: memset(buf, 0x00, MSG_SIZE); -Index: xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c -+++ xen-4.0.0-testing/tools/ioemu-remote/tapdisk-ioemu.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c @@ -14,6 +14,7 @@ extern void qemu_aio_init(void); extern void qemu_aio_poll(void); diff --git a/tmp_build.patch b/tmp_build.patch index cf004a7..64425d1 100644 --- a/tmp_build.patch +++ b/tmp_build.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/xenstore/Makefile +Index: xen-4.0.1-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.0-testing/tools/xenstore/Makefile +--- xen-4.0.1-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.1-testing/tools/xenstore/Makefile @@ -61,6 +61,7 @@ $(CLIENTS_DOMU): xenstore xenstore: xenstore_client.o $(LIBXENSTORE) diff --git a/tools-gdbserver-build.diff b/tools-gdbserver-build.diff index 90991a6..10c1b30 100644 --- a/tools-gdbserver-build.diff +++ b/tools-gdbserver-build.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in +Index: xen-4.0.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in =================================================================== ---- xen-4.0.0-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in -+++ xen-4.0.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in +--- xen-4.0.1-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in ++++ xen-4.0.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in @@ -90,7 +90,7 @@ INCLUDE_CFLAGS = -I. -I${srcdir} -I$(src GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS} #PROFILE_CFLAGS = -pg @@ -11,7 +11,7 @@ Index: xen-4.0.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/M # CFLAGS is specifically reserved for setting from the command line # when running make. I.E. "make CFLAGS=-Wmissing-prototypes". -@@ -260,7 +260,7 @@ linux-low.o: linux-low.c $(linux_low_h) +@@ -260,7 +260,7 @@ linux-low.o: linux-low.c $(linux_low_h) $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@ linux-xen-low.o: linux-xen-low.c $(linux_low_h) $(server_h) diff --git a/tools-kboot.diff b/tools-kboot.diff index a074251..dc73508 100644 --- a/tools-kboot.diff +++ b/tools-kboot.diff @@ -13,10 +13,10 @@ Signed-off-by: Gerd Hoffmann tools/kboot/select-kernel | 59 + 9 files changed, 2111 insertions(+) -Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 +Index: xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 =================================================================== --- /dev/null -+++ xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 ++++ xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 @@ -0,0 +1,874 @@ +# +# Automatically generated make config: don't edit @@ -892,10 +892,10 @@ Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32 +CONFIG_X86_NO_TSS=y +CONFIG_X86_NO_IDT=y +CONFIG_KTIME_SCALAR=y -Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 +Index: xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 =================================================================== --- /dev/null -+++ xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 ++++ xen-4.0.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 @@ -0,0 +1,653 @@ +# +# Automatically generated make config: don't edit @@ -1550,17 +1550,17 @@ Index: xen-4.0.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64 +# CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y -Index: xen-4.0.0-testing/buildconfigs/mk.linux-2.6-xenUboot +Index: xen-4.0.1-testing/buildconfigs/mk.linux-2.6-xenUboot =================================================================== --- /dev/null -+++ xen-4.0.0-testing/buildconfigs/mk.linux-2.6-xenUboot ++++ xen-4.0.1-testing/buildconfigs/mk.linux-2.6-xenUboot @@ -0,0 +1,2 @@ +EXTRAVERSION = xenUboot +include buildconfigs/mk.linux-2.6-xen -Index: xen-4.0.0-testing/tools/kboot/Makefile +Index: xen-4.0.1-testing/tools/kboot/Makefile =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/Makefile ++++ xen-4.0.1-testing/tools/kboot/Makefile @@ -0,0 +1,23 @@ +# +# tools/kboot/Makefile @@ -1585,10 +1585,10 @@ Index: xen-4.0.0-testing/tools/kboot/Makefile +kboot.initramfs: mkinitramfs init select-kernel ../xcutils/xc_kexec + sh ./mkinitramfs | tee $@ + -Index: xen-4.0.0-testing/tools/kboot/README +Index: xen-4.0.1-testing/tools/kboot/README =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/README ++++ xen-4.0.1-testing/tools/kboot/README @@ -0,0 +1,43 @@ + +This is a simple kexec-based boot loader @@ -1633,10 +1633,10 @@ Index: xen-4.0.0-testing/tools/kboot/README + +-- +Gerd Hoffmann -Index: xen-4.0.0-testing/tools/kboot/init +Index: xen-4.0.1-testing/tools/kboot/init =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/init ++++ xen-4.0.1-testing/tools/kboot/init @@ -0,0 +1,309 @@ +#!/bin/sh + @@ -1947,10 +1947,10 @@ Index: xen-4.0.0-testing/tools/kboot/init +msg "bye ..." +banner "boot $guestos" +xc_kexec -e -Index: xen-4.0.0-testing/tools/kboot/mkinitramfs +Index: xen-4.0.1-testing/tools/kboot/mkinitramfs =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/mkinitramfs ++++ xen-4.0.1-testing/tools/kboot/mkinitramfs @@ -0,0 +1,111 @@ +#!/bin/sh + @@ -2063,10 +2063,10 @@ Index: xen-4.0.0-testing/tools/kboot/mkinitramfs + echo "file $LIB/$(basename $lib) $lib 0755 0 0" +done +echo -Index: xen-4.0.0-testing/tools/kboot/select-kernel +Index: xen-4.0.1-testing/tools/kboot/select-kernel =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/kboot/select-kernel ++++ xen-4.0.1-testing/tools/kboot/select-kernel @@ -0,0 +1,59 @@ +#!/bin/sh + @@ -2127,10 +2127,10 @@ Index: xen-4.0.0-testing/tools/kboot/select-kernel +msg "using $kernelname" +echo "$kernelname" + -Index: xen-4.0.0-testing/make-kboot +Index: xen-4.0.1-testing/make-kboot =================================================================== --- /dev/null -+++ xen-4.0.0-testing/make-kboot ++++ xen-4.0.1-testing/make-kboot @@ -0,0 +1,37 @@ +#!/bin/sh + diff --git a/tools-xc_kexec.diff b/tools-xc_kexec.diff index 8fc3ec3..1553d27 100644 --- a/tools-xc_kexec.diff +++ b/tools-xc_kexec.diff @@ -23,10 +23,10 @@ Signed-off-by: Gerd Hoffmann tools/xcutils/xc_kexec.c | 503 +++++++++++++++ 19 files changed, 4988 insertions(+), 2 deletions(-) -Index: xen-4.0.0-testing/tools/xcutils/Makefile +Index: xen-4.0.1-testing/tools/xcutils/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/xcutils/Makefile -+++ xen-4.0.0-testing/tools/xcutils/Makefile +--- xen-4.0.1-testing.orig/tools/xcutils/Makefile ++++ xen-4.0.1-testing/tools/xcutils/Makefile @@ -14,7 +14,7 @@ include $(XEN_ROOT)/tools/Rules.mk CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) @@ -55,10 +55,10 @@ Index: xen-4.0.0-testing/tools/xcutils/Makefile + make -C helper clean -include $(DEPS) -Index: xen-4.0.0-testing/tools/xcutils/helper/Makefile +Index: xen-4.0.1-testing/tools/xcutils/helper/Makefile =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/Makefile ++++ xen-4.0.1-testing/tools/xcutils/helper/Makefile @@ -0,0 +1,39 @@ + +XEN_ROOT = ../../.. @@ -99,10 +99,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/Makefile +# dependencies + +$(XEN_TARGET_ARCH)/entry.o: $(XEN_TARGET_ARCH)/entry.S $(XEN_TARGET_ARCH)/offsets.h -Index: xen-4.0.0-testing/tools/xcutils/helper/console.c +Index: xen-4.0.1-testing/tools/xcutils/helper/console.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/console.c ++++ xen-4.0.1-testing/tools/xcutils/helper/console.c @@ -0,0 +1,69 @@ +#include + @@ -173,10 +173,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/console.c + + return printed_len; +} -Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.c +Index: xen-4.0.1-testing/tools/xcutils/helper/ctype.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/ctype.c ++++ xen-4.0.1-testing/tools/xcutils/helper/ctype.c @@ -0,0 +1,35 @@ +/* + * linux/lib/ctype.c @@ -213,10 +213,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.c +_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */ + +EXPORT_SYMBOL(_ctype); -Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.h +Index: xen-4.0.1-testing/tools/xcutils/helper/ctype.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/ctype.h ++++ xen-4.0.1-testing/tools/xcutils/helper/ctype.h @@ -0,0 +1,54 @@ +#ifndef _LINUX_CTYPE_H +#define _LINUX_CTYPE_H @@ -272,10 +272,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/ctype.h +#define toupper(c) __toupper(c) + +#endif -Index: xen-4.0.0-testing/tools/xcutils/helper/helper.h +Index: xen-4.0.1-testing/tools/xcutils/helper/helper.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/helper.h ++++ xen-4.0.1-testing/tools/xcutils/helper/helper.h @@ -0,0 +1,107 @@ +#include +#include @@ -384,10 +384,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/helper.h +int sprintf(char * buf, const char *fmt, ...); +int vsscanf(const char * buf, const char * fmt, va_list args); +int sscanf(const char * buf, const char * fmt, ...); -Index: xen-4.0.0-testing/tools/xcutils/helper/main.c +Index: xen-4.0.1-testing/tools/xcutils/helper/main.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/main.c ++++ xen-4.0.1-testing/tools/xcutils/helper/main.c @@ -0,0 +1,651 @@ +#include +#include "hypercall.h" @@ -1040,10 +1040,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/main.c + printk("\r\n"); + start_kernel(); +} -Index: xen-4.0.0-testing/tools/xcutils/helper/make-offsets.c +Index: xen-4.0.1-testing/tools/xcutils/helper/make-offsets.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/make-offsets.c ++++ xen-4.0.1-testing/tools/xcutils/helper/make-offsets.c @@ -0,0 +1,28 @@ +#include +#include @@ -1073,10 +1073,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/make-offsets.c + vcpu_off("cr3", ctrlreg[3]); + return 0; +} -Index: xen-4.0.0-testing/tools/xcutils/helper/printk.c +Index: xen-4.0.1-testing/tools/xcutils/helper/printk.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/printk.c ++++ xen-4.0.1-testing/tools/xcutils/helper/printk.c @@ -0,0 +1,1051 @@ +/* + * linux/kernel/printk.c @@ -2129,10 +2129,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/printk.c + printk_ratelimit_burst); +} +EXPORT_SYMBOL(printk_ratelimit); -Index: xen-4.0.0-testing/tools/xcutils/helper/string.c +Index: xen-4.0.1-testing/tools/xcutils/helper/string.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/string.c ++++ xen-4.0.1-testing/tools/xcutils/helper/string.c @@ -0,0 +1,601 @@ +/* + * linux/lib/string.c @@ -2735,10 +2735,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/string.c +} +EXPORT_SYMBOL(memchr); +#endif -Index: xen-4.0.0-testing/tools/xcutils/helper/vsprintf.c +Index: xen-4.0.1-testing/tools/xcutils/helper/vsprintf.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/vsprintf.c ++++ xen-4.0.1-testing/tools/xcutils/helper/vsprintf.c @@ -0,0 +1,842 @@ +/* + * linux/lib/vsprintf.c @@ -3582,10 +3582,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/vsprintf.c +} + +EXPORT_SYMBOL(sscanf); -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/div64.h +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/div64.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/div64.h ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/div64.h @@ -0,0 +1,48 @@ +#ifndef __I386_DIV64 +#define __I386_DIV64 @@ -3635,10 +3635,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/div64.h + +} +#endif -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/entry.S +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/entry.S =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/entry.S ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/entry.S @@ -0,0 +1,49 @@ +#include "offsets.h" + @@ -3689,10 +3689,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/entry.S + nop + .align 4096 +hypercall_end: -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/hypercall.h +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_32/hypercall.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_32/hypercall.h ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_32/hypercall.h @@ -0,0 +1,359 @@ +/****************************************************************************** + * hypercall.h @@ -4053,10 +4053,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_32/hypercall.h + + +#endif /* __HYPERCALL_H__ */ -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/div64.h +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/div64.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/div64.h ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/div64.h @@ -0,0 +1,57 @@ +#ifndef _ASM_GENERIC_DIV64_H +#define _ASM_GENERIC_DIV64_H @@ -4115,10 +4115,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/div64.h +#endif /* BITS_PER_LONG */ + +#endif /* _ASM_GENERIC_DIV64_H */ -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/entry.S +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/entry.S =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/entry.S ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/entry.S @@ -0,0 +1,50 @@ +#include "offsets.h" + @@ -4170,10 +4170,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/entry.S + nop + .align 4096 +hypercall_end: -Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/hypercall.h +Index: xen-4.0.1-testing/tools/xcutils/helper/x86_64/hypercall.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/helper/x86_64/hypercall.h ++++ xen-4.0.1-testing/tools/xcutils/helper/x86_64/hypercall.h @@ -0,0 +1,354 @@ +/****************************************************************************** + * hypercall.h @@ -4529,10 +4529,10 @@ Index: xen-4.0.0-testing/tools/xcutils/helper/x86_64/hypercall.h +} + +#endif /* __HYPERCALL_H__ */ -Index: xen-4.0.0-testing/tools/xcutils/kexec-syscall.h +Index: xen-4.0.1-testing/tools/xcutils/kexec-syscall.h =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/kexec-syscall.h ++++ xen-4.0.1-testing/tools/xcutils/kexec-syscall.h @@ -0,0 +1,80 @@ +#ifndef KEXEC_SYSCALL_H +#define KEXEC_SYSCALL_H @@ -4614,10 +4614,10 @@ Index: xen-4.0.0-testing/tools/xcutils/kexec-syscall.h +#define KEXEC_MAX_SEGMENTS 16 + +#endif /* KEXEC_SYSCALL_H */ -Index: xen-4.0.0-testing/tools/xcutils/xc_kexec.c +Index: xen-4.0.1-testing/tools/xcutils/xc_kexec.c =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/xcutils/xc_kexec.c ++++ xen-4.0.1-testing/tools/xcutils/xc_kexec.c @@ -0,0 +1,503 @@ +#include +#include diff --git a/udev-rules.patch b/udev-rules.patch index 5ef05dd..abc196f 100644 --- a/udev-rules.patch +++ b/udev-rules.patch @@ -1,9 +1,17 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/xen-backend.rules +Index: xen-4.0.1-testing/tools/hotplug/Linux/xen-backend.rules =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/xen-backend.rules -+++ xen-4.0.0-testing/tools/hotplug/Linux/xen-backend.rules -@@ -9,3 +9,4 @@ SUBSYSTEM=="xen-backend", ACTION=="remov +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/xen-backend.rules ++++ xen-4.0.1-testing/tools/hotplug/Linux/xen-backend.rules +@@ -7,5 +7,10 @@ SUBSYSTEM=="xen-backend", KERNEL=="vif-* + SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="/etc/xen/scripts/vscsi $env{ACTION}" + SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/etc/xen/scripts/xen-hotplug-cleanup" KERNEL=="evtchn", NAME="xen/%k" - KERNEL=="blktap[0-9]*", NAME="xen/%k" - KERNEL=="pci_iomul", NAME="xen/%k" +-KERNEL=="blktap[0-9]*", NAME="xen/%k" +-KERNEL=="pci_iomul", NAME="xen/%k" ++SUBSYSTEM=="xen", KERNEL=="blktap[0-9]*", NAME="xen/%k", MODE="0600" ++SUBSYSTEM=="blktap2", KERNEL=="blktap[0-9]*", NAME="xen/blktap-2/%k", MODE="0600" ++KERNEL=="blktap-control", NAME="xen/blktap-2/control", MODE="0600" ++KERNEL=="gntdev", NAME="xen/%k", MODE="0600" ++KERNEL=="pci_iomul", NAME="xen/%k", MODE="0600" ++KERNEL=="tapdev[a-z]*", NAME="xen/blktap-2/tapdev%m", MODE="0600" +KERNELS=="xen", KERNEL=="xvd*", SUBSYSTEM=="block", OPTIONS+="last_rule" diff --git a/usb-list.patch b/usb-list.patch new file mode 100644 index 0000000..9b1d0d6 --- /dev/null +++ b/usb-list.patch @@ -0,0 +1,45 @@ +"usb-hc-create" does not check usb-ver parameter. It allows 2/2.0/2.0usb/2.0aaa. While low level +driver doing hc create, it gets an integer by vssanf %d from usb-ver string, so there is no problem. +But 2/2.0/2.0usb/2.0aaa will be saved into VM config. + +After that, while doing "usb-list", it cannot handle "2.0/2.0usb/2.0aaa" and will cause error: +Idx BE state usb-ver BE-path +Error: Invalid argument. +Usage: xm usb-list + +This patch is to let "usb-list" handle all usb-ver cases as low level driver does and won't cause error. + +About this problem, I've submitted two patches to upstream before, but got no response. Information +could be referred to: + http://www.gossamer-threads.com/lists/xen/devel/178406?search_string=usb-list;#178406 + http://www.gossamer-threads.com/lists/xen/devel/181021?search_string=usb-list;#181021 + + +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py +=================================================================== +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py +@@ -2545,10 +2545,22 @@ def xm_usb_list(args): + ni = parse_dev_info(x[1]) + ni['idx'] = int(x[0]) + usbver = sxp.child_value(x[1], 'usb-ver') ++ ++ substr = re.search("^\d{1,}", usbver) ++ if substr: ++ usbver = substr.group() ++ else: ++ print "Unknown usb-ver" ++ continue ++ + if int(usbver) == 1: + ni['usb-ver'] = 'USB1.1' +- else: ++ elif int(usbver) == 2: + ni['usb-ver'] = 'USB2.0' ++ else: ++ print "Unknown usb-ver" ++ continue ++ + print "%(idx)-3d %(backend-id)-3d %(state)-5d %(usb-ver)-7s %(be-path)-30s " % ni + + ports = sxp.child(x[1], 'port') diff --git a/vif-bridge-no-iptables.patch b/vif-bridge-no-iptables.patch index d19c5ef..14b2c0e 100644 --- a/vif-bridge-no-iptables.patch +++ b/vif-bridge-no-iptables.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/vif-bridge +Index: xen-4.0.1-testing/tools/hotplug/Linux/vif-bridge =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/vif-bridge -+++ xen-4.0.0-testing/tools/hotplug/Linux/vif-bridge +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/vif-bridge ++++ xen-4.0.1-testing/tools/hotplug/Linux/vif-bridge @@ -91,7 +91,7 @@ case "$command" in ;; esac diff --git a/vif-route-ifup.patch b/vif-route-ifup.patch index 284444d..c424c4c 100644 --- a/vif-route-ifup.patch +++ b/vif-route-ifup.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/vif-route-ifup +Index: xen-4.0.1-testing/tools/hotplug/Linux/vif-route-ifup =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/hotplug/Linux/vif-route-ifup ++++ xen-4.0.1-testing/tools/hotplug/Linux/vif-route-ifup @@ -0,0 +1,34 @@ +#!/bin/bash +#============================================================================ @@ -37,10 +37,10 @@ Index: xen-4.0.0-testing/tools/hotplug/Linux/vif-route-ifup +then + success +fi -Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +Index: xen-4.0.1-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.0-testing/tools/examples/xend-config.sxp +--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.1-testing/tools/examples/xend-config.sxp @@ -184,6 +184,26 @@ #(network-script network-route) #(vif-script vif-route) @@ -68,10 +68,10 @@ Index: xen-4.0.0-testing/tools/examples/xend-config.sxp ## Use the following if network traffic is routed with NAT, as an alternative # to the settings for bridged networking given above. -Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile @@ -9,7 +9,7 @@ XENDOMAINS_SYSCONFIG = init.d/sysconfig. # Xen script dir and scripts to go there. diff --git a/x86-cpufreq-report.patch b/x86-cpufreq-report.patch index 5afbf29..359f246 100644 --- a/x86-cpufreq-report.patch +++ b/x86-cpufreq-report.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c +Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/platform_hypercall.c -+++ xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c +--- xen-4.0.1-testing.orig/xen/arch/x86/platform_hypercall.c ++++ xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c @@ -22,7 +22,7 @@ #include #include @@ -19,7 +19,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c struct xen_platform_op curop, *op = &curop; if ( !IS_PRIV(current->domain) ) -@@ -484,6 +485,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -487,6 +488,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe op->u.mem_add.epfn, op->u.mem_add.pxm); break; @@ -44,10 +44,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/platform_hypercall.c default: ret = -ENOSYS; break; -Index: xen-4.0.0-testing/xen/include/public/platform.h +Index: xen-4.0.1-testing/xen/include/public/platform.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/public/platform.h -+++ xen-4.0.0-testing/xen/include/public/platform.h +--- xen-4.0.1-testing.orig/xen/include/public/platform.h ++++ xen-4.0.1-testing/xen/include/public/platform.h @@ -355,6 +355,14 @@ struct xenpf_mem_hotadd uint32_t flags; }; diff --git a/x86-extra-trap-info.patch b/x86-extra-trap-info.patch index 2339519..df2c0bc 100644 --- a/x86-extra-trap-info.patch +++ b/x86-extra-trap-info.patch @@ -1,5 +1,7 @@ ---- 2010-01-06.orig/xen/arch/x86/x86_32/entry.S 2009-12-02 10:02:49.000000000 +0100 -+++ 2010-01-06/xen/arch/x86/x86_32/entry.S 2010-01-06 11:23:45.000000000 +0100 +Index: xen-4.0.1-testing/xen/arch/x86/x86_32/entry.S +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/entry.S ++++ xen-4.0.1-testing/xen/arch/x86/x86_32/entry.S @@ -403,21 +403,33 @@ ring1: /* obtain ss/esp from oldss/olde movl %eax,UREGS_eip+4(%esp) ret @@ -44,8 +46,10 @@ domain_crash_synchronous: pushl $domain_crash_synchronous_string call printk ---- 2010-01-06.orig/xen/arch/x86/x86_64/entry.S 2009-12-02 10:02:49.000000000 +0100 -+++ 2010-01-06/xen/arch/x86/x86_64/entry.S 2010-01-06 11:23:45.000000000 +0100 +Index: xen-4.0.1-testing/xen/arch/x86/x86_64/entry.S +=================================================================== +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/entry.S ++++ xen-4.0.1-testing/xen/arch/x86/x86_64/entry.S @@ -421,17 +421,30 @@ create_bounce_frame: movq %rax,UREGS_rip+8(%rsp) ret diff --git a/x86-ioapic-ack-default.patch b/x86-ioapic-ack-default.patch index cb989d6..9dccd3f 100644 --- a/x86-ioapic-ack-default.patch +++ b/x86-ioapic-ack-default.patch @@ -1,10 +1,10 @@ Change default IO-APIC ack mode for single IO-APIC systems to old-style. -Index: xen-4.0.0-testing/xen/arch/x86/io_apic.c +Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/io_apic.c -+++ xen-4.0.0-testing/xen/arch/x86/io_apic.c -@@ -1442,7 +1442,7 @@ static unsigned int startup_level_ioapic +--- xen-4.0.1-testing.orig/xen/arch/x86/io_apic.c ++++ xen-4.0.1-testing/xen/arch/x86/io_apic.c +@@ -1562,7 +1562,7 @@ static unsigned int startup_level_ioapic return 0; /* don't check for pending */ } @@ -13,7 +13,7 @@ Index: xen-4.0.0-testing/xen/arch/x86/io_apic.c static void setup_ioapic_ack(char *s) { if ( !strcmp(s, "old") ) -@@ -1946,6 +1946,8 @@ void __init setup_IO_APIC(void) +@@ -2066,6 +2066,8 @@ void __init setup_IO_APIC(void) else io_apic_irqs = ~PIC_IRQS; diff --git a/x86-show-page-walk-early.patch b/x86-show-page-walk-early.patch index dac66f9..196b236 100644 --- a/x86-show-page-walk-early.patch +++ b/x86-show-page-walk-early.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/arch/x86/mm.c +Index: xen-4.0.1-testing/xen/arch/x86/mm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/mm.c +--- xen-4.0.1-testing.orig/xen/arch/x86/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/mm.c @@ -154,6 +154,8 @@ unsigned long __read_mostly pdx_group_va int opt_allow_hugepage; boolean_param("allowhugepage", opt_allow_hugepage); @@ -11,11 +11,11 @@ Index: xen-4.0.0-testing/xen/arch/x86/mm.c #define l1_disallow_mask(d) \ ((d != dom_io) && \ (rangeset_is_empty((d)->iomem_caps) && \ -Index: xen-4.0.0-testing/xen/arch/x86/traps.c +Index: xen-4.0.1-testing/xen/arch/x86/traps.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/traps.c -+++ xen-4.0.0-testing/xen/arch/x86/traps.c -@@ -1352,6 +1352,7 @@ asmlinkage void do_early_page_fault(stru +--- xen-4.0.1-testing.orig/xen/arch/x86/traps.c ++++ xen-4.0.1-testing/xen/arch/x86/traps.c +@@ -1336,6 +1336,7 @@ asmlinkage void do_early_page_fault(stru unsigned long *stk = (unsigned long *)regs; printk("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n", regs->cs, _p(regs->eip), _p(cr2), regs->error_code); @@ -23,10 +23,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/traps.c printk("Stack dump: "); while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 ) printk("%p ", _p(*stk++)); -Index: xen-4.0.0-testing/xen/arch/x86/x86_32/mm.c +Index: xen-4.0.1-testing/xen/arch/x86/x86_32/mm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_32/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_32/mm.c +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/x86_32/mm.c @@ -122,6 +122,8 @@ void __init paging_init(void) #undef CNT #undef MFN @@ -36,10 +36,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/x86_32/mm.c /* Create page tables for ioremap()/map_domain_page_global(). */ for ( i = 0; i < (IOREMAP_MBYTES >> (L2_PAGETABLE_SHIFT - 20)); i++ ) { -Index: xen-4.0.0-testing/xen/arch/x86/x86_32/traps.c +Index: xen-4.0.1-testing/xen/arch/x86/x86_32/traps.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_32/traps.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_32/traps.c +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_32/traps.c ++++ xen-4.0.1-testing/xen/arch/x86/x86_32/traps.c @@ -161,7 +161,8 @@ void show_page_walk(unsigned long addr) l3t += (cr3 & 0xFE0UL) >> 3; l3e = l3t[l3_table_offset(addr)]; @@ -70,10 +70,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/x86_32/traps.c printk(" L1[0x%03lx] = %"PRIpte" %08lx\n", l1_table_offset(addr), l1e_get_intpte(l1e), pfn); unmap_domain_page(l1t); -Index: xen-4.0.0-testing/xen/arch/x86/x86_64/mm.c +Index: xen-4.0.1-testing/xen/arch/x86/x86_64/mm.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_64/mm.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_64/mm.c +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/mm.c ++++ xen-4.0.1-testing/xen/arch/x86/x86_64/mm.c @@ -725,6 +725,8 @@ void __init paging_init(void) #undef CNT #undef MFN @@ -83,10 +83,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/x86_64/mm.c /* Create user-accessible L2 directory to map the MPT for compat guests. */ BUILD_BUG_ON(l4_table_offset(RDWR_MPT_VIRT_START) != l4_table_offset(HIRO_COMPAT_MPT_VIRT_START)); -Index: xen-4.0.0-testing/xen/arch/x86/x86_64/traps.c +Index: xen-4.0.1-testing/xen/arch/x86/x86_64/traps.c =================================================================== ---- xen-4.0.0-testing.orig/xen/arch/x86/x86_64/traps.c -+++ xen-4.0.0-testing/xen/arch/x86/x86_64/traps.c +--- xen-4.0.1-testing.orig/xen/arch/x86/x86_64/traps.c ++++ xen-4.0.1-testing/xen/arch/x86/x86_64/traps.c @@ -176,7 +176,8 @@ void show_page_walk(unsigned long addr) l4t = mfn_to_virt(mfn); l4e = l4t[l4_table_offset(addr)]; @@ -127,10 +127,10 @@ Index: xen-4.0.0-testing/xen/arch/x86/x86_64/traps.c printk(" L1[0x%03lx] = %"PRIpte" %016lx\n", l1_table_offset(addr), l1e_get_intpte(l1e), pfn); } -Index: xen-4.0.0-testing/xen/include/asm-x86/mm.h +Index: xen-4.0.1-testing/xen/include/asm-x86/mm.h =================================================================== ---- xen-4.0.0-testing.orig/xen/include/asm-x86/mm.h -+++ xen-4.0.0-testing/xen/include/asm-x86/mm.h +--- xen-4.0.1-testing.orig/xen/include/asm-x86/mm.h ++++ xen-4.0.1-testing/xen/include/asm-x86/mm.h @@ -443,6 +443,8 @@ TYPE_SAFE(unsigned long,mfn); #define SHARED_M2P_ENTRY (~0UL - 1UL) #define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY) diff --git a/xen-4.0.0-testing-src.tar.bz2 b/xen-4.0.0-testing-src.tar.bz2 deleted file mode 100644 index 2736a64..0000000 --- a/xen-4.0.0-testing-src.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dae429f07e7c09ed55f941d3ad7cbfe39f9e29d93da70df13594acaa2ee9f34b -size 23205463 diff --git a/xen-4.0.1-testing-src.tar.bz2 b/xen-4.0.1-testing-src.tar.bz2 new file mode 100644 index 0000000..8b1baff --- /dev/null +++ b/xen-4.0.1-testing-src.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f50525ffe664fa03f425d044e7cde87b264c4cae9336d2c866e312e89dcd0b83 +size 23280495 diff --git a/xen-api-auth.patch b/xen-api-auth.patch index c2407e1..0af4804 100644 --- a/xen-api-auth.patch +++ b/xen-api-auth.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAuthSessions.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAuthSessions.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAuthSessions.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAuthSessions.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAuthSessions.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAuthSessions.py @@ -84,7 +84,7 @@ class XendAuthSessions: # if PAM doesn't exist, let's ignore it return False diff --git a/xen-changeset.diff b/xen-changeset.diff index 358de73..e33760b 100644 --- a/xen-changeset.diff +++ b/xen-changeset.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/xen/Makefile +Index: xen-4.0.1-testing/xen/Makefile =================================================================== ---- xen-4.0.0-testing.orig/xen/Makefile -+++ xen-4.0.0-testing/xen/Makefile +--- xen-4.0.1-testing.orig/xen/Makefile ++++ xen-4.0.1-testing/xen/Makefile @@ -1,3 +1,4 @@ +export XEN_CHANGESET = unavailable # This is the correct place to edit the build version. diff --git a/xen-config.diff b/xen-config.diff index 9616a4c..c10058b 100644 --- a/xen-config.diff +++ b/xen-config.diff @@ -1,17 +1,8 @@ -Index: xen-4.0.0-testing/Config.mk +Index: xen-4.0.1-testing/Config.mk =================================================================== ---- xen-4.0.0-testing.orig/Config.mk -+++ xen-4.0.0-testing/Config.mk -@@ -151,7 +151,7 @@ QEMU_REMOTE=http://xenbits.xensource.com - # Specify which qemu-dm to use. This may be `ioemu' to use the old - # Mercurial in-tree version, or a local directory, or a git URL. - # CONFIG_QEMU ?= ../qemu-xen.git --CONFIG_QEMU ?= $(QEMU_REMOTE) -+CONFIG_QEMU ?= ioemu-remote - - QEMU_TAG := xen-4.0.0 - #QEMU_TAG ?= f1d909f0f854194f5a40d850886d1413fb8b63c2 -@@ -167,9 +167,9 @@ CONFIG_OCAML_XENSTORED ?= n +--- xen-4.0.1-testing.orig/Config.mk ++++ xen-4.0.1-testing/Config.mk +@@ -182,9 +182,9 @@ CONFIG_OCAML_XENSTORED ?= n # Optional components XENSTAT_XENTOP ?= y VTPM_TOOLS ?= n @@ -23,10 +14,10 @@ Index: xen-4.0.0-testing/Config.mk --include $(XEN_ROOT)/.config +#-include $(XEN_ROOT)/.config -Index: xen-4.0.0-testing/tools/libxc/Makefile +Index: xen-4.0.1-testing/tools/libxc/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/libxc/Makefile -+++ xen-4.0.0-testing/tools/libxc/Makefile +--- xen-4.0.1-testing.orig/tools/libxc/Makefile ++++ xen-4.0.1-testing/tools/libxc/Makefile @@ -169,10 +169,10 @@ zlib-options = $(shell \ fi) | grep $(1)) endif diff --git a/xen-destdir.diff b/xen-destdir.diff index 7f1ea07..97e5c7c 100644 --- a/xen-destdir.diff +++ b/xen-destdir.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/docs/Makefile +Index: xen-4.0.1-testing/docs/Makefile =================================================================== ---- xen-4.0.0-testing.orig/docs/Makefile -+++ xen-4.0.0-testing/docs/Makefile +--- xen-4.0.1-testing.orig/docs/Makefile ++++ xen-4.0.1-testing/docs/Makefile @@ -90,7 +90,8 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(MANDIR) cp -dR man1 $(DESTDIR)$(MANDIR) @@ -22,10 +22,10 @@ Index: xen-4.0.0-testing/docs/Makefile + ln -sf $*.html html.done/$*/index.html + rm -rf html/ + -Index: xen-4.0.0-testing/tools/security/Makefile +Index: xen-4.0.1-testing/tools/security/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/security/Makefile -+++ xen-4.0.0-testing/tools/security/Makefile +--- xen-4.0.1-testing.orig/tools/security/Makefile ++++ xen-4.0.1-testing/tools/security/Makefile @@ -60,8 +60,8 @@ install: all $(ACM_CONFIG_FILE) $(INSTALL_DATA) $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR) $(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR) @@ -37,10 +37,10 @@ Index: xen-4.0.0-testing/tools/security/Makefile else .PHONY: all all: -Index: xen-4.0.0-testing/tools/pygrub/Makefile +Index: xen-4.0.1-testing/tools/pygrub/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/pygrub/Makefile -+++ xen-4.0.0-testing/tools/pygrub/Makefile +--- xen-4.0.1-testing.orig/tools/pygrub/Makefile ++++ xen-4.0.1-testing/tools/pygrub/Makefile @@ -11,7 +11,7 @@ build: .PHONY: install install: all @@ -50,10 +50,10 @@ Index: xen-4.0.0-testing/tools/pygrub/Makefile $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(BINDIR)/pygrub $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot -Index: xen-4.0.0-testing/tools/python/Makefile +Index: xen-4.0.1-testing/tools/python/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/python/Makefile -+++ xen-4.0.0-testing/tools/python/Makefile +--- xen-4.0.1-testing.orig/tools/python/Makefile ++++ xen-4.0.1-testing/tools/python/Makefile @@ -60,7 +60,7 @@ refresh-po: $(POTFILE) .PHONY: install install: install-messages install-dtd @@ -63,10 +63,10 @@ Index: xen-4.0.0-testing/tools/python/Makefile install-dtd: all $(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/xen -Index: xen-4.0.0-testing/tools/xenstore/Makefile +Index: xen-4.0.1-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.0-testing/tools/xenstore/Makefile +--- xen-4.0.1-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.1-testing/tools/xenstore/Makefile @@ -10,6 +10,7 @@ CFLAGS += $(CFLAGS_libxenctrl) CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod @@ -121,10 +121,10 @@ Index: xen-4.0.0-testing/tools/xenstore/Makefile $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR) ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR) -Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile @@ -38,18 +38,6 @@ endif UDEV_RULES_DIR = $(CONFIG_DIR)/udev UDEV_RULES = xen-backend.rules xend.rules diff --git a/xen-disable-libxl.diff b/xen-disable-libxl.diff index 3d7bb6f..b4efeb2 100644 --- a/xen-disable-libxl.diff +++ b/xen-disable-libxl.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/Makefile +Index: xen-4.0.1-testing/tools/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/Makefile -+++ xen-4.0.0-testing/tools/Makefile +--- xen-4.0.1-testing.orig/tools/Makefile ++++ xen-4.0.1-testing/tools/Makefile @@ -33,7 +33,7 @@ SUBDIRS-$(CONFIG_Linux) += fs-back SUBDIRS-$(CONFIG_NetBSD) += fs-back SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir @@ -10,4 +10,4 @@ Index: xen-4.0.0-testing/tools/Makefile +#SUBDIRS-y += libxl SUBDIRS-y += remus SUBDIRS-$(CONFIG_X86) += xenpaging - + SUBDIRS-$(CONFIG_X86) += debugger/gdbsx diff --git a/xen-disable-qemu-monitor.diff b/xen-disable-qemu-monitor.diff index e3cdbc6..9082cc0 100644 --- a/xen-disable-qemu-monitor.diff +++ b/xen-disable-qemu-monitor.diff @@ -5,10 +5,10 @@ the "sendkey" command, among other useful things), remove all console commands that can read/write dom0's state. -Index: xen-4.0.0-testing/tools/ioemu-remote/monitor.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/monitor.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/monitor.c -+++ xen-4.0.0-testing/tools/ioemu-remote/monitor.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/monitor.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/monitor.c @@ -1497,6 +1497,7 @@ static const term_cmd_t term_cmds[] = { "device|all", "commit changes to the disk images (if -snapshot is used) or backing files" }, { "info", "s?", do_info, diff --git a/xen-disable-xenpaging.diff b/xen-disable-xenpaging.diff index 1fae149..2e8615f 100644 --- a/xen-disable-xenpaging.diff +++ b/xen-disable-xenpaging.diff @@ -1,13 +1,13 @@ -Index: xen-4.0.0-testing/tools/Makefile +Index: xen-4.0.1-testing/tools/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/Makefile -+++ xen-4.0.0-testing/tools/Makefile +--- xen-4.0.1-testing.orig/tools/Makefile ++++ xen-4.0.1-testing/tools/Makefile @@ -35,7 +35,7 @@ SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir SUBDIRS-y += xenpmd #SUBDIRS-y += libxl SUBDIRS-y += remus -SUBDIRS-$(CONFIG_X86) += xenpaging +#SUBDIRS-$(CONFIG_X86) += xenpaging + SUBDIRS-$(CONFIG_X86) += debugger/gdbsx # These don't cross-compile - ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) diff --git a/xen-domUloader.diff b/xen-domUloader.diff index bc6b974..ed51a5f 100644 --- a/xen-domUloader.diff +++ b/xen-domUloader.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py +Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/util/blkif.py -+++ xen-4.0.0-testing/tools/python/xen/util/blkif.py +--- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py ++++ xen-4.0.1-testing/tools/python/xen/util/blkif.py @@ -71,8 +71,8 @@ def blkdev_segment(name): 'type' : 'Disk' } return val @@ -35,10 +35,10 @@ Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py def mount_mode(name): mode = None -Index: xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/DevController.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/DevController.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/DevController.py @@ -592,6 +592,31 @@ class DevController: return (Missing, None) @@ -71,10 +71,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/server/DevController.py def backendPath(self, backdom, devid): """Construct backend path given the backend domain and device id. -Index: xen-4.0.0-testing/tools/python/xen/xend/XendBootloader.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendBootloader.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendBootloader.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendBootloader.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendBootloader.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendBootloader.py @@ -12,7 +12,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # @@ -101,21 +101,21 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendBootloader.py + raise VmError(msg) + + avail = False -+ for i in xrange(1, 20): ++ for i in xrange(1, 100): + avail = os.access(disk, os.R_OK) + if avail: + break -+ time.sleep(.05) ++ time.sleep(.1) + + if not avail: + msg = "Disk '%s' isn't accessible" % disk log.error(msg) raise VmError(msg) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -37,7 +37,7 @@ from types import StringTypes import xen.lowlevel.xc diff --git a/xen-extra-fixes.patch b/xen-extra-fixes.patch index cc8613a..0bb6d99 100644 --- a/xen-extra-fixes.patch +++ b/xen-extra-fixes.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/block-vvfat.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block-vvfat.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/block-vvfat.c -+++ xen-4.0.0-testing/tools/ioemu-remote/block-vvfat.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block-vvfat.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block-vvfat.c @@ -865,7 +865,8 @@ static int init_directories(BDRVVVFATSta { direntry_t* entry=array_get_next(&(s->directory)); diff --git a/xen-fixme-doc.diff b/xen-fixme-doc.diff index 031ab21..a5fc801 100644 --- a/xen-fixme-doc.diff +++ b/xen-fixme-doc.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +--- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 @@ -335,16 +335,10 @@ at hda1, which is the root filesystem. =item I @@ -19,10 +19,10 @@ Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 =back =head1 SEE ALSO -Index: xen-4.0.0-testing/docs/man/xm.pod.1 +Index: xen-4.0.1-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.0-testing/docs/man/xm.pod.1 +--- xen-4.0.1-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.1-testing/docs/man/xm.pod.1 @@ -297,7 +297,8 @@ scheduling by the Xen hypervisor. =item B diff --git a/xen-hvm-default-bridge.diff b/xen-hvm-default-bridge.diff index 9e9e535..7d1be40 100644 --- a/xen-hvm-default-bridge.diff +++ b/xen-hvm-default-bridge.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/net.h +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/net.h =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/net.h -+++ xen-4.0.0-testing/tools/ioemu-remote/net.h +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/net.h ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/net.h @@ -107,8 +107,8 @@ void net_host_device_add(const char *dev void net_host_device_remove(int vlan_id, const char *device); @@ -13,10 +13,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/net.h #endif #ifdef __sun__ #define SMBD_COMMAND "/usr/sfw/sbin/smbd" -Index: xen-4.0.0-testing/tools/ioemu-remote/net.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/net.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/net.c -+++ xen-4.0.0-testing/tools/ioemu-remote/net.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/net.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/net.c @@ -1759,9 +1759,10 @@ int net_client_init(const char *device, } if (get_param_value(script_arg, sizeof(script_arg), "scriptarg", p) == 0 && @@ -30,10 +30,10 @@ Index: xen-4.0.0-testing/tools/ioemu-remote/net.c } } else #endif -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +Index: xen-4.0.1-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.1-testing/tools/python/xen/xend/image.py @@ -912,11 +912,13 @@ class HVMImageHandler(ImageHandler): mac = devinfo.get('mac') if mac is None: @@ -51,10 +51,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/image.py vifname = devinfo.get('vifname') if vifname: vifname = "tap-" + vifname -Index: xen-4.0.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup-Linux +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/i386-dm/qemu-ifup-Linux -+++ xen-4.0.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup-Linux +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/i386-dm/qemu-ifup-Linux @@ -1,36 +1,22 @@ #!/bin/sh diff --git a/xen-hvm-default-pae.diff b/xen-hvm-default-pae.diff index 804e407..d6220a3 100644 --- a/xen-hvm-default-pae.diff +++ b/xen-hvm-default-pae.diff @@ -1,9 +1,9 @@ PAE must be on for 64-on-64 to work at all. -Index: xen-4.0.0-testing/tools/python/xen/xend/image.py +Index: xen-4.0.1-testing/tools/python/xen/xend/image.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/image.py -+++ xen-4.0.0-testing/tools/python/xen/xend/image.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/image.py ++++ xen-4.0.1-testing/tools/python/xen/xend/image.py @@ -1030,7 +1030,7 @@ class X86_HVM_ImageHandler(HVMImageHandl def configure(self, vmConfig): diff --git a/xen-ioemu-hvm-pv-support.diff b/xen-ioemu-hvm-pv-support.diff index a066ac7..419cd16 100644 --- a/xen-ioemu-hvm-pv-support.diff +++ b/xen-ioemu-hvm-pv-support.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c =================================================================== ---- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c -+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_platform.c +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_platform.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_platform.c @@ -30,6 +30,8 @@ #include "qemu-xen.h" #include "net.h" diff --git a/xen-max-free-mem.diff b/xen-max-free-mem.diff index 7848538..849f54f 100644 --- a/xen-max-free-mem.diff +++ b/xen-max-free-mem.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py @@ -916,15 +916,39 @@ class XendNode: info['cpu_mhz'] = info['cpu_khz'] / 1000 @@ -57,10 +57,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendNode.py 'node_to_cpu', 'node_to_memory', 'node_to_dma32_mem', -Index: xen-4.0.0-testing/tools/python/xen/xend/balloon.py +Index: xen-4.0.1-testing/tools/python/xen/xend/balloon.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/balloon.py -+++ xen-4.0.0-testing/tools/python/xen/xend/balloon.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/balloon.py ++++ xen-4.0.1-testing/tools/python/xen/xend/balloon.py @@ -43,6 +43,8 @@ SLEEP_TIME_GROWTH = 0.1 # label actually shown in the PROC_XEN_BALLOON file. #labels = { 'current' : 'Current allocation', @@ -94,10 +94,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/balloon.py def free(need_mem, dominfo): """Balloon out memory from the privileged domain so that there is the specified required amount (in KiB) free. -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -1473,6 +1473,27 @@ class XendDomainInfo: pci_conf = self.info['devices'][dev_uuid][1] return map(pci_dict_to_bdf_str, pci_conf['devs']) @@ -126,10 +126,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py def setMemoryTarget(self, target): """Set the memory target of this domain. @param target: In MiB. -Index: xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/server/SrvDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py @@ -173,7 +173,7 @@ class SrvDomain(SrvDir): diff --git a/xen-no-dummy-nfs-ip.diff b/xen-no-dummy-nfs-ip.diff index c833618..23e925f 100644 --- a/xen-no-dummy-nfs-ip.diff +++ b/xen-no-dummy-nfs-ip.diff @@ -1,8 +1,8 @@ -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py -@@ -1321,9 +1321,8 @@ def preprocess_access_control(vals): +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py +@@ -1331,9 +1331,8 @@ def preprocess_access_control(vals): def preprocess_ip(vals): if vals.ip or vals.dhcp != 'off': diff --git a/xen-paths.diff b/xen-paths.diff index 6fa0817..2950c28 100644 --- a/xen-paths.diff +++ b/xen-paths.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py @@ -73,7 +73,7 @@ gopts.opt('quiet', short='q', use="Quiet.") @@ -11,10 +11,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py use="Search path for configuration scripts. " "The value of PATH is a colon-separated directory list.") -Index: xen-4.0.0-testing/docs/man/xm.pod.1 +Index: xen-4.0.1-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.0-testing/docs/man/xm.pod.1 +--- xen-4.0.1-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.1-testing/docs/man/xm.pod.1 @@ -77,7 +77,7 @@ in the config file. See L format, and possible options used in either the configfile or for I. @@ -33,10 +33,10 @@ Index: xen-4.0.0-testing/docs/man/xm.pod.1 soon as it is run. =item I -Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +--- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 @@ -4,9 +4,9 @@ xmdomain.cfg - xm domain config file for =head1 SYNOPSIS diff --git a/xen-qemu-iscsi-fix.patch b/xen-qemu-iscsi-fix.patch index d8e41ff..6c713ad 100644 --- a/xen-qemu-iscsi-fix.patch +++ b/xen-qemu-iscsi-fix.patch @@ -1,5 +1,7 @@ ---- a/tools/ioemu-remote/xenstore.c -+++ b/tools/ioemu-remote/xenstore.c +Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c +=================================================================== +--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c ++++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c @@ -399,7 +399,7 @@ void xenstore_parse_domain_config(int hv char *buf = NULL; char *fpath = NULL, *bpath = NULL, *btype = NULL, @@ -9,7 +11,7 @@ unsigned int len, num, hd_index, pci_devid = 0; BlockDriverState *bs; BlockDriver *format; -@@ -486,12 +486,7 @@ void xenstore_parse_domain_config(int hv +@@ -491,12 +491,7 @@ void xenstore_parse_domain_config(int hv continue; free(danger_type); danger_type = xs_read(xsh, XBT_NULL, danger_buf, &len); @@ -23,7 +25,7 @@ /* read the name of the device */ if (pasprintf(&buf, "%s/type", bpath) == -1) continue; -@@ -499,6 +494,35 @@ void xenstore_parse_domain_config(int hv +@@ -504,6 +499,35 @@ void xenstore_parse_domain_config(int hv drv = xs_read(xsh, XBT_NULL, buf, &len); if (drv == NULL) continue; diff --git a/xen-rpmoptflags.diff b/xen-rpmoptflags.diff index 1079766..e55b663 100644 --- a/xen-rpmoptflags.diff +++ b/xen-rpmoptflags.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile +Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap/drivers/Makefile -+++ xen-4.0.0-testing/tools/blktap/drivers/Makefile +--- xen-4.0.1-testing.orig/tools/blktap/drivers/Makefile ++++ xen-4.0.1-testing/tools/blktap/drivers/Makefile @@ -6,7 +6,6 @@ QCOW_UTIL = img2qcow qcow2raw qcow-cr LIBAIO_DIR = ../../libaio/src MEMSHR_DIR = ../../memshr @@ -10,10 +10,10 @@ Index: xen-4.0.0-testing/tools/blktap/drivers/Makefile CFLAGS += -Wno-unused CFLAGS += -I../lib CFLAGS += $(CFLAGS_libxenctrl) -Index: xen-4.0.0-testing/Config.mk +Index: xen-4.0.1-testing/Config.mk =================================================================== ---- xen-4.0.0-testing.orig/Config.mk -+++ xen-4.0.0-testing/Config.mk +--- xen-4.0.1-testing.orig/Config.mk ++++ xen-4.0.1-testing/Config.mk @@ -14,7 +14,7 @@ SHELL ?= /bin/sh # Tools to run on system hosting the build diff --git a/xen-warnings.diff b/xen-warnings.diff index 611e926..efc476a 100644 --- a/xen-warnings.diff +++ b/xen-warnings.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/misc/miniterm/miniterm.c +Index: xen-4.0.1-testing/tools/misc/miniterm/miniterm.c =================================================================== ---- xen-4.0.0-testing.orig/tools/misc/miniterm/miniterm.c -+++ xen-4.0.0-testing/tools/misc/miniterm/miniterm.c +--- xen-4.0.1-testing.orig/tools/misc/miniterm/miniterm.c ++++ xen-4.0.1-testing/tools/misc/miniterm/miniterm.c @@ -157,7 +157,7 @@ int main(int argc, char **argv) case 0: close(1); /* stdout not needed */ @@ -35,10 +35,10 @@ Index: xen-4.0.0-testing/tools/misc/miniterm/miniterm.c break; } -Index: xen-4.0.0-testing/tools/libxc/xc_dom_elfloader.c +Index: xen-4.0.1-testing/tools/libxc/xc_dom_elfloader.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxc/xc_dom_elfloader.c -+++ xen-4.0.0-testing/tools/libxc/xc_dom_elfloader.c +--- xen-4.0.1-testing.orig/tools/libxc/xc_dom_elfloader.c ++++ xen-4.0.1-testing/tools/libxc/xc_dom_elfloader.c @@ -193,8 +193,9 @@ static int xc_dom_load_elf_symtab(struct if ( load ) @@ -50,10 +50,10 @@ Index: xen-4.0.0-testing/tools/libxc/xc_dom_elfloader.c elf_section_start(elf, shdr2), size); } -Index: xen-4.0.0-testing/tools/xenstore/Makefile +Index: xen-4.0.1-testing/tools/xenstore/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/Makefile -+++ xen-4.0.0-testing/tools/xenstore/Makefile +--- xen-4.0.1-testing.orig/tools/xenstore/Makefile ++++ xen-4.0.1-testing/tools/xenstore/Makefile @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 3.0 MINOR = 0 @@ -63,10 +63,10 @@ Index: xen-4.0.0-testing/tools/xenstore/Makefile CFLAGS += -I. CFLAGS += $(CFLAGS_libxenctrl) -Index: xen-4.0.0-testing/tools/xenstore/xenstored_core.c +Index: xen-4.0.1-testing/tools/xenstore/xenstored_core.c =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/xenstored_core.c -+++ xen-4.0.0-testing/tools/xenstore/xenstored_core.c +--- xen-4.0.1-testing.orig/tools/xenstore/xenstored_core.c ++++ xen-4.0.1-testing/tools/xenstore/xenstored_core.c @@ -77,8 +77,8 @@ static void check_store(void); int quota_nb_entry_per_domain = 1000; @@ -91,10 +91,10 @@ Index: xen-4.0.0-testing/tools/xenstore/xenstored_core.c break; case 'T': tracefile = optarg; -Index: xen-4.0.0-testing/tools/xenstore/xenstored_domain.c +Index: xen-4.0.1-testing/tools/xenstore/xenstored_domain.c =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/xenstored_domain.c -+++ xen-4.0.0-testing/tools/xenstore/xenstored_domain.c +--- xen-4.0.1-testing.orig/tools/xenstore/xenstored_domain.c ++++ xen-4.0.1-testing/tools/xenstore/xenstored_domain.c @@ -212,7 +212,7 @@ void handle_event(void) { evtchn_port_t port; @@ -113,10 +113,10 @@ Index: xen-4.0.0-testing/tools/xenstore/xenstored_domain.c return -1; dom0 = new_domain(NULL, 0, port); -Index: xen-4.0.0-testing/tools/xenstore/xenstored_transaction.c +Index: xen-4.0.1-testing/tools/xenstore/xenstored_transaction.c =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/xenstored_transaction.c -+++ xen-4.0.0-testing/tools/xenstore/xenstored_transaction.c +--- xen-4.0.1-testing.orig/tools/xenstore/xenstored_transaction.c ++++ xen-4.0.1-testing/tools/xenstore/xenstored_transaction.c @@ -82,7 +82,7 @@ struct transaction struct list_head changed_domains; }; @@ -126,10 +126,10 @@ Index: xen-4.0.0-testing/tools/xenstore/xenstored_transaction.c static unsigned int generation; /* Return tdb context to use for this connection. */ -Index: xen-4.0.0-testing/tools/xenstore/xenstore_client.c +Index: xen-4.0.1-testing/tools/xenstore/xenstore_client.c =================================================================== ---- xen-4.0.0-testing.orig/tools/xenstore/xenstore_client.c -+++ xen-4.0.0-testing/tools/xenstore/xenstore_client.c +--- xen-4.0.1-testing.orig/tools/xenstore/xenstore_client.c ++++ xen-4.0.1-testing/tools/xenstore/xenstore_client.c @@ -251,7 +251,7 @@ do_chmod(char *path, struct xs_permissio char **xsval = xs_directory(xsh, xth, path, &xsval_n); @@ -139,10 +139,10 @@ Index: xen-4.0.0-testing/tools/xenstore/xenstore_client.c for (i = 0; i < xsval_n; i++) { snprintf(buf, MAX_PATH_LEN, "%s/%s", path, xsval[i]); -Index: xen-4.0.0-testing/tools/libxen/src/xen_common.c +Index: xen-4.0.1-testing/tools/libxen/src/xen_common.c =================================================================== ---- xen-4.0.0-testing.orig/tools/libxen/src/xen_common.c -+++ xen-4.0.0-testing/tools/libxen/src/xen_common.c +--- xen-4.0.1-testing.orig/tools/libxen/src/xen_common.c ++++ xen-4.0.1-testing/tools/libxen/src/xen_common.c @@ -1057,6 +1057,8 @@ static size_t size_of_member(const abstr default: assert(false); @@ -161,10 +161,10 @@ Index: xen-4.0.0-testing/tools/libxen/src/xen_common.c } -Index: xen-4.0.0-testing/tools/blktap2/drivers/block-remus.c +Index: xen-4.0.1-testing/tools/blktap2/drivers/block-remus.c =================================================================== ---- xen-4.0.0-testing.orig/tools/blktap2/drivers/block-remus.c -+++ xen-4.0.0-testing/tools/blktap2/drivers/block-remus.c +--- xen-4.0.1-testing.orig/tools/blktap2/drivers/block-remus.c ++++ xen-4.0.1-testing/tools/blktap2/drivers/block-remus.c @@ -1579,7 +1579,7 @@ static int tdremus_open(td_driver_t *dri td_flag_t flags) { diff --git a/xen-xm-top-needs-root.diff b/xen-xm-top-needs-root.diff index dfae018..b73f714 100644 --- a/xen-xm-top-needs-root.diff +++ b/xen-xm-top-needs-root.diff @@ -1,11 +1,11 @@ From: Charles Coffing Upstream: no -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py -@@ -2052,6 +2052,10 @@ def xm_debug_keys(args): +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py +@@ -2054,6 +2054,10 @@ def xm_debug_keys(args): def xm_top(args): arg_check(args, "top", 0) diff --git a/xen-xmexample-vti.diff b/xen-xmexample-vti.diff index 4d4a1f4..7634752 100644 --- a/xen-xmexample-vti.diff +++ b/xen-xmexample-vti.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/examples/Makefile +Index: xen-4.0.1-testing/tools/examples/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/Makefile -+++ xen-4.0.0-testing/tools/examples/Makefile +--- xen-4.0.1-testing.orig/tools/examples/Makefile ++++ xen-4.0.1-testing/tools/examples/Makefile @@ -18,7 +18,6 @@ XEN_CONFIGS += xmexample.hvm XEN_CONFIGS += xmexample.hvm-stubdom XEN_CONFIGS += xmexample.pv-grub diff --git a/xen-xmexample.diff b/xen-xmexample.diff index 60e6fcb..496ad66 100644 --- a/xen-xmexample.diff +++ b/xen-xmexample.diff @@ -1,9 +1,9 @@ Change various example paths in the config files to match SUSE. -Index: xen-4.0.0-testing/tools/examples/xmexample1 +Index: xen-4.0.1-testing/tools/examples/xmexample1 =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xmexample1 -+++ xen-4.0.0-testing/tools/examples/xmexample1 +--- xen-4.0.1-testing.orig/tools/examples/xmexample1 ++++ xen-4.0.1-testing/tools/examples/xmexample1 @@ -7,11 +7,13 @@ #============================================================================ @@ -43,10 +43,10 @@ Index: xen-4.0.0-testing/tools/examples/xmexample1 #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.0-testing/tools/examples/xmexample2 +Index: xen-4.0.1-testing/tools/examples/xmexample2 =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xmexample2 -+++ xen-4.0.0-testing/tools/examples/xmexample2 +--- xen-4.0.1-testing.orig/tools/examples/xmexample2 ++++ xen-4.0.1-testing/tools/examples/xmexample2 @@ -35,11 +35,13 @@ xm_vars.var('vmid', xm_vars.check() @@ -86,33 +86,32 @@ Index: xen-4.0.0-testing/tools/examples/xmexample2 #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.0-testing/tools/examples/xmexample3 +Index: xen-4.0.1-testing/tools/examples/xmexample3 =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xmexample3 -+++ xen-4.0.0-testing/tools/examples/xmexample3 +--- xen-4.0.1-testing.orig/tools/examples/xmexample3 ++++ xen-4.0.1-testing/tools/examples/xmexample3 @@ -35,11 +35,13 @@ xm_vars.var('vmid', xm_vars.check() #---------------------------------------------------------------------------- -# Kernel image file. -kernel = "/path/to/domU/kernel" -- --# Optional ramdisk. --#ramdisk = "/boot/initrd.gz" +# Kernel image file and (optional) ramdisk (initrd). +kernel = "/boot/vmlinuz-xen" +ramdisk = "/boot/initrd-xen" -+ + +-# Optional ramdisk. +-#ramdisk = "/boot/initrd.gz" +# Or use domUloader instead of kernel/ramdisk to get kernel from domU FS +#bootloader = "/usr/lib/xen/boot/domUloader.py" +#bootentry = "hda2:/vmlinuz-xen,/initrd-xen" # The domain build function. Default is 'linux'. #builder='linux' -Index: xen-4.0.0-testing/tools/examples/xmexample.hvm +Index: xen-4.0.1-testing/tools/examples/xmexample.hvm =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xmexample.hvm -+++ xen-4.0.0-testing/tools/examples/xmexample.hvm +--- xen-4.0.1-testing.orig/tools/examples/xmexample.hvm ++++ xen-4.0.1-testing/tools/examples/xmexample.hvm @@ -78,7 +78,7 @@ vif = [ 'type=ioemu, bridge=xenbr0' ] # and MODE is r for read-only, w for read-write. @@ -122,11 +121,11 @@ Index: xen-4.0.0-testing/tools/examples/xmexample.hvm #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 +Index: xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 -@@ -38,13 +38,13 @@ file. +--- xen-4.0.1-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-4.0.1-testing/docs/man/xmdomain.cfg.pod.5 +@@ -38,13 +38,13 @@ file. The kernel image for the domain. The format of the parameter is the fully qualified path to the kernel image file, @@ -161,10 +160,10 @@ Index: xen-4.0.0-testing/docs/man/xmdomain.cfg.pod.5 at hda1, which is the root filesystem. =item I -Index: xen-4.0.0-testing/docs/man/xm.pod.1 +Index: xen-4.0.1-testing/docs/man/xm.pod.1 =================================================================== ---- xen-4.0.0-testing.orig/docs/man/xm.pod.1 -+++ xen-4.0.0-testing/docs/man/xm.pod.1 +--- xen-4.0.1-testing.orig/docs/man/xm.pod.1 ++++ xen-4.0.1-testing/docs/man/xm.pod.1 @@ -163,8 +163,8 @@ soon as it is run. =item I diff --git a/xen.changes b/xen.changes index 4bfe29f..e43d30e 100644 --- a/xen.changes +++ b/xen.changes @@ -1,22 +1,109 @@ ------------------------------------------------------------------- -Tue Jul 27 16:32:57 MDT 2010 - jfehlig@novell.com +Mon Sep 27 09:59:37 MDT 2010 - carnold@novell.com + +- bnc#640773 - Xen kernel crashing right after grub + 21894-intel-unmask-cpuid.patch +- Upstream patch from Jan + 22148-serial-irq-dest.patch + +------------------------------------------------------------------- +Tue Sep 23 16:45:11 CST 2010 - cyliu@novell.com + +- bnc#628719 - improve check_device_status to handle HA cases + check_device_status.patch + +------------------------------------------------------------------- +Tue Sep 23 16:43:11 CST 2010 - cyliu@novell.com + +- bnc#628719 - multi-xvdp + mutli-xvdp.patch + +------------------------------------------------------------------- +Tue Sep 20 14:11:31 CST 2010 - cyliu@novell.com + +- bnc#632956 - fix VNC altgr-insert behavior + +------------------------------------------------------------------- +Mon Sep 13 16:24:31 MDT 2010 - carnold@novell.com + +- bnc#636231 - XEN: Unable to disconnect/remove CDROM drive from VM + xend-devid-or-name.patch + +------------------------------------------------------------------- +Mon Sep 13 10:50:56 MDT 2010 - carnold@novell.com + +- Upstream patches from Jan + 22019-x86-cpuidle-online-check.patch + 22051-x86-forced-EOI.patch + 22067-x86-irq-domain.patch + 22068-vtd-irte-RH-bit.patch + 22071-ept-get-entry-lock.patch + 22084-x86-xsave-off.patch + +------------------------------------------------------------------- +Mon Sep 13 10:47:09 MDT 2010 - carnold@novell.com + +- bnc#638465 - hypervisor panic in memory handling + 22135-heap-lock.patch + +------------------------------------------------------------------- +Thu Sep 9 11:29:45 MDT 2010 - carnold@novell.com + +- Update to Xen 4.0.1. This is a bug fix release. + +------------------------------------------------------------------- +Mon Aug 16 18:35:11 MDT 2010 - carnold@novell.com + +- bnc#626262 - Populate-on-demand memory problem on xen with hvm + guest + 21971-pod-accounting.patch + +------------------------------------------------------------------- +Mon Aug 16 17:03:58 CST 2010 - cyliu@novell.com + +- bnc#584204 - xm usb-list broken + usb-list.patch + +------------------------------------------------------------------- +Thu Aug 12 06:13:44 MDT 2010 - carnold@novell.com + +- bnc#625520 - TP-L3: NMI cannot be triggered for xen kernel + 21926-x86-pv-NMI-inject.patch + +------------------------------------------------------------------- +Mon Aug 9 09:47:09 MDT 2010 - carnold@novell.com + +- bnc#613529 - TP-L3: kdump kernel hangs when crash was initiated + from xen kernel + 21886-kexec-shutdown.patch + +------------------------------------------------------------------- +Mon Aug 2 16:42:41 MDT 2010 - carnold@novell.com + +- Upstream Intel patches to improve X2APIC handling. + 21716-iommu-alloc.patch + 21717-ir-qi.patch + 21718-x2apic-logic.patch + +------------------------------------------------------------------- +Tue Jul 27 16:23:09 MDT 2010 - jfehlig@novell.com - bnc#623833 - Error in Xend-API method VM_set_actions_after_crash 21866-xenapi.patch ------------------------------------------------------------------- -Tue Jul 27 15:39:17 MDT 2010 - jfehlig@novell.com +Tue Jul 27 15:37:51 MDT 2010 - jfehlig@novell.com - bnc#625003 - Fix vm config options coredump-{restart,destroy} Added hunk to xm-create-xflag.patch ------------------------------------------------------------------- -Mon Jul 26 16:49:39 MDT 2010 - jfehlig@novell.com +Mon Jul 26 16:53:02 MDT 2010 - jfehlig@novell.com - bnc#605186 - Squelch harmless error messages in block-iscsi ------------------------------------------------------------------- -Mon Jul 26 16:45:21 MDT 2010 - jfehlig@novell.com +Mon Jul 26 16:22:56 MDT 2010 - jfehlig@novell.com - bnc#623438 - Add ability to control SCSI device path scanning in xend @@ -67,6 +154,8 @@ Tue Jul 6 11:31:33 MDT 2010 - carnold@novell.com 21706-trace-security.patch 21712-amd-osvw.patch 21744-x86-cpufreq-range-check.patch + 21933-vtd-ioapic-write.patch + 21953-msi-enable.patch ------------------------------------------------------------------- Fri Jun 25 15:43:35 CST 2010 - jsong@novell.com diff --git a/xen.spec b/xen.spec index 4fb35ef..3702aa5 100644 --- a/xen.spec +++ b/xen.spec @@ -1,5 +1,5 @@ # -# spec file for package xen (Version 4.0.0_21091_05) +# spec file for package xen (Version 4.0.1_21326_01) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -22,8 +22,8 @@ Name: xen ExclusiveArch: %ix86 x86_64 %define xvers 4.0 %define xvermaj 4 -%define changeset 21091 -%define xen_build_dir xen-4.0.0-testing +%define changeset 21326 +%define xen_build_dir xen-4.0.1-testing %define with_kmp 1 BuildRequires: LibVNCServer-devel SDL-devel acpica automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel texinfo transfig BuildRequires: texlive texlive-latex @@ -38,14 +38,14 @@ BuildRequires: glibc-32bit glibc-devel-32bit %if %{?with_kmp}0 BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11 %endif -Version: 4.0.0_21091_05 -Release: 9 +Version: 4.0.1_21326_01 +Release: 1 License: GPLv2+ Group: System/Kernel AutoReqProv: on PreReq: %insserv_prereq %fillup_prereq Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) -Source0: xen-4.0.0-testing-src.tar.bz2 +Source0: xen-4.0.1-testing-src.tar.bz2 Source2: README.SuSE Source3: boot.xen Source4: boot.local.xenU @@ -75,68 +75,32 @@ Source24: xenapiusers Source25: xen-updown.sh # Upstream patches Patch0: 21089-x86-startup-irq-from-setup-gsi.patch -Patch1: 21109-x86-cpu-hotplug.patch -Patch2: 21128-domain-save-flush.patch -Patch3: 21129-xen-hotplug-cleanup.patch -Patch4: 21150-shadow-race.patch -Patch5: 21151-trace-bounds-check.patch -Patch6: 21160-sysctl-debug-keys.patch -Patch7: 21189-x86-emulate-clflush.patch -Patch8: 21193-blktap-script.patch -Patch9: 21194-ioemu-subtype.patch -Patch10: 21223-xend-preserve-devs.patch -Patch11: 21225-conring-iommu.patch -Patch12: 21234-x86-bad-srat-clear-pxm2node.patch -Patch13: 21235-crashkernel-advanced.patch -Patch14: 21266-vmx-disabled-check.patch -Patch15: 21271-x86-cache-flush-global.patch -Patch16: 21272-x86-dom0-alloc-performance.patch -Patch17: 21273-linux-autconf.patch -Patch18: 21301-svm-lmsl.patch -Patch19: 21304-keyhandler-alternative.patch -Patch20: 21317-xend-blkif-util-tap2.patch -Patch21: passthrough-hotplug-segfault.patch -Patch22: 21331-svm-vintr-during-nmi.patch -Patch23: 21333-xentrace-t_info-size.patch -Patch24: 21340-vtd-dom0-mapping-latency.patch -Patch25: 21346-x86-platform-timer-wrap.patch -Patch26: 21349-x86-memcpy.patch -Patch27: 21360-x86-mce-polling-disabled-init.patch -Patch28: 21372-x86-cross-cpu-wait.patch -Patch29: 21373-dummy-domain-io-caps.patch -Patch30: 21406-x86-microcode-quiet.patch -Patch31: 21408-amd-erratum-383.patch -Patch32: 21421-vts-ats-enabling.patch -Patch33: 21435-vmx-retain-global-controls.patch -Patch34: 21445-x86-tsc-handling-cleanups-v2.patch -Patch35: 21446-iommu-graceful-generic-fail.patch -Patch36: 21453-shadow-avoid-remove-all-after-teardown.patch -Patch37: 21456-compat-hvm-addr-check.patch -Patch38: 21459-block-script.patch -Patch39: 21460-xend-timeoffset.patch -Patch40: 21492-x86-pirq-unbind.patch -Patch41: 21526-x86-nehalem-cpuid-mask.patch -Patch42: 21542-amd-erratum-411.patch -Patch43: 21615-dont-save-xen-heap-pages.patch -Patch44: 21620-x86-signed-domain-irq.patch -Patch45: 21627-cpuidle-wrap.patch -Patch46: 21643-vmx-vpmu-pmc-offset.patch -Patch47: 21653-xend-mac-addr.patch -Patch48: 21678-xend-mac-fix.patch -Patch49: 21682-trace-buffer-range.patch -Patch50: 21683-vtd-kill-timer-conditional.patch -Patch51: 21693-memevent-64bit-only.patch -Patch52: 21695-trace-t_info-readonly.patch -Patch53: 21698-x86-pirq-range-check.patch -Patch54: 21699-p2m-query-for-type-change.patch -Patch55: 21700-32on64-vm86-gpf.patch -Patch56: 21705-trace-printk.patch -Patch57: 21706-trace-security.patch -Patch58: 21712-amd-osvw.patch -Patch59: 21723-get-domu-state.patch -Patch60: 21744-x86-cpufreq-range-check.patch -Patch61: 21847-pscsi.patch -Patch62: 21866-xenapi.patch +Patch1: 21235-crashkernel-advanced.patch +Patch2: 21271-x86-cache-flush-global.patch +Patch3: 21301-svm-lmsl.patch +Patch4: 21304-keyhandler-alternative.patch +Patch5: 21406-x86-microcode-quiet.patch +Patch6: 21421-vts-ats-enabling.patch +Patch7: 21526-x86-nehalem-cpuid-mask.patch +Patch8: 21542-amd-erratum-411.patch +Patch9: 21615-dont-save-xen-heap-pages.patch +Patch10: 21627-cpuidle-wrap.patch +Patch11: 21653-xend-mac-addr.patch +Patch12: 21678-xend-mac-fix.patch +Patch13: 21683-vtd-kill-timer-conditional.patch +Patch14: 21723-get-domu-state.patch +Patch15: 21847-pscsi.patch +Patch16: 21866-xenapi.patch +Patch17: 21894-intel-unmask-cpuid.patch +Patch18: 22019-x86-cpuidle-online-check.patch +Patch19: 22051-x86-forced-EOI.patch +Patch20: 22067-x86-irq-domain.patch +Patch21: 22068-vtd-irte-RH-bit.patch +Patch22: 22071-ept-get-entry-lock.patch +Patch23: 22084-x86-xsave-off.patch +Patch24: 7410-qemu-alt-gr.patch +Patch25: 22135-heap-lock.patch +Patch26: 22148-serial-irq-dest.patch # Our patches Patch300: xen-config.diff Patch301: xend-config.diff @@ -156,8 +120,6 @@ Patch314: xen-max-free-mem.diff Patch315: xen-disable-libxl.diff Patch316: xen-disable-xenpaging.diff Patch317: xen-extra-fixes.patch -Patch320: block-losetup-retry.diff -Patch321: block-flags.diff Patch322: bridge-opensuse.patch Patch323: bridge-vlan.diff Patch324: bridge-bonding.diff @@ -185,7 +147,6 @@ Patch355: tools-gdbserver-build.diff Patch356: ioemu-vnc-resize.patch Patch357: ioemu-debuginfo.patch Patch358: vif-bridge-no-iptables.patch -Patch359: suse-disable-tap2-default.patch # Needs to go upstream Patch360: checkpoint-rename.patch Patch361: xm-save-check-file.patch @@ -200,6 +161,8 @@ Patch369: cpu-pools-docs.patch Patch370: xend-sysconfig.patch Patch371: domu-usb-controller.patch Patch372: popen2-argument-fix.patch +Patch373: usb-list.patch +Patch374: xend-devid-or-name.patch # Patches for snapshot support Patch400: snapshot-ioemu-save.patch Patch401: snapshot-ioemu-restore.patch @@ -217,14 +180,16 @@ Patch421: ioemu-blktap-barriers.patch # Other bug fixes or features Patch423: bdrv_open2_fix_flags.patch Patch424: bdrv_open2_flags_2.patch -Patch425: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch -Patch426: ioemu-bdrv-open-CACHE_WB.patch +Patch425: ioemu-bdrv-open-CACHE_WB.patch +Patch426: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch Patch427: xen-ioemu-hvm-pv-support.diff Patch428: qemu-dm-segfault.patch Patch429: hibernate.patch Patch430: del_usb_xend_entry.patch Patch431: capslock_enable.patch Patch432: enable_more_nic_pxe.patch +Patch433: multi-xvdp.patch +Patch434: check_device_status.patch # Jim's domain lock patch Patch450: xend-domain-lock.patch # Hypervisor and PV driver Patches @@ -609,42 +574,6 @@ Authors: %patch24 -p1 %patch25 -p1 %patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -p1 -%patch36 -p1 -%patch37 -p1 -%patch38 -p1 -%patch39 -p1 -%patch40 -p1 -%patch41 -p1 -%patch42 -p1 -%patch43 -p1 -%patch44 -p1 -%patch45 -p1 -%patch46 -p1 -%patch47 -p1 -%patch48 -p1 -%patch49 -p1 -%patch50 -p1 -%patch51 -p1 -%patch52 -p1 -%patch53 -p1 -%patch54 -p1 -%patch55 -p1 -%patch56 -p1 -%patch57 -p1 -%patch58 -p1 -%patch59 -p1 -%patch60 -p1 -%patch61 -p1 -%patch62 -p1 %patch300 -p1 %patch301 -p1 %patch302 -p1 @@ -663,8 +592,6 @@ Authors: %patch315 -p1 %patch316 -p1 %patch317 -p1 -#%patch320 -p1 -#%patch321 -p1 %patch322 -p1 %patch323 -p1 %patch324 -p1 @@ -692,7 +619,6 @@ Authors: %patch356 -p1 %patch357 -p1 %patch358 -p1 -%patch359 -p1 %patch360 -p1 %patch361 -p1 %patch362 -p1 @@ -706,6 +632,8 @@ Authors: %patch370 -p1 %patch371 -p1 %patch372 -p1 +%patch373 -p1 +%patch374 -p1 %patch400 -p1 %patch401 -p1 %patch402 -p1 @@ -728,6 +656,8 @@ Authors: %patch430 -p1 %patch431 -p1 %patch432 -p1 +%patch433 -p1 +%patch434 -p1 %patch450 -p1 %patch500 -p1 %patch501 -p1 @@ -916,6 +846,7 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/remus rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages/xen/remus # This is necessary because of the build of libconfig for libxl #rm -rf $RPM_BUILD_ROOT/$RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug %files %defattr(-,root,root) @@ -974,6 +905,7 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages/xen/remus /usr/sbin/td-util /usr/sbin/vhd-update /usr/sbin/vhd-util +/usr/sbin/gdbsx %dir %{_libdir}/xen %dir %{_libdir}/xen/bin %ifarch x86_64 diff --git a/xenapi-console-protocol.patch b/xenapi-console-protocol.patch index 8f9fa92..33b9204 100644 --- a/xenapi-console-protocol.patch +++ b/xenapi-console-protocol.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -3924,6 +3924,14 @@ class XendDomainInfo: if not config.has_key('backend'): config['backend'] = "00000000-0000-0000-0000-000000000000" diff --git a/xend-config.diff b/xend-config.diff index 9f9a903..86564e2 100644 --- a/xend-config.diff +++ b/xend-config.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains +Index: xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xendomains -+++ xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xendomains ++++ xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains @@ -1,4 +1,4 @@ -## Path: System/xen +## Path: System/Virtualization @@ -27,10 +27,10 @@ Index: xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains ## Type: integer ## Default: 300 -Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +Index: xen-4.0.1-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.0-testing/tools/examples/xend-config.sxp +--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.1-testing/tools/examples/xend-config.sxp @@ -58,11 +58,12 @@ diff --git a/xend-core-dump-loc.diff b/xend-core-dump-loc.diff index 7f0e9b2..a4cc321 100644 --- a/xend-core-dump-loc.diff +++ b/xend-core-dump-loc.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -2317,7 +2317,7 @@ class XendDomainInfo: # To prohibit directory traversal based_name = os.path.basename(self.info['name_label']) diff --git a/xend-devid-or-name.patch b/xend-devid-or-name.patch new file mode 100644 index 0000000..22496c3 --- /dev/null +++ b/xend-devid-or-name.patch @@ -0,0 +1,27 @@ +# HG changeset patch +# User Jim Fehlig +# Date 1284948067 21600 +# Node ID 4674ad11feef87a6a57b99313966e0e121588e1c +# Parent 5393151a737b023476f4e571effc547e758cf8c8 +xend: Fix device_configure + +The semantics of XendDomainInfo.py:device_configure() changed with xen upstream +c/s 19610. Previously this method would take a devid in actual id *or* name +form, e.g. it would accept '5632' or 'hdc'. This patch restores that behavior. + + Signed-off-by: Jim Fehlig + +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +=================================================================== +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py +@@ -1218,6 +1218,9 @@ class XendDomainInfo: + except ValueError: + pass + devid = dev_control.convertToDeviceNumber(dev) ++ else: ++ # devid could be a name, e.g. hdc ++ devid = dev_control.convertToDeviceNumber(devid) + dev_info = self._getDeviceInfo_vbd(devid) + if dev_info is None: + raise VmError("Device %s not connected" % devid) diff --git a/xend-domain-lock.patch b/xend-domain-lock.patch index 8a11cff..01d5912 100644 --- a/xend-domain-lock.patch +++ b/xend-domain-lock.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/examples/xend-config.sxp +Index: xen-4.0.1-testing/tools/examples/xend-config.sxp =================================================================== ---- xen-4.0.0-testing.orig/tools/examples/xend-config.sxp -+++ xen-4.0.0-testing/tools/examples/xend-config.sxp +--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp ++++ xen-4.0.1-testing/tools/examples/xend-config.sxp @@ -305,6 +305,65 @@ # device assignment could really work properly even after we do this. #(pci-passthrough-strict-check yes) @@ -68,10 +68,10 @@ Index: xen-4.0.0-testing/tools/examples/xend-config.sxp # If we have a very big scsi device configuration, start of xend is slow, # because xend scans all the device paths to build its internal PSCSI device # list. If we need only a few devices for assigning to a guest, we can reduce -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py @@ -32,11 +32,12 @@ import re import copy import os @@ -94,7 +94,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py XendTask.log_progress(0, 30, self._constructDomain) XendTask.log_progress(31, 60, self._initDomain) -@@ -2987,6 +2989,11 @@ class XendDomainInfo: +@@ -2990,6 +2992,11 @@ class XendDomainInfo: self._stateSet(DOM_STATE_HALTED) self.domid = None # Do not push into _stateSet()! @@ -106,7 +106,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py finally: self.refresh_shutdown_lock.release() -@@ -4493,6 +4500,74 @@ class XendDomainInfo: +@@ -4503,6 +4510,74 @@ class XendDomainInfo: def has_device(self, dev_class, dev_uuid): return (dev_uuid in self.info['%s_refs' % dev_class.lower()]) @@ -181,10 +181,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py def __str__(self): return '' % \ (str(self.domid), self.info['name_label'], -Index: xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendOptions.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendOptions.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py @@ -154,6 +154,17 @@ class XendOptions: use loose check automatically if necessary.""" pci_dev_assign_strict_check_default = True @@ -228,10 +228,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendOptions.py def get_vnc_tls(self): return self.get_config_string('vnc-tls', self.xend_vnc_tls) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendCheckpoint.py @@ -131,6 +131,7 @@ def save(fd, dominfo, network, live, dst dominfo.shutdown('suspend') dominfo.waitForSuspend() @@ -248,10 +248,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendCheckpoint.py return dominfo except Exception, exn: dominfo.destroy() -Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile +Index: xen-4.0.1-testing/tools/hotplug/Linux/Makefile =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/Makefile -+++ xen-4.0.0-testing/tools/hotplug/Linux/Makefile +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/Makefile ++++ xen-4.0.1-testing/tools/hotplug/Linux/Makefile @@ -19,6 +19,7 @@ XEN_SCRIPTS += vtpm vtpm-delete XEN_SCRIPTS += xen-hotplug-cleanup XEN_SCRIPTS += external-device-migrate @@ -260,10 +260,10 @@ Index: xen-4.0.0-testing/tools/hotplug/Linux/Makefile XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh -Index: xen-4.0.0-testing/tools/hotplug/Linux/domain-lock +Index: xen-4.0.1-testing/tools/hotplug/Linux/domain-lock =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/hotplug/Linux/domain-lock ++++ xen-4.0.1-testing/tools/hotplug/Linux/domain-lock @@ -0,0 +1,83 @@ +#!/bin/bash + @@ -348,10 +348,10 @@ Index: xen-4.0.0-testing/tools/hotplug/Linux/domain-lock + get_status $vm_path + ;; +esac -Index: xen-4.0.0-testing/tools/hotplug/Linux/vm-monitor +Index: xen-4.0.1-testing/tools/hotplug/Linux/vm-monitor =================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/hotplug/Linux/vm-monitor ++++ xen-4.0.1-testing/tools/hotplug/Linux/vm-monitor @@ -0,0 +1,41 @@ +#!/bin/bash + diff --git a/xend-sysconfig.patch b/xend-sysconfig.patch index 3a433c8..972fa6b 100644 --- a/xend-sysconfig.patch +++ b/xend-sysconfig.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xend +Index: xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xend =================================================================== ---- xen-4.0.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xend -+++ xen-4.0.0-testing/tools/hotplug/Linux/init.d/sysconfig.xend +--- xen-4.0.1-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xend ++++ xen-4.0.1-testing/tools/hotplug/Linux/init.d/sysconfig.xend @@ -1,11 +1,27 @@ +## Path: System/Virtualization +## Type: string(none,guest,hv,all) diff --git a/xm-create-xflag.patch b/xm-create-xflag.patch index e637b87..0c9ecf9 100644 --- a/xm-create-xflag.patch +++ b/xm-create-xflag.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xm/create.py +Index: xen-4.0.1-testing/tools/python/xen/xm/create.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py ++++ xen-4.0.1-testing/tools/python/xen/xm/create.py @@ -36,7 +36,7 @@ from xen.xend.server.DevConstants import from xen.util import blkif from xen.util import vscsi_util @@ -11,7 +11,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py from xen.util import utils, auxbin from xen.util.pci import dev_dict_to_sxp, \ parse_pci_name_extended, PciDeviceParseError -@@ -1514,7 +1514,7 @@ def main(argv): +@@ -1522,7 +1522,7 @@ def main(argv): except IOError, exn: raise OptionError("Cannot read file %s: %s" % (config, exn[1])) @@ -20,7 +20,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py from xen.xm.xenapi_create import sxp2xml sxp2xml_inst = sxp2xml() doc = sxp2xml_inst.convert_sxp_to_xml(config, transient=True) -@@ -1522,7 +1522,7 @@ def main(argv): +@@ -1530,7 +1530,7 @@ def main(argv): if opts.vals.dryrun and not opts.is_xml: SXPPrettyPrint.prettyprint(config) @@ -29,10 +29,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/create.py from xml.dom.ext import PrettyPrint as XMLPrettyPrint XMLPrettyPrint(doc) -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPIConstants.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPIConstants.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py @@ -45,8 +45,10 @@ XEN_API_ON_NORMAL_EXIT = [ XEN_API_ON_CRASH_BEHAVIOUR = [ 'destroy', diff --git a/xm-save-check-file.patch b/xm-save-check-file.patch index b118981..f90934a 100644 --- a/xm-save-check-file.patch +++ b/xm-save-check-file.patch @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py @@ -1923,10 +1923,10 @@ class XendAPI(object): bool(live), port, node, ssl, bool(chs)) return xen_api_success_void() @@ -15,10 +15,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py return xen_api_success_void() def VM_restore(self, _, src, paused): -Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py +--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py ++++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py @@ -1496,7 +1496,7 @@ class XendDomain: pass sock.close() @@ -38,10 +38,10 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomain.py if dominfo.getDomid() == DOM0_ID: raise XendError("Cannot save privileged domain %s" % str(domid)) if dominfo._stateGet() != DOM_STATE_RUNNING: -Index: xen-4.0.0-testing/tools/python/xen/xm/main.py +Index: xen-4.0.1-testing/tools/python/xen/xm/main.py =================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py ++++ xen-4.0.1-testing/tools/python/xen/xm/main.py @@ -120,7 +120,7 @@ SUBCOMMAND_HELP = { 'reset' : ('', 'Reset a domain.'), 'restore' : (' [-p]', diff --git a/xm-test-cleanup.diff b/xm-test-cleanup.diff index f6d1edc..6aae672 100644 --- a/xm-test-cleanup.diff +++ b/xm-test-cleanup.diff @@ -1,7 +1,7 @@ -Index: xen-4.0.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py +Index: xen-4.0.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py =================================================================== ---- xen-4.0.0-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py -+++ xen-4.0.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py +--- xen-4.0.1-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py ++++ xen-4.0.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py @@ -35,3 +35,9 @@ if s != 0: # Make sure it's gone if isDomainRunning(domain.getName()):