[PATCH 1/4] KVM: MMU: Use gfn_to_rmap() in audit_write_protection()
We want to eliminate direct access to the rmap array. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/mmu_audit.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/mmu_audit.c b/arch/x86/kvm/mmu_audit.c index 6eabae3..e62fa4f 100644 --- a/arch/x86/kvm/mmu_audit.c +++ b/arch/x86/kvm/mmu_audit.c @@ -190,15 +190,13 @@ static void check_mappings_rmap(struct kvm *kvm, struct kvm_mmu_page *sp) static void audit_write_protection(struct kvm *kvm, struct kvm_mmu_page *sp) { - struct kvm_memory_slot *slot; unsigned long *rmapp; u64 *spte; if (sp-role.direct || sp-unsync || sp-role.invalid) return; - slot = gfn_to_memslot(kvm, sp-gfn); - rmapp = slot-rmap[sp-gfn - slot-base_gfn]; + rmapp = gfn_to_rmap(kvm, sp-gfn, PT_PAGE_TABLE_LEVEL); spte = rmap_next(rmapp, NULL); while (spte) { -- 1.7.5.4 -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] KVM: MMU: Use gfn_to_rmap() in audit_write_protection()
We want to eliminate direct access to the rmap array. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/mmu_audit.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/mmu_audit.c b/arch/x86/kvm/mmu_audit.c index 6eabae3..e62fa4f 100644 --- a/arch/x86/kvm/mmu_audit.c +++ b/arch/x86/kvm/mmu_audit.c @@ -190,15 +190,13 @@ static void check_mappings_rmap(struct kvm *kvm, struct kvm_mmu_page *sp) static void audit_write_protection(struct kvm *kvm, struct kvm_mmu_page *sp) { - struct kvm_memory_slot *slot; unsigned long *rmapp; u64 *spte; if (sp-role.direct || sp-unsync || sp-role.invalid) return; - slot = gfn_to_memslot(kvm, sp-gfn); - rmapp = slot-rmap[sp-gfn - slot-base_gfn]; + rmapp = gfn_to_rmap(kvm, sp-gfn, PT_PAGE_TABLE_LEVEL); spte = rmap_next(rmapp, NULL); while (spte) { -- 1.7.5.4 -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html