]> git.baikalelectronics.ru Git - kernel.git/commit
KVM/nVMX: Use kvm_vcpu_map when mapping the virtual APIC page
authorKarimAllah Ahmed <karahmed@amazon.de>
Thu, 31 Jan 2019 20:24:37 +0000 (21:24 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Apr 2019 19:36:43 +0000 (21:36 +0200)
commit0e4953a316a6c4d2f9f33db86689fa2f22971a94
tree901eefcf5fd2318de93005d4e0c6eb9b5112ab72
parent4eb72a36f58357d29e6d34ebe461b281bfdd5601
KVM/nVMX: Use kvm_vcpu_map when mapping the virtual APIC page

Use kvm_vcpu_map when mapping the virtual APIC page since using
kvm_vcpu_gpa_to_page() and kmap() will only work for guest memory that has
a "struct page".

One additional semantic change is that the virtual host mapping lifecycle
has changed a bit. It now has the same lifetime of the pinning of the
virtual APIC page on the host side.

Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h