aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorIzik Eidus <ieidus@redhat.com>2008-10-03 10:40:32 -0400
committerAvi Kivity <avi@redhat.com>2008-12-31 09:51:50 -0500
commit2843099fee32a6020e1caa95c6026f28b5d43bff (patch)
tree774ddfeec4091adddf9bd9ce938648dad14c378e /arch/x86/include/asm/kvm_host.h
parent6eb55818c043b097c83828da8430fcb9a02fdb89 (diff)
KVM: MMU: Fix aliased gfns treated as unaliased
Some areas of kvm x86 mmu are using gfn offset inside a slot without unaliasing the gfn first. This patch makes sure that the gfn will be unaliased and add gfn_to_memslot_unaliased() to save the calculating of the gfn unaliasing in case we have it unaliased already. Signed-off-by: Izik Eidus <ieidus@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r--arch/x86/include/asm/kvm_host.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 09e6c56572cb..99e3cc149d21 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -617,6 +617,8 @@ void kvm_disable_tdp(void);
617int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3); 617int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3);
618int complete_pio(struct kvm_vcpu *vcpu); 618int complete_pio(struct kvm_vcpu *vcpu);
619 619
620struct kvm_memory_slot *gfn_to_memslot_unaliased(struct kvm *kvm, gfn_t gfn);
621
620static inline struct kvm_mmu_page *page_header(hpa_t shadow_page) 622static inline struct kvm_mmu_page *page_header(hpa_t shadow_page)
621{ 623{
622 struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT); 624 struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT);