[PATCH v3 0/4] TDX: Clean up the definitions of TDX TD ATTRIBUTES

Xiaoyao Li posted 4 patches 2 months, 3 weeks ago
arch/x86/coco/tdx/debug.c         | 26 ++++++++--------
arch/x86/coco/tdx/tdx.c           |  8 ++---
arch/x86/include/asm/shared/tdx.h | 50 +++++++++++++++----------------
arch/x86/kvm/vmx/tdx.c            |  4 +--
arch/x86/kvm/vmx/tdx_arch.h       |  6 ----
5 files changed, 44 insertions(+), 50 deletions(-)
[PATCH v3 0/4] TDX: Clean up the definitions of TDX TD ATTRIBUTES
Posted by Xiaoyao Li 2 months, 3 weeks ago
The main purpose of this series was to remove redundant macros between
core TDX and KVM, along with a typo fix. They were implemented as patch1
and patch2.

During the review of v1 and v2, there was encouragement to refine the
names of the macros related to TD attributes to clarify their scope.
Thus patch3 and patch 4 are added.

Discussion details can be found in previrous versions.


Changes in v3:
 - use the changelog provided by Rick for patch 1;
 - collect Reviewed-by on patch 4;
 - Add patch 3;

v2: https://lore.kernel.org/all/20250711132620.262334-1-xiaoyao.li@intel.com/
Changes in v2:
 - collect Reviewed-by;
 - Explains the impact of the change in patch 1 changelog;
 - Add patch 3.

v1: https://lore.kernel.org/all/20250708080314.43081-1-xiaoyao.li@intel.com/ 

Xiaoyao Li (4):
  x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE
  KVM: TDX: Remove redundant definitions of TDX_TD_ATTR_*
  x86/tdx: Rename TDX_ATTR_* to TDX_TD_ATTR_*
  KVM: TDX: Rename KVM_SUPPORTED_TD_ATTRS to KVM_SUPPORTED_TDX_TD_ATTRS

 arch/x86/coco/tdx/debug.c         | 26 ++++++++--------
 arch/x86/coco/tdx/tdx.c           |  8 ++---
 arch/x86/include/asm/shared/tdx.h | 50 +++++++++++++++----------------
 arch/x86/kvm/vmx/tdx.c            |  4 +--
 arch/x86/kvm/vmx/tdx_arch.h       |  6 ----
 5 files changed, 44 insertions(+), 50 deletions(-)

-- 
2.43.0
Re: [PATCH v3 0/4] TDX: Clean up the definitions of TDX TD ATTRIBUTES
Posted by Xiaoyao Li 3 weeks, 3 days ago
Dear tip/tdx maintainers,

Kindly ping on this series.

It got Acked-by from KVM maintainer and Reviewed-by from other folks. 
There is one comment from Binbin on tdx_attributes[]. What's your 
preference on it? Would you consider applying this series and leave that 
comment to a separate patch or expect a next version of this series with 
that comment addressed?

On 7/15/2025 5:13 PM, Xiaoyao Li wrote:
> The main purpose of this series was to remove redundant macros between
> core TDX and KVM, along with a typo fix. They were implemented as patch1
> and patch2.
>
> During the review of v1 and v2, there was encouragement to refine the
> names of the macros related to TD attributes to clarify their scope.
> Thus patch3 and patch 4 are added. 
> Discussion details can be found in previrous versions.
> 
> 
> Changes in v3:
>   - use the changelog provided by Rick for patch 1;
>   - collect Reviewed-by on patch 4;
>   - Add patch 3;
> 
> v2: https://lore.kernel.org/all/20250711132620.262334-1-xiaoyao.li@intel.com/
> Changes in v2:
>   - collect Reviewed-by;
>   - Explains the impact of the change in patch 1 changelog;
>   - Add patch 3.
> 
> v1: https://lore.kernel.org/all/20250708080314.43081-1-xiaoyao.li@intel.com/
> 
> Xiaoyao Li (4):
>    x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE
>    KVM: TDX: Remove redundant definitions of TDX_TD_ATTR_*
>    x86/tdx: Rename TDX_ATTR_* to TDX_TD_ATTR_*
>    KVM: TDX: Rename KVM_SUPPORTED_TD_ATTRS to KVM_SUPPORTED_TDX_TD_ATTRS
> 
>   arch/x86/coco/tdx/debug.c         | 26 ++++++++--------
>   arch/x86/coco/tdx/tdx.c           |  8 ++---
>   arch/x86/include/asm/shared/tdx.h | 50 +++++++++++++++----------------
>   arch/x86/kvm/vmx/tdx.c            |  4 +--
>   arch/x86/kvm/vmx/tdx_arch.h       |  6 ----
>   5 files changed, 44 insertions(+), 50 deletions(-)
>
Re: [PATCH v3 0/4] TDX: Clean up the definitions of TDX TD ATTRIBUTES
Posted by Sean Christopherson 2 months, 3 weeks ago
On Tue, Jul 15, 2025, Xiaoyao Li wrote:
> Xiaoyao Li (4):
>   x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE
>   KVM: TDX: Remove redundant definitions of TDX_TD_ATTR_*
>   x86/tdx: Rename TDX_ATTR_* to TDX_TD_ATTR_*
>   KVM: TDX: Rename KVM_SUPPORTED_TD_ATTRS to KVM_SUPPORTED_TDX_TD_ATTRS
> 
>  arch/x86/coco/tdx/debug.c         | 26 ++++++++--------
>  arch/x86/coco/tdx/tdx.c           |  8 ++---
>  arch/x86/include/asm/shared/tdx.h | 50 +++++++++++++++----------------
>  arch/x86/kvm/vmx/tdx.c            |  4 +--
>  arch/x86/kvm/vmx/tdx_arch.h       |  6 ----
>  5 files changed, 44 insertions(+), 50 deletions(-)

Acked-by: Sean Christopherson <seanjc@google.com>
Re: [PATCH v3 0/4] TDX: Clean up the definitions of TDX TD ATTRIBUTES
Posted by Edgecombe, Rick P 2 months, 3 weeks ago
On Tue, 2025-07-15 at 08:10 -0700, Sean Christopherson wrote:
> Acked-by: Sean Christopherson <seanjc@google.com>

LGTM too. I guess we have what we need to try to send this through the tip tree.
How about that for a plan? We can wait a few days and see if Dave swings by.