]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
KVM: x86: Subsume nested GPA read helper into load_pdptrs()
authorSean Christopherson <seanjc@google.com>
Tue, 31 Aug 2021 16:42:23 +0000 (09:42 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Sep 2021 08:27:05 +0000 (04:27 -0400)
commit15cabbc259f254e7e3fe0243dfd9dfc9aeb85c06
tree662914264cee197a597b729f052b97573de7c4b1
parenta1c42ddedf35dbf5f25ea0982ed6e226eef7a78c
KVM: x86: Subsume nested GPA read helper into load_pdptrs()

Open code the call to mmu->translate_gpa() when loading nested PDPTRs and
kill off the existing helper, kvm_read_guest_page_mmu(), to discourage
incorrect use.  Reading guest memory straight from an L2 GPA is extremely
rare (as evidenced by the lack of users), as very few constructs in x86
specify physical addresses, even fewer are virtualized by KVM, and even
fewer yet require emulation of L2 by L0 KVM.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210831164224.1119728-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c