From: Keir Fraser Date: Wed, 13 Aug 2008 08:56:15 +0000 (+0100) Subject: vtd: Add checking on return value of init_vtd_hw() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14157^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=06b01c320bf8bd005c441d01d6c73af6099cc5ae;p=xen.git 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 --- 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");