aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2010-09-27 06:05:00 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:53:11 -0400
commit33f91edb9211f5c0392071f9eb01958ec69f2193 (patch)
treec032c66208b1a889dbc13e6cdf2c39da23ad06ea /arch/x86/kvm
parent20bd40dc6492da293993559555df07d467fd202e (diff)
KVM: MMU: set access bit for direct mapping
Set access bit while setup up direct page table if it's nonpaing or npt enabled, it's good for CPU's speculate access Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/mmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 363004699012..88203fa4ef05 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2240,7 +2240,8 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
2240 __set_spte(iterator.sptep, 2240 __set_spte(iterator.sptep,
2241 __pa(sp->spt) 2241 __pa(sp->spt)
2242 | PT_PRESENT_MASK | PT_WRITABLE_MASK 2242 | PT_PRESENT_MASK | PT_WRITABLE_MASK
2243 | shadow_user_mask | shadow_x_mask); 2243 | shadow_user_mask | shadow_x_mask
2244 | shadow_accessed_mask);
2244 } 2245 }
2245 } 2246 }
2246 return pt_write; 2247 return pt_write;