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] [day] [month] [year] [list]
Message-ID: <f99739cce216404680c60456504d7ed3@huawei.com>
Date: Tue, 11 Feb 2025 20:46:15 +0000
From: Shiju Jose <shiju.jose@...wei.com>
To: Dave Jiang <dave.jiang@...el.com>, "linux-edac@...r.kernel.org"
	<linux-edac@...r.kernel.org>, "linux-cxl@...r.kernel.org"
	<linux-cxl@...r.kernel.org>, "linux-acpi@...r.kernel.org"
	<linux-acpi@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>, "bp@...en8.de"
	<bp@...en8.de>, "tony.luck@...el.com" <tony.luck@...el.com>,
	"rafael@...nel.org" <rafael@...nel.org>, "lenb@...nel.org" <lenb@...nel.org>,
	"mchehab@...nel.org" <mchehab@...nel.org>, "dan.j.williams@...el.com"
	<dan.j.williams@...el.com>, "dave@...olabs.net" <dave@...olabs.net>,
	"Jonathan Cameron" <jonathan.cameron@...wei.com>,
	"alison.schofield@...el.com" <alison.schofield@...el.com>,
	"vishal.l.verma@...el.com" <vishal.l.verma@...el.com>, "ira.weiny@...el.com"
	<ira.weiny@...el.com>, "david@...hat.com" <david@...hat.com>,
	"Vilas.Sridharan@....com" <Vilas.Sridharan@....com>, "leo.duran@....com"
	<leo.duran@....com>, "Yazen.Ghannam@....com" <Yazen.Ghannam@....com>,
	"rientjes@...gle.com" <rientjes@...gle.com>, "jiaqiyan@...gle.com"
	<jiaqiyan@...gle.com>, "Jon.Grimm@....com" <Jon.Grimm@....com>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
	"naoya.horiguchi@....com" <naoya.horiguchi@....com>, "james.morse@....com"
	<james.morse@....com>, "jthoughton@...gle.com" <jthoughton@...gle.com>,
	"somasundaram.a@....com" <somasundaram.a@....com>, "erdemaktas@...gle.com"
	<erdemaktas@...gle.com>, "pgonda@...gle.com" <pgonda@...gle.com>,
	"duenwen@...gle.com" <duenwen@...gle.com>, "gthelen@...gle.com"
	<gthelen@...gle.com>, "wschwartz@...erecomputing.com"
	<wschwartz@...erecomputing.com>, "dferguson@...erecomputing.com"
	<dferguson@...erecomputing.com>, "wbs@...amperecomputing.com"
	<wbs@...amperecomputing.com>, "nifan.cxl@...il.com" <nifan.cxl@...il.com>,
	tanxiaofei <tanxiaofei@...wei.com>, "Zengtao (B)" <prime.zeng@...ilicon.com>,
	"Roberto Sassu" <roberto.sassu@...wei.com>, "kangkang.shen@...urewei.com"
	<kangkang.shen@...urewei.com>, wanghuiqiang <wanghuiqiang@...wei.com>,
	Linuxarm <linuxarm@...wei.com>
Subject: RE: [PATCH v19 07/15] cxl: Add helper function to retrieve a feature
 entry

>-----Original Message-----
>From: Dave Jiang <dave.jiang@...el.com>
>Sent: 11 February 2025 02:40
>To: Shiju Jose <shiju.jose@...wei.com>; linux-edac@...r.kernel.org; linux-
>cxl@...r.kernel.org; linux-acpi@...r.kernel.org; linux-mm@...ck.org; linux-
>kernel@...r.kernel.org
>Cc: linux-doc@...r.kernel.org; bp@...en8.de; tony.luck@...el.com;
>rafael@...nel.org; lenb@...nel.org; mchehab@...nel.org;
>dan.j.williams@...el.com; dave@...olabs.net; Jonathan Cameron
><jonathan.cameron@...wei.com>; alison.schofield@...el.com;
>vishal.l.verma@...el.com; ira.weiny@...el.com; david@...hat.com;
>Vilas.Sridharan@....com; leo.duran@....com; Yazen.Ghannam@....com;
>rientjes@...gle.com; jiaqiyan@...gle.com; Jon.Grimm@....com;
>dave.hansen@...ux.intel.com; naoya.horiguchi@....com;
>james.morse@....com; jthoughton@...gle.com; somasundaram.a@....com;
>erdemaktas@...gle.com; pgonda@...gle.com; duenwen@...gle.com;
>gthelen@...gle.com; wschwartz@...erecomputing.com;
>dferguson@...erecomputing.com; wbs@...amperecomputing.com;
>nifan.cxl@...il.com; tanxiaofei <tanxiaofei@...wei.com>; Zengtao (B)
><prime.zeng@...ilicon.com>; Roberto Sassu <roberto.sassu@...wei.com>;
>kangkang.shen@...urewei.com; wanghuiqiang <wanghuiqiang@...wei.com>;
>Linuxarm <linuxarm@...wei.com>
>Subject: Re: [PATCH v19 07/15] cxl: Add helper function to retrieve a feature
>entry
>
>
>
>On 2/7/25 7:44 AM, shiju.jose@...wei.com wrote:
>> From: Shiju Jose <shiju.jose@...wei.com>
>>
>> Add helper function to retrieve a feature entry from the supported
>> features list, if supported.
>>
>> Signed-off-by: Shiju Jose <shiju.jose@...wei.com>
>> ---
>>  drivers/cxl/core/features.c | 21 +++++++++++++++++++++
>>  include/cxl/features.h      |  2 ++
>>  2 files changed, 23 insertions(+)
>>
>> diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
>> index 5f64185a5c7a..bf175e69cda1 100644
>> --- a/drivers/cxl/core/features.c
>> +++ b/drivers/cxl/core/features.c
>> @@ -43,6 +43,27 @@ bool is_cxl_feature_exclusive(struct cxl_feat_entry
>> *entry)  }  EXPORT_SYMBOL_NS_GPL(is_cxl_feature_exclusive, "CXL");
>>
>> +struct cxl_feat_entry *cxl_get_feature_entry(struct cxl_memdev *cxlmd,
>> +					     const uuid_t *feat_uuid)
>> +{
>> +	struct cxl_features_state *cxlfs = cxlmd->cxlfs;
>> +	struct cxl_feat_entry *feat_entry;
>> +	int count;
>> +
>> +	/*
>> +	 * Retrieve the feature entry from the supported features list,
>> +	 * if the feature is supported.
>> +	 */
>> +	feat_entry = cxlfs->entries;
>> +	for (count = 0; count < cxlfs->num_features; count++, feat_entry++) {
>> +		if (uuid_equal(&feat_entry->uuid, feat_uuid))
>> +			return feat_entry;
>> +	}
>> +
>> +	return ERR_PTR(-ENOENT);
>> +}
>> +EXPORT_SYMBOL_NS_GPL(cxl_get_feature_entry, "CXL");
>
>You probably don't need this if the memfeature code are in CXL core.

Hi Dave,

You are right. At present, EXPORT_SYMBOL_NS_GPL(cxl_get_feature_entry)  is not required.

>
>DJ
>
>> +
>>  size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
>>  		       enum cxl_get_feat_selection selection,
>>  		       void *feat_out, size_t feat_out_size, u16 offset, diff --git
>> a/include/cxl/features.h b/include/cxl/features.h index
>> e52d0573f504..563d966beee5 100644
>> --- a/include/cxl/features.h
>> +++ b/include/cxl/features.h
>> @@ -68,6 +68,8 @@ struct cxl_features_state {  };
>>
>>  struct cxl_mailbox;
>> +struct cxl_feat_entry *cxl_get_feature_entry(struct cxl_memdev *cxlmd,
>> +					     const uuid_t *feat_uuid);
>>  size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
>>  		       enum cxl_get_feat_selection selection,
>>  		       void *feat_out, size_t feat_out_size, u16 offset,
>
>

Thanks,
Shiju

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ