diff options
author | Felix Blyakher <felixb@sgi.com> | 2009-02-18 15:35:05 -0600 |
---|---|---|
committer | Felix Blyakher <felixb@sgi.com> | 2009-02-18 15:35:05 -0600 |
commit | 01234f3c87fff1d83adef8a70fdc18f27d67d75c (patch) | |
tree | 95a24fe0b257404ca1ee01faee7e2201e3632b9f /arch/x86/kvm/mmu.c | |
parent | 8aa4349ad527db56724b1ab9478db65a8065e0bb (diff) | |
parent | 5955c7a2cfb6a35429adea5dc480002b15ca8cfc (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 83f11c7474a1..2d4477c71473 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1698,8 +1698,13 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte, if (largepage) spte |= PT_PAGE_SIZE_MASK; if (mt_mask) { - mt_mask = get_memory_type(vcpu, gfn) << - kvm_x86_ops->get_mt_mask_shift(); + if (!kvm_is_mmio_pfn(pfn)) { + mt_mask = get_memory_type(vcpu, gfn) << + kvm_x86_ops->get_mt_mask_shift(); + mt_mask |= VMX_EPT_IGMT_BIT; + } else + mt_mask = MTRR_TYPE_UNCACHABLE << + kvm_x86_ops->get_mt_mask_shift(); spte |= mt_mask; } |