[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b47e8622-ea5d-47b2-97b5-02216bf6989a@intel.com>
Date: Thu, 31 Oct 2024 22:27:11 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: Tony Lindgren <tony.lindgren@...ux.intel.com>
Cc: Binbin Wu <binbin.wu@...ux.intel.com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>, pbonzini@...hat.com,
seanjc@...gle.com, yan.y.zhao@...el.com, isaku.yamahata@...il.com,
kai.huang@...el.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
reinette.chatre@...el.com, Isaku Yamahata <isaku.yamahata@...el.com>
Subject: Re: [PATCH v2 16/25] KVM: TDX: Get system-wide info about TDX module
on initialization
On 10/31/2024 5:37 PM, Tony Lindgren wrote:
> On Thu, Oct 31, 2024 at 05:23:57PM +0800, Xiaoyao Li wrote:
>> here it is to initialize the configurable CPUID bits that get reported to
>> userspace. Though TDX module doesn't allow them to be set in TD_PARAM for
>> KVM_TDX_INIT_VM, they get set to 0xff because KVM reuse these bits
>> EBX[23:16] as the interface for userspace to configure GPAW of TD guest
>> (implemented in setup_tdparams_eptp_controls() in patch 19). That's why they
>> need to be set as all-1 to allow userspace to configure.
>>
>> And the comment above it is wrong and vague. we need to change it to
>> something like
>>
>> /*
>> * Though TDX module doesn't allow the configuration of guest
>> * phys addr bits (EBX[23:16]), KVM uses it as the interface for
>> * userspace to configure the GPAW. So need to report these bits
>> * as configurable to userspace.
>> */
>
> That sounds good to me.
>
> Hmm so care to check if we can also just leave out another "old module"
> comment in tdx_read_cpuid()?
That one did relate to old module, the module that without
TDX_CONFIG_FLAGS_MAXGPA_VIRT reported in tdx_feature0.
I will sent an follow up patch to complement the handling if TDX module
supports TDX_CONFIG_FLAGS_MAXGPA_VIRT.
> Regards,
>
> Tony
Powered by blists - more mailing lists