]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Allow NULL @vcpu in kvm_mmu_find_shadow_page()
authorDavid Matlack <dmatlack@google.com>
Wed, 22 Jun 2022 19:27:00 +0000 (15:27 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jun 2022 08:51:57 +0000 (04:51 -0400)
commitdc8b905fbef81859bf5d0e9339dfdcf0e7f61933
tree7e0ee391a5d05555950ce9466b3fb40846b479c6
parent2e96d87e918d448af3fb4f4b95c80c6423ca50ad
KVM: x86/mmu: Allow NULL @vcpu in kvm_mmu_find_shadow_page()

Allow @vcpu to be NULL in kvm_mmu_find_shadow_page() (and its only
caller __kvm_mmu_get_shadow_page()). @vcpu is only required to sync
indirect shadow pages, so it's safe to pass in NULL when looking up
direct shadow pages.

This will be used for doing eager page splitting, which allocates direct
shadow pages from the context of a VM ioctl without access to a vCPU
pointer.

Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220516232138.1783324-14-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c