Re: [PATCH v4 05/15] KVM: SEV: publish supported VMSA features
From: Isaku Yamahata
Date: Mon Mar 25 2024 - 19:59:32 EST
On Mon, Mar 18, 2024 at 07:33:42PM -0400,
Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> Compute the set of features to be stored in the VMSA when KVM is
> initialized; move it from there into kvm_sev_info when SEV is initialized,
> and then into the initial VMSA.
>
> The new variable can then be used to return the set of supported features
> to userspace, via the KVM_GET_DEVICE_ATTR ioctl.
Hi. The current TDX KVM introduces KVM_TDX_CAPABILITIES and struct
kvm_tdx_capabilities for feature enumeration. I'm wondering if TDX should also
use/switch to KVM_GET_DEVICE_ATTR with its own group. What do you think?
Something like
#define KVM_DEVICE_ATTR_GROUP_SEV 1
#define KVM_X86_SEV_VMSA_FEATURES 1
#define KVM_X86_SEV_xxx ...
#define KVM_DEVICE_ATTR_GROUP_TDX 2
#define KVM_X86_TDX_xxx ...
Thanks,
--
Isaku Yamahata <isaku.yamahata@xxxxxxxxx>