ia64/xen-unstable

changeset 18316:29e994c7678e

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>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Aug 13 09:56:15 2008 +0100 (2008-08-13)
parents 2c63cf7b042d
children 08ff587400ba
files xen/drivers/passthrough/vtd/iommu.c
line diff
     1.1 --- a/xen/drivers/passthrough/vtd/iommu.c	Tue Aug 12 10:23:34 2008 +0100
     1.2 +++ b/xen/drivers/passthrough/vtd/iommu.c	Wed Aug 13 09:56:15 2008 +0100
     1.3 @@ -1789,7 +1789,8 @@ int intel_vtd_setup(void)
     1.4      memset(domid_bitmap, 0, domid_bitmap_size / 8);
     1.5      set_bit(0, domid_bitmap);
     1.6  
     1.7 -    init_vtd_hw();
     1.8 +    if ( init_vtd_hw() )
     1.9 +        goto error;
    1.10  
    1.11      register_keyhandler('V', dump_iommu_info, "dump iommu info");
    1.12