mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Sean Christopherson <seanjc@google.com>,
	Rick P Edgecombe <rick.p.edgecombe@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	Kai Huang <kai.huang@intel.com>,
	Yan Y Zhao <yan.y.zhao@intel.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Reinette Chatre <reinette.chatre@intel.com>,
	"binbin.wu@linux.intel.com" <binbin.wu@linux.intel.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"hpa@zytor.com" <hpa@zytor.com>,
	Tony Lindgren <tony.lindgren@intel.com>,
	"bp@alien8.de" <bp@alien8.de>, "x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH 2/2] KVM: TDX: Remove redundant definitions of TDX_TD_ATTR_*
Date: Wed, 9 Jul 2025 08:43:06 +0800	[thread overview]
Message-ID: <bb43278f-a636-4876-b75b-d912a233b296@intel.com> (raw)
In-Reply-To: <aG0uyLwxqfKSX72s@google.com>

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.



      reply	other threads:[~2025-07-09  0:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08  8:03 [PATCH 0/2] TDX: Clean up the definitions of TDX ATTRIBUTES Xiaoyao Li
2025-07-08  8:03 ` [PATCH 1/2] x86/tdx: Fix the typo of TDX_ATTR_MIGRTABLE Xiaoyao Li
2025-07-08 11:03   ` Huang, Kai
2025-07-08 14:20   ` Edgecombe, Rick P
2025-07-09  3:32     ` Xiaoyao Li
2025-07-08  8:03 ` [PATCH 2/2] KVM: TDX: Remove redundant definitions of TDX_TD_ATTR_* Xiaoyao Li
2025-07-08 11:05   ` Huang, Kai
2025-07-08 14:03   ` Sean Christopherson
2025-07-08 14:28     ` Xiaoyao Li
2025-07-08 14:29     ` Edgecombe, Rick P
2025-07-08 14:44       ` Sean Christopherson
2025-07-09  0:43         ` Xiaoyao Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb43278f-a636-4876-b75b-d912a233b296@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=binbin.wu@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=isaku.yamahata@intel.com \
    --cc=kai.huang@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=reinette.chatre@intel.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=tony.lindgren@intel.com \
    --cc=x86@kernel.org \
    --cc=yan.y.zhao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®