diff options
author | Izik Eidus <ieidus@redhat.com> | 2008-10-03 17:40:32 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 16:51:50 +0200 |
commit | 2843099fee32a6020e1caa95c6026f28b5d43bff (patch) | |
tree | 774ddfeec4091adddf9bd9ce938648dad14c378e /arch/x86/include | |
parent | 6eb55818c043b097c83828da8430fcb9a02fdb89 (diff) | |
download | blackbird-op-linux-2843099fee32a6020e1caa95c6026f28b5d43bff.tar.gz blackbird-op-linux-2843099fee32a6020e1caa95c6026f28b5d43bff.zip |
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')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 2 |
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); int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3); int complete_pio(struct kvm_vcpu *vcpu); +struct kvm_memory_slot *gfn_to_memslot_unaliased(struct kvm *kvm, gfn_t gfn); + static inline struct kvm_mmu_page *page_header(hpa_t shadow_page) { struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT); |