lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb43278f-a636-4876-b75b-d912a233b296@intel.com>
Date: Wed, 9 Jul 2025 08:43:06 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: Sean Christopherson <seanjc@...gle.com>,
 Rick P Edgecombe <rick.p.edgecombe@...el.com>
Cc: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
 "linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>,
 Kai Huang <kai.huang@...el.com>, Yan Y Zhao <yan.y.zhao@...el.com>,
 "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
 Adrian Hunter <adrian.hunter@...el.com>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 Reinette Chatre <reinette.chatre@...el.com>,
 "binbin.wu@...ux.intel.com" <binbin.wu@...ux.intel.com>,
 "pbonzini@...hat.com" <pbonzini@...hat.com>,
 "mingo@...hat.com" <mingo@...hat.com>,
 Isaku Yamahata <isaku.yamahata@...el.com>,
 "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
 "tglx@...utronix.de" <tglx@...utronix.de>, "hpa@...or.com" <hpa@...or.com>,
 Tony Lindgren <tony.lindgren@...el.com>, "bp@...en8.de" <bp@...en8.de>,
 "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH 2/2] KVM: TDX: Remove redundant definitions of
 TDX_TD_ATTR_*

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.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ