aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2012-08-01 05:02:01 -0400
committerAvi Kivity <avi@redhat.com>2012-08-06 05:47:04 -0400
commit65fbe37c42ed75604c9a770639209dcee162ebe7 (patch)
treeaf03eda97fb68a0329b2890a5a509944d79dffdd /arch/x86/kvm/mmu.c
parentaab2eb7a38e0e510874acca01838f5badbca6c7e (diff)
KVM: MMU: Use gfn_to_rmap() instead of directly reading rmap array
This helps to make rmap architecture specific in a later patch. 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/mmu.c')
-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 a9a20528e700..ee768bb2367f 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1181,7 +1181,8 @@ void kvm_mmu_write_protect_pt_masked(struct kvm *kvm,
1181 unsigned long *rmapp; 1181 unsigned long *rmapp;
1182 1182
1183 while (mask) { 1183 while (mask) {
1184 rmapp = &slot->rmap[gfn_offset + __ffs(mask)]; 1184 rmapp = __gfn_to_rmap(slot->base_gfn + gfn_offset + __ffs(mask),
1185 PT_PAGE_TABLE_LEVEL, slot);
1185 __rmap_write_protect(kvm, rmapp, PT_PAGE_TABLE_LEVEL, false); 1186 __rmap_write_protect(kvm, rmapp, PT_PAGE_TABLE_LEVEL, false);
1186 1187
1187 /* clear the first set bit */ 1188 /* clear the first set bit */