diff options
author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2012-08-01 18:02:01 +0900 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-06 12:47:04 +0300 |
commit | 65fbe37c42ed75604c9a770639209dcee162ebe7 (patch) | |
tree | af03eda97fb68a0329b2890a5a509944d79dffdd /arch/x86/kvm/mmu.c | |
parent | aab2eb7a38e0e510874acca01838f5badbca6c7e (diff) | |
download | op-kernel-dev-65fbe37c42ed75604c9a770639209dcee162ebe7.zip op-kernel-dev-65fbe37c42ed75604c9a770639209dcee162ebe7.tar.gz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index a9a2052..ee768bb 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, unsigned long *rmapp; while (mask) { - rmapp = &slot->rmap[gfn_offset + __ffs(mask)]; + rmapp = __gfn_to_rmap(slot->base_gfn + gfn_offset + __ffs(mask), + PT_PAGE_TABLE_LEVEL, slot); __rmap_write_protect(kvm, rmapp, PT_PAGE_TABLE_LEVEL, false); /* clear the first set bit */ |