diff --git a/25927-x86-domctl-ioport-mapping-range.patch b/25927-x86-domctl-ioport-mapping-range.patch new file mode 100644 index 0000000..5833c8e --- /dev/null +++ b/25927-x86-domctl-ioport-mapping-range.patch @@ -0,0 +1,28 @@ +# HG changeset patch +# User Jan Beulich +# Date 1348039675 -7200 +# Node ID 3e3959413b2fbef584993beb434285d0691d5c67 +# Parent 4a0438fe1e6afe01e46023bcb2c828c5aaeefb1d +x86: properly check XEN_DOMCTL_ioport_mapping arguments for invalid range + +In particular, the case of "np" being a very large value wasn't handled +correctly. The range start checks also were off by one (except that in +practice, when "np" is properly range checked, this would still have +been caught by the range end checks). + +Also, is a GFN wrap in XEN_DOMCTL_memory_mapping really okay? + +Signed-off-by: Jan Beulich +Acked-by: Keir Fraser + +--- a/xen/arch/x86/domctl.c ++++ b/xen/arch/x86/domctl.c +@@ -888,7 +888,7 @@ long arch_do_domctl( + int found = 0; + + ret = -EINVAL; +- if ( (np == 0) || (fgp > MAX_IOPORTS) || (fmp > MAX_IOPORTS) || ++ if ( ((fgp | fmp | (np - 1)) >= MAX_IOPORTS) || + ((fgp + np) > MAX_IOPORTS) || ((fmp + np) > MAX_IOPORTS) ) + { + printk(XENLOG_G_ERR diff --git a/25929-tmem-restore-pool-version.patch b/25929-tmem-restore-pool-version.patch new file mode 100644 index 0000000..e09d79c --- /dev/null +++ b/25929-tmem-restore-pool-version.patch @@ -0,0 +1,26 @@ +# HG changeset patch +# User Zhenzhong Duan +# Date 1348069127 -7200 +# Node ID fee83ac77d8c7339abf5185690603ea5b0c548cf +# Parent 7b045d43e59dcb42340097058502bf456e151180 +tmem: bump pool version to 1 to fix restore issue when tmem enabled + +Restore fails when tmem is enabled both in hypervisor and guest. This +is due to spec version mismatch when restoring a pool. + +Signed-off-by: Zhenzhong Duan +Acked-by: Dan Magenheimer +Committed-by: Jan Beulich + +--- a/xen/common/tmem.c ++++ b/xen/common/tmem.c +@@ -2407,7 +2407,8 @@ static NOINLINE int tmemc_save_subop(int + break; + rc = (pool->persistent ? TMEM_POOL_PERSIST : 0) | + (pool->shared ? TMEM_POOL_SHARED : 0) | +- (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT); ++ (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT) | ++ (TMEM_SPEC_VERSION << TMEM_POOL_VERSION_SHIFT); + break; + case TMEMC_SAVE_GET_POOL_NPAGES: + if ( pool == NULL ) diff --git a/25931-x86-domctl-iomem-mapping-checks.patch b/25931-x86-domctl-iomem-mapping-checks.patch new file mode 100644 index 0000000..6039228 --- /dev/null +++ b/25931-x86-domctl-iomem-mapping-checks.patch @@ -0,0 +1,257 @@ +# HG changeset patch +# User Jan Beulich +# Date 1348125713 -7200 +# Node ID 14980591956954584f3cd87bf4e8d306360e7f27 +# Parent 4e93cbeac98b3e6be98e5ec0881b44b68ee95974 +x86: tighten checks in XEN_DOMCTL_memory_mapping handler + +Properly checking the MFN implies knowing the physical address width +supported by the platform, so to obtain this consistently the +respective code gets moved out of the MTRR subdir. + +Btw., the model specific workaround in that code is likely unnecessary +- I believe those CPU models don't support 64-bit mode. But I wasn't +able to formally verify this, so I preferred to retain that code for +now. + +But domctl code here also was lacking other error checks (as was, +looking at it again from that angle) the XEN_DOMCTL_ioport_mapping one. +Besides adding the missing checks, printing is also added for the case +where revoking access permissions didn't work (as that may have +implications for the host operator, e.g. wanting to not pass through +affected devices to another guest until the one previously using them +did actually die). + +Signed-off-by: Jan Beulich +Acked-by: Keir Fraser + +--- a/xen/arch/x86/cpu/centaur.c ++++ b/xen/arch/x86/cpu/centaur.c +@@ -56,6 +56,9 @@ static void __init init_c3(struct cpuinf + if (c->x86_model >=6 && c->x86_model <9) + set_bit(X86_FEATURE_3DNOW, c->x86_capability); + ++ if (cpuid_eax(0x80000000) < 0x80000008) ++ paddr_bits = 32; ++ + get_model_name(c); + display_cacheinfo(c); + } +--- a/xen/arch/x86/cpu/common.c ++++ b/xen/arch/x86/cpu/common.c +@@ -36,6 +36,8 @@ integer_param("cpuid_mask_ext_edx", opt_ + + struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; + ++unsigned int paddr_bits __read_mostly = 36; ++ + /* + * Default host IA32_CR_PAT value to cover all memory types. + * BIOS usually sets it to 0x07040600070406. +@@ -265,6 +267,8 @@ static void __cpuinit generic_identify(s + } + if ( xlvl >= 0x80000004 ) + get_model_name(c); /* Default name */ ++ if ( xlvl >= 0x80000008 ) ++ paddr_bits = cpuid_eax(0x80000008) & 0xff; + } + + /* Intel-defined flags: level 0x00000007 */ +--- a/xen/arch/x86/cpu/cyrix.c ++++ b/xen/arch/x86/cpu/cyrix.c +@@ -255,7 +255,9 @@ static void __init init_cyrix(struct cpu + } + safe_strcpy(c->x86_model_id, Cx86_model[dir0_msn & 7]); + if (p) safe_strcat(c->x86_model_id, p); +- return; ++ ++ if (cpu_has_cyrix_arr) ++ paddr_bits = 32; + } + + /* +--- a/xen/arch/x86/cpu/intel.c ++++ b/xen/arch/x86/cpu/intel.c +@@ -144,6 +144,11 @@ void __devinit early_intel_workaround(st + c->cpuid_level); + } + } ++ ++ /* CPUID workaround for Intel 0F33/0F34 CPU */ ++ if (boot_cpu_data.x86 == 0xF && boot_cpu_data.x86_model == 3 && ++ (boot_cpu_data.x86_mask == 3 || boot_cpu_data.x86_mask == 4)) ++ paddr_bits = 36; + } + + /* +--- a/xen/arch/x86/cpu/mtrr/main.c ++++ b/xen/arch/x86/cpu/mtrr/main.c +@@ -587,8 +587,6 @@ struct mtrr_value { + unsigned long lsize; + }; + +-unsigned int paddr_bits __read_mostly = 36; +- + /** + * mtrr_bp_init - initialize mtrrs on the boot CPU + * +@@ -602,48 +600,12 @@ void __init mtrr_bp_init(void) + + if (cpu_has_mtrr) { + mtrr_if = &generic_mtrr_ops; +- size_or_mask = 0xff000000; /* 36 bits */ +- size_and_mask = 0x00f00000; +- +- /* This is an AMD specific MSR, but we assume(hope?) that +- Intel will implement it to when they extend the address +- bus of the Xeon. */ +- if (cpuid_eax(0x80000000) >= 0x80000008) { +- paddr_bits = cpuid_eax(0x80000008) & 0xff; +- /* CPUID workaround for Intel 0F33/0F34 CPU */ +- if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && +- boot_cpu_data.x86 == 0xF && +- boot_cpu_data.x86_model == 0x3 && +- (boot_cpu_data.x86_mask == 0x3 || +- boot_cpu_data.x86_mask == 0x4)) +- paddr_bits = 36; +- +- size_or_mask = ~((1ULL << (paddr_bits - PAGE_SHIFT)) - 1); +- size_and_mask = ~size_or_mask & 0xfffff00000ULL; +- } else if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR && +- boot_cpu_data.x86 == 6) { +- /* VIA C* family have Intel style MTRRs, but +- don't support PAE */ +- size_or_mask = 0xfff00000; /* 32 bits */ +- size_and_mask = 0; +- } + } else { + #ifndef CONFIG_X86_64 + switch (boot_cpu_data.x86_vendor) { +- case X86_VENDOR_AMD: +- if (cpu_has_k6_mtrr) { +- /* Pre-Athlon (K6) AMD CPU MTRRs */ +- mtrr_if = mtrr_ops[X86_VENDOR_AMD]; +- size_or_mask = 0xfff00000; /* 32 bits */ +- size_and_mask = 0; +- } +- break; + case X86_VENDOR_CYRIX: +- if (cpu_has_cyrix_arr) { ++ if (cpu_has_cyrix_arr) + mtrr_if = mtrr_ops[X86_VENDOR_CYRIX]; +- size_or_mask = 0xfff00000; /* 32 bits */ +- size_and_mask = 0; +- } + break; + default: + break; +@@ -652,6 +614,8 @@ void __init mtrr_bp_init(void) + } + + if (mtrr_if) { ++ size_or_mask = ~((1ULL << (paddr_bits - PAGE_SHIFT)) - 1); ++ size_and_mask = ~size_or_mask & 0xfffff00000ULL; + set_num_var_ranges(); + init_table(); + if (use_intel()) +--- a/xen/arch/x86/domctl.c ++++ b/xen/arch/x86/domctl.c +@@ -829,10 +829,12 @@ long arch_do_domctl( + unsigned long mfn = domctl->u.memory_mapping.first_mfn; + unsigned long nr_mfns = domctl->u.memory_mapping.nr_mfns; + int add = domctl->u.memory_mapping.add_mapping; +- int i; ++ unsigned long i; + + ret = -EINVAL; +- if ( (mfn + nr_mfns - 1) < mfn ) /* wrap? */ ++ if ( (mfn + nr_mfns - 1) < mfn || /* wrap? */ ++ ((mfn | (mfn + nr_mfns - 1)) >> (paddr_bits - PAGE_SHIFT)) || ++ (gfn + nr_mfns - 1) < gfn ) /* wrap? */ + break; + + ret = -EPERM; +@@ -857,8 +859,25 @@ long arch_do_domctl( + d->domain_id, gfn, mfn, nr_mfns); + + ret = iomem_permit_access(d, mfn, mfn + nr_mfns - 1); +- for ( i = 0; i < nr_mfns; i++ ) +- set_mmio_p2m_entry(d, gfn+i, _mfn(mfn+i)); ++ if ( !ret && paging_mode_translate(d) ) ++ { ++ for ( i = 0; !ret && i < nr_mfns; i++ ) ++ if ( !set_mmio_p2m_entry(d, gfn + i, _mfn(mfn + i)) ) ++ ret = -EIO; ++ if ( ret ) ++ { ++ printk(XENLOG_G_WARNING ++ "memory_map:fail: dom%d gfn=%lx mfn=%lx\n", ++ d->domain_id, gfn + i, mfn + i); ++ while ( i-- ) ++ clear_mmio_p2m_entry(d, gfn + i); ++ if ( iomem_deny_access(d, mfn, mfn + nr_mfns - 1) && ++ IS_PRIV(current->domain) ) ++ printk(XENLOG_ERR ++ "memory_map: failed to deny dom%d access to [%lx,%lx]\n", ++ d->domain_id, mfn, mfn + nr_mfns - 1); ++ } ++ } + } + else + { +@@ -866,9 +885,17 @@ long arch_do_domctl( + "memory_map:remove: dom%d gfn=%lx mfn=%lx nr=%lx\n", + d->domain_id, gfn, mfn, nr_mfns); + +- for ( i = 0; i < nr_mfns; i++ ) +- clear_mmio_p2m_entry(d, gfn+i); ++ if ( paging_mode_translate(d) ) ++ for ( i = 0; i < nr_mfns; i++ ) ++ add |= !clear_mmio_p2m_entry(d, gfn + i); + ret = iomem_deny_access(d, mfn, mfn + nr_mfns - 1); ++ if ( !ret && add ) ++ ret = -EIO; ++ if ( ret && IS_PRIV(current->domain) ) ++ printk(XENLOG_ERR ++ "memory_map: error %ld %s dom%d access to [%lx,%lx]\n", ++ ret, add ? "removing" : "denying", d->domain_id, ++ mfn, mfn + nr_mfns - 1); + } + + rcu_unlock_domain(d); +@@ -930,12 +957,23 @@ long arch_do_domctl( + if ( !found ) + { + g2m_ioport = xmalloc(struct g2m_ioport); ++ if ( !g2m_ioport ) ++ ret = -ENOMEM; ++ } ++ if ( !found && !ret ) ++ { + g2m_ioport->gport = fgp; + g2m_ioport->mport = fmp; + g2m_ioport->np = np; + list_add_tail(&g2m_ioport->list, &hd->g2m_ioport_list); + } +- ret = ioports_permit_access(d, fmp, fmp + np - 1); ++ if ( !ret ) ++ ret = ioports_permit_access(d, fmp, fmp + np - 1); ++ if ( ret && !found && g2m_ioport ) ++ { ++ list_del(&g2m_ioport->list); ++ xfree(g2m_ioport); ++ } + } + else + { +@@ -950,6 +988,10 @@ long arch_do_domctl( + break; + } + ret = ioports_deny_access(d, fmp, fmp + np - 1); ++ if ( ret && IS_PRIV(current->domain) ) ++ printk(XENLOG_ERR ++ "ioport_map: error %ld denying dom%d access to [%x,%x]\n", ++ ret, d->domain_id, fmp, fmp + np - 1); + } + rcu_unlock_domain(d); + } diff --git a/25940-x86-S3-flush-cache.patch b/25940-x86-S3-flush-cache.patch new file mode 100644 index 0000000..4ec5073 --- /dev/null +++ b/25940-x86-S3-flush-cache.patch @@ -0,0 +1,53 @@ +# HG changeset patch +# User Ben Guthro +# Date 1348555094 -7200 +# Node ID c8d65d91a6f20fa7fae905bbf172e59b335d6371 +# Parent b49f7bf52fa92626517386cba89350243b808871 +x86/S3: add cache flush on secondary CPUs before going to sleep + +Secondary CPUs, between doing their final memory writes (particularly +updating cpu_initialized) and getting a subsequent INIT, may not write +back all modified data. The INIT itself then causes those modifications +to be lost, so in the cpu_initialized case the CPU would find itself +already initialized, (intentionally) entering an infinite loop instead +of actually coming online. + +Signed-off-by: Ben Guthro + +Make acpi_dead_idle() call default_dead_idle() rather than duplicating +the logic there. + +Signed-off-by: Jan Beulich +Acked-by: Keir Fraser +Committed-by: Jan Beulich + +--- a/xen/arch/x86/acpi/cpu_idle.c ++++ b/xen/arch/x86/acpi/cpu_idle.c +@@ -647,6 +647,12 @@ static void acpi_dead_idle(void) + } + + default_halt: ++ /* ++ * When going into S3, without flushing caches modified data may be ++ * held by the CPUs spinning here indefinitely, and get discarded by ++ * a subsequent INIT. ++ */ ++ wbinvd(); + for ( ; ; ) + halt(); + } +--- a/xen/arch/x86/domain.c ++++ b/xen/arch/x86/domain.c +@@ -86,6 +86,12 @@ static void default_idle(void) + + static void default_dead_idle(void) + { ++ /* ++ * When going into S3, without flushing caches modified data may be ++ * held by the CPUs spinning here indefinitely, and get discarded by ++ * a subsequent INIT. ++ */ ++ wbinvd(); + for ( ; ; ) + halt(); + } diff --git a/25952-x86-MMIO-remap-permissions.patch b/25952-x86-MMIO-remap-permissions.patch new file mode 100644 index 0000000..91a44dd --- /dev/null +++ b/25952-x86-MMIO-remap-permissions.patch @@ -0,0 +1,41 @@ +# HG changeset patch +# User Daniel De Graaf +# Date 1348653367 -7200 +# Node ID 8278d7d8fa485996f51134c5265fceaf239adf6a +# Parent b83f414ccf7a6e4e077a10bc422cf3f6c7d30566 +x86: check remote MMIO remap permissions + +When a domain is mapping pages from a different pg_owner domain, the +iomem_access checks are currently only applied to the pg_owner domain, +potentially allowing a domain with a more restrictive iomem_access +policy to have the pages mapped into its page tables. To catch this, +also check the owner of the page tables. The current domain does not +need to be checked because the ability to manipulate a domain's page +tables implies full access to the target domain, so checking that +domain's permission is sufficient. + +Signed-off-by: Daniel De Graaf +Committed-by: Jan Beulich + +--- a/xen/arch/x86/mm.c ++++ b/xen/arch/x86/mm.c +@@ -870,6 +870,19 @@ get_page_from_l1e( + return -EINVAL; + } + ++ if ( pg_owner != l1e_owner && ++ !iomem_access_permitted(l1e_owner, mfn, mfn) ) ++ { ++ if ( mfn != (PADDR_MASK >> PAGE_SHIFT) ) /* INVALID_MFN? */ ++ { ++ MEM_LOG("Dom%u attempted to map I/O space %08lx in dom%u to dom%u", ++ curr->domain->domain_id, mfn, pg_owner->domain_id, ++ l1e_owner->domain_id); ++ return -EPERM; ++ } ++ return -EINVAL; ++ } ++ + if ( !(l1f & _PAGE_RW) || + !rangeset_contains_singleton(mmio_ro_ranges, mfn) ) + return 0; diff --git a/25961-x86-HPET-interrupts.patch b/25961-x86-HPET-interrupts.patch new file mode 100644 index 0000000..30cccd0 --- /dev/null +++ b/25961-x86-HPET-interrupts.patch @@ -0,0 +1,36 @@ +# HG changeset patch +# User Jan Beulich +# Date 1348816934 -7200 +# Node ID 6a581212909478bba0c7b4dfc6c370270dee825c +# Parent 6bf8b882df8f66ab5500e4d9cc0c3338ae5a6cb9 +x86/HPET: don't disable interrupt delivery right after setting it up + +We shouldn't clear HPET_TN_FSB right after we (indirectly, via +request_irq()) enabled it for the channels we intend to use for +broadcasts. + +This fixes a regression introduced by c/s 25103:0b0e42dc4f0a. + +Signed-off-by: Jan Beulich +Acked-by: Keir Fraser + +--- a/xen/arch/x86/hpet.c ++++ b/xen/arch/x86/hpet.c +@@ -533,7 +533,7 @@ void __init hpet_broadcast_init(void) + { + /* set HPET Tn as oneshot */ + cfg = hpet_read32(HPET_Tn_CFG(hpet_events[i].idx)); +- cfg &= ~(HPET_TN_LEVEL | HPET_TN_PERIODIC | HPET_TN_FSB); ++ cfg &= ~(HPET_TN_LEVEL | HPET_TN_PERIODIC); + cfg |= HPET_TN_ENABLE | HPET_TN_32BIT; + hpet_write32(cfg, HPET_Tn_CFG(hpet_events[i].idx)); + +@@ -590,7 +590,7 @@ void hpet_broadcast_resume(void) + + /* set HPET Tn as oneshot */ + cfg = hpet_read32(HPET_Tn_CFG(hpet_events[i].idx)); +- cfg &= ~(HPET_TN_LEVEL | HPET_TN_PERIODIC | HPET_TN_FSB); ++ cfg &= ~(HPET_TN_LEVEL | HPET_TN_PERIODIC); + cfg |= HPET_TN_ENABLE | HPET_TN_32BIT; + hpet_write32(cfg, HPET_Tn_CFG(hpet_events[i].idx)); + diff --git a/25962-x86-assign-irq-vector-old.patch b/25962-x86-assign-irq-vector-old.patch new file mode 100644 index 0000000..cc3b82d --- /dev/null +++ b/25962-x86-assign-irq-vector-old.patch @@ -0,0 +1,35 @@ +# HG changeset patch +# User Jan Beulich +# Date 1348817014 -7200 +# Node ID 41f523f1b5e5af9cf8e85160f2412456da83050f +# Parent 6a581212909478bba0c7b4dfc6c370270dee825c +x86/IRQ: fix valid-old-vector checks in __assign_irq_vector() + +There are two greater-than-zero checks for the old vector retrieved, +which don't work when a negative value got stashed into the respective +arch_irq_desc field. The effect of this was that for interrupts that +are intended to get their affinity adjusted the first time before the +first interrupt occurs, the affinity change would fail, because the +original vector assignment would have caused the move_in_progress flag +to get set (which causes subsequent re-assignments to fail until it +gets cleared, which only happens from the ->ack() actor, i.e. when an +interrupt actually occurred). + +This addresses a problem introduced in c/s 23816:7f357e1ef60a (by +changing IRQ_VECTOR_UNASSIGNED from 0 to -1). + +Signed-off-by: Jan Beulich +Acked-by: Keir Fraser + +--- a/xen/arch/x86/irq.c ++++ b/xen/arch/x86/irq.c +@@ -430,8 +430,7 @@ static int __assign_irq_vector( + * 0x80, because int 0x80 is hm, kind of importantish. ;) + */ + static int current_vector = FIRST_DYNAMIC_VECTOR, current_offset = 0; +- unsigned int old_vector; +- int cpu, err; ++ int cpu, err, old_vector; + cpumask_t tmp_mask; + vmask_t *irq_used_vectors = NULL; + diff --git a/25965-x86-ucode-Intel-resume.patch b/25965-x86-ucode-Intel-resume.patch new file mode 100644 index 0000000..b5ae1b0 --- /dev/null +++ b/25965-x86-ucode-Intel-resume.patch @@ -0,0 +1,35 @@ +# HG changeset patch +# User Jan Beulich +# Date 1348817291 -7200 +# Node ID 4496d56c68a0e57ed9f03b482028093f1e7fdf6c +# Parent 00c05b9d76247d063a8ebc75050246e488323f50 +x86/ucode: fix Intel case of resume handling on boot CPU + +Checking the stored version doesn't tell us anything about the need to +apply the update (during resume, what is stored doesn't necessarily +match what is loaded). + +Note that the check can be removed altogether because once switched to +use what was read from the CPU (uci->cpu_sig.rev, as used in the +subsequent pr_debug()), it would become redundant with the checks that +lead to microcode_update_match() returning the indication that an +update should be applied. + +Note further that this was not an issue on APs since they start with +uci->mc.mc_intel being NULL. + +Signed-off-by: Jan Beulich +Tested-by: Ben Guthro +Acked-by: Keir Fraser + +--- a/xen/arch/x86/microcode_intel.c ++++ b/xen/arch/x86/microcode_intel.c +@@ -261,8 +261,6 @@ static int get_matching_microcode(const + } + return 0; + find: +- if ( uci->mc.mc_intel && uci->mc.mc_intel->hdr.rev >= mc_header->rev ) +- return 0; + pr_debug("microcode: CPU%d found a matching microcode update with" + " version 0x%x (current=0x%x)\n", + cpu, mc_header->rev, uci->cpu_sig.rev); diff --git a/26006-hotplug-Linux_Remove_tracing_bash_-x_from_network-nat_script.patch b/26006-hotplug-Linux_Remove_tracing_bash_-x_from_network-nat_script.patch new file mode 100644 index 0000000..115523a --- /dev/null +++ b/26006-hotplug-Linux_Remove_tracing_bash_-x_from_network-nat_script.patch @@ -0,0 +1,21 @@ +changeset: 26006:8b6870d686d6 +user: Olaf Hering +date: Mon Oct 08 12:18:30 2012 +0100 +files: tools/hotplug/Linux/network-nat +description: +hotplug/Linux: Remove tracing (bash -x) from network-nat script + +Signed-off-by: Olaf Hering +Acked-by: Ian Campbell +Committed-by: Ian Campbell + + +diff -r cdb48f1742f3 -r 8b6870d686d6 tools/hotplug/Linux/network-nat +--- a/tools/hotplug/Linux/network-nat Mon Oct 08 12:18:29 2012 +0100 ++++ b/tools/hotplug/Linux/network-nat Mon Oct 08 12:18:30 2012 +0100 +@@ -1,4 +1,4 @@ +-#!/bin/bash -x ++#!/bin/bash + #============================================================================ + # Default Xen network start/stop script when using NAT. + # Xend calls a network script when it starts. diff --git a/26007-xenballoond.init_remove_4_from_default_runlevel.patch b/26007-xenballoond.init_remove_4_from_default_runlevel.patch new file mode 100644 index 0000000..76b621c --- /dev/null +++ b/26007-xenballoond.init_remove_4_from_default_runlevel.patch @@ -0,0 +1,31 @@ +changeset: 26007:fe756682cc7f +user: Olaf Hering +date: Mon Oct 08 12:18:31 2012 +0100 +files: tools/xenballoon/xenballoond.init +description: +xenballoond.init: remove 4 from default runlevel + +Remove 4 from default runlevel in xenballoond.init. + +Similar to what changeset 24847:0900b1c905f1 does in xencommons, remove +runlevel 4 from the other runlevel scripts. LSB defines runlevel 4 as +reserved for local use, the local sysadmin is responsible for symlink +creation in rc4.d. + +Signed-off-by: Olaf Hering +Acked-by: Ian Campbell +Committed-by: Ian Campbell + + +diff -r 8b6870d686d6 -r fe756682cc7f tools/xenballoon/xenballoond.init +--- a/tools/xenballoon/xenballoond.init Mon Oct 08 12:18:30 2012 +0100 ++++ b/tools/xenballoon/xenballoond.init Mon Oct 08 12:18:31 2012 +0100 +@@ -14,7 +14,7 @@ + # Should-Start: + # Required-Stop: $syslog $remote_fs + # Should-Stop: +-# Default-Start: 3 4 5 ++# Default-Start: 3 5 + # Default-Stop: 0 1 2 6 + # Short-Description: Start/stop xenballoond + # Description: Starts and stops the Xen ballooning daemon. diff --git a/xen-bug776995-pvscsi-no-devname.patch b/26008-xend-pvscsi_fix_passing_of_SCSI_control_LUNs.patch similarity index 70% rename from xen-bug776995-pvscsi-no-devname.patch rename to 26008-xend-pvscsi_fix_passing_of_SCSI_control_LUNs.patch index c5cf27f..8e884b3 100644 --- a/xen-bug776995-pvscsi-no-devname.patch +++ b/26008-xend-pvscsi_fix_passing_of_SCSI_control_LUNs.patch @@ -1,3 +1,8 @@ +changeset: 26008:eecb528583d7 +user: Olaf Hering +date: Mon Oct 08 12:18:31 2012 +0100 +files: tools/python/xen/util/vscsi_util.py +description: xend/pvscsi: fix passing of SCSI control LUNs Currently pvscsi can not pass SCSI devices that have just a scsi_generic node. @@ -17,14 +22,14 @@ carron:~ $ lsscsi -g [4:0:3:0] storage HP HSV400 0950 - /dev/sg5 [4:0:3:1] disk HP HSV400 0950 /dev/sde /dev/sg6 ---- - tools/python/xen/util/vscsi_util.py | 2 ++ - 1 file changed, 2 insertions(+) +Signed-off-by: Olaf Hering +Acked-by: Ian Campbell +Committed-by: Ian Campbell -Index: xen-4.1.2-testing/tools/python/xen/util/vscsi_util.py -=================================================================== ---- xen-4.1.2-testing.orig/tools/python/xen/util/vscsi_util.py -+++ xen-4.1.2-testing/tools/python/xen/util/vscsi_util.py + +diff -r fe756682cc7f -r eecb528583d7 tools/python/xen/util/vscsi_util.py +--- a/tools/python/xen/util/vscsi_util.py Mon Oct 08 12:18:31 2012 +0100 ++++ b/tools/python/xen/util/vscsi_util.py Mon Oct 08 12:18:31 2012 +0100 @@ -105,6 +105,8 @@ def _vscsi_get_scsidevices_by_lsscsi(opt devname = None try: diff --git a/xen-bug776995-pvscsi-persistent-names.patch b/26009-xend-pvscsi_fix_usage_of_persistant_device_names_for_SCSI_devices.patch similarity index 55% rename from xen-bug776995-pvscsi-persistent-names.patch rename to 26009-xend-pvscsi_fix_usage_of_persistant_device_names_for_SCSI_devices.patch index efe3b33..b0b8a51 100644 --- a/xen-bug776995-pvscsi-persistent-names.patch +++ b/26009-xend-pvscsi_fix_usage_of_persistant_device_names_for_SCSI_devices.patch @@ -1,3 +1,8 @@ +changeset: 26009:2dbfa4d2e107 +user: Olaf Hering +date: Mon Oct 08 12:18:32 2012 +0100 +files: tools/python/xen/util/vscsi_util.py +description: xend/pvscsi: fix usage of persistant device names for SCSI devices Currently the callers of vscsi_get_scsidevices() do not pass a mask @@ -9,17 +14,20 @@ not found. Using a mask '*' if no mask was given will call lsscsi correctly and the following config is parsed correctly: -vscsi=['/dev/sg3,0:0:0:0','/dev/disk/by-id/wwn-0x600508b4000cf1c30000800000410000,0:0:0:1'] +vscsi=[ + '/dev/sg3, 0:0:0:0', + '/dev/disk/by-id/wwn-0x600508b4000cf1c30000800000410000, 0:0:0:1' +] ---- - tools/python/xen/util/vscsi_util.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) +Signed-off-by: Olaf Hering +Acked-by: Ian Campbell +Committed-by: Ian Campbell -Index: xen-4.2.0-testing/tools/python/xen/util/vscsi_util.py -=================================================================== ---- xen-4.2.0-testing.orig/tools/python/xen/util/vscsi_util.py -+++ xen-4.2.0-testing/tools/python/xen/util/vscsi_util.py -@@ -148,7 +148,7 @@ def _vscsi_get_scsidevices_by_sysfs(): + +diff -r eecb528583d7 -r 2dbfa4d2e107 tools/python/xen/util/vscsi_util.py +--- a/tools/python/xen/util/vscsi_util.py Mon Oct 08 12:18:31 2012 +0100 ++++ b/tools/python/xen/util/vscsi_util.py Mon Oct 08 12:18:32 2012 +0100 +@@ -150,7 +150,7 @@ def _vscsi_get_scsidevices_by_sysfs(): return devices @@ -28,7 +36,7 @@ Index: xen-4.2.0-testing/tools/python/xen/util/vscsi_util.py """ get all scsi devices information """ devices = _vscsi_get_scsidevices_by_lsscsi("[%s]" % mask) -@@ -277,7 +277,7 @@ def get_scsi_device(pHCTL): +@@ -279,7 +279,7 @@ def get_scsi_device(pHCTL): return _make_scsi_record(scsi_info) return None diff --git a/xen-bug776995-pvscsi-sysfs-parser.patch b/26010-xend-pvscsi_update_sysfs_parser_for_Linux_3.0.patch similarity index 85% rename from xen-bug776995-pvscsi-sysfs-parser.patch rename to 26010-xend-pvscsi_update_sysfs_parser_for_Linux_3.0.patch index 503266a..8ac4587 100644 --- a/xen-bug776995-pvscsi-sysfs-parser.patch +++ b/26010-xend-pvscsi_update_sysfs_parser_for_Linux_3.0.patch @@ -1,3 +1,8 @@ +changeset: 26010:cff10030c6ea +user: Olaf Hering +date: Mon Oct 08 12:18:33 2012 +0100 +files: tools/python/xen/util/vscsi_util.py +description: xend/pvscsi: update sysfs parser for Linux 3.0 The sysfs parser for /sys/bus/scsi/devices understands only the layout @@ -10,7 +15,6 @@ Both directories contain a 'dev' file with the major:minor information. This patch updates the used regex strings to match also the colon to make it more robust against possible future changes. - In kernel version 3.0 the layout changed: /sys/bus/scsi/devices/ contains now additional symlinks to directories such as host1 and target1:0:0. This patch ignores these as they do not @@ -26,17 +30,16 @@ Both directories contain a 'dev' file with the major:minor information. This patch adds additional code to walk the subdir to find the 'dev' file to make sure the given subdirectory is really the kernel name. - In addition this patch makes sure devname is not None. ---- - tools/python/xen/util/vscsi_util.py | 26 +++++++++++++++++++++----- - 1 file changed, 21 insertions(+), 5 deletions(-) +Signed-off-by: Olaf Hering +Acked-by: Ian Campbell +Committed-by: Ian Campbell -Index: xen-4.1.2-testing/tools/python/xen/util/vscsi_util.py -=================================================================== ---- xen-4.1.2-testing.orig/tools/python/xen/util/vscsi_util.py -+++ xen-4.1.2-testing/tools/python/xen/util/vscsi_util.py + +diff -r 2dbfa4d2e107 -r cff10030c6ea tools/python/xen/util/vscsi_util.py +--- a/tools/python/xen/util/vscsi_util.py Mon Oct 08 12:18:32 2012 +0100 ++++ b/tools/python/xen/util/vscsi_util.py Mon Oct 08 12:18:33 2012 +0100 @@ -130,20 +130,36 @@ def _vscsi_get_scsidevices_by_sysfs(): for dirpath, dirnames, files in os.walk(sysfs_mnt + SYSFS_SCSI_PATH): diff --git a/26011-stubdom_fix_parallel_build_by_expanding_CROSS_MAKE.patch b/26011-stubdom_fix_parallel_build_by_expanding_CROSS_MAKE.patch new file mode 100644 index 0000000..df8b7a9 --- /dev/null +++ b/26011-stubdom_fix_parallel_build_by_expanding_CROSS_MAKE.patch @@ -0,0 +1,224 @@ +changeset: 26011:b6fb4e63b946 +user: Olaf Hering +date: Mon Oct 08 12:18:34 2012 +0100 +files: stubdom/Makefile +description: +stubdom: fix parallel build by expanding CROSS_MAKE + +Recently I changed my rpm xen.spec file from doing +'make -C tools -j N && make stubdom' to 'make -j N stubdom' because +stubdom depends on tools, so both get built. +The result was the failure below. + +.... +mkdir -p grub-x86_64 +CPPFLAGS="-isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include/posix -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../tools/xenstore -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include/x86 -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include/x86/x86_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os/include/posix -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem /usr/lib64/gcc/x86_64-suse-linux/4.7/include -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/lwip-x86_64/src/include -isystem /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/lwip-x86_64/src/include/ipv4 -I/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/include -I/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../xen/include" CFLAGS="-mno-red-zone -O1 -fno-omit-frame-pointer -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -fno-stack-protector -fno-exceptions" make DESTDIR= -C grub OBJ_DIR=/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/grub-x86_64 +make[2]: Entering directory `/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/grub' +make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. +make[2]: *** INTERNAL: readdir: Bad file descriptor +. Stop. +make[2]: Makefile: Field 'stem' not cached: Makefile + +make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/grub' +make[1]: *** [grub] Error 2 +[ -d mini-os-x86_64-xenstore ] || \ +for i in $(cd /home/abuild/rpmbuild/BUILD/xen-4.2.25602/non-dbg/stubdom/../extras/mini-os ; find . -type d) ; do \ + mkdir -p mini-os-x86_64-xenstore/$i ; \ +done +.... + +Expanding every occurrence of CROSS_MAKE avoids this error. It also has +the nice side effect of actually enabling parallel build for stubdom. +According to the GNU make documentation $(MAKE) gets its special meaning +only if it appears directly in the recipe: + +http://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html + +Signed-off-by: Olaf Hering +Acked-by: Ian Campbell +Committed-by: Ian Campbell + + +diff -r cff10030c6ea -r b6fb4e63b946 stubdom/Makefile +--- a/stubdom/Makefile Mon Oct 08 12:18:33 2012 +0100 ++++ b/stubdom/Makefile Mon Oct 08 12:18:34 2012 +0100 +@@ -76,8 +76,6 @@ TARGET_LDFLAGS += -nostdlib -L$(CROSS_PR + + TARGETS=ioemu c caml grub xenstore + +-CROSS_MAKE := $(MAKE) DESTDIR= +- + .PHONY: all + all: build + ifeq ($(STUBDOM_SUPPORTED),1) +@@ -113,8 +111,8 @@ cross-newlib: $(NEWLIB_STAMPFILE) + mkdir -p newlib-$(XEN_TARGET_ARCH) + ( cd newlib-$(XEN_TARGET_ARCH) && \ + CC_FOR_TARGET="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS)" AR_FOR_TARGET=$(AR) LD_FOR_TARGET=$(LD) RANLIB_FOR_TARGET=$(RANLIB) ../newlib-$(NEWLIB_VERSION)/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long --disable-multilib && \ +- $(CROSS_MAKE) && \ +- $(CROSS_MAKE) install ) ++ $(MAKE) DESTDIR= && \ ++ $(MAKE) DESTDIR= install ) + + ############ + # Cross-zlib +@@ -133,8 +131,8 @@ cross-zlib: $(ZLIB_STAMPFILE) + $(ZLIB_STAMPFILE): zlib-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) + ( cd $< && \ + CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC=$(CC) ./configure --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf && \ +- $(CROSS_MAKE) libz.a && \ +- $(CROSS_MAKE) install ) ++ $(MAKE) DESTDIR= libz.a && \ ++ $(MAKE) DESTDIR= install ) + + ############## + # Cross-libpci +@@ -158,7 +156,7 @@ cross-libpci: $(LIBPCI_STAMPFILE) + chmod u+w lib/config.h && \ + echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \ + ln -sf ../../libpci.config.mak lib/config.mk && \ +- $(CROSS_MAKE) CC="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(call realpath,$(MINI_OS)/include)" lib/libpci.a && \ ++ $(MAKE) DESTDIR= CC="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(call realpath,$(MINI_OS)/include)" lib/libpci.a && \ + $(INSTALL_DATA) lib/libpci.a $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ && \ + $(INSTALL_DIR) $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci && \ + $(INSTALL_DATA) lib/config.h lib/header.h lib/pci.h lib/types.h $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci/ \ +@@ -203,8 +201,8 @@ cross-ocaml: $(OCAML_STAMPFILE) + -no-pthread -no-shared-libs -no-tk -no-curses \ + -cc "$(CC) -U_FORTIFY_SOURCE -fno-stack-protector -mno-red-zone" + $(foreach i,$(MINIOS_HASNOT),sed -i 's,^\(#define HAS_$(i)\),//\1,' ocaml-$(XEN_TARGET_ARCH)/config/s.h ; ) +- $(CROSS_MAKE) -C ocaml-$(XEN_TARGET_ARCH) world +- $(CROSS_MAKE) -C ocaml-$(XEN_TARGET_ARCH) opt ++ $(MAKE) DESTDIR= -C ocaml-$(XEN_TARGET_ARCH) world ++ $(MAKE) DESTDIR= -C ocaml-$(XEN_TARGET_ARCH) opt + $(MAKE) -C ocaml-$(XEN_TARGET_ARCH) install + touch $@ + +@@ -219,7 +217,7 @@ QEMU_ROOT := $(shell if [ -d "$(CONFIG_Q + + ifeq ($(QEMU_ROOT),.) + $(XEN_ROOT)/tools/qemu-xen-traditional-dir: +- $(CROSS_MAKE) -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find ++ $(MAKE) DESTDIR= -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find + + ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir + mkdir -p ioemu +@@ -250,7 +248,7 @@ mk-headers-$(XEN_TARGET_ARCH): ioemu/lin + ( [ -h include/xen/libelf ] || ln -sf $(XEN_ROOT)/tools/include/xen/libelf include/xen/libelf ) && \ + mkdir -p include/xen-foreign && \ + ln -sf $(wildcard $(XEN_ROOT)/tools/include/xen-foreign/*) include/xen-foreign/ && \ +- $(CROSS_MAKE) -C include/xen-foreign/ && \ ++ $(MAKE) DESTDIR= -C include/xen-foreign/ && \ + ( [ -h include/xen/foreign ] || ln -sf ../xen-foreign include/xen/foreign ) + mkdir -p libxc-$(XEN_TARGET_ARCH) + [ -h libxc-$(XEN_TARGET_ARCH)/Makefile ] || ( cd libxc-$(XEN_TARGET_ARCH) && \ +@@ -267,7 +265,7 @@ mk-headers-$(XEN_TARGET_ARCH): ioemu/lin + ln -sf $(XEN_ROOT)/tools/xenstore/*.c . && \ + ln -sf $(XEN_ROOT)/tools/xenstore/*.h . && \ + ln -sf $(XEN_ROOT)/tools/xenstore/Makefile . ) +- $(CROSS_MAKE) -C $(MINI_OS) links ++ $(MAKE) DESTDIR= -C $(MINI_OS) links + touch mk-headers-$(XEN_TARGET_ARCH) + + TARGETS_MINIOS=$(addprefix mini-os-$(XEN_TARGET_ARCH)-,$(TARGETS)) +@@ -284,7 +282,7 @@ TARGETS_MINIOS=$(addprefix mini-os-$(XEN + .PHONY: libxc + libxc: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libxenguest.a + libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: cross-zlib +- CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C libxc-$(XEN_TARGET_ARCH) ++ CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) + + libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a + +@@ -302,7 +300,7 @@ ioemu: cross-zlib cross-libpci libxc + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ + $(QEMU_ROOT)/xen-setup-stubdom ) +- $(CROSS_MAKE) -C ioemu -f $(QEMU_ROOT)/Makefile ++ $(MAKE) DESTDIR= -C ioemu -f $(QEMU_ROOT)/Makefile + + ###### + # caml +@@ -310,7 +308,7 @@ ioemu: cross-zlib cross-libpci libxc + + .PHONY: caml + caml: $(CROSS_ROOT) +- CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) OCAMLC_CROSS_PREFIX=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/bin/ ++ CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) OCAMLC_CROSS_PREFIX=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/bin/ + + ### + # C +@@ -318,7 +316,7 @@ caml: $(CROSS_ROOT) + + .PHONY: c + c: $(CROSS_ROOT) +- CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) ++ CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) + + ###### + # Grub +@@ -337,7 +335,7 @@ grub-upstream: grub-$(GRUB_VERSION).tar. + .PHONY: grub + grub: grub-upstream $(CROSS_ROOT) + mkdir -p grub-$(XEN_TARGET_ARCH) +- CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C $@ OBJ_DIR=$(CURDIR)/grub-$(XEN_TARGET_ARCH) ++ CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ OBJ_DIR=$(CURDIR)/grub-$(XEN_TARGET_ARCH) + + ########## + # xenstore +@@ -345,7 +343,7 @@ grub: grub-upstream $(CROSS_ROOT) + + .PHONY: xenstore + xenstore: $(CROSS_ROOT) +- CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C $@ xenstored.a CONFIG_STUBDOM=y ++ CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ xenstored.a CONFIG_STUBDOM=y + + ######## + # minios +@@ -354,23 +352,23 @@ xenstore: $(CROSS_ROOT) + .PHONY: ioemu-stubdom + ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-stubdom/qemu.a $(CURDIR)/ioemu/i386-stubdom/libqemu.a $(CURDIR)/ioemu/libqemu_common.a + ioemu-stubdom: mini-os-$(XEN_TARGET_ARCH)-ioemu lwip-$(XEN_TARGET_ARCH) libxc ioemu +- DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/ioemu-minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(APP_OBJS)" ++ DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/ioemu-minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(APP_OBJS)" + + .PHONY: caml-stubdom + caml-stubdom: mini-os-$(XEN_TARGET_ARCH)-caml lwip-$(XEN_TARGET_ARCH) libxc cross-ocaml caml +- DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/caml/minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(CURDIR)/caml/main-caml.o $(CURDIR)/caml/caml.o $(CAMLLIB)/libasmrun.a" ++ DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/caml/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(CURDIR)/caml/main-caml.o $(CURDIR)/caml/caml.o $(CAMLLIB)/libasmrun.a" + + .PHONY: c-stubdom + c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxc c +- DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/c/minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a ++ DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/c/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a + + .PHONY: pv-grub + pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub +- DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/grub/minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a ++ DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/grub/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a + + .PHONY: xenstore-stubdom + xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore +- DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/xenstore-minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/xenstore/xenstored.a ++ DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/xenstore-minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/xenstore/xenstored.a + + ######### + # install +@@ -412,13 +410,13 @@ clean: + rm -fr mini-os-$(XEN_TARGET_ARCH)-caml + rm -fr mini-os-$(XEN_TARGET_ARCH)-grub + rm -fr mini-os-$(XEN_TARGET_ARCH)-xenstore +- $(CROSS_MAKE) -C caml clean +- $(CROSS_MAKE) -C c clean ++ $(MAKE) DESTDIR= -C caml clean ++ $(MAKE) DESTDIR= -C c clean + rm -fr grub-$(XEN_TARGET_ARCH) + rm -f $(STUBDOMPATH) +- [ ! -d libxc-$(XEN_TARGET_ARCH) ] || $(CROSS_MAKE) -C libxc-$(XEN_TARGET_ARCH) clean +- -[ ! -d ioemu ] || $(CROSS_MAKE) -C ioemu clean +- -[ ! -d xenstore ] || $(CROSS_MAKE) -C xenstore clean ++ [ ! -d libxc-$(XEN_TARGET_ARCH) ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean ++ -[ ! -d ioemu ] || $(MAKE) DESTDIR= -C ioemu clean ++ -[ ! -d xenstore ] || $(MAKE) DESTDIR= -C xenstore clean + + # clean the cross-compilation result + .PHONY: crossclean diff --git a/26018-pygrub_correct_typo_in_--args_assignment.patch b/26018-pygrub_correct_typo_in_--args_assignment.patch new file mode 100644 index 0000000..9caa2e8 --- /dev/null +++ b/26018-pygrub_correct_typo_in_--args_assignment.patch @@ -0,0 +1,43 @@ +changeset: 26018:ecc7627ca6d7 +tag: tip +user: Olaf Hering +date: Tue Oct 09 09:18:42 2012 +0100 +files: tools/pygrub/src/pygrub +description: +pygrub: correct typo in --args assignment + +If pygrub was called with --args="some thing", then this string should +be append to the kernel command line. But the last changeset +25941:795c493fe561 contained a typo, it assigns 'args' instead of 'arg'. + +Rename the local variable which holds the string from the domain config +file to avoid further confusion. + +Signed-off-by: Olaf Hering +Acked-by: Ian Campbell +Committed-by: Ian Campbell + + +diff -r c9f621893a05 -r ecc7627ca6d7 tools/pygrub/src/pygrub +--- a/tools/pygrub/src/pygrub Mon Oct 08 14:36:31 2012 +0100 ++++ b/tools/pygrub/src/pygrub Tue Oct 09 09:18:42 2012 +0100 +@@ -585,7 +585,7 @@ def get_entry_idx(cf, entry): + + return None + +-def run_grub(file, entry, fs, arg): ++def run_grub(file, entry, fs, cfg_args): + global g + global sel + +@@ -622,8 +622,8 @@ def run_grub(file, entry, fs, arg): + grubcfg["ramdisk"] = img.initrd[1] + if img.args: + grubcfg["args"] += img.args +- if arg: +- grubcfg["args"] += " " + args ++ if cfg_args: ++ grubcfg["args"] += " " + cfg_args + + return grubcfg + diff --git a/blktap-pv-cdrom.patch b/blktap-pv-cdrom.patch index 1311a7a..0d5f410 100644 --- a/blktap-pv-cdrom.patch +++ b/blktap-pv-cdrom.patch @@ -1,8 +1,43 @@ +--- + tools/blktap/drivers/Makefile | 6 + tools/blktap/drivers/block-cdrom.c | 565 +++++++++++++++++++++++ + tools/blktap/drivers/tapdisk.c | 16 + tools/blktap/drivers/tapdisk.h | 16 + tools/blktap/lib/blktaplib.h | 1 + tools/python/xen/xend/server/BlktapController.py | 1 + xen/include/public/io/blkif.h | 2 + xen/include/public/io/cdromif.h | 122 ++++ + 8 files changed, 726 insertions(+), 3 deletions(-) + +Index: xen-4.2.0-testing/tools/blktap/drivers/Makefile +=================================================================== +--- xen-4.2.0-testing.orig/tools/blktap/drivers/Makefile ++++ xen-4.2.0-testing/tools/blktap/drivers/Makefile +@@ -38,8 +38,9 @@ endif + CFLAGS += $(PTHREAD_CFLAGS) + LDFLAGS += $(PTHREAD_LDFLAGS) + +-LDLIBS_blktapctrl := $(MEMSHRLIBS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) -L../lib -lblktap -lrt -lm $(PTHREAD_LIBS) +-LDLIBS_img := $(AIOLIBS) $(CRYPT_LIB) $(PTHREAD_LIBS) -lz ++LDLIBS_xen := $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) ++LDLIBS_blktapctrl := $(MEMSHRLIBS) $(LDLIBS_xen) -L../lib -lblktap -lrt -lm $(PTHREAD_LIBS) ++LDLIBS_img := $(AIOLIBS) $(CRYPT_LIB) $(PTHREAD_LIBS) -lz $(LDLIBS_xen) + + BLK-OBJS-y := block-aio.o + BLK-OBJS-y += block-sync.o +@@ -47,6 +48,7 @@ BLK-OBJS-y += block-vmdk.o + BLK-OBJS-y += block-ram.o + BLK-OBJS-y += block-qcow.o + BLK-OBJS-y += block-qcow2.o ++BLK-OBJS-y += block-cdrom.o + BLK-OBJS-y += aes.o + BLK-OBJS-y += tapaio.o + BLK-OBJS-$(CONFIG_Linux) += blk_linux.o Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c =================================================================== --- /dev/null +++ xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c -@@ -0,0 +1,535 @@ +@@ -0,0 +1,565 @@ +/* block-cdrom.c + * + * simple slow synchronous cdrom disk implementation. Based off @@ -45,7 +80,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c +#include +#include +#include -+#include ++#include + +#include "tapdisk.h" +#include @@ -75,7 +110,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + struct statvfs statBuf; + struct stat stat; + struct td_state *s = dd->td_state; -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ struct tdcdrom_state *prv = dd->private; + + s->size = 0; + s->sector_size = CDROM_DEFAULT_SECTOR_SIZE; @@ -138,7 +173,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c +static inline void init_fds(struct disk_driver *dd) +{ + int i; -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ struct tdcdrom_state *prv = dd->private; + + for(i = 0; i < MAX_IOFD; i++) + dd->io_fd[i] = 0; @@ -150,7 +185,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + +void open_device (struct disk_driver *dd) +{ -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ struct tdcdrom_state *prv = dd->private; + int o_flags; + + o_flags = O_NONBLOCK | O_LARGEFILE | @@ -189,10 +224,14 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + */ +int tdcdrom_open (struct disk_driver *dd, const char *name, td_flag_t flags) +{ -+ int ret = 0; -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ int ret; ++ struct tdcdrom_state *prv = dd->private; + -+ asprintf(&prv->dev_name, "%s", name); ++ ret = asprintf(&prv->dev_name, "%s", name); ++ if (ret < 0) { ++ prv->dev_name = NULL; ++ goto out; ++ } + prv->fd = -1; + prv->media_changed = 0; + prv->media_present = 0; @@ -201,6 +240,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + + open_device(dd); + ++out: + return ret; +} + @@ -209,7 +249,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + int id, void *private) +{ + struct td_state *s = dd->td_state; -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ struct tdcdrom_state *prv = dd->private; + int size = nb_sectors * s->sector_size; + uint64_t offset = sector * (uint64_t)s->sector_size; + int ret; @@ -238,7 +278,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + int id, void *private) +{ + struct td_state *s = dd->td_state; -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ struct tdcdrom_state *prv = dd->private; + int size = nb_sectors * s->sector_size; + uint64_t offset = sector * (uint64_t)s->sector_size; + int ret = 0; @@ -265,7 +305,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + int id, void *private) +{ + struct td_state *s = dd->td_state; -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ struct tdcdrom_state *prv = dd->private; + int size = nb_sectors * s->sector_size; + uint64_t offset = sector * (uint64_t)s->sector_size; + int ret = 0; @@ -368,12 +408,10 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + break; + case XEN_TYPE_CDROM_OPEN: + { -+ char *buf = NULL; + unsigned int len; + struct stat statbuf; + int major = 0; + int minor = 0; -+ char *num; + + if (stat (prv->dev_name, &statbuf) == 0) { + major = major (statbuf.st_rdev); @@ -383,21 +421,43 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + xco->err = 0; + xco->ret = 0; + if (xco->payload_offset) { -+ char * nodename; ++ char *present; ++ char *buf; ++ char *num; ++ char *nodename; + char media_present[2]; + nodename = (char *)sp + xco->payload_offset; -+ asprintf(&buf, "%s/media-present", nodename); -+ if (!xs_read(prv->xs_handle, XBT_NULL, buf, &len)) { -+ sprintf(media_present, "%d", prv->media_present); -+ xs_write(prv->xs_handle, XBT_NULL, buf, media_present, strlen(media_present)); -+ xs_watch(prv->xs_handle, buf, "media-present"); -+ asprintf(&buf, "%s/params", nodename); -+ xs_watch(prv->xs_handle, buf, "params"); -+ asprintf(&num, "%x:%x", major, minor); -+ asprintf(&buf, "%s/physical-device", nodename); -+ xs_write(prv->xs_handle, XBT_NULL, buf, num, strlen(num)); ++ if (asprintf(&buf, "%s/media-present", nodename) < 0) ++ goto out_payload_offset; ++ present = xs_read(prv->xs_handle, XBT_NULL, buf, &len); ++ if (present) { ++ free(buf); ++ goto out_payload_offset_free; + } ++ ++ sprintf(media_present, "%d", prv->media_present); ++ xs_write(prv->xs_handle, XBT_NULL, buf, media_present, strlen(media_present)); ++ xs_watch(prv->xs_handle, buf, "media-present"); + free(buf); ++ ++ if (asprintf(&buf, "%s/params", nodename) < 0) ++ goto out_payload_offset_free; ++ xs_watch(prv->xs_handle, buf, "params"); ++ free(buf); ++ ++ if (asprintf(&num, "%x:%x", major, minor) < 0) ++ goto out_payload_offset_free; ++ if (asprintf(&buf, "%s/physical-device", nodename) < 0) { ++ free(num); ++ goto out_payload_offset_free; ++ } ++ xs_write(prv->xs_handle, XBT_NULL, buf, num, strlen(num)); ++ free(buf); ++ free(num); ++out_payload_offset_free: ++ free(present); ++out_payload_offset: ++ ; + } + + xco->media_present = prv->media_present; @@ -434,7 +494,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + +int tdcdrom_close(struct disk_driver *dd) +{ -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ struct tdcdrom_state *prv = dd->private; + + if (prv->fd != -1) { + close(prv->fd); @@ -449,8 +509,8 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + +void tdcdrom_process_media_change_event(struct disk_driver *dd, char **vec) +{ -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; -+ char *media_present = NULL; ++ struct tdcdrom_state *prv = dd->private; ++ char *media_present; + unsigned int len; + + media_present = xs_read(prv->xs_handle, XBT_NULL, vec[XS_WATCH_PATH], &len); @@ -463,22 +523,26 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + open_device(dd); + prv->media_changed = 1; + } ++ free(media_present); +} + +void tdcrom_process_params_event(struct disk_driver *dd, char **vec) +{ -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; -+ char * params = NULL; ++ struct tdcdrom_state *prv = dd->private; ++ char *params; + unsigned int len; + + params = xs_read(prv->xs_handle, XBT_NULL, vec[XS_WATCH_PATH], &len); -+ if (params != NULL) { ++ if (params) { + char *cp = strchr(params, ':'); + if (cp) { + cp++; + if (prv->dev_name) + free(prv->dev_name); -+ asprintf(&prv->dev_name, "%s", cp); ++ if (asprintf(&prv->dev_name, "%s", cp) < 0) { ++ prv->dev_name = NULL; ++ return; ++ } + if (prv->fd != -1) { + close(prv->fd); + prv->fd = -1; @@ -486,12 +550,13 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c + open_device(dd); + prv->media_changed = 1; + } ++ free(params); + } +} + +int tdcdrom_do_callbacks(struct disk_driver *dd, int sid) +{ -+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private; ++ struct tdcdrom_state *prv = dd->private; + char **vec; + unsigned int num; + @@ -538,6 +603,118 @@ Index: xen-4.2.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.2.0-testing/tools/blktap/drivers/tapdisk.c +=================================================================== +--- xen-4.2.0-testing.orig/tools/blktap/drivers/tapdisk.c ++++ xen-4.2.0-testing/tools/blktap/drivers/tapdisk.c +@@ -735,6 +735,22 @@ static void get_io_request(struct td_sta + goto out; + } + break; ++ case BLKIF_OP_PACKET: ++ ret = 0; ++ if (drv->td_queue_packet) ++ ret = drv->td_queue_packet(dd, sector_nr, ++ nsects, page, ++ send_responses, ++ idx, (void *)(long)i); ++ if (ret > 0) dd->early += ret; ++ else if (ret == -EBUSY) { ++ /* put req back on queue */ ++ --info->fe_ring.req_cons; ++ info->busy.req = req; ++ info->busy.seg_idx = i; ++ goto out; ++ } ++ break; + default: + DPRINTF("Unknown block operation\n"); + break; +Index: xen-4.2.0-testing/tools/blktap/drivers/tapdisk.h +=================================================================== +--- xen-4.2.0-testing.orig/tools/blktap/drivers/tapdisk.h ++++ xen-4.2.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, + struct disk_driver *p, td_flag_t flags); ++ int (*td_queue_packet) (struct disk_driver *dd, uint64_t sector, ++ int nb_sectors, char *buf, td_callback_t cb, ++ int id, void *prv); + }; + + typedef struct disk_info { +@@ -160,6 +163,7 @@ extern struct tap_disk tapdisk_vmdk; + extern struct tap_disk tapdisk_ram; + extern struct tap_disk tapdisk_qcow; + extern struct tap_disk tapdisk_qcow2; ++extern struct tap_disk tapdisk_cdrom; + + + /*Define Individual Disk Parameters here */ +@@ -229,6 +233,17 @@ static disk_info_t qcow2_disk = { + #endif + }; + ++static disk_info_t cdrom_disk = { ++ DISK_TYPE_CDROM, ++ "raw image (cdrom)", ++ "cdrom", ++ 0, ++ 0, ++#ifdef TAPDISK ++ &tapdisk_cdrom, ++#endif ++}; ++ + /*Main disk info array */ + static disk_info_t *dtypes[] = { + &aio_disk, +@@ -237,6 +252,7 @@ static disk_info_t *dtypes[] = { + &ram_disk, + &qcow_disk, + &qcow2_disk, ++ &cdrom_disk, + }; + + typedef struct driver_list_entry { +Index: xen-4.2.0-testing/tools/blktap/lib/blktaplib.h +=================================================================== +--- xen-4.2.0-testing.orig/tools/blktap/lib/blktaplib.h ++++ xen-4.2.0-testing/tools/blktap/lib/blktaplib.h +@@ -219,6 +219,7 @@ typedef struct msg_pid { + #define DISK_TYPE_RAM 3 + #define DISK_TYPE_QCOW 4 + #define DISK_TYPE_QCOW2 5 ++#define DISK_TYPE_CDROM 6 + + /* xenstore/xenbus: */ + #define DOMNAME "Domain-0" +Index: xen-4.2.0-testing/tools/python/xen/xend/server/BlktapController.py +=================================================================== +--- xen-4.2.0-testing.orig/tools/python/xen/xend/server/BlktapController.py ++++ xen-4.2.0-testing/tools/python/xen/xend/server/BlktapController.py +@@ -15,6 +15,7 @@ blktap1_disk_types = [ + 'ram', + 'qcow', + 'qcow2', ++ 'cdrom', + 'ioemu', + ] + +Index: xen-4.2.0-testing/xen/include/public/io/blkif.h +=================================================================== +--- xen-4.2.0-testing.orig/xen/include/public/io/blkif.h ++++ xen-4.2.0-testing/xen/include/public/io/blkif.h +@@ -379,7 +379,7 @@ + * Used in SLES sources for device specific command packet + * contained within the request. Reserved for that purpose. + */ +-#define BLKIF_OP_RESERVED_1 4 ++#define BLKIF_OP_PACKET 4 + /* + * Indicate to the backend device that a region of storage is no longer in + * use, and may be discarded at any time without impact to the client. If Index: xen-4.2.0-testing/xen/include/public/io/cdromif.h =================================================================== --- /dev/null @@ -665,139 +842,3 @@ Index: xen-4.2.0-testing/xen/include/public/io/cdromif.h + sizeof(struct vcd_generic_command) - sizeof(struct request_sense)) + +#endif -Index: xen-4.2.0-testing/tools/blktap/drivers/Makefile -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap/drivers/Makefile -+++ xen-4.2.0-testing/tools/blktap/drivers/Makefile -@@ -37,8 +37,9 @@ endif - CFLAGS += $(PTHREAD_CFLAGS) - LDFLAGS += $(PTHREAD_LDFLAGS) - --LDLIBS_blktapctrl := $(MEMSHRLIBS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) -L../lib -lblktap -lrt -lm $(PTHREAD_LIBS) --LDLIBS_img := $(AIOLIBS) $(CRYPT_LIB) $(PTHREAD_LIBS) -lz -+LDLIBS_xen := $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) -+LDLIBS_blktapctrl := $(MEMSHRLIBS) $(LDLIBS_xen) -L../lib -lblktap -lrt -lm $(PTHREAD_LIBS) -+LDLIBS_img := $(AIOLIBS) $(CRYPT_LIB) $(PTHREAD_LIBS) -lz $(LDLIBS_xen) - - BLK-OBJS-y := block-aio.o - BLK-OBJS-y += block-sync.o -@@ -46,6 +47,7 @@ BLK-OBJS-y += block-vmdk.o - BLK-OBJS-y += block-ram.o - BLK-OBJS-y += block-qcow.o - BLK-OBJS-y += block-qcow2.o -+BLK-OBJS-y += block-cdrom.o - BLK-OBJS-y += aes.o - BLK-OBJS-y += tapaio.o - BLK-OBJS-$(CONFIG_Linux) += blk_linux.o -Index: xen-4.2.0-testing/tools/blktap/drivers/tapdisk.h -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap/drivers/tapdisk.h -+++ xen-4.2.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, - struct disk_driver *p, td_flag_t flags); -+ int (*td_queue_packet) (struct disk_driver *dd, uint64_t sector, -+ int nb_sectors, char *buf, td_callback_t cb, -+ int id, void *prv); - }; - - typedef struct disk_info { -@@ -160,6 +163,7 @@ extern struct tap_disk tapdisk_vmdk; - extern struct tap_disk tapdisk_ram; - extern struct tap_disk tapdisk_qcow; - extern struct tap_disk tapdisk_qcow2; -+extern struct tap_disk tapdisk_cdrom; - - - /*Define Individual Disk Parameters here */ -@@ -229,6 +233,17 @@ static disk_info_t qcow2_disk = { - #endif - }; - -+static disk_info_t cdrom_disk = { -+ DISK_TYPE_CDROM, -+ "raw image (cdrom)", -+ "cdrom", -+ 0, -+ 0, -+#ifdef TAPDISK -+ &tapdisk_cdrom, -+#endif -+}; -+ - /*Main disk info array */ - static disk_info_t *dtypes[] = { - &aio_disk, -@@ -237,6 +252,7 @@ static disk_info_t *dtypes[] = { - &ram_disk, - &qcow_disk, - &qcow2_disk, -+ &cdrom_disk, - }; - - typedef struct driver_list_entry { -Index: xen-4.2.0-testing/tools/blktap/lib/blktaplib.h -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap/lib/blktaplib.h -+++ xen-4.2.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 - #define DISK_TYPE_QCOW2 5 -+#define DISK_TYPE_CDROM 6 - - /* xenstore/xenbus: */ - #define DOMNAME "Domain-0" -Index: xen-4.2.0-testing/xen/include/public/io/blkif.h -=================================================================== ---- xen-4.2.0-testing.orig/xen/include/public/io/blkif.h -+++ xen-4.2.0-testing/xen/include/public/io/blkif.h -@@ -379,7 +379,7 @@ - * Used in SLES sources for device specific command packet - * contained within the request. Reserved for that purpose. - */ --#define BLKIF_OP_RESERVED_1 4 -+#define BLKIF_OP_PACKET 4 - /* - * Indicate to the backend device that a region of storage is no longer in - * use, and may be discarded at any time without impact to the client. If -Index: xen-4.2.0-testing/tools/blktap/drivers/tapdisk.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap/drivers/tapdisk.c -+++ xen-4.2.0-testing/tools/blktap/drivers/tapdisk.c -@@ -735,6 +735,22 @@ static void get_io_request(struct td_sta - goto out; - } - break; -+ case BLKIF_OP_PACKET: -+ ret = 0; -+ if (drv->td_queue_packet) -+ ret = drv->td_queue_packet(dd, sector_nr, -+ nsects, page, -+ send_responses, -+ idx, (void *)(long)i); -+ if (ret > 0) dd->early += ret; -+ else if (ret == -EBUSY) { -+ /* put req back on queue */ -+ --info->fe_ring.req_cons; -+ info->busy.req = req; -+ info->busy.seg_idx = i; -+ goto out; -+ } -+ break; - default: - DPRINTF("Unknown block operation\n"); - break; -Index: xen-4.2.0-testing/tools/python/xen/xend/server/BlktapController.py -=================================================================== ---- xen-4.2.0-testing.orig/tools/python/xen/xend/server/BlktapController.py -+++ xen-4.2.0-testing/tools/python/xen/xend/server/BlktapController.py -@@ -15,6 +15,7 @@ blktap1_disk_types = [ - 'ram', - 'qcow', - 'qcow2', -+ 'cdrom', - 'ioemu', - ] - diff --git a/init.xendomains b/init.xendomains index 0b1abc5..b1bd776 100644 --- a/init.xendomains +++ b/init.xendomains @@ -7,10 +7,10 @@ # ### BEGIN INIT INFO # Provides: xendomains -# Required-Start: $syslog $remote_fs xend -# Should-Start: iscsi o2cb ocfs2 -# Required-Stop: $syslog $remote_fs xend -# Should-Stop: iscsi +# Required-Start: $syslog $remote_fs xenstored xenconsoled +# Should-Start: xend iscsi o2cb ocfs2 +# Required-Stop: $syslog $remote_fs xenstored xenconsoled +# Should-Stop: xend iscsi # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Starts and stops Xen VMs @@ -21,11 +21,26 @@ . /etc/rc.status rc_reset -LOCKFILE=/var/lock/subsys/xendomains -XENDOM_CONFIG=/etc/sysconfig/xendomains RETCODE_FILE=/tmp/xendomains.rc.$$ xm_cmd=echo +# See docs/misc/distro_mapping.txt +if [ -d /var/lock/subsys ]; then + LOCKFILE=/var/lock/subsys/xendomains +else + LOCKFILE=/var/lock/xendomains +fi + +if [ -d /etc/sysconfig ]; then + XENDOM_CONFIG=/etc/sysconfig/xendomains +else + XENDOM_CONFIG=/etc/default/xendomains +fi + +test -r $XENDOM_CONFIG || { echo "$XENDOM_CONFIG not existing"; + if [ "$1" = "stop" ]; then exit 0; + else exit 6; fi; } + . "$XENDOM_CONFIG" shopt -s dotglob nullglob @@ -56,16 +71,17 @@ xendomains_abort() check() { - XEND=`pidof -x /usr/sbin/xend` + XEND=`pidof -x /usr/sbin/xend` if [ -z "$XEND" ]; then xm_cmd="xl -f" + XEND="xl" else xm_cmd="xm" fi if [ "$1" = status ]; then if [ ! -e /proc/xen/capabilities ] || [ ! -r "$XENDOM_CONFIG" ] || [ -z "$XEND" ]; then xendomains_abort 3 - fi + fi else if [ `id -u` != 0 ]; then xendomains_abort 4 diff --git a/network-nat.patch b/network-nat.patch deleted file mode 100644 index 9565e95..0000000 --- a/network-nat.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: xen-4.2.0-testing/tools/hotplug/Linux/network-nat -=================================================================== ---- xen-4.2.0-testing.orig/tools/hotplug/Linux/network-nat -+++ xen-4.2.0-testing/tools/hotplug/Linux/network-nat -@@ -1,4 +1,4 @@ --#!/bin/bash -x -+#!/bin/bash - #============================================================================ - # Default Xen network start/stop script when using NAT. - # Xend calls a network script when it starts. diff --git a/tmp-initscript-modprobe.patch b/tmp-initscript-modprobe.patch index e44b969..96744f0 100644 --- a/tmp-initscript-modprobe.patch +++ b/tmp-initscript-modprobe.patch @@ -2,7 +2,7 @@ Index: xen-4.2.0-testing/tools/hotplug/Linux/init.d/xencommons =================================================================== --- xen-4.2.0-testing.orig/tools/hotplug/Linux/init.d/xencommons +++ xen-4.2.0-testing/tools/hotplug/Linux/init.d/xencommons -@@ -60,21 +60,26 @@ do_start () { +@@ -54,21 +54,26 @@ do_start () { local time=0 local timeout=30 diff --git a/x86-dom-print.patch b/x86-dom-print.patch index d25fbb0..23bfd31 100644 --- a/x86-dom-print.patch +++ b/x86-dom-print.patch @@ -1,6 +1,6 @@ --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c -@@ -148,15 +148,30 @@ void dump_pageframe_info(struct domain * +@@ -154,15 +154,30 @@ void dump_pageframe_info(struct domain * printk("Memory pages belonging to domain %u:\n", d->domain_id); diff --git a/xen-destdir.diff b/xen-destdir.diff index 0bf62ab..f367dac 100644 --- a/xen-destdir.diff +++ b/xen-destdir.diff @@ -1,35 +1,3 @@ -Index: xen-4.2.0-testing/tools/pygrub/Makefile -=================================================================== ---- xen-4.2.0-testing.orig/tools/pygrub/Makefile -+++ xen-4.2.0-testing/tools/pygrub/Makefile -@@ -11,12 +11,12 @@ build: - .PHONY: install - install: all - CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \ -- $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ -+ --prefix="/usr" --root="$(DESTDIR)" \ - --install-scripts=$(PRIVATE_BINDIR) --force - $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot - set -e; if [ "`readlink -f $(DESTDIR)/$(BINDIR)`" != \ - "`readlink -f $(PRIVATE_BINDIR)`" ]; then \ -- ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \ -+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(BINDIR)/pygrub; \ - fi - - .PHONY: clean -Index: xen-4.2.0-testing/tools/python/Makefile -=================================================================== ---- xen-4.2.0-testing.orig/tools/python/Makefile -+++ xen-4.2.0-testing/tools/python/Makefile -@@ -21,7 +21,7 @@ build: genpath genwrap.py $(XEN_ROOT)/to - .PHONY: install - install: install-dtd - CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \ -- $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force -+ --prefix="/usr" --root="$(DESTDIR)" --force - - install-dtd: all - $(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/xen Index: xen-4.2.0-testing/tools/xenstore/Makefile =================================================================== --- xen-4.2.0-testing.orig/tools/xenstore/Makefile @@ -157,16 +125,64 @@ Index: xen-4.2.0-testing/tools/firmware/etherboot/Makefile mv _$T $T $D/src/arch/i386/Makefile: $T Config -Index: xen-4.2.0-testing/tools/Makefile +Index: xen-4.2.0-testing/stubdom/Makefile =================================================================== ---- xen-4.2.0-testing.orig/tools/Makefile -+++ xen-4.2.0-testing/tools/Makefile -@@ -187,7 +187,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-fi - source=.; \ - fi; \ - cd qemu-xen-dir; \ -- $$source/configure --enable-xen --target-list=i386-softmmu \ -+ CFLAGS= $$source/configure --enable-xen --target-list=i386-softmmu \ - --source-path=$$source \ - --extra-cflags="-I$(XEN_ROOT)/tools/include \ - -I$(XEN_ROOT)/tools/libxc \ +--- xen-4.2.0-testing.orig/stubdom/Makefile ++++ xen-4.2.0-testing/stubdom/Makefile +@@ -396,7 +396,7 @@ install-grub: pv-grub + + install-xenstore: xenstore-stubdom + $(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/boot" +- $(INSTALL_PROG) mini-os-$(XEN_TARGET_ARCH)-xenstore/mini-os.gz "$(DESTDIR)/usr/lib/xen/boot/xenstore-stubdom.gz" ++ $(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-xenstore/mini-os.gz "$(DESTDIR)/usr/lib/xen/boot/xenstore-stubdom.gz" + + ####### + # clean +Index: xen-4.2.0-testing/tools/blktap2/vhd/lib/Makefile +=================================================================== +--- xen-4.2.0-testing.orig/tools/blktap2/vhd/lib/Makefile ++++ xen-4.2.0-testing/tools/blktap2/vhd/lib/Makefile +@@ -68,7 +68,7 @@ libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR + + install: all + $(INSTALL_DIR) -p $(DESTDIR)$(INST-DIR) +- $(INSTALL_PROG) libvhd.a $(DESTDIR)$(INST-DIR) ++ $(INSTALL_DATA) libvhd.a $(DESTDIR)$(INST-DIR) + $(INSTALL_PROG) libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR) + ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR) + ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so +Index: xen-4.2.0-testing/tools/blktap/lib/Makefile +=================================================================== +--- xen-4.2.0-testing.orig/tools/blktap/lib/Makefile ++++ xen-4.2.0-testing/tools/blktap/lib/Makefile +@@ -23,23 +23,26 @@ OBJS = $(SRCS:.c=.o) + OBJS_PIC = $(SRCS:.c=.opic) + IBINS := + +-LIB = libblktap.a libblktap.so.$(MAJOR).$(MINOR) ++LIB = libblktap.a ++LIB_SO = libblktap.so.$(MAJOR).$(MINOR) ++LIB_ALL = $(LIB) $(LIB_SO) + + .PHONY: all +-all: $(LIB) ++all: $(LIB_ALL) + + .PHONY: install + install: all + $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) + $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) +- $(INSTALL_PROG) $(LIB) $(DESTDIR)$(LIBDIR) ++ $(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIBDIR) ++ $(INSTALL_PROG) $(LIB_SO) $(DESTDIR)$(LIBDIR) + ln -sf libblktap.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libblktap.so.$(MAJOR) + ln -sf libblktap.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libblktap.so + $(INSTALL_DATA) blktaplib.h $(DESTDIR)$(INCLUDEDIR) + + .PHONY: clean + clean: +- rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen TAGS ++ rm -rf *.a *.so* *.o *.opic *.rpm $(LIB_ALL) *~ $(DEPS) xen TAGS + + libblktap.so.$(MAJOR).$(MINOR): $(OBJS_PIC) + $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,$(SONAME) $(SHLIB_LDFLAGS) \ diff --git a/xen-rpmoptflags.diff b/xen-rpmoptflags.diff deleted file mode 100644 index 666d3ee..0000000 --- a/xen-rpmoptflags.diff +++ /dev/null @@ -1,25 +0,0 @@ -Index: xen-4.2.0-testing/tools/blktap/drivers/Makefile -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap/drivers/Makefile -+++ xen-4.2.0-testing/tools/blktap/drivers/Makefile -@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk - IBIN = blktapctrl tapdisk - QCOW_UTIL = img2qcow qcow2raw qcow-create - --CFLAGS += -Werror - CFLAGS += -Wno-unused - CFLAGS += -I../lib - CFLAGS += $(CFLAGS_libxenctrl) -Index: xen-4.2.0-testing/Config.mk -=================================================================== ---- xen-4.2.0-testing.orig/Config.mk -+++ xen-4.2.0-testing/Config.mk -@@ -24,7 +24,7 @@ SHELL ?= /bin/sh - - # Tools to run on system hosting the build - HOSTCC = gcc --HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -+HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes $(RPM_OPT_FLAGS) - HOSTCFLAGS += -fno-strict-aliasing - - DISTDIR ?= $(XEN_ROOT)/dist diff --git a/xen-warnings-unused.diff b/xen-warnings-unused.diff deleted file mode 100644 index 6b2dd51..0000000 --- a/xen-warnings-unused.diff +++ /dev/null @@ -1,342 +0,0 @@ ---- a/tools/misc/gtraceview.c -+++ b/tools/misc/gtraceview.c -@@ -621,7 +621,8 @@ void crt_init(void) - void nr_addch(int nr, int ch) - { - int i; -- int y, x; -+ int x; -+ int __attribute__((__unused__)) y; - getyx(stdscr, y, x); - for (i = 0; i < nr; i++) { - if (x == COLS-1) ---- a/tools/xcutils/xc_restore.c -+++ b/tools/xcutils/xc_restore.c -@@ -19,7 +19,8 @@ int - main(int argc, char **argv) - { - unsigned int domid, store_evtchn, console_evtchn; -- unsigned int hvm, pae, apic; -+ unsigned int hvm, pae; -+ unsigned int __attribute__((__unused__)) apic; - xc_interface *xch; - int io_fd, ret; - int superpages; ---- a/tools/firmware/rombios/32bit/tcgbios/tcgbios.c -+++ b/tools/firmware/rombios/32bit/tcgbios/tcgbios.c -@@ -1064,7 +1064,7 @@ uint32_t HashLogEvent32(struct hlei *hle - uint32_t rc = 0; - uint16_t size; - uint32_t logdataptr; -- uint32_t logdatalen; -+ uint32_t __attribute__((__unused__)) logdatalen; - uint32_t hashdataptr; - uint32_t hashdatalen; - ---- a/tools/console/client/main.c -+++ b/tools/console/client/main.c -@@ -277,7 +277,8 @@ int main(int argc, char **argv) - - }; - char *dom_path = NULL, *path = NULL; -- int spty, xsfd; -+ int spty; -+ int __attribute__((__unused__)) xsfd; - struct xs_handle *xs; - char *end; - console_type type = CONSOLE_INVAL; ---- a/tools/xenstat/xentop/xentop.c -+++ b/tools/xenstat/xentop/xentop.c -@@ -278,7 +278,8 @@ static void fail(const char *str) - /* Return the row containing the cursor. */ - static int current_row(void) - { -- int y, x; -+ int __attribute__((__unused__)) x; -+ int y; - getyx(stdscr, y, x); - return y; - } -@@ -286,7 +287,8 @@ static int current_row(void) - /* Return the number of lines on the screen. */ - static int lines(void) - { -- int y, x; -+ int __attribute__((__unused__)) x; -+ int y; - getmaxyx(stdscr, y, x); - return y; - } ---- a/tools/libxl/libxlu_cfg.c -+++ b/tools/libxl/libxlu_cfg.c -@@ -406,7 +406,7 @@ char *xlu__cfgl_dequote(CfgParseContext - - #define NUMERIC_CHAR(minlen,maxlen,base,basetext) do{ \ - char numbuf[(maxlen)+1], *ep; \ -- unsigned long val; \ -+ unsigned long __attribute__((__unused__)) val; \ - \ - strncpy(numbuf,p,(maxlen)); \ - numbuf[(maxlen)]= 0; \ ---- a/tools/libxl/libxl_pci.c -+++ b/tools/libxl/libxl_pci.c -@@ -71,7 +71,7 @@ int libxl__create_pci_backend(libxl__gc - flexarray_t *front = NULL; - flexarray_t *back = NULL; - libxl__device device; -- int ret = ERROR_NOMEM, i; -+ int i; - - front = flexarray_make(16, 1); - if (!front) -@@ -80,8 +80,6 @@ int libxl__create_pci_backend(libxl__gc - if (!back) - goto out; - -- ret = 0; -- - LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Creating pci backend"); - - /* add pci device */ ---- a/tools/libxl/libxl_dom.c -+++ b/tools/libxl/libxl_dom.c -@@ -565,7 +565,6 @@ int libxl__build_hvm(libxl__gc *gc, uint - LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, ret, "hvm build set params failed"); - goto out; - } -- rc = 0; - out: - return rc; - } ---- a/tools/debugger/gdbsx/gx/gx_comm.c -+++ b/tools/debugger/gdbsx/gx/gx_comm.c -@@ -163,7 +163,7 @@ readchar(void) - static char buf[BUFSIZ]; - static int bufcnt = 0; - static char *bufp; -- uint64_t ll; -+ uint64_t __attribute__((__unused__)) ll; - - if (bufcnt-- > 0) - return *bufp++ & 0x7f; ---- a/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c -+++ b/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c -@@ -836,7 +836,7 @@ static int create_suspend_thread(checkpo - - static void stop_suspend_thread(checkpoint_state* s) - { -- int err; -+ int __attribute__((__unused__)) err; - - s->done = 1; - ---- a/tools/python/xen/lowlevel/netlink/libnetlink.c -+++ b/tools/python/xen/lowlevel/netlink/libnetlink.c -@@ -433,7 +433,8 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt - nladdr.nl_groups = 0; - - while (1) { -- int err, len, type; -+ int err, len; -+ int __attribute__((__unused__)) type; - int l; - - status = fread(&buf, 1, sizeof(*h), rtnl); ---- a/xen/common/cpupool.c -+++ b/xen/common/cpupool.c -@@ -371,7 +371,7 @@ int cpupool_add_domain(struct domain *d, - { - struct cpupool *c; - int rc; -- int n_dom = 0; -+ int __attribute__((__unused__)) n_dom = 0; - - if ( poolid == CPUPOOLID_NONE ) - return 0; -@@ -399,8 +399,8 @@ int cpupool_add_domain(struct domain *d, - */ - void cpupool_rm_domain(struct domain *d) - { -- int cpupool_id; -- int n_dom; -+ int __attribute__((__unused__)) cpupool_id; -+ int __attribute__((__unused__)) n_dom; - - if ( d->cpupool == NULL ) - return; ---- a/xen/common/kexec.c -+++ b/xen/common/kexec.c -@@ -817,7 +817,8 @@ static int kexec_exec(XEN_GUEST_HANDLE(v - { - xen_kexec_exec_t exec; - xen_kexec_image_t *image; -- int base, bit, pos, ret = -EINVAL; -+ int base, bit, pos; -+ int __attribute__((__unused__)) ret = -EINVAL; - - if ( unlikely(copy_from_guest(&exec, uarg, 1)) ) - return -EFAULT; ---- a/xen/arch/x86/time.c -+++ b/xen/arch/x86/time.c -@@ -1012,7 +1012,8 @@ static void local_time_calibration(void) - * System timestamps, extrapolated from local and master oscillators, - * taken during this calibration and the previous calibration. - */ -- s_time_t prev_local_stime, curr_local_stime; -+ s_time_t curr_local_stime; -+ s_time_t __attribute__((__unused__)) prev_local_stime; - s_time_t prev_master_stime, curr_master_stime; - - /* TSC timestamps taken during this calibration and prev calibration. */ ---- a/xen/arch/x86/mm/p2m.c -+++ b/xen/arch/x86/mm/p2m.c -@@ -483,7 +483,7 @@ p2m_remove_page(struct p2m_domain *p2m, - unsigned int page_order) - { - unsigned long i; -- mfn_t mfn_return; -+ mfn_t __attribute__((__unused__)) mfn_return; - p2m_type_t t; - p2m_access_t a; - ---- a/xen/arch/x86/cpu/intel_cacheinfo.c -+++ b/xen/arch/x86/cpu/intel_cacheinfo.c -@@ -169,7 +169,8 @@ unsigned int __cpuinit init_intel_cachei - unsigned int trace = 0, l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */ - unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ - unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ -- unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; -+ unsigned int num_threads_sharing, index_msb; -+ unsigned int __attribute__((__unused__)) l2_id = 0, l3_id = 0; - - if (c->cpuid_level > 3) { - static int is_initialized; ---- a/xen/arch/x86/hvm/viridian.c -+++ b/xen/arch/x86/hvm/viridian.c -@@ -317,7 +317,7 @@ int rdmsr_viridian_regs(uint32_t idx, ui - int viridian_hypercall(struct cpu_user_regs *regs) - { - int mode = hvm_guest_x86_mode(current); -- unsigned long input_params_gpa, output_params_gpa; -+ unsigned long __attribute__((__unused__)) input_params_gpa, output_params_gpa; - uint16_t status = HV_STATUS_SUCCESS; - - union hypercall_input { ---- a/xen/arch/x86/mm.c -+++ b/xen/arch/x86/mm.c -@@ -4973,7 +4973,7 @@ static int ptwr_emulated_update( - { - unsigned long mfn; - unsigned long unaligned_addr = addr; -- struct page_info *page; -+ struct page_info __attribute__((__unused__)) *page; - l1_pgentry_t pte, ol1e, nl1e, *pl1e; - struct vcpu *v = current; - struct domain *d = v->domain; ---- a/xen/common/tmem.c -+++ b/xen/common/tmem.c -@@ -1352,7 +1352,8 @@ obj_unlock: - static int tmem_evict(void) - { - client_t *client = tmh_client_from_current(); -- pgp_t *pgp = NULL, *pgp2, *pgp_del; -+ pgp_t *pgp = NULL, *pgp2; -+ pgp_t __attribute__((__unused__)) *pgp_del; - obj_t *obj; - pool_t *pool; - int ret = 0; -@@ -1589,7 +1590,8 @@ static NOINLINE int do_tmem_put(pool_t * - pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_t clibuf) - { - obj_t *obj = NULL, *objfound = NULL, *objnew = NULL; -- pgp_t *pgp = NULL, *pgpdel = NULL; -+ pgp_t *pgp = NULL; -+ pgp_t __attribute__((__unused__)) *pgpdel = NULL; - client_t *client = pool->client; - int ret = client->frozen ? -EFROZEN : -ENOMEM; - ---- a/xen/common/tmem_xen.c -+++ b/xen/common/tmem_xen.c -@@ -196,7 +196,7 @@ EXPORT int tmh_copy_from_client(pfp_t *p - EXPORT int tmh_compress_from_client(tmem_cli_mfn_t cmfn, - void **out_va, size_t *out_len, tmem_cli_va_t clibuf) - { -- int ret = 0; -+ int __attribute__((__unused__)) ret = 0; - unsigned char *dmem = this_cpu(dstmem); - unsigned char *wmem = this_cpu(workmem); - char *scratch = this_cpu(scratch_page); -@@ -272,7 +272,7 @@ EXPORT int tmh_decompress_to_client(tmem - void *cli_va = NULL; - char *scratch = this_cpu(scratch_page); - size_t out_len = PAGE_SIZE; -- int ret; -+ int __attribute__((__unused__)) ret; - - if ( guest_handle_is_null(clibuf) ) - { -@@ -405,15 +405,17 @@ static void tmh_persistent_pool_page_put - EXPORT tmh_client_t *tmh_client_init(cli_id_t cli_id) - { - tmh_client_t *tmh; -+#ifndef __i386__ - char name[5]; - int i, shift; -+#endif - - if ( (tmh = xmalloc(tmh_client_t)) == NULL ) - return NULL; -+#ifndef __i386__ - for (i = 0, shift = 12; i < 4; shift -=4, i++) - name[i] = (((unsigned short)cli_id >> shift) & 0xf) + '0'; - name[4] = '\0'; --#ifndef __i386__ - tmh->persistent_pool = xmem_pool_create(name, tmh_persistent_pool_page_get, - tmh_persistent_pool_page_put, PAGE_SIZE, 0, PAGE_SIZE); - if ( tmh->persistent_pool == NULL ) ---- a/xen/arch/x86/mm/shadow/multi.c -+++ b/xen/arch/x86/mm/shadow/multi.c -@@ -124,7 +124,7 @@ set_shadow_status(struct vcpu *v, mfn_t - /* Put a shadow into the hash table */ - { - struct domain *d = v->domain; -- int res; -+ int __attribute__((__unused__)) res; - - SHADOW_PRINTK("d=%d, v=%d, gmfn=%05lx, type=%08x, smfn=%05lx\n", - d->domain_id, v->vcpu_id, mfn_x(gmfn), -@@ -4438,7 +4438,7 @@ sh_update_cr3(struct vcpu *v, int do_loc - int sh_rm_write_access_from_sl1p(struct vcpu *v, mfn_t gmfn, - mfn_t smfn, unsigned long off) - { -- int r; -+ int __attribute__((__unused__)) r; - shadow_l1e_t *sl1p, sl1e; - struct page_info *sp; - ---- a/xen/arch/x86/domain_build.c -+++ b/xen/arch/x86/domain_build.c -@@ -377,8 +377,7 @@ int __init construct_dom0( - return rc; - - /* compatibility check */ -- compatible = 0; -- compat32 = 0; -+ compatible = compat32 = 0; - machine = elf_uval(&elf, elf.ehdr, e_machine); - switch (CONFIG_PAGING_LEVELS) { - case 3: /* x86_32p */ ---- a/xen/arch/x86/traps.c -+++ b/xen/arch/x86/traps.c -@@ -1910,7 +1910,11 @@ static int emulate_privileged_op(struct - struct vcpu *v = current; - unsigned long *reg, eip = regs->eip; - u8 opcode, modrm_reg = 0, modrm_rm = 0, rep_prefix = 0, lock = 0, rex = 0; -+#ifdef CONFIG_X86_64 - enum { lm_seg_none, lm_seg_fs, lm_seg_gs } lm_ovr = lm_seg_none; -+#else -+ enum { lm_seg_none, lm_seg_fs, lm_seg_gs } __attribute__((__unused__)) lm_ovr = lm_seg_none; -+#endif - int rc; - unsigned int port, i, data_sel, ar, data, bpmatch = 0; - unsigned int op_bytes, op_default, ad_bytes, ad_default, opsize_prefix= 0; diff --git a/xen-warnings.diff b/xen-warnings.diff deleted file mode 100644 index 785cc00..0000000 --- a/xen-warnings.diff +++ /dev/null @@ -1,265 +0,0 @@ -Index: xen-4.2.0-testing/tools/misc/miniterm/miniterm.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/misc/miniterm/miniterm.c -+++ xen-4.2.0-testing/tools/misc/miniterm/miniterm.c -@@ -157,7 +157,7 @@ int main(int argc, char **argv) - case 0: - close(1); /* stdout not needed */ - for ( c = (char)getchar(); c != ENDMINITERM; c = (char)getchar() ) -- write(fd,&c,1); -+ if (write(fd,&c,1)) ; - tcsetattr(fd,TCSANOW,&oldsertio); - tcsetattr(0,TCSANOW,&oldstdtio); - close(fd); -@@ -169,19 +169,19 @@ int main(int argc, char **argv) - close(fd); - exit(-1); - default: -- write(1, start_str, strlen(start_str)); -+ if (write(1, start_str, strlen(start_str))) ; - close(0); /* stdin not needed */ - sa.sa_handler = child_handler; - sa.sa_flags = 0; - sigaction(SIGCHLD,&sa,NULL); /* handle dying child */ - while ( !stop ) - { -- read(fd,&c,1); /* modem */ -+ if (read(fd,&c,1)) ; /* modem */ - c = (char)c; -- write(1,&c,1); /* stdout */ -+ if (write(1,&c,1)) ; /* stdout */ - } - wait(NULL); /* wait for child to die or it will become a zombie */ -- write(1, end_str, strlen(end_str)); -+ if (write(1, end_str, strlen(end_str))) ; - break; - } - -Index: xen-4.2.0-testing/tools/libxc/xc_dom_elfloader.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/libxc/xc_dom_elfloader.c -+++ xen-4.2.0-testing/tools/libxc/xc_dom_elfloader.c -@@ -228,8 +228,9 @@ static int xc_dom_load_elf_symtab(struct - - if ( load ) - { -+ void * dst = (void*)elf_section_start(&syms, shdr); - shdr2 = elf_shdr_by_index(elf, h); -- memcpy((void*)elf_section_start(&syms, shdr), -+ memcpy(dst, - elf_section_start(elf, shdr2), - size); - } -Index: xen-4.2.0-testing/tools/xenstore/Makefile -=================================================================== ---- xen-4.2.0-testing.orig/tools/xenstore/Makefile -+++ xen-4.2.0-testing/tools/xenstore/Makefile -@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk - MAJOR = 3.0 - MINOR = 1 - --CFLAGS += -Werror -+CFLAGS += -Werror -fno-strict-aliasing - CFLAGS += -I. - CFLAGS += $(CFLAGS_libxenctrl) - -Index: xen-4.2.0-testing/tools/xenstore/xenstored_core.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/xenstore/xenstored_core.c -+++ xen-4.2.0-testing/tools/xenstore/xenstored_core.c -@@ -79,8 +79,8 @@ static void check_store(void); - - int quota_nb_entry_per_domain = 1000; - int quota_nb_watch_per_domain = 128; --int quota_max_entry_size = 2048; /* 2K */ --int quota_max_transaction = 10; -+unsigned int quota_max_entry_size = 2048; /* 2K */ -+unsigned int quota_max_transaction = 10; - - TDB_CONTEXT *tdb_context(struct connection *conn) - { -@@ -134,7 +134,7 @@ void trace(const char *fmt, ...) - va_list arglist; - char *str; - char sbuf[1024]; -- int ret, dummy; -+ int ret, __attribute__((__unused__)) dummy; - - if (tracefd < 0) - return; -@@ -204,7 +204,7 @@ void trace_destroy(const void *data, con - static void trigger_reopen_log(int signal __attribute__((unused))) - { - char c = 'A'; -- int dummy; -+ int __attribute__((__unused__)) dummy; - dummy = write(reopen_log_pipe[1], &c, 1); - } - -@@ -1807,10 +1807,10 @@ int main(int argc, char *argv[]) - remove_local = false; - break; - case 'S': -- quota_max_entry_size = strtol(optarg, NULL, 10); -+ quota_max_entry_size = strtoul(optarg, NULL, 10); - break; - case 't': -- quota_max_transaction = strtol(optarg, NULL, 10); -+ quota_max_transaction = strtoul(optarg, NULL, 10); - break; - case 'T': - tracefile = optarg; -Index: xen-4.2.0-testing/tools/xenstore/xenstored_domain.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/xenstore/xenstored_domain.c -+++ xen-4.2.0-testing/tools/xenstore/xenstored_domain.c -@@ -241,7 +241,7 @@ void handle_event(void) - { - evtchn_port_t port; - -- if ((port = xc_evtchn_pending(xce_handle)) == -1) -+ if ((port = xc_evtchn_pending(xce_handle)) == (evtchn_port_t)-1) - barf_perror("Failed to read from event fd"); - - if (port == virq_port) -@@ -603,7 +603,7 @@ static int dom0_init(void) - struct domain *dom0; - - port = xenbus_evtchn(); -- if (port == -1) -+ if (port == (evtchn_port_t)-1) - return -1; - - dom0 = new_domain(NULL, 0, port); -Index: xen-4.2.0-testing/tools/xenstore/xenstored_transaction.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/xenstore/xenstored_transaction.c -+++ xen-4.2.0-testing/tools/xenstore/xenstored_transaction.c -@@ -82,7 +82,7 @@ struct transaction - struct list_head changed_domains; - }; - --extern int quota_max_transaction; -+extern unsigned int quota_max_transaction; - static unsigned int generation; - - /* Return tdb context to use for this connection. */ -Index: xen-4.2.0-testing/tools/xenstore/xenstore_client.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/xenstore/xenstore_client.c -+++ xen-4.2.0-testing/tools/xenstore/xenstore_client.c -@@ -255,7 +255,7 @@ do_chmod(char *path, struct xs_permissio - char **xsval = xs_directory(xsh, xth, path, &xsval_n); - - if (xsval) { -- int i; -+ unsigned int i; - for (i = 0; i < xsval_n; i++) { - snprintf(buf, MAX_PATH_LEN, "%s/%s", path, xsval[i]); - -Index: xen-4.2.0-testing/tools/libxen/src/xen_common.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/libxen/src/xen_common.c -+++ xen-4.2.0-testing/tools/libxen/src/xen_common.c -@@ -1057,6 +1057,8 @@ static size_t size_of_member(const abstr - default: - assert(false); - } -+ -+ return 0; /* prevents a compiler warning */ - } - - -@@ -1568,6 +1570,8 @@ get_val_as_string(const struct abstract_ - default: - assert(false); - } -+ -+ return NULL; /* prevents a compiler warning */ - } - - -Index: xen-4.2.0-testing/tools/blktap2/drivers/block-remus.c -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap2/drivers/block-remus.c -+++ xen-4.2.0-testing/tools/blktap2/drivers/block-remus.c -@@ -1636,7 +1636,7 @@ static int tdremus_open(td_driver_t *dri - td_flag_t flags) - { - struct tdremus_state *s = (struct tdremus_state *)driver->data; -- int rc; -+ int rc = 0; - - RPRINTF("opening %s\n", name); - -Index: xen-4.2.0-testing/tools/blktap/lib/blktaplib.h -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap/lib/blktaplib.h -+++ xen-4.2.0-testing/tools/blktap/lib/blktaplib.h -@@ -196,6 +196,7 @@ typedef struct msg_pid { - } msg_pid_t; - - #define READ 0 -+#undef WRITE - #define WRITE 1 - - /*Control Messages between manager and tapdev*/ -Index: xen-4.2.0-testing/tools/blktap2/include/blktaplib.h -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap2/include/blktaplib.h -+++ xen-4.2.0-testing/tools/blktap2/include/blktaplib.h -@@ -190,6 +190,7 @@ typedef struct msg_lock { - } msg_lock_t; - - #define READ 0 -+#undef WRITE - #define WRITE 1 - - /*Control Messages between manager and tapdev*/ -Index: xen-4.2.0-testing/tools/blktap/lib/Makefile -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap/lib/Makefile -+++ xen-4.2.0-testing/tools/blktap/lib/Makefile -@@ -24,6 +24,8 @@ OBJS_PIC = $(SRCS:.c=.opic) - IBINS := - - LIB = libblktap.a libblktap.so.$(MAJOR).$(MINOR) -+LIB_SO = libblktap.so.$(MAJOR).$(MINOR) -+LIB_AR = libblktap.a - - .PHONY: all - all: $(LIB) -@@ -32,7 +34,8 @@ all: $(LIB) - install: all - $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) - $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) -- $(INSTALL_PROG) $(LIB) $(DESTDIR)$(LIBDIR) -+ $(INSTALL_PROG) $(LIB_SO) $(DESTDIR)$(LIBDIR) -+ $(INSTALL_DATA) $(LIB_AR) $(DESTDIR)$(LIBDIR) - ln -sf libblktap.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libblktap.so.$(MAJOR) - ln -sf libblktap.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libblktap.so - $(INSTALL_DATA) blktaplib.h $(DESTDIR)$(INCLUDEDIR) -Index: xen-4.2.0-testing/tools/blktap2/vhd/lib/Makefile -=================================================================== ---- xen-4.2.0-testing.orig/tools/blktap2/vhd/lib/Makefile -+++ xen-4.2.0-testing/tools/blktap2/vhd/lib/Makefile -@@ -52,6 +52,8 @@ LIB-OBJS += $(LVM-UTIL-OBJ) - LIB-PICOBJS = $(patsubst %.o,%.opic,$(LIB-OBJS)) - - LIBVHD = libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) -+LIBVHD_SO = libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) -+LIBVHD_AR = libvhd.a - - all: build - -@@ -68,8 +70,8 @@ libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR - - install: all - $(INSTALL_DIR) -p $(DESTDIR)$(INST-DIR) -- $(INSTALL_PROG) libvhd.a $(DESTDIR)$(INST-DIR) -- $(INSTALL_PROG) libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR) -+ $(INSTALL_PROG) $(LIBVHD_SO) $(DESTDIR)$(INST-DIR) -+ $(INSTALL_DATA) $(LIBVHD_AR) $(DESTDIR)$(INST-DIR) - ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR) - ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so - diff --git a/xen-xmexample.diff b/xen-xmexample.diff index 8774af4..2ed9d18 100644 --- a/xen-xmexample.diff +++ b/xen-xmexample.diff @@ -337,3 +337,17 @@ Index: xen-4.2.0-testing/tools/examples/xmexample.vti #---------------------------------------------------------------------------- # Define the disk devices you want the domain to have access to, and +Index: xen-4.2.0-testing/docs/man/xl.pod.1 +=================================================================== +--- xen-4.2.0-testing.orig/docs/man/xl.pod.1 ++++ xen-4.2.0-testing/docs/man/xl.pod.1 +@@ -12,7 +12,8 @@ The B program is the new tool for ma + domains. The program can be used to create, pause, and shutdown + domains. It can also be used to list current domains, enable or pin + VCPUs, and attach or detach virtual block devices. +-The old B tool is deprecated and should not be used. ++The B tool continues to be supported on SLE11 platforms ++and should still be used. + + The basic structure of every B command is almost always: + diff --git a/xen.changes b/xen.changes index dcab324..fd49818 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,106 @@ +------------------------------------------------------------------- +Tue Oct 9 06:19:55 MDT 2012 - carnold@novell.com + +- bnc#783847 - Virtualization/xen: Bug Xen 4.2 'xendomins' init + script incorrectly Requires 'xend' service when using 'xl' + toolstack + init.xendomains + +------------------------------------------------------------------- +Mon Oct 8 07:53:24 MDT 2012 - carnold@novell.com + +- bnc#782835 - Xen HVM Guest fails (errors) to launch on Opensuse + 12.2 + Xen 4.2 + 'xl' toolstack + xen-pygrub-grub-args.patch + +------------------------------------------------------------------- +Mon Oct 8 14:21:59 CEST 2012 - ohering@suse.de + +- backport parallel build support for stubdom +- rename 5 patches which were merged upstream + +------------------------------------------------------------------- +Fri Oct 5 21:58:46 CEST 2012 - ohering@suse.de + +- remove more obsolete changes: + CFLAGS passing to qemu-traditional, PYTHON_PREFIX_ARG handling + and pygrub installation + +------------------------------------------------------------------- +Fri Oct 5 20:39:23 CEST 2012 - ohering@suse.de + +- update blktap-pv-cdrom.patch + handle allocation errors in asprintf to fix compile errors + handle value returned from xs_read properly + remove casts from void pointers + +------------------------------------------------------------------- +Fri Oct 5 20:06:09 CEST 2012 - ohering@suse.de + +- update xenalyze to revision 138 + Fix dump time calculation overflow + move struct record_info into a header + correctly display of count of HW events + update trace.h to match xen-unstable + Remove vestigal HW_IRQ trace records + Remove decode of PV_UPDATE_VA_MAPPING + automatically generate dependencies + Get rid of redundant hvm dump_header + Introduce more efficient read mechanism + Eliminate unnecessary cycles_to_time calculation + Rework math to remove two 64-bit divisions + Enable -O2 optimization level + Remove --dump-cooked + Remove spurious dump_header construction + Improve record-sorting algorithm + Use long to cast into and out of pointers + Make max_active_pcpu calculation smarter + Optimize pcpu_string + Enable more cr3 output + Sort cr3 enumerated values by start time + Add option to skip vga range in MMIO enumeration + Handle MMIO records from different vmexits + Relocate pio and mmio enumaration structs to their own sub-struct + Handle new hvm_event traces + Introduce generic summary functionality + Function-ize setting of h->post_process + Reorganize cr trace handling + Allow several summary handlers to register on a single vmexit + Get rid of all tabs in xenalyze.c + Handle new IRQ tracing + Decrease verbosity + Print exit reason number if no string is available + Fix minor summary issue + Add string for TPR_BELOW_THRESHOLD + Raise MAX_CPUS to 256 cpus. + Add --report-pcpu option to report physical cpu utilization. + increase MAX_CPUS + Handle RUNSTATE_INIT in domain_runstate calculation + +------------------------------------------------------------------- +Fri Oct 5 19:58:57 CEST 2012 - ohering@suse.de + +- update RPM_OPT_FLAGS handling in spec file + pass EXTRA_CFLAGS via environment + +------------------------------------------------------------------- +Fri Oct 5 19:53:38 CEST 2012 - ohering@suse.de + +- remove obsolete xencommons-proc-xen.patch + +------------------------------------------------------------------- +Mon Oct 1 10:09:24 MDT 2012 - carnold@novell.com + +- Upstream patches from Jan + 25927-x86-domctl-ioport-mapping-range.patch + 25929-tmem-restore-pool-version.patch + 25931-x86-domctl-iomem-mapping-checks.patch + 25940-x86-S3-flush-cache.patch + 25952-x86-MMIO-remap-permissions.patch + 25961-x86-HPET-interrupts.patch + 25962-x86-assign-irq-vector-old.patch + 25965-x86-ucode-Intel-resume.patch + ------------------------------------------------------------------- Tue Sep 25 14:24:29 CEST 2012 - ohering@suse.de diff --git a/xen.no-default-runlevel-4.patch b/xen.no-default-runlevel-4.patch deleted file mode 100644 index 10024be..0000000 --- a/xen.no-default-runlevel-4.patch +++ /dev/null @@ -1,21 +0,0 @@ -Related to bnc#732884 -Runlevel 4 is for local sysadmin. -He is responsible to create all required symlinks in this private runlevel. - ---- - tools/xenballoon/xenballoond.init | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -Index: xen-4.2.0-testing/tools/xenballoon/xenballoond.init -=================================================================== ---- xen-4.2.0-testing.orig/tools/xenballoon/xenballoond.init -+++ xen-4.2.0-testing/tools/xenballoon/xenballoond.init -@@ -14,7 +14,7 @@ - # Should-Start: - # Required-Stop: $syslog $remote_fs - # Should-Stop: --# Default-Start: 3 4 5 -+# Default-Start: 3 5 - # Default-Stop: 0 1 2 6 - # Short-Description: Start/stop xenballoond - # Description: Starts and stops the Xen ballooning daemon. diff --git a/xen.spec b/xen.spec index 77256e9..978191c 100644 --- a/xen.spec +++ b/xen.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: xen ExclusiveArch: %ix86 x86_64 %define xvers 4.2 @@ -48,6 +47,7 @@ BuildRequires: automake BuildRequires: bin86 BuildRequires: curl-devel BuildRequires: dev86 +BuildRequires: fdupes BuildRequires: glib2-devel BuildRequires: graphviz BuildRequires: latex2html @@ -114,7 +114,7 @@ BuildRequires: kernel-syms BuildRequires: module-init-tools BuildRequires: xorg-x11 %endif -Version: 4.2.0_01 +Version: 4.2.0_03 Release: 0 PreReq: %insserv_prereq %fillup_prereq Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) @@ -185,18 +185,30 @@ Patch25866: 25866-sercon-ns16550-pci-irq.patch Patch25867: 25867-sercon-ns16550-parse.patch Patch25874: 25874-x86-EFI-chain-cfg.patch Patch25909: 25909-xenpm-consistent.patch +Patch25927: 25927-x86-domctl-ioport-mapping-range.patch +Patch25929: 25929-tmem-restore-pool-version.patch +Patch25931: 25931-x86-domctl-iomem-mapping-checks.patch +Patch25940: 25940-x86-S3-flush-cache.patch Patch25941: 25941-pygrub_always_append_--args.patch +Patch25952: 25952-x86-MMIO-remap-permissions.patch +Patch25961: 25961-x86-HPET-interrupts.patch +Patch25962: 25962-x86-assign-irq-vector-old.patch +Patch25965: 25965-x86-ucode-Intel-resume.patch +Patch26006: 26006-hotplug-Linux_Remove_tracing_bash_-x_from_network-nat_script.patch +Patch26007: 26007-xenballoond.init_remove_4_from_default_runlevel.patch +Patch26008: 26008-xend-pvscsi_fix_passing_of_SCSI_control_LUNs.patch +Patch26009: 26009-xend-pvscsi_fix_usage_of_persistant_device_names_for_SCSI_devices.patch +Patch26010: 26010-xend-pvscsi_update_sysfs_parser_for_Linux_3.0.patch +Patch26011: 26011-stubdom_fix_parallel_build_by_expanding_CROSS_MAKE.patch +Patch26018: 26018-pygrub_correct_typo_in_--args_assignment.patch # Upstream qemu patches # Our patches Patch301: xend-config.diff Patch302: xen-destdir.diff -Patch303: xen-rpmoptflags.diff -Patch304: xen-warnings.diff -Patch305: xen-warnings-unused.diff -Patch306: xen-changeset.diff -Patch307: xen-paths.diff -Patch308: xen-xmexample.diff -Patch309: xen-xmexample-vti.diff +Patch304: xen-changeset.diff +Patch305: xen-paths.diff +Patch306: xen-xmexample.diff +Patch307: xen-xmexample-vti.diff Patch310: xen-fixme-doc.diff Patch311: xen-domUloader.diff Patch312: xen-no-dummy-nfs-ip.diff @@ -207,7 +219,6 @@ Patch322: bridge-opensuse.patch Patch323: bridge-vlan.diff Patch324: bridge-bonding.diff Patch325: bridge-record-creation.patch -Patch326: network-nat.patch Patch327: udev-rules.patch Patch328: vif-route-ifup.patch Patch329: network-nat-open-SuSEfirewall2-FORWARD.patch @@ -276,15 +287,11 @@ Patch451: ioemu-watchdog-linkage.patch Patch452: ioemu-watchdog-ib700-timer.patch Patch453: tools-watchdog-support.patch Patch454: xend-console-port-restore.patch -Patch455: xencommons-proc-xen.patch Patch456: xend-vcpu-affinity-fix.patch Patch457: xen-cpupool-xl-config-format.patch Patch458: ipxe-enable-nics.patch Patch459: blktap-close-fifos.patch Patch460: blktap-disable-debug-printf.patch -Patch461: xen-bug776995-pvscsi-persistent-names.patch -Patch462: xen-bug776995-pvscsi-no-devname.patch -Patch463: xen-bug776995-pvscsi-sysfs-parser.patch # Jim's domain lock patch Patch480: xend-domain-lock.patch Patch481: xend-domain-lock-sfex.patch @@ -305,9 +312,6 @@ Patch650: disable_emulated_device.diff Patch651: ioemu-disable-scsi.patch Patch652: ioemu-disable-emulated-ide-if-pv.patch Patch700: hv_extid_compatibility.patch -Patch701: xen.no-default-runlevel-4.patch -# xenalyze -Patch20000: xenalyze.gcc46.patch # Build patch Patch99998: tmp-initscript-modprobe.patch Patch99999: tmp_build.patch @@ -645,7 +649,6 @@ Authors: %prep %setup -q -n %xen_build_dir -a 1 -a 2 -a 3 -a 4 -a 5 -a 20000 tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools -%patch20000 -p1 # Upstream patches %patch25833 -p1 %patch25835 -p1 @@ -669,18 +672,30 @@ tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch25867 -p1 %patch25874 -p1 %patch25909 -p1 +%patch25927 -p1 +%patch25929 -p1 +%patch25931 -p1 +%patch25940 -p1 %patch25941 -p1 +%patch25952 -p1 +%patch25961 -p1 +%patch25962 -p1 +%patch25965 -p1 +%patch26006 -p1 +%patch26007 -p1 +%patch26008 -p1 +%patch26009 -p1 +%patch26010 -p1 +%patch26011 -p1 +%patch26018 -p1 # Qemu # Our patches %patch301 -p1 %patch302 -p1 -%patch303 -p1 %patch304 -p1 %patch305 -p1 %patch306 -p1 %patch307 -p1 -%patch308 -p1 -%patch309 -p1 %patch310 -p1 %patch311 -p1 %patch312 -p1 @@ -691,7 +706,6 @@ tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch323 -p1 %patch324 -p1 %patch325 -p1 -%patch326 -p1 %patch327 -p1 %patch328 -p1 %patch329 -p1 @@ -757,15 +771,11 @@ tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch452 -p1 %patch453 -p1 %patch454 -p1 -%patch455 -p1 %patch456 -p1 %patch457 -p1 %patch458 -p1 %patch459 -p1 %patch460 -p1 -%patch461 -p1 -%patch462 -p1 -%patch463 -p1 %patch480 -p1 %patch481 -p1 %patch500 -p1 @@ -786,7 +796,6 @@ tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch651 -p1 %patch652 -p1 %patch700 -p1 -%patch701 -p1 %patch99998 -p1 %patch99999 -p1 @@ -795,9 +804,9 @@ XEN_EXTRAVERSION=%version-%release XEN_EXTRAVERSION=${XEN_EXTRAVERSION#%{xvers}} sed -i "s/XEN_EXTRAVERSION[\t ]*.=.*\$/XEN_EXTRAVERSION = $XEN_EXTRAVERSION/" xen/Makefile sed -i "s/XEN_CHANGESET[\t ]*=.*\$/XEN_CHANGESET = %{changeset}/" xen/Makefile -RPM_OPT_FLAGS=${RPM_OPT_FLAGS//-fstack-protector/} -export CFLAGS="${RPM_OPT_FLAGS}" -export RPM_OPT_FLAGS +export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS" +export EXTRA_CFLAGS_QEMU_TRADITIONAL="$RPM_OPT_FLAGS" +export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS" ./configure \ --enable-xenapi \ --prefix=/usr \ @@ -808,7 +817,7 @@ export RPM_OPT_FLAGS --datadir=%{_datadir} %if %{?with_dom0_support}0 CFLAGS_SAVE=$CFLAGS -make -C xenalyze.hg CC="gcc -I../xen/include" %{?_smp_mflags} +make -C xenalyze.hg CC="gcc -I../xen/include -DMAX_CPUS=%{max_cpus} ${RPM_OPT_FLAGS}" %{?_smp_mflags} -k make -C tools/include/xen-foreign %{?_smp_mflags} make tools docs %{?_smp_mflags} make -C tools/debugger/gdbsx @@ -835,7 +844,9 @@ done %endif %install -export CFLAGS="$RPM_OPT_FLAGS" +export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS" +export EXTRA_CFLAGS_QEMU_TRADITIONAL="$RPM_OPT_FLAGS" +export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS" %if %{?with_dom0_support}0 # EFI %ifarch x86_64 @@ -910,7 +921,7 @@ done %if %{?with_dom0_support}0 # Stubdom %if %{?with_stubdom}0 -make stubdom +make stubdom %{?_smp_mflags} make -C stubdom install \ DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} \ DOCDIR=%{_defaultdocdir}/xen INCDIR=%{_includedir} @@ -1025,6 +1036,8 @@ rm -f $RPM_BUILD_ROOT/usr/local/share/doc/qemu/qemu-tech.html #/usr/share/SuSEfirewall2/services/TEMPLATE mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir} install -m 644 %{S:26} $RPM_BUILD_ROOT/%{_fwdefdir}/xend-relocation-server +# create symlinks for keymaps +%fdupes -s $RPM_BUILD_ROOT/%{_datadir} %else # 32 bit hypervisor no longer supported. Remove dom0 tools. rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc diff --git a/xenalyze.gcc46.patch b/xenalyze.gcc46.patch deleted file mode 100644 index 13b517a..0000000 --- a/xenalyze.gcc46.patch +++ /dev/null @@ -1,140 +0,0 @@ -gcc -I../xen/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -Werror -o xenalyze xenalyze.c -xenalyze.c: In function 'weighted_percentile': -xenalyze.c:2017:9: error: variable 'progress' set but not used [-Werror=unused-but-set-variable] -xenalyze.c: In function 'self_weighted_percentile': -xenalyze.c:2105:9: error: variable 'progress' set but not used [-Werror=unused-but-set-variable] -xenalyze.c: In function 'interval_domain_short_summary_output': -xenalyze.c:2729:15: error: variable 'interval_cycles' set but not used [-Werror=unused-but-set-variable] -xenalyze.c: In function 'hvm_generic_dump': -xenalyze.c:4675:15: error: variable 'd' set but not used [-Werror=unused-but-set-variable] -xenalyze.c: In function 'sched_runstate_process': -xenalyze.c:6883:9: error: variable 'old_runstate' set but not used [-Werror=unused-but-set-variable] -xenalyze.c:6882:11: error: variable 'runstate_tsc' set but not used [-Werror=unused-but-set-variable] -xenalyze.c: In function 'cmd_parser': -xenalyze.c:9253:24: error: variable 'p' set but not used [-Werror=unused-but-set-variable] -cc1: all warnings being treated as errors - ---- - xenalyze.hg/xenalyze.c | 21 --------------------- - 1 file changed, 21 deletions(-) - -Index: xen-4.2.0-testing/xenalyze.hg/xenalyze.c -=================================================================== ---- xen-4.2.0-testing.orig/xenalyze.hg/xenalyze.c -+++ xen-4.2.0-testing/xenalyze.hg/xenalyze.c -@@ -2016,8 +2016,6 @@ float weighted_percentile(float * A, /* - float X, t1; - unsigned long long t2; - -- int progress; -- - /* Calculate total weight */ - N_weight=0; - -@@ -2078,15 +2076,11 @@ float weighted_percentile(float * A, /* - } - } while (I <= J); /* Keep going until our pointers meet or pass */ - -- progress = 0; -- - /* Re-adjust L and R, based on which element we're looking for */ - if(J_weighttotal_time.interval.cycles; -- - interval_time_output(); - - interval_cycle_percent_output(&d->total_time.interval); -@@ -4663,7 +4648,6 @@ void hvm_generic_dump(struct record_info - } *cr = (typeof(cr))ri->d; - - char *evt_string, evt_number[256]; -- unsigned *d; - int i, evt, is_64 = 0; - - evt = ri->event - TRC_HVM_HANDLER; -@@ -4683,7 +4667,6 @@ void hvm_generic_dump(struct record_info - evt_string = evt_number; - } - -- d = ri->d; - printf("%s%s %s%s [", - prefix, - ri->dump_header, -@@ -6867,8 +6850,6 @@ void sched_runstate_process(struct pcpu_ - } sevt; - int perfctrs; - struct last_oldstate_struct last_oldstate; -- tsc_t runstate_tsc; -- int old_runstate; - - switch(_sevt.lo) - { -@@ -6938,8 +6919,6 @@ void sched_runstate_process(struct pcpu_ - * be reset, it will be reset below. */ - last_oldstate = v->runstate.last_oldstate; - v->runstate.last_oldstate.wrong = RUNSTATE_INIT; -- runstate_tsc = v->runstate.tsc; -- old_runstate = v->runstate.state; - - /* Close vmexits when the putative reason for blocking / &c stops. - * This way, we don't account cpu contention to some other overhead. */ -@@ -9284,7 +9263,7 @@ error_t cmd_parser(int key, char *arg, s - - case OPT_TOLERANCE: - { -- char * inval, *p; -+ char * inval; - - opt.tolerance = (int)strtol(arg, &inval, 0); - -@@ -9298,8 +9277,6 @@ error_t cmd_parser(int key, char *arg, s - exit(1); - } - -- p = inval; -- - printf("Tolerating errors at or below %d\n", - opt.tolerance); - } diff --git a/xenalyze.hg.tar.bz2 b/xenalyze.hg.tar.bz2 index 36a39ea..46732d4 100644 --- a/xenalyze.hg.tar.bz2 +++ b/xenalyze.hg.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f1d68fa351de9e0d67790b038f791fec6c159530e59f1d9d03ba47f94f1095e -size 118689 +oid sha256:006b68099906f6f0846e8a7d7ded8bc8f3abfbcc1c4daac013a4eaa9aefb344f +size 124265 diff --git a/xencommons-proc-xen.patch b/xencommons-proc-xen.patch deleted file mode 100644 index 56e6ee4..0000000 --- a/xencommons-proc-xen.patch +++ /dev/null @@ -1,58 +0,0 @@ -# HG changeset patch -# Parent ea18090ab6e3cb3c69d232ec0865589688db3f81 -hotplug: update xencommons script to run only when needed - -Update the xencommons script to run only when needed: -- do not run if /proc/xen does not exist -- check if /proc/xen/capabilities exists before doing the grep for dom0 -- use variable for /proc/xen/capabilities -- use grep -q instead of stdout redirection when looking for xenfs, - its already used later - -Signed-off-by: Olaf Hering - ---- - tools/hotplug/Linux/init.d/xencommons | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -Index: xen-4.2.0-testing/tools/hotplug/Linux/init.d/xencommons -=================================================================== ---- xen-4.2.0-testing.orig/tools/hotplug/Linux/init.d/xencommons -+++ xen-4.2.0-testing/tools/hotplug/Linux/init.d/xencommons -@@ -27,6 +27,7 @@ fi - test -f $xencommons_config/xencommons && . $xencommons_config/xencommons - - XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid -+XEN_CAPABILITIES=/proc/xen/capabilities - shopt -s extglob - - # not running in Xen dom0 or domU -@@ -34,10 +35,15 @@ if ! test -d /proc/xen ; then - exit 0 - fi - -+# not running in Xen dom0 or domU -+if ! test -d /proc/xen ; then -+ exit 0 -+fi -+ - # mount xenfs in dom0 or domU with a pv_ops kernel - if test "x$1" = xstart && \ -- ! test -f /proc/xen/capabilities && \ -- ! grep '^xenfs ' /proc/mounts >/dev/null; -+ ! test -f $XEN_CAPABILITIES && \ -+ ! grep -q '^xenfs ' /proc/mounts ; - then - mount -t xenfs xenfs /proc/xen - fi -@@ -45,8 +51,8 @@ fi - # run this script only in dom0: - # no capabilities file in xenlinux domU kernel - # empty capabilities file in pv_ops domU kernel --if test -f /proc/xen/capabilities && \ -- ! grep -q "control_d" /proc/xen/capabilities ; then -+if test -f $XEN_CAPABILITIES && \ -+ ! grep -q "control_d" $XEN_CAPABILITIES ; then - exit 0 - fi -