[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/4] x86/EPT: refine direct MMIO checking when determining EMT



> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: Wednesday, April 23, 2014 4:40 PM
> 
> With need_iommu() only ever true when iommu_enabled is also true, and
> with the former getting set when a PCI device gets added to a guest,
> the checks can be consolidated. The range set check are left in place
> just in case raw MMIO or I/O port ranges get passed to a guest.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>

> 
> --- a/xen/arch/x86/hvm/mtrr.c
> +++ b/xen/arch/x86/hvm/mtrr.c
> @@ -810,10 +810,9 @@ int epte_get_entry_emt(struct domain *d,
>          return -1;
>      }
> 
> -    if ( !iommu_enabled ||
> -         (rangeset_is_empty(d->iomem_caps) &&
> -          rangeset_is_empty(d->arch.ioport_caps) &&
> -          !has_arch_pdevs(d)) )
> +    if ( !need_iommu(d) &&
> +         rangeset_is_empty(d->iomem_caps) &&
> +         rangeset_is_empty(d->arch.ioport_caps) )
>      {
>          ASSERT(!direct_mmio ||
>                 !((mfn_x(mfn) ^
> d->arch.hvm_domain.vmx.apic_access_mfn) >>
> 
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.