aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2010-12-05 11:11:33 -0500
committerAvi Kivity <avi@redhat.com>2011-01-12 04:30:21 -0500
commit700e1b12196c4b01524ca10d89f8731418d72b6e (patch)
treebf9f5aeeb8724f71f53e083267118df1b275163f /arch/x86/kvm
parenta295673aba42895997a6c1be87f467a7cfc0f332 (diff)
KVM: MMU: Avoid dropping accessed bit while removing write access
One more "KVM: MMU: Don't drop accessed bit while updating an spte." Sptes are accessed by both kvm and hardware. This patch uses update_spte() to fix the way of removing write access. Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d35950087e3d..482a5c0c48db 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -3447,7 +3447,7 @@ void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot)
3447 for (i = 0; i < PT64_ENT_PER_PAGE; ++i) 3447 for (i = 0; i < PT64_ENT_PER_PAGE; ++i)
3448 /* avoid RMW */ 3448 /* avoid RMW */
3449 if (is_writable_pte(pt[i])) 3449 if (is_writable_pte(pt[i]))
3450 pt[i] &= ~PT_WRITABLE_MASK; 3450 update_spte(&pt[i], pt[i] & ~PT_WRITABLE_MASK);
3451 } 3451 }
3452 kvm_flush_remote_tlbs(kvm); 3452 kvm_flush_remote_tlbs(kvm);
3453} 3453}