Mailinglist Archive: opensuse-commit (1029 mails)

< Previous Next >
commit xen for openSUSE:11.4

Hello community,

here is the log from the commit of package xen for openSUSE:11.4
checked in at Tue Jul 26 17:11:57 CEST 2011.



--------
--- old-versions/11.4/UPDATES/all/xen/xen.changes 2011-05-10
00:35:49.000000000 +0200
+++ 11.4/xen/xen.changes 2011-07-25 21:53:26.000000000 +0200
@@ -1,0 +2,59 @@
+Tue Jul 19 13:37:38 CST 2011 - cyliu@xxxxxxxxxx
+
+- bnc#703924 - update block-npiv scripts to support BFA HBA
+
+-------------------------------------------------------------------
+Mon Jul 18 10:14:43 MDT 2011 - carnold@xxxxxxxxxx
+
+- bnc#689954 - L3: Live migrations fail when guest crashes:
+ domain_crash_sync called from entry.S
+ 23706-x86-migration.patch
+- Upstream patches from Jan
+ 23543-x86_64-m2v-assert.patch
+ 23676-x86_64-alias-mappings.patch
+
+-------------------------------------------------------------------
+Thu Jul 14 10:57:26 MDT 2011 - jfehlig@xxxxxxx
+
+- bnc#693472 - Bridge hangs cause redundant ring failures in
+ SLE 11 SP1 HAE + XEN
+ Fixed in Xen version 4.0.2
+
+-------------------------------------------------------------------
+Wed Jun 29 15:05:54 CEST 2011 - jbeulich@xxxxxxxxxx
+
+- Mark xen-scsi.ko supported (bnc#582265).
+
+-------------------------------------------------------------------
+Mon Jun 27 09:03:17 MDT 2011 - carnold@xxxxxxxxxx
+
+- bnc#702025 - VUL-0: xen: VT-d (PCI passthrough) MSI trap
+ injection (CVE-2011-1898)
+ Fixed in Xen version 4.0.2
+
+-------------------------------------------------------------------
+Thu Jun 16 10:08:44 MDT 2011 - carnold@xxxxxxxxxx
+
+- Update to Xen 4.0.2 FCS c/s 21511
+
+-------------------------------------------------------------------
+Fri May 20 10:48:54 MDT 2011 - carnold@xxxxxxxxxx
+
+- bnc#670465 - When connecting to Xen guest through vncviewer mouse
+ tracking is off.
+- Upstream patch 23298-hvmop-get-mem-type.patch replaces
+ xen.sles11sp1.bug684297.HVMOP_get_mem_type.patch
+- Upstream patches from Jan
+ 23333-hvm-32bit-compat-hypercalls.patch
+ 23337-vtd-malicious-msi-filter.patch
+ 23338-vtd-force-intremap.patch (CVE-2011-1898)
+ 23341-x86-ioapic-write-entry.patch
+ 23343-vtd-error-path-leaks.patch
+
+-------------------------------------------------------------------
+Thu May 19 11:22:51 CEST 2011 - ohering@xxxxxxx
+
+- bnc#684305 - on_crash is being ignored with kdump now working in HVM
+ xend-config-enable-dump-comment.patch
+
+-------------------------------------------------------------------

calling whatdependson for 11.4-i586


Old:
----
cve-2011-1583-4.0.patch
suspend_evtchn_lock.patch

New:
----
22462-x86-xsave-init-common.patch
22499-xen-hotplug-cleanup.patch
22780-pod-preempt.patch
23298-hvmop-get-mem-type.patch
23505-x86-cpu-add-arg-check.patch
23543-x86_64-m2v-assert.patch
23546-fucomip.patch
23676-x86_64-alias-mappings.patch
23706-x86-migration.patch
xenconsole-no-multiple-connections.patch
xend-config-enable-dump-comment.patch
xend-validate-nic-model.patch
xenpaging.autostart_delay.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -22,7 +22,7 @@
ExclusiveArch: %ix86 x86_64
%define xvers 4.0
%define xvermaj 4
-%define changeset 21479
+%define changeset 21511
%define xen_build_dir xen-4.0.2-testing
%define with_kmp 1
%define with_stubdom 1
@@ -72,8 +72,8 @@
%if %{?with_kmp}0
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
%endif
-Version: 4.0.2_02
-Release: 4.<RELEASE9>
+Version: 4.0.2_52
+Release: 0.<RELEASE2>
License: GPLv2+
Group: System/Kernel
AutoReqProv: on
@@ -140,36 +140,44 @@
Patch25: 22388-x2apic-panic.patch
Patch26: 22408-vpmu-nehalem.patch
Patch27: 22431-p2m-remove-bug-check.patch
-Patch28: 22475-x2apic-cleanup.patch
-Patch29: 22484-vlapic-tmcct-periodic.patch
-Patch30: 22504-iommu-dom0-holes.patch
-Patch31: 22533-x86-32bit-apicid.patch
-Patch32: 22534-x86-max-local-apic.patch
-Patch33: 22535-x2apic-preenabled.patch
-Patch34: 22645-amd-flush-filter.patch
-Patch35: 22693-fam10-mmio-conf-base-protect.patch
-Patch36: 22694-x86_64-no-weak.patch
-Patch37: 22707-x2apic-preenabled-check.patch
-Patch38: 22708-xenctx-misc.patch
-Patch39: 22744-ept-pod-locking.patch
-Patch40: 22749-vtd-workarounds.patch
-Patch41: 22777-vtd-ats-fixes.patch
-Patch42: 22781-pod-hap-logdirty.patch
-Patch43: 22789-i386-no-x2apic.patch
-Patch44: 22790-svm-resume-migrate-pirqs.patch
-Patch45: 22899-x86-tighten-msr-permissions.patch
-Patch46: 22915-x86-hpet-msi-s3.patch
-Patch47: 22949-x86-tolerate-serr.patch
-Patch48: 22998-x86-get_page_from_l1e-retcode.patch
-Patch49: 22999-x86-mod_l1_entry-retcode.patch
-Patch50: 23000-x86-mod_l2_entry-retcode.patch
-Patch51: 23020-x86-cpuidle-ordering.patch
-Patch52: 23061-amd-iommu-resume.patch
-Patch53: 23127-vtd-bios-settings.patch
-Patch54: 23154-x86-amd-iorr-no-rdwr.patch
-Patch55: 23199-amd-iommu-unmapped-intr-fault.patch
-Patch56: 23200-amd-iommu-intremap-sync.patch
-Patch57: cve-2011-1583-4.0.patch
+Patch28: 22462-x86-xsave-init-common.patch
+Patch29: 22475-x2apic-cleanup.patch
+Patch30: 22484-vlapic-tmcct-periodic.patch
+Patch31: 22499-xen-hotplug-cleanup.patch
+Patch32: 22504-iommu-dom0-holes.patch
+Patch33: 22533-x86-32bit-apicid.patch
+Patch34: 22534-x86-max-local-apic.patch
+Patch35: 22535-x2apic-preenabled.patch
+Patch36: 22645-amd-flush-filter.patch
+Patch37: 22693-fam10-mmio-conf-base-protect.patch
+Patch38: 22694-x86_64-no-weak.patch
+Patch39: 22707-x2apic-preenabled-check.patch
+Patch40: 22708-xenctx-misc.patch
+Patch41: 22744-ept-pod-locking.patch
+Patch42: 22749-vtd-workarounds.patch
+Patch43: 22777-vtd-ats-fixes.patch
+Patch44: 22780-pod-preempt.patch
+Patch45: 22781-pod-hap-logdirty.patch
+Patch46: 22789-i386-no-x2apic.patch
+Patch47: 22790-svm-resume-migrate-pirqs.patch
+Patch48: 22899-x86-tighten-msr-permissions.patch
+Patch49: 22915-x86-hpet-msi-s3.patch
+Patch50: 22949-x86-tolerate-serr.patch
+Patch51: 22998-x86-get_page_from_l1e-retcode.patch
+Patch52: 22999-x86-mod_l1_entry-retcode.patch
+Patch53: 23000-x86-mod_l2_entry-retcode.patch
+Patch54: 23020-x86-cpuidle-ordering.patch
+Patch55: 23061-amd-iommu-resume.patch
+Patch56: 23127-vtd-bios-settings.patch
+Patch57: 23154-x86-amd-iorr-no-rdwr.patch
+Patch58: 23199-amd-iommu-unmapped-intr-fault.patch
+Patch59: 23200-amd-iommu-intremap-sync.patch
+Patch60: 23298-hvmop-get-mem-type.patch
+Patch61: 23505-x86-cpu-add-arg-check.patch
+Patch62: 23543-x86_64-m2v-assert.patch
+Patch63: 23546-fucomip.patch
+Patch64: 23676-x86_64-alias-mappings.patch
+Patch65: 23706-x86-migration.patch
# Upstream qemu patches
Patch200: 7410-qemu-alt-gr.patch
Patch201: 7426-xenfb-depth.patch
@@ -219,6 +227,7 @@
Patch356: ioemu-vnc-resize.patch
Patch357: ioemu-debuginfo.patch
Patch358: vif-bridge-no-iptables.patch
+Patch359: xenconsole-no-multiple-connections.patch
# Needs to go upstream
Patch360: checkpoint-rename.patch
Patch361: xm-save-check-file.patch
@@ -237,7 +246,6 @@
Patch374: xend-devid-or-name.patch
Patch375: 22326-cpu-pools-numa-placement.patch
Patch376: 20158-revert.patch
-Patch377: suspend_evtchn_lock.patch
# Patches for snapshot support
Patch400: snapshot-ioemu-save.patch
Patch401: snapshot-ioemu-restore.patch
@@ -275,6 +283,8 @@
Patch442: xen-minimum-restart-time.patch
Patch443: vif-bridge.mtu.patch
Patch444: xentrace.dynamic_sized_tbuf.patch
+Patch445: xend-validate-nic-model.patch
+Patch446: xend-config-enable-dump-comment.patch
# Jim's domain lock patch
Patch450: xend-domain-lock.patch
# Hypervisor and PV driver Patches
@@ -313,6 +323,7 @@
Patch10020: xenpaging.guest_remove_page.patch
Patch10021: xenpaging.mem_event_check_ring-free_requests.patch
Patch10022: xenpaging.blacklist.patch
+Patch10023: xenpaging.autostart_delay.patch
Patch10024: xenpaging.page_already_populated.patch
Patch10025: xenpaging.notify_policy_only_once.patch
Patch10026: xenpaging.num_pages_equal_max_pages.patch
@@ -717,6 +728,14 @@
%patch55 -p1
%patch56 -p1
%patch57 -p1
+%patch58 -p1
+%patch59 -p1
+%patch60 -p1
+%patch61 -p1
+%patch62 -p1
+%patch63 -p1
+%patch64 -p1
+%patch65 -p1
%patch200 -p1
%patch201 -p1
%patch202 -p1
@@ -764,6 +783,7 @@
%patch356 -p1
%patch357 -p1
%patch358 -p1
+%patch359 -p1
%patch360 -p1
%patch361 -p1
%patch362 -p1
@@ -781,7 +801,6 @@
%patch374 -p1
%patch375 -p1
%patch376 -p1
-#%patch377 -p1
%patch400 -p1
%patch401 -p1
%patch402 -p1
@@ -816,6 +835,8 @@
%patch442 -p1
%patch443 -p1
%patch444 -p1
+%patch445 -p1
+%patch446 -p1
%patch450 -p1
%patch500 -p1
%patch501 -p1
@@ -851,6 +872,7 @@
%patch10020 -p1
%patch10021 -p1
%patch10022 -p1
+%patch10023 -p1
%patch10024 -p1
%patch10025 -p1
%patch10026 -p1

++++++ 21089-x86-startup-irq-from-setup-gsi.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -48,17 +48,15 @@
Make c/s 21089 work again with c/s 21092

Unfortunately the latter c/s' change to mpparse.c yielded the former
-patch non-functional - Xen's serial port IRQ is not in IQR_DISABLED
+patch non-functional - Xen's serial port IRQ is not in IRQ_DISABLED
state, yet must be allowed to get its trigger mode and polarity set
up in order for it to be usable.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

-Index: xen-4.0.2-testing/xen/arch/x86/io_apic.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/io_apic.c
-+++ xen-4.0.2-testing/xen/arch/x86/io_apic.c
-@@ -2232,6 +2232,7 @@ int __init io_apic_get_redir_entries (in
+--- a/xen/arch/x86/io_apic.c
++++ b/xen/arch/x86/io_apic.c
+@@ -2223,6 +2223,7 @@ int __init io_apic_get_redir_entries (in

int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level,
int active_high_low)
{
@@ -66,9 +64,9 @@
struct IO_APIC_route_entry entry;
unsigned long flags;
int vector;
-@@ -2283,7 +2284,12 @@ int io_apic_set_pci_routing (int ioapic,
- io_apic_write(ioapic, 0x11+2*pin, *(((int *)&entry)+1));
- io_apic_write(ioapic, 0x10+2*pin, *(((int *)&entry)+0));
+@@ -2273,7 +2274,12 @@ int io_apic_set_pci_routing (int ioapic,
+ spin_lock_irqsave(&ioapic_lock, flags);
+ __ioapic_write_entry(ioapic, pin, 0, entry);
set_native_irq_info(irq, TARGET_CPUS);
- spin_unlock_irqrestore(&ioapic_lock, flags);
+ spin_unlock(&ioapic_lock);
@@ -80,10 +78,8 @@

return 0;
}
-Index: xen-4.0.2-testing/xen/arch/x86/mpparse.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/mpparse.c
-+++ xen-4.0.2-testing/xen/arch/x86/mpparse.c
+--- a/xen/arch/x86/mpparse.c
++++ b/xen/arch/x86/mpparse.c
@@ -1102,6 +1102,8 @@ int mp_register_gsi (u32 gsi, int trigge
int ioapic = -1;
int ioapic_pin = 0;

++++++ 21421-vtd-ats-enabling.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -18,11 +18,9 @@

Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>

-Index: xen-4.0.2-testing/xen/drivers/passthrough/vtd/ia64/ats.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/drivers/passthrough/vtd/ia64/ats.c
-+++ xen-4.0.2-testing/xen/drivers/passthrough/vtd/ia64/ats.c
-@@ -47,6 +47,11 @@ int enable_ats_device(int seg, int bus,
+--- a/xen/drivers/passthrough/vtd/ia64/ats.c
++++ b/xen/drivers/passthrough/vtd/ia64/ats.c
+@@ -47,6 +47,11 @@ int enable_ats_device(int seg, int bus,
return 0;
}

@@ -34,11 +32,9 @@
int dev_invalidate_iotlb(struct iommu *iommu, u16 did,
u64 addr, unsigned int size_order, u64 type)
{
-Index: xen-4.0.2-testing/xen/drivers/passthrough/vtd/iommu.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/drivers/passthrough/vtd/iommu.c
-+++ xen-4.0.2-testing/xen/drivers/passthrough/vtd/iommu.c
-@@ -1354,6 +1354,9 @@ static int domain_context_mapping(struct
+--- a/xen/drivers/passthrough/vtd/iommu.c
++++ b/xen/drivers/passthrough/vtd/iommu.c
+@@ -1357,6 +1357,9 @@ static int domain_context_mapping(struct
dprintk(VTDPREFIX, "d%d:PCIe: map bdf = %x:%x.%x\n",
domain->domain_id, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn);
@@ -48,7 +44,7 @@
break;

case DEV_TYPE_PCI:
-@@ -1476,6 +1479,9 @@ static int domain_context_unmap(struct d
+@@ -1479,6 +1482,9 @@ static int domain_context_unmap(struct d
dprintk(VTDPREFIX, "d%d:PCIe: unmap bdf = %x:%x.%x\n",
domain->domain_id, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
ret = domain_context_unmap_one(domain, iommu, bus, devfn);
@@ -58,7 +54,7 @@
break;

case DEV_TYPE_PCI:
-@@ -1805,8 +1811,6 @@ static void setup_dom0_devices(struct do
+@@ -1816,8 +1822,6 @@ static void setup_dom0_devices(struct do
list_add(&pdev->domain_list, &d->arch.pdev_list);
domain_context_mapping(d, pdev->bus, pdev->devfn);
pci_enable_acs(pdev);
@@ -67,10 +63,8 @@
}
}
spin_unlock(&pcidevs_lock);
-Index: xen-4.0.2-testing/xen/drivers/passthrough/vtd/x86/ats.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/drivers/passthrough/vtd/x86/ats.c
-+++ xen-4.0.2-testing/xen/drivers/passthrough/vtd/x86/ats.c
+--- a/xen/drivers/passthrough/vtd/x86/ats.c
++++ b/xen/drivers/passthrough/vtd/x86/ats.c
@@ -92,6 +92,9 @@ int ats_device(int seg, int bus, int dev

pdev = pci_get_pdev(bus, devfn);
@@ -81,7 +75,7 @@
if ( !ecap_queued_inval(drhd->iommu->ecap) ||
!ecap_dev_iotlb(drhd->iommu->ecap) )
return 0;
-@@ -144,6 +147,9 @@ int enable_ats_device(int seg, int bus,
+@@ -144,6 +147,9 @@ int enable_ats_device(int seg, int bus,

value = pci_conf_read16(bus, PCI_SLOT(devfn),
PCI_FUNC(devfn), pos + ATS_REG_CTL);
@@ -91,7 +85,7 @@
value |= ATS_ENABLE;
pci_conf_write16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
pos + ATS_REG_CTL, value);
-@@ -153,10 +159,50 @@ int enable_ats_device(int seg, int bus,
+@@ -153,10 +159,50 @@ int enable_ats_device(int seg, int bus,
pdev->devfn = devfn;
pdev->ats_queue_depth = queue_depth;
list_add(&(pdev->list), &ats_devices);

++++++ 21542-amd-erratum-411.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -21,7 +21,7 @@
/*
* Masking an LVT entry on a P6 can trigger a local APIC error
* if the vector is zero. Mask LVTERR first to prevent this.
-@@ -1327,7 +1330,10 @@ void disable_APIC_timer(void)
+@@ -1324,7 +1327,10 @@ void disable_APIC_timer(void)
{
if (using_apic_timer) {
unsigned long v;

++++++ 21683-vtd-kill-timer-conditional.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -7,10 +7,8 @@

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>

-Index: xen-4.0.2-testing/xen/drivers/passthrough/io.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/drivers/passthrough/io.c
-+++ xen-4.0.2-testing/xen/drivers/passthrough/io.c
+--- a/xen/drivers/passthrough/io.c
++++ b/xen/drivers/passthrough/io.c
@@ -27,7 +27,7 @@

static void hvm_dirq_assist(unsigned long _d);
@@ -20,11 +18,9 @@
{
return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE));
}
-Index: xen-4.0.2-testing/xen/drivers/passthrough/pci.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/drivers/passthrough/pci.c
-+++ xen-4.0.2-testing/xen/drivers/passthrough/pci.c
-@@ -257,7 +257,9 @@ static void pci_clean_dpci_irqs(struct d
+--- a/xen/drivers/passthrough/pci.c
++++ b/xen/drivers/passthrough/pci.c
+@@ -263,7 +263,9 @@ static void pci_clean_dpci_irqs(struct d
i = find_next_bit(hvm_irq_dpci->mapping, d->nr_pirqs, i + 1) )
{
pirq_guest_unbind(d, i);
@@ -35,10 +31,8 @@

list_for_each_safe ( digl_list, tmp,
&hvm_irq_dpci->mirq[i].digl_list )
-Index: xen-4.0.2-testing/xen/include/xen/iommu.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/xen/iommu.h
-+++ xen-4.0.2-testing/xen/include/xen/iommu.h
+--- a/xen/include/xen/iommu.h
++++ b/xen/include/xen/iommu.h
@@ -106,6 +106,7 @@ void hvm_dpci_isairq_eoi(struct domain *
struct hvm_irq_dpci *domain_get_irq_dpci(struct domain *domain);
int domain_set_irq_dpci(struct domain *domain, struct hvm_irq_dpci *dpci);

++++++ 22214-x86-msr-misc-enable.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -23,11 +23,9 @@

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

-Index: xen-4.0.2-testing/xen/arch/x86/traps.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/traps.c
-+++ xen-4.0.2-testing/xen/arch/x86/traps.c
-@@ -1679,6 +1679,16 @@ unsigned long guest_to_host_gpr_switch(u
+--- a/xen/arch/x86/traps.c
++++ b/xen/arch/x86/traps.c
+@@ -1683,6 +1683,16 @@ unsigned long guest_to_host_gpr_switch(u

void (*pv_post_outb_hook)(unsigned int port, u8 value);

@@ -44,7 +42,7 @@
/* Instruction fetch with error handling. */
#define insn_fetch(type, base, eip, limit) \
({ unsigned long _rc, _ptr = (base) + (eip); \
-@@ -2276,6 +2286,13 @@ static int emulate_privileged_op(struct
+@@ -2280,6 +2290,13 @@ static int emulate_privileged_op(struct
if ( wrmsr_safe(MSR_FAM10H_MMIO_CONF_BASE, eax, edx) != 0 )
goto fail;
break;
@@ -58,7 +56,7 @@
case MSR_IA32_MPERF:
case MSR_IA32_APERF:
if (( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL ) &&
-@@ -2382,11 +2399,7 @@ static int emulate_privileged_op(struct
+@@ -2386,11 +2403,7 @@ static int emulate_privileged_op(struct
case MSR_IA32_MISC_ENABLE:
if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
goto fail;
@@ -71,10 +69,8 @@
break;
case MSR_EFER:
case MSR_AMD_PATCHLEVEL:
-Index: xen-4.0.2-testing/xen/include/asm-x86/msr.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/asm-x86/msr.h
-+++ xen-4.0.2-testing/xen/include/asm-x86/msr.h
+--- a/xen/include/asm-x86/msr.h
++++ b/xen/include/asm-x86/msr.h
@@ -39,7 +39,8 @@ static inline void wrmsrl(unsigned int m
__asm__ __volatile__( \
"1: rdmsr\n2:\n" \

++++++ 22231-x86-pv-ucode-msr-intel.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -13,11 +13,9 @@

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

-Index: xen-4.0.2-testing/xen/arch/x86/traps.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/traps.c
-+++ xen-4.0.2-testing/xen/arch/x86/traps.c
-@@ -2286,6 +2286,14 @@ static int emulate_privileged_op(struct
+--- a/xen/arch/x86/traps.c
++++ b/xen/arch/x86/traps.c
+@@ -2290,6 +2290,14 @@ static int emulate_privileged_op(struct
if ( wrmsr_safe(MSR_FAM10H_MMIO_CONF_BASE, eax, edx) != 0 )
goto fail;
break;
@@ -32,7 +30,7 @@
case MSR_IA32_MISC_ENABLE:
if ( rdmsr_safe(regs->ecx, l, h) )
goto invalid;
-@@ -2393,16 +2401,21 @@ static int emulate_privileged_op(struct
+@@ -2397,16 +2405,21 @@ static int emulate_privileged_op(struct
regs->eax = regs->edx = 0;
break;
}
@@ -59,7 +57,7 @@
default:
if ( rdmsr_hypervisor_regs(regs->ecx, &val) )
{
-@@ -2418,6 +2431,8 @@ static int emulate_privileged_op(struct
+@@ -2422,6 +2435,8 @@ static int emulate_privileged_op(struct
if ( rc )
goto rdmsr_writeback;


++++++ 22332-vtd-workarounds.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -209,15 +209,15 @@
#endif // _VTD_EXTERN_H_
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
-@@ -43,7 +43,6 @@
- #endif
+@@ -46,7 +46,6 @@
+ bool_t __read_mostly untrusted_msi;

int nr_iommus;
-static bool_t rwbf_quirk;

static void setup_dom0_devices(struct domain *d);
static void setup_dom0_rmrr(struct domain *d);
-@@ -481,16 +480,36 @@ static int inline iommu_flush_iotlb_glob
+@@ -484,16 +483,36 @@ static int inline iommu_flush_iotlb_glob
int flush_non_present_entry, int flush_dev_iotlb)
{
struct iommu_flush *flush = iommu_get_flush(iommu);
@@ -256,7 +256,7 @@
}

static int inline get_alignment(u64 base, unsigned int size)
-@@ -514,6 +533,7 @@ static int inline iommu_flush_iotlb_psi(
+@@ -517,6 +536,7 @@ static int inline iommu_flush_iotlb_psi(
{
unsigned int align;
struct iommu_flush *flush = iommu_get_flush(iommu);
@@ -264,7 +264,7 @@

ASSERT(!(addr & (~PAGE_MASK_4K)));
ASSERT(pages > 0);
-@@ -534,8 +554,16 @@ static int inline iommu_flush_iotlb_psi(
+@@ -537,8 +557,16 @@ static int inline iommu_flush_iotlb_psi(
addr >>= PAGE_SHIFT_4K + align;
addr <<= PAGE_SHIFT_4K + align;

@@ -282,7 +282,7 @@
}

static void iommu_flush_all(void)
-@@ -688,24 +716,13 @@ static int iommu_set_root_entry(struct i
+@@ -691,24 +719,13 @@ static int iommu_set_root_entry(struct i
return 0;
}

@@ -308,7 +308,7 @@
{
if ( force_iommu )
panic("BIOS did not enable IGD for VT properly, crash Xen for
security purpose!\n");
-@@ -717,6 +734,9 @@ static void iommu_enable_translation(str
+@@ -720,6 +737,9 @@ static void iommu_enable_translation(str
}
}

@@ -318,7 +318,7 @@
if ( iommu_verbose )
dprintk(VTDPREFIX,
"iommu_enable_translation: iommu->reg = %p\n", iommu->reg);
-@@ -729,6 +749,9 @@ static void iommu_enable_translation(str
+@@ -732,6 +752,9 @@ static void iommu_enable_translation(str
(sts & DMA_GSTS_TES), sts);
spin_unlock_irqrestore(&iommu->register_lock, flags);

@@ -328,7 +328,7 @@
/* Disable PMRs when VT-d engine takes effect per spec definition */
disable_pmr(iommu);
}
-@@ -738,6 +761,9 @@ static void iommu_disable_translation(st
+@@ -741,6 +764,9 @@ static void iommu_disable_translation(st
u32 sts;
unsigned long flags;

@@ -338,7 +338,7 @@
spin_lock_irqsave(&iommu->register_lock, flags);
sts = dmar_readl(iommu->reg, DMAR_GSTS_REG);
dmar_writel(iommu->reg, DMAR_GCMD_REG, sts & (~DMA_GCMD_TE));
-@@ -746,6 +772,9 @@ static void iommu_disable_translation(st
+@@ -749,6 +775,9 @@ static void iommu_disable_translation(st
IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, dmar_readl,
!(sts & DMA_GSTS_TES), sts);
spin_unlock_irqrestore(&iommu->register_lock, flags);
@@ -348,7 +348,7 @@
}

enum faulttype {
-@@ -1089,6 +1118,7 @@ int __init iommu_alloc(struct acpi_drhd_
+@@ -1092,6 +1121,7 @@ int __init iommu_alloc(struct acpi_drhd_
xfree(iommu);
return -ENOMEM;
}
@@ -356,7 +356,7 @@

iommu->reg = map_to_nocache_virt(nr_iommus, drhd->address);
iommu->index = nr_iommus++;
-@@ -1221,7 +1251,7 @@ static void intel_iommu_dom0_init(struct
+@@ -1224,7 +1254,7 @@ static void intel_iommu_dom0_init(struct
}
}

@@ -365,7 +365,7 @@
struct domain *domain,
struct iommu *iommu,
u8 bus, u8 devfn)
-@@ -1324,6 +1354,8 @@ static int domain_context_mapping_one(
+@@ -1327,6 +1357,8 @@ static int domain_context_mapping_one(

unmap_vtd_domain_page(context_entries);

@@ -374,7 +374,7 @@
return 0;
}

-@@ -1398,7 +1430,7 @@ static int domain_context_mapping(struct
+@@ -1401,7 +1433,7 @@ static int domain_context_mapping(struct
return ret;
}

@@ -383,7 +383,7 @@
struct domain *domain,
struct iommu *iommu,
u8 bus, u8 devfn)
-@@ -1446,6 +1478,8 @@ static int domain_context_unmap_one(
+@@ -1449,6 +1481,8 @@ static int domain_context_unmap_one(
spin_unlock(&iommu->lock);
unmap_vtd_domain_page(context_entries);

@@ -392,7 +392,7 @@
return 0;
}

-@@ -1945,19 +1979,6 @@ static void setup_dom0_rmrr(struct domai
+@@ -1957,19 +1991,6 @@ static void setup_dom0_rmrr(struct domai
spin_unlock(&pcidevs_lock);
}

@@ -412,7 +412,7 @@
int intel_vtd_setup(void)
{
struct acpi_drhd_unit *drhd;
-@@ -1966,7 +1987,7 @@ int intel_vtd_setup(void)
+@@ -1978,7 +1999,7 @@ int intel_vtd_setup(void)
if ( list_empty(&acpi_drhd_units) )
return -ENODEV;


++++++ 22388-x2apic-panic.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -16,11 +16,9 @@

Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>

-Index: xen-4.0.2-testing/xen/arch/x86/apic.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/apic.c
-+++ xen-4.0.2-testing/xen/arch/x86/apic.c
-@@ -1001,22 +1001,11 @@ static void enable_bsp_x2apic(void)
+--- a/xen/arch/x86/apic.c
++++ b/xen/arch/x86/apic.c
+@@ -998,22 +998,11 @@ static void enable_bsp_x2apic(void)
}
else
{

++++++ 22462-x86-xsave-init-common.patch ++++++
References: bnc#675817

# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1291746398 0
# Node ID 98eb4a334b7723c3e515038feaddbd01cec45a3a
# Parent 70501ee741a6dccd940c1cb4481650cdc1afdcf3
amd xsave: Move xsave initialization code to a common place

This patch moves xsave/xrstor code to CPU common file. First of all,
it prepares xsave/xrstor support for AMD CPUs. Secondly, Xen would
crash on __context_switch() without this patch on xsave-capable AMD
CPUs. The crash was due to cpu_has_xsave reports true in domain.c
while xsave space wasn't initialized.

Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>

Index: xen-4.0.2-testing/xen/arch/x86/cpu/common.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/cpu/common.c
+++ xen-4.0.2-testing/xen/arch/x86/cpu/common.c
@@ -22,6 +22,8 @@ static int cachesize_override __cpuinitd
static int disable_x86_fxsr __cpuinitdata;
static int disable_x86_serial_nr __cpuinitdata;

+static int use_xsave;
+boolean_param("xsave", use_xsave);
unsigned int __devinitdata opt_cpuid_mask_ecx = ~0u;
integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx);
unsigned int __devinitdata opt_cpuid_mask_edx = ~0u;
@@ -400,6 +402,13 @@ void __cpuinit identify_cpu(struct cpuin
if (this_cpu->c_init)
this_cpu->c_init(c);

+ /* Initialize xsave/xrstor features */
+ if ( !use_xsave )
+ clear_bit(X86_FEATURE_XSAVE, boot_cpu_data.x86_capability);
+
+ if ( cpu_has_xsave )
+ xsave_init();
+
/* Disable the PN if appropriate */
squash_the_stupid_serial_number(c);

Index: xen-4.0.2-testing/xen/arch/x86/cpu/intel.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/cpu/intel.c
+++ xen-4.0.2-testing/xen/arch/x86/cpu/intel.c
@@ -20,9 +20,6 @@

extern int trap_init_f00f_bug(void);

-static int use_xsave;
-boolean_param("xsave", use_xsave);
-
#ifdef CONFIG_X86_INTEL_USERCOPY
/*
* Alignment at which movsl is preferred for bulk memory copies.
@@ -256,12 +253,6 @@ static void __devinit init_intel(struct
set_bit(X86_FEATURE_ARAT, c->x86_capability);

start_vmx();
-
- if ( !use_xsave )
- clear_bit(X86_FEATURE_XSAVE, boot_cpu_data.x86_capability);
-
- if ( cpu_has_xsave )
- xsave_init();
}


++++++ 22475-x2apic-cleanup.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -8,9 +8,11 @@

Signed-off-by: Keir Fraser <keir@xxxxxxx>

---- a/xen/arch/x86/apic.c
-+++ b/xen/arch/x86/apic.c
-@@ -67,12 +67,12 @@ static int enable_local_apic __initdata
+Index: xen-4.0.2-testing/xen/arch/x86/apic.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/apic.c
++++ xen-4.0.2-testing/xen/arch/x86/apic.c
+@@ -67,12 +67,12 @@ static int enable_local_apic __initdata
*/
int apic_verbosity;

@@ -26,7 +28,7 @@
/*
* The following vectors are part of the Linux architecture, there
* is no hardware IRQ pin equivalent for them, they are triggered
-@@ -945,30 +945,24 @@ no_apic:
+@@ -942,30 +942,24 @@ no_apic:
return -1;
}

@@ -68,7 +70,7 @@
{
/*
* Interrupt remapping should be also enabled by BIOS when
-@@ -978,39 +972,33 @@ static void enable_bsp_x2apic(void)
+@@ -975,39 +969,33 @@ static void enable_bsp_x2apic(void)
if ( !intremap_enabled() )
panic("Interrupt remapping is not enabled by BIOS while "
"x2APIC is already enabled by BIOS!\n");
@@ -125,7 +127,7 @@
{
printk("Allocate ioapic_entries failed\n");
goto out;
-@@ -1032,13 +1020,13 @@ static void enable_bsp_x2apic(void)
+@@ -1029,13 +1017,13 @@ static void enable_bsp_x2apic(void)
goto restore_out;
}

@@ -142,7 +144,7 @@
}

restore_out:
-@@ -1050,24 +1038,6 @@ out:
+@@ -1047,24 +1035,6 @@ out:
free_ioapic_entries(ioapic_entries);
}

@@ -167,9 +169,11 @@
void __init init_apic_mappings(void)
{
unsigned long apic_phys;
---- a/xen/arch/x86/cpu/common.c
-+++ b/xen/arch/x86/cpu/common.c
-@@ -250,8 +250,8 @@ static void __init early_cpu_detect(void
+Index: xen-4.0.2-testing/xen/arch/x86/cpu/common.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/cpu/common.c
++++ xen-4.0.2-testing/xen/arch/x86/cpu/common.c
+@@ -252,8 +252,8 @@ static void __init early_cpu_detect(void

c->x86 = 4;
if (c->cpuid_level >= 0x00000001) {
@@ -180,7 +184,7 @@
c->x86 = (tfms >> 8) & 15;
c->x86_model = (tfms >> 4) & 15;
if (c->x86 == 0xf)
-@@ -260,9 +260,12 @@ static void __init early_cpu_detect(void
+@@ -262,9 +262,12 @@ static void __init early_cpu_detect(void
c->x86_model += ((tfms >> 16) & 0xF) << 4;
c->x86_mask = tfms & 15;
cap0 &= ~cleared_caps[0];
@@ -194,8 +198,10 @@
}
}

---- a/xen/arch/x86/genapic/x2apic.c
-+++ b/xen/arch/x86/genapic/x2apic.c
+Index: xen-4.0.2-testing/xen/arch/x86/genapic/x2apic.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/genapic/x2apic.c
++++ xen-4.0.2-testing/xen/arch/x86/genapic/x2apic.c
@@ -23,89 +23,44 @@
#include <xen/smp.h>
#include <asm/mach-default/mach_mpparse.h>
@@ -305,7 +311,7 @@
{
unsigned int cpu, cfg;
unsigned long flags;
-@@ -148,3 +103,34 @@ void send_IPI_mask_x2apic_cluster(const
+@@ -148,3 +103,34 @@ void send_IPI_mask_x2apic_cluster(const

local_irq_restore(flags);
}
@@ -340,8 +346,10 @@
+{
+ return x2apic_phys ? &apic_x2apic_phys : &apic_x2apic_cluster;
+}
---- a/xen/arch/x86/setup.c
-+++ b/xen/arch/x86/setup.c
+Index: xen-4.0.2-testing/xen/arch/x86/setup.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/setup.c
++++ xen-4.0.2-testing/xen/arch/x86/setup.c
@@ -1006,9 +1006,6 @@ void __init __start_xen(unsigned long mb

tboot_probe();
@@ -362,8 +370,10 @@

percpu_free_unused_areas();

---- a/xen/arch/x86/smpboot.c
-+++ b/xen/arch/x86/smpboot.c
+Index: xen-4.0.2-testing/xen/arch/x86/smpboot.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/smpboot.c
++++ xen-4.0.2-testing/xen/arch/x86/smpboot.c
@@ -326,8 +326,7 @@ void __devinit smp_callin(void)
*/
wait_for_init_deassert(&init_deasserted);
@@ -374,8 +384,10 @@

/*
* (This works even if the APIC is not enabled.)
---- a/xen/drivers/passthrough/vtd/intremap.c
-+++ b/xen/drivers/passthrough/vtd/intremap.c
+Index: xen-4.0.2-testing/xen/drivers/passthrough/vtd/intremap.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/drivers/passthrough/vtd/intremap.c
++++ xen-4.0.2-testing/xen/drivers/passthrough/vtd/intremap.c
@@ -129,15 +129,10 @@ int iommu_supports_eim(void)
struct acpi_drhd_unit *drhd;
int apic;
@@ -394,8 +406,10 @@
/* We MUST have a DRHD unit for each IOAPIC. */
for ( apic = 0; apic < nr_ioapics; apic++ )
if ( !ioapic_to_drhd(IO_APIC_ID(apic)) )
---- a/xen/include/asm-x86/apic.h
-+++ b/xen/include/asm-x86/apic.h
+Index: xen-4.0.2-testing/xen/include/asm-x86/apic.h
+===================================================================
+--- xen-4.0.2-testing.orig/xen/include/asm-x86/apic.h
++++ xen-4.0.2-testing/xen/include/asm-x86/apic.h
@@ -25,21 +25,8 @@ extern int apic_verbosity;
extern int x2apic_enabled;
extern int directed_eoi_enabled;
@@ -420,9 +434,11 @@

/*
* Define the default level of output to be very little
---- a/xen/include/asm-x86/genapic.h
-+++ b/xen/include/asm-x86/genapic.h
-@@ -49,8 +49,6 @@ struct genapic {
+Index: xen-4.0.2-testing/xen/include/asm-x86/genapic.h
+===================================================================
+--- xen-4.0.2-testing.orig/xen/include/asm-x86/genapic.h
++++ xen-4.0.2-testing/xen/include/asm-x86/genapic.h
+@@ -49,8 +49,6 @@ struct genapic {
APICFUNC(acpi_madt_oem_check)

extern const struct genapic *genapic;

++++++ 22499-xen-hotplug-cleanup.patch ++++++
Index: xen-4.0.2-testing/tools/hotplug/Linux/xen-hotplug-cleanup
===================================================================
--- xen-4.0.2-testing.orig/tools/hotplug/Linux/xen-hotplug-cleanup
+++ xen-4.0.2-testing/tools/hotplug/Linux/xen-hotplug-cleanup
@@ -21,10 +21,12 @@ if [ "$vm" != "" ]; then

# if the vm path does not exist and the device class is 'vbd' then we may
have
# a tap2 device
- if [ "$(xenstore-read "$vm_dev" 2>/dev/null)" != "" ] \
- && [ "${path_array[1]}" = "vbd" ]; then
- vm_dev="$vm/device/tap2/${path_array[3]}"
- fi
+ $(xenstore-read "$vm_dev" 2>/dev/null) || \
+ {
+ if [ "${path_array[1]}" = "vbd" ]; then
+ vm_dev="$vm/device/tap2/${path_array[3]}"
+ fi
+ }
else
vm_dev=
fi
++++++ 22535-x2apic-preenabled.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -15,11 +15,9 @@

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

-Index: xen-4.0.2-testing/xen/arch/x86/apic.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/apic.c
-+++ xen-4.0.2-testing/xen/arch/x86/apic.c
-@@ -964,15 +964,6 @@ void x2apic_setup(void)
+--- a/xen/arch/x86/apic.c
++++ b/xen/arch/x86/apic.c
+@@ -961,15 +961,6 @@ void x2apic_setup(void)
rdmsr(MSR_IA32_APICBASE, lo, hi);
if ( lo & MSR_IA32_APICBASE_EXTD )
{
@@ -35,7 +33,7 @@
printk("x2APIC mode is already enabled by BIOS.\n");
x2apic_enabled = 1;
}
-@@ -1015,6 +1006,10 @@ void x2apic_setup(void)
+@@ -1012,6 +1003,10 @@ void x2apic_setup(void)

if ( iommu_enable_IR() )
{
@@ -46,11 +44,9 @@
printk("Would not enable x2APIC due to interrupt remapping "
"cannot be enabled.\n");
goto restore_out;
-Index: xen-4.0.2-testing/xen/drivers/passthrough/vtd/intremap.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/drivers/passthrough/vtd/intremap.c
-+++ xen-4.0.2-testing/xen/drivers/passthrough/vtd/intremap.c
-@@ -892,23 +892,3 @@ void iommu_disable_IR(void)
+--- a/xen/drivers/passthrough/vtd/intremap.c
++++ b/xen/drivers/passthrough/vtd/intremap.c
+@@ -898,23 +898,3 @@ void iommu_disable_IR(void)
for_each_drhd_unit ( drhd )
disable_qinval(drhd->iommu);
}
@@ -74,10 +70,8 @@
-
- return 1;
-}
-Index: xen-4.0.2-testing/xen/include/xen/iommu.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/xen/iommu.h
-+++ xen-4.0.2-testing/xen/include/xen/iommu.h
+--- a/xen/include/xen/iommu.h
++++ b/xen/include/xen/iommu.h
@@ -62,7 +62,6 @@ int iommu_setup(void);
int iommu_supports_eim(void);
int iommu_enable_IR(void);

++++++ 22693-fam10-mmio-conf-base-protect.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -19,11 +19,9 @@

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

-Index: xen-4.0.2-testing/xen/arch/x86/traps.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/traps.c
-+++ xen-4.0.2-testing/xen/arch/x86/traps.c
-@@ -1716,6 +1716,10 @@ static int is_cpufreq_controller(struct
+--- a/xen/arch/x86/traps.c
++++ b/xen/arch/x86/traps.c
+@@ -1720,6 +1720,10 @@ static int is_cpufreq_controller(struct
(d->domain_id == 0));
}

@@ -34,7 +32,7 @@
static int emulate_privileged_op(struct cpu_user_regs *regs)
{
struct vcpu *v = current;
-@@ -2275,7 +2279,13 @@ static int emulate_privileged_op(struct
+@@ -2279,7 +2283,13 @@ static int emulate_privileged_op(struct
goto fail;
if ( !IS_PRIV(v->domain) )
break;
@@ -49,10 +47,8 @@
(((((u64)h << 32) | l) ^ val) &
~( FAM10H_MMIO_CONF_ENABLE |
(FAM10H_MMIO_CONF_BUSRANGE_MASK <<
-Index: xen-4.0.2-testing/xen/arch/x86/x86_64/mmconfig.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/x86_64/mmconfig.h
-+++ xen-4.0.2-testing/xen/arch/x86/x86_64/mmconfig.h
+--- a/xen/arch/x86/x86_64/mmconfig.h
++++ b/xen/arch/x86/x86_64/mmconfig.h
@@ -34,6 +34,8 @@

#define PCI_VENDOR_ID_NVIDIA 0x10de
@@ -62,10 +58,8 @@
/*
* AMD Fam10h CPUs are buggy, and cannot access MMIO config space
* on their northbrige except through the * %eax register. As such, you MUST
-Index: xen-4.0.2-testing/xen/arch/x86/x86_64/mmconfig-shared.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/x86_64/mmconfig-shared.c
-+++ xen-4.0.2-testing/xen/arch/x86/x86_64/mmconfig-shared.c
+--- a/xen/arch/x86/x86_64/mmconfig-shared.c
++++ b/xen/arch/x86/x86_64/mmconfig-shared.c
@@ -24,7 +24,7 @@
#include "mmconfig.h"


++++++ 22707-x2apic-preenabled-check.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -17,11 +17,9 @@

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

-Index: xen-4.0.2-testing/xen/arch/x86/apic.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/apic.c
-+++ xen-4.0.2-testing/xen/arch/x86/apic.c
-@@ -948,7 +948,6 @@ no_apic:
+--- a/xen/arch/x86/apic.c
++++ b/xen/arch/x86/apic.c
+@@ -945,7 +945,6 @@ no_apic:
void x2apic_setup(void)
{
struct IO_APIC_route_entry **ioapic_entries = NULL;
@@ -29,7 +27,7 @@

if ( smp_processor_id() != 0 )
{
-@@ -960,14 +959,6 @@ void x2apic_setup(void)
+@@ -957,14 +956,6 @@ void x2apic_setup(void)
if ( !cpu_has_x2apic )
return;

@@ -44,10 +42,8 @@
if ( !opt_x2apic )
{
if ( !x2apic_enabled )
-Index: xen-4.0.2-testing/xen/arch/x86/genapic/probe.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/genapic/probe.c
-+++ xen-4.0.2-testing/xen/arch/x86/genapic/probe.c
+--- a/xen/arch/x86/genapic/probe.c
++++ b/xen/arch/x86/genapic/probe.c
@@ -59,8 +59,10 @@ custom_param("apic", genapic_apic_force)

void __init generic_apic_probe(void)
@@ -61,10 +57,8 @@

for (i = 0; !changed && apic_probe[i]; i++) {
if (apic_probe[i]->probe()) {
-Index: xen-4.0.2-testing/xen/arch/x86/genapic/x2apic.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/genapic/x2apic.c
-+++ xen-4.0.2-testing/xen/arch/x86/genapic/x2apic.c
+--- a/xen/arch/x86/genapic/x2apic.c
++++ b/xen/arch/x86/genapic/x2apic.c
@@ -20,6 +20,8 @@
#include <xen/cpumask.h>
#include <asm/apicdef.h>
@@ -95,10 +89,8 @@
+ genapic = apic_x2apic_probe();
+ }
+}
-Index: xen-4.0.2-testing/xen/include/asm-x86/apic.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/asm-x86/apic.h
-+++ xen-4.0.2-testing/xen/include/asm-x86/apic.h
+--- a/xen/include/asm-x86/apic.h
++++ b/xen/include/asm-x86/apic.h
@@ -25,6 +25,7 @@ extern int apic_verbosity;
extern int x2apic_enabled;
extern int directed_eoi_enabled;

++++++ 22749-vtd-workarounds.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -65,7 +65,7 @@
#endif // _VTD_EXTERN_H_
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
-@@ -1845,6 +1845,7 @@ static void setup_dom0_devices(struct do
+@@ -1856,6 +1856,7 @@ static void setup_dom0_devices(struct do
list_add(&pdev->domain_list, &d->arch.pdev_list);
domain_context_mapping(d, pdev->bus, pdev->devfn);
pci_enable_acs(pdev);

++++++ 22780-pod-preempt.patch ++++++
References: bnc#678871

# HG changeset patch
# User George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1295274253 0
# Node ID 97ab84aca65cdcbce2ddccc51629fb24adb056cf
# Parent d1631540bcc4d369d7e7ec1d87e54e1a8f5d5f78
PoD: Allow pod_set_cache_target hypercall to be preempted

For very large VMs, setting the cache target can take long enough that
dom0 complains of soft lockups. Allow the hypercall to be preempted.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Acked-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

Index: xen-4.0.2-testing/xen/arch/x86/domain.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/domain.c
+++ xen-4.0.2-testing/xen/arch/x86/domain.c
@@ -1709,8 +1709,8 @@ int hypercall_xlat_continuation(unsigned
unsigned long nval = 0;
va_list args;

- BUG_ON(*id > 5);
- BUG_ON(mask & (1U << *id));
+ BUG_ON(id && *id > 5);
+ BUG_ON(id && (mask & (1U << *id)));

va_start(args, mask);

Index: xen-4.0.2-testing/xen/arch/x86/mm.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm.c
+++ xen-4.0.2-testing/xen/arch/x86/mm.c
@@ -4547,14 +4547,22 @@ long arch_memory_op(int op, XEN_GUEST_HA
rc = p2m_pod_set_mem_target(d, target.target_pages);
}

- target.tot_pages = d->tot_pages;
- target.pod_cache_pages = d->arch.p2m->pod.count;
- target.pod_entries = d->arch.p2m->pod.entry_count;
-
- if ( copy_to_guest(arg, &target, 1) )
+ if ( rc == -EAGAIN )
+ {
+ rc = hypercall_create_continuation(
+ __HYPERVISOR_memory_op, "lh", op, arg);
+ }
+ else if ( rc >= 0 )
{
- rc= -EFAULT;
- goto pod_target_out_unlock;
+ target.tot_pages = d->tot_pages;
+ target.pod_cache_pages = d->arch.p2m->pod.count;
+ target.pod_entries = d->arch.p2m->pod.entry_count;
+
+ if ( copy_to_guest(arg, &target, 1) )
+ {
+ rc= -EFAULT;
+ goto pod_target_out_unlock;
+ }
}

pod_target_out_unlock:
Index: xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
@@ -383,7 +383,7 @@ static struct page_info * p2m_pod_cache_

/* Set the size of the cache, allocating or freeing as necessary. */
static int
-p2m_pod_set_cache_target(struct domain *d, unsigned long pod_target)
+p2m_pod_set_cache_target(struct domain *d, unsigned long pod_target, int
preemptible)
{
struct p2m_domain *p2md = d->arch.p2m;
int ret = 0;
@@ -416,6 +416,12 @@ p2m_pod_set_cache_target(struct domain *
}

p2m_pod_cache_add(d, page, order);
+
+ if ( hypercall_preempt_check() && preemptible )
+ {
+ ret = -EAGAIN;
+ goto out;
+ }
}

/* Decreasing the target */
@@ -460,6 +466,12 @@ p2m_pod_set_cache_target(struct domain *
put_page(page+i);

put_page(page+i);
+
+ if ( hypercall_preempt_check() && preemptible )
+ {
+ ret = -EAGAIN;
+ goto out;
+ }
}
}

@@ -537,7 +549,7 @@ p2m_pod_set_mem_target(struct domain *d,

ASSERT( pod_target >= p2md->pod.count );

- ret = p2m_pod_set_cache_target(d, pod_target);
+ ret = p2m_pod_set_cache_target(d, pod_target, 1/*preemptible*/);

out:
p2m_unlock(p2md);
@@ -701,7 +713,7 @@ out_entry_check:
/* If we've reduced our "liabilities" beyond our "assets", free some */
if ( p2md->pod.entry_count < p2md->pod.count )
{
- p2m_pod_set_cache_target(d, p2md->pod.entry_count);
+ p2m_pod_set_cache_target(d, p2md->pod.entry_count, 0/*can't preempt*/);
}

out_unlock:
Index: xen-4.0.2-testing/xen/arch/x86/x86_64/compat/mm.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/x86_64/compat/mm.c
+++ xen-4.0.2-testing/xen/arch/x86/x86_64/compat/mm.c
@@ -127,6 +127,9 @@ int compat_arch_memory_op(int op, XEN_GU
if ( rc < 0 )
break;

+ if ( rc == __HYPERVISOR_memory_op )
+ hypercall_xlat_continuation(NULL, 0x2, nat, arg);
+
XLAT_pod_target(&cmp, nat);

if ( copy_to_guest(arg, &cmp, 1) )
++++++ 22781-pod-hap-logdirty.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -20,7 +20,7 @@
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
-@@ -1064,14 +1064,22 @@ p2m_pod_demand_populate(struct domain *d
+@@ -1076,14 +1076,22 @@ p2m_pod_demand_populate(struct domain *d
if ( unlikely(d->is_dying) )
goto out_fail;

@@ -51,7 +51,7 @@

/* Keep track of the highest gfn demand-populated by a guest fault */
if ( q == p2m_guest && gfn > p2md->pod.max_guest )
-@@ -1098,7 +1106,10 @@ p2m_pod_demand_populate(struct domain *d
+@@ -1110,7 +1118,10 @@ p2m_pod_demand_populate(struct domain *d
set_p2m_entry(d, gfn_aligned, mfn, order, p2m_ram_rw);

for( i = 0 ; i < (1UL << order) ; i++ )

++++++ 22789-i386-no-x2apic.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -30,7 +30,7 @@
int directed_eoi_enabled __read_mostly = 0;

/*
-@@ -959,6 +961,10 @@ void x2apic_setup(void)
+@@ -956,6 +958,10 @@ void x2apic_setup(void)
if ( !cpu_has_x2apic )
return;

@@ -41,7 +41,7 @@
if ( !opt_x2apic )
{
if ( !x2apic_enabled )
-@@ -1020,6 +1026,7 @@ restore_out:
+@@ -1017,6 +1023,7 @@ restore_out:
unmask_8259A();

out:
@@ -91,7 +91,7 @@
}
--- a/xen/drivers/passthrough/vtd/intremap.c
+++ b/xen/drivers/passthrough/vtd/intremap.c
-@@ -818,6 +818,7 @@ out:
+@@ -824,6 +824,7 @@ out:
spin_unlock_irqrestore(&iommu->register_lock, flags);
}

@@ -99,7 +99,7 @@
/*
* This function is used to enable Interrutp remapping when
* enable x2apic
-@@ -874,6 +875,7 @@ int iommu_enable_IR(void)
+@@ -880,6 +881,7 @@ int iommu_enable_IR(void)

return 0;
}

++++++ 22899-x86-tighten-msr-permissions.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -13,7 +13,7 @@

--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
-@@ -2264,7 +2264,7 @@ static int emulate_privileged_op(struct
+@@ -2268,7 +2268,7 @@ static int emulate_privileged_op(struct
if ( boot_cpu_data.x86_vendor != X86_VENDOR_AMD ||
boot_cpu_data.x86 < 0x10 || boot_cpu_data.x86 > 0x17 )
goto fail;
@@ -22,7 +22,7 @@
break;
if ( (rdmsr_safe(MSR_AMD64_NB_CFG, l, h) != 0) ||
(eax != l) ||
-@@ -2277,7 +2277,7 @@ static int emulate_privileged_op(struct
+@@ -2281,7 +2281,7 @@ static int emulate_privileged_op(struct
if ( boot_cpu_data.x86_vendor != X86_VENDOR_AMD ||
boot_cpu_data.x86 < 0x10 || boot_cpu_data.x86 > 0x17 )
goto fail;
@@ -31,7 +31,7 @@
break;
if ( (rdmsr_safe(MSR_FAM10H_MMIO_CONF_BASE, l, h) != 0) )
goto fail;
-@@ -2299,6 +2299,8 @@ static int emulate_privileged_op(struct
+@@ -2303,6 +2303,8 @@ static int emulate_privileged_op(struct
case MSR_IA32_UCODE_REV:
if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
goto fail;
@@ -40,7 +40,7 @@
if ( rdmsr_safe(regs->ecx, l, h) )
goto fail;
if ( l | h )
-@@ -2306,7 +2308,7 @@ static int emulate_privileged_op(struct
+@@ -2310,7 +2312,7 @@ static int emulate_privileged_op(struct
break;
case MSR_IA32_MISC_ENABLE:
if ( rdmsr_safe(regs->ecx, l, h) )
@@ -49,7 +49,7 @@
l = guest_misc_enable(l);
if ( eax != l || edx != h )
goto invalid;
-@@ -2332,7 +2334,7 @@ static int emulate_privileged_op(struct
+@@ -2336,7 +2338,7 @@ static int emulate_privileged_op(struct
case MSR_IA32_THERM_CONTROL:
if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
goto fail;

++++++ 22949-x86-tolerate-serr.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -16,7 +16,7 @@

--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
-@@ -3053,23 +3053,12 @@ static void nmi_dom0_report(unsigned int
+@@ -3057,23 +3057,12 @@ static void nmi_dom0_report(unsigned int
send_guest_trap(d, 0, TRAP_nmi);
}

@@ -44,7 +44,7 @@
}

static void io_check_error(struct cpu_user_regs *regs)
-@@ -3132,7 +3121,7 @@ asmlinkage void do_nmi(struct cpu_user_r
+@@ -3136,7 +3125,7 @@ asmlinkage void do_nmi(struct cpu_user_r
{
reason = inb(0x61);
if ( reason & 0x80 )

++++++ 22998-x86-get_page_from_l1e-retcode.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -19,8 +19,10 @@

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

---- a/xen/arch/x86/mm/shadow/multi.c
-+++ b/xen/arch/x86/mm/shadow/multi.c
+Index: xen-4.0.2-testing/xen/arch/x86/mm/shadow/multi.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/mm/shadow/multi.c
++++ xen-4.0.2-testing/xen/arch/x86/mm/shadow/multi.c
@@ -849,7 +849,7 @@ shadow_get_page_from_l1e(shadow_l1e_t sl
// If a privileged domain is attempting to install a map of a page it does
// not own, we let it succeed anyway.
@@ -58,12 +60,14 @@
if ( shadow_mode_refcounts(d) ) {
TRACE_SHADOW_PATH_FLAG(TRCE_SFLAG_SHADOW_L1_GET_REF);
- if ( shadow_get_page_from_l1e(new_sl1e, d, new_type) == 0 )
-+ if ( shadow_get_page_from_l1e(new_sl1e, d, new_type) < 0 )
++ if ( shadow_get_page_from_l1e(new_sl1e, d, new_type) < 0 )
{
/* Doesn't look like a pagetable. */
flags |= SHADOW_SET_ERROR;
---- a/xen/arch/x86/mm.c
-+++ b/xen/arch/x86/mm.c
+Index: xen-4.0.2-testing/xen/arch/x86/mm.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/mm.c
++++ xen-4.0.2-testing/xen/arch/x86/mm.c
@@ -776,12 +776,12 @@ get_page_from_l1e(
bool_t write;

@@ -181,7 +185,7 @@
return 0;

adjust_guest_l1e(nl1e, pt_dom);
-@@ -4665,7 +4671,7 @@ static int ptwr_emulated_update(
+@@ -4673,7 +4679,7 @@ static int ptwr_emulated_update(

/* Check the new PTE. */
nl1e = l1e_from_intpte(val);

++++++ 23127-vtd-bios-settings.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -38,7 +38,7 @@
__enable_x2apic();

restore_IO_APIC_setup(ioapic_entries);
-@@ -753,7 +753,7 @@ int lapic_suspend(void)
+@@ -750,7 +750,7 @@ int lapic_suspend(void)

local_irq_save(flags);
disable_local_APIC();
@@ -47,7 +47,7 @@
local_irq_restore(flags);
return 0;
}
-@@ -1001,7 +1001,7 @@ void x2apic_setup(void)
+@@ -998,7 +998,7 @@ void x2apic_setup(void)
mask_8259A();
mask_IO_APIC_setup(ioapic_entries);

@@ -109,7 +109,7 @@
#endif // _VTD_EXTERN_H_
--- a/xen/drivers/passthrough/vtd/intremap.c
+++ b/xen/drivers/passthrough/vtd/intremap.c
-@@ -733,6 +733,13 @@ int enable_intremap(struct iommu *iommu,
+@@ -739,6 +739,13 @@ int enable_intremap(struct iommu *iommu,

ASSERT(ecap_intr_remap(iommu->ecap) && iommu_intremap);

@@ -123,7 +123,7 @@
ir_ctrl = iommu_ir_ctrl(iommu);
sts = dmar_readl(iommu->reg, DMAR_GSTS_REG);

-@@ -820,10 +827,10 @@ out:
+@@ -826,10 +833,10 @@ out:

#ifndef __i386__
/*
@@ -136,7 +136,7 @@
{
struct acpi_drhd_unit *drhd;
struct iommu *iommu;
-@@ -831,6 +838,9 @@ int iommu_enable_IR(void)
+@@ -837,6 +844,9 @@ int iommu_enable_IR(void)
if ( !iommu_supports_eim() )
return -1;

@@ -146,7 +146,7 @@
for_each_drhd_unit ( drhd )
{
struct qi_ctrl *qi_ctrl = NULL;
-@@ -881,7 +891,7 @@ int iommu_enable_IR(void)
+@@ -887,7 +897,7 @@ int iommu_enable_IR(void)
* This function is used to disable Interrutp remapping when
* suspend local apic
*/
@@ -157,9 +157,9 @@

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
-@@ -1937,7 +1937,7 @@ static int init_vtd_hw(void)
- if ( enable_intremap(iommu, 0) != 0 )
+@@ -1949,7 +1949,7 @@ static int init_vtd_hw(void)
{
+ iommu_intremap = 0;
dprintk(XENLOG_WARNING VTDPREFIX,
- "Failed to enable Interrupt Remapping!\n");
+ "Interrupt Remapping not enabled\n");

++++++ 23298-hvmop-get-mem-type.patch ++++++
References: bnc#684297

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1304512678 -3600
# Node ID 26413986e6e06cedc2eb96c4b3c4b37f2df12125
# Parent 10f27b8b3d63959c7a8e15299a7a398b7ff7f230
x86/mm: add HVMOP_get_mem_type hvmop

The balloon driver in the guest frees guest pages and marks them as
mmio. When the kernel crashes and the crash kernel attempts to read the
oldmem via /proc/vmcore a read from ballooned pages will generate 100%
load in dom0 because Xen asks qemu-dm for the page content. Since the
reads come in as 8byte requests each ballooned page is tried 512 times.

Add a new hvmop HVMOP_get_mem_type to return the hvmmem_type_t for the
given pfn. Pages which are neither ram or mmio will be HVMMEM_mmio_dm.
This interface enables the crash kernel to skip ballooned pages.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Acked-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Committed-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

Index: xen-4.0.2-testing/xen/arch/ia64/vmx/vmx_hypercall.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/ia64/vmx/vmx_hypercall.c
+++ xen-4.0.2-testing/xen/arch/ia64/vmx/vmx_hypercall.c
@@ -217,6 +217,7 @@ do_hvm_op(unsigned long op, XEN_GUEST_HA
break;
}

+ case HVMOP_get_mem_type:
case HVMOP_set_mem_type:
rc = -ENOSYS;
break;
Index: xen-4.0.2-testing/xen/arch/x86/hvm/hvm.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/hvm/hvm.c
+++ xen-4.0.2-testing/xen/arch/x86/hvm/hvm.c
@@ -3026,6 +3026,37 @@ long do_hvm_op(unsigned long op, XEN_GUE
break;
}

+ case HVMOP_get_mem_type:
+ {
+ struct xen_hvm_get_mem_type a;
+ struct domain *d;
+ p2m_type_t t;
+
+ if ( copy_from_guest(&a, arg, 1) )
+ return -EFAULT;
+
+ rc = rcu_lock_target_domain_by_id(a.domid, &d);
+ if ( rc != 0 )
+ return rc;
+
+ rc = -EINVAL;
+ if ( is_hvm_domain(d) )
+ {
+ gfn_to_mfn_unshare(d, a.pfn, &t, 0);
+ if ( p2m_is_mmio(t) )
+ a.mem_type = HVMMEM_mmio_dm;
+ else if ( p2m_is_readonly(t) )
+ a.mem_type = HVMMEM_ram_ro;
+ else if ( p2m_is_ram(t) )
+ a.mem_type = HVMMEM_ram_rw;
+ else
+ a.mem_type = HVMMEM_mmio_dm;
+ rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
+ }
+ rcu_unlock_domain(d);
+ break;
+ }
+
case HVMOP_set_mem_type:
{
struct xen_hvm_set_mem_type a;
Index: xen-4.0.2-testing/xen/include/public/hvm/hvm_op.h
===================================================================
--- xen-4.0.2-testing.orig/xen/include/public/hvm/hvm_op.h
+++ xen-4.0.2-testing/xen/include/public/hvm/hvm_op.h
@@ -75,6 +75,12 @@ DEFINE_XEN_GUEST_HANDLE(xen_hvm_set_pci_
/* Flushes all VCPU TLBs: @arg must be NULL. */
#define HVMOP_flush_tlbs 5

+typedef enum {
+ HVMMEM_ram_rw, /* Normal read/write guest RAM */
+ HVMMEM_ram_ro, /* Read-only; writes are discarded */
+ HVMMEM_mmio_dm, /* Reads and write go to the device model */
+} hvmmem_type_t;
+
/* Following tools-only interfaces may change in future. */
#if defined(__XEN__) || defined(__XEN_TOOLS__)

@@ -108,11 +114,6 @@ typedef struct xen_hvm_modified_memory x
DEFINE_XEN_GUEST_HANDLE(xen_hvm_modified_memory_t);

#define HVMOP_set_mem_type 8
-typedef enum {
- HVMMEM_ram_rw, /* Normal read/write guest RAM */
- HVMMEM_ram_ro, /* Read-only; writes are discarded */
- HVMMEM_mmio_dm, /* Reads and write go to the device model */
-} hvmmem_type_t;
/* Notify that a region of memory is to be treated in a specific way. */
struct xen_hvm_set_mem_type {
/* Domain to be updated. */
@@ -129,6 +130,20 @@ DEFINE_XEN_GUEST_HANDLE(xen_hvm_set_mem_

#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */

+#define HVMOP_get_mem_type 15
+/* Return hvmmem_type_t for the specified pfn. */
+struct xen_hvm_get_mem_type {
+ /* Domain to be queried. */
+ domid_t domid;
+ /* OUT variable. */
+ uint16_t mem_type;
+ uint16_t pad[2]; /* align next field on 8-byte boundary */
+ /* IN variable. */
+ uint64_t pfn;
+};
+typedef struct xen_hvm_get_mem_type xen_hvm_get_mem_type_t;
+DEFINE_XEN_GUEST_HANDLE(xen_hvm_get_mem_type_t);
+
/* Hint from PV drivers for pagetable destruction. */
#define HVMOP_pagetable_dying 9
struct xen_hvm_pagetable_dying {
++++++ 23505-x86-cpu-add-arg-check.patch ++++++
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1307689724 -3600
# Node ID 5a557fda70a99d287735b53957e865c8dac0e351
# Parent c34604d5a29336d902837542b915d3b09b27a361
x86: Fix argument checking in (privileged) function cpu_add().

Thanks to John McDermott <john.mcdermott@xxxxxxxxxxxx> for spotting.

Signed-off-by: Keir Fraser <keir@xxxxxxx>

--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -1476,7 +1476,9 @@ int cpu_add(uint32_t apic_id, uint32_t a
dprintk(XENLOG_DEBUG, "cpu_add apic_id %x acpi_id %x pxm %x\n",
apic_id, acpi_id, pxm);

- if ( acpi_id > MAX_MADT_ENTRIES || apic_id > MAX_APICS || pxm > 256 )
+ if ( (acpi_id >= MAX_MADT_ENTRIES) ||
+ (apic_id >= MAX_APICS) ||
+ (pxm >= 256) )
return -EINVAL;

/* Detect if the cpu has been added before */
++++++ 23543-x86_64-m2v-assert.patch ++++++
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1308165849 -3600
# Node ID a8edfacd4b5e2cecb78d2ff93e57e7efa1bf2db2
# Parent 23c068b109236657ededa3e3b7f180346a5cd9f9
x86-64: fix incorrect assertion in __maddr_to_virt()

When memory map sparseness reduction is in use, machine address ranges
can't validly be compared directly against the total size of the
direct mapping range.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/xen/include/asm-x86/x86_64/page.h
+++ b/xen/include/asm-x86/x86_64/page.h
@@ -81,7 +81,7 @@ static inline unsigned long __virt_to_ma

static inline void *__maddr_to_virt(unsigned long ma)
{
- ASSERT(ma < DIRECTMAP_VIRT_END - DIRECTMAP_VIRT_START);
+ ASSERT(pfn_to_pdx(ma >> PAGE_SHIFT) < (DIRECTMAP_SIZE >> PAGE_SHIFT));
return (void *)(DIRECTMAP_VIRT_START +
((ma & ma_va_bottom_mask) |
((ma & ma_top_mask) >> pfn_pdx_hole_shift)));
++++++ 23546-fucomip.patch ++++++
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1308167438 -3600
# Node ID b58c4ec2f6939b31d56307599b517b5bcfc90279
# Parent 649372e3d46a795040a358075869336b15b6b627
x86_emulate: Fix decode of FUCOMIP %stN.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset: 23546:d25f2c114ace
xen-unstable date: Wed Jun 15 20:33:58 2011 +0100

--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -2936,8 +2936,8 @@ x86_emulate(
dst.reg = (unsigned long *)&_regs.eax;
emulate_fpu_insn_memdst("fnstsw", dst.val);
break;
+ case 0xe8 ... 0xef: /* fucomip %stN */
case 0xf0 ... 0xf7: /* fcomip %stN */
- case 0xf8 ... 0xff: /* fucomip %stN */
emulate_fpu_insn_stub(0xdf, modrm);
break;
default:
++++++ 23676-x86_64-alias-mappings.patch ++++++
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1310631973 -3600
# Node ID 80c9db90bba96e443a22d268c06948fdef9c6a75
# Parent 88823213a4780ebced6d7adcb1ffd2dda6a339ca
x86-64: properly handle alias mappings beyond _end

Changeset 19632:b0966b6f5180 wasn't really complete: The Xen image
mapping doesn't end at _end, but a full 16Mb gets mapped during boot
(and never got unmapped so far), hence all of this space was subject
to alias mappings when it comes to cache attribute changes. Unmap all
full large pages between _end and the 16Mb boundary, and include all
other pages beyond _end when checking for aliases.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -749,7 +749,7 @@ static int update_xen_mappings(unsigned
int err = 0;
#ifdef __x86_64__
bool_t alias = mfn >= PFN_DOWN(xen_phys_start) &&
- mfn < PFN_UP(xen_phys_start + (unsigned long)_end - XEN_VIRT_START);
+ mfn < PFN_UP(xen_phys_start + xen_virt_end - XEN_VIRT_START);
unsigned long xen_va =
XEN_VIRT_START + ((mfn - PFN_DOWN(xen_phys_start)) << PAGE_SHIFT);

--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -103,6 +103,8 @@ unsigned long __read_mostly xen_phys_sta
/* Limits of Xen heap, used to initialise the allocator. */
unsigned long __initdata xenheap_initial_phys_start;
unsigned long __read_mostly xenheap_phys_end;
+#else
+unsigned long __read_mostly xen_virt_end;
#endif

DEFINE_PER_CPU_READ_MOSTLY(struct desc_struct *, gdt_table) =
boot_cpu_gdt_table;
@@ -926,6 +928,12 @@ void __init __start_xen(unsigned long mb
init_boot_pages(map_s, e);
}

+#ifdef CONFIG_X86_64
+ xen_virt_end = ((unsigned long)_end + (1UL << L2_PAGETABLE_SHIFT) - 1) &
+ ~((1UL << L2_PAGETABLE_SHIFT) - 1);
+ destroy_xen_mappings(xen_virt_end, XEN_VIRT_START + (16UL << 20));
+#endif
+
memguard_init();

nr_pages = 0;
--- a/xen/include/asm-x86/x86_64/page.h
+++ b/xen/include/asm-x86/x86_64/page.h
@@ -32,6 +32,8 @@
#include <xen/config.h>
#include <asm/types.h>

+extern unsigned long xen_virt_end;
+
extern unsigned long max_pdx;
extern unsigned long pfn_pdx_bottom_mask, ma_va_bottom_mask;
extern unsigned int pfn_pdx_hole_shift;
++++++ 23706-x86-migration.patch ++++++
References: bnc#689954

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1310804301 -3600
# Node ID 3dd399873c9ef7762f4353f3259e502394f56a34
# Parent 24e9ca968a2bc09d1aac927fcdbb7b769901d067
x86: fix guest migration after c/s 20892:d311d1efc25e

Guests would not manage to run successfully after being migrated to a
host having sufficiently much more memory than the host they were
originally started on.

Subsequently the plan is to re-enable the changes behavior under the
control of a guest kernel announced feature flag.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4512,7 +4512,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
.max_mfn = MACH2PHYS_NR_ENTRIES - 1
};

- if ( !mem_hotplug )
+ if ( !mem_hotplug && current->domain == dom0 )
mapping.max_mfn = max_page - 1;
if ( copy_to_guest(arg, &mapping, 1) )
return -EFAULT;
++++++ block-npiv ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -64,6 +64,8 @@
exit 0
fi

+ delete_vhost $vhost
+
exit 4
;;


++++++ block-npiv-common.sh ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:36.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:36.000000000 +0200
@@ -74,14 +74,37 @@
if [ -e $shost/vport_create ] ; then
fchost=`ls -d $shost/device/fc_host*`
# is the link up, w/ NPIV support ?
- pstate=`cat $fchost/port_state`
- ptype=`cat $fchost/port_type | cut -c 1-5`
- fname=`cat $fchost/fabric_name | sed -e s/^0x//`
- if [ $pstate = "Online" -a $ptype = "NPort" -a $fname = $1 ] ; then
- vmax=`cat $shost/max_npiv_vports`
- vinuse=`cat $shost/npiv_vports_inuse`
- avail=`expr $vmax - $vinuse`
- if [ $avail -gt 0 ] ; then
+ if [ -e $fchost/port_state ] ; then
+ pstate=`cat $fchost/port_state`
+ ptype=`cat $fchost/port_type | cut -c 1-5`
+ fname=`cat $fchost/fabric_name | sed -e s/^0x//`
+ if [ $pstate = "Online" -a $ptype = "NPort" -a $fname = $1 ] ; then
+ vmax=`cat $shost/max_npiv_vports`
+ vinuse=`cat $shost/npiv_vports_inuse`
+ avail=`expr $vmax - $vinuse`
+ if [ $avail -gt 0 ] ; then
+ # create the vport
+ echo $2":"$3 > $shost/vport_create
+ if [ $? -eq 0 ] ; then
+ return 0
+ fi
+ # failed - so we'll just look for the next adapter
+ fi
+ fi
+ fi
+ fi
+ done
+
+ # BFA are under adapter scsi_host
+ for shost in /sys/class/scsi_host/* ; do
+ if [ -e $shost/vport_create ] ; then
+ fchost=`ls -d $shost/device/fc_host/*`
+ # is the link up, w/ NPIV support ?
+ if [ -e $fchost/port_state ] ; then
+ pstate=`cat $fchost/port_state`
+ ptype=`cat $fchost/port_type | cut -c 1-5`
+ fname=`cat $fchost/fabric_name | sed -e s/^0x//`
+ if [ $pstate = "Online" -a $ptype = "NPort" -a $fname = $1 ] ; then
# create the vport
echo $2":"$3 > $shost/vport_create
if [ $? -eq 0 ] ; then
@@ -194,6 +217,18 @@
return
fi

+ # BFA
+ if test -e /sys/class/fc_host/$1/device/../scsi_host/*/driver_name ; then
+ shost=`ls -1d /sys/class/fc_host/$1/device/../scsi_host/* | sed
s#.*scsi_host/##`
+ vportwwpn=`cat /sys/class/fc_host/$1/port_name | sed s/^0x//`
+ vportwwnn=`cat /sys/class/fc_host/$1/node_name | sed s/^0x//`
+ echo "$vportwwpn:$vportwwnn" > /sys/class/scsi_host/$shost/vport_delete
+ if test $? -ne 0 ; then exit 6; fi
+ sleep 4
+ return
+ fi
+
+
exit 6
}


++++++ cpupools-core.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -1,7 +1,9 @@
From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>

---- a/xen/arch/x86/acpi/power.c
-+++ b/xen/arch/x86/acpi/power.c
+Index: xen-4.0.2-testing/xen/arch/x86/acpi/power.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/acpi/power.c
++++ xen-4.0.2-testing/xen/arch/x86/acpi/power.c
@@ -236,7 +236,7 @@ static int enter_state(u32 state)
return error;
}
@@ -20,8 +22,10 @@
}

static int acpi_get_wake_status(void)
---- a/xen/arch/x86/domain.c
-+++ b/xen/arch/x86/domain.c
+Index: xen-4.0.2-testing/xen/arch/x86/domain.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/domain.c
++++ xen-4.0.2-testing/xen/arch/x86/domain.c
@@ -1527,42 +1527,52 @@ void sync_vcpu_execstate(struct vcpu *v)
}

@@ -135,8 +139,10 @@
return 0;
}

---- a/xen/arch/x86/domain_build.c
-+++ b/xen/arch/x86/domain_build.c
+Index: xen-4.0.2-testing/xen/arch/x86/domain_build.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/domain_build.c
++++ xen-4.0.2-testing/xen/arch/x86/domain_build.c
@@ -9,6 +9,7 @@
#include <xen/lib.h>
#include <xen/ctype.h>
@@ -177,8 +183,10 @@

/* Set up CR3 value for write_ptbase */
if ( paging_mode_enabled(d) )
---- a/xen/arch/x86/microcode.c
-+++ b/xen/arch/x86/microcode.c
+Index: xen-4.0.2-testing/xen/arch/x86/microcode.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/microcode.c
++++ xen-4.0.2-testing/xen/arch/x86/microcode.c
@@ -114,7 +114,7 @@ static int microcode_update_cpu(const vo
return err;
}
@@ -206,8 +214,10 @@
+ return continue_hypercall_on_cpu(info->cpu, NULL,
+ do_microcode_update, info);
}
---- a/xen/arch/x86/mm.c
-+++ b/xen/arch/x86/mm.c
+Index: xen-4.0.2-testing/xen/arch/x86/mm.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/mm.c
++++ xen-4.0.2-testing/xen/arch/x86/mm.c
@@ -243,7 +243,7 @@ void __init arch_init_memory(void)
* Any Xen-heap pages that we will allow to be mapped will have
* their domain field set to dom_xen.
@@ -234,8 +244,10 @@
BUG_ON(dom_cow == NULL);

/* First 1MB of RAM is historically marked as I/O. */
---- a/xen/arch/x86/platform_hypercall.c
-+++ b/xen/arch/x86/platform_hypercall.c
+Index: xen-4.0.2-testing/xen/arch/x86/platform_hypercall.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/platform_hypercall.c
++++ xen-4.0.2-testing/xen/arch/x86/platform_hypercall.c
@@ -48,12 +48,12 @@ static DEFINE_PER_CPU(uint64_t, freq);
extern int set_px_pminfo(uint32_t cpu, struct xen_processor_performance
*perf);
extern long set_cx_pminfo(uint32_t cpu, struct xen_processor_power *power);
@@ -269,8 +281,10 @@
break;
}
break;
---- a/xen/arch/x86/setup.c
-+++ b/xen/arch/x86/setup.c
+Index: xen-4.0.2-testing/xen/arch/x86/setup.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/setup.c
++++ xen-4.0.2-testing/xen/arch/x86/setup.c
@@ -2,6 +2,7 @@
#include <xen/init.h>
#include <xen/lib.h>
@@ -279,7 +293,7 @@
#include <xen/domain.h>
#include <xen/serial.h>
#include <xen/softirq.h>
-@@ -245,7 +246,7 @@ static void __init init_idle_domain(void
+@@ -247,7 +248,7 @@ static void __init init_idle_domain(void
/* Domain creation requires that scheduler structures are initialised. */
scheduler_init();

@@ -288,7 +302,7 @@
if ( idle_domain == NULL )
BUG();
idle_domain->vcpu = idle_vcpu;
-@@ -1121,8 +1122,13 @@ void __init __start_xen(unsigned long mb
+@@ -1129,8 +1130,13 @@ void __init __start_xen(unsigned long mb
if ( !tboot_protect_mem_regions() )
panic("Could not protect TXT memory regions\n");

@@ -303,8 +317,10 @@
if ( (dom0 == NULL) || (alloc_dom0_vcpu0() == NULL) )
panic("Error creating domain 0\n");

---- a/xen/arch/x86/smpboot.c
-+++ b/xen/arch/x86/smpboot.c
+Index: xen-4.0.2-testing/xen/arch/x86/smpboot.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/smpboot.c
++++ xen-4.0.2-testing/xen/arch/x86/smpboot.c
@@ -39,6 +39,7 @@
#include <xen/mm.h>
#include <xen/domain.h>
@@ -365,7 +381,7 @@
spin_unlock(&cpu_add_remove_lock);
return err;
}
-@@ -1568,6 +1573,7 @@ int __devinit __cpu_up(unsigned int cpu)
+@@ -1570,6 +1575,7 @@ int __devinit __cpu_up(unsigned int cpu)
process_pending_softirqs();
}

@@ -373,8 +389,10 @@
cpufreq_add_cpu(cpu);
return 0;
}
---- a/xen/arch/x86/sysctl.c
-+++ b/xen/arch/x86/sysctl.c
+Index: xen-4.0.2-testing/xen/arch/x86/sysctl.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/arch/x86/sysctl.c
++++ xen-4.0.2-testing/xen/arch/x86/sysctl.c
@@ -29,7 +29,7 @@

#define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0)
@@ -393,8 +411,10 @@
break;
case XEN_SYSCTL_CPU_HOTPLUG_STATUS:
ret = 0;
---- a/xen/common/Makefile
-+++ b/xen/common/Makefile
+Index: xen-4.0.2-testing/xen/common/Makefile
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/Makefile
++++ xen-4.0.2-testing/xen/common/Makefile
@@ -1,5 +1,6 @@
obj-y += bitmap.o
obj-y += cpu.o
@@ -402,8 +422,10 @@
obj-y += domctl.o
obj-y += domain.o
obj-y += event_channel.o
+Index: xen-4.0.2-testing/xen/common/cpupool.c
+===================================================================
--- /dev/null
-+++ b/xen/common/cpupool.c
++++ xen-4.0.2-testing/xen/common/cpupool.c
@@ -0,0 +1,609 @@

+/******************************************************************************
+ * cpupool.c
@@ -1014,8 +1036,10 @@
+ * indent-tabs-mode: nil
+ * End:
+ */
---- a/xen/common/domain.c
-+++ b/xen/common/domain.c
+Index: xen-4.0.2-testing/xen/common/domain.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/domain.c
++++ xen-4.0.2-testing/xen/common/domain.c
@@ -209,7 +209,7 @@ static void __init parse_extra_guest_irq
custom_param("extra_guest_irqs", parse_extra_guest_irqs);

@@ -1044,8 +1068,10 @@
sched_destroy_domain(d);

/* Free page used by xen oprofile buffer. */
---- a/xen/common/domctl.c
-+++ b/xen/common/domctl.c
+Index: xen-4.0.2-testing/xen/common/domctl.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/domctl.c
++++ xen-4.0.2-testing/xen/common/domctl.c
@@ -11,6 +11,7 @@
#include <xen/lib.h>
#include <xen/mm.h>
@@ -1121,8 +1147,10 @@

if ( alloc_vcpu(d, i, cpu) == NULL )
goto maxvcpu_out;
---- a/xen/common/kexec.c
-+++ b/xen/common/kexec.c
+Index: xen-4.0.2-testing/xen/common/kexec.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/kexec.c
++++ xen-4.0.2-testing/xen/common/kexec.c
@@ -228,7 +228,7 @@ void kexec_crash(void)
BUG();
}
@@ -1141,8 +1169,10 @@
#else
one_cpu_only();
machine_reboot_kexec(image); /* Does not return */
---- a/xen/common/sched_credit.c
-+++ b/xen/common/sched_credit.c
+Index: xen-4.0.2-testing/xen/common/sched_credit.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/sched_credit.c
++++ xen-4.0.2-testing/xen/common/sched_credit.c
@@ -70,11 +70,15 @@
/*
* Useful macros
@@ -2031,7 +2061,7 @@
.destroy_vcpu = csched_vcpu_destroy,

.sleep = csched_vcpu_sleep,
-@@ -1422,6 +1551,13 @@ const struct scheduler sched_credit_def
+@@ -1422,6 +1551,13 @@ const struct scheduler sched_credit_def
.dump_cpu_state = csched_dump_pcpu,
.dump_settings = csched_dump,
.init = csched_init,
@@ -2045,8 +2075,10 @@

.tick_suspend = csched_tick_suspend,
.tick_resume = csched_tick_resume,
---- a/xen/common/sched_sedf.c
-+++ b/xen/common/sched_sedf.c
+Index: xen-4.0.2-testing/xen/common/sched_sedf.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/sched_sedf.c
++++ xen-4.0.2-testing/xen/common/sched_sedf.c
@@ -21,6 +21,9 @@
printk(_a ); \
} while ( 0 )
@@ -2312,7 +2344,7 @@
.name = "Simple EDF Scheduler",
.opt_name = "sedf",
.sched_id = XEN_SCHEDULER_SEDF,
-@@ -1463,9 +1508,15 @@ const struct scheduler sched_sedf_def =
+@@ -1463,9 +1508,15 @@ const struct scheduler sched_sedf_def =
.init_domain = sedf_init_domain,
.destroy_domain = sedf_destroy_domain,

@@ -2329,8 +2361,10 @@
.do_schedule = sedf_do_schedule,
.pick_cpu = sedf_pick_cpu,
.dump_cpu_state = sedf_dump_cpu_state,
---- a/xen/common/schedule.c
-+++ b/xen/common/schedule.c
+Index: xen-4.0.2-testing/xen/common/schedule.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/schedule.c
++++ xen-4.0.2-testing/xen/common/schedule.c
@@ -53,10 +53,11 @@ static void poll_timer_fn(void *data);

/* This is global for now so that private implementations can reach it */
@@ -2849,8 +2883,10 @@
}

#ifdef CONFIG_COMPAT
---- a/xen/common/softirq.c
-+++ b/xen/common/softirq.c
+Index: xen-4.0.2-testing/xen/common/softirq.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/softirq.c
++++ xen-4.0.2-testing/xen/common/softirq.c
@@ -98,9 +98,11 @@ void raise_softirq(unsigned int nr)
}

@@ -2944,8 +2980,10 @@
open_softirq(TASKLET_SOFTIRQ, tasklet_action);
}

---- a/xen/common/sysctl.c
-+++ b/xen/common/sysctl.c
+Index: xen-4.0.2-testing/xen/common/sysctl.c
+===================================================================
+--- xen-4.0.2-testing.orig/xen/common/sysctl.c
++++ xen-4.0.2-testing/xen/common/sysctl.c
@@ -314,6 +314,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
}
break;
@@ -2961,8 +2999,10 @@
default:
ret = arch_do_sysctl(op, u_sysctl);
break;
---- a/xen/include/asm-x86/domain.h
-+++ b/xen/include/asm-x86/domain.h
+Index: xen-4.0.2-testing/xen/include/asm-x86/domain.h
+===================================================================
+--- xen-4.0.2-testing.orig/xen/include/asm-x86/domain.h
++++ xen-4.0.2-testing/xen/include/asm-x86/domain.h
@@ -458,7 +458,8 @@ struct arch_vcpu
#define hvm_svm hvm_vcpu.u.svm

@@ -2973,8 +3013,10 @@

void vcpu_show_execution_state(struct vcpu *);
void vcpu_show_registers(const struct vcpu *);
---- a/xen/include/public/domctl.h
-+++ b/xen/include/public/domctl.h
+Index: xen-4.0.2-testing/xen/include/public/domctl.h
+===================================================================
+--- xen-4.0.2-testing.orig/xen/include/public/domctl.h
++++ xen-4.0.2-testing/xen/include/public/domctl.h
@@ -60,10 +60,10 @@ struct xen_domctl_createdomain {
/* Should domain memory integrity be verifed by tboot during Sx? */
#define _XEN_DOMCTL_CDF_s3_integrity 2
@@ -3003,8 +3045,10 @@
struct xen_domctl {
uint32_t cmd;
#define XEN_DOMCTL_createdomain 1
---- a/xen/include/public/sysctl.h
-+++ b/xen/include/public/sysctl.h
+Index: xen-4.0.2-testing/xen/include/public/sysctl.h
+===================================================================
+--- xen-4.0.2-testing.orig/xen/include/public/sysctl.h
++++ xen-4.0.2-testing/xen/include/public/sysctl.h
@@ -491,6 +491,28 @@ struct xen_sysctl_lockprof_op {
typedef struct xen_sysctl_lockprof_op xen_sysctl_lockprof_op_t;
DEFINE_XEN_GUEST_HANDLE(xen_sysctl_lockprof_op_t);
@@ -3042,8 +3086,10 @@
uint8_t pad[128];
} u;
};
---- a/xen/include/xen/sched-if.h
-+++ b/xen/include/xen/sched-if.h
+Index: xen-4.0.2-testing/xen/include/xen/sched-if.h
+===================================================================
+--- xen-4.0.2-testing.orig/xen/include/xen/sched-if.h
++++ xen-4.0.2-testing/xen/include/xen/sched-if.h
@@ -10,16 +10,26 @@

#include <xen/percpu.h>
@@ -3135,8 +3181,10 @@
+struct scheduler *scheduler_get_by_id(unsigned int id);
+
#endif /* __XEN_SCHED_IF_H__ */
---- a/xen/include/xen/sched.h
-+++ b/xen/include/xen/sched.h
+Index: xen-4.0.2-testing/xen/include/xen/sched.h
+===================================================================
+--- xen-4.0.2-testing.orig/xen/include/xen/sched.h
++++ xen-4.0.2-testing/xen/include/xen/sched.h
@@ -9,6 +9,7 @@
#include <xen/shared.h>
#include <public/xen.h>
@@ -3145,7 +3193,7 @@
#include <public/vcpu.h>
#include <public/xsm/acm.h>
#include <xen/time.h>
-@@ -132,8 +133,6 @@ struct vcpu
+@@ -132,8 +133,6 @@ struct vcpu
bool_t defer_shutdown;
/* VCPU is paused following shutdown request (d->is_shutting_down)? */
bool_t paused_for_shutdown;
@@ -3218,8 +3266,10 @@
#endif /* __SCHED_H__ */

/*
---- a/xen/include/xen/softirq.h
-+++ b/xen/include/xen/softirq.h
+Index: xen-4.0.2-testing/xen/include/xen/softirq.h
+===================================================================
+--- xen-4.0.2-testing.orig/xen/include/xen/softirq.h
++++ xen-4.0.2-testing/xen/include/xen/softirq.h
@@ -60,6 +60,7 @@ struct tasklet
struct tasklet name = { LIST_HEAD_INIT(name.list), 0, 0, 0, func, data }


++++++ dump-exec-state.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -1,8 +1,6 @@
-Index: xen-4.0.2-testing/xen/arch/ia64/linux-xen/smp.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/ia64/linux-xen/smp.c
-+++ xen-4.0.2-testing/xen/arch/ia64/linux-xen/smp.c
-@@ -94,6 +94,7 @@ static volatile struct call_data_struct
+--- a/xen/arch/ia64/linux-xen/smp.c
++++ b/xen/arch/ia64/linux-xen/smp.c
+@@ -94,6 +94,7 @@ static volatile struct call_data_struct

#define IPI_CALL_FUNC 0
#define IPI_CPU_STOP 1
@@ -34,11 +32,9 @@
int __init
setup_profiling_timer (unsigned int multiplier)
{
-Index: xen-4.0.2-testing/xen/arch/x86/smp.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/smp.c
-+++ xen-4.0.2-testing/xen/arch/x86/smp.c
-@@ -375,11 +375,24 @@ void smp_send_nmi_allbutself(void)
+--- a/xen/arch/x86/smp.c
++++ b/xen/arch/x86/smp.c
+@@ -370,11 +370,24 @@ void smp_send_nmi_allbutself(void)
send_IPI_mask(&cpu_online_map, APIC_DM_NMI);
}

@@ -63,10 +59,8 @@
set_irq_regs(old_regs);
}

-Index: xen-4.0.2-testing/xen/common/keyhandler.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/common/keyhandler.c
-+++ xen-4.0.2-testing/xen/common/keyhandler.c
+--- a/xen/common/keyhandler.c
++++ b/xen/common/keyhandler.c
@@ -71,19 +71,52 @@ static struct keyhandler show_handlers_k
.desc = "show this message"
};
@@ -157,10 +151,8 @@

printk("\n");

-Index: xen-4.0.2-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h
-+++ xen-4.0.2-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
+--- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h
++++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h
@@ -278,7 +278,7 @@ struct switch_stack {
# define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) +
IA64_STK_OFFSET)) - 1)
# define ia64_psr(regs) ((struct ia64_psr *)
&(regs)->cr_ipsr)
@@ -170,10 +162,8 @@
# define guest_kernel_mode(regs) (ia64_psr(regs)->cpl ==
CONFIG_CPL0_EMUL)
# define vmx_guest_kernel_mode(regs) (ia64_psr(regs)->cpl == 0)
# define regs_increment_iip(regs) \
-Index: xen-4.0.2-testing/xen/include/asm-x86/hardirq.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/asm-x86/hardirq.h
-+++ xen-4.0.2-testing/xen/include/asm-x86/hardirq.h
+--- a/xen/include/asm-x86/hardirq.h
++++ b/xen/include/asm-x86/hardirq.h
@@ -8,6 +8,7 @@ typedef struct {
unsigned long __softirq_pending;
unsigned int __local_irq_count;
@@ -182,10 +172,8 @@
} __cacheline_aligned irq_cpustat_t;

#include <xen/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
-Index: xen-4.0.2-testing/xen/include/xen/irq_cpustat.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/xen/irq_cpustat.h
-+++ xen-4.0.2-testing/xen/include/xen/irq_cpustat.h
+--- a/xen/include/xen/irq_cpustat.h
++++ b/xen/include/xen/irq_cpustat.h
@@ -26,5 +26,6 @@ extern irq_cpustat_t irq_stat[];
#define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending)
#define local_irq_count(cpu) __IRQ_STAT((cpu), __local_irq_count)
@@ -193,10 +181,8 @@
+#define state_dump_pending(cpu) __IRQ_STAT((cpu), __state_dump_pending)

#endif /* __irq_cpustat_h */
-Index: xen-4.0.2-testing/xen/include/xen/lib.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/xen/lib.h
-+++ xen-4.0.2-testing/xen/include/xen/lib.h
+--- a/xen/include/xen/lib.h
++++ b/xen/include/xen/lib.h
@@ -116,4 +116,7 @@ extern int tainted;
extern char *print_tainted(char *str);
extern void add_taint(unsigned);
@@ -205,10 +191,8 @@
+void dump_execstate(struct cpu_user_regs *);
+
#endif /* __LIB_H__ */
-Index: xen-4.0.2-testing/xen/include/xen/smp.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/xen/smp.h
-+++ xen-4.0.2-testing/xen/include/xen/smp.h
+--- a/xen/include/xen/smp.h
++++ b/xen/include/xen/smp.h
@@ -13,6 +13,8 @@ extern void smp_send_event_check_mask(co
#define smp_send_event_check_cpu(cpu) \
smp_send_event_check_mask(cpumask_of(cpu))

++++++ hotplug-block-losetup-a.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -29,7 +29,7 @@
- cut -d : -f 1)
- for dev in "$shared_list"
+ shared_list=$(losetup -a |
-+ sed -n -e
"s@^\([^:]\+\)\(:[[:blank:]]\[${dev}\]:${inode}[[:blank:]](.*)\)@\1@p" )
++ sed -n -e
"s@^\([^:]\+\)\(:[[:blank:]]\[0*${dev}\]:${inode}[[:blank:]](.*)\)@\1@p" )
+ for dev in $shared_list
do
if [ -n "$dev" ]

++++++ hv_extid_compatibility.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -23,7 +23,7 @@
===================================================================
--- xen-4.0.2-testing.orig/tools/python/xen/xend/image.py
+++ xen-4.0.2-testing/tools/python/xen/xend/image.py
-@@ -839,6 +839,7 @@ class HVMImageHandler(ImageHandler):
+@@ -842,6 +842,7 @@ class HVMImageHandler(ImageHandler):

self.apic = int(vmConfig['platform'].get('apic', 0))
self.acpi = int(vmConfig['platform'].get('acpi', 0))

++++++ supported_module.diff ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -2,13 +2,12 @@

Signed-off-by: K. Y. Srinivasan <ksrinivasan@xxxxxxxxxx>

-Index: xen-4.0.2-testing/unmodified_drivers/linux-2.6/Module.supported
-===================================================================
--- /dev/null
-+++ xen-4.0.2-testing/unmodified_drivers/linux-2.6/Module.supported
-@@ -0,0 +1,5 @@
++++ b/unmodified_drivers/linux-2.6/Module.supported
+@@ -0,0 +1,6 @@
+xen-vbd
+xen-platform-pci
+xen-vnif
+xenbus
+xen-balloon
++xen-scsi

++++++ x86-extra-trap-info.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -1,7 +1,5 @@
-Index: xen-4.0.2-testing/xen/arch/x86/x86_32/entry.S
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/x86_32/entry.S
-+++ xen-4.0.2-testing/xen/arch/x86/x86_32/entry.S
+--- a/xen/arch/x86/x86_32/entry.S
++++ b/xen/arch/x86/x86_32/entry.S
@@ -403,21 +403,33 @@ ring1: /* obtain ss/esp from oldss/olde
movl %eax,UREGS_eip+4(%esp)
ret
@@ -46,11 +44,9 @@
domain_crash_synchronous:
pushl $domain_crash_synchronous_string
call printk
-Index: xen-4.0.2-testing/xen/arch/x86/x86_64/entry.S
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/x86_64/entry.S
-+++ xen-4.0.2-testing/xen/arch/x86/x86_64/entry.S
-@@ -421,17 +421,30 @@ create_bounce_frame:
+--- a/xen/arch/x86/x86_64/entry.S
++++ b/xen/arch/x86/x86_64/entry.S
+@@ -429,17 +429,30 @@ create_bounce_frame:
movq %rax,UREGS_rip+8(%rsp)
ret
.section __ex_table,"a"

++++++ x86-ioapic-ack-default.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -1,10 +1,8 @@
Change default IO-APIC ack mode for single IO-APIC systems to old-style.

-Index: xen-4.0.2-testing/xen/arch/x86/io_apic.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/io_apic.c
-+++ xen-4.0.2-testing/xen/arch/x86/io_apic.c
-@@ -1551,7 +1551,7 @@ static unsigned int startup_level_ioapic
+--- a/xen/arch/x86/io_apic.c
++++ b/xen/arch/x86/io_apic.c
+@@ -1552,7 +1552,7 @@ static unsigned int startup_level_ioapic
return 0; /* don't check for pending */
}

@@ -13,7 +11,7 @@
static void setup_ioapic_ack(char *s)
{
if ( !strcmp(s, "old") )
-@@ -2067,6 +2067,8 @@ void __init setup_IO_APIC(void)
+@@ -2058,6 +2058,8 @@ void __init setup_IO_APIC(void)
else
io_apic_irqs = ~PIC_IRQS;


++++++ x86-show-page-walk-early.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -1,7 +1,5 @@
-Index: xen-4.0.2-testing/xen/arch/x86/mm.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/mm.c
-+++ xen-4.0.2-testing/xen/arch/x86/mm.c
+--- a/xen/arch/x86/mm.c
++++ b/xen/arch/x86/mm.c
@@ -154,6 +154,8 @@ unsigned long __read_mostly pdx_group_va
int opt_allow_hugepage;
boolean_param("allowhugepage", opt_allow_hugepage);
@@ -11,11 +9,9 @@
#define l1_disallow_mask(d) \
((d != dom_io) && \
(rangeset_is_empty((d)->iomem_caps) && \
-Index: xen-4.0.2-testing/xen/arch/x86/traps.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/traps.c
-+++ xen-4.0.2-testing/xen/arch/x86/traps.c
-@@ -1354,6 +1354,7 @@ asmlinkage void do_early_page_fault(stru
+--- a/xen/arch/x86/traps.c
++++ b/xen/arch/x86/traps.c
+@@ -1358,6 +1358,7 @@ asmlinkage void do_early_page_fault(stru
unsigned long *stk = (unsigned long *)regs;
printk("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n",
regs->cs, _p(regs->eip), _p(cr2), regs->error_code);
@@ -23,10 +19,8 @@
printk("Stack dump: ");
while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 )
printk("%p ", _p(*stk++));
-Index: xen-4.0.2-testing/xen/arch/x86/x86_32/mm.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/x86_32/mm.c
-+++ xen-4.0.2-testing/xen/arch/x86/x86_32/mm.c
+--- a/xen/arch/x86/x86_32/mm.c
++++ b/xen/arch/x86/x86_32/mm.c
@@ -123,6 +123,8 @@ void __init paging_init(void)
#undef CNT
#undef MFN
@@ -36,10 +30,8 @@
/* Create page tables for ioremap()/map_domain_page_global(). */
for ( i = 0; i < (IOREMAP_MBYTES >> (L2_PAGETABLE_SHIFT - 20)); i++ )
{
-Index: xen-4.0.2-testing/xen/arch/x86/x86_32/traps.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/x86_32/traps.c
-+++ xen-4.0.2-testing/xen/arch/x86/x86_32/traps.c
+--- a/xen/arch/x86/x86_32/traps.c
++++ b/xen/arch/x86/x86_32/traps.c
@@ -161,7 +161,8 @@ void show_page_walk(unsigned long addr)
l3t += (cr3 & 0xFE0UL) >> 3;
l3e = l3t[l3_table_offset(addr)];
@@ -70,10 +62,8 @@
printk(" L1[0x%03lx] = %"PRIpte" %08lx\n",
l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
unmap_domain_page(l1t);
-Index: xen-4.0.2-testing/xen/arch/x86/x86_64/mm.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/x86_64/mm.c
-+++ xen-4.0.2-testing/xen/arch/x86/x86_64/mm.c
+--- a/xen/arch/x86/x86_64/mm.c
++++ b/xen/arch/x86/x86_64/mm.c
@@ -745,6 +745,8 @@ void __init paging_init(void)
#undef CNT
#undef MFN
@@ -83,10 +73,8 @@
/* Create user-accessible L2 directory to map the MPT for compat guests.
*/
BUILD_BUG_ON(l4_table_offset(RDWR_MPT_VIRT_START) !=
l4_table_offset(HIRO_COMPAT_MPT_VIRT_START));
-Index: xen-4.0.2-testing/xen/arch/x86/x86_64/traps.c
-===================================================================
---- xen-4.0.2-testing.orig/xen/arch/x86/x86_64/traps.c
-+++ xen-4.0.2-testing/xen/arch/x86/x86_64/traps.c
+--- a/xen/arch/x86/x86_64/traps.c
++++ b/xen/arch/x86/x86_64/traps.c
@@ -176,7 +176,8 @@ void show_page_walk(unsigned long addr)
l4t = mfn_to_virt(mfn);
l4e = l4t[l4_table_offset(addr)];
@@ -127,10 +115,8 @@
printk(" L1[0x%03lx] = %"PRIpte" %016lx\n",
l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
}
-Index: xen-4.0.2-testing/xen/include/asm-x86/mm.h
-===================================================================
---- xen-4.0.2-testing.orig/xen/include/asm-x86/mm.h
-+++ xen-4.0.2-testing/xen/include/asm-x86/mm.h
+--- a/xen/include/asm-x86/mm.h
++++ b/xen/include/asm-x86/mm.h
@@ -441,6 +441,8 @@ TYPE_SAFE(unsigned long,mfn);
#define SHARED_M2P_ENTRY (~0UL - 1UL)
#define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY)

++++++ xen-4.0.2-testing-src.tar.bz2 ++++++
old-versions/11.4/UPDATES/all/xen/xen-4.0.2-testing-src.tar.bz2
11.4/xen/xen-4.0.2-testing-src.tar.bz2 differ: char 11, line 1

++++++ xen-config.diff ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -1,17 +1,15 @@
-Index: xen-4.0.2-testing/Config.mk
-===================================================================
---- xen-4.0.2-testing.orig/Config.mk
-+++ xen-4.0.2-testing/Config.mk
-@@ -165,7 +165,7 @@ endif
+--- a/Config.mk
++++ b/Config.mk
+@@ -176,7 +176,7 @@ endif
# Specify which qemu-dm to use. This may be `ioemu' to use the old
# Mercurial in-tree version, or a local directory, or a git URL.
# CONFIG_QEMU ?= ../qemu-xen.git
-CONFIG_QEMU ?= $(QEMU_REMOTE)
+CONFIG_QEMU ?= ioemu-qemu-xen

- QEMU_TAG := xen-4.0.2-rc3
+ QEMU_TAG := xen-4.0.2
#QEMU_TAG ?= 6d5b7ee3acfe8cc10681d2583a38398f7470ec2a
-@@ -181,9 +181,9 @@ CONFIG_OCAML_XENSTORED ?= n
+@@ -192,9 +192,9 @@ CONFIG_OCAML_XENSTORED ?= n
# Optional components
XENSTAT_XENTOP ?= y
VTPM_TOOLS ?= n
@@ -23,10 +21,8 @@

--include $(XEN_ROOT)/.config
+#-include $(XEN_ROOT)/.config
-Index: xen-4.0.2-testing/tools/libxc/Makefile
-===================================================================
---- xen-4.0.2-testing.orig/tools/libxc/Makefile
-+++ xen-4.0.2-testing/tools/libxc/Makefile
+--- a/tools/libxc/Makefile
++++ b/tools/libxc/Makefile
@@ -174,7 +174,8 @@ xc_dom_bzimageloader.opic: CFLAGS += $(c

libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(call zlib-options,l)


++++++ xenconsole-no-multiple-connections.patch ++++++
Index: xen-4.0.2-testing/tools/console/client/main.c
===================================================================
--- xen-4.0.2-testing.orig/tools/console/client/main.c
+++ xen-4.0.2-testing/tools/console/client/main.c
@@ -95,6 +95,7 @@ static int get_pty_fd(struct xs_handle *
* Assumes there is already a watch set in the store for this path. */
{
struct timeval tv;
+ struct flock lock;
fd_set watch_fdset;
int xs_fd = xs_fileno(xs), pty_fd = -1;
int start, now;
@@ -121,6 +122,12 @@ static int get_pty_fd(struct xs_handle *
if (pty_fd == -1)
err(errno, "Could not open tty `%s'",
pty_path);
+ memset(&lock, 0, sizeof(lock));
+ lock.l_type = F_WRLCK;
+ lock.l_whence = SEEK_SET;
+ if (fcntl(pty_fd, F_SETLK, &lock) != 0)
+ err(errno, "Could not lock tty '%s'",
+ pty_path);
free(pty_path);
}
}
++++++ xend-config-enable-dump-comment.patch ++++++
bnc#684305

---
tools/examples/xend-config.sxp | 3 +++
1 file changed, 3 insertions(+)

Index: xen-4.0.2-testing/tools/examples/xend-config.sxp
===================================================================
--- xen-4.0.2-testing.orig/tools/examples/xend-config.sxp
+++ xen-4.0.2-testing/tools/examples/xend-config.sxp
@@ -234,6 +234,9 @@
(dom0-cpus 0)

# Whether to enable core-dumps when domains crash.
+# This setting overrides the per-domain dump value 'on_crash' and causes a
+# core dump on all crashed domains. For finer grain control, it is best to
+# disable this setting (which is default) and use the per-domain controls.
#(enable-dump no)

# The tool used for initiating virtual TPM migration
++++++ xend-domain-lock.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -2,7 +2,7 @@
===================================================================
--- xen-4.0.2-testing.orig/tools/examples/xend-config.sxp
+++ xen-4.0.2-testing/tools/examples/xend-config.sxp
-@@ -305,6 +305,65 @@
+@@ -308,6 +308,65 @@
# device assignment could really work properly even after we do this.
#(pci-passthrough-strict-check yes)


++++++ xend-validate-nic-model.patch ++++++
Do not invoke qemu with unsupported NIC model

Unlike xmdomain.cfg config format, libvirt does not distinguish between
'model' and 'type' in its vif XML, which is correct IMO since netfront
(pv NIC) is just another NIC model. libvirt maps a model of type netfront
to 'type=netfront', and all other models to 'type=ioemu,model=user-val'.
For example

libvirt vif XML xmdomain.cfg
<model type='netfrond'/> vif=[ 'type=netfrond' ]
<model type='user-val'/> vif=[ 'type=ioemu,model=user-val' ]

In the latter case, qemu-dm is invoked with

-net nic,vlan=1,macaddr=00:16:3e:3b:c6:0d,model=user-val,bridge=br0

which causes qemu-dm to exit with failure if user-val is not a
supported NIC model. Since monitoring qemu-dm exit is asynchronous
wrt domain creation, it appears the domain was successfully created from
the client's (xm, libvirt, etc.) perspective when in fact it was not.

This patch simply checks that the specifed NIC model is supported by
qemu-dm, and raises a VmError if not. qemu will report supported models
when invoked with '-net nic,model=?'. It will also list supported models
when invoked with an unsupported one.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>


Index: xen-4.0.2-testing/tools/python/xen/xend/image.py
===================================================================
--- xen-4.0.2-testing.orig/tools/python/xen/xend/image.py
+++ xen-4.0.2-testing/tools/python/xen/xend/image.py
@@ -50,6 +50,9 @@ MAX_GUEST_CMDLINE = 1024
sentinel_path_prefix = '/var/run/xend/dm-'
sentinel_fifos_inuse = { }

+supported_nic_models = ['ne2k_pci', 'i82551', 'i82557b', 'i82559er',
+ 'rtl8139', 'e1000', 'pcnet', 'virtio']
+
def cleanup_stale_sentinel_fifos():
for path in glob.glob(sentinel_path_prefix + '*.fifo'):
if path in sentinel_fifos_inuse: continue
@@ -925,6 +928,10 @@ class HVMImageHandler(ImageHandler):
raise VmError("MAC address not specified or generated.")
bridge = devinfo.get('bridge', None)
model = devinfo.get('model', 'rtl8139')
+ if model not in supported_nic_models:
+ raise VmError("Emulation of NIC model '%s' is not supported" %
+ model)
+
ret.append("-net")
net = "nic,vlan=%d,macaddr=%s,model=%s" % (nics, mac, model)
if bridge:
++++++ xenpaging.autostart.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -149,7 +149,7 @@
===================================================================
--- xen-4.0.2-testing.orig/tools/python/xen/xend/image.py
+++ xen-4.0.2-testing/tools/python/xen/xend/image.py
-@@ -122,12 +122,14 @@ class ImageHandler:
+@@ -125,12 +125,14 @@ class ImageHandler:
self.vm.permissionsVm("image/cmdline", { 'dom': self.vm.getDomid(),
'read': True } )

self.device_model = vmConfig['platform'].get('device_model')
@@ -164,7 +164,7 @@
rtc_timeoffset = int(vmConfig['platform'].get('rtc_timeoffset', 0))
if int(vmConfig['platform'].get('localtime', 0)):
if time.localtime(time.time())[8]:
-@@ -392,6 +394,90 @@ class ImageHandler:
+@@ -395,6 +397,90 @@ class ImageHandler:
sentinel_fifos_inuse[sentinel_path_fifo] = 1
self.sentinel_path_fifo = sentinel_path_fifo


++++++ xenpaging.autostart_delay.patch ++++++
Subject: xenpaging: add dynamic startup delay for xenpaging

This is a debug helper. Since the xenpaging support is still fragile, run
xenpaging at different stages in the bootprocess. Different delays will trigger
more bugs. This implementation starts without delay for 5 reboots, then
increments the delay by 0.1 seconds It uses xenstore for presistant storage of
delay values

TODO: find the correct place to remove the xenstore directory when the guest is
shutdown or crashed

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
tools/python/xen/xend/image.py | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Index: xen-4.0.2-testing/tools/python/xen/xend/image.py
===================================================================
--- xen-4.0.2-testing.orig/tools/python/xen/xend/image.py
+++ xen-4.0.2-testing/tools/python/xen/xend/image.py
@@ -126,6 +126,19 @@ class ImageHandler:

self.device_model = vmConfig['platform'].get('device_model')
self.xenpaging = vmConfig['platform'].get('xenpaging')
+ if self.xenpaging is not "0":
+ self.xenpaging_delay =
xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay" %
self.vm.info['name_label'])
+ if self.xenpaging_delay == None:
+ log.warn("XXX creating /local/domain/0/xenpaging/%s" %
self.vm.info['name_label'])
+ xstransact.Mkdir("/local/domain/0/xenpaging/%s" %
self.vm.info['name_label'])
+ xstransact.Store("/local/domain/0/xenpaging/%s" %
self.vm.info['name_label'], ('xenpaging_delay', '0.0'))
+ xstransact.Store("/local/domain/0/xenpaging/%s" %
self.vm.info['name_label'], ('xenpaging_delay_inc', '0.1'))
+ xstransact.Store("/local/domain/0/xenpaging/%s" %
self.vm.info['name_label'], ('xenpaging_delay_use', '5'))
+ xstransact.Store("/local/domain/0/xenpaging/%s" %
self.vm.info['name_label'], ('xenpaging_delay_used', '0'))
+ self.xenpaging_delay =
float(xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay" %
self.vm.info['name_label']))
+ self.xenpaging_delay_inc =
float(xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay_inc" %
self.vm.info['name_label']))
+ self.xenpaging_delay_use =
int(xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay_use" %
self.vm.info['name_label']))
+ self.xenpaging_delay_used =
int(xstransact.Read("/local/domain/0/xenpaging/%s/xenpaging_delay_used" %
self.vm.info['name_label']))

self.display = vmConfig['platform'].get('display')
self.xauthority = vmConfig['platform'].get('xauthority')
@@ -404,6 +417,17 @@ class ImageHandler:
return
if self.xenpaging_pid:
return
+ if self.xenpaging_delay_used < self.xenpaging_delay_use:
+ self.xenpaging_delay_used += 1
+ else:
+ self.xenpaging_delay_used = 0
+ self.xenpaging_delay += self.xenpaging_delay_inc
+ log.info("delay_used %s" % self.xenpaging_delay_used)
+ log.info("delay_use %s" % self.xenpaging_delay_use)
+ log.info("delay %s" % self.xenpaging_delay)
+ log.info("delay_inc %s" % self.xenpaging_delay_inc)
+ xstransact.Store("/local/domain/0/xenpaging/%s" %
self.vm.info['name_label'], ('xenpaging_delay', self.xenpaging_delay))
+ xstransact.Store("/local/domain/0/xenpaging/%s" %
self.vm.info['name_label'], ('xenpaging_delay_used', self.xenpaging_delay_used))
xenpaging_bin = auxbin.pathTo("xenpaging")
args = [xenpaging_bin]
args = args + ([ "%d" % self.vm.getDomid()])
@@ -432,6 +456,9 @@ class ImageHandler:
except:
log.warn("chdir %s failed" % xenpaging_dir)
try:
+ if self.xenpaging_delay != 0.0:
+ log.info("delaying xenpaging startup %s seconds ..." %
self.xenpaging_delay)
+ time.sleep(self.xenpaging_delay)
log.info("starting %s" % args)
os.execve(xenpaging_bin, args, env)
except Exception, e:
@@ -447,10 +474,16 @@ class ImageHandler:
self.xenpaging_pid = xenpaging_pid
os.close(null)
os.close(logfd)
+ if self.xenpaging_delay == 0.0:
+ log.warn("waiting for xenpaging ...")
+ time.sleep(22)
+ log.warn("waiting for xenpaging done.")

def destroyXenPaging(self):
if self.xenpaging == "0":
return
+ # FIXME find correct place for guest shutdown or crash
+ #xstransact.Remove("/local/domain/0/xenpaging/%s" %
self.vm.info['name_label'])
if self.xenpaging_pid:
try:
os.kill(self.xenpaging_pid, signal.SIGHUP)
++++++ xenpaging.guest_remove_page.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -50,7 +50,7 @@
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
-@@ -2011,12 +2011,15 @@ p2m_remove_page(struct domain *d, unsign
+@@ -2023,12 +2023,15 @@ p2m_remove_page(struct domain *d, unsign

P2M_DEBUG("removing gfn=%#lx mfn=%#lx\n", gfn, mfn);

@@ -71,7 +71,7 @@
}
set_p2m_entry(d, gfn, _mfn(INVALID_MFN), page_order, p2m_invalid);
}
-@@ -2540,6 +2543,35 @@ int p2m_mem_paging_evict(struct domain *
+@@ -2552,6 +2555,35 @@ int p2m_mem_paging_evict(struct domain *
return 0;
}

@@ -107,7 +107,7 @@
void p2m_mem_paging_populate(struct domain *d, unsigned long gfn)
{
struct vcpu *v = current;
-@@ -2604,17 +2636,20 @@ void p2m_mem_paging_resume(struct domain
+@@ -2616,17 +2648,20 @@ void p2m_mem_paging_resume(struct domain
/* Pull the response off the ring */
mem_event_get_response(d, &rsp);


++++++ xenpaging.machine_to_phys_mapping.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -41,7 +41,7 @@
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
-@@ -2606,9 +2606,16 @@ void p2m_mem_paging_resume(struct domain
+@@ -2618,9 +2618,16 @@ void p2m_mem_paging_resume(struct domain

/* Fix p2m entry */
mfn = gfn_to_mfn(d, rsp.gfn, &p2mt);

++++++ xenpaging.optimize_p2m_mem_paging_populate.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -19,7 +19,7 @@
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
-@@ -2578,12 +2578,12 @@ void p2m_mem_paging_populate(struct doma
+@@ -2590,12 +2590,12 @@ void p2m_mem_paging_populate(struct doma
mem_event_request_t req;
p2m_type_t p2mt;

@@ -34,7 +34,7 @@
/* Fix p2m mapping */
/* XXX: It seems inefficient to have this here, as it's only needed
* in one case (ept guest accessing paging out page) */
-@@ -2601,6 +2601,11 @@ void p2m_mem_paging_populate(struct doma
+@@ -2613,6 +2613,11 @@ void p2m_mem_paging_populate(struct doma
vcpu_pause_nosync(v);
req.flags |= MEM_EVENT_FLAG_VCPU_PAUSED;
}

++++++ xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -22,7 +22,7 @@
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
-@@ -2588,7 +2588,7 @@ void p2m_mem_paging_populate(struct doma
+@@ -2600,7 +2600,7 @@ void p2m_mem_paging_populate(struct doma
/* XXX: It seems inefficient to have this here, as it's only needed
* in one case (ept guest accessing paging out page) */
gfn_to_mfn(d, gfn, &p2mt);

++++++ xenpaging.paging_prep_enomem.patch ++++++
--- /var/tmp/diff_new_pack.KzfVOc/_old 2011-07-26 17:11:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KzfVOc/_new 2011-07-26 17:11:37.000000000 +0200
@@ -70,7 +70,7 @@
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
-@@ -2622,7 +2622,7 @@ int p2m_mem_paging_prep(struct domain *d
+@@ -2634,7 +2634,7 @@ int p2m_mem_paging_prep(struct domain *d
/* Get a free page */
page = alloc_domheap_page(d, 0);
if ( unlikely(page == NULL) )


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages