OSDN Git Service

KVM: nVMX: Plumb L2 GPA through to PML emulation
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 22 Jun 2020 21:58:29 +0000 (14:58 -0700)
committerSasha Levin <sashal@kernel.org>
Wed, 1 Jul 2020 03:17:16 +0000 (23:17 -0400)
commitcf6a8b2071802ad8786598667fcc650e6f46ade1
treea00e515c0205de6e226a72bcd465cce9ecff8eed
parent2e7412293c4fd37048dfcd5c3356a3710d0b5e46
KVM: nVMX: Plumb L2 GPA through to PML emulation

commit 2dbebf7ae1ed9a420d954305e2c9d5ed39ec57c3 upstream.

Explicitly pass the L2 GPA to kvm_arch_write_log_dirty(), which for all
intents and purposes is vmx_write_pml_buffer(), instead of having the
latter pull the GPA from vmcs.GUEST_PHYSICAL_ADDRESS.  If the dirty bit
update is the result of KVM emulation (rare for L2), then the GPA in the
VMCS may be stale and/or hold a completely unrelated GPA.

Fixes: c5f983f6e8455 ("nVMX: Implement emulated Page Modification Logging")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200622215832.22090-2-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/mmu.h
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/vmx.c