diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-08-13 09:56:15 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-08-13 09:56:15 +0100 |
commit | 06b01c320bf8bd005c441d01d6c73af6099cc5ae (patch) | |
tree | cb83859c4346e2745d1d029a36310c1d407a5298 | |
parent | 07cb2c22b5f19f1b53a4bbef51af125913f989a5 (diff) | |
download | xen-06b01c320bf8bd005c441d01d6c73af6099cc5ae.tar.gz xen-06b01c320bf8bd005c441d01d6c73af6099cc5ae.tar.bz2 xen-06b01c320bf8bd005c441d01d6c73af6099cc5ae.zip |
vtd: Add checking on return value of init_vtd_hw()
This ensures correct actions will be taken if init_vtd_hw()
fails. Especially, when 'iommu=force' is used, Xen should not
boot if init_vtd_hw() fails.
Signed-off-by: Weidong Han <weidong.han@intel.com>
-rw-r--r-- | xen/drivers/passthrough/vtd/iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index d53140b7b0..36bdafbe5b 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1789,7 +1789,8 @@ int intel_vtd_setup(void) memset(domid_bitmap, 0, domid_bitmap_size / 8); set_bit(0, domid_bitmap); - init_vtd_hw(); + if ( init_vtd_hw() ) + goto error; register_keyhandler('V', dump_iommu_info, "dump iommu info"); |