debuggers.hg

changeset 22794:47713825a3f9

vt-d: Fix crash issue when not sharing EPT and VT-d tables.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir@xen.org>
date Fri Jan 14 08:08:37 2011 +0000 (2011-01-14)
parents 7bc5e072d986
children 93e7bf0e1845
files xen/drivers/passthrough/vtd/iommu.c
line diff
     1.1 --- a/xen/drivers/passthrough/vtd/iommu.c	Fri Jan 14 08:02:26 2011 +0000
     1.2 +++ b/xen/drivers/passthrough/vtd/iommu.c	Fri Jan 14 08:08:37 2011 +0000
     1.3 @@ -1773,9 +1773,13 @@ void iommu_set_pgd(struct domain *d)
     1.4      ASSERT( is_hvm_domain(d) && d->arch.hvm_domain.hap_enabled );
     1.5  
     1.6      iommu_hap_pt_share = vtd_ept_share();
     1.7 +    if ( !iommu_hap_pt_share )
     1.8 +        goto out;
     1.9 +
    1.10      pgd_mfn = pagetable_get_mfn(p2m_get_pagetable(p2m_get_hostp2m(d)));
    1.11      hd->pgd_maddr = pagetable_get_paddr(pagetable_from_mfn(pgd_mfn));
    1.12  
    1.13 +out:
    1.14      dprintk(XENLOG_INFO VTDPREFIX,
    1.15              "VT-d page table %s with EPT table\n",
    1.16              iommu_hap_pt_share ? "shares" : "not sharing");