[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34241d74a74f034360022bf0ca5284a9462ce4ed.camel@intel.com>
Date: Fri, 1 Nov 2024 16:03:13 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "pbonzini@...hat.com" <pbonzini@...hat.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, "binbin.wu@...ux.intel.com" <binbin.wu@...ux.intel.com>
CC: "Huang, Kai" <kai.huang@...el.com>, "Li, Xiaoyao" <xiaoyao.li@...el.com>,
"isaku.yamahata@...il.com" <isaku.yamahata@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tony.lindgren@...ux.intel.com" <tony.lindgren@...ux.intel.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "Zhao, Yan Y"
<yan.y.zhao@...el.com>, "Chatre, Reinette" <reinette.chatre@...el.com>
Subject: Re: [PATCH v2 24/25] KVM: x86: Introduce KVM_TDX_GET_CPUID
On Fri, 2024-11-01 at 14:39 +0800, Binbin Wu wrote:
> > +static int tdx_read_cpuid(struct kvm_vcpu *vcpu, u32 leaf, u32 sub_leaf,
> > + bool sub_leaf_set, struct kvm_cpuid_entry2 *out)
> > +{
> > + struct kvm_tdx *kvm_tdx = to_kvm_tdx(vcpu->kvm);
> > + u64 field_id = TD_MD_FIELD_ID_CPUID_VALUES;
> > + u64 ebx_eax, edx_ecx;
> > + u64 err = 0;
> > +
> > + if (sub_leaf & TDX_MD_UNREADABLE_LEAF_MASK ||
> > + sub_leaf_set & TDX_MD_UNREADABLE_SUBLEAF_MASK)
> > + return -EINVAL;
> It looks weird.
> Should be the following?
>
> + if (leaf & TDX_MD_UNREADABLE_LEAF_MASK ||
> + sub_leaf & TDX_MD_UNREADABLE_SUBLEAF_MASK)
> + return -EINVAL;
>
Yes, nice catch.
Powered by blists - more mailing lists