aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@citrix.com>2011-01-21 16:04:59 +0000
committerTim Deegan <Tim.Deegan@citrix.com>2011-01-21 16:04:59 +0000
commit380454d267dff12efc96f8c566e039f9a5f9491d (patch)
tree2b8558eab4aa78bf7351e3a6c048934917c08422
parentcf956b11ce576b4f54dbf2ca3f11717c0960431d (diff)
parent64e34cfdcadf72305a8d4e46986274d8c6098d1a (diff)
downloadxen-380454d267dff12efc96f8c566e039f9a5f9491d.tar.gz
xen-380454d267dff12efc96f8c566e039f9a5f9491d.tar.bz2
xen-380454d267dff12efc96f8c566e039f9a5f9491d.zip
Merge
-rw-r--r--xen/arch/x86/apic.c16
-rw-r--r--xen/arch/x86/hvm/svm/svm.c2
-rw-r--r--xen/arch/x86/x86_32/domain_page.c2
-rw-r--r--xen/drivers/passthrough/vtd/quirks.c10
4 files changed, 27 insertions, 3 deletions
diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index 1590c3a171..ceefc6784d 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -961,6 +961,22 @@ void __init x2apic_bsp_setup(void)
if ( !cpu_has_x2apic )
return;
+#ifdef __i386__
+ clear_bit(X86_FEATURE_X2APIC, boot_cpu_data.x86_capability);
+ if ( x2apic_enabled )
+ {
+ uint64_t msr_content;
+ rdmsrl(MSR_IA32_APICBASE, msr_content);
+ msr_content &= ~(MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD);
+ wrmsrl(MSR_IA32_APICBASE, msr_content);
+ msr_content |= MSR_IA32_APICBASE_ENABLE;
+ wrmsrl(MSR_IA32_APICBASE, msr_content);
+ x2apic_enabled = 0;
+ }
+ printk("x2APIC disabled permanently on x86_32.\n");
+ return;
+#endif
+
if ( !opt_x2apic )
{
if ( !x2apic_enabled )
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 968beedb42..4df855ff26 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -705,7 +705,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);
}
diff --git a/xen/arch/x86/x86_32/domain_page.c b/xen/arch/x86/x86_32/domain_page.c
index 55a3380776..4fb563d4f0 100644
--- a/xen/arch/x86/x86_32/domain_page.c
+++ b/xen/arch/x86/x86_32/domain_page.c
@@ -53,6 +53,8 @@ void *map_domain_page(unsigned long mfn)
perfc_incr(map_domain_page_count);
v = mapcache_current_vcpu();
+ /* Prevent vcpu pointer being used before initialize. */
+ ASSERT((unsigned long)v != 0xfffff000);
dcache = &v->domain->arch.mapcache;
vcache = &v->arch.mapcache;
diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough/vtd/quirks.c
index f6a7ac0294..f4f6060576 100644
--- a/xen/drivers/passthrough/vtd/quirks.c
+++ b/xen/drivers/passthrough/vtd/quirks.c
@@ -217,10 +217,15 @@ static void snb_vtd_ops_postamble(struct iommu* iommu)
/*
* 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);
- snb_vtd_ops_preamble(iommu);
+ if ( snb_igd_quirk )
+ snb_vtd_ops_preamble(iommu);
}
/*
@@ -228,7 +233,8 @@ void vtd_ops_preamble_quirk(struct iommu* iommu)
*/
void vtd_ops_postamble_quirk(struct iommu* iommu)
{
- snb_vtd_ops_postamble(iommu);
+ if ( snb_igd_quirk )
+ snb_vtd_ops_postamble(iommu);
}
/* initialize platform identification flags */