]> www.infradead.org Git - nvme.git/commit
KVM: remove kvm_arch_gmem_prepare_needed()
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jul 2024 22:27:51 +0000 (18:27 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Jul 2024 18:46:14 +0000 (14:46 -0400)
commit7239ed74677af143857d1a96d402476446a0995a
tree25c69a9ee44d04997f94392f85a53eecc5adaf21
parent6dd761d92f6600342860c618639489bb9c3843ea
KVM: remove kvm_arch_gmem_prepare_needed()

It is enough to return 0 if a guest need not do any preparation.
This is in fact how sev_gmem_prepare() works for non-SNP guests,
and it extends naturally to Intel hosts: the x86 callback for
gmem_prepare is optional and returns 0 if not defined.

Reviewed-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/guest_memfd.c