diff options
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r-- | drivers/kvm/paging_tmpl.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index bab1b7f8d705..572e5b6d9a7a 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h | |||
@@ -72,8 +72,6 @@ static int FNAME(walk_addr)(struct guest_walker *walker, | |||
72 | struct kvm_vcpu *vcpu, gva_t addr, | 72 | struct kvm_vcpu *vcpu, gva_t addr, |
73 | int write_fault, int user_fault, int fetch_fault) | 73 | int write_fault, int user_fault, int fetch_fault) |
74 | { | 74 | { |
75 | hpa_t hpa; | ||
76 | struct kvm_memory_slot *slot; | ||
77 | struct page *page; | 75 | struct page *page; |
78 | pt_element_t *table; | 76 | pt_element_t *table; |
79 | pt_element_t pte; | 77 | pt_element_t pte; |
@@ -105,9 +103,8 @@ static int FNAME(walk_addr)(struct guest_walker *walker, | |||
105 | pgprintk("%s: table_gfn[%d] %lx\n", __FUNCTION__, | 103 | pgprintk("%s: table_gfn[%d] %lx\n", __FUNCTION__, |
106 | walker->level - 1, table_gfn); | 104 | walker->level - 1, table_gfn); |
107 | 105 | ||
108 | slot = gfn_to_memslot(vcpu->kvm, table_gfn); | 106 | page = gfn_to_page(vcpu->kvm, (pte & PT64_BASE_ADDR_MASK) |
109 | hpa = safe_gpa_to_hpa(vcpu->kvm, pte & PT64_BASE_ADDR_MASK); | 107 | >> PAGE_SHIFT); |
110 | page = pfn_to_page(hpa >> PAGE_SHIFT); | ||
111 | 108 | ||
112 | table = kmap_atomic(page, KM_USER0); | 109 | table = kmap_atomic(page, KM_USER0); |
113 | pte = table[index]; | 110 | pte = table[index]; |