diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-10-07 11:24:24 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-07 11:24:24 +0200 |
commit | 25a9a924c0c8723ced99179eb639e8c5372a2557 (patch) | |
tree | 83170168d50b9703486327b5b3a0bfb1d8da9b2b /arch/x86/kvm/vmx.c | |
parent | 0b101e62afe626ecae60173f92f1e0ec72151653 (diff) | |
parent | a0eeb8dd34f21fddfe85b37832b5f3d02ee6e34b (diff) | |
download | linux-25a9a924c0c8723ced99179eb639e8c5372a2557.tar.gz linux-25a9a924c0c8723ced99179eb639e8c5372a2557.tar.bz2 linux-25a9a924c0c8723ced99179eb639e8c5372a2557.zip |
Merge branch 'linus' into x86/asm, to pick up fixes before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 64076740251e..06ef4908ba61 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -8617,17 +8617,22 @@ static u64 vmx_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio) u64 ipat = 0; /* For VT-d and EPT combination - * 1. MMIO: guest may want to apply WC, trust it. + * 1. MMIO: always map as UC * 2. EPT with VT-d: * a. VT-d without snooping control feature: can't guarantee the - * result, try to trust guest. So the same as item 1. + * result, try to trust guest. * b. VT-d with snooping control feature: snooping control feature of * VT-d engine can guarantee the cache correctness. Just set it * to WB to keep consistent with host. So the same as item 3. * 3. EPT without VT-d: always map as WB and set IPAT=1 to keep * consistent with host MTRR */ - if (!is_mmio && !kvm_arch_has_noncoherent_dma(vcpu->kvm)) { + if (is_mmio) { + cache = MTRR_TYPE_UNCACHABLE; + goto exit; + } + + if (!kvm_arch_has_noncoherent_dma(vcpu->kvm)) { ipat = VMX_EPT_IPAT_BIT; cache = MTRR_TYPE_WRBACK; goto exit; |