KVM: x86/mmu: Restrict KVM_SW_PROTECTED_VM to the TDP MMU
authorSean Christopherson <seanjc@google.com>
Thu, 22 Feb 2024 19:06:10 +0000 (11:06 -0800)
committerSean Christopherson <seanjc@google.com>
Fri, 23 Feb 2024 01:07:06 +0000 (17:07 -0800)
commita1176ef5c92aa58e63ecf184b7cac2e311b2b233
treec04e9fed80c9dde7b8137f8d8bb24d6628cf6ff3
parent422692098c4c53a6b65c2ef235621aee6a38721f
KVM: x86/mmu: Restrict KVM_SW_PROTECTED_VM to the TDP MMU

Advertise and support software-protected VMs if and only if the TDP MMU is
enabled, i.e. disallow KVM_SW_PROTECTED_VM if TDP is enabled for KVM's
legacy/shadow MMU.  TDP support for the shadow MMU is maintenance-only,
e.g. support for TDX and SNP will also be restricted to the TDP MMU.

Fixes: 89ea60c2c7b5 ("KVM: x86: Add support for "protected VMs" that can utilize private memory")
Link: https://lore.kernel.org/r/20240222190612.2942589-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c