Accepting request 60109 from Virtualization
Accepted submit request 60109 from user charlesa OBS-URL: https://build.opensuse.org/request/show/60109 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xen?expand=0&rev=116
This commit is contained in:
commit
a94943149a
@ -15,10 +15,10 @@ Note: Patch submitted upstream but not (yet) accepted since xend is on
|
||||
|
||||
http://lists.xensource.com/archives/html/xen-devel/2010-12/msg01160.html
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/util/blkif.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/util/blkif.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/util/blkif.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/util/blkif.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/util/blkif.py
|
||||
@@ -79,13 +79,6 @@ def parse_uname(uname):
|
||||
if typ == "phy" and not fn.startswith("/"):
|
||||
fn = "/dev/%s" %(fn,)
|
||||
@ -33,10 +33,10 @@ Index: xen-4.0.1-testing/tools/python/xen/util/blkif.py
|
||||
if typ in ("tap", "tap2"):
|
||||
(taptype, fn) = fn.split(":", 1)
|
||||
if taptype in ("tapdisk", "ioemu"):
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -3283,15 +3283,6 @@ class XendDomainInfo:
|
||||
|
||||
(fn, types) = parse_uname(disk)
|
||||
@ -50,6 +50,6 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
- if state == 'Secondary':
|
||||
- os.system('/sbin/drbdadm primary ' + diskname)
|
||||
-
|
||||
mounted_vbd_uuid = 0
|
||||
def _shouldMount(types):
|
||||
if types[0] in ('file', 'phy'):
|
||||
return False
|
||||
|
@ -54,11 +54,11 @@ up in order for it to be usable.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/io_apic.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/io_apic.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/io_apic.c
|
||||
@@ -2231,6 +2231,7 @@ int __init io_apic_get_redir_entries (in
|
||||
--- 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
|
||||
|
||||
int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low)
|
||||
{
|
||||
@ -66,7 +66,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c
|
||||
struct IO_APIC_route_entry entry;
|
||||
unsigned long flags;
|
||||
int vector;
|
||||
@@ -2282,7 +2283,12 @@ int io_apic_set_pci_routing (int ioapic,
|
||||
@@ -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));
|
||||
set_native_irq_info(irq, TARGET_CPUS);
|
||||
@ -80,10 +80,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/io_apic.c
|
||||
|
||||
return 0;
|
||||
}
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/mpparse.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/mpparse.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/mpparse.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/mpparse.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/mpparse.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/mpparse.c
|
||||
@@ -1102,6 +1102,8 @@ int mp_register_gsi (u32 gsi, int trigge
|
||||
int ioapic = -1;
|
||||
int ioapic_pin = 0;
|
||||
@ -93,9 +93,9 @@ Index: xen-4.0.1-testing/xen/arch/x86/mpparse.c
|
||||
|
||||
/*
|
||||
* Mapping between Global System Interrups, which
|
||||
@@ -1126,8 +1128,13 @@ int mp_register_gsi (u32 gsi, int trigge
|
||||
if (ioapic_renumber_irq)
|
||||
gsi = ioapic_renumber_irq(ioapic, gsi);
|
||||
@@ -1123,8 +1125,13 @@ int mp_register_gsi (u32 gsi, int trigge
|
||||
|
||||
ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
|
||||
|
||||
- if (!(irq_to_desc(gsi)->status & IRQ_DISABLED))
|
||||
+ desc = irq_to_desc(gsi);
|
||||
|
@ -33,10 +33,10 @@ This still needs to be hooked up for ia64.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/setup.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/setup.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/setup.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/setup.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/setup.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/setup.c
|
||||
@@ -664,6 +664,11 @@ void __init __start_xen(unsigned long mb
|
||||
memcpy(&boot_e820, &e820, sizeof(e820));
|
||||
|
||||
@ -49,10 +49,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/setup.c
|
||||
kexec_reserve_area(&boot_e820);
|
||||
|
||||
/*
|
||||
Index: xen-4.0.1-testing/xen/common/kexec.c
|
||||
Index: xen-4.0.2-testing/xen/common/kexec.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/common/kexec.c
|
||||
+++ xen-4.0.1-testing/xen/common/kexec.c
|
||||
--- xen-4.0.2-testing.orig/xen/common/kexec.c
|
||||
+++ xen-4.0.2-testing/xen/common/kexec.c
|
||||
@@ -49,15 +49,109 @@ static unsigned char vmcoreinfo_data[VMC
|
||||
static size_t vmcoreinfo_size = 0;
|
||||
|
||||
@ -166,10 +166,10 @@ Index: xen-4.0.1-testing/xen/common/kexec.c
|
||||
static void one_cpu_only(void)
|
||||
{
|
||||
/* Only allow the first cpu to continue - force other cpus to spin */
|
||||
Index: xen-4.0.1-testing/xen/include/xen/kexec.h
|
||||
Index: xen-4.0.2-testing/xen/include/xen/kexec.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/include/xen/kexec.h
|
||||
+++ xen-4.0.1-testing/xen/include/xen/kexec.h
|
||||
--- xen-4.0.2-testing.orig/xen/include/xen/kexec.h
|
||||
+++ xen-4.0.2-testing/xen/include/xen/kexec.h
|
||||
@@ -12,6 +12,8 @@ typedef struct xen_kexec_reserve {
|
||||
|
||||
extern xen_kexec_reserve_t kexec_crash_area;
|
||||
|
@ -12,10 +12,10 @@ the hypervisor. Add a new MMUEXT operation for this.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/mm.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/mm.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/mm.c
|
||||
@@ -2889,6 +2889,27 @@ int do_mmuext_op(
|
||||
}
|
||||
break;
|
||||
@ -44,10 +44,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/mm.c
|
||||
case MMUEXT_SET_LDT:
|
||||
{
|
||||
unsigned long ptr = op.arg1.linear_addr;
|
||||
Index: xen-4.0.1-testing/xen/include/public/xen.h
|
||||
Index: xen-4.0.2-testing/xen/include/public/xen.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/include/public/xen.h
|
||||
+++ xen-4.0.1-testing/xen/include/public/xen.h
|
||||
--- xen-4.0.2-testing.orig/xen/include/public/xen.h
|
||||
+++ xen-4.0.2-testing/xen/include/public/xen.h
|
||||
@@ -239,6 +239,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
|
||||
*
|
||||
* cmd: MMUEXT_FLUSH_CACHE
|
||||
|
@ -11,10 +11,10 @@ makes sense to also allow HVM guests to make use of it.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/hvm/hvm.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/hvm/hvm.c
|
||||
@@ -603,11 +603,12 @@ static int hvm_load_cpu_ctxt(struct doma
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -42,10 +42,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/hvm.c
|
||||
(!cpu_has_ffxsr && (value & EFER_FFXSE)) )
|
||||
{
|
||||
gdprintk(XENLOG_WARNING, "Trying to set reserved bit in "
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -57,6 +57,9 @@
|
||||
|
||||
u32 svm_feature_flags;
|
||||
@ -86,10 +86,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
return 1;
|
||||
}
|
||||
|
||||
Index: xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/include/asm-x86/hvm/hvm.h
|
||||
+++ xen-4.0.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/hvm/hvm.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
@@ -143,6 +143,7 @@ struct hvm_function_table {
|
||||
|
||||
extern struct hvm_function_table hvm_funcs;
|
||||
|
@ -11,10 +11,10 @@ a tasklet-based alternative mechanism to handle Dom0 state dumps.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/common/keyhandler.c
|
||||
Index: xen-4.0.2-testing/xen/common/keyhandler.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/common/keyhandler.c
|
||||
+++ xen-4.0.1-testing/xen/common/keyhandler.c
|
||||
--- xen-4.0.2-testing.orig/xen/common/keyhandler.c
|
||||
+++ xen-4.0.2-testing/xen/common/keyhandler.c
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
static struct keyhandler *key_table[256];
|
||||
@ -68,7 +68,7 @@ Index: xen-4.0.1-testing/xen/common/keyhandler.c
|
||||
}
|
||||
|
||||
static struct keyhandler dump_dom0_registers_keyhandler = {
|
||||
@@ -434,8 +465,28 @@ static struct keyhandler do_debug_key_ke
|
||||
@@ -439,8 +470,28 @@ static struct keyhandler do_debug_key_ke
|
||||
.desc = "trap to xendbg"
|
||||
};
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284535198 -3600
|
||||
# Node ID 86b99b9ad6ef9492b66c98e2377105f3ea584cbf
|
||||
# Parent 89605b79f56529d34d963d0d91c67c46294a7b7c
|
||||
Fix fd leak in xenstore
|
||||
|
||||
Missing from commit 'libxl: Backported stuff from unstable'
|
||||
Without this change, xs_daemon_open/xs_daemon_close will leak
|
||||
file descriptors.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
|
||||
diff -r 89605b79f565 -r 86b99b9ad6ef tools/xenstore/xs.c
|
||||
--- a/tools/xenstore/xs.c Mon Sep 13 17:51:50 2010 +0100
|
||||
+++ b/tools/xenstore/xs.c Wed Sep 15 08:19:58 2010 +0100
|
||||
@@ -285,6 +285,8 @@
|
||||
mutex_unlock(&h->request_mutex);
|
||||
mutex_unlock(&h->reply_mutex);
|
||||
mutex_unlock(&h->watch_mutex);
|
||||
+
|
||||
+ close_fds_free(h);
|
||||
}
|
||||
|
||||
static bool read_all(int fd, void *data, unsigned int len)
|
@ -7,8 +7,10 @@ x86: Quieten microcode.c during CPU hotplug
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- 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
|
||||
@@ -66,12 +66,10 @@ static void microcode_fini_cpu(int cpu)
|
||||
|
||||
int microcode_resume_cpu(int cpu)
|
||||
|
@ -18,10 +18,10 @@ device is deassigned from a domain.
|
||||
|
||||
Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c
|
||||
Index: xen-4.0.2-testing/xen/drivers/passthrough/vtd/ia64/ats.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/ia64/ats.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c
|
||||
--- 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,
|
||||
return 0;
|
||||
}
|
||||
@ -34,11 +34,11 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/ia64/ats.c
|
||||
int dev_invalidate_iotlb(struct iommu *iommu, u16 did,
|
||||
u64 addr, unsigned int size_order, u64 type)
|
||||
{
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
Index: xen-4.0.2-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -1331,6 +1331,9 @@ static int domain_context_mapping(struct
|
||||
--- 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
|
||||
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 +48,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
break;
|
||||
|
||||
case DEV_TYPE_PCI:
|
||||
@@ -1460,6 +1463,9 @@ static int domain_context_unmap(struct d
|
||||
@@ -1476,6 +1479,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 +58,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
break;
|
||||
|
||||
case DEV_TYPE_PCI:
|
||||
@@ -1788,8 +1794,6 @@ static void setup_dom0_devices(struct do
|
||||
@@ -1805,8 +1811,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 +67,10 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
}
|
||||
}
|
||||
spin_unlock(&pcidevs_lock);
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c
|
||||
Index: xen-4.0.2-testing/xen/drivers/passthrough/vtd/x86/ats.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/x86/ats.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/ats.c
|
||||
--- 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
|
||||
@@ -92,6 +92,9 @@ int ats_device(int seg, int bus, int dev
|
||||
|
||||
pdev = pci_get_pdev(bus, devfn);
|
@ -1,35 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1294742461 0
|
||||
# Node ID 7a203c60d588a7a15a28a6fb16c69feafd157e0d
|
||||
# Parent 64bb7d9904a64cc4561c6d541d857acf46e42180
|
||||
x86: don't crash when a CPU cannot be brought online during boot
|
||||
References: bnc#656369, bnc#658704
|
||||
|
||||
x86_cpu_to_apicid[] gets set to BAD_APICID when bringup of a secondary
|
||||
CPU fails, yet srat_detect_node() wants to use this as array index.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/setup.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/setup.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/setup.c
|
||||
@@ -1103,10 +1103,13 @@ void __init __start_xen(unsigned long mb
|
||||
__cpu_up(i);
|
||||
}
|
||||
|
||||
- /* Set up cpu_to_node[]. */
|
||||
- srat_detect_node(i);
|
||||
- /* Set up node_to_cpumask based on cpu_to_node[]. */
|
||||
- numa_add_cpu(i);
|
||||
+ if ( cpu_online(i) )
|
||||
+ {
|
||||
+ /* Set up cpu_to_node[]. */
|
||||
+ srat_detect_node(i);
|
||||
+ /* Set up node_to_cpumask based on cpu_to_node[]. */
|
||||
+ numa_add_cpu(i);
|
||||
+ }
|
||||
}
|
||||
|
||||
printk("Brought up %ld CPUs\n", (long)num_online_cpus());
|
@ -31,10 +31,10 @@ consume these masks.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/cpu/amd.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/cpu/amd.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/amd.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/cpu/amd.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/cpu/amd.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/cpu/amd.c
|
||||
@@ -33,14 +33,6 @@ void start_svm(struct cpuinfo_x86 *c);
|
||||
static char opt_famrev[14];
|
||||
string_param("cpuid_mask_cpu", opt_famrev);
|
||||
@ -50,7 +50,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/cpu/amd.c
|
||||
static inline void wrmsr_amd(unsigned int index, unsigned int lo,
|
||||
unsigned int hi)
|
||||
{
|
||||
@@ -61,7 +53,7 @@ static inline void wrmsr_amd(unsigned in
|
||||
@@ -102,7 +94,7 @@ static inline int wrmsr_amd_safe(unsigne
|
||||
*
|
||||
* The processor revision string parameter has precedene.
|
||||
*/
|
||||
@ -59,7 +59,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/cpu/amd.c
|
||||
{
|
||||
static unsigned int feat_ecx, feat_edx;
|
||||
static unsigned int extfeat_ecx, extfeat_edx;
|
||||
@@ -76,12 +68,12 @@ static void __devinit set_cpuidmask(stru
|
||||
@@ -117,12 +109,12 @@ static void __devinit set_cpuidmask(stru
|
||||
ASSERT((status == not_parsed) && (smp_processor_id() == 0));
|
||||
status = no_mask;
|
||||
|
||||
@ -78,10 +78,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/cpu/amd.c
|
||||
} else if (*opt_famrev == '\0') {
|
||||
return;
|
||||
} else if (!strcmp(opt_famrev, "fam_0f_rev_c")) {
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/cpu/common.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/cpu/common.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/common.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/cpu/common.c
|
||||
--- 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,15 @@ static int cachesize_override __cpuinitd
|
||||
static int disable_x86_fxsr __cpuinitdata;
|
||||
static int disable_x86_serial_nr __cpuinitdata;
|
||||
@ -98,10 +98,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/cpu/common.c
|
||||
struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
|
||||
|
||||
/*
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/cpu/cpu.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/cpu.h
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/cpu/cpu.h
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/cpu/cpu.h
|
||||
@@ -21,6 +21,9 @@ struct cpu_dev {
|
||||
|
||||
extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM];
|
||||
@ -112,10 +112,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/cpu/cpu.h
|
||||
extern int get_model_name(struct cpuinfo_x86 *c);
|
||||
extern void display_cacheinfo(struct cpuinfo_x86 *c);
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/cpu/intel.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/cpu/intel.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/cpu/intel.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/cpu/intel.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/cpu/intel.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/cpu/intel.c
|
||||
@@ -20,16 +20,6 @@
|
||||
|
||||
extern int trap_init_f00f_bug(void);
|
||||
@ -130,7 +130,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/cpu/intel.c
|
||||
-integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx);
|
||||
-integer_param("cpuid_mask_edx", opt_cpuid_mask_edx);
|
||||
-
|
||||
static int use_xsave = 1;
|
||||
static int use_xsave;
|
||||
boolean_param("xsave", use_xsave);
|
||||
|
||||
@@ -40,24 +30,57 @@ boolean_param("xsave", use_xsave);
|
||||
@ -211,10 +211,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/cpu/intel.c
|
||||
|
||||
/* Work around errata */
|
||||
Intel_errata_workarounds(c);
|
||||
Index: xen-4.0.1-testing/xen/include/asm-x86/msr-index.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/msr-index.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/include/asm-x86/msr-index.h
|
||||
+++ xen-4.0.1-testing/xen/include/asm-x86/msr-index.h
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/msr-index.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/msr-index.h
|
||||
@@ -156,8 +156,10 @@
|
||||
#define MSR_P6_EVNTSEL0 0x00000186
|
||||
#define MSR_P6_EVNTSEL1 0x00000187
|
||||
|
@ -9,10 +9,10 @@ Clear APIC TMICT when we mask APIC LVTT.
|
||||
|
||||
Signed-off-by: Wei Wang <wei.wang2@amd.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/apic.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/apic.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/apic.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/apic.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/apic.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/apic.c
|
||||
@@ -198,6 +198,9 @@ void clear_local_APIC(void)
|
||||
|
||||
maxlvt = get_maxlvt();
|
||||
@ -23,7 +23,7 @@ Index: xen-4.0.1-testing/xen/arch/x86/apic.c
|
||||
/*
|
||||
* Masking an LVT entry on a P6 can trigger a local APIC error
|
||||
* if the vector is zero. Mask LVTERR first to prevent this.
|
||||
@@ -1335,7 +1338,10 @@ void disable_APIC_timer(void)
|
||||
@@ -1327,7 +1330,10 @@ void disable_APIC_timer(void)
|
||||
{
|
||||
if (using_apic_timer) {
|
||||
unsigned long v;
|
||||
@ -35,10 +35,10 @@ Index: xen-4.0.1-testing/xen/arch/x86/apic.c
|
||||
v = apic_read(APIC_LVTT);
|
||||
apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED);
|
||||
}
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/hpet.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/hpet.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/hpet.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/hpet.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/hpet.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/hpet.c
|
||||
@@ -659,8 +659,7 @@ void hpet_broadcast_enter(void)
|
||||
if ( hpet_attach_channel )
|
||||
hpet_attach_channel(cpu, ch);
|
||||
|
@ -17,10 +17,10 @@ guests, meaning that the input to these must be treated as GMFNs.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/libxc/xc_domain_save.c
|
||||
Index: xen-4.0.2-testing/tools/libxc/xc_domain_save.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/libxc/xc_domain_save.c
|
||||
+++ xen-4.0.1-testing/tools/libxc/xc_domain_save.c
|
||||
--- xen-4.0.2-testing.orig/tools/libxc/xc_domain_save.c
|
||||
+++ xen-4.0.2-testing/tools/libxc/xc_domain_save.c
|
||||
@@ -1282,58 +1282,64 @@ int xc_domain_save(int xc_handle, int io
|
||||
goto out;
|
||||
}
|
||||
@ -124,10 +124,10 @@ Index: xen-4.0.1-testing/tools/libxc/xc_domain_save.c
|
||||
if ( write_exact(io_fd, &batch, sizeof(unsigned int)) )
|
||||
{
|
||||
PERROR("Error when writing to state file (2)");
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/domctl.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/domctl.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/domctl.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/domctl.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/domctl.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/domctl.c
|
||||
@@ -206,11 +206,12 @@ long arch_do_domctl(
|
||||
|
||||
for ( j = 0; j < k; j++ )
|
||||
|
@ -7,10 +7,10 @@ cpuidle: fix wrapped ticks calculation for pm timer.
|
||||
|
||||
Signed-off-by: Wei Gang <gang.wei@intel.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -127,9 +127,9 @@ static inline u32 ticks_elapsed(u32 t1,
|
||||
if ( t2 >= t1 )
|
||||
return (t2 - t1);
|
||||
|
@ -16,10 +16,10 @@ validity before doing device_add, there will be no problem.
|
||||
|
||||
Signed-off-by Chunyan Liu <CYLiu@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -847,11 +847,6 @@ class XendDomainInfo:
|
||||
@type dev_config: SXP object (parsed config)
|
||||
"""
|
||||
|
@ -16,10 +16,10 @@ change manually as it had been mangled.)
|
||||
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
Signed-off-by Chunyan Liu <CYLiu@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -847,6 +847,8 @@ class XendDomainInfo:
|
||||
@type dev_config: SXP object (parsed config)
|
||||
"""
|
||||
|
@ -7,10 +7,10 @@ vtd: Only kill_timer() an init_timer()'ed timer.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/io.c
|
||||
Index: xen-4.0.2-testing/xen/drivers/passthrough/io.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/io.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/io.c
|
||||
--- xen-4.0.2-testing.orig/xen/drivers/passthrough/io.c
|
||||
+++ xen-4.0.2-testing/xen/drivers/passthrough/io.c
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
static void hvm_dirq_assist(unsigned long _d);
|
||||
@ -20,10 +20,10 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/io.c
|
||||
{
|
||||
return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE));
|
||||
}
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/pci.c
|
||||
Index: xen-4.0.2-testing/xen/drivers/passthrough/pci.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/pci.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/pci.c
|
||||
--- 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
|
||||
i = find_next_bit(hvm_irq_dpci->mapping, d->nr_pirqs, i + 1) )
|
||||
{
|
||||
@ -35,11 +35,11 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/pci.c
|
||||
|
||||
list_for_each_safe ( digl_list, tmp,
|
||||
&hvm_irq_dpci->mirq[i].digl_list )
|
||||
Index: xen-4.0.1-testing/xen/include/xen/iommu.h
|
||||
Index: xen-4.0.2-testing/xen/include/xen/iommu.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/include/xen/iommu.h
|
||||
+++ xen-4.0.1-testing/xen/include/xen/iommu.h
|
||||
@@ -103,6 +103,7 @@ void hvm_dpci_isairq_eoi(struct domain *
|
||||
--- xen-4.0.2-testing.orig/xen/include/xen/iommu.h
|
||||
+++ xen-4.0.2-testing/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);
|
||||
void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci);
|
||||
|
@ -16,10 +16,10 @@ VM" or " API"
|
||||
|
||||
Signed-off-by James (Song Wei) <jsong@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomain.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomain.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomain.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomain.py
|
||||
@@ -250,6 +250,18 @@ class XendDomain:
|
||||
@return: path to config file.
|
||||
"""
|
||||
@ -39,10 +39,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomain.py
|
||||
|
||||
def _managed_check_point_path(self, domuuid):
|
||||
"""Returns absolute path to check point file for managed domain.
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -327,6 +327,8 @@ class XendDomainInfo:
|
||||
@type info: dictionary
|
||||
@ivar domid: Domain ID (if VM has started)
|
||||
@ -60,10 +60,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
|
||||
maxmem = self.info.get('memory_static_max', 0)
|
||||
memory = self.info.get('memory_dynamic_max', 0)
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/server/SrvDomain.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/server/SrvDomain.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/server/SrvDomain.py
|
||||
@@ -225,6 +225,20 @@ class SrvDomain(SrvDir):
|
||||
self.acceptCommand(req)
|
||||
return self.xd.domain_reset(self.dom.getName())
|
||||
@ -85,10 +85,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/server/SrvDomain.py
|
||||
def op_usb_add(self, op, req):
|
||||
self.acceptCommand(req)
|
||||
return req.threadRequest(self.do_usb_add, op, req)
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xm/main.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xm/main.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xm/main.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xm/main.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xm/main.py
|
||||
@@ -165,6 +165,8 @@ SUBCOMMAND_HELP = {
|
||||
#usb
|
||||
'usb-add' : ('<domain> <[host:bus.addr] [host:vendor_id:product_id]>','Add the usb device to FV VM.'),
|
||||
|
@ -26,8 +26,10 @@ needs to be fixed in future.
|
||||
|
||||
Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
|
||||
--- a/xen/arch/x86/acpi/boot.c
|
||||
+++ b/xen/arch/x86/acpi/boot.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/acpi/boot.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/acpi/boot.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/acpi/boot.c
|
||||
@@ -81,7 +81,7 @@ u8 acpi_enable_value, acpi_disable_value
|
||||
#warning ACPI uses CMPXCHG, i486 and later hardware
|
||||
#endif
|
||||
@ -136,8 +138,10 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
|
||||
/* TBD: Cleanup to allow fallback to MPS */
|
||||
return count;
|
||||
--- a/xen/arch/x86/mpparse.c
|
||||
+++ b/xen/arch/x86/mpparse.c
|
||||
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
|
||||
@@ -838,7 +838,7 @@ void __init mp_register_lapic_address (
|
||||
|
||||
|
||||
@ -147,8 +151,10 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
u8 enabled)
|
||||
{
|
||||
struct mpc_config_processor processor;
|
||||
--- a/xen/arch/x86/srat.c
|
||||
+++ b/xen/arch/x86/srat.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/srat.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/srat.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/srat.c
|
||||
@@ -164,6 +164,36 @@ void __init acpi_numa_slit_init(struct a
|
||||
}
|
||||
#endif
|
||||
@ -186,8 +192,10 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
/* Callback for Proximity Domain -> LAPIC mapping */
|
||||
void __init
|
||||
acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
|
||||
--- a/xen/drivers/acpi/numa.c
|
||||
+++ b/xen/drivers/acpi/numa.c
|
||||
Index: xen-4.0.2-testing/xen/drivers/acpi/numa.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/drivers/acpi/numa.c
|
||||
+++ xen-4.0.2-testing/xen/drivers/acpi/numa.c
|
||||
@@ -90,6 +90,21 @@ void __init acpi_table_print_srat_entry(
|
||||
#endif /* ACPI_DEBUG_OUTPUT */
|
||||
break;
|
||||
@ -253,8 +261,10 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
acpi_table_parse_srat(ACPI_SRAT_PROCESSOR_AFFINITY,
|
||||
acpi_parse_processor_affinity,
|
||||
NR_CPUS);
|
||||
--- a/xen/drivers/acpi/tables.c
|
||||
+++ b/xen/drivers/acpi/tables.c
|
||||
Index: xen-4.0.2-testing/xen/drivers/acpi/tables.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/drivers/acpi/tables.c
|
||||
+++ xen-4.0.2-testing/xen/drivers/acpi/tables.c
|
||||
@@ -63,6 +63,18 @@ void __init acpi_table_print_madt_entry(
|
||||
}
|
||||
break;
|
||||
@ -274,10 +284,11 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
case ACPI_MADT_TYPE_IO_APIC:
|
||||
{
|
||||
struct acpi_madt_io_apic *p =
|
||||
@@ -117,6 +129,24 @@ void __init acpi_table_print_madt_entry(
|
||||
@@ -116,6 +128,24 @@ void __init acpi_table_print_madt_entry(
|
||||
p->lint);
|
||||
}
|
||||
break;
|
||||
|
||||
+
|
||||
+ case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
|
||||
+ {
|
||||
+ u16 polarity, trigger;
|
||||
@ -295,12 +306,13 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
+ p->lint);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
|
||||
case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE:
|
||||
{
|
||||
struct acpi_madt_local_apic_override *p =
|
||||
--- a/xen/include/acpi/actbl1.h
|
||||
+++ b/xen/include/acpi/actbl1.h
|
||||
Index: xen-4.0.2-testing/xen/include/acpi/actbl1.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/acpi/actbl1.h
|
||||
+++ xen-4.0.2-testing/xen/include/acpi/actbl1.h
|
||||
@@ -404,7 +404,9 @@ enum acpi_madt_type {
|
||||
ACPI_MADT_TYPE_IO_SAPIC = 6,
|
||||
ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
|
||||
@ -389,8 +401,10 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
/*******************************************************************************
|
||||
*
|
||||
* TCPA - Trusted Computing Platform Alliance table
|
||||
--- a/xen/include/asm-x86/acpi.h
|
||||
+++ b/xen/include/asm-x86/acpi.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/acpi.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/acpi.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/acpi.h
|
||||
@@ -151,7 +151,7 @@ struct acpi_sleep_info {
|
||||
#endif /* CONFIG_ACPI_SLEEP */
|
||||
|
||||
@ -400,8 +414,10 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
#define MAX_LOCAL_APIC 256
|
||||
|
||||
extern u32 pmtmr_ioport;
|
||||
--- a/xen/include/asm-x86/mpspec.h
|
||||
+++ b/xen/include/asm-x86/mpspec.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/mpspec.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/mpspec.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/mpspec.h
|
||||
@@ -24,7 +24,7 @@ extern int pic_mode;
|
||||
extern int using_apic_timer;
|
||||
|
||||
@ -411,8 +427,10 @@ Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
extern void mp_unregister_lapic(uint32_t apic_id, uint32_t cpu);
|
||||
extern void mp_register_lapic_address (u64 address);
|
||||
extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base);
|
||||
--- a/xen/include/xen/acpi.h
|
||||
+++ b/xen/include/xen/acpi.h
|
||||
Index: xen-4.0.2-testing/xen/include/xen/acpi.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/xen/acpi.h
|
||||
+++ xen-4.0.2-testing/xen/include/xen/acpi.h
|
||||
@@ -57,6 +57,8 @@ enum acpi_madt_entry_id {
|
||||
ACPI_MADT_IOSAPIC,
|
||||
ACPI_MADT_LSAPIC,
|
||||
|
@ -37,10 +37,10 @@ Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
|
||||
Comment from Masaki Kanno <kanno.masaki@jp.fujitsu.com>: "Well done"
|
||||
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/examples/xend-config.sxp
|
||||
Index: xen-4.0.2-testing/tools/examples/xend-config.sxp
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/examples/xend-config.sxp
|
||||
+++ xen-4.0.1-testing/tools/examples/xend-config.sxp
|
||||
--- xen-4.0.2-testing.orig/tools/examples/xend-config.sxp
|
||||
+++ xen-4.0.2-testing/tools/examples/xend-config.sxp
|
||||
@@ -277,3 +277,11 @@
|
||||
# we have to realize this may incur security issue and we can't make sure the
|
||||
# device assignment could really work properly even after we do this.
|
||||
@ -53,10 +53,10 @@ Index: xen-4.0.1-testing/tools/examples/xend-config.sxp
|
||||
+# command lsscsi, e.g. ('16:0:0:0' '15:0')
|
||||
+# (pscsi-device-mask ('*'))
|
||||
+
|
||||
Index: xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/util/vscsi_util.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/util/vscsi_util.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/util/vscsi_util.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/util/vscsi_util.py
|
||||
@@ -148,11 +148,12 @@ def _vscsi_get_scsidevices_by_sysfs():
|
||||
return devices
|
||||
|
||||
@ -85,10 +85,10 @@ Index: xen-4.0.1-testing/tools/python/xen/util/vscsi_util.py
|
||||
scsi_record = _make_scsi_record(scsi_info)
|
||||
scsi_records.append(scsi_record)
|
||||
return scsi_records
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendNode.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendNode.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendNode.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendNode.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendNode.py
|
||||
@@ -323,7 +323,12 @@ class XendNode:
|
||||
pscsi_table = {}
|
||||
pscsi_HBA_table = {}
|
||||
@ -103,10 +103,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendNode.py
|
||||
scsi_id = pscsi_record['scsi_id']
|
||||
if scsi_id:
|
||||
saved_HBA_uuid = None
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendOptions.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendOptions.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendOptions.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendOptions.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendOptions.py
|
||||
@@ -164,6 +164,9 @@ class XendOptions:
|
||||
"""
|
||||
print >>sys.stderr, "xend [ERROR]", fmt % args
|
||||
|
@ -18,10 +18,10 @@ Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
|
||||
Acked-by: Jim Fehlig <jfehlig@novell.com>
|
||||
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendAPI.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPI.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendAPI.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendAPI.py
|
||||
@@ -1667,7 +1667,8 @@ class XendAPI(object):
|
||||
def VM_set_actions_after_crash(self, session, vm_ref, action):
|
||||
if action not in XEN_API_ON_CRASH_BEHAVIOUR:
|
||||
@ -32,10 +32,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPI.py
|
||||
|
||||
def VM_set_HVM_boot_policy(self, session, vm_ref, value):
|
||||
if value != "" and value != "BIOS order":
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendAPIConstants.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||
@@ -63,6 +63,18 @@ XEN_API_ON_CRASH_BEHAVIOUR_FILTER = {
|
||||
'rename_restart' : 'rename_restart',
|
||||
}
|
||||
@ -55,10 +55,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||
XEN_API_VBD_MODE = ['RO', 'RW']
|
||||
XEN_API_VDI_TYPE = ['system', 'user', 'ephemeral']
|
||||
XEN_API_VBD_TYPE = ['CD', 'Disk']
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendConfig.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendConfig.py
|
||||
@@ -41,6 +41,7 @@ from xen.util.pci import pci_opts_list_f
|
||||
from xen.xend.XendSXPDev import dev_dict_to_sxp
|
||||
from xen.util import xsconstants
|
||||
|
@ -13,8 +13,10 @@ etc.
|
||||
|
||||
Signed-off-by: Wei Gang <gang.wei@intel.com>
|
||||
|
||||
--- a/xen/arch/x86/cpu/intel.c
|
||||
+++ b/xen/arch/x86/cpu/intel.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
|
||||
@@ -90,6 +90,20 @@ void __devinit early_intel_workaround(st
|
||||
/* Netburst reports 64 bytes clflush size, but does IO in 128 bytes */
|
||||
if (c->x86 == 15 && c->x86_cache_alignment == 64)
|
||||
@ -36,8 +38,10 @@ Signed-off-by: Wei Gang <gang.wei@intel.com>
|
||||
}
|
||||
|
||||
/*
|
||||
--- a/xen/include/asm-x86/msr-index.h
|
||||
+++ b/xen/include/asm-x86/msr-index.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/msr-index.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/msr-index.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/msr-index.h
|
||||
@@ -324,6 +324,7 @@
|
||||
#define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1<<11)
|
||||
#define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1<<12)
|
||||
|
@ -1,168 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1281707886 -3600
|
||||
# Node ID 3cee41690fa26853acb0be65065c52f6029ca599
|
||||
# Parent 01d185dab39e9be399b203bec91870e04f576c23
|
||||
x2APIC: Improve x2APIC suspend/resume
|
||||
References: bnc#656369, bnc#658704
|
||||
|
||||
x2apic depends on interrupt remapping, so it should disable interrupt
|
||||
remapping behind x2apic disabling. And also this patch wraps
|
||||
__enable_x2apic to get rid of duplicated code.
|
||||
|
||||
Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/arch/x86/apic.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/arch/x86/apic.c
|
||||
+++ xen-4.0.1-testing/xen/arch/x86/apic.c
|
||||
@@ -496,9 +496,20 @@ static void apic_pm_activate(void)
|
||||
apic_pm_state.active = 1;
|
||||
}
|
||||
|
||||
+static void __enable_x2apic(void)
|
||||
+{
|
||||
+ u32 lo, hi;
|
||||
+
|
||||
+ rdmsr(MSR_IA32_APICBASE, lo, hi);
|
||||
+ if ( !(lo & MSR_IA32_APICBASE_EXTD) )
|
||||
+ {
|
||||
+ lo |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD;
|
||||
+ wrmsr(MSR_IA32_APICBASE, lo, 0);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void resume_x2apic(void)
|
||||
{
|
||||
- uint64_t msr_content;
|
||||
struct IO_APIC_route_entry **ioapic_entries = NULL;
|
||||
|
||||
ASSERT(x2apic_enabled);
|
||||
@@ -520,14 +531,7 @@ static void resume_x2apic(void)
|
||||
mask_IO_APIC_setup(ioapic_entries);
|
||||
|
||||
iommu_enable_IR();
|
||||
-
|
||||
- rdmsrl(MSR_IA32_APICBASE, msr_content);
|
||||
- if ( !(msr_content & MSR_IA32_APICBASE_EXTD) )
|
||||
- {
|
||||
- msr_content |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD;
|
||||
- msr_content = (uint32_t)msr_content;
|
||||
- wrmsrl(MSR_IA32_APICBASE, msr_content);
|
||||
- }
|
||||
+ __enable_x2apic();
|
||||
|
||||
restore_IO_APIC_setup(ioapic_entries);
|
||||
unmask_8259A();
|
||||
@@ -743,9 +747,10 @@ int lapic_suspend(void)
|
||||
apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
|
||||
apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
|
||||
apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
|
||||
-
|
||||
+
|
||||
local_irq_save(flags);
|
||||
disable_local_APIC();
|
||||
+ iommu_disable_IR();
|
||||
local_irq_restore(flags);
|
||||
return 0;
|
||||
}
|
||||
@@ -1042,15 +1047,8 @@ static void enable_bsp_x2apic(void)
|
||||
|
||||
if ( !x2apic_preenabled )
|
||||
{
|
||||
- u32 lo, hi;
|
||||
-
|
||||
- rdmsr(MSR_IA32_APICBASE, lo, hi);
|
||||
- if ( !(lo & MSR_IA32_APICBASE_EXTD) )
|
||||
- {
|
||||
- lo |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD;
|
||||
- wrmsr(MSR_IA32_APICBASE, lo, 0);
|
||||
- printk("x2APIC mode enabled.\n");
|
||||
- }
|
||||
+ __enable_x2apic();
|
||||
+ printk("x2APIC mode enabled.\n");
|
||||
}
|
||||
|
||||
restore_out:
|
||||
@@ -1064,19 +1062,12 @@ out:
|
||||
|
||||
static void enable_ap_x2apic(void)
|
||||
{
|
||||
- u32 lo, hi;
|
||||
-
|
||||
ASSERT(smp_processor_id() != 0);
|
||||
|
||||
/* APs only enable x2apic when BSP did so. */
|
||||
BUG_ON(!x2apic_enabled);
|
||||
|
||||
- rdmsr(MSR_IA32_APICBASE, lo, hi);
|
||||
- if ( !(lo & MSR_IA32_APICBASE_EXTD) )
|
||||
- {
|
||||
- lo |= MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD;
|
||||
- wrmsr(MSR_IA32_APICBASE, lo, 0);
|
||||
- }
|
||||
+ __enable_x2apic();
|
||||
}
|
||||
|
||||
void enable_x2apic(void)
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/intremap.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
@@ -873,6 +873,24 @@ int iommu_enable_IR(void)
|
||||
}
|
||||
|
||||
/*
|
||||
+ * This function is used to disable Interrutp remapping when
|
||||
+ * suspend local apic
|
||||
+ */
|
||||
+void iommu_disable_IR(void)
|
||||
+{
|
||||
+ struct acpi_drhd_unit *drhd;
|
||||
+
|
||||
+ if ( !iommu_supports_eim() )
|
||||
+ return;
|
||||
+
|
||||
+ for_each_drhd_unit ( drhd )
|
||||
+ disable_intremap(drhd->iommu);
|
||||
+
|
||||
+ for_each_drhd_unit ( drhd )
|
||||
+ disable_qinval(drhd->iommu);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* Check if interrupt remapping is enabled or not
|
||||
* return 1: enabled
|
||||
* return 0: not enabled
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -2126,10 +2126,11 @@ static void vtd_suspend(void)
|
||||
|
||||
iommu_disable_translation(iommu);
|
||||
|
||||
- if ( iommu_intremap )
|
||||
- disable_intremap(iommu);
|
||||
-
|
||||
- if ( iommu_qinval )
|
||||
+ /* If interrupt remapping is enabled, queued invalidation
|
||||
+ * will be disabled following interupt remapping disabling
|
||||
+ * in local apic suspend
|
||||
+ */
|
||||
+ if ( !iommu_intremap && iommu_qinval )
|
||||
disable_qinval(iommu);
|
||||
}
|
||||
}
|
||||
Index: xen-4.0.1-testing/xen/include/xen/iommu.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/include/xen/iommu.h
|
||||
+++ xen-4.0.1-testing/xen/include/xen/iommu.h
|
||||
@@ -59,6 +59,7 @@ struct iommu {
|
||||
int iommu_setup(void);
|
||||
int iommu_supports_eim(void);
|
||||
int iommu_enable_IR(void);
|
||||
+void iommu_disable_IR(void);
|
||||
int intremap_enabled(void);
|
||||
|
||||
int iommu_add_device(struct pci_dev *pdev);
|
@ -13,8 +13,10 @@ patch fixed the issue.
|
||||
Signed-off-by: Uwe Dannowski <uwe.dannowski@amd.com>
|
||||
Acked-by: Wei Huang <wei.huang2@amd.com>
|
||||
|
||||
--- a/xen/arch/x86/acpi/cpuidle_menu.c
|
||||
+++ b/xen/arch/x86/acpi/cpuidle_menu.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/acpi/cpuidle_menu.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/acpi/cpuidle_menu.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/acpi/cpuidle_menu.c
|
||||
@@ -270,9 +270,10 @@ static void menu_reflect(struct acpi_pro
|
||||
|
||||
static int menu_enable_device(struct acpi_processor_power *power)
|
||||
|
@ -1,55 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Michael Young <m.a.young@durham.ac.uk>
|
||||
# Date 1282234170 -3600
|
||||
# Node ID 2940165380de2348e0ea3f628dea35750a2b4c8f
|
||||
# Parent 60746a2c14a6cc123892f973fbdd6acb73251d39
|
||||
tools/python: fix xm list for Python 2.7
|
||||
|
||||
This patch fixes
|
||||
Unexpected error: <type 'exceptions.AttributeError'>
|
||||
This is due to xmlrpc changes in Python 2.7. This patch should
|
||||
fixe it for both old and new versions.
|
||||
|
||||
Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
|
||||
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/util/xmlrpcclient.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/util/xmlrpcclient.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/util/xmlrpcclient.py
|
||||
@@ -22,6 +22,7 @@ import socket
|
||||
import string
|
||||
import xmlrpclib
|
||||
from types import StringTypes
|
||||
+from sys import hexversion
|
||||
|
||||
|
||||
try:
|
||||
@@ -54,7 +55,12 @@ class UnixTransport(xmlrpclib.Transport)
|
||||
return xmlrpclib.Transport.request(self, host, '/RPC2',
|
||||
request_body, verbose)
|
||||
def make_connection(self, host):
|
||||
- return HTTPUnix(self.__handler)
|
||||
+ if hexversion < 0x02070000:
|
||||
+ # python 2.6 or earlier
|
||||
+ return HTTPUnix(self.__handler)
|
||||
+ else:
|
||||
+ # xmlrpclib.Transport changed in python 2.7
|
||||
+ return HTTPUnixConnection(self.__handler)
|
||||
|
||||
|
||||
# We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
|
||||
Index: xen-4.0.1-testing/tools/python/xen/util/xmlrpclib2.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/util/xmlrpclib2.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/util/xmlrpclib2.py
|
||||
@@ -58,6 +58,9 @@ def stringify(value):
|
||||
# some bugs in Keep-Alive handling and also enabled it by default
|
||||
class XMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
|
||||
protocol_version = "HTTP/1.1"
|
||||
+ # xend crashes in python 2.7 unless disable_nagle_algorithm = False
|
||||
+ # it isn't used in earlier versions so it is harmless to set it generally
|
||||
+ disable_nagle_algorithm = False
|
||||
|
||||
def __init__(self, hosts_allowed, request, client_address, server):
|
||||
self.hosts_allowed = hosts_allowed
|
@ -1,203 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1282466228 -3600
|
||||
# Node ID 59ff5820534f4c5ec006d1ddca0f4356634c3b22
|
||||
# Parent f77261710856aad506dda92cfa3b92b923be4e15
|
||||
x86: Automatically EOI guest-bound interrupts if guest takes too long.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
Includes the x86 IRQ specific parts of c/s 21508:
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1275480791 -3600
|
||||
# Node ID 5aabc6f94df5f275647d55caa24780eff0c81355
|
||||
# Parent a3bdee5a20daf590ae7a440dad4e3b104b99c620
|
||||
timers: Track inactive timers and migrate them on cpu offline.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/irq.c
|
||||
+++ b/xen/arch/x86/irq.c
|
||||
@@ -46,8 +46,6 @@ static DECLARE_BITMAP(used_vectors, NR_V
|
||||
|
||||
struct irq_cfg __read_mostly *irq_cfg = NULL;
|
||||
|
||||
-static struct timer *__read_mostly irq_guest_eoi_timer;
|
||||
-
|
||||
static DEFINE_SPINLOCK(vector_lock);
|
||||
|
||||
DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
|
||||
@@ -274,18 +272,15 @@ int init_irq_data(void)
|
||||
irq_desc = xmalloc_array(struct irq_desc, nr_irqs);
|
||||
irq_cfg = xmalloc_array(struct irq_cfg, nr_irqs);
|
||||
irq_status = xmalloc_array(int, nr_irqs);
|
||||
- irq_guest_eoi_timer = xmalloc_array(struct timer, nr_irqs);
|
||||
irq_vector = xmalloc_array(u8, nr_irqs_gsi);
|
||||
|
||||
- if (!irq_desc || !irq_cfg || !irq_status ||! irq_vector ||
|
||||
- !irq_guest_eoi_timer)
|
||||
+ if ( !irq_desc || !irq_cfg || !irq_status ||! irq_vector )
|
||||
return -ENOMEM;
|
||||
|
||||
memset(irq_desc, 0, nr_irqs * sizeof(*irq_desc));
|
||||
memset(irq_cfg, 0, nr_irqs * sizeof(*irq_cfg));
|
||||
memset(irq_status, 0, nr_irqs * sizeof(*irq_status));
|
||||
memset(irq_vector, 0, nr_irqs_gsi * sizeof(*irq_vector));
|
||||
- memset(irq_guest_eoi_timer, 0, nr_irqs * sizeof(*irq_guest_eoi_timer));
|
||||
|
||||
for (irq = 0; irq < nr_irqs; irq++) {
|
||||
desc = irq_to_desc(irq);
|
||||
@@ -740,6 +735,7 @@ typedef struct {
|
||||
#define ACKTYPE_UNMASK 1 /* Unmask PIC hardware (from any CPU) */
|
||||
#define ACKTYPE_EOI 2 /* EOI on the CPU that was interrupted */
|
||||
cpumask_t cpu_eoi_map; /* CPUs that need to EOI this interrupt */
|
||||
+ struct timer eoi_timer;
|
||||
struct domain *guest[IRQ_MAX_GUESTS];
|
||||
} irq_guest_action_t;
|
||||
|
||||
@@ -784,13 +780,55 @@ static void _irq_guest_eoi(struct irq_de
|
||||
desc->handler->enable(irq);
|
||||
}
|
||||
|
||||
+static void set_eoi_ready(void *data);
|
||||
+
|
||||
static void irq_guest_eoi_timer_fn(void *data)
|
||||
{
|
||||
struct irq_desc *desc = data;
|
||||
+ unsigned int irq = desc - irq_desc;
|
||||
+ irq_guest_action_t *action;
|
||||
+ cpumask_t cpu_eoi_map;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&desc->lock, flags);
|
||||
- _irq_guest_eoi(desc);
|
||||
+
|
||||
+ if ( !(desc->status & IRQ_GUEST) )
|
||||
+ goto out;
|
||||
+
|
||||
+ action = (irq_guest_action_t *)desc->action;
|
||||
+
|
||||
+ if ( action->ack_type != ACKTYPE_NONE )
|
||||
+ {
|
||||
+ unsigned int i;
|
||||
+ for ( i = 0; i < action->nr_guests; i++ )
|
||||
+ {
|
||||
+ struct domain *d = action->guest[i];
|
||||
+ unsigned int pirq = domain_irq_to_pirq(d, irq);
|
||||
+ if ( test_and_clear_bit(pirq, d->pirq_mask) )
|
||||
+ action->in_flight--;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if ( action->in_flight != 0 )
|
||||
+ goto out;
|
||||
+
|
||||
+ switch ( action->ack_type )
|
||||
+ {
|
||||
+ case ACKTYPE_UNMASK:
|
||||
+ desc->handler->end(irq);
|
||||
+ break;
|
||||
+ case ACKTYPE_EOI:
|
||||
+ cpu_eoi_map = action->cpu_eoi_map;
|
||||
+ spin_unlock_irq(&desc->lock);
|
||||
+ on_selected_cpus(&cpu_eoi_map, set_eoi_ready, desc, 0);
|
||||
+ spin_lock_irq(&desc->lock);
|
||||
+ break;
|
||||
+ case ACKTYPE_NONE:
|
||||
+ _irq_guest_eoi(desc);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ out:
|
||||
spin_unlock_irqrestore(&desc->lock, flags);
|
||||
}
|
||||
|
||||
@@ -847,9 +885,11 @@ static void __do_IRQ_guest(int irq)
|
||||
}
|
||||
}
|
||||
|
||||
- if ( already_pending == action->nr_guests )
|
||||
+ stop_timer(&action->eoi_timer);
|
||||
+
|
||||
+ if ( (action->ack_type == ACKTYPE_NONE) &&
|
||||
+ (already_pending == action->nr_guests) )
|
||||
{
|
||||
- stop_timer(&irq_guest_eoi_timer[irq]);
|
||||
desc->handler->disable(irq);
|
||||
desc->status |= IRQ_GUEST_EOI_PENDING;
|
||||
for ( i = 0; i < already_pending; ++i )
|
||||
@@ -865,10 +905,10 @@ static void __do_IRQ_guest(int irq)
|
||||
* - skip the timer setup below.
|
||||
*/
|
||||
}
|
||||
- init_timer(&irq_guest_eoi_timer[irq],
|
||||
- irq_guest_eoi_timer_fn, desc, smp_processor_id());
|
||||
- set_timer(&irq_guest_eoi_timer[irq], NOW() + MILLISECS(1));
|
||||
}
|
||||
+
|
||||
+ migrate_timer(&action->eoi_timer, smp_processor_id());
|
||||
+ set_timer(&action->eoi_timer, NOW() + MILLISECS(1));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -978,7 +1018,7 @@ static void __pirq_guest_eoi(struct doma
|
||||
if ( action->ack_type == ACKTYPE_NONE )
|
||||
{
|
||||
ASSERT(!test_bit(pirq, d->pirq_mask));
|
||||
- stop_timer(&irq_guest_eoi_timer[irq]);
|
||||
+ stop_timer(&action->eoi_timer);
|
||||
_irq_guest_eoi(desc);
|
||||
}
|
||||
|
||||
@@ -1162,6 +1202,7 @@ int pirq_guest_bind(struct vcpu *v, int
|
||||
action->shareable = will_share;
|
||||
action->ack_type = pirq_acktype(v->domain, pirq);
|
||||
cpus_clear(action->cpu_eoi_map);
|
||||
+ init_timer(&action->eoi_timer, irq_guest_eoi_timer_fn, desc, 0);
|
||||
|
||||
desc->depth = 0;
|
||||
desc->status |= IRQ_GUEST;
|
||||
@@ -1266,7 +1307,7 @@ static irq_guest_action_t *__pirq_guest_
|
||||
}
|
||||
break;
|
||||
case ACKTYPE_NONE:
|
||||
- stop_timer(&irq_guest_eoi_timer[irq]);
|
||||
+ stop_timer(&action->eoi_timer);
|
||||
_irq_guest_eoi(desc);
|
||||
break;
|
||||
}
|
||||
@@ -1306,9 +1347,7 @@ static irq_guest_action_t *__pirq_guest_
|
||||
BUG_ON(!cpus_empty(action->cpu_eoi_map));
|
||||
|
||||
desc->action = NULL;
|
||||
- desc->status &= ~IRQ_GUEST;
|
||||
- desc->status &= ~IRQ_INPROGRESS;
|
||||
- kill_timer(&irq_guest_eoi_timer[irq]);
|
||||
+ desc->status &= ~(IRQ_GUEST|IRQ_GUEST_EOI_PENDING|IRQ_INPROGRESS);
|
||||
desc->handler->shutdown(irq);
|
||||
|
||||
/* Caller frees the old guest descriptor block. */
|
||||
@@ -1342,7 +1381,10 @@ void pirq_guest_unbind(struct domain *d,
|
||||
spin_unlock_irq(&desc->lock);
|
||||
|
||||
if ( oldaction != NULL )
|
||||
+ {
|
||||
+ kill_timer(&oldaction->eoi_timer);
|
||||
xfree(oldaction);
|
||||
+ }
|
||||
}
|
||||
|
||||
static int pirq_guest_force_unbind(struct domain *d, int irq)
|
||||
@@ -1380,7 +1422,10 @@ static int pirq_guest_force_unbind(struc
|
||||
spin_unlock_irq(&desc->lock);
|
||||
|
||||
if ( oldaction != NULL )
|
||||
+ {
|
||||
+ kill_timer(&oldaction->eoi_timer);
|
||||
xfree(oldaction);
|
||||
+ }
|
||||
|
||||
return bound;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1282817774 -3600
|
||||
# Node ID 3eb5127e46365242401e37df292fbe290fa0a974
|
||||
# Parent eccfdeb41b803d07bcb4f7fa912a8341fdb19162
|
||||
Fix bind_irq_vector() destination
|
||||
|
||||
The "mask" covered all online cpus in the "domain". It should be used
|
||||
as destination later, instead of using "domain" directly.
|
||||
|
||||
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
|
||||
|
||||
--- a/xen/arch/x86/irq.c
|
||||
+++ b/xen/arch/x86/irq.c
|
||||
@@ -88,14 +88,14 @@ static int __bind_irq_vector(int irq, in
|
||||
cpus_and(mask, domain, cpu_online_map);
|
||||
if (cpus_empty(mask))
|
||||
return -EINVAL;
|
||||
- if ((cfg->vector == vector) && cpus_equal(cfg->domain, domain))
|
||||
+ if ((cfg->vector == vector) && cpus_equal(cfg->domain, mask))
|
||||
return 0;
|
||||
if (cfg->vector != IRQ_VECTOR_UNASSIGNED)
|
||||
return -EBUSY;
|
||||
for_each_cpu_mask(cpu, mask)
|
||||
per_cpu(vector_irq, cpu)[vector] = irq;
|
||||
cfg->vector = vector;
|
||||
- cfg->domain = domain;
|
||||
+ cfg->domain = mask;
|
||||
irq_status[irq] = IRQ_USED;
|
||||
if (IO_APIC_IRQ(irq))
|
||||
irq_vector[irq] = vector;
|
@ -1,35 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1282817816 -3600
|
||||
# Node ID 3c4c3d48a8350994f4450314c6b759771c7ad4ef
|
||||
# Parent 3eb5127e46365242401e37df292fbe290fa0a974
|
||||
VT-d: Hardware require RH bit to be set in IRTE when delivery mode is LPR
|
||||
|
||||
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/vtd/intremap.c
|
||||
+++ b/xen/drivers/passthrough/vtd/intremap.c
|
||||
@@ -318,9 +318,10 @@ static int ioapic_rte_to_remap_entry(str
|
||||
*(((u32 *)&new_rte) + 0) = value;
|
||||
new_ire.lo.fpd = 0;
|
||||
new_ire.lo.dm = new_rte.dest_mode;
|
||||
- new_ire.lo.rh = 0;
|
||||
new_ire.lo.tm = new_rte.trigger;
|
||||
new_ire.lo.dlm = new_rte.delivery_mode;
|
||||
+ /* Hardware require RH = 1 for LPR delivery mode */
|
||||
+ new_ire.lo.rh = (new_ire.lo.dlm == dest_LowestPrio);
|
||||
new_ire.lo.avail = 0;
|
||||
new_ire.lo.res_1 = 0;
|
||||
new_ire.lo.vector = new_rte.vector;
|
||||
@@ -630,9 +631,10 @@ static int msi_msg_to_remap_entry(
|
||||
/* Set interrupt remapping table entry */
|
||||
new_ire.lo.fpd = 0;
|
||||
new_ire.lo.dm = (msg->address_lo >> MSI_ADDR_DESTMODE_SHIFT) & 0x1;
|
||||
- new_ire.lo.rh = 0;
|
||||
new_ire.lo.tm = (msg->data >> MSI_DATA_TRIGGER_SHIFT) & 0x1;
|
||||
new_ire.lo.dlm = (msg->data >> MSI_DATA_DELIVERY_MODE_SHIFT) & 0x1;
|
||||
+ /* Hardware require RH = 1 for LPR delivery mode */
|
||||
+ new_ire.lo.rh = (new_ire.lo.dlm == dest_LowestPrio);
|
||||
new_ire.lo.avail = 0;
|
||||
new_ire.lo.res_1 = 0;
|
||||
new_ire.lo.vector = (msg->data >> MSI_DATA_VECTOR_SHIFT) &
|
@ -1,45 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1283153992 -3600
|
||||
# Node ID c5aed2e049bce2724b035dd6aa09c4c4e609c27c
|
||||
# Parent 20920c12bc4815b1f755786c0924393809664807
|
||||
ept: Put locks around ept_get_entry
|
||||
|
||||
There's a subtle race in ept_get_entry, such that if tries to read an
|
||||
entry that ept_set_entry is modifying, it gets neither the old entry
|
||||
nor the new entry, but empty. In the case of multi-cpu
|
||||
populate-on-demand guests, this manifests as a guest crash when one
|
||||
vcpu tries to read a page which another page is trying to populate,
|
||||
and ept_get_entry returns p2m_mmio_dm.
|
||||
|
||||
This bug can also be fixed by making both ept_set_entry and
|
||||
ept_next_level access-once (i.e., ept_next_level reads full ept_entry
|
||||
and then works with local value; ept_set_entry construct the entry
|
||||
locally and then sets it in one write). But there doesn't seem to be
|
||||
any major performance implications of just making ept_get_entry use
|
||||
locks; so the simpler, the better.
|
||||
|
||||
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
+++ b/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
@@ -387,6 +387,10 @@ static mfn_t ept_get_entry(struct domain
|
||||
int i;
|
||||
int ret = 0;
|
||||
mfn_t mfn = _mfn(INVALID_MFN);
|
||||
+ int do_locking = !p2m_locked_by_me(d->arch.p2m);
|
||||
+
|
||||
+ if ( do_locking )
|
||||
+ p2m_lock(d->arch.p2m);
|
||||
|
||||
*t = p2m_mmio_dm;
|
||||
|
||||
@@ -464,6 +468,8 @@ static mfn_t ept_get_entry(struct domain
|
||||
}
|
||||
|
||||
out:
|
||||
+ if ( do_locking )
|
||||
+ p2m_unlock(d->arch.p2m);
|
||||
unmap_domain_page(table);
|
||||
return mfn;
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1283332754 -3600
|
||||
# Node ID ae0cd4e5cc0149ceb5d3dd61a003aadc008f036e
|
||||
# Parent 972d90ff31349816cc8c785a8b2defb2f70ed441
|
||||
x86 intel: Disable XSAVE support.
|
||||
|
||||
It breaks HVM save/restore.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/cpu/intel.c
|
||||
+++ b/xen/arch/x86/cpu/intel.c
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
extern int trap_init_f00f_bug(void);
|
||||
|
||||
-static int use_xsave = 1;
|
||||
+static int use_xsave;
|
||||
boolean_param("xsave", use_xsave);
|
||||
|
||||
#ifdef CONFIG_X86_INTEL_USERCOPY
|
@ -1,51 +0,0 @@
|
||||
References: bnc#638465
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284394111 -3600
|
||||
# Node ID 69e8bb164683c76e0cd787df21b98c73905a61e6
|
||||
# Parent e300bfa3c0323ac08e7b8cd9fb40f9f1ab548543
|
||||
page_alloc: Hold heap_lock while adjusting page states to/from PGC_state_free.
|
||||
|
||||
This avoids races with buddy-merging logic in free_heap_pages().
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/common/page_alloc.c
|
||||
+++ b/xen/common/page_alloc.c
|
||||
@@ -378,8 +378,6 @@ static struct page_info *alloc_heap_page
|
||||
total_avail_pages -= request;
|
||||
ASSERT(total_avail_pages >= 0);
|
||||
|
||||
- spin_unlock(&heap_lock);
|
||||
-
|
||||
cpus_clear(mask);
|
||||
|
||||
for ( i = 0; i < (1 << order); i++ )
|
||||
@@ -401,6 +399,8 @@ static struct page_info *alloc_heap_page
|
||||
page_set_owner(&pg[i], NULL);
|
||||
}
|
||||
|
||||
+ spin_unlock(&heap_lock);
|
||||
+
|
||||
if ( unlikely(!cpus_empty(mask)) )
|
||||
{
|
||||
perfc_incr(need_flush_tlb_flush);
|
||||
@@ -496,6 +496,8 @@ static void free_heap_pages(
|
||||
ASSERT(order <= MAX_ORDER);
|
||||
ASSERT(node >= 0);
|
||||
|
||||
+ spin_lock(&heap_lock);
|
||||
+
|
||||
for ( i = 0; i < (1 << order); i++ )
|
||||
{
|
||||
/*
|
||||
@@ -523,8 +525,6 @@ static void free_heap_pages(
|
||||
pg[i].tlbflush_timestamp = tlbflush_current_time();
|
||||
}
|
||||
|
||||
- spin_lock(&heap_lock);
|
||||
-
|
||||
avail[node][zone] += 1 << order;
|
||||
total_avail_pages += 1 << order;
|
||||
|
@ -1,24 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284395845 -3600
|
||||
# Node ID a254d1236c1a52264beb0253352ef64d65a98eb3
|
||||
# Parent f0a1229cb0a6505f3240ac59a3bb6ade2acfa1a2
|
||||
Fix serial interrupt's destination
|
||||
|
||||
Lowest Priority can't use with invalid cpu_mask, and the default value
|
||||
of CPU_MASK_ALL may cover CPU which wasn't online.
|
||||
|
||||
From: "Yang, Sheng" <sheng.yang@intel.com>
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/smpboot.c
|
||||
+++ b/xen/arch/x86/smpboot.c
|
||||
@@ -1602,7 +1602,7 @@ void __init smp_intr_init(void)
|
||||
irq_vector[irq] = FIRST_HIPRIORITY_VECTOR + seridx + 1;
|
||||
per_cpu(vector_irq, cpu)[FIRST_HIPRIORITY_VECTOR + seridx + 1] = irq;
|
||||
irq_cfg[irq].vector = FIRST_HIPRIORITY_VECTOR + seridx + 1;
|
||||
- irq_cfg[irq].domain = (cpumask_t)CPU_MASK_ALL;
|
||||
+ irq_cfg[irq].domain = cpu_online_map;
|
||||
}
|
||||
|
||||
/* IPI for cleanuping vectors after irq move */
|
@ -1,21 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284533274 -3600
|
||||
# Node ID d4976434b8bba469fd1d337dc16249a5abfc4e5a
|
||||
# Parent 14ce571d157e060fdb390e70fa8d0c95b2fd9b76
|
||||
x86: fix debug key 'i' handling with no IO-APICs
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/io_apic.c
|
||||
+++ b/xen/arch/x86/io_apic.c
|
||||
@@ -2463,6 +2463,9 @@ void dump_ioapic_irq_info(void)
|
||||
unsigned int irq, pin, printed = 0;
|
||||
unsigned long flags;
|
||||
|
||||
+ if ( !irq_2_pin )
|
||||
+ return;
|
||||
+
|
||||
for ( irq = 0; irq < nr_irqs_gsi; irq++ )
|
||||
{
|
||||
entry = &irq_2_pin[irq];
|
@ -1,27 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284535133 -3600
|
||||
# Node ID 62edd2611cbbe4c50574b6f6f73dda2ae1136dde
|
||||
# Parent 869a0fdf8686c3dada14122df6d22a38705c2401
|
||||
notify_via_xen_event_channel() should check for dying domain.
|
||||
|
||||
Else we can fail on either ASSERTion in that function.
|
||||
|
||||
From: Olaf Hering <olaf@aepfle.de>
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/common/event_channel.c
|
||||
+++ b/xen/common/event_channel.c
|
||||
@@ -994,6 +994,12 @@ void notify_via_xen_event_channel(struct
|
||||
|
||||
spin_lock(&ld->event_lock);
|
||||
|
||||
+ if ( unlikely(ld->is_dying) )
|
||||
+ {
|
||||
+ spin_unlock(&ld->event_lock);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
ASSERT(port_is_valid(ld, lport));
|
||||
lchn = evtchn_from_port(ld, lport);
|
||||
ASSERT(lchn->consumer_is_xen);
|
@ -1,91 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284537635 -3600
|
||||
# Node ID 1087f9a03ab61d3a8bb0a1c65e5b09f82f3a4277
|
||||
# Parent 62edd2611cbbe4c50574b6f6f73dda2ae1136dde
|
||||
C6 state with EOI issue fix for some Intel processors
|
||||
|
||||
There is an errata in some of Intel processors.
|
||||
|
||||
AAJ72. EOI Transaction May Not be Sent if Software Enters Core C6
|
||||
During an Interrupt Service Routine
|
||||
|
||||
If core C6 is entered after the start of an interrupt service routine
|
||||
but before a write to the APIC EOI register, the core may not send an
|
||||
EOI transaction (if needed) and further interrupts from the same
|
||||
priority level or lower may be blocked.
|
||||
|
||||
This patch fix this issue, by checking if ISR is pending before enter
|
||||
deep Cx state. If so, it would use power->safe_state instead of deep
|
||||
Cx state to prevent the above issue happen.
|
||||
|
||||
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ b/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -226,6 +226,31 @@ static int sched_has_urgent_vcpu(void)
|
||||
return atomic_read(&this_cpu(schedule_data).urgent_count);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * "AAJ72. EOI Transaction May Not be Sent if Software Enters Core C6 During
|
||||
+ * an Interrupt Service Routine"
|
||||
+ *
|
||||
+ * There was an errata with some Core i7 processors that an EOI transaction
|
||||
+ * may not be sent if software enters core C6 during an interrupt service
|
||||
+ * routine. So we don't enter deep Cx state if there is an EOI pending.
|
||||
+ */
|
||||
+bool_t errata_c6_eoi_workaround(void)
|
||||
+{
|
||||
+ static bool_t fix_needed = -1;
|
||||
+
|
||||
+ if ( unlikely(fix_needed == -1) )
|
||||
+ {
|
||||
+ int model = boot_cpu_data.x86_model;
|
||||
+ fix_needed = (cpu_has_apic && !directed_eoi_enabled &&
|
||||
+ (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
|
||||
+ (boot_cpu_data.x86 == 6) &&
|
||||
+ ((model == 0x1a) || (model == 0x1e) || (model == 0x1f) ||
|
||||
+ (model == 0x25) || (model == 0x2c) || (model == 0x2f)));
|
||||
+ }
|
||||
+
|
||||
+ return (fix_needed && cpu_has_pending_apic_eoi());
|
||||
+}
|
||||
+
|
||||
static void acpi_processor_idle(void)
|
||||
{
|
||||
struct acpi_processor_power *power = processor_powers[smp_processor_id()];
|
||||
@@ -277,6 +302,9 @@ static void acpi_processor_idle(void)
|
||||
return;
|
||||
}
|
||||
|
||||
+ if ( (cx->type == ACPI_STATE_C3) && errata_c6_eoi_workaround() )
|
||||
+ cx = power->safe_state;
|
||||
+
|
||||
power->last_state = cx;
|
||||
|
||||
/*
|
||||
--- a/xen/arch/x86/irq.c
|
||||
+++ b/xen/arch/x86/irq.c
|
||||
@@ -752,6 +752,11 @@ struct pending_eoi {
|
||||
static DEFINE_PER_CPU(struct pending_eoi, pending_eoi[NR_DYNAMIC_VECTORS]);
|
||||
#define pending_eoi_sp(p) ((p)[NR_DYNAMIC_VECTORS-1].vector)
|
||||
|
||||
+bool_t cpu_has_pending_apic_eoi(void)
|
||||
+{
|
||||
+ return (pending_eoi_sp(this_cpu(pending_eoi)) != 0);
|
||||
+}
|
||||
+
|
||||
static inline void set_pirq_eoi(struct domain *d, unsigned int irq)
|
||||
{
|
||||
if ( d->arch.pirq_eoi_map )
|
||||
--- a/xen/include/asm-x86/irq.h
|
||||
+++ b/xen/include/asm-x86/irq.h
|
||||
@@ -150,4 +150,6 @@ void irq_set_affinity(int irq, cpumask_t
|
||||
#define domain_pirq_to_irq(d, pirq) ((d)->arch.pirq_irq[pirq])
|
||||
#define domain_irq_to_pirq(d, irq) ((d)->arch.irq_pirq[irq])
|
||||
|
||||
+bool_t cpu_has_pending_apic_eoi(void);
|
||||
+
|
||||
#endif /* _ASM_HW_IRQ_H */
|
@ -1,68 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284739161 -3600
|
||||
# Node ID 632c02167f97bb2bd25571b2780425b9b75949b4
|
||||
# Parent 1b05090854ba83576aa8399fa70e481f5b602417
|
||||
hvm pmtimer: correct pmtimer accuracy
|
||||
|
||||
Several seconds of backward time drift per minute can be seen on a
|
||||
RHEL6 HVM guest by switching the clocksource to 'acpi_pm' and then
|
||||
running gettimeofday() in a loop. This is due to the accumulation
|
||||
of small inaccuracies that are caused by shifting out the lower 32
|
||||
bits when pmt_update_time() computes 'tmr_val'.
|
||||
|
||||
The patch makes sure that the lower 32 bits of the computed value
|
||||
are not lost. They are saved in a new field 'not_accounted' in the
|
||||
PMTState structure and are accounted the next time pmt_update_time()
|
||||
is called.
|
||||
|
||||
From: Ulrich Obergfell <uobergfe@redhat.com>
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/hvm/pmtimer.c
|
||||
+++ b/xen/arch/x86/hvm/pmtimer.c
|
||||
@@ -83,14 +83,16 @@ void hvm_acpi_sleep_button(struct domain
|
||||
* since the last time we did that. */
|
||||
static void pmt_update_time(PMTState *s)
|
||||
{
|
||||
- uint64_t curr_gtime;
|
||||
+ uint64_t curr_gtime, tmp;
|
||||
uint32_t msb = s->pm.tmr_val & TMR_VAL_MSB;
|
||||
|
||||
ASSERT(spin_is_locked(&s->lock));
|
||||
|
||||
/* Update the timer */
|
||||
curr_gtime = hvm_get_guest_time(s->vcpu);
|
||||
- s->pm.tmr_val += ((curr_gtime - s->last_gtime) * s->scale) >> 32;
|
||||
+ tmp = ((curr_gtime - s->last_gtime) * s->scale) + s->not_accounted;
|
||||
+ s->not_accounted = (uint32_t)tmp;
|
||||
+ s->pm.tmr_val += tmp >> 32;
|
||||
s->pm.tmr_val &= TMR_VAL_MASK;
|
||||
s->last_gtime = curr_gtime;
|
||||
|
||||
@@ -257,6 +259,7 @@ static int pmtimer_load(struct domain *d
|
||||
|
||||
/* Calculate future counter values from now. */
|
||||
s->last_gtime = hvm_get_guest_time(s->vcpu);
|
||||
+ s->not_accounted = 0;
|
||||
|
||||
/* Set the SCI state from the registers */
|
||||
pmt_update_sci(s);
|
||||
@@ -276,6 +279,7 @@ void pmtimer_init(struct vcpu *v)
|
||||
spin_lock_init(&s->lock);
|
||||
|
||||
s->scale = ((uint64_t)FREQUENCE_PMTIMER << 32) / SYSTEM_TIME_HZ;
|
||||
+ s->not_accounted = 0;
|
||||
s->vcpu = v;
|
||||
|
||||
/* Intercept port I/O (need two handlers because PM1a_CNT is between
|
||||
--- a/xen/include/asm-x86/hvm/vpt.h
|
||||
+++ b/xen/include/asm-x86/hvm/vpt.h
|
||||
@@ -117,6 +117,7 @@ typedef struct PMTState {
|
||||
struct hvm_hw_pmtimer pm; /* 32bit timer value */
|
||||
struct vcpu *vcpu; /* Keeps sync with this vcpu's guest-time */
|
||||
uint64_t last_gtime; /* Last (guest) time we updated the timer */
|
||||
+ uint32_t not_accounted; /* time not accounted at last update */
|
||||
uint64_t scale; /* Multiplier to get from tsc to timer ticks */
|
||||
struct timer timer; /* To make sure we send SCIs */
|
||||
spinlock_t lock;
|
@ -1,59 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284795115 -3600
|
||||
# Node ID ee3c640732311ef6bc5e2de56c3b4b753cb020fa
|
||||
# Parent 632c02167f97bb2bd25571b2780425b9b75949b4
|
||||
x86: irq_enter()/irq_exit() covers all of do_IRQ().
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/irq.c
|
||||
+++ b/xen/arch/x86/irq.c
|
||||
@@ -535,6 +535,8 @@ asmlinkage void do_IRQ(struct cpu_user_r
|
||||
return;
|
||||
}
|
||||
|
||||
+ irq_enter();
|
||||
+
|
||||
desc = irq_to_desc(irq);
|
||||
|
||||
spin_lock(&desc->lock);
|
||||
@@ -568,14 +570,10 @@ asmlinkage void do_IRQ(struct cpu_user_r
|
||||
desc->rl_quantum_start = now;
|
||||
}
|
||||
|
||||
- irq_enter();
|
||||
tsc_in = tb_init_done ? get_cycles() : 0;
|
||||
__do_IRQ_guest(irq);
|
||||
TRACE_3D(TRC_TRACE_IRQ, irq, tsc_in, get_cycles());
|
||||
- irq_exit();
|
||||
- spin_unlock(&desc->lock);
|
||||
- set_irq_regs(old_regs);
|
||||
- return;
|
||||
+ goto out_no_end;
|
||||
}
|
||||
|
||||
desc->status &= ~IRQ_REPLAY;
|
||||
@@ -594,20 +592,20 @@ asmlinkage void do_IRQ(struct cpu_user_r
|
||||
while ( desc->status & IRQ_PENDING )
|
||||
{
|
||||
desc->status &= ~IRQ_PENDING;
|
||||
- irq_enter();
|
||||
spin_unlock_irq(&desc->lock);
|
||||
tsc_in = tb_init_done ? get_cycles() : 0;
|
||||
action->handler(irq, action->dev_id, regs);
|
||||
TRACE_3D(TRC_TRACE_IRQ, irq, tsc_in, get_cycles());
|
||||
spin_lock_irq(&desc->lock);
|
||||
- irq_exit();
|
||||
}
|
||||
|
||||
desc->status &= ~IRQ_INPROGRESS;
|
||||
|
||||
out:
|
||||
desc->handler->end(irq);
|
||||
+ out_no_end:
|
||||
spin_unlock(&desc->lock);
|
||||
+ irq_exit();
|
||||
set_irq_regs(old_regs);
|
||||
}
|
||||
|
@ -1,92 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1284796635 -3600
|
||||
# Node ID 7405e0ddb912a993982e4e4122856965b7c706dd
|
||||
# Parent 0da4bfd2bc23937d2e1a8bfa6d259be0d9e482ad
|
||||
x86_32: [un]map_domain_page() is now IRQ safe.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/x86_32/domain_page.c
|
||||
+++ b/xen/arch/x86/x86_32/domain_page.c
|
||||
@@ -42,15 +42,13 @@ static inline struct vcpu *mapcache_curr
|
||||
|
||||
void *map_domain_page(unsigned long mfn)
|
||||
{
|
||||
- unsigned long va;
|
||||
- unsigned int idx, i, flags;
|
||||
+ unsigned long va, flags;
|
||||
+ unsigned int idx, i;
|
||||
struct vcpu *v;
|
||||
struct mapcache_domain *dcache;
|
||||
struct mapcache_vcpu *vcache;
|
||||
struct vcpu_maphash_entry *hashent;
|
||||
|
||||
- ASSERT(!in_irq());
|
||||
-
|
||||
perfc_incr(map_domain_page_count);
|
||||
|
||||
v = mapcache_current_vcpu();
|
||||
@@ -58,6 +56,8 @@ void *map_domain_page(unsigned long mfn)
|
||||
dcache = &v->domain->arch.mapcache;
|
||||
vcache = &v->arch.mapcache;
|
||||
|
||||
+ local_irq_save(flags);
|
||||
+
|
||||
hashent = &vcache->hash[MAPHASH_HASHFN(mfn)];
|
||||
if ( hashent->mfn == mfn )
|
||||
{
|
||||
@@ -69,7 +69,7 @@ void *map_domain_page(unsigned long mfn)
|
||||
goto out;
|
||||
}
|
||||
|
||||
- spin_lock_irqsave(&dcache->lock, flags);
|
||||
+ spin_lock(&dcache->lock);
|
||||
|
||||
/* Has some other CPU caused a wrap? We must flush if so. */
|
||||
if ( unlikely(dcache->epoch != vcache->shadow_epoch) )
|
||||
@@ -105,11 +105,12 @@ void *map_domain_page(unsigned long mfn)
|
||||
set_bit(idx, dcache->inuse);
|
||||
dcache->cursor = idx + 1;
|
||||
|
||||
- spin_unlock_irqrestore(&dcache->lock, flags);
|
||||
+ spin_unlock(&dcache->lock);
|
||||
|
||||
l1e_write(&dcache->l1tab[idx], l1e_from_pfn(mfn, __PAGE_HYPERVISOR));
|
||||
|
||||
out:
|
||||
+ local_irq_restore(flags);
|
||||
va = MAPCACHE_VIRT_START + (idx << PAGE_SHIFT);
|
||||
return (void *)va;
|
||||
}
|
||||
@@ -119,11 +120,9 @@ void unmap_domain_page(const void *va)
|
||||
unsigned int idx;
|
||||
struct vcpu *v;
|
||||
struct mapcache_domain *dcache;
|
||||
- unsigned long mfn;
|
||||
+ unsigned long mfn, flags;
|
||||
struct vcpu_maphash_entry *hashent;
|
||||
|
||||
- ASSERT(!in_irq());
|
||||
-
|
||||
ASSERT((void *)MAPCACHE_VIRT_START <= va);
|
||||
ASSERT(va < (void *)MAPCACHE_VIRT_END);
|
||||
|
||||
@@ -135,6 +134,8 @@ void unmap_domain_page(const void *va)
|
||||
mfn = l1e_get_pfn(dcache->l1tab[idx]);
|
||||
hashent = &v->arch.mapcache.hash[MAPHASH_HASHFN(mfn)];
|
||||
|
||||
+ local_irq_save(flags);
|
||||
+
|
||||
if ( hashent->idx == idx )
|
||||
{
|
||||
ASSERT(hashent->mfn == mfn);
|
||||
@@ -163,6 +164,8 @@ void unmap_domain_page(const void *va)
|
||||
/* /Second/, mark as garbage. */
|
||||
set_bit(idx, dcache->garbage);
|
||||
}
|
||||
+
|
||||
+ local_irq_restore(flags);
|
||||
}
|
||||
|
||||
void mapcache_domain_init(struct domain *d)
|
@ -1,240 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1285142048 -3600
|
||||
# Node ID e8e3aeed3ebacac6faa5795f67b195a434562323
|
||||
# Parent 35a1a14c408e60eca608a67a79f38ae5fdf3ea19
|
||||
tmem: disallow bad gmfns from PV domains
|
||||
|
||||
Mfns for PV domains were not properly checked, potentially
|
||||
allowing a buggy or malicious PV guest to crash Xen. Also,
|
||||
use get_page/put_page to claim a reference to the pages
|
||||
so they can't disappear out from under tmem's feet.
|
||||
|
||||
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
|
||||
|
||||
--- a/xen/common/tmem_xen.c
|
||||
+++ b/xen/common/tmem_xen.c
|
||||
@@ -87,49 +87,88 @@ void tmh_copy_page(char *to, char*from)
|
||||
}
|
||||
|
||||
#ifdef __ia64__
|
||||
-static inline void *cli_mfn_to_va(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn)
|
||||
+static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn,
|
||||
+ pfp_t **pcli_pfp, bool_t cli_write)
|
||||
{
|
||||
ASSERT(0);
|
||||
return NULL;
|
||||
}
|
||||
-#define paging_mark_dirty(_x,_y) do {} while(0)
|
||||
+
|
||||
+static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
|
||||
+ bool_t mark_dirty)
|
||||
+{
|
||||
+ ASSERT(0);
|
||||
+}
|
||||
#else
|
||||
-static inline void *cli_mfn_to_va(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn)
|
||||
+static inline void *cli_get_page(tmem_cli_mfn_t cmfn, unsigned long *pcli_mfn,
|
||||
+ pfp_t **pcli_pfp, bool_t cli_write)
|
||||
{
|
||||
unsigned long cli_mfn;
|
||||
p2m_type_t t;
|
||||
+ struct page_info *page;
|
||||
+ int ret;
|
||||
|
||||
cli_mfn = mfn_x(gfn_to_mfn(current->domain, cmfn, &t));
|
||||
- if (t != p2m_ram_rw || cli_mfn == INVALID_MFN)
|
||||
+ if ( t != p2m_ram_rw || !mfn_valid(cli_mfn) )
|
||||
+ return NULL;
|
||||
+ page = mfn_to_page(cli_mfn);
|
||||
+ if ( cli_write )
|
||||
+ ret = get_page_and_type(page, current->domain, PGT_writable_page);
|
||||
+ else
|
||||
+ ret = get_page(page, current->domain);
|
||||
+ if ( !ret )
|
||||
return NULL;
|
||||
- if (pcli_mfn != NULL)
|
||||
- *pcli_mfn = cli_mfn;
|
||||
+ *pcli_mfn = cli_mfn;
|
||||
+ *pcli_pfp = (pfp_t *)page;
|
||||
return map_domain_page(cli_mfn);
|
||||
}
|
||||
+
|
||||
+static inline void cli_put_page(void *cli_va, pfp_t *cli_pfp,
|
||||
+ unsigned long cli_mfn, bool_t mark_dirty)
|
||||
+{
|
||||
+ if ( mark_dirty )
|
||||
+ {
|
||||
+ put_page_and_type((struct page_info *)cli_pfp);
|
||||
+ paging_mark_dirty(current->domain,cli_mfn);
|
||||
+ }
|
||||
+ else
|
||||
+ put_page((struct page_info *)cli_pfp);
|
||||
+ unmap_domain_page(cli_va);
|
||||
+}
|
||||
#endif
|
||||
|
||||
EXPORT int tmh_copy_from_client(pfp_t *pfp,
|
||||
tmem_cli_mfn_t cmfn, pagesize_t tmem_offset,
|
||||
pagesize_t pfn_offset, pagesize_t len, void *cli_va)
|
||||
{
|
||||
- unsigned long tmem_mfn;
|
||||
+ unsigned long tmem_mfn, cli_mfn = 0;
|
||||
void *tmem_va;
|
||||
+ pfp_t *cli_pfp = NULL;
|
||||
+ bool_t tmemc = cli_va != NULL; /* if true, cli_va is control-op buffer */
|
||||
|
||||
ASSERT(pfp != NULL);
|
||||
- if ( tmem_offset || pfn_offset || len )
|
||||
- if ( (cli_va == NULL) && ((cli_va = cli_mfn_to_va(cmfn,NULL)) == NULL) )
|
||||
- return -EFAULT;
|
||||
tmem_mfn = page_to_mfn(pfp);
|
||||
tmem_va = map_domain_page(tmem_mfn);
|
||||
- mb();
|
||||
- if (!len && !tmem_offset && !pfn_offset)
|
||||
+ if ( tmem_offset == 0 && pfn_offset == 0 && len == 0 )
|
||||
+ {
|
||||
memset(tmem_va, 0, PAGE_SIZE);
|
||||
- else if (len == PAGE_SIZE && !tmem_offset && !pfn_offset)
|
||||
+ unmap_domain_page(tmem_va);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ if ( !tmemc )
|
||||
+ {
|
||||
+ cli_va = cli_get_page(cmfn, &cli_mfn, &cli_pfp, 0);
|
||||
+ if ( cli_va == NULL )
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
+ mb();
|
||||
+ if (len == PAGE_SIZE && !tmem_offset && !pfn_offset)
|
||||
tmh_copy_page(tmem_va, cli_va);
|
||||
else if ( (tmem_offset+len <= PAGE_SIZE) &&
|
||||
- (pfn_offset+len <= PAGE_SIZE) )
|
||||
+ (pfn_offset+len <= PAGE_SIZE) )
|
||||
memcpy((char *)tmem_va+tmem_offset,(char *)cli_va+pfn_offset,len);
|
||||
- unmap_domain_page(cli_va);
|
||||
+ if ( !tmemc )
|
||||
+ cli_put_page(cli_va, cli_pfp, cli_mfn, 0);
|
||||
unmap_domain_page(tmem_va);
|
||||
return 1;
|
||||
}
|
||||
@@ -140,15 +179,24 @@ EXPORT int tmh_compress_from_client(tmem
|
||||
int ret = 0;
|
||||
unsigned char *dmem = this_cpu(dstmem);
|
||||
unsigned char *wmem = this_cpu(workmem);
|
||||
+ pfp_t *cli_pfp = NULL;
|
||||
+ unsigned long cli_mfn = 0;
|
||||
+ bool_t tmemc = cli_va != NULL; /* if true, cli_va is control-op buffer */
|
||||
|
||||
- if ( (cli_va == NULL) && (cli_va = cli_mfn_to_va(cmfn,NULL)) == NULL)
|
||||
- return -EFAULT;
|
||||
if ( dmem == NULL || wmem == NULL )
|
||||
return 0; /* no buffer, so can't compress */
|
||||
+ if ( !tmemc )
|
||||
+ {
|
||||
+ cli_va = cli_get_page(cmfn, &cli_mfn, &cli_pfp, 0);
|
||||
+ if ( cli_va == NULL )
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
mb();
|
||||
ret = lzo1x_1_compress(cli_va, PAGE_SIZE, dmem, out_len, wmem);
|
||||
ASSERT(ret == LZO_E_OK);
|
||||
*out_va = dmem;
|
||||
+ if ( !tmemc )
|
||||
+ cli_put_page(cli_va, cli_pfp, cli_mfn, 0);
|
||||
unmap_domain_page(cli_va);
|
||||
return 1;
|
||||
}
|
||||
@@ -157,14 +205,17 @@ EXPORT int tmh_copy_to_client(tmem_cli_m
|
||||
pagesize_t tmem_offset, pagesize_t pfn_offset, pagesize_t len, void *cli_va)
|
||||
{
|
||||
unsigned long tmem_mfn, cli_mfn = 0;
|
||||
- int mark_dirty = 1;
|
||||
void *tmem_va;
|
||||
+ pfp_t *cli_pfp = NULL;
|
||||
+ bool_t tmemc = cli_va != NULL; /* if true, cli_va is control-op buffer */
|
||||
|
||||
ASSERT(pfp != NULL);
|
||||
- if ( cli_va != NULL )
|
||||
- mark_dirty = 0;
|
||||
- else if ( (cli_va = cli_mfn_to_va(cmfn,&cli_mfn)) == NULL)
|
||||
- return -EFAULT;
|
||||
+ if ( !tmemc )
|
||||
+ {
|
||||
+ cli_va = cli_get_page(cmfn, &cli_mfn, &cli_pfp, 1);
|
||||
+ if ( cli_va == NULL )
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
tmem_mfn = page_to_mfn(pfp);
|
||||
tmem_va = map_domain_page(tmem_mfn);
|
||||
if (len == PAGE_SIZE && !tmem_offset && !pfn_offset)
|
||||
@@ -172,11 +223,8 @@ EXPORT int tmh_copy_to_client(tmem_cli_m
|
||||
else if ( (tmem_offset+len <= PAGE_SIZE) && (pfn_offset+len <= PAGE_SIZE) )
|
||||
memcpy((char *)cli_va+pfn_offset,(char *)tmem_va+tmem_offset,len);
|
||||
unmap_domain_page(tmem_va);
|
||||
- if ( mark_dirty )
|
||||
- {
|
||||
- unmap_domain_page(cli_va);
|
||||
- paging_mark_dirty(current->domain,cli_mfn);
|
||||
- }
|
||||
+ if ( !tmemc )
|
||||
+ cli_put_page(cli_va, cli_pfp, cli_mfn, 1);
|
||||
mb();
|
||||
return 1;
|
||||
}
|
||||
@@ -185,22 +233,22 @@ EXPORT int tmh_decompress_to_client(tmem
|
||||
size_t size, void *cli_va)
|
||||
{
|
||||
unsigned long cli_mfn = 0;
|
||||
- int mark_dirty = 1;
|
||||
+ pfp_t *cli_pfp = NULL;
|
||||
size_t out_len = PAGE_SIZE;
|
||||
+ bool_t tmemc = cli_va != NULL; /* if true, cli_va is control-op buffer */
|
||||
int ret;
|
||||
|
||||
- if ( cli_va != NULL )
|
||||
- mark_dirty = 0;
|
||||
- else if ( (cli_va = cli_mfn_to_va(cmfn,&cli_mfn)) == NULL)
|
||||
- return -EFAULT;
|
||||
+ if ( !tmemc )
|
||||
+ {
|
||||
+ cli_va = cli_get_page(cmfn, &cli_mfn, &cli_pfp, 1);
|
||||
+ if ( cli_va == NULL )
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
ret = lzo1x_decompress_safe(tmem_va, size, cli_va, &out_len);
|
||||
ASSERT(ret == LZO_E_OK);
|
||||
ASSERT(out_len == PAGE_SIZE);
|
||||
- if ( mark_dirty )
|
||||
- {
|
||||
- unmap_domain_page(cli_va);
|
||||
- paging_mark_dirty(current->domain,cli_mfn);
|
||||
- }
|
||||
+ if ( !tmemc )
|
||||
+ cli_put_page(cli_va, cli_pfp, cli_mfn, 1);
|
||||
mb();
|
||||
return 1;
|
||||
}
|
||||
@@ -210,18 +258,19 @@ EXPORT int tmh_copy_tze_to_client(tmem_c
|
||||
{
|
||||
void *cli_va;
|
||||
unsigned long cli_mfn;
|
||||
+ pfp_t *cli_pfp = NULL;
|
||||
|
||||
ASSERT(!(len & (sizeof(uint64_t)-1)));
|
||||
ASSERT(len <= PAGE_SIZE);
|
||||
ASSERT(len > 0 || tmem_va == NULL);
|
||||
- if ( (cli_va = cli_mfn_to_va(cmfn,&cli_mfn)) == NULL)
|
||||
+ cli_va = cli_get_page(cmfn, &cli_mfn, &cli_pfp, 1);
|
||||
+ if ( cli_va == NULL )
|
||||
return -EFAULT;
|
||||
if ( len > 0 )
|
||||
memcpy((char *)cli_va,(char *)tmem_va,len);
|
||||
if ( len < PAGE_SIZE )
|
||||
memset((char *)cli_va+len,0,PAGE_SIZE-len);
|
||||
- unmap_domain_page(cli_va);
|
||||
- paging_mark_dirty(current->domain,cli_mfn);
|
||||
+ cli_put_page(cli_va, cli_pfp, cli_mfn, 1);
|
||||
mb();
|
||||
return 1;
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1285340011 -3600
|
||||
# Node ID eb247ea9db8c8b541a7f8c9cdc51c064c4c9e41c
|
||||
# Parent 105c938eacbbc250447a676bb2088f804033b82b
|
||||
x86: check CPUID level before enabling xsave
|
||||
References: bnc#640773
|
||||
|
||||
While not as relevant after c/s 21894, is still seems safer to check
|
||||
the CPUID level here, just like Linux does. The is particularly
|
||||
relevant for the 4.0 tree (which doesn't have said c/s), but also
|
||||
possibly for nested environments where writing MSR_IA32_MISC_ENABLE
|
||||
may not actually take effect (Xen itself ignores such writes).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/i387.c
|
||||
+++ b/xen/arch/x86/i387.c
|
||||
@@ -132,6 +132,8 @@ void restore_fpu(struct vcpu *v)
|
||||
}
|
||||
}
|
||||
|
||||
+#define XSTATE_CPUID 0xd
|
||||
+
|
||||
/*
|
||||
* Maximum size (in byte) of the XSAVE/XRSTOR save area required by all
|
||||
* the supported and enabled features on the processor, including the
|
||||
@@ -148,7 +150,12 @@ void xsave_init(void)
|
||||
int cpu = smp_processor_id();
|
||||
u32 min_size;
|
||||
|
||||
- cpuid_count(0xd, 0, &eax, &ebx, &ecx, &edx);
|
||||
+ if ( boot_cpu_data.cpuid_level < XSTATE_CPUID ) {
|
||||
+ printk(XENLOG_ERR "XSTATE_CPUID missing\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
|
||||
|
||||
printk("%s: cpu%d: cntxt_max_size: 0x%x and states: %08x:%08x\n",
|
||||
__func__, cpu, ecx, edx, eax);
|
||||
@@ -169,7 +176,7 @@ void xsave_init(void)
|
||||
*/
|
||||
set_in_cr4(X86_CR4_OSXSAVE);
|
||||
set_xcr0(eax & XCNTXT_MASK);
|
||||
- cpuid_count(0xd, 0, &eax, &ebx, &ecx, &edx);
|
||||
+ cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
|
||||
clear_in_cr4(X86_CR4_OSXSAVE);
|
||||
|
||||
if ( cpu == 0 )
|
@ -23,9 +23,11 @@ Further, the default case value-changed check can be simplified.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/traps.c
|
||||
+++ b/xen/arch/x86/traps.c
|
||||
@@ -1661,6 +1661,16 @@ unsigned long guest_to_host_gpr_switch(u
|
||||
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
|
||||
|
||||
void (*pv_post_outb_hook)(unsigned int port, u8 value);
|
||||
|
||||
@ -42,7 +44,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
/* Instruction fetch with error handling. */
|
||||
#define insn_fetch(type, base, eip, limit) \
|
||||
({ unsigned long _rc, _ptr = (base) + (eip); \
|
||||
@@ -2258,6 +2268,13 @@ static int emulate_privileged_op(struct
|
||||
@@ -2276,6 +2286,13 @@ static int emulate_privileged_op(struct
|
||||
if ( wrmsr_safe(MSR_FAM10H_MMIO_CONF_BASE, eax, edx) != 0 )
|
||||
goto fail;
|
||||
break;
|
||||
@ -56,7 +58,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
case MSR_IA32_MPERF:
|
||||
case MSR_IA32_APERF:
|
||||
if (( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL ) &&
|
||||
@@ -2364,11 +2381,7 @@ static int emulate_privileged_op(struct
|
||||
@@ -2382,11 +2399,7 @@ static int emulate_privileged_op(struct
|
||||
case MSR_IA32_MISC_ENABLE:
|
||||
if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
|
||||
goto fail;
|
||||
@ -69,8 +71,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
break;
|
||||
case MSR_EFER:
|
||||
case MSR_AMD_PATCHLEVEL:
|
||||
--- a/xen/include/asm-x86/msr.h
|
||||
+++ b/xen/include/asm-x86/msr.h
|
||||
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
|
||||
@@ -39,7 +39,8 @@ static inline void wrmsrl(unsigned int m
|
||||
__asm__ __volatile__( \
|
||||
"1: rdmsr\n2:\n" \
|
||||
|
@ -1,70 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1286028195 -3600
|
||||
# Node ID aed9fd361340158daf2d7160d1b367478b6312d6
|
||||
# Parent 3518149c4d5d0d8ce7402a24f95d3badbecc1c17
|
||||
x86: fix boot failure (regression from pre-4.0 IRQ handling changes)
|
||||
References: bnc#583568, bnc#615206
|
||||
|
||||
With the change to index irq_desc[] by IRQ rather than by vector, the
|
||||
prior implicit change of the used flow handler when altering the IRQ
|
||||
routing path to go through the 8259A didn't work anymore, and hence
|
||||
on boards needing the ExtINT delivery workaround failed to boot.
|
||||
|
||||
Make make_8259A_irq() a real function again, thus allowing the flow
|
||||
handler to be changed there.
|
||||
|
||||
Also eliminate the generally superfluous and (at least theoretically)
|
||||
dangerous hard coded setting of the flow handler for IRQ0: Earlier
|
||||
code should have set this already based on information coming from
|
||||
ACPI/MPS, and non-standard systems may e.g. have this IRQ level
|
||||
triggered.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
Tested-by: Markus Schuster <ml@markus.schuster.name>
|
||||
|
||||
--- a/xen/arch/x86/i8259.c
|
||||
+++ b/xen/arch/x86/i8259.c
|
||||
@@ -367,6 +367,12 @@ void __devinit init_8259A(int auto_eoi)
|
||||
spin_unlock_irqrestore(&i8259A_lock, flags);
|
||||
}
|
||||
|
||||
+void __init make_8259A_irq(unsigned int irq)
|
||||
+{
|
||||
+ io_apic_irqs &= ~(1 << irq);
|
||||
+ irq_to_desc(irq)->handler = &i8259A_irq_type;
|
||||
+}
|
||||
+
|
||||
static struct irqaction __read_mostly cascade = { no_action, "cascade", NULL};
|
||||
|
||||
void __init init_IRQ(void)
|
||||
--- a/xen/arch/x86/io_apic.c
|
||||
+++ b/xen/arch/x86/io_apic.c
|
||||
@@ -38,9 +38,6 @@
|
||||
#include <io_ports.h>
|
||||
#include <public/physdev.h>
|
||||
|
||||
-/* Different to Linux: our implementation can be simpler. */
|
||||
-#define make_8259A_irq(irq) (io_apic_irqs &= ~(1<<(irq)))
|
||||
-
|
||||
int (*ioapic_renumber_irq)(int ioapic, int irq);
|
||||
atomic_t irq_mis_count;
|
||||
|
||||
@@ -1929,7 +1926,6 @@ static inline void check_timer(void)
|
||||
|
||||
irq_desc[0].depth = 0;
|
||||
irq_desc[0].status &= ~IRQ_DISABLED;
|
||||
- irq_desc[0].handler = &ioapic_edge_type;
|
||||
|
||||
/*
|
||||
* Subtle, code in do_timer_interrupt() expects an AEOI
|
||||
--- a/xen/include/asm-x86/irq.h
|
||||
+++ b/xen/include/asm-x86/irq.h
|
||||
@@ -94,6 +94,7 @@ int i8259A_irq_pending(unsigned int irq)
|
||||
void mask_8259A(void);
|
||||
void unmask_8259A(void);
|
||||
void init_8259A(int aeoi);
|
||||
+void make_8259A_irq(unsigned int irq);
|
||||
int i8259A_suspend(void);
|
||||
int i8259A_resume(void);
|
||||
|
@ -13,9 +13,11 @@ change.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/traps.c
|
||||
+++ b/xen/arch/x86/traps.c
|
||||
@@ -2268,6 +2268,14 @@ static int emulate_privileged_op(struct
|
||||
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
|
||||
if ( wrmsr_safe(MSR_FAM10H_MMIO_CONF_BASE, eax, edx) != 0 )
|
||||
goto fail;
|
||||
break;
|
||||
@ -30,7 +32,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
case MSR_IA32_MISC_ENABLE:
|
||||
if ( rdmsr_safe(regs->ecx, l, h) )
|
||||
goto invalid;
|
||||
@@ -2375,16 +2383,21 @@ static int emulate_privileged_op(struct
|
||||
@@ -2393,16 +2401,21 @@ static int emulate_privileged_op(struct
|
||||
regs->eax = regs->edx = 0;
|
||||
break;
|
||||
}
|
||||
@ -57,7 +59,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
default:
|
||||
if ( rdmsr_hypervisor_regs(regs->ecx, &val) )
|
||||
{
|
||||
@@ -2400,6 +2413,8 @@ static int emulate_privileged_op(struct
|
||||
@@ -2418,6 +2431,8 @@ static int emulate_privileged_op(struct
|
||||
if ( rc )
|
||||
goto rdmsr_writeback;
|
||||
|
||||
|
@ -1,89 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1286784156 -3600
|
||||
# Node ID eb964c4b4f31c6b7bdfe8504839c4acac776f506
|
||||
# Parent a1405385db77c7c81aac27bd88d6c4b2d90b1389
|
||||
x86-64: workaround for BIOSes wrongly enabling LAHF_LM feature indicator
|
||||
|
||||
This workaround is taken from Linux, and the main motivation (besides
|
||||
such workarounds indeed belonging in the hypervisor rather than each
|
||||
kernel) is to suppress the warnings in the Xen log each Linux guest
|
||||
would cause due to the disallowed wrmsr.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/cpu/amd.c
|
||||
+++ b/xen/arch/x86/cpu/amd.c
|
||||
@@ -44,6 +44,47 @@ static inline void wrmsr_amd(unsigned in
|
||||
);
|
||||
}
|
||||
|
||||
+static inline int rdmsr_amd_safe(unsigned int msr, unsigned int *lo,
|
||||
+ unsigned int *hi)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ asm volatile("1: rdmsr\n2:\n"
|
||||
+ ".section .fixup,\"ax\"\n"
|
||||
+ "3: movl %6,%2\n"
|
||||
+ " jmp 2b\n"
|
||||
+ ".previous\n"
|
||||
+ ".section __ex_table,\"a\"\n"
|
||||
+ __FIXUP_ALIGN "\n"
|
||||
+ __FIXUP_WORD " 1b,3b\n"
|
||||
+ ".previous\n"
|
||||
+ : "=a" (*lo), "=d" (*hi), "=r" (err)
|
||||
+ : "c" (msr), "D" (0x9c5a203a), "2" (0), "i" (-EFAULT));
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static inline int wrmsr_amd_safe(unsigned int msr, unsigned int lo,
|
||||
+ unsigned int hi)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ asm volatile("1: wrmsr\n2:\n"
|
||||
+ ".section .fixup,\"ax\"\n"
|
||||
+ "3: movl %6,%0\n"
|
||||
+ " jmp 2b\n"
|
||||
+ ".previous\n"
|
||||
+ ".section __ex_table,\"a\"\n"
|
||||
+ __FIXUP_ALIGN "\n"
|
||||
+ __FIXUP_WORD " 1b,3b\n"
|
||||
+ ".previous\n"
|
||||
+ : "=r" (err)
|
||||
+ : "c" (msr), "a" (lo), "d" (hi), "D" (0x9c5a203a),
|
||||
+ "0" (0), "i" (-EFAULT));
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Mask the features and extended features returned by CPUID. Parameters are
|
||||
* set from the boot line via two methods:
|
||||
@@ -330,6 +371,24 @@ static void __devinit init_amd(struct cp
|
||||
3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
|
||||
clear_bit(0*32+31, c->x86_capability);
|
||||
|
||||
+#ifdef CONFIG_X86_64
|
||||
+ if (c->x86 == 0xf && c->x86_model < 0x14
|
||||
+ && cpu_has(c, X86_FEATURE_LAHF_LM)) {
|
||||
+ /*
|
||||
+ * Some BIOSes incorrectly force this feature, but only K8
|
||||
+ * revision D (model = 0x14) and later actually support it.
|
||||
+ * (AMD Erratum #110, docId: 25759).
|
||||
+ */
|
||||
+ unsigned int lo, hi;
|
||||
+
|
||||
+ clear_bit(X86_FEATURE_LAHF_LM, c->x86_capability);
|
||||
+ if (!rdmsr_amd_safe(0xc001100d, &lo, &hi)) {
|
||||
+ hi &= ~1;
|
||||
+ wrmsr_amd_safe(0xc001100d, lo, hi);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
r = get_model_name(c);
|
||||
|
||||
switch(c->x86)
|
@ -16,10 +16,10 @@ Signed-off-by: Stephan Peijnik <spe@anexia.at>
|
||||
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
||||
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
||||
|
||||
Index: xen-4.0.1-testing/README
|
||||
Index: xen-4.0.2-testing/README
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/README
|
||||
+++ xen-4.0.1-testing/README
|
||||
--- xen-4.0.2-testing.orig/README
|
||||
+++ xen-4.0.2-testing/README
|
||||
@@ -137,12 +137,15 @@ Python Runtime Libraries
|
||||
Xend (the Xen daemon) has the following runtime dependencies:
|
||||
|
||||
@ -50,10 +50,10 @@ Index: xen-4.0.1-testing/README
|
||||
|
||||
|
||||
Intel(R) Trusted Execution Technology Support
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xm/xenapi_create.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xm/xenapi_create.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xm/xenapi_create.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xm/xenapi_create.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xm/xenapi_create.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xm/xenapi_create.py
|
||||
@@ -14,13 +14,15 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#============================================================================
|
||||
|
@ -1,71 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1287922506 -3600
|
||||
# Node ID d6e3cd10a9a6ab16d0cc772ee70b2ae99e8fac31
|
||||
# Parent 2208a036f8d9d932de8ab0aa0206f5c57dba8728
|
||||
x86/kexec: fix very old regression and make compatible with modern Linux
|
||||
References: bnc#619122
|
||||
|
||||
c/s 13829 lost the (32-bit only) cpu_has_pae argument passed to the
|
||||
primary kernel's stub (in the 32-bit Xen case only), and Linux
|
||||
2.6.27/.30 (32-/64-bit) introduced a new argument (for KEXEC_JUMP)
|
||||
which for now simply gets passed a hardcoded value.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/machine_kexec.c
|
||||
+++ b/xen/arch/x86/machine_kexec.c
|
||||
@@ -23,7 +23,11 @@
|
||||
typedef void (*relocate_new_kernel_t)(
|
||||
unsigned long indirection_page,
|
||||
unsigned long *page_list,
|
||||
- unsigned long start_address);
|
||||
+ unsigned long start_address,
|
||||
+#ifdef __i386__
|
||||
+ unsigned int cpu_has_pae,
|
||||
+#endif
|
||||
+ unsigned int preserve_context);
|
||||
|
||||
extern int machine_kexec_get_xen(xen_kexec_range_t *range);
|
||||
|
||||
@@ -121,7 +125,11 @@ void machine_kexec(xen_kexec_image_t *im
|
||||
|
||||
rnk = (relocate_new_kernel_t) image->page_list[1];
|
||||
(*rnk)(image->indirection_page, image->page_list,
|
||||
- image->start_address);
|
||||
+ image->start_address,
|
||||
+#ifdef __i386__
|
||||
+ 1 /* cpu_has_pae */,
|
||||
+#endif
|
||||
+ 0 /* preserve_context */);
|
||||
}
|
||||
}
|
||||
|
||||
--- a/xen/arch/x86/x86_64/compat_kexec.S
|
||||
+++ b/xen/arch/x86/x86_64/compat_kexec.S
|
||||
@@ -119,6 +119,7 @@ compatibility_mode:
|
||||
movl %eax, %ss
|
||||
|
||||
/* Push arguments onto stack. */
|
||||
+ pushl $0 /* 20(%esp) - preserve context */
|
||||
pushl $1 /* 16(%esp) - cpu has pae */
|
||||
pushl %ecx /* 12(%esp) - start address */
|
||||
pushl %edx /* 8(%esp) - page list */
|
||||
--- a/xen/include/asm-x86/cpufeature.h
|
||||
+++ b/xen/include/asm-x86/cpufeature.h
|
||||
@@ -138,7 +138,6 @@
|
||||
#define cpu_has_de boot_cpu_has(X86_FEATURE_DE)
|
||||
#define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE)
|
||||
#define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC)
|
||||
-#define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE)
|
||||
#define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE)
|
||||
#define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT)
|
||||
#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
|
||||
@@ -164,7 +163,6 @@
|
||||
#define cpu_has_de 1
|
||||
#define cpu_has_pse 1
|
||||
#define cpu_has_tsc 1
|
||||
-#define cpu_has_pae 1
|
||||
#define cpu_has_pge 1
|
||||
#define cpu_has_pat 1
|
||||
#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
|
@ -12,10 +12,10 @@ numa placement should be handled by cpupool configuration instead.
|
||||
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
|
||||
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendCPUPool.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendCPUPool.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendCPUPool.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendCPUPool.py
|
||||
@@ -881,6 +881,11 @@ class XendCPUPool(XendBase):
|
||||
lookup_pool = classmethod(lookup_pool)
|
||||
|
||||
@ -28,10 +28,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendCPUPool.py
|
||||
def _cpu_number_to_ref(cls, number):
|
||||
node = XendNode.instance()
|
||||
for cpu_ref in node.get_host_cpu_refs():
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -2790,7 +2790,7 @@ class XendDomainInfo:
|
||||
return map(lambda x: x[0], sorted(enumerate(nodeload), key=lambda x:x[1]))
|
||||
|
||||
|
@ -1,19 +1,3 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1286028261 -3600
|
||||
# Node ID 4beee577912215c734b79cb84bfe3fb20c1afbfc
|
||||
# Parent aed9fd361340158daf2d7160d1b367478b6312d6
|
||||
Vt-d: fix dom0 graphics problem on Levnovo T410.
|
||||
References: bnc#643477
|
||||
|
||||
The patch is derived from a similar quirk in Linux kernel by David
|
||||
Woodhouse and Adam Jackson. It checks for VT enabling bit in IGD GGC
|
||||
register. If VT is not enabled correctly in the IGD, Xen does not
|
||||
enable VT-d translation for IGD VT-d engine. In case where iommu boot
|
||||
parameter is set to force, Xen calls panic().
|
||||
|
||||
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1288344554 -3600
|
||||
@ -41,43 +25,52 @@ enhancement.
|
||||
|
||||
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/Makefile
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/Makefile
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/Makefile
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1294221021 0
|
||||
# Node ID e635e6641c07ee2da66b16f46f45442c9a46821d
|
||||
# Parent 76d897a06b316bf2278220b006d578faf31ce3fb
|
||||
[VTD] added WLAN device ID on Fujitsu's platform in quirks.c
|
||||
|
||||
Added WLAN device ID 0x422C that was found on Fujitsu's Calpella
|
||||
system to WLAN quirk.
|
||||
|
||||
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/vtd/Makefile
|
||||
+++ b/xen/drivers/passthrough/vtd/Makefile
|
||||
@@ -6,3 +6,4 @@ obj-y += dmar.o
|
||||
obj-y += utils.o
|
||||
obj-y += qinval.o
|
||||
obj-y += intremap.o
|
||||
+obj-y += quirks.o
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/dmar.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
@@ -46,6 +46,7 @@ LIST_HEAD(acpi_rmrr_units);
|
||||
LIST_HEAD(acpi_atsr_units);
|
||||
LIST_HEAD(acpi_rhsa_units);
|
||||
--- a/xen/drivers/passthrough/vtd/dmar.c
|
||||
+++ b/xen/drivers/passthrough/vtd/dmar.c
|
||||
@@ -242,7 +242,7 @@ struct acpi_rhsa_unit * drhd_to_rhsa(str
|
||||
|
||||
+static u64 igd_drhd_address;
|
||||
u8 dmar_host_address_width;
|
||||
|
||||
void dmar_scope_add_buses(struct dmar_scope *scope, u16 sec_bus, u16 sub_bus)
|
||||
@@ -239,6 +240,11 @@ struct acpi_rhsa_unit * drhd_to_rhsa(str
|
||||
return NULL;
|
||||
int is_igd_drhd(struct acpi_drhd_unit *drhd)
|
||||
{
|
||||
- return ( drhd->address == igd_drhd_address ? 1 : 0);
|
||||
+ return drhd && (drhd->address == igd_drhd_address);
|
||||
}
|
||||
|
||||
+int is_igd_drhd(struct acpi_drhd_unit *drhd)
|
||||
+{
|
||||
+ return drhd && (drhd->address == igd_drhd_address);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Count number of devices in device scope. Do not include PCI sub
|
||||
* hierarchies.
|
||||
@@ -333,6 +339,15 @@ static int __init acpi_parse_dev_scope(v
|
||||
@@ -278,8 +278,7 @@ static int scope_device_count(void *star
|
||||
|
||||
|
||||
static int __init acpi_parse_dev_scope(void *start, void *end,
|
||||
- void *acpi_entry, int type,
|
||||
- int *igd)
|
||||
+ void *acpi_entry, int type)
|
||||
{
|
||||
struct dmar_scope *scope = acpi_entry;
|
||||
struct acpi_ioapic_unit *acpi_ioapic_unit;
|
||||
@@ -340,8 +339,15 @@ static int __init acpi_parse_dev_scope(v
|
||||
if ( iommu_verbose )
|
||||
dprintk(VTDPREFIX, " endpoint: %x:%x.%x\n",
|
||||
bus, path->dev, path->fn);
|
||||
- if ( (bus == 0) && (path->dev == 2) && (path->fn == 0) )
|
||||
- *igd = 1;
|
||||
+
|
||||
+ if ( type == DMAR_TYPE )
|
||||
+ {
|
||||
@ -90,21 +83,65 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
break;
|
||||
|
||||
case ACPI_DEV_IOAPIC:
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/dmar.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/dmar.h
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/dmar.h
|
||||
@@ -114,5 +114,6 @@ void *map_to_nocache_virt(int nr_iommus,
|
||||
int vtd_hw_check(void);
|
||||
void disable_pmr(struct iommu *iommu);
|
||||
int is_usb_device(u8 bus, u8 devfn);
|
||||
+int is_igd_drhd(struct acpi_drhd_unit *drhd);
|
||||
@@ -388,7 +394,7 @@ acpi_parse_one_drhd(struct acpi_dmar_ent
|
||||
struct acpi_table_drhd * drhd = (struct acpi_table_drhd *)header;
|
||||
void *dev_scope_start, *dev_scope_end;
|
||||
struct acpi_drhd_unit *dmaru;
|
||||
- int ret, igd = 0;
|
||||
+ int ret;
|
||||
static int include_all = 0;
|
||||
|
||||
#endif /* _DMAR_H_ */
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/extern.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/extern.h
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/extern.h
|
||||
if ( (ret = acpi_dmar_check_length(header, sizeof(*drhd))) != 0 )
|
||||
@@ -413,10 +419,7 @@ acpi_parse_one_drhd(struct acpi_dmar_ent
|
||||
dev_scope_start = (void *)(drhd + 1);
|
||||
dev_scope_end = ((void *)drhd) + header->length;
|
||||
ret = acpi_parse_dev_scope(dev_scope_start, dev_scope_end,
|
||||
- dmaru, DMAR_TYPE, &igd);
|
||||
-
|
||||
- if ( igd )
|
||||
- igd_drhd_address = dmaru->address;
|
||||
+ dmaru, DMAR_TYPE);
|
||||
|
||||
if ( dmaru->include_all )
|
||||
{
|
||||
@@ -504,7 +507,7 @@ acpi_parse_one_rmrr(struct acpi_dmar_ent
|
||||
struct acpi_rmrr_unit *rmrru;
|
||||
void *dev_scope_start, *dev_scope_end;
|
||||
u64 base_addr = rmrr->base_address, end_addr = rmrr->end_address;
|
||||
- int ret, igd = 0;
|
||||
+ int ret;
|
||||
|
||||
if ( (ret = acpi_dmar_check_length(header, sizeof(*rmrr))) != 0 )
|
||||
return ret;
|
||||
@@ -536,7 +539,7 @@ acpi_parse_one_rmrr(struct acpi_dmar_ent
|
||||
dev_scope_start = (void *)(rmrr + 1);
|
||||
dev_scope_end = ((void *)rmrr) + header->length;
|
||||
ret = acpi_parse_dev_scope(dev_scope_start, dev_scope_end,
|
||||
- rmrru, RMRR_TYPE, &igd);
|
||||
+ rmrru, RMRR_TYPE);
|
||||
|
||||
if ( ret || (rmrru->scope.devices_cnt == 0) )
|
||||
xfree(rmrru);
|
||||
@@ -601,7 +604,7 @@ acpi_parse_one_atsr(struct acpi_dmar_ent
|
||||
{
|
||||
struct acpi_table_atsr *atsr = (struct acpi_table_atsr *)header;
|
||||
struct acpi_atsr_unit *atsru;
|
||||
- int ret, igd = 0;
|
||||
+ int ret;
|
||||
static int all_ports;
|
||||
void *dev_scope_start, *dev_scope_end;
|
||||
|
||||
@@ -622,7 +625,7 @@ acpi_parse_one_atsr(struct acpi_dmar_ent
|
||||
dev_scope_start = (void *)(atsr + 1);
|
||||
dev_scope_end = ((void *)atsr) + header->length;
|
||||
ret = acpi_parse_dev_scope(dev_scope_start, dev_scope_end,
|
||||
- atsru, ATSR_TYPE, &igd);
|
||||
+ atsru, ATSR_TYPE);
|
||||
}
|
||||
else
|
||||
{
|
||||
--- a/xen/drivers/passthrough/vtd/extern.h
|
||||
+++ b/xen/drivers/passthrough/vtd/extern.h
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
extern int qinval_enabled;
|
||||
@ -170,10 +207,8 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/extern.h
|
||||
+void me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map);
|
||||
|
||||
#endif // _VTD_EXTERN_H_
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
--- a/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ b/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -43,7 +43,6 @@
|
||||
#endif
|
||||
|
||||
@ -247,35 +282,43 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
}
|
||||
|
||||
static void iommu_flush_all(void)
|
||||
@@ -688,10 +716,26 @@ static int iommu_set_root_entry(struct i
|
||||
@@ -688,24 +716,13 @@ static int iommu_set_root_entry(struct i
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void iommu_enable_translation(struct iommu *iommu)
|
||||
+static void iommu_enable_translation(struct acpi_drhd_unit *drhd)
|
||||
-#define GGC 0x52
|
||||
-#define GGC_MEMORY_VT_ENABLED (0x8 << 8)
|
||||
-static int is_igd_vt_enabled(void)
|
||||
-{
|
||||
- unsigned short ggc;
|
||||
-
|
||||
- /* integrated graphics on Intel platforms is located at 0:2.0 */
|
||||
- ggc = pci_conf_read16(0, 2, 0, GGC);
|
||||
- return ( ggc & GGC_MEMORY_VT_ENABLED ? 1 : 0 );
|
||||
-}
|
||||
-
|
||||
static void iommu_enable_translation(struct acpi_drhd_unit *drhd)
|
||||
{
|
||||
u32 sts;
|
||||
unsigned long flags;
|
||||
+ struct iommu *iommu = drhd->iommu;
|
||||
+
|
||||
struct iommu *iommu = drhd->iommu;
|
||||
|
||||
- if ( !is_igd_vt_enabled() && is_igd_drhd(drhd) )
|
||||
+ if ( is_igd_drhd(drhd) && !is_igd_vt_enabled_quirk() )
|
||||
+ {
|
||||
+ if ( force_iommu )
|
||||
+ panic("BIOS did not enable IGD for VT properly, crash Xen for security purpose!\n");
|
||||
+ else
|
||||
+ {
|
||||
+ dprintk(XENLOG_WARNING VTDPREFIX,
|
||||
+ "BIOS did not enable IGD for VT properly. Disabling IGD VT-d engine.\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
+ /* apply platform specific errata workarounds */
|
||||
+ vtd_ops_preamble_quirk(iommu);
|
||||
|
||||
+
|
||||
if ( iommu_verbose )
|
||||
dprintk(VTDPREFIX,
|
||||
@@ -705,6 +749,9 @@ static void iommu_enable_translation(str
|
||||
"iommu_enable_translation: iommu->reg = %p\n", iommu->reg);
|
||||
@@ -729,6 +749,9 @@ static void iommu_enable_translation(str
|
||||
(sts & DMA_GSTS_TES), sts);
|
||||
spin_unlock_irqrestore(&iommu->register_lock, flags);
|
||||
|
||||
@ -285,7 +328,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
/* Disable PMRs when VT-d engine takes effect per spec definition */
|
||||
disable_pmr(iommu);
|
||||
}
|
||||
@@ -714,6 +761,9 @@ static void iommu_disable_translation(st
|
||||
@@ -738,6 +761,9 @@ static void iommu_disable_translation(st
|
||||
u32 sts;
|
||||
unsigned long flags;
|
||||
|
||||
@ -295,7 +338,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
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));
|
||||
@@ -722,6 +772,9 @@ static void iommu_disable_translation(st
|
||||
@@ -746,6 +772,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);
|
||||
@ -305,7 +348,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
}
|
||||
|
||||
enum faulttype {
|
||||
@@ -1065,6 +1118,7 @@ int __init iommu_alloc(struct acpi_drhd_
|
||||
@@ -1089,6 +1118,7 @@ int __init iommu_alloc(struct acpi_drhd_
|
||||
xfree(iommu);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -313,21 +356,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
|
||||
iommu->reg = map_to_nocache_virt(nr_iommus, drhd->address);
|
||||
iommu->index = nr_iommus++;
|
||||
@@ -1178,7 +1232,6 @@ static int intel_iommu_domain_init(struc
|
||||
|
||||
static void intel_iommu_dom0_init(struct domain *d)
|
||||
{
|
||||
- struct iommu *iommu;
|
||||
struct acpi_drhd_unit *drhd;
|
||||
|
||||
if ( !iommu_passthrough && !need_iommu(d) )
|
||||
@@ -1194,12 +1247,11 @@ static void intel_iommu_dom0_init(struct
|
||||
|
||||
for_each_drhd_unit ( drhd )
|
||||
{
|
||||
- iommu = drhd->iommu;
|
||||
- iommu_enable_translation(iommu);
|
||||
+ iommu_enable_translation(drhd);
|
||||
@@ -1221,7 +1251,7 @@ static void intel_iommu_dom0_init(struct
|
||||
}
|
||||
}
|
||||
|
||||
@ -336,7 +365,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
struct domain *domain,
|
||||
struct iommu *iommu,
|
||||
u8 bus, u8 devfn)
|
||||
@@ -1301,6 +1353,8 @@ static int domain_context_mapping_one(
|
||||
@@ -1324,6 +1354,8 @@ static int domain_context_mapping_one(
|
||||
|
||||
unmap_vtd_domain_page(context_entries);
|
||||
|
||||
@ -345,7 +374,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1382,7 +1436,7 @@ static int domain_context_mapping(struct
|
||||
@@ -1398,7 +1430,7 @@ static int domain_context_mapping(struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -354,7 +383,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
struct domain *domain,
|
||||
struct iommu *iommu,
|
||||
u8 bus, u8 devfn)
|
||||
@@ -1430,6 +1484,8 @@ static int domain_context_unmap_one(
|
||||
@@ -1446,6 +1478,8 @@ static int domain_context_unmap_one(
|
||||
spin_unlock(&iommu->lock);
|
||||
unmap_vtd_domain_page(context_entries);
|
||||
|
||||
@ -363,7 +392,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1928,19 +1984,6 @@ static void setup_dom0_rmrr(struct domai
|
||||
@@ -1945,19 +1979,6 @@ static void setup_dom0_rmrr(struct domai
|
||||
spin_unlock(&pcidevs_lock);
|
||||
}
|
||||
|
||||
@ -383,7 +412,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
int intel_vtd_setup(void)
|
||||
{
|
||||
struct acpi_drhd_unit *drhd;
|
||||
@@ -1949,7 +1992,7 @@ int intel_vtd_setup(void)
|
||||
@@ -1966,7 +1987,7 @@ int intel_vtd_setup(void)
|
||||
if ( list_empty(&acpi_drhd_units) )
|
||||
return -ENODEV;
|
||||
|
||||
@ -392,19 +421,8 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
|
||||
irq_to_iommu = xmalloc_array(struct iommu*, nr_irqs);
|
||||
BUG_ON(!irq_to_iommu);
|
||||
@@ -2164,7 +2207,7 @@ static void vtd_resume(void)
|
||||
(u32) iommu_state[i][DMAR_FEUADDR_REG]);
|
||||
spin_unlock_irqrestore(&iommu->register_lock, flags);
|
||||
|
||||
- iommu_enable_translation(iommu);
|
||||
+ iommu_enable_translation(drhd);
|
||||
}
|
||||
}
|
||||
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/iommu.h
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
--- a/xen/drivers/passthrough/vtd/iommu.h
|
||||
+++ b/xen/drivers/passthrough/vtd/iommu.h
|
||||
@@ -501,6 +501,7 @@ struct intel_iommu {
|
||||
struct qi_ctrl qi_ctrl;
|
||||
struct ir_ctrl ir_ctrl;
|
||||
@ -413,11 +431,9 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
};
|
||||
|
||||
#endif
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/quirks.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/quirks.c
|
||||
@@ -0,0 +1,262 @@
|
||||
+++ b/xen/drivers/passthrough/vtd/quirks.c
|
||||
@@ -0,0 +1,263 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2010, Intel Corporation.
|
||||
+ *
|
||||
@ -672,6 +688,7 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/quirks.c
|
||||
+ case 0x00858086:
|
||||
+ case 0x42388086:
|
||||
+ case 0x422b8086:
|
||||
+ case 0x422c8086:
|
||||
+ map_me_phantom_function(domain, 22, map);
|
||||
+ break;
|
||||
+ default:
|
||||
@ -680,10 +697,8 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/quirks.c
|
||||
+
|
||||
+ }
|
||||
+}
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/vtd.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/vtd.h
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/vtd.h
|
||||
--- a/xen/drivers/passthrough/vtd/vtd.h
|
||||
+++ b/xen/drivers/passthrough/vtd/vtd.h
|
||||
@@ -23,6 +23,9 @@
|
||||
|
||||
#include <xen/iommu.h>
|
||||
@ -713,10 +728,8 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/vtd.h
|
||||
-void iommu_free(struct acpi_drhd_unit *drhd);
|
||||
-
|
||||
#endif // _VTD_H_
|
||||
Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/vtd.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/drivers/passthrough/vtd/x86/vtd.c
|
||||
+++ xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/vtd.c
|
||||
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
|
||||
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "../iommu.h"
|
||||
#include "../dmar.h"
|
||||
@ -725,10 +738,8 @@ Index: xen-4.0.1-testing/xen/drivers/passthrough/vtd/x86/vtd.c
|
||||
|
||||
/*
|
||||
* iommu_inclusive_mapping: when set, all memory below 4GB is included in dom0
|
||||
Index: xen-4.0.1-testing/xen/include/asm-x86/fixmap.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/include/asm-x86/fixmap.h
|
||||
+++ xen-4.0.1-testing/xen/include/asm-x86/fixmap.h
|
||||
--- a/xen/include/asm-x86/fixmap.h
|
||||
+++ b/xen/include/asm-x86/fixmap.h
|
||||
@@ -52,6 +52,7 @@ enum fixed_addresses {
|
||||
FIX_MSIX_IO_RESERV_BASE,
|
||||
FIX_MSIX_IO_RESERV_END = FIX_MSIX_IO_RESERV_BASE + FIX_MSIX_MAX_PAGES -1,
|
@ -1,22 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1288371977 -3600
|
||||
# Node ID 7afd8dd1d6cb97484d263311f3f0e6ab74d27ed3
|
||||
# Parent 49803ac994f4094719ec2c3b67d82561a24ba293
|
||||
VT-d: only scan secondary functions on multi-function devices
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/pci.c
|
||||
+++ b/xen/drivers/passthrough/pci.c
|
||||
@@ -442,6 +442,10 @@ int __init scan_pci_devices(void)
|
||||
spin_unlock(&pcidevs_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
+
|
||||
+ if ( !func && !(pci_conf_read8(bus, dev, func,
|
||||
+ PCI_HEADER_TYPE) & 0x80) )
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1288772331 0
|
||||
# Node ID 2dfba250c50bafac4e333d84450324daedf5ae2c
|
||||
# Parent 16093532f384eee02518520662a38ad16915b063
|
||||
VT-d: fix device assignment failure (regression from Xen c/s 19805:2f1fa2215e60)
|
||||
References: bnc#647681
|
||||
|
||||
If the device at <secbus>:00.0 is the device the mapping operation was
|
||||
initiated for, trying to map it a second time will fail, and hence
|
||||
this second mapping attempt must be prevented (as was done prior to
|
||||
said c/s).
|
||||
|
||||
While at it, simplify the code a little, too.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
Acked-by: Weidong Han <weidong.han@intel.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ b/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -1402,23 +1402,16 @@ static int domain_context_mapping(struct
|
||||
if ( find_upstream_bridge(&bus, &devfn, &secbus) < 1 )
|
||||
break;
|
||||
|
||||
- /* PCIe to PCI/PCIx bridge */
|
||||
- if ( pdev_type(bus, devfn) == DEV_TYPE_PCIe2PCI_BRIDGE )
|
||||
- {
|
||||
- ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn);
|
||||
- if ( ret )
|
||||
- return ret;
|
||||
+ ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn);
|
||||
|
||||
- /*
|
||||
- * Devices behind PCIe-to-PCI/PCIx bridge may generate
|
||||
- * different requester-id. It may originate from devfn=0
|
||||
- * on the secondary bus behind the bridge. Map that id
|
||||
- * as well.
|
||||
- */
|
||||
+ /*
|
||||
+ * Devices behind PCIe-to-PCI/PCIx bridge may generate different
|
||||
+ * requester-id. It may originate from devfn=0 on the secondary bus
|
||||
+ * behind the bridge. Map that id as well if we didn't already.
|
||||
+ */
|
||||
+ if ( !ret && pdev_type(bus, devfn) == DEV_TYPE_PCIe2PCI_BRIDGE &&
|
||||
+ (secbus != pdev->bus || pdev->devfn != 0) )
|
||||
ret = domain_context_mapping_one(domain, drhd->iommu, secbus, 0);
|
||||
- }
|
||||
- else /* Legacy PCI bridge */
|
||||
- ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn);
|
||||
|
||||
break;
|
||||
|
@ -38,10 +38,11 @@ I've done the same here.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
||||
|
||||
diff -r 28a160746815 -r 461b9d3a643a tools/python/xen/util/pci.py
|
||||
--- a/tools/python/xen/util/pci.py Wed Oct 27 12:24:28 2010 +0100
|
||||
+++ b/tools/python/xen/util/pci.py Thu Oct 28 15:27:09 2010 -0600
|
||||
@@ -240,10 +240,16 @@
|
||||
Index: xen-4.0.2-testing/tools/python/xen/util/pci.py
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/util/pci.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/util/pci.py
|
||||
@@ -240,10 +240,16 @@ def pci_convert_sxp_to_dict(dev_sxp):
|
||||
pci_dev_info = dict(pci_dev[1:])
|
||||
if 'opts' in pci_dev_info:
|
||||
pci_dev_info['opts'] = pci_opts_list_from_sxp(pci_dev)
|
||||
|
@ -16,9 +16,11 @@ depends on VT-d Interrupt remapping).
|
||||
|
||||
Signed-off-by: Weidong Han <weidong.han@intel.com>
|
||||
|
||||
--- a/xen/arch/x86/apic.c
|
||||
+++ b/xen/arch/x86/apic.c
|
||||
@@ -1000,22 +1000,11 @@ static void enable_bsp_x2apic(void)
|
||||
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)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,33 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1289906913 0
|
||||
# Node ID 9b2ca938cfe6c0639471e24634bc4a48d889b412
|
||||
# Parent 87f248de52304bc96a80dc093250fed0197f37e0
|
||||
amd iommu: Fix HV crash with 32bit pv_ops kernel
|
||||
|
||||
Signed-off-by: Wei Wang <wei.wang2@amd.com>
|
||||
Tested-by: Conny Seidel <conny.seidel@amd.com>
|
||||
|
||||
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
|
||||
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
|
||||
@@ -32,9 +32,6 @@
|
||||
#define DMA_32BIT_MASK 0x00000000ffffffffULL
|
||||
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
|
||||
|
||||
-extern int amd_iommu_debug;
|
||||
-extern int amd_iommu_perdev_intremap;
|
||||
-
|
||||
#define AMD_IOMMU_DEBUG(fmt, args...) \
|
||||
do \
|
||||
{ \
|
||||
--- a/xen/include/xen/iommu.h
|
||||
+++ b/xen/include/xen/iommu.h
|
||||
@@ -30,6 +30,8 @@ extern bool_t iommu_enabled;
|
||||
extern bool_t force_iommu, iommu_verbose;
|
||||
extern bool_t iommu_workaround_bios_bug, iommu_passthrough;
|
||||
extern bool_t iommu_snoop, iommu_qinval, iommu_intremap;
|
||||
+extern bool_t amd_iommu_debug;
|
||||
+extern bool_t amd_iommu_perdev_intremap;
|
||||
|
||||
#define domain_hvm_iommu(d) (&d->arch.hvm_domain.hvm_iommu)
|
||||
|
21
22408-vpmu-nehalem.patch
Normal file
21
22408-vpmu-nehalem.patch
Normal file
@ -0,0 +1,21 @@
|
||||
References: bnc#655438
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1290173202 0
|
||||
# Node ID b7ed352fa6100104374000cdbd845bbfc6478f08
|
||||
# Parent 437576a0f2026ded6dcc4b11558714dad1d1d042
|
||||
VPMU: Add the Intel CPU X7542 to the list of supported prcocessors
|
||||
|
||||
Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
|
||||
|
||||
--- a/xen/arch/x86/hvm/vmx/vpmu.c
|
||||
+++ b/xen/arch/x86/hvm/vmx/vpmu.c
|
||||
@@ -96,6 +96,7 @@ void vpmu_initialise(struct vcpu *v)
|
||||
case 23:
|
||||
case 26:
|
||||
case 29:
|
||||
+ case 46:
|
||||
vpmu->arch_vpmu_ops = &core2_vpmu_ops;
|
||||
break;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1290453180 0
|
||||
# Node ID 0cc4ed1ce1f34ce442ed4da106e555931c895395
|
||||
# Parent 899131a8f9d2b99acc4bbe18593952d30446e71b
|
||||
x86: Check for MWAIT in CPUID before using it in ACPI idle code.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ b/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -717,7 +717,8 @@ static void set_cx(
|
||||
{
|
||||
case ACPI_ADR_SPACE_FIXED_HARDWARE:
|
||||
if ( xen_cx->reg.bit_width == VENDOR_INTEL &&
|
||||
- xen_cx->reg.bit_offset == NATIVE_CSTATE_BEYOND_HALT )
|
||||
+ xen_cx->reg.bit_offset == NATIVE_CSTATE_BEYOND_HALT &&
|
||||
+ boot_cpu_has(X86_FEATURE_MWAIT) )
|
||||
cx->entry_method = ACPI_CSTATE_EM_FFH;
|
||||
else
|
||||
cx->entry_method = ACPI_CSTATE_EM_HALT;
|
@ -1,123 +0,0 @@
|
||||
References: bnc#655438
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1290453394 0
|
||||
# Node ID c0c1f5f0745e25af6f8b4a1006637d98a8d63581
|
||||
# Parent 0cc4ed1ce1f34ce442ed4da106e555931c895395
|
||||
x86 hvm: Fix VPMU issue on Nehalem cpus
|
||||
|
||||
Fix an issue on Nehalem cpus where performance counter overflows may
|
||||
lead to endless interrupt loops on this cpu.
|
||||
|
||||
Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1290173202 0
|
||||
# Node ID b7ed352fa6100104374000cdbd845bbfc6478f08
|
||||
# Parent 437576a0f2026ded6dcc4b11558714dad1d1d042
|
||||
VPMU: Add the Intel CPU X7542 to the list of supported prcocessors
|
||||
|
||||
Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
|
||||
|
||||
--- a/xen/arch/x86/hvm/vmx/vpmu.c
|
||||
+++ b/xen/arch/x86/hvm/vmx/vpmu.c
|
||||
@@ -96,6 +96,7 @@ void vpmu_initialise(struct vcpu *v)
|
||||
case 23:
|
||||
case 26:
|
||||
case 29:
|
||||
+ case 46:
|
||||
vpmu->arch_vpmu_ops = &core2_vpmu_ops;
|
||||
break;
|
||||
}
|
||||
--- a/xen/arch/x86/hvm/vmx/vpmu_core2.c
|
||||
+++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c
|
||||
@@ -35,6 +35,68 @@
|
||||
#include <asm/hvm/vmx/vpmu.h>
|
||||
#include <asm/hvm/vmx/vpmu_core2.h>
|
||||
|
||||
+/*
|
||||
+ * QUIRK to workaround an issue on Nehalem processors currently seen
|
||||
+ * on family 6 cpus E5520 (model 26) and X7542 (model 46).
|
||||
+ * The issue leads to endless PMC interrupt loops on the processor.
|
||||
+ * If the interrupt handler is running and a pmc reaches the value 0, this
|
||||
+ * value remains forever and it triggers immediately a new interrupt after
|
||||
+ * finishing the handler.
|
||||
+ * A workaround is to read all flagged counters and if the value is 0 write
|
||||
+ * 1 (or another value != 0) into it.
|
||||
+ * There exist no errata and the real cause of this behaviour is unknown.
|
||||
+ */
|
||||
+bool_t __read_mostly is_pmc_quirk;
|
||||
+
|
||||
+static void check_pmc_quirk(void)
|
||||
+{
|
||||
+ u8 family = current_cpu_data.x86;
|
||||
+ u8 cpu_model = current_cpu_data.x86_model;
|
||||
+ is_pmc_quirk = 0;
|
||||
+ if ( family == 6 )
|
||||
+ {
|
||||
+ if ( cpu_model == 46 || cpu_model == 26 )
|
||||
+ is_pmc_quirk = 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int core2_get_pmc_count(void);
|
||||
+static void handle_pmc_quirk(u64 msr_content)
|
||||
+{
|
||||
+ int num_gen_pmc = core2_get_pmc_count();
|
||||
+ int num_fix_pmc = 3;
|
||||
+ int i;
|
||||
+ u64 val;
|
||||
+
|
||||
+ if ( !is_pmc_quirk )
|
||||
+ return;
|
||||
+
|
||||
+ val = msr_content;
|
||||
+ for ( i = 0; i < num_gen_pmc; i++ )
|
||||
+ {
|
||||
+ if ( val & 0x1 )
|
||||
+ {
|
||||
+ u64 cnt;
|
||||
+ rdmsrl(MSR_P6_PERFCTR0 + i, cnt);
|
||||
+ if ( cnt == 0 )
|
||||
+ wrmsrl(MSR_P6_PERFCTR0 + i, 1);
|
||||
+ }
|
||||
+ val >>= 1;
|
||||
+ }
|
||||
+ val = msr_content >> 32;
|
||||
+ for ( i = 0; i < num_fix_pmc; i++ )
|
||||
+ {
|
||||
+ if ( val & 0x1 )
|
||||
+ {
|
||||
+ u64 cnt;
|
||||
+ rdmsrl(MSR_CORE_PERF_FIXED_CTR0 + i, cnt);
|
||||
+ if ( cnt == 0 )
|
||||
+ wrmsrl(MSR_CORE_PERF_FIXED_CTR0 + i, 1);
|
||||
+ }
|
||||
+ val >>= 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
u32 core2_counters_msr[] = {
|
||||
MSR_CORE_PERF_FIXED_CTR0,
|
||||
MSR_CORE_PERF_FIXED_CTR1,
|
||||
@@ -497,6 +559,10 @@ static int core2_vpmu_do_interrupt(struc
|
||||
rdmsrl(MSR_CORE_PERF_GLOBAL_STATUS, msr_content);
|
||||
if ( !msr_content )
|
||||
return 0;
|
||||
+
|
||||
+ if ( is_pmc_quirk )
|
||||
+ handle_pmc_quirk(msr_content);
|
||||
+
|
||||
core2_vpmu_cxt->global_ovf_status |= msr_content;
|
||||
msr_content = 0xC000000700000000 | ((1 << core2_get_pmc_count()) - 1);
|
||||
wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, msr_content);
|
||||
@@ -518,6 +584,7 @@ static int core2_vpmu_do_interrupt(struc
|
||||
|
||||
static void core2_vpmu_initialise(struct vcpu *v)
|
||||
{
|
||||
+ check_pmc_quirk();
|
||||
}
|
||||
|
||||
static void core2_vpmu_destroy(struct vcpu *v)
|
@ -9,8 +9,10 @@ and is explicitly _not_ seeing the MFN that's known to be owned.
|
||||
|
||||
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/mm/p2m.c
|
||||
+++ b/xen/arch/x86/mm/p2m.c
|
||||
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
|
||||
@@ -2186,9 +2186,6 @@ guest_physmap_add_entry(struct domain *d
|
||||
P2M_DEBUG("aliased! mfn=%#lx, old gfn=%#lx, new gfn=%#lx\n",
|
||||
mfn + i, ogfn, gfn + i);
|
||||
|
@ -1,57 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1291041272 0
|
||||
# Node ID 5cd9612db2bba51f63ff7897aca4c72cc4b8e8c2
|
||||
# Parent aba70e59a90dcb0cacc2c6834a6ce19d03d88601
|
||||
x86-64: don't crash Xen upon direct pv guest access to GDT/LDT mapping area
|
||||
|
||||
handle_gdt_ldt_mapping_fault() is intended to deal with indirect
|
||||
accesses (i.e. those caused by descriptor loads) to the GDT/LDT
|
||||
mapping area only. While for 32-bit segment limits indeed prevent the
|
||||
function being entered for direct accesses (i.e. a #GP fault will be
|
||||
raised even before the address translation gets done, on 64-bit even
|
||||
user mode accesses would lead to control reaching the BUG_ON() at the
|
||||
beginning of that function.
|
||||
|
||||
Fortunately the fix is simple: Since the guest kernel runs in ring 3,
|
||||
any guest direct access will have the "user mode" bit set, whereas
|
||||
descriptor loads always do the translations to access the actual
|
||||
descriptors as kernel mode ones.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Further, relax the BUG_ON() in handle_gdt_ldt_mapping_fault() to a
|
||||
check-and-bail. This avoids any problems in future, if we don't
|
||||
execute x86_64 guest kernels in ring 3 (e.g., because we use a
|
||||
lightweight HVM container).
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/traps.c
|
||||
+++ b/xen/arch/x86/traps.c
|
||||
@@ -1051,8 +1051,14 @@ static int handle_gdt_ldt_mapping_fault(
|
||||
unsigned int is_ldt_area = (offset >> (GDT_LDT_VCPU_VA_SHIFT-1)) & 1;
|
||||
unsigned int vcpu_area = (offset >> GDT_LDT_VCPU_VA_SHIFT);
|
||||
|
||||
- /* Should never fault in another vcpu's area. */
|
||||
- BUG_ON(vcpu_area != curr->vcpu_id);
|
||||
+ /*
|
||||
+ * If the fault is in another vcpu's area, it cannot be due to
|
||||
+ * a GDT/LDT descriptor load. Thus we can reasonably exit immediately, and
|
||||
+ * indeed we have to since map_ldt_shadow_page() works correctly only on
|
||||
+ * accesses to a vcpu's own area.
|
||||
+ */
|
||||
+ if ( vcpu_area != curr->vcpu_id )
|
||||
+ return 0;
|
||||
|
||||
/* Byte offset within the gdt/ldt sub-area. */
|
||||
offset &= (1UL << (GDT_LDT_VCPU_VA_SHIFT-1)) - 1UL;
|
||||
@@ -1223,7 +1229,7 @@ static int fixup_page_fault(unsigned lon
|
||||
|
||||
if ( unlikely(IN_HYPERVISOR_RANGE(addr)) )
|
||||
{
|
||||
- if ( !(regs->error_code & PFEC_reserved_bit) &&
|
||||
+ if ( !(regs->error_code & (PFEC_user_mode | PFEC_reserved_bit)) &&
|
||||
(addr >= GDT_LDT_VIRT_START) && (addr < GDT_LDT_VIRT_END) )
|
||||
return handle_gdt_ldt_mapping_fault(
|
||||
addr - GDT_LDT_VIRT_START, regs);
|
@ -1,43 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1291116848 0
|
||||
# Node ID 8420b82c22c2cad54860ffdbe8bcec21c65c86be
|
||||
# Parent d281061e6ec06bbbf8e2b0fadbeb9d1a04bc32e2
|
||||
x86 hvm: Do not overwrite boot-cpu capability data on VMX/SVM startup.
|
||||
|
||||
Apparently required back in the earliest days of Xen, we now properly
|
||||
initialise CPU capabilities early during bootstrap. Re-writing
|
||||
capability data later now causes problems if specific features have
|
||||
been deliberately masked out.
|
||||
|
||||
Thanks to Weidong Han at Intel for finding such a bug where XSAVE
|
||||
feature is masked out by default, but then erroneously written back
|
||||
during VMX initialisation. This would cause memory corruption problems
|
||||
during boot for XSAVE-capable systems.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ b/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -915,9 +915,6 @@ void start_svm(struct cpuinfo_x86 *c)
|
||||
return;
|
||||
}
|
||||
|
||||
- /* Xen does not fill x86_capability words except 0. */
|
||||
- boot_cpu_data.x86_capability[5] = cpuid_ecx(0x80000001);
|
||||
-
|
||||
if ( !test_bit(X86_FEATURE_SVME, &boot_cpu_data.x86_capability) )
|
||||
return;
|
||||
|
||||
--- a/xen/arch/x86/hvm/vmx/vmx.c
|
||||
+++ b/xen/arch/x86/hvm/vmx/vmx.c
|
||||
@@ -1433,9 +1433,6 @@ void start_vmx(void)
|
||||
return;
|
||||
}
|
||||
|
||||
- /* Xen does not fill x86_capability words except 0. */
|
||||
- boot_cpu_data.x86_capability[4] = cpuid_ecx(1);
|
||||
-
|
||||
if ( !test_bit(X86_FEATURE_VMXE, &boot_cpu_data.x86_capability) )
|
||||
return;
|
||||
|
@ -1,62 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1291234227 0
|
||||
# Node ID 62bf12040b0f4d802dc7e1cd61294776c8a41a89
|
||||
# Parent 8420b82c22c2cad54860ffdbe8bcec21c65c86be
|
||||
x86: fix IRQ migration when using directed EOI (broken with c/s 20465)
|
||||
|
||||
In directed-EOI mode, there is no chance to do the migration in
|
||||
mask_and_ack_level_ioapic_irq(), as the remote IRR bit can't possibly
|
||||
be clear after issuing the EOI to the LAPIC. Consequently, there's no
|
||||
point to even try. Instead, migration must be done in
|
||||
end_level_ioapic_irq(), and it requires masking the interrupt source
|
||||
prior to issuing the EOI to the IO-APIC.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/io_apic.c
|
||||
+++ b/xen/arch/x86/io_apic.c
|
||||
@@ -1642,11 +1642,14 @@ static void mask_and_ack_level_ioapic_ir
|
||||
|
||||
ack_APIC_irq();
|
||||
|
||||
+ if ( directed_eoi_enabled )
|
||||
+ return;
|
||||
+
|
||||
if ((irq_desc[irq].status & IRQ_MOVE_PENDING) &&
|
||||
!io_apic_level_ack_pending(irq))
|
||||
- move_native_irq(irq);
|
||||
+ move_masked_irq(irq);
|
||||
|
||||
- if (!directed_eoi_enabled && !(v & (1 << (i & 0x1f)))) {
|
||||
+ if ( !(v & (1 << (i & 0x1f))) ) {
|
||||
atomic_inc(&irq_mis_count);
|
||||
spin_lock(&ioapic_lock);
|
||||
__edge_IO_APIC_irq(irq);
|
||||
@@ -1662,12 +1665,22 @@ static void end_level_ioapic_irq (unsign
|
||||
|
||||
if ( !ioapic_ack_new )
|
||||
{
|
||||
- if ( irq_desc[irq].status & IRQ_DISABLED )
|
||||
- return;
|
||||
-
|
||||
if ( directed_eoi_enabled )
|
||||
+ {
|
||||
+ if ( !(irq_desc[irq].status & (IRQ_DISABLED|IRQ_MOVE_PENDING)) )
|
||||
+ {
|
||||
+ eoi_IO_APIC_irq(irq);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ mask_IO_APIC_irq(irq);
|
||||
eoi_IO_APIC_irq(irq);
|
||||
- else
|
||||
+ if ( (irq_desc[irq].status & IRQ_MOVE_PENDING) &&
|
||||
+ !io_apic_level_ack_pending(irq) )
|
||||
+ move_masked_irq(irq);
|
||||
+ }
|
||||
+
|
||||
+ if ( !(irq_desc[irq].status & IRQ_DISABLED) )
|
||||
unmask_IO_APIC_irq(irq);
|
||||
|
||||
return;
|
@ -1,36 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1291746724 0
|
||||
# Node ID bfd13358b8bf3a6ca49702d773435a67f1ea5551
|
||||
# Parent d4b35162b3a11f7d9c28501192b7e231609e561d
|
||||
x86: remove BUG_ON() from QUIRK_IOAPIC_*_REGSEL handler
|
||||
References: bnc#657692
|
||||
|
||||
Since (non-pvops, 32-bit only up to 2.6.27) Linux would report "BAD"
|
||||
unconditionally on all SiS chipset versions (it only looks for a PCI
|
||||
device at 0000:00:00.0 with SiS as the vendor), we must not crash if
|
||||
the report on a 64-bit hypervisor doesn't match the #define (which is
|
||||
zero).
|
||||
|
||||
While we could honor the quirk indication even on 64-bit, it doesn't
|
||||
seem worthwhile, as there's no evidence that newer SiS chipsets
|
||||
(supporting 64-bit CPUs) are actually affected.
|
||||
|
||||
This should also address bug 1687 (mis-reported, however, afaict).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/platform_hypercall.c
|
||||
+++ b/xen/arch/x86/platform_hypercall.c
|
||||
@@ -192,7 +192,10 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
|
||||
dprintk(XENLOG_INFO, "Domain 0 says that IO-APIC REGSEL is %s\n",
|
||||
sis_apic_bug ? "bad" : "good");
|
||||
#else
|
||||
- BUG_ON(sis_apic_bug != (quirk_id == QUIRK_IOAPIC_BAD_REGSEL));
|
||||
+ if ( sis_apic_bug != (quirk_id == QUIRK_IOAPIC_BAD_REGSEL) )
|
||||
+ dprintk(XENLOG_WARNING,
|
||||
+ "Domain 0 thinks that IO-APIC REGSEL is %s\n",
|
||||
+ sis_apic_bug ? "good" : "bad");
|
||||
#endif
|
||||
break;
|
||||
default:
|
@ -1,28 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1291883699 0
|
||||
# Node ID 0c97247c64d61511acff37d1903cb304b387f397
|
||||
# Parent 84a72f957fe9e1a5af3dfb8f53334faa555e22f8
|
||||
x86:vlapic: Fix possible guest tick losing after save/restore
|
||||
|
||||
Guest vcpu may totally lose all ticks if the vlapic->pt.irq was not
|
||||
restored during save/restore process. Fix it.
|
||||
|
||||
Signed-off-by: Wei Gang <gang.wei@intel.com>
|
||||
|
||||
--- a/xen/arch/x86/hvm/vlapic.c
|
||||
+++ b/xen/arch/x86/hvm/vlapic.c
|
||||
@@ -863,12 +863,12 @@ static void lapic_rearm(struct vlapic *s
|
||||
unsigned long tmict = vlapic_get_reg(s, APIC_TMICT);
|
||||
uint64_t period;
|
||||
|
||||
+ s->pt.irq = vlapic_get_reg(s, APIC_LVTT) & APIC_VECTOR_MASK;
|
||||
if ( (tmict = vlapic_get_reg(s, APIC_TMICT)) == 0 )
|
||||
return;
|
||||
|
||||
period = ((uint64_t)APIC_BUS_CYCLE_NS *
|
||||
(uint32_t)tmict * s->hw.timer_divisor);
|
||||
- s->pt.irq = vlapic_get_reg(s, APIC_LVTT) & APIC_VECTOR_MASK;
|
||||
create_periodic_time(vlapic_vcpu(s), &s->pt, period,
|
||||
vlapic_lvtt_period(s) ? period : 0,
|
||||
s->pt.irq, vlapic_pt_cb,
|
@ -8,9 +8,11 @@ References: bnc#656369, bnc#658704
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- 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 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
/*
|
||||
* The following vectors are part of the Linux architecture, there
|
||||
* is no hardware IRQ pin equivalent for them, they are triggered
|
||||
@@ -944,30 +944,24 @@ no_apic:
|
||||
@@ -945,30 +945,24 @@ no_apic:
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -68,7 +70,7 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
{
|
||||
/*
|
||||
* Interrupt remapping should be also enabled by BIOS when
|
||||
@@ -977,39 +971,33 @@ static void enable_bsp_x2apic(void)
|
||||
@@ -978,39 +972,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 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
{
|
||||
printk("Allocate ioapic_entries failed\n");
|
||||
goto out;
|
||||
@@ -1031,13 +1019,13 @@ static void enable_bsp_x2apic(void)
|
||||
@@ -1032,13 +1020,13 @@ static void enable_bsp_x2apic(void)
|
||||
goto restore_out;
|
||||
}
|
||||
|
||||
@ -142,7 +144,7 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
}
|
||||
|
||||
restore_out:
|
||||
@@ -1049,24 +1037,6 @@ out:
|
||||
@@ -1050,24 +1038,6 @@ out:
|
||||
free_ioapic_entries(ioapic_entries);
|
||||
}
|
||||
|
||||
@ -167,8 +169,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
void __init init_apic_mappings(void)
|
||||
{
|
||||
unsigned long apic_phys;
|
||||
--- a/xen/arch/x86/cpu/common.c
|
||||
+++ b/xen/arch/x86/cpu/common.c
|
||||
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
|
||||
@@ -250,8 +250,8 @@ static void __init early_cpu_detect(void
|
||||
|
||||
c->x86 = 4;
|
||||
@ -194,8 +198,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
}
|
||||
}
|
||||
|
||||
--- 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 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
{
|
||||
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 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
+{
|
||||
+ 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 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
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
|
||||
@@ -325,8 +325,7 @@ void __devinit smp_callin(void)
|
||||
*/
|
||||
wait_for_init_deassert(&init_deasserted);
|
||||
@ -374,8 +384,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
/*
|
||||
* (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 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
/* 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 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
@ -7,8 +7,10 @@ hvm vlapic: Fix tmcct read logic when in periodic mode.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/hvm/vlapic.c
|
||||
+++ b/xen/arch/x86/hvm/vlapic.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/hvm/vlapic.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/hvm/vlapic.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/hvm/vlapic.c
|
||||
@@ -428,12 +428,19 @@ int vlapic_ipi(
|
||||
static uint32_t vlapic_get_tmcct(struct vlapic *vlapic)
|
||||
{
|
||||
|
@ -19,6 +19,17 @@ sitting beyond the end of RAM.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/domain_build.c
|
||||
+++ b/xen/arch/x86/domain_build.c
|
||||
@@ -194,7 +194,7 @@ static unsigned long __init compute_dom0
|
||||
unsigned int s;
|
||||
|
||||
for ( s = 9; s < BITS_PER_LONG; s += 9 )
|
||||
- avail -= max_page >> s;
|
||||
+ avail -= max_pdx >> s;
|
||||
}
|
||||
|
||||
/*
|
||||
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
|
||||
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
|
||||
@@ -239,8 +239,16 @@ static void amd_iommu_dom0_init(struct d
|
||||
|
@ -1,40 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1292320450 0
|
||||
# Node ID 618ba64260faf45e6ec391582099d7388f013e81
|
||||
# Parent 72326371ae8106b91da0ca6b0436dd2b6478b7a7
|
||||
x86/iommu: account for necessary allocations when calculating Dom0's initial allocation size
|
||||
References: bnc#658163
|
||||
|
||||
As of c/s 21812:e382656e4dcc, IOMMU related allocations for Dom0
|
||||
happen only after it got all of its memory allocated, and hence the
|
||||
reserve (mainly for setting up its swiotlb) may get exhausted without
|
||||
accounting for the necessary allocations up front.
|
||||
|
||||
While not precise, the estimate has been found to be within a couple
|
||||
of pages for the systems it got tested on.
|
||||
|
||||
For the calculation to be reasonably correct, this depends on the
|
||||
patch titled "x86/iommu: don't map RAM holes above 4G" sent out
|
||||
yesterday.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/domain_build.c
|
||||
+++ b/xen/arch/x86/domain_build.c
|
||||
@@ -188,6 +188,15 @@ static unsigned long __init compute_dom0
|
||||
if ( is_pv_32on64_domain(d) )
|
||||
avail -= opt_dom0_max_vcpus - 1;
|
||||
|
||||
+ /* Reserve memory for iommu_dom0_init() (rough estimate). */
|
||||
+ if ( iommu_enabled )
|
||||
+ {
|
||||
+ unsigned int s;
|
||||
+
|
||||
+ for ( s = 9; s < BITS_PER_LONG; s += 9 )
|
||||
+ avail -= max_pdx >> s;
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* If domain 0 allocation isn't specified, reserve 1/16th of available
|
||||
* memory for things like DMA buffers. This reservation is clamped to
|
@ -1,123 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1292410025 0
|
||||
# Node ID 7a5ee380041707177ca9c78e800095d1f5f3d373
|
||||
# Parent 01f3b350902385627d1fa9e8cd1c231953e7610c
|
||||
ept: Remove lock in ept_get_entry, replace with access-once semantics.
|
||||
|
||||
This mirrors the RVI/shadow situation, where p2m read access is
|
||||
lockless because it's done in the hardware (linear map of the p2m
|
||||
table).
|
||||
|
||||
This fixes the original bug (call it bug A) without introducing bug B
|
||||
(a deadlock).
|
||||
|
||||
Bug A was caused by a race when updating p2m entries: between testing
|
||||
if it's valid, and testing if it's populate-on-demand, it may have
|
||||
been changed from populate-on-demand to valid.
|
||||
|
||||
My original patch simply introduced a lock into ept_get_entry, but
|
||||
that caused bug B, caused by circular locking order: p2m_change_type
|
||||
[grabs p2m lock] -> set_p2m_entry -> ept_set_entry ->
|
||||
ept_set_middle_level -> p2m_alloc [grabs hap lock] write cr4 ->
|
||||
hap_update_paging_modes [grabes hap lock] -> hap_update_cr3 ->
|
||||
gfn_to_mfn -> ept_get_entry -> [grabs p2m lock]
|
||||
|
||||
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
+++ b/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
@@ -137,7 +137,7 @@ static int ept_next_level(struct domain
|
||||
ept_entry_t **table, unsigned long *gfn_remainder,
|
||||
u32 shift)
|
||||
{
|
||||
- ept_entry_t *ept_entry;
|
||||
+ ept_entry_t *ept_entry, e;
|
||||
ept_entry_t *next;
|
||||
u32 index;
|
||||
|
||||
@@ -145,9 +145,11 @@ static int ept_next_level(struct domain
|
||||
|
||||
ept_entry = (*table) + index;
|
||||
|
||||
- if ( !is_epte_present(ept_entry) )
|
||||
+ e=*ept_entry;
|
||||
+
|
||||
+ if ( !is_epte_present(&e) )
|
||||
{
|
||||
- if ( ept_entry->avail1 == p2m_populate_on_demand )
|
||||
+ if ( e.avail1 == p2m_populate_on_demand )
|
||||
return GUEST_TABLE_POD_PAGE;
|
||||
|
||||
if ( read_only )
|
||||
@@ -155,15 +157,17 @@ static int ept_next_level(struct domain
|
||||
|
||||
if ( !ept_set_middle_entry(d, ept_entry) )
|
||||
return GUEST_TABLE_MAP_FAILED;
|
||||
+ else
|
||||
+ e=*ept_entry;
|
||||
}
|
||||
|
||||
/* The only time sp would be set here is if we had hit a superpage */
|
||||
- if ( is_epte_superpage(ept_entry) )
|
||||
+ if ( is_epte_superpage(&e) )
|
||||
return GUEST_TABLE_SUPER_PAGE;
|
||||
else
|
||||
{
|
||||
*gfn_remainder &= (1UL << shift) - 1;
|
||||
- next = map_domain_page(ept_entry->mfn);
|
||||
+ next = map_domain_page(e.mfn);
|
||||
unmap_domain_page(*table);
|
||||
*table = next;
|
||||
return GUEST_TABLE_NORMAL_PAGE;
|
||||
@@ -235,35 +239,39 @@ ept_set_entry(struct domain *d, unsigned
|
||||
if ( mfn_valid(mfn_x(mfn)) || direct_mmio || p2m_is_paged(p2mt) ||
|
||||
(p2mt == p2m_ram_paging_in_start) )
|
||||
{
|
||||
- ept_entry->emt = epte_get_entry_emt(d, gfn, mfn, &ipat,
|
||||
+ ept_entry_t new_entry;
|
||||
+
|
||||
+ new_entry.emt = epte_get_entry_emt(d, gfn, mfn, &ipat,
|
||||
direct_mmio);
|
||||
- ept_entry->ipat = ipat;
|
||||
- ept_entry->sp = order ? 1 : 0;
|
||||
+ new_entry.ipat = ipat;
|
||||
+ new_entry.sp = order ? 1 : 0;
|
||||
|
||||
if ( ret == GUEST_TABLE_SUPER_PAGE )
|
||||
{
|
||||
- if ( ept_entry->mfn == (mfn_x(mfn) - offset) )
|
||||
+ if ( new_entry.mfn == (mfn_x(mfn) - offset) )
|
||||
need_modify_vtd_table = 0;
|
||||
else
|
||||
- ept_entry->mfn = mfn_x(mfn) - offset;
|
||||
+ new_entry.mfn = mfn_x(mfn) - offset;
|
||||
|
||||
- if ( (ept_entry->avail1 == p2m_ram_logdirty)
|
||||
+ if ( (new_entry.avail1 == p2m_ram_logdirty)
|
||||
&& (p2mt == p2m_ram_rw) )
|
||||
for ( i = 0; i < 512; i++ )
|
||||
paging_mark_dirty(d, mfn_x(mfn) - offset + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
- if ( ept_entry->mfn == mfn_x(mfn) )
|
||||
+ if ( new_entry.mfn == mfn_x(mfn) )
|
||||
need_modify_vtd_table = 0;
|
||||
else
|
||||
- ept_entry->mfn = mfn_x(mfn);
|
||||
+ new_entry.mfn = mfn_x(mfn);
|
||||
}
|
||||
|
||||
- ept_entry->avail1 = p2mt;
|
||||
- ept_entry->avail2 = 0;
|
||||
+ new_entry.avail1 = p2mt;
|
||||
+ new_entry.avail2 = 0;
|
||||
+
|
||||
+ ept_p2m_type_to_flags(&new_entry, p2mt);
|
||||
|
||||
- ept_p2m_type_to_flags(ept_entry, p2mt);
|
||||
+ ept_entry->epte = new_entry.epte;
|
||||
}
|
||||
else
|
||||
ept_entry->epte = 0;
|
49
22526-ept-get-entry-no-lock.patch
Normal file
49
22526-ept-get-entry-no-lock.patch
Normal file
@ -0,0 +1,49 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1292410025 0
|
||||
# Node ID 7a5ee380041707177ca9c78e800095d1f5f3d373
|
||||
# Parent 01f3b350902385627d1fa9e8cd1c231953e7610c
|
||||
ept: Remove lock in ept_get_entry, replace with access-once semantics.
|
||||
|
||||
This mirrors the RVI/shadow situation, where p2m read access is
|
||||
lockless because it's done in the hardware (linear map of the p2m
|
||||
table).
|
||||
|
||||
This fixes the original bug (call it bug A) without introducing bug B
|
||||
(a deadlock).
|
||||
|
||||
Bug A was caused by a race when updating p2m entries: between testing
|
||||
if it's valid, and testing if it's populate-on-demand, it may have
|
||||
been changed from populate-on-demand to valid.
|
||||
|
||||
My original patch simply introduced a lock into ept_get_entry, but
|
||||
that caused bug B, caused by circular locking order: p2m_change_type
|
||||
[grabs p2m lock] -> set_p2m_entry -> ept_set_entry ->
|
||||
ept_set_middle_level -> p2m_alloc [grabs hap lock] write cr4 ->
|
||||
hap_update_paging_modes [grabes hap lock] -> hap_update_cr3 ->
|
||||
gfn_to_mfn -> ept_get_entry -> [grabs p2m lock]
|
||||
|
||||
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
+++ b/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
@@ -395,10 +395,6 @@ static mfn_t ept_get_entry(struct domain
|
||||
int i;
|
||||
int ret = 0;
|
||||
mfn_t mfn = _mfn(INVALID_MFN);
|
||||
- int do_locking = !p2m_locked_by_me(d->arch.p2m);
|
||||
-
|
||||
- if ( do_locking )
|
||||
- p2m_lock(d->arch.p2m);
|
||||
|
||||
*t = p2m_mmio_dm;
|
||||
|
||||
@@ -476,8 +472,6 @@ static mfn_t ept_get_entry(struct domain
|
||||
}
|
||||
|
||||
out:
|
||||
- if ( do_locking )
|
||||
- p2m_unlock(d->arch.p2m);
|
||||
unmap_domain_page(table);
|
||||
return mfn;
|
||||
}
|
@ -21,8 +21,10 @@ systems, but at least allows some build time control).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ b/xen/arch/x86/acpi/cpu_idle.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -742,7 +742,7 @@ static void set_cx(
|
||||
int get_cpu_id(u8 acpi_id)
|
||||
{
|
||||
@ -32,9 +34,11 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
apic_id = x86_acpiid_to_apicid[acpi_id];
|
||||
if ( apic_id == 0xff )
|
||||
--- a/xen/arch/x86/mpparse.c
|
||||
+++ b/xen/arch/x86/mpparse.c
|
||||
@@ -99,7 +99,8 @@ static int mpc_record;
|
||||
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
|
||||
@@ -99,7 +99,8 @@ static int mpc_record;
|
||||
static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __initdata;
|
||||
|
||||
/* Return xen's logical cpu_id of the new added cpu or <0 if error */
|
||||
@ -105,8 +109,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
}
|
||||
|
||||
void mp_unregister_lapic(uint32_t apic_id, uint32_t cpu)
|
||||
--- 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
|
||||
@@ -124,7 +124,6 @@ struct sedf_cpu_info {
|
||||
|
||||
#define PERIOD_BEGIN(inf) ((inf)->deadl_abs - (inf)->period)
|
||||
@ -115,8 +121,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#define DIV_UP(x,y) (((x) + (y) - 1) / y)
|
||||
|
||||
#define extra_runs(inf) ((inf->status) & 6)
|
||||
--- a/xen/include/asm-x86/mach-generic/mach_apic.h
|
||||
+++ b/xen/include/asm-x86/mach-generic/mach_apic.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/mach-generic/mach_apic.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/mach-generic/mach_apic.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/mach-generic/mach_apic.h
|
||||
@@ -26,15 +26,15 @@ static inline void enable_apic_mode(void
|
||||
|
||||
extern u32 bios_cpu_apicid[];
|
||||
@ -136,8 +144,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
}
|
||||
|
||||
static inline void setup_portio_remap(void)
|
||||
--- a/xen/include/asm-x86/mpspec_def.h
|
||||
+++ b/xen/include/asm-x86/mpspec_def.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/mpspec_def.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/mpspec_def.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/mpspec_def.h
|
||||
@@ -14,7 +14,7 @@
|
||||
#define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_')
|
||||
|
||||
@ -147,8 +157,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
struct intel_mp_floating
|
||||
{
|
||||
--- a/xen/include/xen/kernel.h
|
||||
+++ b/xen/include/xen/kernel.h
|
||||
Index: xen-4.0.2-testing/xen/include/xen/kernel.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/xen/kernel.h
|
||||
+++ xen-4.0.2-testing/xen/include/xen/kernel.h
|
||||
@@ -33,6 +33,13 @@
|
||||
#define max_t(type,x,y) \
|
||||
({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
|
||||
|
@ -24,8 +24,10 @@ appear to be to make the macros depend on __XEN_INTERFACE_VERSION__.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/acpi/boot.c
|
||||
+++ b/xen/arch/x86/acpi/boot.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/acpi/boot.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/acpi/boot.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/acpi/boot.c
|
||||
@@ -82,7 +82,7 @@ u8 acpi_enable_value, acpi_disable_value
|
||||
#endif
|
||||
|
||||
@ -59,8 +61,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
- return 0xff;
|
||||
+ return INVALID_ACPIID;
|
||||
}
|
||||
--- a/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ b/xen/arch/x86/acpi/cpu_idle.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -745,7 +745,7 @@ int get_cpu_id(u8 acpi_id)
|
||||
u32 apic_id;
|
||||
|
||||
@ -70,8 +74,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
return -1;
|
||||
|
||||
for ( i = 0; i < NR_CPUS; i++ )
|
||||
--- 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
|
||||
@@ -96,7 +96,7 @@ struct cpuinfo_x86 cpu_data[NR_CPUS];
|
||||
EXPORT_SYMBOL(cpu_data);
|
||||
|
||||
@ -99,8 +105,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
mp_unregister_lapic(apic_id, cpu);
|
||||
spin_unlock(&cpu_add_remove_lock);
|
||||
return node;
|
||||
--- a/xen/include/asm-x86/acpi.h
|
||||
+++ b/xen/include/asm-x86/acpi.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/acpi.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/acpi.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/acpi.h
|
||||
@@ -150,9 +150,11 @@ struct acpi_sleep_info {
|
||||
|
||||
#endif /* CONFIG_ACPI_SLEEP */
|
||||
@ -115,8 +123,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
extern u32 pmtmr_ioport;
|
||||
|
||||
--- a/xen/include/asm-x86/numa.h
|
||||
+++ b/xen/include/asm-x86/numa.h
|
||||
Index: xen-4.0.2-testing/xen/include/asm-x86/numa.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/asm-x86/numa.h
|
||||
+++ xen-4.0.2-testing/xen/include/asm-x86/numa.h
|
||||
@@ -39,7 +39,7 @@ extern int setup_node(int pxm);
|
||||
extern void srat_detect_node(int cpu);
|
||||
|
||||
@ -126,8 +136,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#ifdef CONFIG_NUMA
|
||||
extern void __init init_cpu_to_node(void);
|
||||
|
||||
--- a/xen/include/public/vcpu.h
|
||||
+++ b/xen/include/public/vcpu.h
|
||||
Index: xen-4.0.2-testing/xen/include/public/vcpu.h
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/include/public/vcpu.h
|
||||
+++ xen-4.0.2-testing/xen/include/public/vcpu.h
|
||||
@@ -187,8 +187,7 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_register_vc
|
||||
/*
|
||||
* Get the physical ID information for a pinned vcpu's underlying physical
|
||||
|
@ -15,9 +15,11 @@ intremap_enabled() with its only caller gone.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/apic.c
|
||||
+++ b/xen/arch/x86/apic.c
|
||||
@@ -963,15 +963,6 @@ void x2apic_setup(void)
|
||||
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)
|
||||
rdmsr(MSR_IA32_APICBASE, lo, hi);
|
||||
if ( lo & MSR_IA32_APICBASE_EXTD )
|
||||
{
|
||||
@ -33,7 +35,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
printk("x2APIC mode is already enabled by BIOS.\n");
|
||||
x2apic_enabled = 1;
|
||||
}
|
||||
@@ -1014,6 +1005,10 @@ void x2apic_setup(void)
|
||||
@@ -1015,6 +1006,10 @@ void x2apic_setup(void)
|
||||
|
||||
if ( iommu_enable_IR() )
|
||||
{
|
||||
@ -44,9 +46,11 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
printk("Would not enable x2APIC due to interrupt remapping "
|
||||
"cannot be enabled.\n");
|
||||
goto restore_out;
|
||||
--- a/xen/drivers/passthrough/vtd/intremap.c
|
||||
+++ b/xen/drivers/passthrough/vtd/intremap.c
|
||||
@@ -884,23 +884,3 @@ void iommu_disable_IR(void)
|
||||
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)
|
||||
for_each_drhd_unit ( drhd )
|
||||
disable_qinval(drhd->iommu);
|
||||
}
|
||||
@ -70,8 +74,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
--- a/xen/include/xen/iommu.h
|
||||
+++ b/xen/include/xen/iommu.h
|
||||
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
|
||||
@@ -62,7 +62,6 @@ int iommu_setup(void);
|
||||
int iommu_supports_eim(void);
|
||||
int iommu_enable_IR(void);
|
||||
|
@ -1,101 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1292414674 0
|
||||
# Node ID a3a29e67aa7e75a094e1b4237b10a68cf829b542
|
||||
# Parent 16673224c1cc2ca3bb9730f1d7c84fe4d96e5323
|
||||
Reduce side effects of handling '*' debug key
|
||||
References: bnc#659284
|
||||
|
||||
NMI watchdog should be suppressed when dumping IRQ handlers. Softirqs
|
||||
should be handled periodically while processing non-IRQ handlers.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1293185578 0
|
||||
# Node ID dca1b7cf2e2c27cd160bd1d1d284e3f810d4936c
|
||||
# Parent e8acb9753ff1a5cd3d6a45eda5f4c6f0059c281a
|
||||
re-add calls accidentally deleted from run_all_nonirq_keyhandlers()
|
||||
|
||||
c/s 22538:a3a29e67aa7e, having got applied in a form different from
|
||||
the one submitted, resulted in the calls to
|
||||
console_{start,end}_log_everything() getting removed without
|
||||
replacement. Add them back since, other than run_all_keyhandlers(),
|
||||
this doesn't run with log-everything already in effect.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/common/keyhandler.c
|
||||
+++ b/xen/common/keyhandler.c
|
||||
@@ -407,14 +407,17 @@ static void run_all_nonirq_keyhandlers(u
|
||||
int k;
|
||||
|
||||
console_start_log_everything();
|
||||
+
|
||||
for ( k = 0; k < ARRAY_SIZE(key_table); k++ )
|
||||
{
|
||||
+ process_pending_softirqs_nested();
|
||||
h = key_table[k];
|
||||
if ( (h == NULL) || !h->diagnostic || h->irq_callback )
|
||||
continue;
|
||||
printk("[%c: %s]\n", k, h->desc);
|
||||
(*h->u.fn)(k);
|
||||
}
|
||||
+
|
||||
console_end_log_everything();
|
||||
}
|
||||
|
||||
@@ -426,10 +429,11 @@ static void run_all_keyhandlers(unsigned
|
||||
struct keyhandler *h;
|
||||
int k;
|
||||
|
||||
+ watchdog_disable();
|
||||
+
|
||||
printk("'%c' pressed -> firing all diagnostic keyhandlers\n", key);
|
||||
|
||||
/* Fire all the IRQ-context diangostic keyhandlers now */
|
||||
- console_start_log_everything();
|
||||
for ( k = 0; k < ARRAY_SIZE(key_table); k++ )
|
||||
{
|
||||
h = key_table[k];
|
||||
@@ -438,7 +442,8 @@ static void run_all_keyhandlers(unsigned
|
||||
printk("[%c: %s]\n", k, h->desc);
|
||||
(*h->u.irq_fn)(k, regs);
|
||||
}
|
||||
- console_end_log_everything();
|
||||
+
|
||||
+ watchdog_enable();
|
||||
|
||||
/* Trigger the others from a tasklet in non-IRQ context */
|
||||
tasklet_schedule(&run_all_keyhandlers_tasklet);
|
||||
--- a/xen/common/softirq.c
|
||||
+++ b/xen/common/softirq.c
|
||||
@@ -54,6 +54,16 @@ void process_pending_softirqs(void)
|
||||
__do_softirq(1ul<<SCHEDULE_SOFTIRQ);
|
||||
}
|
||||
|
||||
+void process_pending_softirqs_nested(void)
|
||||
+{
|
||||
+ ASSERT(!in_irq() && local_irq_is_enabled());
|
||||
+ /*
|
||||
+ * Do not enter scheduler as it can preempt the calling context,
|
||||
+ * and do not run tasklets as we're running one currently.
|
||||
+ */
|
||||
+ __do_softirq((1ul<<SCHEDULE_SOFTIRQ) | (1ul<<TASKLET_SOFTIRQ));
|
||||
+}
|
||||
+
|
||||
asmlinkage void do_softirq(void)
|
||||
{
|
||||
__do_softirq(0);
|
||||
--- a/xen/include/xen/softirq.h
|
||||
+++ b/xen/include/xen/softirq.h
|
||||
@@ -39,6 +39,8 @@ void raise_softirq(unsigned int nr);
|
||||
* Use this instead of do_softirq() when you do not want to be preempted.
|
||||
*/
|
||||
void process_pending_softirqs(void);
|
||||
+/* ... and use this instead when running inside a tasklet. */
|
||||
+void process_pending_softirqs_nested(void);
|
||||
|
||||
/*
|
||||
* TASKLETS -- dynamically-allocatable tasks run in softirq context
|
@ -1,21 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1292415031 0
|
||||
# Node ID d8279118b4bbb3bb3689b9c20abb25d0c09e2b69
|
||||
# Parent 20c65aa19075b1a696adb56325827412596ac0d4
|
||||
x86/32on64: zero-extend hypercall index before use in memory access (debug mode only)
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/x86_64/compat/entry.S
|
||||
+++ b/xen/arch/x86/x86_64/compat/entry.S
|
||||
@@ -36,7 +36,8 @@ ENTRY(compat_hypercall)
|
||||
pushq UREGS_rbx(%rsp); pushq %rcx; pushq %rdx; pushq %rsi; pushq %rdi
|
||||
pushq UREGS_rbp+5*8(%rsp)
|
||||
leaq compat_hypercall_args_table(%rip),%r10
|
||||
- movq $6,%rcx
|
||||
+ movl %eax,%eax
|
||||
+ movl $6,%ecx
|
||||
subb (%r10,%rax,1),%cl
|
||||
movq %rsp,%rdi
|
||||
movl $0xDEADBEEF,%eax
|
@ -1,28 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1292513937 0
|
||||
# Node ID aa18b8ddaf05084aef3f8cff11d92248a8b6fac8
|
||||
# Parent f46f46bbb69a788037f866025c88743d55dde416
|
||||
vtd: Require unmap_vtd_domain_page() on a couple of early exit paths.
|
||||
|
||||
From: Jan Beulich <JBeulich@novell.com>
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ b/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -1330,6 +1330,7 @@ int domain_context_mapping_one(
|
||||
if ( context_set_domain_id(context, domain, iommu) )
|
||||
{
|
||||
spin_unlock(&iommu->lock);
|
||||
+ unmap_vtd_domain_page(context_entries);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
@@ -1671,6 +1672,7 @@ static int intel_iommu_map_page(
|
||||
if ( old.val == new.val )
|
||||
{
|
||||
spin_unlock(&hd->mapping_lock);
|
||||
+ unmap_vtd_domain_page(page);
|
||||
return 0;
|
||||
}
|
||||
*pte = new;
|
@ -1,29 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1292954974 0
|
||||
# Node ID b5418c045d029e8bf5eadfd4e1ef0b1822da7186
|
||||
# Parent ff1b80ccecd9ed049cc694ab117100e83eab179f
|
||||
x86 hvm ept: Remove EPT guest linear address validation
|
||||
|
||||
For EPT violation resulting from an attempt to load the guest PDPTEs
|
||||
as part of the execution of the MOV CR instruction, the EPT_GLA_VALID
|
||||
is not valid. This situation should not happen in most situation,
|
||||
since we always populate guest memory. But this is not ture for PAE
|
||||
guest under the PoD/Page sharing situation. In that situation, a page
|
||||
pointed by CR3 may be un-populated, and we need handle it in such
|
||||
situation.
|
||||
|
||||
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
|
||||
|
||||
--- a/xen/arch/x86/hvm/vmx/vmx.c
|
||||
+++ b/xen/arch/x86/hvm/vmx/vmx.c
|
||||
@@ -2129,8 +2129,7 @@ static void ept_handle_violation(unsigne
|
||||
__trace_var(TRC_HVM_NPF, 0, sizeof(_d), (unsigned char *)&_d);
|
||||
}
|
||||
|
||||
- if ( (qualification & EPT_GLA_VALID) &&
|
||||
- hvm_hap_nested_page_fault(gfn) )
|
||||
+ if ( hvm_hap_nested_page_fault(gfn) )
|
||||
return;
|
||||
|
||||
/* Everything else is an error. */
|
@ -1,121 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1293185641 0
|
||||
# Node ID 7cc87dcf30a13bcf600077aa661694caeb0c290c
|
||||
# Parent dca1b7cf2e2c27cd160bd1d1d284e3f810d4936c
|
||||
VT-d: fix and improve print_vtd_entries()
|
||||
|
||||
Fix leaking of mapped domain pages (root_entry and ctxt_entry when
|
||||
falling out of the level traversing loop). Do this by re-arranging
|
||||
things slightly so that a mapping is retained only as long as it
|
||||
really is needed.
|
||||
|
||||
Fix the failure to use map_domain_page() in the level traversing loop
|
||||
of the function.
|
||||
|
||||
Add a mssing return statement in one of the error paths.
|
||||
|
||||
Also I wonder whether not being able to call print_vtd_entries() from
|
||||
iommu_page_fault_do_one() in ix86 is still correct, now that
|
||||
map_domain_page() is IRQ safe.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/vtd/utils.c
|
||||
+++ b/xen/drivers/passthrough/vtd/utils.c
|
||||
@@ -99,7 +99,7 @@ void print_vtd_entries(struct iommu *iom
|
||||
struct context_entry *ctxt_entry;
|
||||
struct root_entry *root_entry;
|
||||
struct dma_pte pte;
|
||||
- u64 *l;
|
||||
+ u64 *l, val;
|
||||
u32 l_index, level;
|
||||
|
||||
printk("print_vtd_entries: iommu = %p bdf = %x:%x.%x gmfn = %"PRIx64"\n",
|
||||
@@ -112,6 +112,11 @@ void print_vtd_entries(struct iommu *iom
|
||||
}
|
||||
|
||||
root_entry = (struct root_entry *)map_vtd_domain_page(iommu->root_maddr);
|
||||
+ if ( root_entry == NULL )
|
||||
+ {
|
||||
+ printk(" root_entry == NULL\n");
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
printk(" root_entry = %p\n", root_entry);
|
||||
printk(" root_entry[%x] = %"PRIx64"\n", bus, root_entry[bus].val);
|
||||
@@ -122,61 +127,57 @@ void print_vtd_entries(struct iommu *iom
|
||||
return;
|
||||
}
|
||||
|
||||
- ctxt_entry =
|
||||
- (struct context_entry *)map_vtd_domain_page(root_entry[bus].val);
|
||||
+ val = root_entry[bus].val;
|
||||
+ unmap_vtd_domain_page(root_entry);
|
||||
+ ctxt_entry = map_vtd_domain_page(val);
|
||||
if ( ctxt_entry == NULL )
|
||||
{
|
||||
- unmap_vtd_domain_page(root_entry);
|
||||
printk(" ctxt_entry == NULL\n");
|
||||
return;
|
||||
}
|
||||
|
||||
printk(" context = %p\n", ctxt_entry);
|
||||
+ val = ctxt_entry[devfn].lo;
|
||||
printk(" context[%x] = %"PRIx64"_%"PRIx64"\n",
|
||||
- devfn, ctxt_entry[devfn].hi, ctxt_entry[devfn].lo);
|
||||
+ devfn, ctxt_entry[devfn].hi, val);
|
||||
if ( !context_present(ctxt_entry[devfn]) )
|
||||
{
|
||||
unmap_vtd_domain_page(ctxt_entry);
|
||||
- unmap_vtd_domain_page(root_entry);
|
||||
printk(" ctxt_entry[%x] not present\n", devfn);
|
||||
return;
|
||||
}
|
||||
|
||||
level = agaw_to_level(context_address_width(ctxt_entry[devfn]));
|
||||
+ unmap_vtd_domain_page(ctxt_entry);
|
||||
if ( level != VTD_PAGE_TABLE_LEVEL_3 &&
|
||||
level != VTD_PAGE_TABLE_LEVEL_4)
|
||||
{
|
||||
- unmap_vtd_domain_page(ctxt_entry);
|
||||
- unmap_vtd_domain_page(root_entry);
|
||||
printk("Unsupported VTD page table level (%d)!\n", level);
|
||||
+ return;
|
||||
}
|
||||
|
||||
- l = maddr_to_virt(ctxt_entry[devfn].lo);
|
||||
do
|
||||
{
|
||||
- l = (u64*)(((unsigned long)l >> PAGE_SHIFT_4K) << PAGE_SHIFT_4K);
|
||||
+ l = map_vtd_domain_page(val);
|
||||
printk(" l%d = %p\n", level, l);
|
||||
if ( l == NULL )
|
||||
{
|
||||
- unmap_vtd_domain_page(ctxt_entry);
|
||||
- unmap_vtd_domain_page(root_entry);
|
||||
printk(" l%d == NULL\n", level);
|
||||
break;
|
||||
}
|
||||
l_index = get_level_index(gmfn, level);
|
||||
printk(" l%d_index = %x\n", level, l_index);
|
||||
- printk(" l%d[%x] = %"PRIx64"\n", level, l_index, l[l_index]);
|
||||
|
||||
- pte.val = l[l_index];
|
||||
+ pte.val = val = l[l_index];
|
||||
+ unmap_vtd_domain_page(l);
|
||||
+ printk(" l%d[%x] = %"PRIx64"\n", level, l_index, val);
|
||||
+
|
||||
+ pte.val = val;
|
||||
if ( !dma_pte_present(pte) )
|
||||
{
|
||||
- unmap_vtd_domain_page(ctxt_entry);
|
||||
- unmap_vtd_domain_page(root_entry);
|
||||
printk(" l%d[%x] not present\n", level, l_index);
|
||||
break;
|
||||
}
|
||||
-
|
||||
- l = maddr_to_virt(l[l_index]);
|
||||
} while ( --level );
|
||||
}
|
||||
|
@ -11,8 +11,10 @@ command-line config option. Remove it.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/cpu/amd.c
|
||||
+++ b/xen/arch/x86/cpu/amd.c
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/cpu/amd.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/cpu/amd.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/cpu/amd.c
|
||||
@@ -237,20 +237,6 @@ int cpu_has_amd_erratum(const struct cpu
|
||||
return 0;
|
||||
}
|
||||
|
@ -19,9 +19,11 @@ use is ourselves, not only when we enabled it.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/traps.c
|
||||
+++ b/xen/arch/x86/traps.c
|
||||
@@ -1704,6 +1704,10 @@ static int is_cpufreq_controller(struct
|
||||
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
|
||||
(d->domain_id == 0));
|
||||
}
|
||||
|
||||
@ -32,7 +34,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
static int emulate_privileged_op(struct cpu_user_regs *regs)
|
||||
{
|
||||
struct vcpu *v = current;
|
||||
@@ -2263,7 +2267,13 @@ static int emulate_privileged_op(struct
|
||||
@@ -2275,7 +2279,13 @@ static int emulate_privileged_op(struct
|
||||
goto fail;
|
||||
if ( !IS_PRIV(v->domain) )
|
||||
break;
|
||||
@ -47,8 +49,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
(((((u64)h << 32) | l) ^ val) &
|
||||
~( FAM10H_MMIO_CONF_ENABLE |
|
||||
(FAM10H_MMIO_CONF_BUSRANGE_MASK <<
|
||||
--- a/xen/arch/x86/x86_64/mmconfig.h
|
||||
+++ b/xen/arch/x86/x86_64/mmconfig.h
|
||||
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
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#define PCI_VENDOR_ID_NVIDIA 0x10de
|
||||
@ -58,8 +62,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
/*
|
||||
* AMD Fam10h CPUs are buggy, and cannot access MMIO config space
|
||||
* on their northbrige except through the * %eax register. As such, you MUST
|
||||
--- a/xen/arch/x86/x86_64/mmconfig-shared.c
|
||||
+++ b/xen/arch/x86/x86_64/mmconfig-shared.c
|
||||
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
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "mmconfig.h"
|
||||
|
||||
|
@ -22,8 +22,10 @@ we cannot trust.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/drivers/acpi/numa.c
|
||||
+++ b/xen/drivers/acpi/numa.c
|
||||
Index: xen-4.0.2-testing/xen/drivers/acpi/numa.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/drivers/acpi/numa.c
|
||||
+++ xen-4.0.2-testing/xen/drivers/acpi/numa.c
|
||||
@@ -120,14 +120,15 @@ static int __init acpi_parse_slit(struct
|
||||
return 0;
|
||||
}
|
||||
|
@ -17,9 +17,11 @@ Restore the functionality, now calling it from generic_apic_probe().
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/apic.c
|
||||
+++ b/xen/arch/x86/apic.c
|
||||
@@ -947,7 +947,6 @@ no_apic:
|
||||
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:
|
||||
void x2apic_setup(void)
|
||||
{
|
||||
struct IO_APIC_route_entry **ioapic_entries = NULL;
|
||||
@ -27,7 +29,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
if ( smp_processor_id() != 0 )
|
||||
{
|
||||
@@ -959,14 +958,6 @@ void x2apic_setup(void)
|
||||
@@ -960,14 +959,6 @@ void x2apic_setup(void)
|
||||
if ( !cpu_has_x2apic )
|
||||
return;
|
||||
|
||||
@ -42,8 +44,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
if ( !opt_x2apic )
|
||||
{
|
||||
if ( !x2apic_enabled )
|
||||
--- a/xen/arch/x86/genapic/probe.c
|
||||
+++ b/xen/arch/x86/genapic/probe.c
|
||||
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
|
||||
@@ -59,8 +59,10 @@ custom_param("apic", genapic_apic_force)
|
||||
|
||||
void __init generic_apic_probe(void)
|
||||
@ -57,8 +61,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
for (i = 0; !changed && apic_probe[i]; i++) {
|
||||
if (apic_probe[i]->probe()) {
|
||||
--- 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
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <xen/cpumask.h>
|
||||
#include <asm/apicdef.h>
|
||||
@ -89,8 +95,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+ genapic = apic_x2apic_probe();
|
||||
+ }
|
||||
+}
|
||||
--- 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,6 +25,7 @@ extern int apic_verbosity;
|
||||
extern int x2apic_enabled;
|
||||
extern int directed_eoi_enabled;
|
||||
|
@ -12,8 +12,10 @@ xenctx: misc adjustments
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/tools/xentrace/xenctx.c
|
||||
+++ b/tools/xentrace/xenctx.c
|
||||
Index: xen-4.0.2-testing/tools/xentrace/xenctx.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/tools/xentrace/xenctx.c
|
||||
+++ xen-4.0.2-testing/tools/xentrace/xenctx.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
@ -30,7 +32,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
char *name;
|
||||
struct symbol *next;
|
||||
} *symbol_table = NULL;
|
||||
@@ -112,12 +112,12 @@ static void insert_symbol(struct symbol
|
||||
@@ -112,12 +112,12 @@ static void insert_symbol(struct symbol
|
||||
|
||||
/* The System.map is usually already sorted... */
|
||||
if (prev
|
||||
|
47
22744-ept-pod-locking.patch
Normal file
47
22744-ept-pod-locking.patch
Normal file
@ -0,0 +1,47 @@
|
||||
# HG changeset patch
|
||||
# User Tim Deegan <Tim.Deegan@citrix.com>
|
||||
# Date 1294933573 0
|
||||
# Node ID b01ef59c8c805df751a8f6ae63cdd5c6a4565255
|
||||
# Parent 54e91dcae649e23fd267d7afe623fbd52b1b4283
|
||||
x86/mm: fix EPT PoD locking to match the normal p2m case.
|
||||
|
||||
This recursive-locking bug was fixed in the main p2m code in
|
||||
20269:fd3d5d66c446 (in October 2009) but has lurked unseen in
|
||||
the EPT side since then. Copy the fix across.
|
||||
|
||||
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/mm/hap/p2m-ept.c
|
||||
@@ -37,19 +37,26 @@ static int ept_pod_check_and_populate(st
|
||||
ept_entry_t *entry, int order,
|
||||
p2m_query_t q)
|
||||
{
|
||||
+ /* Only take the lock if we don't already have it. Otherwise it
|
||||
+ * wouldn't be safe to do p2m lookups with the p2m lock held */
|
||||
+ int do_locking = !p2m_locked_by_me(d->arch.p2m);
|
||||
int r;
|
||||
- p2m_lock(d->arch.p2m);
|
||||
+
|
||||
+ if ( do_locking )
|
||||
+ p2m_lock(d->arch.p2m);
|
||||
|
||||
/* Check to make sure this is still PoD */
|
||||
if ( entry->avail1 != p2m_populate_on_demand )
|
||||
{
|
||||
- p2m_unlock(d->arch.p2m);
|
||||
+ if ( do_locking )
|
||||
+ p2m_unlock(d->arch.p2m);
|
||||
return 0;
|
||||
}
|
||||
|
||||
r = p2m_pod_demand_populate(d, gfn, order, q);
|
||||
|
||||
- p2m_unlock(d->arch.p2m);
|
||||
+ if ( do_locking )
|
||||
+ p2m_unlock(d->arch.p2m);
|
||||
|
||||
return r;
|
||||
}
|
264
22749-vtd-workarounds.patch
Normal file
264
22749-vtd-workarounds.patch
Normal file
@ -0,0 +1,264 @@
|
||||
References: bnc#633573
|
||||
|
||||
# HG changeset patch
|
||||
# User Allen Kay <allen.m.kay@intel.com>
|
||||
# Date 1294992706 0
|
||||
# Node ID 93e7bf0e1845f1a82441fb740522a9b9cb32beda
|
||||
# Parent 47713825a3f910fc7cf7571947e8b3b4eab23d5f
|
||||
vt-d: quirks for Sandybridge errata workaround, WLAN, VT-d fault escalation
|
||||
|
||||
Adding errata workaround for newly released Sandybridge processor
|
||||
graphics, additional WLAN device ID's for WLAN quirk, a quirk for
|
||||
masking VT-d fault escalation to IOH HW that can cause system hangs on
|
||||
some OEM hardware where the BIOS erroneously escalates VT-d faults to
|
||||
the platform.
|
||||
|
||||
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1295625672 0
|
||||
# Node ID 1637fdbfc21e2c732eca29136943a568f8f341cd
|
||||
# Parent 43592043cefc8357e6e6a0ab9ba85ca480968cb1
|
||||
[VTD][QUIRK] turn off Sandybridge IGD quirk by default
|
||||
|
||||
Turn off Sandybridge IGD quirk by default until potential issues such
|
||||
as MMIO register conflict with OS device driver and proper locking in
|
||||
preamble and postamble functions are addressed.
|
||||
|
||||
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
|
||||
# HG changeset patch
|
||||
# User Allen Kay <allen.m.kay@intel.com>
|
||||
# Date 1296587456 0
|
||||
# Node ID 3edd21ffe407ac0e853d51aa8302d9bdb4068749
|
||||
# Parent 0e2c8b75f7d233f15f8bb49d9db0579e7a350964
|
||||
passthrough/vtd: disable 64-bit MMCFG quirk on 32-bit Xen
|
||||
|
||||
Attached patch disables pci_vtd_quirk for 32-bit Xen since 32-bit xen
|
||||
does not support MMCFG access.
|
||||
|
||||
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/vtd/extern.h
|
||||
+++ b/xen/drivers/passthrough/vtd/extern.h
|
||||
@@ -87,5 +87,6 @@ void __init platform_quirks_init(void);
|
||||
void vtd_ops_preamble_quirk(struct iommu* iommu);
|
||||
void vtd_ops_postamble_quirk(struct iommu* iommu);
|
||||
void me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map);
|
||||
+void pci_vtd_quirk(struct pci_dev *pdev);
|
||||
|
||||
#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
|
||||
list_add(&pdev->domain_list, &d->arch.pdev_list);
|
||||
domain_context_mapping(d, pdev->bus, pdev->devfn);
|
||||
pci_enable_acs(pdev);
|
||||
+ pci_vtd_quirk(pdev);
|
||||
}
|
||||
}
|
||||
spin_unlock(&pcidevs_lock);
|
||||
--- a/xen/drivers/passthrough/vtd/quirks.c
|
||||
+++ b/xen/drivers/passthrough/vtd/quirks.c
|
||||
@@ -47,11 +47,13 @@
|
||||
#define IS_CTG(id) (id == 0x2a408086)
|
||||
#define IS_ILK(id) (id == 0x00408086 || id == 0x00448086 || id== 0x00628086 || id == 0x006A8086)
|
||||
#define IS_CPT(id) (id == 0x01008086 || id == 0x01048086)
|
||||
+#define IS_SNB_GFX(id) (id == 0x01068086 || id == 0x01168086 || id == 0x01268086 || id == 0x01028086 || id == 0x01128086 || id == 0x01228086 || id == 0x010A8086)
|
||||
|
||||
u32 ioh_id;
|
||||
u32 igd_id;
|
||||
bool_t rwbf_quirk;
|
||||
static int is_cantiga_b3;
|
||||
+static int is_snb_gfx;
|
||||
static u8 *igd_reg_va;
|
||||
|
||||
/*
|
||||
@@ -92,6 +94,12 @@ static void cantiga_b3_errata_init(void)
|
||||
is_cantiga_b3 = 1;
|
||||
}
|
||||
|
||||
+/* check for Sandybridge IGD device ID's */
|
||||
+static void snb_errata_init(void)
|
||||
+{
|
||||
+ is_snb_gfx = IS_SNB_GFX(igd_id);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* QUIRK to workaround Cantiga IGD VT-d low power errata.
|
||||
* This errata impacts IGD assignment on Cantiga systems
|
||||
@@ -104,12 +112,15 @@ static void cantiga_b3_errata_init(void)
|
||||
/*
|
||||
* map IGD MMIO+0x2000 page to allow Xen access to IGD 3D register.
|
||||
*/
|
||||
-static void map_igd_reg(void)
|
||||
+static void *map_igd_reg(void)
|
||||
{
|
||||
u64 igd_mmio, igd_reg;
|
||||
|
||||
- if ( !is_cantiga_b3 || igd_reg_va != NULL )
|
||||
- return;
|
||||
+ if ( !is_cantiga_b3 && !is_snb_gfx )
|
||||
+ return NULL;
|
||||
+
|
||||
+ if ( igd_reg_va )
|
||||
+ return igd_reg_va;
|
||||
|
||||
/* get IGD mmio address in PCI BAR */
|
||||
igd_mmio = ((u64)pci_conf_read32(0, IGD_DEV, 0, 0x14) << 32) +
|
||||
@@ -121,6 +132,7 @@ static void map_igd_reg(void)
|
||||
/* ioremap this physical page */
|
||||
set_fixmap_nocache(FIX_IGD_MMIO, igd_reg);
|
||||
igd_reg_va = (u8 *)fix_to_virt(FIX_IGD_MMIO);
|
||||
+ return igd_reg_va;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -134,6 +146,9 @@ static int cantiga_vtd_ops_preamble(stru
|
||||
if ( !is_igd_drhd(drhd) || !is_cantiga_b3 )
|
||||
return 0;
|
||||
|
||||
+ if ( !map_igd_reg() )
|
||||
+ return 0;
|
||||
+
|
||||
/*
|
||||
* read IGD register at IGD MMIO + 0x20A4 to force IGD
|
||||
* to exit low power state. Since map_igd_reg()
|
||||
@@ -144,11 +159,69 @@ static int cantiga_vtd_ops_preamble(stru
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Sandybridge RC6 power management inhibit state erratum.
|
||||
+ * This can cause power high power consumption.
|
||||
+ * Workaround is to prevent graphics get into RC6
|
||||
+ * state when doing VT-d IOTLB operations, do the VT-d
|
||||
+ * IOTLB operation, and then re-enable RC6 state.
|
||||
+ */
|
||||
+static void snb_vtd_ops_preamble(struct iommu* iommu)
|
||||
+{
|
||||
+ struct intel_iommu *intel = iommu->intel;
|
||||
+ struct acpi_drhd_unit *drhd = intel ? intel->drhd : NULL;
|
||||
+ s_time_t start_time;
|
||||
+
|
||||
+ if ( !is_igd_drhd(drhd) || !is_snb_gfx )
|
||||
+ return;
|
||||
+
|
||||
+ if ( !map_igd_reg() )
|
||||
+ return;
|
||||
+
|
||||
+ *((volatile u32 *)(igd_reg_va + 0x54)) = 0x000FFFFF;
|
||||
+ *((volatile u32 *)(igd_reg_va + 0x700)) = 0;
|
||||
+
|
||||
+ start_time = NOW();
|
||||
+ while ( (*((volatile u32 *)(igd_reg_va + 0x2AC)) & 0xF) != 0 )
|
||||
+ {
|
||||
+ if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT )
|
||||
+ {
|
||||
+ dprintk(XENLOG_INFO VTDPREFIX,
|
||||
+ "snb_vtd_ops_preamble: failed to disable idle handshake\n");
|
||||
+ break;
|
||||
+ }
|
||||
+ cpu_relax();
|
||||
+ }
|
||||
+
|
||||
+ *((volatile u32*)(igd_reg_va + 0x50)) = 0x10001;
|
||||
+}
|
||||
+
|
||||
+static void snb_vtd_ops_postamble(struct iommu* iommu)
|
||||
+{
|
||||
+ struct intel_iommu *intel = iommu->intel;
|
||||
+ struct acpi_drhd_unit *drhd = intel ? intel->drhd : NULL;
|
||||
+
|
||||
+ if ( !is_igd_drhd(drhd) || !is_snb_gfx )
|
||||
+ return;
|
||||
+
|
||||
+ if ( !map_igd_reg() )
|
||||
+ return;
|
||||
+
|
||||
+ *((volatile u32 *)(igd_reg_va + 0x54)) = 0xA;
|
||||
+ *((volatile u32 *)(igd_reg_va + 0x50)) = 0x10000;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* call before VT-d translation enable and IOTLB flush operations.
|
||||
*/
|
||||
+
|
||||
+static int snb_igd_quirk;
|
||||
+boolean_param("snb_igd_quirk", snb_igd_quirk);
|
||||
+
|
||||
void vtd_ops_preamble_quirk(struct iommu* iommu)
|
||||
{
|
||||
cantiga_vtd_ops_preamble(iommu);
|
||||
+ if ( snb_igd_quirk )
|
||||
+ snb_vtd_ops_preamble(iommu);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -156,7 +229,8 @@ void vtd_ops_preamble_quirk(struct iommu
|
||||
*/
|
||||
void vtd_ops_postamble_quirk(struct iommu* iommu)
|
||||
{
|
||||
- return;
|
||||
+ if ( snb_igd_quirk )
|
||||
+ snb_vtd_ops_postamble(iommu);
|
||||
}
|
||||
|
||||
/* initialize platform identification flags */
|
||||
@@ -175,6 +249,8 @@ void __init platform_quirks_init(void)
|
||||
/* initialize cantiga B3 identification */
|
||||
cantiga_b3_errata_init();
|
||||
|
||||
+ snb_errata_init();
|
||||
+
|
||||
/* ioremap IGD MMIO+0x2000 page */
|
||||
map_igd_reg();
|
||||
}
|
||||
@@ -246,11 +322,14 @@ void me_wifi_quirk(struct domain *domain
|
||||
id = pci_conf_read32(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), 0);
|
||||
switch (id)
|
||||
{
|
||||
- case 0x00878086:
|
||||
+ case 0x00878086: /* Kilmer Peak */
|
||||
case 0x00898086:
|
||||
- case 0x00828086:
|
||||
+ case 0x00828086: /* Taylor Peak */
|
||||
case 0x00858086:
|
||||
- case 0x42388086:
|
||||
+ case 0x008F8086: /* Rainbow Peak */
|
||||
+ case 0x00908086:
|
||||
+ case 0x00918086:
|
||||
+ case 0x42388086: /* Puma Peak */
|
||||
case 0x422b8086:
|
||||
case 0x422c8086:
|
||||
map_me_phantom_function(domain, 22, map);
|
||||
@@ -258,6 +337,28 @@ void me_wifi_quirk(struct domain *domain
|
||||
default:
|
||||
break;
|
||||
}
|
||||
+ }
|
||||
+}
|
||||
|
||||
+/*
|
||||
+ * Mask reporting Intel VT-d faults to IOH core logic:
|
||||
+ * - Some platform escalates VT-d faults to platform errors
|
||||
+ * - This can cause system failure upon non-fatal VT-d faults
|
||||
+ * - Potential security issue if malicious guest trigger VT-d faults
|
||||
+ */
|
||||
+void pci_vtd_quirk(struct pci_dev *pdev)
|
||||
+{
|
||||
+#ifdef CONFIG_X86_64
|
||||
+ int bus = pdev->bus;
|
||||
+ int dev = PCI_SLOT(pdev->devfn);
|
||||
+ int func = PCI_FUNC(pdev->devfn);
|
||||
+ int id, val;
|
||||
+
|
||||
+ id = pci_conf_read32(bus, dev, func, 0);
|
||||
+ if ( id == 0x342e8086 || id == 0x3c288086 )
|
||||
+ {
|
||||
+ val = pci_conf_read32(bus, dev, func, 0x1AC);
|
||||
+ pci_conf_write32(bus, dev, func, 0x1AC, val | (1 << 31));
|
||||
}
|
||||
+#endif
|
||||
}
|
110
22777-vtd-ats-fixes.patch
Normal file
110
22777-vtd-ats-fixes.patch
Normal file
@ -0,0 +1,110 @@
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1295353690 0
|
||||
# Node ID 1e7594758b28706c2b72358598ecf632ddda247b
|
||||
# Parent 78e2e5a50daa1702e3fd9dbceada700cdaefd511
|
||||
VT-d/ATS: misc fixes
|
||||
|
||||
First of all there were three places potentially de-referencing NULL
|
||||
(two after an allocation failure, and one after a failed lookup).
|
||||
|
||||
Second, if ATS_ENABLE was already set, the device would not have got
|
||||
added to the ats_devices list, potentially resulting in
|
||||
dev_invalidate_iotlb() doing an incomplete job.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
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
|
||||
@@ -91,6 +91,9 @@ int ats_device(int seg, int bus, int dev
|
||||
return 0;
|
||||
|
||||
pdev = pci_get_pdev(bus, devfn);
|
||||
+ if ( !pdev )
|
||||
+ return 0;
|
||||
+
|
||||
drhd = acpi_find_matched_drhd_unit(pdev);
|
||||
if ( !drhd )
|
||||
return 0;
|
||||
@@ -108,6 +111,8 @@ int ats_device(int seg, int bus, int dev
|
||||
if ( pos && (ats_drhd == NULL) )
|
||||
{
|
||||
new_drhd = xmalloc(struct acpi_drhd_unit);
|
||||
+ if ( !new_drhd )
|
||||
+ return 0;
|
||||
memcpy(new_drhd, drhd, sizeof(struct acpi_drhd_unit));
|
||||
list_add_tail(&new_drhd->list, &ats_dev_drhd_units);
|
||||
}
|
||||
@@ -116,9 +121,8 @@ int ats_device(int seg, int bus, int dev
|
||||
|
||||
int enable_ats_device(int seg, int bus, int devfn)
|
||||
{
|
||||
- struct pci_ats_dev *pdev;
|
||||
+ struct pci_ats_dev *pdev = NULL;
|
||||
u32 value;
|
||||
- u16 queue_depth;
|
||||
int pos;
|
||||
|
||||
if ( !acpi_find_matched_atsr_unit(bus, devfn) )
|
||||
@@ -142,26 +146,43 @@ int enable_ats_device(int seg, int bus,
|
||||
|
||||
/* BUGBUG: add back seg when multi-seg platform support is enabled */
|
||||
value = pci_conf_read16(bus, PCI_SLOT(devfn),
|
||||
- PCI_FUNC(devfn), pos + ATS_REG_CAP);
|
||||
- queue_depth = value & ATS_QUEUE_DEPTH_MASK;
|
||||
-
|
||||
- value = pci_conf_read16(bus, PCI_SLOT(devfn),
|
||||
PCI_FUNC(devfn), pos + ATS_REG_CTL);
|
||||
if ( value & ATS_ENABLE )
|
||||
- return 0;
|
||||
+ {
|
||||
+ list_for_each_entry ( pdev, &ats_devices, list )
|
||||
+ {
|
||||
+ if ( pdev->bus == bus && pdev->devfn == devfn )
|
||||
+ {
|
||||
+ pos = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if ( pos )
|
||||
+ pdev = xmalloc(struct pci_ats_dev);
|
||||
+ if ( !pdev )
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ if ( !(value & ATS_ENABLE) )
|
||||
+ {
|
||||
+ value |= ATS_ENABLE;
|
||||
+ pci_conf_write16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
|
||||
+ pos + ATS_REG_CTL, value);
|
||||
+ }
|
||||
+
|
||||
+ if ( pos )
|
||||
+ {
|
||||
+ pdev->bus = bus;
|
||||
+ pdev->devfn = devfn;
|
||||
+ value = pci_conf_read16(bus, PCI_SLOT(devfn),
|
||||
+ PCI_FUNC(devfn), pos + ATS_REG_CAP);
|
||||
+ pdev->ats_queue_depth = value & ATS_QUEUE_DEPTH_MASK;
|
||||
+ list_add(&pdev->list, &ats_devices);
|
||||
+ }
|
||||
|
||||
- value |= ATS_ENABLE;
|
||||
- pci_conf_write16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
|
||||
- pos + ATS_REG_CTL, value);
|
||||
-
|
||||
- pdev = xmalloc(struct pci_ats_dev);
|
||||
- pdev->bus = bus;
|
||||
- pdev->devfn = devfn;
|
||||
- pdev->ats_queue_depth = queue_depth;
|
||||
- list_add(&(pdev->list), &ats_devices);
|
||||
if ( iommu_verbose )
|
||||
- dprintk(XENLOG_INFO VTDPREFIX, "%x:%x.%x: ATS is enabled\n",
|
||||
- bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
|
||||
+ dprintk(XENLOG_INFO VTDPREFIX, "%x:%x.%x: ATS %s enabled\n",
|
||||
+ bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos ? "is" : "was");
|
||||
|
||||
return pos;
|
||||
}
|
64
22781-pod-hap-logdirty.patch
Normal file
64
22781-pod-hap-logdirty.patch
Normal file
@ -0,0 +1,64 @@
|
||||
# HG changeset patch
|
||||
# User George Dunlap <george.dunlap@eu.citrix.com>
|
||||
# Date 1295274541 0
|
||||
# Node ID 3decd02e0b18ae21fb926c6bad96a4cd02c48272
|
||||
# Parent 97ab84aca65cdcbce2ddccc51629fb24adb056cf
|
||||
PoD,hap: Fix logdirty mode when using hardware assisted paging
|
||||
|
||||
When writing a writable p2m entry for a pfn, we need to mark the pfn
|
||||
dirty to avoid corruption when doing live migration.
|
||||
|
||||
Marking the page dirty exposes another issue, where there are
|
||||
excessive sweeps for zero pages if there's a mismatch between PoD
|
||||
entries and cache entries. Only sweep for zero pages if we actually
|
||||
need more memory.
|
||||
|
||||
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
|
||||
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
|
||||
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
|
||||
@@ -1064,14 +1064,22 @@ p2m_pod_demand_populate(struct domain *d
|
||||
if ( unlikely(d->is_dying) )
|
||||
goto out_fail;
|
||||
|
||||
- /* If we're low, start a sweep */
|
||||
- if ( order == 9 && page_list_empty(&p2md->pod.super) )
|
||||
- p2m_pod_emergency_sweep_super(d);
|
||||
-
|
||||
- if ( page_list_empty(&p2md->pod.single) &&
|
||||
- ( ( order == 0 )
|
||||
- || (order == 9 && page_list_empty(&p2md->pod.super) ) ) )
|
||||
- p2m_pod_emergency_sweep(d);
|
||||
+ /* Once we've ballooned down enough that we can fill the remaining
|
||||
+ * PoD entries from the cache, don't sweep even if the particular
|
||||
+ * list we want to use is empty: that can lead to thrashing zero pages
|
||||
+ * through the cache for no good reason. */
|
||||
+ if ( p2md->pod.entry_count > p2md->pod.count )
|
||||
+ {
|
||||
+
|
||||
+ /* If we're low, start a sweep */
|
||||
+ if ( order == 9 && page_list_empty(&p2md->pod.super) )
|
||||
+ p2m_pod_emergency_sweep_super(d);
|
||||
+
|
||||
+ if ( page_list_empty(&p2md->pod.single) &&
|
||||
+ ( ( order == 0 )
|
||||
+ || (order == 9 && page_list_empty(&p2md->pod.super) ) ) )
|
||||
+ p2m_pod_emergency_sweep(d);
|
||||
+ }
|
||||
|
||||
/* 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
|
||||
set_p2m_entry(d, gfn_aligned, mfn, order, p2m_ram_rw);
|
||||
|
||||
for( i = 0 ; i < (1UL << order) ; i++ )
|
||||
+ {
|
||||
set_gpfn_from_mfn(mfn_x(mfn) + i, gfn_aligned + i);
|
||||
+ paging_mark_dirty(d, mfn_x(mfn) + i);
|
||||
+ }
|
||||
|
||||
p2md->pod.entry_count -= (1 << order); /* Lock: p2m */
|
||||
BUG_ON(p2md->pod.entry_count < 0);
|
82
22789-i386-no-x2apic.patch
Normal file
82
22789-i386-no-x2apic.patch
Normal file
@ -0,0 +1,82 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1295625507 0
|
||||
# Node ID 9bd5f65050f8014de7d0fcf9d89ed8c441f261fa
|
||||
# Parent 5852612cd4c461e5219db73cc52de0c643c414e8
|
||||
x86:x2apic: Disable x2apic on x86-32 permanently
|
||||
|
||||
x2apic initialization on x86_32 uses vcpu pointer before it is
|
||||
initialized. As x2apic is unlikely to be used on x86_32, this patch
|
||||
disables x2apic permanently on x86_32. It also asserts the sanity of
|
||||
vcpu pointer before dereference to prevent further misuse.
|
||||
|
||||
Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
|
||||
|
||||
jb: Moved logic into check_x2apic_preenabled(), disabled dead code on
|
||||
x86_32.
|
||||
|
||||
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
|
||||
@@ -959,6 +959,10 @@ void x2apic_setup(void)
|
||||
if ( !cpu_has_x2apic )
|
||||
return;
|
||||
|
||||
+#ifdef __i386__
|
||||
+ BUG();
|
||||
+#else
|
||||
+
|
||||
if ( !opt_x2apic )
|
||||
{
|
||||
if ( !x2apic_enabled )
|
||||
@@ -1020,6 +1024,7 @@ restore_out:
|
||||
unmask_8259A();
|
||||
|
||||
out:
|
||||
+#endif /* !__i386__ */
|
||||
if ( ioapic_entries )
|
||||
free_ioapic_entries(ioapic_entries);
|
||||
}
|
||||
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
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <xen/smp.h>
|
||||
#include <asm/mach-default/mach_mpparse.h>
|
||||
|
||||
+#ifndef __i386__
|
||||
+
|
||||
static int x2apic_phys; /* By default we use logical cluster mode. */
|
||||
boolean_param("x2apic_phys", x2apic_phys);
|
||||
|
||||
@@ -137,6 +139,8 @@ const struct genapic *apic_x2apic_probe(
|
||||
return x2apic_phys ? &apic_x2apic_phys : &apic_x2apic_cluster;
|
||||
}
|
||||
|
||||
+#endif /* !__i386__ */
|
||||
+
|
||||
void __init check_x2apic_preenabled(void)
|
||||
{
|
||||
u32 lo, hi;
|
||||
@@ -149,7 +153,19 @@ void __init check_x2apic_preenabled(void
|
||||
if ( lo & MSR_IA32_APICBASE_EXTD )
|
||||
{
|
||||
printk("x2APIC mode is already enabled by BIOS.\n");
|
||||
+#ifndef __i386__
|
||||
x2apic_enabled = 1;
|
||||
genapic = apic_x2apic_probe();
|
||||
+#else
|
||||
+ lo &= ~(MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD);
|
||||
+ wrmsr(MSR_IA32_APICBASE, lo, hi);
|
||||
+ lo |= MSR_IA32_APICBASE_ENABLE;
|
||||
+ wrmsr(MSR_IA32_APICBASE, lo, hi);
|
||||
+ printk("x2APIC disabled permanently on x86_32.\n");
|
||||
+#endif
|
||||
}
|
||||
+
|
||||
+#ifdef __i386__
|
||||
+ clear_bit(X86_FEATURE_X2APIC, boot_cpu_data.x86_capability);
|
||||
+#endif
|
||||
}
|
24
22790-svm-resume-migrate-pirqs.patch
Normal file
24
22790-svm-resume-migrate-pirqs.patch
Normal file
@ -0,0 +1,24 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1295625605 0
|
||||
# Node ID 43592043cefc8357e6e6a0ab9ba85ca480968cb1
|
||||
# Parent 9bd5f65050f8014de7d0fcf9d89ed8c441f261fa
|
||||
svm: migrate pirq with vcpu
|
||||
|
||||
hvm_migrate_pirqs() is missing in svm_do_resume().
|
||||
|
||||
Signed-off-by: Wei Wang <wei.wang2@amd.com>
|
||||
|
||||
Index: xen-4.0.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.0.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -704,7 +704,7 @@ static void svm_do_resume(struct vcpu *v
|
||||
{
|
||||
v->arch.hvm_svm.launch_core = smp_processor_id();
|
||||
hvm_migrate_timers(v);
|
||||
-
|
||||
+ hvm_migrate_pirqs(v);
|
||||
/* Migrating to another ASID domain. Request a new ASID. */
|
||||
hvm_asid_flush_vcpu(v);
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -2919,7 +2919,7 @@ class XendDomainInfo:
|
||||
|
||||
self.guest_bitsize = self.image.getBitSize()
|
||||
|
@ -20,10 +20,11 @@ Signed-off-by: Chunyan Liu <cyliu@novell.com>
|
||||
committer: Ian Jackson <Ian.Jackson@eu.citrix.com>
|
||||
git-commit-id: f95d202ed6444dacb15fbea4dee185eb0e048d9a
|
||||
|
||||
diff -r 080b5a094d4e -r f71a4c18e34e keymaps.c
|
||||
--- a/tools/ioemu-qemu-xen/keymaps.c Wed Sep 08 16:38:09 2010 +0100
|
||||
+++ b//tools/ioemu-qemu-xen/keymaps.c Tue Sep 14 17:31:43 2010 +0100
|
||||
@@ -51,6 +51,7 @@
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/keymaps.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/keymaps.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/keymaps.c
|
||||
@@ -51,6 +51,7 @@ typedef struct {
|
||||
struct key_range *numlock_range;
|
||||
struct key_range *shift_range;
|
||||
struct key_range *localstate_range;
|
||||
@ -31,20 +32,18 @@ diff -r 080b5a094d4e -r f71a4c18e34e keymaps.c
|
||||
} kbd_layout_t;
|
||||
|
||||
static void add_to_key_range(struct key_range **krp, int code) {
|
||||
@@ -133,7 +134,11 @@
|
||||
@@ -133,6 +134,10 @@ static kbd_layout_t *parse_keyboard_layo
|
||||
add_to_key_range(&k->localstate_range, keycode);
|
||||
//fprintf(stderr, "localstate keysym %04x keycode %d\n", keysym, keycode);
|
||||
}
|
||||
-
|
||||
+ if (rest && strstr(rest, "altgr")) {
|
||||
+ add_to_key_range(&k->altgr_range, keysym);
|
||||
+ //fprintf(stderr, "altgr keysym %04x keycode %d\n", keysym, keycode);
|
||||
+ }
|
||||
+
|
||||
|
||||
/* if(keycode&0x80)
|
||||
keycode=(keycode<<8)^0x80e0; */
|
||||
if (keysym < MAX_NORMAL_KEYCODE) {
|
||||
@@ -233,3 +238,16 @@
|
||||
@@ -233,3 +238,16 @@ static inline int keycode_is_shiftable(v
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
@ -61,10 +60,11 @@ diff -r 080b5a094d4e -r f71a4c18e34e keymaps.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
diff -r 080b5a094d4e -r f71a4c18e34e vnc.c
|
||||
--- a/tools/ioemu-qemu-xen/vnc.c Wed Sep 08 16:38:09 2010 +0100
|
||||
+++ b/tools/ioemu-qemu-xen/vnc.c Tue Sep 14 17:31:43 2010 +0100
|
||||
@@ -1274,12 +1274,27 @@
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
@@ -1274,12 +1274,27 @@ static void press_key_shift_up(VncState
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ diff -r 080b5a094d4e -r f71a4c18e34e vnc.c
|
||||
|
||||
if (is_graphic_console()) {
|
||||
if (sym >= 'A' && sym <= 'Z') {
|
||||
@@ -1289,8 +1304,11 @@
|
||||
@@ -1289,8 +1304,11 @@ static void do_key_event(VncState *vs, i
|
||||
else {
|
||||
shift = keysym_is_shift(vs->kbd_layout, sym & 0xFFFF);
|
||||
}
|
||||
@ -104,7 +104,7 @@ diff -r 080b5a094d4e -r f71a4c18e34e vnc.c
|
||||
|
||||
keycode = keysym2scancode(vs->kbd_layout, sym & 0xFFFF);
|
||||
if (keycode == 0) {
|
||||
@@ -1357,6 +1375,11 @@
|
||||
@@ -1357,6 +1375,11 @@ static void do_key_event(VncState *vs, i
|
||||
}
|
||||
|
||||
if (is_graphic_console()) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xenfb.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/hw/xenfb.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xenfb.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xenfb.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/hw/xenfb.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/hw/xenfb.c
|
||||
@@ -622,6 +622,18 @@ static void xenfb_guest_copy(struct XenF
|
||||
oops = 1;
|
||||
}
|
||||
|
@ -1,38 +1,97 @@
|
||||
--- a/tools/ioemu-qemu-xen/keymaps.c Wed Jan 05 23:16:54 2011 +0000
|
||||
+++ b/tools/ioemu-qemu-xen/keymaps.c Wed Jan 05 23:48:36 2011 +0000
|
||||
@@ -53,6 +53,20 @@ typedef struct {
|
||||
struct key_range *localstate_range;
|
||||
# HG changeset patch
|
||||
# User Chun Yan Liu <cyliu@novell.com>
|
||||
# Date 1294271316 0
|
||||
# Node ID a283996796c91dd29ecff444b78798e0ce902047
|
||||
# Parent 39df13908a3ad54e79dd3b53ed307e57f12f6d3d
|
||||
fix '|' key display problem in en-us with altgr processing
|
||||
|
||||
Commit f95d202ed644 handles altgr-insert problem. Unfortunately, with
|
||||
that patch, there is a problem in En-us keyboard: '|' (bar) cannot be
|
||||
displayed. After checking keymap files, we found there are two
|
||||
definitions to "bar" in en-us: bar 0x56 altgr (in "common") bar 0x2b
|
||||
shift (in "en-us") First line is actually invalid in en-us
|
||||
lanuage. The 2nd definition will cover the 1st one.
|
||||
|
||||
The previous change in didn't consider multi-definition case. It scans
|
||||
keymap files, if keysym needs altgr, it will records that, after that,
|
||||
if keysym is pressed but altgr not pressed, it will add an altgr press
|
||||
opeartion. It is correct if all keysyms are unique and valid. But in
|
||||
the above multi-definition case, there is problem: when reading bar
|
||||
0x56 altgr (in "common") it will record altgr needed, but in fact,
|
||||
that definition won't be used, it always use the 2nd definition and
|
||||
won't need altgr. Then if the keysym is pressed, the code will still
|
||||
add an altgr press operation, that will cause problem.
|
||||
|
||||
So, if we cannot avoid multi-definition in keymap files, the altgr
|
||||
flag (whether altgr needed or not) should also be refreshed according
|
||||
to the 2nd defintion. In the above case, when reading the 1st line, it
|
||||
records altgr needed; then reading 2nd line, 2nd definition will cover
|
||||
the 1st, meanwhile the altgr flag should be reset (the 2nd definition
|
||||
doesn't need altgr, so altgr flag should be removed.)
|
||||
|
||||
Following patch supplements f95d202ed644, and solve the
|
||||
problem.
|
||||
|
||||
Signed-off-by: Chun Yan Liu <cyliu@novell.com>
|
||||
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
|
||||
committer: Ian Jackson <Ian.Jackson@eu.citrix.com>
|
||||
git-commit-id: 99d53fbb69d3e03be61ae10506a304a3d08d792f
|
||||
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1295287237 0
|
||||
# Node ID b47bf8f7a5e1959d6f5c62febaef9e81dc3231a0
|
||||
# Parent b6bbe8be0afa54774a19ef43767a029ebddb2666
|
||||
keymaps.c: fix use after free in del_key_range
|
||||
|
||||
Commit 99d53fbb69d3e03be61ae10506a304a3d08d792f introduced this, and
|
||||
the compiler indirectly warned about it.
|
||||
|
||||
The patch is only compile tested (I don't even know how to reproduce
|
||||
the original problem), but I suppose worth applying regardless.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
Cc: Chun Yan Liu <cyliu@novell.com>
|
||||
|
||||
committer: Ian Jackson <Ian.Jackson@eu.citrix.com>
|
||||
git-commit-id: fdb22f24bc8adb3455b771d804496e11b4570085
|
||||
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/keymaps.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/keymaps.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/keymaps.c
|
||||
@@ -54,6 +54,17 @@ typedef struct {
|
||||
struct key_range *altgr_range;
|
||||
} kbd_layout_t;
|
||||
+
|
||||
|
||||
+static void del_key_range(struct key_range **krp, int code) {
|
||||
+ struct key_range *kr;
|
||||
+ struct key_range *kr_pr;
|
||||
+ for (kr = *krp; kr; kr_pr = kr, kr = kr->next) {
|
||||
+ while ((kr = *krp) != NULL) {
|
||||
+ if (code >= kr->start && code <= kr->end) {
|
||||
+ if (kr == *krp)
|
||||
+ *krp = kr->next;
|
||||
+ else
|
||||
+ kr_pr->next = kr->next;
|
||||
+ *krp = kr->next;
|
||||
+ qemu_free(kr);
|
||||
+ }
|
||||
+ } else
|
||||
+ krp = &kr->next;
|
||||
+ }
|
||||
+}
|
||||
|
||||
+
|
||||
static void add_to_key_range(struct key_range **krp, int code) {
|
||||
struct key_range *kr;
|
||||
@@ -137,6 +151,8 @@ static kbd_layout_t *parse_keyboard_layo
|
||||
for (kr = *krp; kr; kr = kr->next) {
|
||||
@@ -137,6 +148,8 @@ static kbd_layout_t *parse_keyboard_layo
|
||||
if (rest && strstr(rest, "altgr")) {
|
||||
add_to_key_range(&k->altgr_range, keysym);
|
||||
//fprintf(stderr, "altgr keysym %04x keycode %d\n", keysym, keycode);
|
||||
+ } else {
|
||||
+ del_key_range(&k->altgr_range, keysym);
|
||||
}
|
||||
|
||||
|
||||
/* if(keycode&0x80)
|
||||
|
||||
--- a/tools/ioemu-qemu-xen/vnc.c Wed Jan 05 23:16:54 2011 +0000
|
||||
+++ b/tools/ioemu-qemu-xen/vnc.c Wed Jan 05 23:48:36 2011 +0000
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
@@ -1279,11 +1279,9 @@ static void press_key_altgr_down(VncStat
|
||||
kbd_put_keycode(0xe0);
|
||||
if (down){
|
||||
@ -44,3 +103,4 @@
|
||||
- vs->modifiers_state[0xb8] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,8 +16,10 @@ committer: Ian Jackson <Ian.Jackson@eu.citrix.com>
|
||||
git-commit-id: 2aa36d470e97f4baa219f78df82e2d3fe3d9f96d
|
||||
|
||||
|
||||
--- a/tools/ioemu-qemu-xen/vl.c
|
||||
+++ b/tools/ioemu-qemu-xen/vl.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/vl.c
|
||||
===================================================================
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/vl.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/vl.c
|
||||
@@ -4845,6 +4845,13 @@ int main(int argc, char **argv, char **e
|
||||
rl.rlim_cur = rl.rlim_max;
|
||||
if (setrlimit(RLIMIT_DATA, &rl) != 0)
|
||||
|
@ -29,10 +29,10 @@ keycodes up and down events and make sure the intentionally added altgr keycode
|
||||
|
||||
Signed-off by Chunyan Liu (cyliu@novell.com)
|
||||
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
@@ -1308,6 +1308,9 @@ static void do_key_event(VncState *vs, i
|
||||
shift_keys = vs->modifiers_state[0x2a] | vs->modifiers_state[0x36];
|
||||
altgr_keys = vs->modifiers_state[0xb8];
|
||||
|
@ -1,10 +1,10 @@
|
||||
Subject: modify default read/write flag in bdrv_init.
|
||||
Signed-off by Chunyan Liu <cyliu@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/vl.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/vl.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/vl.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/vl.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/vl.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/vl.c
|
||||
@@ -2612,6 +2612,8 @@ int drive_init(struct drive_opt *arg, in
|
||||
strncpy(drives_table[nb_drives].serial, serial, sizeof(serial));
|
||||
nb_drives++;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/block.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/block.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/block.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/block.c
|
||||
@@ -350,7 +350,7 @@ int bdrv_file_open(BlockDriverState **pb
|
||||
|
||||
int bdrv_open(BlockDriverState *bs, const char *filename, int flags)
|
||||
@ -28,10 +28,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/block.c
|
||||
ret = drv->bdrv_open(bs, filename, open_flags);
|
||||
if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) {
|
||||
ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR);
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
@@ -551,7 +551,7 @@ USBDevice *usb_msd_init(const char *file
|
||||
s = qemu_mallocz(sizeof(MSDState));
|
||||
|
||||
@ -41,10 +41,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
goto fail;
|
||||
s->bs = bdrv;
|
||||
*pbs = bdrv;
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/qemu-img.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/qemu-img.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/qemu-img.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/qemu-img.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/qemu-img.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
@@ -237,6 +237,7 @@ static int open_disk(struct td_state *s,
|
||||
BlockDriver* drv;
|
||||
char* devname;
|
||||
@ -19,10 +19,10 @@ Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
fprintf(stderr, "Could not open image file %s\n", path);
|
||||
return -ENOMEM;
|
||||
}
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
@@ -136,7 +136,8 @@ static void insert_media(void *opaque)
|
||||
else
|
||||
format = &bdrv_raw;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c
|
||||
Index: xen-4.0.2-testing/tools/blktap/drivers/block-cdrom.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+++ xen-4.0.2-testing/tools/blktap/drivers/block-cdrom.c
|
||||
@@ -0,0 +1,535 @@
|
||||
+/* block-cdrom.c
|
||||
+ *
|
||||
@ -538,10 +538,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ .td_get_parent_id = tdcdrom_get_parent_id,
|
||||
+ .td_validate_parent = tdcdrom_validate_parent
|
||||
+};
|
||||
Index: xen-4.0.1-testing/xen/include/public/io/cdromif.h
|
||||
Index: xen-4.0.2-testing/xen/include/public/io/cdromif.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-4.0.1-testing/xen/include/public/io/cdromif.h
|
||||
+++ xen-4.0.2-testing/xen/include/public/io/cdromif.h
|
||||
@@ -0,0 +1,122 @@
|
||||
+/******************************************************************************
|
||||
+ * cdromif.h
|
||||
@ -665,10 +665,10 @@ Index: xen-4.0.1-testing/xen/include/public/io/cdromif.h
|
||||
+ sizeof(struct vcd_generic_command) - sizeof(struct request_sense))
|
||||
+
|
||||
+#endif
|
||||
Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile
|
||||
Index: xen-4.0.2-testing/tools/blktap/drivers/Makefile
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/blktap/drivers/Makefile
|
||||
+++ xen-4.0.1-testing/tools/blktap/drivers/Makefile
|
||||
--- xen-4.0.2-testing.orig/tools/blktap/drivers/Makefile
|
||||
+++ xen-4.0.2-testing/tools/blktap/drivers/Makefile
|
||||
@@ -28,8 +28,9 @@ CFLAGS += -DMEMSHR
|
||||
MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a
|
||||
endif
|
||||
@ -689,10 +689,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/Makefile
|
||||
BLK-OBJS-y += aes.o
|
||||
BLK-OBJS-y += tapaio.o
|
||||
BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
|
||||
Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
Index: xen-4.0.2-testing/tools/blktap/drivers/tapdisk.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
--- xen-4.0.2-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.0.2-testing/tools/blktap/drivers/tapdisk.h
|
||||
@@ -137,6 +137,9 @@ struct tap_disk {
|
||||
int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id);
|
||||
int (*td_validate_parent)(struct disk_driver *dd,
|
||||
@ -737,10 +737,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
};
|
||||
|
||||
typedef struct driver_list_entry {
|
||||
Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h
|
||||
Index: xen-4.0.2-testing/tools/blktap/lib/blktaplib.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/blktap/lib/blktaplib.h
|
||||
+++ xen-4.0.1-testing/tools/blktap/lib/blktaplib.h
|
||||
--- xen-4.0.2-testing.orig/tools/blktap/lib/blktaplib.h
|
||||
+++ xen-4.0.2-testing/tools/blktap/lib/blktaplib.h
|
||||
@@ -225,6 +225,7 @@ typedef struct msg_pid {
|
||||
#define DISK_TYPE_RAM 3
|
||||
#define DISK_TYPE_QCOW 4
|
||||
@ -749,10 +749,10 @@ Index: xen-4.0.1-testing/tools/blktap/lib/blktaplib.h
|
||||
|
||||
/* xenstore/xenbus: */
|
||||
#define DOMNAME "Domain-0"
|
||||
Index: xen-4.0.1-testing/xen/include/public/io/blkif.h
|
||||
Index: xen-4.0.2-testing/xen/include/public/io/blkif.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/xen/include/public/io/blkif.h
|
||||
+++ xen-4.0.1-testing/xen/include/public/io/blkif.h
|
||||
--- xen-4.0.2-testing.orig/xen/include/public/io/blkif.h
|
||||
+++ xen-4.0.2-testing/xen/include/public/io/blkif.h
|
||||
@@ -76,6 +76,10 @@
|
||||
* "feature-flush-cache" node!
|
||||
*/
|
||||
@ -764,10 +764,10 @@ Index: xen-4.0.1-testing/xen/include/public/io/blkif.h
|
||||
|
||||
/*
|
||||
* Maximum scatter/gather segments per request.
|
||||
Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c
|
||||
Index: xen-4.0.2-testing/tools/blktap/drivers/tapdisk.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.c
|
||||
+++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c
|
||||
--- xen-4.0.2-testing.orig/tools/blktap/drivers/tapdisk.c
|
||||
+++ xen-4.0.2-testing/tools/blktap/drivers/tapdisk.c
|
||||
@@ -735,6 +735,22 @@ static void get_io_request(struct td_sta
|
||||
goto out;
|
||||
}
|
||||
@ -791,10 +791,10 @@ Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.c
|
||||
default:
|
||||
DPRINTF("Unknown block operation\n");
|
||||
break;
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/BlktapController.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/server/BlktapController.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
@@ -21,6 +21,7 @@ blktap1_disk_types = [
|
||||
'ram',
|
||||
'qcow',
|
||||
|
14
blktap.patch
14
blktap.patch
@ -1,11 +1,11 @@
|
||||
bug #239173
|
||||
bug #242953
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -3290,7 +3290,7 @@ class XendDomainInfo:
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -3291,7 +3291,7 @@ class XendDomainInfo:
|
||||
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
||||
|
||||
vbd = {
|
||||
@ -14,10 +14,10 @@ Index: xen-4.0.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
'device': BOOTLOADER_LOOPBACK_DEVICE,
|
||||
}
|
||||
|
||||
Index: xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.0.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.0.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
@@ -397,9 +397,9 @@ void xenstore_parse_domain_config(int hv
|
||||
{
|
||||
char **e_danger = NULL;
|
||||
|
@ -3,10 +3,10 @@ Change it to VmError.
|
||||
|
||||
Signed-off-by ChunyanLiu <cyliu@novell.com>
|
||||
|
||||
Index: xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
Index: xen-4.0.2-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/python/xen/xend/server/BlktapController.py
|
||||
+++ xen-4.0.1-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
--- xen-4.0.2-testing.orig/tools/python/xen/xend/server/BlktapController.py
|
||||
+++ xen-4.0.2-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
@@ -4,6 +4,7 @@ import string, re
|
||||
from xen.xend.server.blkif import BlkifController
|
||||
from xen.xend.XendLogging import log
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
Index: xen-4.0.2-testing/tools/blktap/drivers/tapdisk.h
|
||||
===================================================================
|
||||
--- xen-4.0.1-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.0.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
--- xen-4.0.2-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.0.2-testing/tools/blktap/drivers/tapdisk.h
|
||||
@@ -168,7 +168,7 @@ static disk_info_t aio_disk = {
|
||||
"raw image (aio)",
|
||||
"aio",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user