Re: [PATCH 2/3] KVM: x86: leave the legacy private attribute in for TDX and SEV
From: Ackerley Tng
Date: Wed Oct 21 2026 - 08:57:37 EST
Paolo Bonzini <pbonzini@xxxxxxxxxx> writes:
> As of today, and presumably as of Linux 7.4's release date, there
> is hardly any VMM that supports guest_memfd attributes. Support the
> legacy VM attribute for private memory if SEV or TDX are requested;
> default it to disabled if only the software-protected VM is requested,
> since it is only used by guest_memfd selftests.
>
> While in-place conversion is the best option, it is way too
> early to enable it by default.
>
Reviewed-by: Ackerley Tng <ackerleytng@xxxxxxxxxx>
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> ---
> arch/x86/kvm/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
> index 01a683a9042a..4f7d75ec8c40 100644
> --- a/arch/x86/kvm/Kconfig
> +++ b/arch/x86/kvm/Kconfig
> @@ -80,6 +80,7 @@ config KVM_PRIVATE_MEMATTR_VM
> bool "Enable per-VM PRIVATE vs. SHARED attributes (for CoCo VMs)"
> depends on KVM_SW_PROTECTED_VM || KVM_INTEL_TDX || KVM_AMD_SEV
> select KVM_VM_MEMORY_ATTRIBUTES
> + default KVM_INTEL_TDX || KVM_AMD_SEV
> help
> Enable support for tracking PRIVATE vs. SHARED memory using per-VM
> memory attributes. Using per-VM attributes is deprecated in favor of
> @@ -87,7 +88,7 @@ config KVM_PRIVATE_MEMATTR_VM
> CoCo VMs using a VMM that doesn't support guest_memfd memory
> attributes.
>
> - If unsure, say N.
> + If unsure, say "Y".
>
> config KVM_SW_PROTECTED_VM
> bool "Enable support for KVM software-protected VMs"
> --
> 2.52.0