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/21225-conring-iommu.patch b/21225-conring-iommu.patch index 619be29..136cf19 100644 --- a/21225-conring-iommu.patch +++ b/21225-conring-iommu.patch @@ -1,5 +1,3 @@ -References: bnc#600794 - # HG changeset patch # User Keir Fraser # Date 1271954636 -3600 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 deleted file mode 100644 index 68a9c42..0000000 --- a/21235-crashkernel-advanced.patch +++ /dev/null @@ -1,175 +0,0 @@ -References: bnc#585371 - -# HG changeset patch -# User Keir Fraser -# Date 1272280332 -3600 -# Node ID 3ce824963dc41827bdf1617b37a40e5e5e9dce29 -# Parent d01ea51fc929c57c7d5f427e1aafa0de7a436473 -Support Linux's advanced crashkernel= syntax - -Quoting the original Linux patch's description: - -"This patch adds a extended crashkernel syntax that makes the value of - reserved system RAM dependent on the system RAM itself: - - crashkernel=:[,:,...][@offset] - range=start-[end] - - For example: - - crashkernel=512M-2G:64M,2G-:128M - - The motivation comes from distributors that configure their - crashkernel command line automatically with some configuration tool - (YaST, you know ;)). Of course that tool knows the value of System - RAM, but if the user removes RAM, then the system becomes unbootable - or at least unusable and error handling is very difficult." - -For x86, other than Linux we pass the actual amount of RAM rather than -the highest page's address (to cope with sparse physical address -maps). - -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 - memcpy(&boot_e820, &e820, sizeof(e820)); - - /* Early kexec reservation (explicit static start address). */ -+ nr_pages = 0; -+ for ( i = 0; i < e820.nr_map; i++ ) -+ if ( e820.map[i].type == E820_RAM ) -+ nr_pages += e820.map[i].size >> PAGE_SHIFT; -+ set_kexec_crash_area_size((u64)nr_pages << PAGE_SHIFT); - 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 - static size_t vmcoreinfo_size = 0; - - xen_kexec_reserve_t kexec_crash_area; -+static struct { -+ u64 start, end; -+ unsigned long size; -+} ranges[16] __initdata; - -+/* -+ * Parse command lines in the format -+ * -+ * crashkernel=:[,...][@] -+ * -+ * with being of form -+ * -+ * -[] -+ * -+ * as well as the legacy ones in the format -+ * -+ * crashkernel=[@] -+ */ - static void __init parse_crashkernel(const char *str) - { -- kexec_crash_area.size = parse_size_and_unit(str, &str); -- if ( *str == '@' ) -- kexec_crash_area.start = parse_size_and_unit(str+1, NULL); -+ const char *cur; -+ -+ if ( strchr(str, ':' ) ) -+ { -+ unsigned int idx = 0; -+ -+ do { -+ if ( idx >= ARRAY_SIZE(ranges) ) -+ { -+ printk(XENLOG_WARNING "crashkernel: too many ranges\n"); -+ cur = NULL; -+ str = strchr(str, '@'); -+ break; -+ } -+ -+ ranges[idx].start = parse_size_and_unit(cur = str + !!idx, &str); -+ if ( cur == str ) -+ break; -+ -+ if ( *str != '-' ) -+ { -+ printk(XENLOG_WARNING "crashkernel: '-' expected\n"); -+ break; -+ } -+ -+ if ( *++str != ':' ) -+ { -+ ranges[idx].end = parse_size_and_unit(cur = str, &str); -+ if ( cur == str ) -+ break; -+ if ( ranges[idx].end <= ranges[idx].start ) -+ { -+ printk(XENLOG_WARNING "crashkernel: end <= start\n"); -+ break; -+ } -+ } -+ else -+ ranges[idx].end = -1; -+ -+ if ( *str != ':' ) -+ { -+ printk(XENLOG_WARNING "crashkernel: ':' expected\n"); -+ break; -+ } -+ -+ ranges[idx].size = parse_size_and_unit(cur = str + 1, &str); -+ if ( cur == str ) -+ break; -+ -+ ++idx; -+ } while ( *str == ',' ); -+ if ( idx < ARRAY_SIZE(ranges) ) -+ ranges[idx].size = 0; -+ } -+ else -+ kexec_crash_area.size = parse_size_and_unit(cur = str, &str); -+ if ( cur != str && *str == '@' ) -+ kexec_crash_area.start = parse_size_and_unit(cur = str + 1, &str); -+ if ( cur == str ) -+ printk(XENLOG_WARNING "crashkernel: memory value expected\n"); - } - custom_param("crashkernel", parse_crashkernel); - -+void __init set_kexec_crash_area_size(u64 system_ram) -+{ -+ unsigned int idx; -+ -+ for ( idx = 0; idx < ARRAY_SIZE(ranges) && !kexec_crash_area.size; ++idx ) -+ { -+ if ( !ranges[idx].size ) -+ break; -+ -+ if ( ranges[idx].size >= system_ram ) -+ { -+ printk(XENLOG_WARNING "crashkernel: invalid size\n"); -+ continue; -+ } -+ -+ if ( ranges[idx].start <= system_ram && ranges[idx].end > system_ram ) -+ kexec_crash_area.size = ranges[idx].size; -+ } -+} -+ - 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 -@@ -12,6 +12,8 @@ typedef struct xen_kexec_reserve { - - extern xen_kexec_reserve_t kexec_crash_area; - -+void set_kexec_crash_area_size(u64 system_ram); -+ - /* We have space for 4 images to support atomic update - * of images. This is important for CRASH images since - * a panic can happen at any time... 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 deleted file mode 100644 index 4bd8bec..0000000 --- a/21271-x86-cache-flush-global.patch +++ /dev/null @@ -1,65 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1272973271 -3600 -# Node ID 6c7b905b03ff1cf171187bafe7129e3e213e5787 -# Parent bd52f2e040e5a5ca58e956b3d0780a86934a429e -x86: add support for domain-initiated global cache flush - -Newer Linux' AGP code wants to flush caches on all CPUs under certain -circumstances. Since doing this on all vCPU-s of the domain in -question doesn't yield the intended effect, this needs to be done in -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( - } - break; - -+ case MMUEXT_FLUSH_CACHE_GLOBAL: -+ if ( unlikely(foreigndom != DOMID_SELF) ) -+ okay = 0; -+ else if ( likely(cache_flush_permitted(d)) ) -+ { -+ unsigned int cpu; -+ cpumask_t mask = CPU_MASK_NONE; -+ -+ for_each_online_cpu(cpu) -+ if ( !cpus_intersects(mask, -+ per_cpu(cpu_sibling_map, cpu)) ) -+ cpu_set(cpu, mask); -+ flush_mask(&mask, FLUSH_CACHE); -+ } -+ else -+ { -+ MEM_LOG("Non-physdev domain tried to FLUSH_CACHE_GLOBAL"); -+ okay = 0; -+ } -+ break; -+ - case MMUEXT_SET_LDT: - { - unsigned long ptr = op.arg1.linear_addr; ---- 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 - * No additional arguments. Writes back and flushes cache contents. -+ * -+ * cmd: MMUEXT_FLUSH_CACHE_GLOBAL -+ * No additional arguments. Writes back and flushes cache contents -+ * on all CPUs in the system. - * - * cmd: MMUEXT_SET_LDT - * linear_addr: Linear address of LDT base (NB. must be page-aligned). -@@ -268,6 +272,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); - #define MMUEXT_NEW_USER_BASEPTR 15 - #define MMUEXT_CLEAR_PAGE 16 - #define MMUEXT_COPY_PAGE 17 -+#define MMUEXT_FLUSH_CACHE_GLOBAL 18 - - #ifndef __ASSEMBLY__ - struct mmuext_op { 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/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/block-npiv b/block-npiv index 5aba965..9f69bac 100644 --- a/block-npiv +++ b/block-npiv @@ -39,8 +39,6 @@ case "$command" in VPORTWWNN=`echo $VPORTWWNN | tr A-Z a-z` FABRICNM=`echo $FABRICNM | tr A-Z a-z` - claim_lock "npiv" - find_vhost $VPORTWWPN if test -z "$vhost" ; then create_vport $FABRICNM $VPORTWWPN $VPORTWWNN @@ -55,9 +53,6 @@ case "$command" in sleep 2 find_sdev $vhost $TGTWWPN $LUN fi - - release_lock "npiv" - if test ! -z "$dev"; then xenstore-write $XENBUS_PATH/node /dev/$dev write_dev /dev/$dev diff --git a/cpu-pools-libxc.patch b/cpu-pools-libxc.patch index 65cd57d..b641146 100644 --- a/cpu-pools-libxc.patch +++ b/cpu-pools-libxc.patch @@ -10,7 +10,7 @@ CTRL_SRCS-y += xc_misc.c --- /dev/null +++ b/tools/libxc/xc_cpupool.c -@@ -0,0 +1,165 @@ +@@ -0,0 +1,154 @@ +/****************************************************************************** + * xc_cpupool.c + * @@ -22,45 +22,34 @@ +#include +#include "xc_private.h" + -+static int do_sysctl_save(int xc_handle, struct xen_sysctl *sysctl) -+{ -+ int ret; -+ -+ do { -+ ret = do_sysctl(xc_handle, sysctl); -+ } while ( (ret < 0) && (errno == EAGAIN) ); -+ -+ return ret; -+} -+ +int xc_cpupool_create(int xc_handle, + uint32_t *ppoolid, + uint32_t sched_id) +{ + int err; -+ DECLARE_SYSCTL; ++ DECLARE_DOMCTL; + -+ sysctl.cmd = XEN_SYSCTL_cpupool_op; -+ sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_CREATE; -+ sysctl.u.cpupool_op.cpupool_id = (*ppoolid == 0) ? -+ XEN_SYSCTL_CPUPOOL_PAR_ANY : *ppoolid; -+ sysctl.u.cpupool_op.sched_id = sched_id; -+ if ( (err = do_sysctl_save(xc_handle, &sysctl)) != 0 ) ++ domctl.cmd = XEN_DOMCTL_cpupool_op; ++ domctl.u.cpupool_op.op = XEN_DOMCTL_CPUPOOL_OP_CREATE; ++ domctl.u.cpupool_op.cpupool_id = (*ppoolid == 0) ? ++ XEN_DOMCTL_CPUPOOL_PAR_ANY : *ppoolid; ++ domctl.u.cpupool_op.sched_id = sched_id; ++ if ( (err = do_domctl_save(xc_handle, &domctl)) != 0 ) + return err; + -+ *ppoolid = sysctl.u.cpupool_op.cpupool_id; ++ *ppoolid = domctl.u.cpupool_op.cpupool_id; + return 0; +} + +int xc_cpupool_destroy(int xc_handle, + uint32_t poolid) +{ -+ DECLARE_SYSCTL; ++ DECLARE_DOMCTL; + -+ sysctl.cmd = XEN_SYSCTL_cpupool_op; -+ sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_DESTROY; -+ sysctl.u.cpupool_op.cpupool_id = poolid; -+ return do_sysctl_save(xc_handle, &sysctl); ++ domctl.cmd = XEN_DOMCTL_cpupool_op; ++ domctl.u.cpupool_op.op = XEN_DOMCTL_CPUPOOL_OP_DESTROY; ++ domctl.u.cpupool_op.cpupool_id = poolid; ++ return do_domctl_save(xc_handle, &domctl); +} + +int xc_cpupool_getinfo(int xc_handle, @@ -72,34 +61,34 @@ + int p; + uint32_t poolid = first_poolid; + uint8_t local[sizeof (info->cpumap)]; -+ DECLARE_SYSCTL; ++ DECLARE_DOMCTL; + + memset(info, 0, n_max * sizeof(xc_cpupoolinfo_t)); + + for (p = 0; p < n_max; p++) + { -+ sysctl.cmd = XEN_SYSCTL_cpupool_op; -+ sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_INFO; -+ sysctl.u.cpupool_op.cpupool_id = poolid; -+ set_xen_guest_handle(sysctl.u.cpupool_op.cpumap.bitmap, local); -+ sysctl.u.cpupool_op.cpumap.nr_cpus = sizeof(info->cpumap) * 8; ++ domctl.cmd = XEN_DOMCTL_cpupool_op; ++ domctl.u.cpupool_op.op = XEN_DOMCTL_CPUPOOL_OP_INFO; ++ domctl.u.cpupool_op.cpupool_id = poolid; ++ set_xen_guest_handle(domctl.u.cpupool_op.cpumap.bitmap, local); ++ domctl.u.cpupool_op.cpumap.nr_cpus = sizeof(info->cpumap) * 8; + + if ( (err = lock_pages(local, sizeof(local))) != 0 ) + { + PERROR("Could not lock memory for Xen hypercall"); + break; + } -+ err = do_sysctl_save(xc_handle, &sysctl); ++ err = do_domctl_save(xc_handle, &domctl); + unlock_pages(local, sizeof (local)); + + if ( err < 0 ) + break; + -+ info->cpupool_id = sysctl.u.cpupool_op.cpupool_id; -+ info->sched_id = sysctl.u.cpupool_op.sched_id; -+ info->n_dom = sysctl.u.cpupool_op.n_dom; ++ info->cpupool_id = domctl.u.cpupool_op.cpupool_id; ++ info->sched_id = domctl.u.cpupool_op.sched_id; ++ info->n_dom = domctl.u.cpupool_op.n_dom; + bitmap_byte_to_64(&(info->cpumap), local, sizeof(local) * 8); -+ poolid = sysctl.u.cpupool_op.cpupool_id + 1; ++ poolid = domctl.u.cpupool_op.cpupool_id + 1; + info++; + } + @@ -113,39 +102,39 @@ + uint32_t poolid, + int cpu) +{ -+ DECLARE_SYSCTL; ++ DECLARE_DOMCTL; + -+ sysctl.cmd = XEN_SYSCTL_cpupool_op; -+ sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_ADDCPU; -+ sysctl.u.cpupool_op.cpupool_id = poolid; -+ sysctl.u.cpupool_op.cpu = (cpu < 0) ? XEN_SYSCTL_CPUPOOL_PAR_ANY : cpu; -+ return do_sysctl_save(xc_handle, &sysctl); ++ domctl.cmd = XEN_DOMCTL_cpupool_op; ++ domctl.u.cpupool_op.op = XEN_DOMCTL_CPUPOOL_OP_ADDCPU; ++ domctl.u.cpupool_op.cpupool_id = poolid; ++ domctl.u.cpupool_op.cpu = (cpu < 0) ? XEN_DOMCTL_CPUPOOL_PAR_ANY : cpu; ++ return do_domctl_save(xc_handle, &domctl); +} + +int xc_cpupool_removecpu(int xc_handle, + uint32_t poolid, + int cpu) +{ -+ DECLARE_SYSCTL; ++ DECLARE_DOMCTL; + -+ sysctl.cmd = XEN_SYSCTL_cpupool_op; -+ sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_RMCPU; -+ sysctl.u.cpupool_op.cpupool_id = poolid; -+ sysctl.u.cpupool_op.cpu = (cpu < 0) ? XEN_SYSCTL_CPUPOOL_PAR_ANY : cpu; -+ return do_sysctl_save(xc_handle, &sysctl); ++ domctl.cmd = XEN_DOMCTL_cpupool_op; ++ domctl.u.cpupool_op.op = XEN_DOMCTL_CPUPOOL_OP_RMCPU; ++ domctl.u.cpupool_op.cpupool_id = poolid; ++ domctl.u.cpupool_op.cpu = (cpu < 0) ? XEN_DOMCTL_CPUPOOL_PAR_ANY : cpu; ++ return do_domctl_save(xc_handle, &domctl); +} + +int xc_cpupool_movedomain(int xc_handle, + uint32_t poolid, + uint32_t domid) +{ -+ DECLARE_SYSCTL; ++ DECLARE_DOMCTL; + -+ sysctl.cmd = XEN_SYSCTL_cpupool_op; -+ sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_MOVEDOMAIN; -+ sysctl.u.cpupool_op.cpupool_id = poolid; -+ sysctl.u.cpupool_op.domid = domid; -+ return do_sysctl_save(xc_handle, &sysctl); ++ domctl.cmd = XEN_DOMCTL_cpupool_op; ++ domctl.u.cpupool_op.op = XEN_DOMCTL_CPUPOOL_OP_MOVEDOMAIN; ++ domctl.u.cpupool_op.cpupool_id = poolid; ++ domctl.u.cpupool_op.domid = domid; ++ return do_domctl_save(xc_handle, &domctl); +} + +int xc_cpupool_freeinfo(int xc_handle, @@ -153,12 +142,12 @@ +{ + int err; + uint8_t local[sizeof (*cpumap)]; -+ DECLARE_SYSCTL; ++ DECLARE_DOMCTL; + -+ sysctl.cmd = XEN_SYSCTL_cpupool_op; -+ sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_FREEINFO; -+ set_xen_guest_handle(sysctl.u.cpupool_op.cpumap.bitmap, local); -+ sysctl.u.cpupool_op.cpumap.nr_cpus = sizeof(*cpumap) * 8; ++ domctl.cmd = XEN_DOMCTL_cpupool_op; ++ domctl.u.cpupool_op.op = XEN_DOMCTL_CPUPOOL_OP_FREEINFO; ++ set_xen_guest_handle(domctl.u.cpupool_op.cpumap.bitmap, local); ++ domctl.u.cpupool_op.cpumap.nr_cpus = sizeof(*cpumap) * 8; + + if ( (err = lock_pages(local, sizeof(local))) != 0 ) + { @@ -166,7 +155,7 @@ + return err; + } + -+ err = do_sysctl_save(xc_handle, &sysctl); ++ err = do_domctl_save(xc_handle, &domctl); + unlock_pages(local, sizeof (local)); + + if (err < 0) @@ -186,6 +175,28 @@ memcpy(info->handle, domctl.u.getdomaininfo.handle, sizeof(xen_domain_handle_t)); +--- a/tools/libxc/xc_private.h ++++ b/tools/libxc/xc_private.h +@@ -164,6 +164,19 @@ static inline int do_domctl(int xc_handl + return ret; + } + ++static inline int do_domctl_save(int xc_handle, struct xen_domctl *domctl) ++{ ++ int ret; ++ ++ do ++ { ++ ret = do_domctl(xc_handle, domctl); ++ } ++ while ( (ret < 0 ) && (errno == EAGAIN) ); ++ ++ return ret; ++} ++ + static inline int do_sysctl(int xc_handle, struct xen_sysctl *sysctl) + { + int ret = -1; --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -171,6 +171,7 @@ typedef struct xc_dominfo { diff --git a/cpu-pools-python.patch b/cpu-pools-python.patch index f3ac492..bd55d64 100644 --- a/cpu-pools-python.patch +++ b/cpu-pools-python.patch @@ -1,7 +1,5 @@ -Index: xen-4.0.0-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 +--- a/tools/python/xen/lowlevel/xc/xc.c ++++ b/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 +287,8 @@ 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 -=================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/util/sxputils.py ++++ b/tools/python/xen/util/sxputils.py @@ -0,0 +1,64 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -358,10 +354,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendAPI.py +--- a/tools/python/xen/xend/XendAPI.py ++++ b/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 +547,8 @@ 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 -=================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xend/XendCPUPool.py ++++ b/tools/python/xen/xend/XendCPUPool.py @@ -0,0 +1,903 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -1461,10 +1453,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConfig.py +--- a/tools/python/xen/xend/XendConfig.py ++++ b/tools/python/xen/xend/XendConfig.py @@ -128,6 +128,7 @@ XENAPI_CFG_TO_LEGACY_CFG = { 'PV_bootloader': 'bootloader', 'PV_bootloader_args': 'bootloader_args', @@ -1505,10 +1495,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendConstants.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendConstants.py +--- a/tools/python/xen/xend/XendConstants.py ++++ b/tools/python/xen/xend/XendConstants.py @@ -133,6 +133,8 @@ VTPM_DELETE_SCRIPT = auxbin.scripts_dir( XS_VMROOT = "/vm/" @@ -1518,10 +1506,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py +--- a/tools/python/xen/xend/XendDomainInfo.py ++++ b/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 +1560,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendError.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendError.py +--- a/tools/python/xen/xend/XendError.py ++++ b/tools/python/xen/xend/XendError.py @@ -18,6 +18,7 @@ from xmlrpclib import Fault @@ -1613,10 +1597,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xend/XendNode.py -+++ xen-4.0.0-testing/tools/python/xen/xend/XendNode.py +--- a/tools/python/xen/xend/XendNode.py ++++ b/tools/python/xen/xend/XendNode.py @@ -43,6 +43,7 @@ from XendStateStore import XendStateStor from XendMonitor import XendMonitor from XendPPCI import XendPPCI @@ -1690,10 +1672,8 @@ 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 -=================================================================== ---- 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 +--- a/tools/python/xen/xend/server/SrvServer.py ++++ b/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 +1695,8 @@ 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 -=================================================================== ---- 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 +--- a/tools/python/xen/xend/server/XMLRPCServer.py ++++ b/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 +1728,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.dtd -+++ xen-4.0.0-testing/tools/python/xen/xm/create.dtd +--- a/tools/python/xen/xm/create.dtd ++++ b/tools/python/xen/xm/create.dtd @@ -50,6 +50,7 @@ s3_integrity CDATA #REQUIRED vcpus_max CDATA #REQUIRED @@ -1762,10 +1738,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/create.py -+++ xen-4.0.0-testing/tools/python/xen/xm/create.py +--- a/tools/python/xen/xm/create.py ++++ b/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 +1751,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): +@@ -1147,6 +1151,8 @@ def make_config(vals): config.append(['localtime', vals.localtime]) if vals.oos: config.append(['oos', vals.oos]) @@ -1786,10 +1760,8 @@ 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 -=================================================================== ---- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py -+++ xen-4.0.0-testing/tools/python/xen/xm/main.py +--- a/tools/python/xen/xm/main.py ++++ b/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 @@ -1961,7 +1933,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"]), -@@ -3451,6 +3512,169 @@ def xm_tmem_shared_auth(args): +@@ -3449,6 +3510,169 @@ def xm_tmem_shared_auth(args): else: return server.xend.node.tmem_shared_auth(domid,uuid_str,auth) @@ -2131,7 +2103,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py commands = { "shell": xm_shell, -@@ -3536,6 +3760,14 @@ commands = { +@@ -3534,6 +3758,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 +2118,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xm/main.py # tmem "tmem-thaw": xm_tmem_thaw, "tmem-freeze": xm_tmem_freeze, -@@ -3567,6 +3799,8 @@ IMPORTED_COMMANDS = [ +@@ -3565,6 +3797,8 @@ IMPORTED_COMMANDS = [ 'resetpolicy', 'getenforce', 'setenforce', @@ -2155,10 +2127,8 @@ 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 -=================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool-create.py ++++ b/tools/python/xen/xm/pool-create.py @@ -0,0 +1,51 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2211,10 +2181,8 @@ 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 -=================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool-new.py ++++ b/tools/python/xen/xm/pool-new.py @@ -0,0 +1,50 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2266,10 +2234,8 @@ 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 -=================================================================== --- /dev/null -+++ xen-4.0.0-testing/tools/python/xen/xm/pool.py ++++ b/tools/python/xen/xm/pool.py @@ -0,0 +1,236 @@ +#============================================================================ +# This library is free software; you can redistribute it and/or @@ -2507,10 +2473,8 @@ 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 -=================================================================== ---- 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 +--- a/tools/python/xen/xm/xenapi_create.py ++++ b/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/cpupools-core-fixup.patch b/cpupools-core-fixup.patch index a07a7de..fde77c6 100644 --- a/cpupools-core-fixup.patch +++ b/cpupools-core-fixup.patch @@ -1,5 +1,4 @@ - fix tasklet_schedule_cpu() when invoked from the tasklet's handler - (and rename to tasklet_schedule_on_cpu() to match upstream) - properly balance (un-)pausing in continue_hypercall_on_cpu() code paths - bump domctl interface version (due to the addition of the "cpupool" @@ -19,16 +18,14 @@ } else { -@@ -1591,8 +1592,7 @@ int continue_hypercall_on_cpu(int cpu, v +@@ -1591,7 +1592,6 @@ int continue_hypercall_on_cpu(int cpu, v info->func = func; info->data = data; - vcpu_pause_nosync(v); -- tasklet_schedule_cpu(&info->tasklet, cpu); -+ tasklet_schedule_on_cpu(&info->tasklet, cpu); + tasklet_schedule_cpu(&info->tasklet, cpu); 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 @@ -176,7 +176,6 @@ struct csched_private { @@ -73,15 +70,6 @@ } spin_unlock_irqrestore(&tasklet_lock, flags); -@@ -120,7 +123,7 @@ void tasklet_schedule(struct tasklet *t) - tasklet_schedule_list(t, &tasklet_list, smp_processor_id()); - } - --void tasklet_schedule_cpu(struct tasklet *t, int cpu) -+void tasklet_schedule_on_cpu(struct tasklet *t, int cpu) - { - tasklet_schedule_list(t, &per_cpu(tasklet_list_pcpu, cpu), cpu); - } @@ -156,7 +159,15 @@ static void tasklet_action(void) if ( t->is_scheduled ) { @@ -112,7 +100,7 @@ XEN_GUEST_HANDLE_64(uint8) bitmap; --- a/xen/include/xen/softirq.h +++ b/xen/include/xen/softirq.h -@@ -50,15 +50,17 @@ struct tasklet +@@ -50,12 +50,14 @@ struct tasklet bool_t is_scheduled; bool_t is_running; bool_t is_dead; @@ -127,8 +115,4 @@ + func, data } void tasklet_schedule(struct tasklet *t); --void tasklet_schedule_cpu(struct tasklet *t, int cpu); -+void tasklet_schedule_on_cpu(struct tasklet *t, int cpu); - void tasklet_kill(struct tasklet *t); - void tasklet_init( - struct tasklet *t, void (*func)(unsigned long), unsigned long data); + void tasklet_schedule_cpu(struct tasklet *t, int cpu); diff --git a/cpupools-core.patch b/cpupools-core.patch index 643a90b..5dbe123 100644 --- a/cpupools-core.patch +++ b/cpupools-core.patch @@ -154,7 +154,7 @@ From: Juergen Gross if ( opt_dom0_max_vcpus > MAX_VIRT_CPUS ) opt_dom0_max_vcpus = MAX_VIRT_CPUS; -@@ -287,7 +288,7 @@ int __init construct_dom0( +@@ -277,7 +278,7 @@ int __init construct_dom0( unsigned long _initrd_start, unsigned long initrd_len, char *cmdline) { @@ -163,7 +163,7 @@ From: Juergen Gross struct cpu_user_regs *regs; unsigned long pfn, mfn; unsigned long nr_pages; -@@ -786,8 +787,12 @@ int __init construct_dom0( +@@ -776,8 +777,12 @@ int __init construct_dom0( printk("Dom0 has maximum %u VCPUs\n", opt_dom0_max_vcpus); @@ -314,7 +314,7 @@ From: Juergen Gross if ( idle_domain == NULL ) BUG(); idle_domain->vcpu = idle_vcpu; -@@ -1094,8 +1095,13 @@ void __init __start_xen(unsigned long mb +@@ -1089,8 +1090,13 @@ void __init __start_xen(unsigned long mb if ( !tboot_protect_mem_regions() ) panic("Could not protect TXT memory regions\n"); @@ -857,9 +857,9 @@ From: Juergen Gross +} + +/* -+ * do cpupool related sysctl operations ++ * do cpupool related domctl operations + */ -+int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op) ++int cpupool_do_domctl(struct xen_domctl_cpupool_op *op) +{ + int ret; + struct cpupool *c; @@ -867,12 +867,12 @@ From: Juergen Gross + switch ( op->op ) + { + -+ case XEN_SYSCTL_CPUPOOL_OP_CREATE: ++ case XEN_DOMCTL_CPUPOOL_OP_CREATE: + { + int poolid; + struct scheduler *sched; + -+ poolid = (op->cpupool_id == XEN_SYSCTL_CPUPOOL_PAR_ANY) ? ++ poolid = (op->cpupool_id == XEN_DOMCTL_CPUPOOL_PAR_ANY) ? + CPUPOOLID_NONE: op->cpupool_id; + sched = scheduler_get_by_id(op->sched_id); + ret = -ENOENT; @@ -887,7 +887,7 @@ From: Juergen Gross + } + break; + -+ case XEN_SYSCTL_CPUPOOL_OP_DESTROY: ++ case XEN_DOMCTL_CPUPOOL_OP_DESTROY: + { + spin_lock(&cpupool_lock); + c = cpupool_find_by_id(op->cpupool_id, 1); @@ -899,7 +899,7 @@ From: Juergen Gross + } + break; + -+ case XEN_SYSCTL_CPUPOOL_OP_INFO: ++ case XEN_DOMCTL_CPUPOOL_OP_INFO: + { + spin_lock(&cpupool_lock); + c = cpupool_find_by_id(op->cpupool_id, 0); @@ -915,7 +915,7 @@ From: Juergen Gross + } + break; + -+ case XEN_SYSCTL_CPUPOOL_OP_ADDCPU: ++ case XEN_DOMCTL_CPUPOOL_OP_ADDCPU: + { + unsigned cpu; + @@ -923,7 +923,7 @@ From: Juergen Gross + printk(XENLOG_DEBUG "cpupool_assign_cpu(pool=%d,cpu=%d)\n", + op->cpupool_id, cpu); + spin_lock(&cpupool_lock); -+ if ( cpu == XEN_SYSCTL_CPUPOOL_PAR_ANY ) ++ if ( cpu == XEN_DOMCTL_CPUPOOL_PAR_ANY ) + cpu = first_cpu(cpupool_free_cpus); + ret = -EINVAL; + if ( cpu >= NR_CPUS ) @@ -943,7 +943,7 @@ From: Juergen Gross + } + break; + -+ case XEN_SYSCTL_CPUPOOL_OP_RMCPU: ++ case XEN_DOMCTL_CPUPOOL_OP_RMCPU: + { + unsigned cpu; + @@ -954,7 +954,7 @@ From: Juergen Gross + if ( c == NULL ) + break; + cpu = op->cpu; -+ if ( cpu == XEN_SYSCTL_CPUPOOL_PAR_ANY ) ++ if ( cpu == XEN_DOMCTL_CPUPOOL_PAR_ANY ) + cpu = last_cpu(c->cpu_valid); + ret = -EINVAL; + if ( cpu >= NR_CPUS ) @@ -966,7 +966,7 @@ From: Juergen Gross + } + break; + -+ case XEN_SYSCTL_CPUPOOL_OP_MOVEDOMAIN: ++ case XEN_DOMCTL_CPUPOOL_OP_MOVEDOMAIN: + { + struct domain *d; + @@ -1010,7 +1010,7 @@ From: Juergen Gross + } + break; + -+ case XEN_SYSCTL_CPUPOOL_OP_FREEINFO: ++ case XEN_DOMCTL_CPUPOOL_OP_FREEINFO: + { + cpumask_to_xenctl_cpumap(&(op->cpumap), + &cpupool_free_cpus); @@ -1176,6 +1176,21 @@ From: Juergen Gross if ( alloc_vcpu(d, i, cpu) == NULL ) goto maxvcpu_out; +@@ -961,6 +967,14 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc + } + break; + ++ case XEN_DOMCTL_cpupool_op: ++ { ++ ret = cpupool_do_domctl(&op->u.cpupool_op); ++ if ( (ret == 0) && copy_to_guest(u_domctl, op, 1) ) ++ ret = -EFAULT; ++ } ++ break; ++ + default: + ret = arch_do_domctl(op, u_domctl); + break; --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -70,11 +70,15 @@ @@ -2979,23 +2994,6 @@ From: Juergen Gross open_softirq(TASKLET_SOFTIRQ, tasklet_action); } ---- a/xen/common/sysctl.c -+++ b/xen/common/sysctl.c -@@ -314,6 +314,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc - } - break; - -+ case XEN_SYSCTL_cpupool_op: -+ { -+ ret = cpupool_do_sysctl(&op->u.cpupool_op); -+ if ( (ret == 0) && copy_to_guest(u_sysctl, op, 1) ) -+ ret = -EFAULT; -+ } -+ break; -+ - 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 @@ -3040,31 +3038,23 @@ From: Juergen Gross }; typedef struct xen_domctl_getdomaininfo xen_domctl_getdomaininfo_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t); -@@ -781,7 +782,6 @@ struct xen_domctl_mem_sharing_op { +@@ -781,6 +782,30 @@ struct xen_domctl_mem_sharing_op { typedef struct xen_domctl_mem_sharing_op xen_domctl_mem_sharing_op_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_mem_sharing_op_t); -- - struct xen_domctl { - uint32_t cmd; - #define XEN_DOMCTL_createdomain 1 ---- 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); - -+#define XEN_SYSCTL_cpupool_op 18 -+/* XEN_SYSCTL_cpupool_op */ -+#define XEN_SYSCTL_CPUPOOL_OP_CREATE 1 /* C */ -+#define XEN_SYSCTL_CPUPOOL_OP_DESTROY 2 /* D */ -+#define XEN_SYSCTL_CPUPOOL_OP_INFO 3 /* I */ -+#define XEN_SYSCTL_CPUPOOL_OP_ADDCPU 4 /* A */ -+#define XEN_SYSCTL_CPUPOOL_OP_RMCPU 5 /* R */ -+#define XEN_SYSCTL_CPUPOOL_OP_MOVEDOMAIN 6 /* M */ -+#define XEN_SYSCTL_CPUPOOL_OP_FREEINFO 7 /* F */ -+#define XEN_SYSCTL_CPUPOOL_PAR_ANY 0xFFFFFFFF -+struct xen_sysctl_cpupool_op { ++/* ++ * cpupool operations ++ */ ++/* XEN_DOMCTL_cpupool_op */ ++#define XEN_DOMCTL_CPUPOOL_OP_CREATE 1 /* C */ ++#define XEN_DOMCTL_CPUPOOL_OP_DESTROY 2 /* D */ ++#define XEN_DOMCTL_CPUPOOL_OP_INFO 3 /* I */ ++#define XEN_DOMCTL_CPUPOOL_OP_ADDCPU 4 /* A */ ++#define XEN_DOMCTL_CPUPOOL_OP_RMCPU 5 /* R */ ++#define XEN_DOMCTL_CPUPOOL_OP_MOVEDOMAIN 6 /* M */ ++#define XEN_DOMCTL_CPUPOOL_OP_FREEINFO 7 /* F */ ++#define XEN_DOMCTL_CPUPOOL_PAR_ANY 0xFFFFFFFF ++struct xen_domctl_cpupool_op { + uint32_t op; /* IN */ + uint32_t cpupool_id; /* IN: CDIARM OUT: CI */ + uint32_t sched_id; /* IN: C OUT: I */ @@ -3073,20 +3063,28 @@ From: Juergen Gross + uint32_t n_dom; /* OUT: I */ + struct xenctl_cpumap cpumap; /* OUT: IF */ +}; -+typedef struct xen_sysctl_cpupool_op xen_sysctl_cpupool_op_t; -+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpupool_op_t); ++typedef struct xen_domctl_cpupool_op xen_domctl_cpupool_op_t; ++DEFINE_XEN_GUEST_HANDLE(xen_domctl_cpupool_op_t); + - struct xen_sysctl { + + struct xen_domctl { uint32_t cmd; - uint32_t interface_version; /* XEN_SYSCTL_INTERFACE_VERSION */ -@@ -509,6 +531,7 @@ struct xen_sysctl { - struct xen_sysctl_pm_op pm_op; - struct xen_sysctl_page_offline_op page_offline; - struct xen_sysctl_lockprof_op lockprof_op; -+ struct xen_sysctl_cpupool_op cpupool_op; - uint8_t pad[128]; - } u; - }; +@@ -842,6 +867,7 @@ struct xen_domctl { + #define XEN_DOMCTL_gettscinfo 59 + #define XEN_DOMCTL_settscinfo 60 + #define XEN_DOMCTL_getpageframeinfo3 61 ++#define XEN_DOMCTL_cpupool_op 62 + #define XEN_DOMCTL_gdbsx_guestmemio 1000 + #define XEN_DOMCTL_gdbsx_pausevcpu 1001 + #define XEN_DOMCTL_gdbsx_unpausevcpu 1002 +@@ -890,6 +916,7 @@ struct xen_domctl { + struct xen_domctl_debug_op debug_op; + struct xen_domctl_mem_event_op mem_event_op; + struct xen_domctl_mem_sharing_op mem_sharing_op; ++ struct xen_domctl_cpupool_op cpupool_op; + #if defined(__i386__) || defined(__x86_64__) + struct xen_domctl_cpuid cpuid; + #endif --- a/xen/include/xen/sched-if.h +++ b/xen/include/xen/sched-if.h @@ -10,16 +10,29 @@ @@ -3185,15 +3183,7 @@ From: Juergen Gross #endif /* __XEN_SCHED_IF_H__ */ --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -132,8 +133,6 @@ struct vcpu +@@ -132,8 +132,6 @@ struct vcpu bool_t defer_shutdown; /* VCPU is paused following shutdown request (d->is_shutting_down)? */ bool_t paused_for_shutdown; @@ -3202,7 +3192,7 @@ From: Juergen Gross /* * > 0: a single port is being polled; -@@ -211,6 +210,7 @@ struct domain +@@ -211,6 +209,7 @@ struct domain /* Scheduling. */ void *sched_priv; /* scheduler-specific data */ @@ -3210,7 +3200,7 @@ From: Juergen Gross struct domain *next_in_list; struct domain *next_in_hashbucket; -@@ -383,7 +383,7 @@ static inline struct domain *get_current +@@ -383,7 +382,7 @@ static inline struct domain *get_current } struct domain *domain_create( @@ -3219,7 +3209,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 +@@ -471,6 +470,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); @@ -3227,7 +3217,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 +@@ -578,12 +578,14 @@ void domain_pause_by_systemcontroller(st void domain_unpause_by_systemcontroller(struct domain *d); void cpu_init(void); @@ -3246,7 +3236,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 { +@@ -606,6 +608,18 @@ extern enum cpufreq_controller { FREQCTL_none, FREQCTL_dom0_kernel, FREQCTL_xen } cpufreq_controller; @@ -3259,7 +3249,7 @@ From: Juergen Gross +void cpupool_cpu_add(unsigned int cpu); +int cpupool_add_domain(struct domain *d, int poolid); +void cpupool_rm_domain(struct domain *d); -+int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op); ++int cpupool_do_domctl(struct xen_domctl_cpupool_op *op); +#define num_cpupool_cpus(c) (cpus_weight((c)->cpu_valid)) + #endif /* __SCHED_H__ */ diff --git a/dump-exec-state.patch b/dump-exec-state.patch index bbb9dcb..2e587e7 100644 --- a/dump-exec-state.patch +++ b/dump-exec-state.patch @@ -1,79 +1,54 @@ ---- 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.0-testing/xen/arch/ia64/linux-xen/smp.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/ia64/linux-xen/smp.c ++++ xen-4.0.0-testing/xen/arch/ia64/linux-xen/smp.c +@@ -189,7 +189,7 @@ handle_IPI (int irq, void *dev_id, struc + * At this point the structure may be gone unless + * wait is true. + */ +- (*func)(info); ++ (*func)(info ?: regs); - #define IPI_CALL_FUNC 0 - #define IPI_CPU_STOP 1 -+#define IPI_STATE_DUMP 2 + /* Notify the sending CPU that the task is done. */ + mb(); +Index: xen-4.0.0-testing/xen/arch/x86/smp.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/arch/x86/smp.c ++++ xen-4.0.0-testing/xen/arch/x86/smp.c +@@ -395,7 +395,7 @@ static void __smp_call_function_interrup - /* This needs to be cacheline aligned because it is written to by *other* CPUs. */ - static DEFINE_PER_CPU(u64, ipi_operation) ____cacheline_aligned; -@@ -202,6 +203,10 @@ handle_IPI (int irq, void *dev_id, struc - stop_this_cpu(); - break; + if ( call_data.wait ) + { +- (*func)(info); ++ (*func)(info ?: get_irq_regs()); + mb(); + atomic_inc(&call_data.finished); + } +@@ -403,7 +403,7 @@ static void __smp_call_function_interrup + { + mb(); + atomic_inc(&call_data.started); +- (*func)(info); ++ (*func)(info ?: get_irq_regs()); + } -+ case IPI_STATE_DUMP: -+ dump_execstate(regs); -+ break; -+ - default: - printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n", this_cpu, which); - break; -@@ -479,6 +484,12 @@ smp_send_stop (void) - send_IPI_allbutself(IPI_CPU_STOP); - } - -+void -+smp_send_state_dump (unsigned int cpu) -+{ -+ send_IPI_single(cpu, IPI_STATE_DUMP); -+} -+ - int __init - setup_profiling_timer (unsigned int multiplier) - { ---- 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); - } - -+void smp_send_state_dump(unsigned int cpu) -+{ -+ state_dump_pending(cpu) = 1; -+ smp_send_event_check_cpu(cpu); -+} -+ - fastcall void smp_event_check_interrupt(struct cpu_user_regs *regs) - { - struct cpu_user_regs *old_regs = set_irq_regs(regs); - ack_APIC_irq(); - perfc_incr(ipis); -+ if ( unlikely(state_dump_pending(smp_processor_id())) ) -+ { -+ irq_enter(); -+ state_dump_pending(smp_processor_id()) = 0; -+ dump_execstate(regs); -+ irq_exit(); -+ } - set_irq_regs(old_regs); - } - ---- a/xen/common/keyhandler.c -+++ b/xen/common/keyhandler.c -@@ -71,19 +71,52 @@ static struct keyhandler show_handlers_k + irq_exit(); +Index: xen-4.0.0-testing/xen/common/keyhandler.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/common/keyhandler.c ++++ xen-4.0.0-testing/xen/common/keyhandler.c +@@ -71,20 +71,45 @@ static struct keyhandler show_handlers_k .desc = "show this message" }; -static void __dump_execstate(void *unused) -+#ifdef CONFIG_SMP +static cpumask_t dump_execstate_mask; -+#endif + -+void dump_execstate(struct cpu_user_regs *regs) ++static void __dump_execstate(void *_regs) { - dump_execution_state(); - printk("*** Dumping CPU%d guest state: ***\n", smp_processor_id()); ++ struct cpu_user_regs *regs = _regs; + unsigned int cpu = smp_processor_id(); + + if ( !guest_mode(regs) ) @@ -92,14 +67,12 @@ show_execution_state(guest_cpu_user_regs()); + } + -+#ifdef CONFIG_SMP -+ cpu_clear(cpu, dump_execstate_mask); -+ if ( !alt_key_handling ) -+ return; -+ + cpu = cycle_cpu(cpu, dump_execstate_mask); + if ( cpu < NR_CPUS ) -+ smp_send_state_dump(cpu); ++ { ++ cpu_clear(cpu, dump_execstate_mask); ++ on_selected_cpus(cpumask_of(cpu), __dump_execstate, NULL, 0); ++ } + else + { + printk("\n"); @@ -107,52 +80,44 @@ + console_end_sync(); + watchdog_enable(); + } -+#endif } static void dump_registers(unsigned char key, struct cpu_user_regs *regs) { -+#ifdef CONFIG_SMP - unsigned int cpu; -+#endif - +- unsigned int cpu; +- /* We want to get everything out that we possibly can. */ watchdog_disable(); -@@ -91,17 +124,28 @@ static void dump_registers(unsigned char - + console_start_sync(); +@@ -92,21 +117,9 @@ static void dump_registers(unsigned char printk("'%c' pressed -> dumping registers\n", key); -+#ifdef CONFIG_SMP -+ if ( alt_key_handling ) -+ dump_execstate_mask = cpu_online_map; -+#endif -+ /* Get local execution state out immediately, in case we get stuck. */ - printk("\n*** Dumping CPU%d host state: ***\n", smp_processor_id()); - __dump_execstate(NULL); -+ dump_execstate(regs); -+ -+#ifdef CONFIG_SMP -+ if ( alt_key_handling ) -+ return; - - for_each_online_cpu ( cpu ) - { - if ( cpu == smp_processor_id() ) - continue; +- +- for_each_online_cpu ( cpu ) +- { +- if ( cpu == smp_processor_id() ) +- continue; - printk("\n*** Dumping CPU%d host state: ***\n", cpu); - on_selected_cpus(cpumask_of(cpu), __dump_execstate, NULL, 1); -+ cpu_set(cpu, dump_execstate_mask); -+ smp_send_state_dump(cpu); -+ while ( cpu_isset(cpu, dump_execstate_mask) ) -+ cpu_relax(); - } -+#endif +- } +- +- printk("\n"); +- +- console_end_sync(); +- watchdog_enable(); ++ cpus_andnot(dump_execstate_mask, cpu_online_map, ++ cpumask_of_cpu(smp_processor_id())); ++ __dump_execstate(regs); + } - printk("\n"); - ---- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h -+++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h + static struct keyhandler dump_registers_keyhandler = { +Index: xen-4.0.0-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h +=================================================================== +--- xen-4.0.0-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h ++++ xen-4.0.0-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,43 +127,3 @@ # 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 -@@ -8,6 +8,7 @@ typedef struct { - unsigned long __softirq_pending; - unsigned int __local_irq_count; - unsigned int __nmi_count; -+ bool_t __state_dump_pending; - } __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 -@@ -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) - #define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count) -+#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; - extern char *print_tainted(char *str); - extern void add_taint(unsigned); - -+struct cpu_user_regs; -+void dump_execstate(struct cpu_user_regs *); -+ - #endif /* __LIB_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)) - -+extern void smp_send_state_dump(unsigned int cpu); -+ - /* - * Prepare machine for booting other CPUs. - */ diff --git a/hv_tools.patch b/hv_tools.patch index 030f4d3..95021d3 100644 --- a/hv_tools.patch +++ b/hv_tools.patch @@ -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): +@@ -1081,7 +1085,7 @@ def configure_hvm(config_image, vals): 'timer_mode', 'usb', 'usbdevice', 'vcpus', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten', diff --git a/init.xend b/init.xend index 7936b41..d539705 100644 --- a/init.xend +++ b/init.xend @@ -92,7 +92,6 @@ case "$1" in modprobe xenblk 2>/dev/null || true modprobe netbk 2>/dev/null || true modprobe gntdev 2>/dev/null || true - modprobe usbbk 2>/dev/null || true xend start await_daemons_up ;; diff --git a/21304-keyhandler-alternative.patch b/keyhandler-alternative.patch similarity index 74% rename from 21304-keyhandler-alternative.patch rename to keyhandler-alternative.patch index b4b5aa4..0317e50 100644 --- a/21304-keyhandler-alternative.patch +++ b/keyhandler-alternative.patch @@ -1,18 +1,7 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273143595 -3600 -# Node ID ccae861f52f7f25aa2ab404a6110831402845dac -# Parent 924f54145fda26df64bf6f57010793893b29866f -Reduce '0' debug key's global impact - -On large systems, dumping state may cause time management to get -stalled for so long a period that it wouldn't recover. Therefore add -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.0-testing/xen/common/keyhandler.c +=================================================================== +--- xen-4.0.0-testing.orig/xen/common/keyhandler.c ++++ xen-4.0.0-testing/xen/common/keyhandler.c @@ -19,6 +19,7 @@ static struct keyhandler *key_table[256]; @@ -31,15 +20,15 @@ Signed-off-by: Jan Beulich +{ + struct vcpu *v = (void *)arg; + -+ for ( ; ; ) -+ { ++ for ( ; ; ) { + vcpu_show_execution_state(v); -+ if ( (v = v->next_in_list) == NULL ) ++ v = v->next_in_list; ++ if ( !v ) + break; + if ( softirq_pending(smp_processor_id()) ) + { + dump_dom0_tasklet.data = (unsigned long)v; -+ tasklet_schedule_on_cpu(&dump_dom0_tasklet, v->processor); ++ tasklet_schedule_cpu(&dump_dom0_tasklet, v->processor); + break; + } + } @@ -58,7 +47,7 @@ Signed-off-by: Jan Beulich + tasklet_kill(&dump_dom0_tasklet); + tasklet_init(&dump_dom0_tasklet, dump_dom0_action, + (unsigned long)v); -+ tasklet_schedule_on_cpu(&dump_dom0_tasklet, v->processor); ++ tasklet_schedule_cpu(&dump_dom0_tasklet, v->processor); + return; + } vcpu_show_execution_state(v); 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/snapshot-xend.patch b/snapshot-xend.patch index c86cf13..86c0deb 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) -@@ -3696,6 +3771,10 @@ commands = { +@@ -3694,6 +3769,10 @@ commands = { "restore": xm_restore, "resume": xm_resume, "save": xm_save, diff --git a/suse-disable-tap2-default.patch b/suse-disable-tap2-default.patch deleted file mode 100644 index f539c2a..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 -@@ -2489,8 +2489,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/21301-svm-lmsl.patch b/svm-lmsl.patch similarity index 68% rename from 21301-svm-lmsl.patch rename to svm-lmsl.patch index fc81aa2..d0001b0 100644 --- a/21301-svm-lmsl.patch +++ b/svm-lmsl.patch @@ -1,18 +1,7 @@ -# HG changeset patch -# User Keir Fraser -# Date 1273142634 -3600 -# Node ID 69c85f5b0a07e7a95945d117ea478a80d21c6b9e -# Parent 26da9bb87405c64c02def8d5f11c66f15847bd02 -svm: support EFER.LMSLE for guests - -Now that the feature is officially documented (see -http://support.amd.com/us/Processor_TechDocs/24593.pdf), I think it -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 +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 @@ -629,11 +629,12 @@ static int hvm_load_cpu_ctxt(struct doma return -EINVAL; } @@ -40,19 +29,23 @@ 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.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 +@@ -56,6 +56,11 @@ u32 svm_feature_flags; -+/* Indicates whether guests may use EFER.LMSLE. */ -+bool_t cpu_has_lmsl; ++#ifdef __x86_64__ ++/* indicate whether guest may use EFER.LMSLE */ ++unsigned char cpu_has_lmsl = 0; ++#endif + #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 +@@ -847,6 +852,29 @@ static int svm_cpu_up(struct cpuinfo_x86 /* Initialize core's ASID handling. */ svm_asid_init(c); @@ -82,13 +75,20 @@ 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.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 +@@ -132,6 +132,12 @@ struct hvm_function_table { extern struct hvm_function_table hvm_funcs; extern int hvm_enabled; -+extern bool_t cpu_has_lmsl; ++#ifdef __i386__ ++# define cpu_has_lmsl 0 ++#else ++extern unsigned char cpu_has_lmsl; ++#endif ++ int hvm_domain_initialise(struct domain *d); void hvm_domain_relinquish_resources(struct domain *d); + void hvm_domain_destroy(struct domain *d); diff --git a/x86-memcpy.patch b/x86-memcpy.patch deleted file mode 100644 index 7a34144..0000000 --- a/x86-memcpy.patch +++ /dev/null @@ -1,128 +0,0 @@ -Following a change in Linux 2.6.33, make x86-32 always use -__builtin_mem{cpy,set}() on gcc 4.0+. This particularly works around -certain intermediate gcc revisions generating out-of-range-array-index -warnings with the current inline implementation. - -It may be worthwhile considering to make this the case for x86-64 too. - -At the same time eliminate the redundant inline assembly in the C -file, and instead use the inline functions coming from the header. - -Signed-off-by: Jan Beulich - -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 -@@ -11,44 +11,13 @@ - #undef memcpy - void *memcpy(void *dest, const void *src, size_t n) - { -- 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: " -- : "=&c" (d0), "=&D" (d1), "=&S" (d2) -- : "0" (n/sizeof(long)), "q" (n), "1" (dest), "2" (src) -- : "memory"); -- -- return dest; -+ return __variable_memcpy(dest, src, n); - } - - #undef memset - void *memset(void *s, int c, size_t n) - { -- long d0, d1; -- -- asm volatile ( -- "rep stosb" -- : "=&c" (d0), "=&D" (d1) -- : "a" (c), "1" (s), "0" (n) -- : "memory"); -- -- return s; -+ return __memset_generic(s, c, n); - } - - #undef memmove -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 -@@ -16,6 +16,11 @@ static inline void *__variable_memcpy(vo - return to; - } - -+#define __HAVE_ARCH_MEMCPY -+#if defined(__i386__) && __GNUC__ >= 4 -+#define memcpy(t, f, n) __builtin_memcpy(t, f, n) -+#else -+ - /* - * This looks horribly ugly, but the compiler can optimize it totally, - * as the count is constant. -@@ -95,7 +100,6 @@ static always_inline void * __constant_m - 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) -@@ -121,11 +125,13 @@ void *__memcpy(void *t, const void *f, s - __var_memcpy((t),(f),(n))); - } - -+#endif /* !__i386__ || __GNUC__ < 4 */ -+ - /* Some version 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) -+static inline void *__memset_generic(void *s, int c, size_t count) - { - long d0, d1; - __asm__ __volatile__ ( -@@ -134,6 +140,11 @@ static inline void *__memset_generic(voi - return s; - } - -+#define __HAVE_ARCH_MEMSET -+#if defined(__i386__) && __GNUC__ >= 4 -+#define memset(s, c, n) __builtin_memset(s, c, n) -+#else -+ - /* we might want to write optimized versions of these later */ - #define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count)) - -@@ -238,11 +249,12 @@ static always_inline void *__constant_c_ - #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))) - -+#endif /* !__i386__ || __GNUC__ < 4 */ -+ - #endif /* __X86_STRING_H__ */ diff --git a/xen-domUloader.diff b/xen-domUloader.diff index 1ff8f38..b72419c 100644 --- a/xen-domUloader.diff +++ b/xen-domUloader.diff @@ -15,7 +15,7 @@ Index: xen-4.0.0-testing/tools/python/xen/util/blkif.py @@ -88,15 +88,18 @@ def _parse_uname(uname): - if typ in ("tap", "tap2"): + if typ == "tap": (taptype, fn) = fn.split(":", 1) - return (fn, taptype) + if taptype in ("tapdisk", "ioemu"): @@ -154,7 +154,7 @@ Index: xen-4.0.0-testing/tools/python/xen/xend/XendDomainInfo.py + def _shouldMount(types): + if types[0] in ('file', 'phy'): + return False -+ if types[0] in ('tap', 'tap2'): ++ if types[0] == 'tap' or types[0] == 'tap2': + if types[1] in ('aio', 'sync'): + return False + else: diff --git a/xen.changes b/xen.changes index 31c622b..96a0076 100644 --- a/xen.changes +++ b/xen.changes @@ -1,66 +1,3 @@ -------------------------------------------------------------------- -Wed May 12 08:43:20 MDT 2010 - carnold@novell.com - -- bnc#605182 - /etc/xen/scripts/xen-hotplug-cleanup: line 24: [: - !=: unary operator expected - 21129-xen-hotplug-cleanup.patch - -------------------------------------------------------------------- -Mon May 10 10:26:07 MDT 2010 - carnold@novell.com - -- bnc#599929 - Hot add/remove Kawela NIC device over 500 times will - cause guest domain crash - passthrough-hotplug-segfault.patch - -------------------------------------------------------------------- -Fri May 7 09:00:12 MDT 2010 - jfehlig@novell.com - -- bnc#603583 - Fix migration of domUs using tapdisk devices - 21317-xend-blkif-util-tap2.patch - suse-disable-tap2-default.patch - -------------------------------------------------------------------- -Thu May 6 08:33:22 MDT 2010 - carnold@novell.com - -- Match upstreams cpu pools switch from domctl to sysctl -- Upstream replacements for two of our custom patches (to ease - applying further backports) -- Fixed dump-exec-state.patch (could previously hang the system, as - could - with lower probability - the un-patched implementation) - -------------------------------------------------------------------- -Wed May 5 08:20:45 MDT 2010 - carnold@novell.com - -- bnc#593536 - xen hypervisor takes very long to initialize Dom0 on - 128 CPUs and 256Gb - 21272-x86-dom0-alloc-performance.patch - 21266-vmx-disabled-check.patch - 21271-x86-cache-flush-global.patch - -------------------------------------------------------------------- -Tue May 4 09:46:22 MDT 2010 - carnold@novell.com - -- bnc#558815 - using multiple npiv luns with same wwpn/wwnn broken -- bnc#601104 - Xen /etc/xen/scripts/block-npiv script fails when - accessing multiple disks using NPIV - block-npiv - -------------------------------------------------------------------- -Fri Apr 30 08:10:52 MDT 2010 - carnold@novell.com - -- bnc#595124 - VT-d can not be enabled on 32PAE Xen on Nehalem-EX - platform - 21234-x86-bad-srat-clear-pxm2node.patch - bnc#585371 - kdump fails to load with xen: locate_hole failed - 21235-crashkernel-advanced.patch - -------------------------------------------------------------------- -Thu Apr 29 08:02:49 MDT 2010 - carnold@novell.com - -- bnc#588918 - Attaching a U-disk to domain's failed by - "xm usb-attach" - init.xend - ------------------------------------------------------------------- Wed Apr 21 21:15:04 MDT 2010 - jfehlig@novell.com diff --git a/xen.spec b/xen.spec index 8d98ea8..f693166 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_01) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -38,9 +38,9 @@ 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: 1 -License: GPLv2 +Version: 4.0.0_21091_01 +Release: 2 +License: GPLv2+ Group: System/Kernel AutoReqProv: on PreReq: %insserv_prereq %fillup_prereq @@ -77,23 +77,13 @@ Source25: xen-updown.sh 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: 21160-sysctl-debug-keys.patch -Patch6: 21189-x86-emulate-clflush.patch -Patch7: 21193-blktap-script.patch -Patch8: 21194-ioemu-subtype.patch -Patch9: 21223-xend-preserve-devs.patch -Patch10: 21225-conring-iommu.patch -Patch11: 21234-x86-bad-srat-clear-pxm2node.patch -Patch12: 21235-crashkernel-advanced.patch -Patch13: 21266-vmx-disabled-check.patch -Patch14: 21271-x86-cache-flush-global.patch -Patch15: 21272-x86-dom0-alloc-performance.patch -Patch16: 21301-svm-lmsl.patch -Patch17: 21304-keyhandler-alternative.patch -Patch18: 21317-xend-blkif-util-tap2.patch -Patch19: passthrough-hotplug-segfault.patch +Patch3: 21150-shadow-race.patch +Patch4: 21160-sysctl-debug-keys.patch +Patch5: 21189-x86-emulate-clflush.patch +Patch6: 21193-blktap-script.patch +Patch7: 21194-ioemu-subtype.patch +Patch8: 21225-conring-iommu.patch +Patch9: xend-preserve-devs.patch # Our patches Patch300: xen-config.diff Patch301: xend-config.diff @@ -142,19 +132,18 @@ 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 -Patch362: xm-create-xflag.patch -Patch363: cpupools-core.patch -Patch364: cpupools-core-fixup.patch +Patch359: checkpoint-rename.patch +Patch360: xm-save-check-file.patch +Patch361: xm-create-xflag.patch +Patch362: cpupools-core.patch +Patch363: cpupools-core-fixup.patch +Patch364: keyhandler-alternative.patch Patch365: cpu-pools-libxc.patch Patch366: cpu-pools-python.patch Patch367: cpu-pools-libxen.patch Patch368: cpu-pools-xmtest.patch Patch369: cpu-pools-docs.patch -Patch370: x86-memcpy.patch # Patches for snapshot support Patch400: snapshot-ioemu-save.patch Patch401: snapshot-ioemu-restore.patch @@ -181,19 +170,20 @@ Patch430: del_usb_xend_entry.patch # Jim's domain lock patch Patch450: xend-domain-lock.patch # Hypervisor and PV driver Patches -Patch500: 32on64-extra-mem.patch -Patch501: x86-ioapic-ack-default.patch -Patch502: x86-cpufreq-report.patch -Patch503: dump-exec-state.patch -Patch504: dom-print.patch -Patch505: pvdrv-import-shared-info.patch -Patch506: x86-show-page-walk-early.patch -Patch507: x86-extra-trap-info.patch -Patch508: pvdrv_emulation_control.patch -Patch509: blktap-pv-cdrom.patch -Patch510: pv-driver-build.patch -Patch511: supported_module.diff -Patch512: magic_ioport_compat.patch +Patch500: svm-lmsl.patch +Patch501: 32on64-extra-mem.patch +Patch502: x86-ioapic-ack-default.patch +Patch503: x86-cpufreq-report.patch +Patch504: dump-exec-state.patch +Patch505: dom-print.patch +Patch506: pvdrv-import-shared-info.patch +Patch507: x86-show-page-walk-early.patch +Patch508: x86-extra-trap-info.patch +Patch509: pvdrv_emulation_control.patch +Patch510: blktap-pv-cdrom.patch +Patch511: pv-driver-build.patch +Patch512: supported_module.diff +Patch513: magic_ioport_compat.patch Patch650: disable_emulated_device.diff Patch651: ioemu-disable-scsi.patch # novell_shim patches @@ -545,16 +535,6 @@ Authors: %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 %patch300 -p1 %patch301 -p1 %patch302 -p1 @@ -613,7 +593,6 @@ Authors: %patch367 -p1 %patch368 -p1 %patch369 -p1 -%patch370 -p1 %patch400 -p1 %patch401 -p1 %patch402 -p1 @@ -648,6 +627,7 @@ Authors: %patch510 -p1 %patch511 -p1 %patch512 -p1 +%patch513 -p1 %patch650 -p1 %patch651 -p1 %patch700 -p1 diff --git a/21223-xend-preserve-devs.patch b/xend-preserve-devs.patch similarity index 52% rename from 21223-xend-preserve-devs.patch rename to xend-preserve-devs.patch index 3a0aa2b..1a671fd 100644 --- a/21223-xend-preserve-devs.patch +++ b/xend-preserve-devs.patch @@ -1,21 +1,3 @@ -# 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 diff --git a/xm-create-xflag.patch b/xm-create-xflag.patch index a344f3a..9eab9f5 100644 --- a/xm-create-xflag.patch +++ b/xm-create-xflag.patch @@ -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): +@@ -1512,7 +1512,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): +@@ -1520,7 +1520,7 @@ def main(argv): if opts.vals.dryrun and not opts.is_xml: SXPPrettyPrint.prettyprint(config)