]> Gentwo Git Trees - linux/.git/commit
KVM: x86: Enable KVM_GUEST_MEMFD for all 64-bit builds
authorFuad Tabba <tabba@google.com>
Tue, 29 Jul 2025 22:54:40 +0000 (15:54 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 27 Aug 2025 08:35:00 +0000 (04:35 -0400)
commitd1e54dd08f163a9021433020d16a8f8f70ddc41c
tree354eef627da1c97d9b76ff5e31a97b707d588bdc
parent68d189938709a5918d7308eb922c30bcbf16ebb9
KVM: x86: Enable KVM_GUEST_MEMFD for all 64-bit builds

Enable KVM_GUEST_MEMFD for all KVM x86 64-bit builds, i.e. for "default"
VM types when running on 64-bit KVM.  This will allow using guest_memfd
to back non-private memory for all VM shapes, by supporting mmap() on
guest_memfd.

Opportunistically clean up various conditionals that become tautologies
once x86 selects KVM_GUEST_MEMFD more broadly.  Specifically, because
SW protected VMs, SEV, and TDX are all 64-bit only, private memory no
longer needs to take explicit dependencies on KVM_GUEST_MEMFD, because
it is effectively a prerequisite.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20250729225455.670324-10-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/Kconfig
include/linux/kvm_host.h
virt/kvm/kvm_main.c