]> xenbits.xensource.com Git - xen.git/commitdiff
x86/EPT: relax treatment of APIC MFN
authorJan Beulich <jbeulich@suse.com>
Wed, 9 Apr 2014 09:40:50 +0000 (11:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 9 Apr 2014 09:40:50 +0000 (11:40 +0200)
There's no point in this being mapped UC by the guest due to using a
respective PAT index - set the ignore-PAT flag to true.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
master commit: 1f8b57779785bf9f55c16312bb1ec679929c314b
master date: 2014-03-28 13:43:25 +0100

xen/arch/x86/hvm/mtrr.c

index a896a5d81a531699c84bd746498322987054f84c..897ee05314d08063de40d2637f9a1446abc57f4c 100644 (file)
@@ -711,8 +711,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {