x86/EPT: refine direct MMIO checking when determining EMT
authorJan Beulich <jbeulich@suse.com>
Fri, 2 May 2014 08:50:04 +0000 (10:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 May 2014 08:50:04 +0000 (10:50 +0200)
commitc5004d34693341e2b368467fad1860e53cb5a5d8
treec5d8e77d15e7514030f510fe3685c3796242b840
parent126018f2acd5416434747423e61a4690108b9dc9
x86/EPT: refine direct MMIO checking when determining EMT

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.

At once drop open-coding of cache_flush_permitted().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/hvm/mtrr.c