aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-03-05 14:31:14 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-03-05 14:31:14 +0000
commit96b84001d58fa3c9ed8bbcfe1f9d3ae097373508 (patch)
treeefe1fc67a7c975d660c08cad7af53703f0e8e75c
parentb3bc7b059a068664f325762c9b9f21c188437c0c (diff)
downloadxen-96b84001d58fa3c9ed8bbcfe1f9d3ae097373508.tar.gz
xen-96b84001d58fa3c9ed8bbcfe1f9d3ae097373508.tar.bz2
xen-96b84001d58fa3c9ed8bbcfe1f9d3ae097373508.zip
vt-d: ensure x2apic is not enabled accidently if no DRHD at all.
Thanks to Jan Beulich for pointing this out. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
-rw-r--r--xen/drivers/passthrough/vtd/intremap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c
index 87c639d501..9459a81736 100644
--- a/xen/drivers/passthrough/vtd/intremap.c
+++ b/xen/drivers/passthrough/vtd/intremap.c
@@ -131,6 +131,9 @@ int iommu_supports_eim(void)
if ( !iommu_enabled || !iommu_qinval || !iommu_intremap )
return 0;
+ if ( list_empty(&acpi_drhd_units) )
+ return 0;
+
for_each_drhd_unit ( drhd )
if ( !ecap_queued_inval(drhd->ecap) ||
!ecap_intr_remap(drhd->ecap) ||