KVM: x86: use vcpu-specific functions to read/write/translate GFNs
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Apr 2015 13:39:23 +0000 (15:39 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Jun 2015 15:26:36 +0000 (17:26 +0200)
commit54bf36aac520315385fe7623a5c3a698e993ceda
treee2885af8aa45f6053d8df9c06a8fb4010a4df338
parente4cd1da944ed9d2acd2e4ccabf61ec443735f6db
KVM: x86: use vcpu-specific functions to read/write/translate GFNs

We need to hide SMRAM from guests not running in SMM.  Therefore,
all uses of kvm_read_guest* and kvm_write_guest* must be changed to
check whether the VCPU is in system management mode and use a
different set of memslots.  Switch from kvm_* to the newly-introduced
kvm_vcpu_*, which call into kvm_arch_vcpu_memslots_id.

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/mmu_audit.c
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c