summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/mmu_audit.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-04-08 16:39:23 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-05 18:26:36 +0300
commit54bf36aac520315385fe7623a5c3a698e993ceda (patch)
treee2885af8aa45f6053d8df9c06a8fb4010a4df338 /arch/x86/kvm/mmu_audit.c
parente4cd1da944ed9d2acd2e4ccabf61ec443735f6db (diff)
downloadlinux-54bf36aac520315385fe7623a5c3a698e993ceda.tar.xz
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>
Diffstat (limited to 'arch/x86/kvm/mmu_audit.c')
-rw-r--r--arch/x86/kvm/mmu_audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu_audit.c b/arch/x86/kvm/mmu_audit.c
index 9d99f17aa3be..78288c15400c 100644
--- a/arch/x86/kvm/mmu_audit.c
+++ b/arch/x86/kvm/mmu_audit.c
@@ -114,7 +114,7 @@ static void audit_mappings(struct kvm_vcpu *vcpu, u64 *sptep, int level)
return;
gfn = kvm_mmu_page_get_gfn(sp, sptep - sp->spt);
- pfn = gfn_to_pfn_atomic(vcpu->kvm, gfn);
+ pfn = kvm_vcpu_gfn_to_pfn_atomic(vcpu, gfn);
if (is_error_pfn(pfn))
return;