Re: [PATCH 2/2] KVM: TDX: Remove redundant definitions of TDX_TD_ATTR_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/8/2025 10:44 PM, Sean Christopherson wrote:
On Tue, Jul 08, 2025, Rick P Edgecombe wrote:
On Tue, 2025-07-08 at 07:03 -0700, Sean Christopherson wrote:
diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c
index c539c2e6109f..efb7d589b672 100644
--- a/arch/x86/kvm/vmx/tdx.c
+++ b/arch/x86/kvm/vmx/tdx.c
@@ -62,7 +62,7 @@ void tdh_vp_wr_failed(struct vcpu_tdx *tdx, char *uclass,
char *op, u32 field,
   	pr_err("TDH_VP_WR[%s.0x%x]%s0x%llx failed: 0x%llx\n", uclass,
field, op, val, err);
   }
-#define KVM_SUPPORTED_TD_ATTRS (TDX_TD_ATTR_SEPT_VE_DISABLE)
+#define KVM_SUPPORTED_TD_ATTRS (TDX_ATTR_SEPT_VE_DISABLE)

Would it make sense to rename KVM_SUPPORTED_TD_ATTRS to
KVM_SUPPORTED_TDX_ATTRS?
The names from common code lack the TD qualifier, and I think it'd be helpful
for
readers to have have TDX in the name (even though I agree "TD" is more
precise).

It's useful to know that these are per-TD attributes and not per-TDX module.
Especially for TDX_TD_ATTR_DEBUG. I kind of prefer the KVM naming scheme that is
removed in this patch.

Heh, as does Xiaoyao, and me too.  I thought I was just being nitpicky :-)

Though in that case, I think I'd prefer KVM_SUPPORTED_TDX_TD_ATTRS.

To me, since the MACRO is only used inside kvm/vmx/tdx.c, it's OK without the _TDX_ prefix.

However, doing the rename is simple. So I'm going to rename it in a separate patch in the v2 unless being told unnecessary.






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux