Re: [PATCH v19 038/130] KVM: TDX: create/destroy VM structure

From: Binbin Wu
Date: Fri Mar 29 2024 - 02:22:38 EST




On 3/21/2024 10:17 PM, Isaku Yamahata wrote:
On Wed, Mar 20, 2024 at 01:12:01PM +0800,
Chao Gao <chao.gao@xxxxxxxxx> wrote:

config KVM_SW_PROTECTED_VM
bool "Enable support for KVM software-protected VMs"
- depends on EXPERT

This change is not needed, right?
Since you intended to use KVM_GENERIC_PRIVATE_MEM, not KVM_SW_PROTECTED_VM.

depends on KVM && X86_64
select KVM_GENERIC_PRIVATE_MEM
help
@@ -89,6 +88,8 @@ config KVM_SW_PROTECTED_VM
config KVM_INTEL
tristate "KVM for Intel (and compatible) processors support"
depends on KVM && IA32_FEAT_CTL
+ select KVM_SW_PROTECTED_VM if INTEL_TDX_HOST
why does INTEL_TDX_HOST select KVM_SW_PROTECTED_VM?
I wanted KVM_GENERIC_PRIVATE_MEM. Ah, we should do

select KKVM_GENERIC_PRIVATE_MEM if INTEL_TDX_HOST


+ select KVM_GENERIC_MEMORY_ATTRIBUTES if INTEL_TDX_HOST
help
.vcpu_precreate = vmx_vcpu_precreate,
.vcpu_create = vmx_vcpu_create,

[...]