[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZyNP82ApuQQeNGJ3@tlindgre-MOBL1>
Date: Thu, 31 Oct 2024 11:37:55 +0200
From: Tony Lindgren <tony.lindgren@...ux.intel.com>
To: Xiaoyao Li <xiaoyao.li@...el.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 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()?
Regards,
Tony
Powered by blists - more mailing lists