aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-03-11 08:09:58 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-03-11 08:09:58 +0000
commit1803dc9556de65b65c870d6bbdd1acce9c1d8fe3 (patch)
treead13b1af7e21f62bf978749941227e3af6b8ee88
parent7a6d294eb96ce934efbd8c3ab517d9ddd03c0089 (diff)
downloadxen-1803dc9556de65b65c870d6bbdd1acce9c1d8fe3.tar.gz
xen-1803dc9556de65b65c870d6bbdd1acce9c1d8fe3.tar.bz2
xen-1803dc9556de65b65c870d6bbdd1acce9c1d8fe3.zip
iommu: clear the iommu_* variables to 0 when iommu is not enabled.
With "iommu=0" xen parameter, the 3 iommu_* variables are still left to the default value 1 -- this is misleading... Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
-rw-r--r--xen/drivers/passthrough/iommu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 702d81afe9..ad988b2bcb 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -288,7 +288,12 @@ int iommu_setup(void)
panic("IOMMU setup failed, crash Xen for security purpose!\n");
if ( !iommu_enabled )
+ {
iommu_pv_enabled = 0;
+ iommu_snoop = 0;
+ iommu_qinval = 0;
+ iommu_intremap = 0;
+ }
printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis");
if ( iommu_enabled )
printk("I/O virtualisation for PV guests %sabled\n",