From 38c335f1f57bd9edc3cd894e8f5f3fc133320ad3 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 21 Nov 2007 14:20:22 +0200 Subject: KVM: MMU: Adjust page_header_update_slot() to accept a gfn instead of a gpa Signed-off-by: Avi Kivity --- drivers/kvm/mmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/kvm/mmu.c') diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index c3362ba33b0a..1dcffc49eff8 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -860,9 +860,9 @@ static void mmu_unshadow(struct kvm *kvm, gfn_t gfn) } } -static void page_header_update_slot(struct kvm *kvm, void *pte, gpa_t gpa) +static void page_header_update_slot(struct kvm *kvm, void *pte, gfn_t gfn) { - int slot = memslot_id(kvm, gfn_to_memslot(kvm, gpa >> PAGE_SHIFT)); + int slot = memslot_id(kvm, gfn_to_memslot(kvm, gfn)); struct kvm_mmu_page *page_head = page_header(__pa(pte)); __set_bit(slot, &page_head->slot_bitmap); @@ -928,7 +928,8 @@ static int nonpaging_map(struct kvm_vcpu *vcpu, gva_t v, hpa_t p) return 0; } mark_page_dirty(vcpu->kvm, v >> PAGE_SHIFT); - page_header_update_slot(vcpu->kvm, table, v); + page_header_update_slot(vcpu->kvm, table, + v >> PAGE_SHIFT); table[index] = p | PT_PRESENT_MASK | PT_WRITABLE_MASK | PT_USER_MASK; if (!was_rmapped) -- cgit v1.2.3