* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-28 23:26 ` Dan Williams
@ 2025-03-28 23:58 ` Paul E. McKenney
2025-03-29 0:23 ` Dan Williams
2025-03-29 0:26 ` Dave Jiang
2025-04-05 17:34 ` Palmer Dabbelt
2 siblings, 1 reply; 27+ messages in thread
From: Paul E. McKenney @ 2025-03-28 23:58 UTC (permalink / raw)
To: Dan Williams
Cc: Dave Jiang, linux-cxl, dave, jonathan.cameron, alison.schofield,
vishal.l.verma, ira.weiny, gourry, linux-kernel, linux-next, sfr
On Fri, Mar 28, 2025 at 04:26:21PM -0700, Dan Williams wrote:
> Paul E. McKenney wrote:
> [..]
> > > > Making the above change got me this:
> > > >
> > > > usr/include/cxl/features.h:59:9: error: unknown type name ‘uuid_t’
> > > I wasn't able to hit that with allmodconfig on x86 with a Fedora 41 build setup. What is the specific command lines you are using?
> >
> > make clean
> > make allmodconfig
> > make -j$N
> >
> > Though encapsulated as follows:
> >
> > tools/testing/selftests/rcutorture/bin/torture.sh --do-none --do-allmodconfig
>
> The problem is that uuid_t is not defined for uapi headers to reuse.
> Perhaps checkpatch should be checking for uuid_t in uapi headers going
> forward.
And for whatever it is worth, "git bisect" converged here:
9b8e73cdb141 cxl: Move cxl feature command structs to user header
> For now the following builds for me, but it is a quite a mess to undo
> the assumption that that the hardware object definitions can not use
> uuid_t:
Even better, this builds fine for me:
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Thank you both!
Thanx, Paul
> -- 8< --
> diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
> index f4daefe3180e..d626dd7c5fbf 100644
> --- a/drivers/cxl/core/features.c
> +++ b/drivers/cxl/core/features.c
> @@ -33,7 +33,11 @@ static bool is_cxl_feature_exclusive_by_uuid(const uuid_t *uuid)
>
> static bool is_cxl_feature_exclusive(struct cxl_feat_entry *entry)
> {
> - return is_cxl_feature_exclusive_by_uuid(&entry->uuid);
> + uuid_t uuid;
> +
> + import_uuid(&uuid, entry->uuid);
> +
> + return is_cxl_feature_exclusive_by_uuid(&uuid);
> }
>
> inline struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds)
> @@ -228,7 +232,7 @@ size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
> return 0;
>
> size_out = min(feat_out_size, cxl_mbox->payload_size);
> - uuid_copy(&pi.uuid, feat_uuid);
> + export_uuid(pi.uuid, feat_uuid);
> pi.selection = selection;
> do {
> data_to_rd_size = min(feat_out_size - data_rcvd_size,
> @@ -282,7 +286,7 @@ int cxl_set_feature(struct cxl_mailbox *cxl_mbox,
> if (!pi)
> return -ENOMEM;
>
> - uuid_copy(&pi->uuid, feat_uuid);
> + export_uuid(pi->uuid, feat_uuid);
> pi->version = feat_version;
> feat_flag &= ~CXL_SET_FEAT_FLAG_DATA_TRANSFER_MASK;
> feat_flag |= CXL_SET_FEAT_FLAG_DATA_SAVED_ACROSS_RESET;
> @@ -360,16 +364,19 @@ get_support_feature_info(struct cxl_features_state *cxlfs,
> const struct fwctl_rpc_cxl *rpc_in)
> {
> struct cxl_feat_entry *feat;
> - const uuid_t *uuid;
> + uuid_t in_uuid;
>
> - if (rpc_in->op_size < sizeof(uuid))
> + if (rpc_in->op_size < sizeof(in_uuid))
> return ERR_PTR(-EINVAL);
>
> - uuid = &rpc_in->set_feat_in.uuid;
> + import_uuid(&in_uuid, rpc_in->set_feat_in.uuid);
>
> for (int i = 0; i < cxlfs->entries->num_features; i++) {
> + uuid_t feat_uuid;
> +
> feat = &cxlfs->entries->ent[i];
> - if (uuid_equal(uuid, &feat->uuid))
> + import_uuid(&feat_uuid, feat->uuid);
> + if (uuid_equal(&in_uuid, &feat_uuid))
> return feat;
> }
>
> @@ -461,6 +468,7 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
> const struct cxl_mbox_get_feat_in *feat_in;
> u16 offset, count, return_code;
> size_t out_size = *out_len;
> + uuid_t uuid;
>
> if (rpc_in->op_size != sizeof(*feat_in))
> return ERR_PTR(-EINVAL);
> @@ -477,9 +485,10 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
> if (!rpc_out)
> return ERR_PTR(-ENOMEM);
>
> - out_size = cxl_get_feature(cxl_mbox, &feat_in->uuid,
> - feat_in->selection, rpc_out->payload,
> - count, offset, &return_code);
> + import_uuid(&uuid, feat_in->uuid);
> + out_size = cxl_get_feature(cxl_mbox, &uuid, feat_in->selection,
> + rpc_out->payload, count, offset,
> + &return_code);
> *out_len = sizeof(struct fwctl_rpc_cxl_out);
> if (!out_size) {
> rpc_out->size = 0;
> @@ -502,6 +511,7 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
> const struct cxl_mbox_set_feat_in *feat_in;
> size_t out_size, data_size;
> u16 offset, return_code;
> + uuid_t uuid;
> u32 flags;
> int rc;
>
> @@ -510,7 +520,8 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
>
> feat_in = &rpc_in->set_feat_in;
>
> - if (is_cxl_feature_exclusive_by_uuid(&feat_in->uuid))
> + import_uuid(&uuid, feat_in->uuid);
> + if (is_cxl_feature_exclusive_by_uuid(&uuid))
> return ERR_PTR(-EPERM);
>
> offset = le16_to_cpu(feat_in->offset);
> @@ -525,9 +536,9 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
> rpc_out->size = 0;
>
> data_size = rpc_in->op_size - sizeof(feat_in->hdr);
> - rc = cxl_set_feature(cxl_mbox, &feat_in->uuid,
> - feat_in->version, feat_in->feat_data,
> - data_size, flags, offset, &return_code);
> + rc = cxl_set_feature(cxl_mbox, &uuid, feat_in->version,
> + feat_in->feat_data, data_size, flags, offset,
> + &return_code);
> if (rc) {
> rpc_out->retval = return_code;
> return no_free_ptr(rpc_out);
> diff --git a/include/uapi/cxl/features.h b/include/uapi/cxl/features.h
> index d6db8984889f..1e3323854994 100644
> --- a/include/uapi/cxl/features.h
> +++ b/include/uapi/cxl/features.h
> @@ -8,11 +8,6 @@
> #define _UAPI_CXL_FEATURES_H_
>
> #include <linux/types.h>
> -#ifndef __KERNEL__
> -#include <uuid/uuid.h>
> -#else
> -#include <linux/uuid.h>
> -#endif
>
> /*
> * struct cxl_mbox_get_sup_feats_in - Get Supported Features input
> @@ -60,7 +55,7 @@ struct cxl_mbox_get_sup_feats_in {
> * Get Supported Features Supported Feature Entry
> */
> struct cxl_feat_entry {
> - uuid_t uuid;
> + __u8 uuid[16];
> __le16 id;
> __le16 get_feat_size;
> __le16 set_feat_size;
> @@ -110,7 +105,7 @@ struct cxl_mbox_get_sup_feats_out {
> * CXL spec r3.2 section 8.2.9.6.2 Table 8-99
> */
> struct cxl_mbox_get_feat_in {
> - uuid_t uuid;
> + __u8 uuid[16];
> __le16 offset;
> __le16 count;
> __u8 selection;
> @@ -143,7 +138,7 @@ enum cxl_get_feat_selection {
> */
> struct cxl_mbox_set_feat_in {
> __struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */,
> - uuid_t uuid;
> + __u8 uuid[16];
> __le32 flags;
> __le16 offset;
> __u8 version;
> diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
> index f2957a3e36fe..d0276ab3a92f 100644
> --- a/tools/testing/cxl/test/mem.c
> +++ b/tools/testing/cxl/test/mem.c
> @@ -1397,7 +1397,7 @@ static int mock_activate_fw(struct cxl_mockmem_data *mdata,
>
> static void fill_feature_vendor_test(struct cxl_feat_entry *feat)
> {
> - feat->uuid = CXL_VENDOR_FEATURE_TEST;
> + export_uuid(feat->uuid, &CXL_VENDOR_FEATURE_TEST);
> feat->id = 0;
> feat->get_feat_size = cpu_to_le16(0x4);
> feat->set_feat_size = cpu_to_le16(0x4);
> @@ -1441,8 +1441,10 @@ static int mock_get_feature(struct cxl_mockmem_data *mdata,
> struct cxl_mbox_cmd *cmd)
> {
> struct cxl_mbox_get_feat_in *input = cmd->payload_in;
> + uuid_t in_uuid;
>
> - if (uuid_equal(&input->uuid, &CXL_VENDOR_FEATURE_TEST))
> + import_uuid(&in_uuid, input->uuid);
> + if (uuid_equal(&in_uuid, &CXL_VENDOR_FEATURE_TEST))
> return mock_get_test_feature(mdata, cmd);
>
> cmd->return_code = CXL_MBOX_CMD_RC_UNSUPPORTED;
> @@ -1485,8 +1487,10 @@ static int mock_set_feature(struct cxl_mockmem_data *mdata,
> struct cxl_mbox_cmd *cmd)
> {
> struct cxl_mbox_set_feat_in *input = cmd->payload_in;
> + uuid_t in_uuid;
>
> - if (uuid_equal(&input->hdr.uuid, &CXL_VENDOR_FEATURE_TEST))
> + import_uuid(&in_uuid, input->hdr.uuid);
> + if (uuid_equal(&in_uuid, &CXL_VENDOR_FEATURE_TEST))
> return mock_set_test_feature(mdata, cmd);
>
> cmd->return_code = CXL_MBOX_CMD_RC_UNSUPPORTED;
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-28 23:58 ` Paul E. McKenney
@ 2025-03-29 0:23 ` Dan Williams
0 siblings, 0 replies; 27+ messages in thread
From: Dan Williams @ 2025-03-29 0:23 UTC (permalink / raw)
To: Paul E. McKenney, Dan Williams
Cc: Dave Jiang, linux-cxl, dave, jonathan.cameron, alison.schofield,
vishal.l.verma, ira.weiny, gourry, linux-kernel, linux-next, sfr
Paul E. McKenney wrote:
> On Fri, Mar 28, 2025 at 04:26:21PM -0700, Dan Williams wrote:
> > Paul E. McKenney wrote:
> > [..]
> > > > > Making the above change got me this:
> > > > >
> > > > > usr/include/cxl/features.h:59:9: error: unknown type name ‘uuid_t’
> > > > I wasn't able to hit that with allmodconfig on x86 with a Fedora 41 build setup. What is the specific command lines you are using?
> > >
> > > make clean
> > > make allmodconfig
> > > make -j$N
> > >
> > > Though encapsulated as follows:
> > >
> > > tools/testing/selftests/rcutorture/bin/torture.sh --do-none --do-allmodconfig
> >
> > The problem is that uuid_t is not defined for uapi headers to reuse.
> > Perhaps checkpatch should be checking for uuid_t in uapi headers going
> > forward.
>
> And for whatever it is worth, "git bisect" converged here:
>
> 9b8e73cdb141 cxl: Move cxl feature command structs to user header
That makes sense because that was the point at which the usage of uuid_t
in those data structures became invalid.
I am going to have a firm talking to whomever added their Reviewed-by to
that... cue Michael Jackson's "I'm looking at the man in the mirror".
> > For now the following builds for me, but it is a quite a mess to undo
> > the assumption that that the hardware object definitions can not use
> > uuid_t:
>
> Even better, this builds fine for me:
>
> Tested-by: Paul E. McKenney <paulmck@kernel.org>
>
> Thank you both!
Thanks for the bisect Paul!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-28 23:26 ` Dan Williams
2025-03-28 23:58 ` Paul E. McKenney
@ 2025-03-29 0:26 ` Dave Jiang
2025-03-31 13:24 ` Jason Gunthorpe
2025-04-05 17:34 ` Palmer Dabbelt
2 siblings, 1 reply; 27+ messages in thread
From: Dave Jiang @ 2025-03-29 0:26 UTC (permalink / raw)
To: Dan Williams, Paul E. McKenney
Cc: linux-cxl, dave, jonathan.cameron, alison.schofield,
vishal.l.verma, ira.weiny, gourry, linux-kernel, linux-next, sfr,
Jason Gunthorpe
On 3/28/25 4:26 PM, Dan Williams wrote:
> Paul E. McKenney wrote:
> [..]
>>>> Making the above change got me this:
>>>>
>>>> usr/include/cxl/features.h:59:9: error: unknown type name ‘uuid_t’
>>> I wasn't able to hit that with allmodconfig on x86 with a Fedora 41 build setup. What is the specific command lines you are using?
>>
>> make clean
>> make allmodconfig
>> make -j$N
>>
>> Though encapsulated as follows:
>>
>> tools/testing/selftests/rcutorture/bin/torture.sh --do-none --do-allmodconfig
>
> The problem is that uuid_t is not defined for uapi headers to reuse.
> Perhaps checkpatch should be checking for uuid_t in uapi headers going
> forward.
>
> For now the following builds for me, but it is a quite a mess to undo
> the assumption that that the hardware object definitions can not use
> uuid_t:
+Jason.
>
> -- 8< --
> diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
> index f4daefe3180e..d626dd7c5fbf 100644
> --- a/drivers/cxl/core/features.c
> +++ b/drivers/cxl/core/features.c
> @@ -33,7 +33,11 @@ static bool is_cxl_feature_exclusive_by_uuid(const uuid_t *uuid)
>
> static bool is_cxl_feature_exclusive(struct cxl_feat_entry *entry)
> {
> - return is_cxl_feature_exclusive_by_uuid(&entry->uuid);
> + uuid_t uuid;
> +
> + import_uuid(&uuid, entry->uuid);
> +
> + return is_cxl_feature_exclusive_by_uuid(&uuid);
> }
>
> inline struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds)
> @@ -228,7 +232,7 @@ size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
> return 0;
>
> size_out = min(feat_out_size, cxl_mbox->payload_size);
> - uuid_copy(&pi.uuid, feat_uuid);
> + export_uuid(pi.uuid, feat_uuid);
> pi.selection = selection;
> do {
> data_to_rd_size = min(feat_out_size - data_rcvd_size,
> @@ -282,7 +286,7 @@ int cxl_set_feature(struct cxl_mailbox *cxl_mbox,
> if (!pi)
> return -ENOMEM;
>
> - uuid_copy(&pi->uuid, feat_uuid);
> + export_uuid(pi->uuid, feat_uuid);
> pi->version = feat_version;
> feat_flag &= ~CXL_SET_FEAT_FLAG_DATA_TRANSFER_MASK;
> feat_flag |= CXL_SET_FEAT_FLAG_DATA_SAVED_ACROSS_RESET;
> @@ -360,16 +364,19 @@ get_support_feature_info(struct cxl_features_state *cxlfs,
> const struct fwctl_rpc_cxl *rpc_in)
> {
> struct cxl_feat_entry *feat;
> - const uuid_t *uuid;
> + uuid_t in_uuid;
>
> - if (rpc_in->op_size < sizeof(uuid))
> + if (rpc_in->op_size < sizeof(in_uuid))
> return ERR_PTR(-EINVAL);
>
> - uuid = &rpc_in->set_feat_in.uuid;
> + import_uuid(&in_uuid, rpc_in->set_feat_in.uuid);
>
> for (int i = 0; i < cxlfs->entries->num_features; i++) {
> + uuid_t feat_uuid;
> +
> feat = &cxlfs->entries->ent[i];
> - if (uuid_equal(uuid, &feat->uuid))
> + import_uuid(&feat_uuid, feat->uuid);
> + if (uuid_equal(&in_uuid, &feat_uuid))
> return feat;
> }
>
> @@ -461,6 +468,7 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
> const struct cxl_mbox_get_feat_in *feat_in;
> u16 offset, count, return_code;
> size_t out_size = *out_len;
> + uuid_t uuid;
>
> if (rpc_in->op_size != sizeof(*feat_in))
> return ERR_PTR(-EINVAL);
> @@ -477,9 +485,10 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
> if (!rpc_out)
> return ERR_PTR(-ENOMEM);
>
> - out_size = cxl_get_feature(cxl_mbox, &feat_in->uuid,
> - feat_in->selection, rpc_out->payload,
> - count, offset, &return_code);
> + import_uuid(&uuid, feat_in->uuid);
> + out_size = cxl_get_feature(cxl_mbox, &uuid, feat_in->selection,
> + rpc_out->payload, count, offset,
> + &return_code);
> *out_len = sizeof(struct fwctl_rpc_cxl_out);
> if (!out_size) {
> rpc_out->size = 0;
> @@ -502,6 +511,7 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
> const struct cxl_mbox_set_feat_in *feat_in;
> size_t out_size, data_size;
> u16 offset, return_code;
> + uuid_t uuid;
> u32 flags;
> int rc;
>
> @@ -510,7 +520,8 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
>
> feat_in = &rpc_in->set_feat_in;
>
> - if (is_cxl_feature_exclusive_by_uuid(&feat_in->uuid))
> + import_uuid(&uuid, feat_in->uuid);
> + if (is_cxl_feature_exclusive_by_uuid(&uuid))
> return ERR_PTR(-EPERM);
>
> offset = le16_to_cpu(feat_in->offset);
> @@ -525,9 +536,9 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
> rpc_out->size = 0;
>
> data_size = rpc_in->op_size - sizeof(feat_in->hdr);
> - rc = cxl_set_feature(cxl_mbox, &feat_in->uuid,
> - feat_in->version, feat_in->feat_data,
> - data_size, flags, offset, &return_code);
> + rc = cxl_set_feature(cxl_mbox, &uuid, feat_in->version,
> + feat_in->feat_data, data_size, flags, offset,
> + &return_code);
> if (rc) {
> rpc_out->retval = return_code;
> return no_free_ptr(rpc_out);
> diff --git a/include/uapi/cxl/features.h b/include/uapi/cxl/features.h
> index d6db8984889f..1e3323854994 100644
> --- a/include/uapi/cxl/features.h
> +++ b/include/uapi/cxl/features.h
> @@ -8,11 +8,6 @@
> #define _UAPI_CXL_FEATURES_H_
>
> #include <linux/types.h>
> -#ifndef __KERNEL__
> -#include <uuid/uuid.h>
> -#else
> -#include <linux/uuid.h>
> -#endif
>
> /*
> * struct cxl_mbox_get_sup_feats_in - Get Supported Features input
> @@ -60,7 +55,7 @@ struct cxl_mbox_get_sup_feats_in {
> * Get Supported Features Supported Feature Entry
> */
> struct cxl_feat_entry {
> - uuid_t uuid;
> + __u8 uuid[16];
> __le16 id;
> __le16 get_feat_size;
> __le16 set_feat_size;
> @@ -110,7 +105,7 @@ struct cxl_mbox_get_sup_feats_out {
> * CXL spec r3.2 section 8.2.9.6.2 Table 8-99
> */
> struct cxl_mbox_get_feat_in {
> - uuid_t uuid;
> + __u8 uuid[16];
> __le16 offset;
> __le16 count;
> __u8 selection;
> @@ -143,7 +138,7 @@ enum cxl_get_feat_selection {
> */
> struct cxl_mbox_set_feat_in {
> __struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */,
> - uuid_t uuid;
> + __u8 uuid[16];
> __le32 flags;
> __le16 offset;
> __u8 version;
> diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
> index f2957a3e36fe..d0276ab3a92f 100644
> --- a/tools/testing/cxl/test/mem.c
> +++ b/tools/testing/cxl/test/mem.c
> @@ -1397,7 +1397,7 @@ static int mock_activate_fw(struct cxl_mockmem_data *mdata,
>
> static void fill_feature_vendor_test(struct cxl_feat_entry *feat)
> {
> - feat->uuid = CXL_VENDOR_FEATURE_TEST;
> + export_uuid(feat->uuid, &CXL_VENDOR_FEATURE_TEST);
> feat->id = 0;
> feat->get_feat_size = cpu_to_le16(0x4);
> feat->set_feat_size = cpu_to_le16(0x4);
> @@ -1441,8 +1441,10 @@ static int mock_get_feature(struct cxl_mockmem_data *mdata,
> struct cxl_mbox_cmd *cmd)
> {
> struct cxl_mbox_get_feat_in *input = cmd->payload_in;
> + uuid_t in_uuid;
>
> - if (uuid_equal(&input->uuid, &CXL_VENDOR_FEATURE_TEST))
> + import_uuid(&in_uuid, input->uuid);
> + if (uuid_equal(&in_uuid, &CXL_VENDOR_FEATURE_TEST))
> return mock_get_test_feature(mdata, cmd);
>
> cmd->return_code = CXL_MBOX_CMD_RC_UNSUPPORTED;
> @@ -1485,8 +1487,10 @@ static int mock_set_feature(struct cxl_mockmem_data *mdata,
> struct cxl_mbox_cmd *cmd)
> {
> struct cxl_mbox_set_feat_in *input = cmd->payload_in;
> + uuid_t in_uuid;
>
> - if (uuid_equal(&input->hdr.uuid, &CXL_VENDOR_FEATURE_TEST))
> + import_uuid(&in_uuid, input->hdr.uuid);
> + if (uuid_equal(&in_uuid, &CXL_VENDOR_FEATURE_TEST))
> return mock_set_test_feature(mdata, cmd);
>
> cmd->return_code = CXL_MBOX_CMD_RC_UNSUPPORTED;
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-29 0:26 ` Dave Jiang
@ 2025-03-31 13:24 ` Jason Gunthorpe
2025-03-31 16:48 ` Paul E. McKenney
2025-03-31 16:54 ` Dan Williams
0 siblings, 2 replies; 27+ messages in thread
From: Jason Gunthorpe @ 2025-03-31 13:24 UTC (permalink / raw)
To: Dave Jiang
Cc: Dan Williams, Paul E. McKenney, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, gourry, linux-kernel,
linux-next, sfr
On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
> > For now the following builds for me, but it is a quite a mess to undo
> > the assumption that that the hardware object definitions can not use
> > uuid_t:
>
> +Jason.
Seems invasive?
Maybe just like below?
Dave please send a patch for whatever is good..
diff --git a/include/uapi/cxl/features.h b/include/uapi/cxl/features.h
index d6db8984889fa6..e31862dfc2eda0 100644
--- a/include/uapi/cxl/features.h
+++ b/include/uapi/cxl/features.h
@@ -8,10 +8,16 @@
#define _UAPI_CXL_FEATURES_H_
#include <linux/types.h>
-#ifndef __KERNEL__
-#include <uuid/uuid.h>
-#else
+
+typedef struct {
+ __u8 b[16];
+} __kernel_uuid_t;
+
+#ifdef __KERNEL__
#include <linux/uuid.h>
+static_assert(sizeof(__kernel_uuid_t) == sizeof(uuid_t) &&
+ __alignof__(__kernel_uuid_t) == __alignof__(uuid_t));
+#define __kernel_uuid_t uuid_t
#endif
/*
@@ -60,7 +66,7 @@ struct cxl_mbox_get_sup_feats_in {
* Get Supported Features Supported Feature Entry
*/
struct cxl_feat_entry {
- uuid_t uuid;
+ __kernel_uuid_t uuid;
__le16 id;
__le16 get_feat_size;
__le16 set_feat_size;
@@ -110,7 +116,7 @@ struct cxl_mbox_get_sup_feats_out {
* CXL spec r3.2 section 8.2.9.6.2 Table 8-99
*/
struct cxl_mbox_get_feat_in {
- uuid_t uuid;
+ __kernel_uuid_t uuid;
__le16 offset;
__le16 count;
__u8 selection;
@@ -143,7 +149,7 @@ enum cxl_get_feat_selection {
*/
struct cxl_mbox_set_feat_in {
__struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */,
- uuid_t uuid;
+ __kernel_uuid_t uuid;
__le32 flags;
__le16 offset;
__u8 version;
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-31 13:24 ` Jason Gunthorpe
@ 2025-03-31 16:48 ` Paul E. McKenney
2025-03-31 16:54 ` Dan Williams
1 sibling, 0 replies; 27+ messages in thread
From: Paul E. McKenney @ 2025-03-31 16:48 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Dave Jiang, Dan Williams, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, gourry, linux-kernel,
linux-next, sfr
On Mon, Mar 31, 2025 at 10:24:39AM -0300, Jason Gunthorpe wrote:
> On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
> > > For now the following builds for me, but it is a quite a mess to undo
> > > the assumption that that the hardware object definitions can not use
> > > uuid_t:
> >
> > +Jason.
>
> Seems invasive?
>
> Maybe just like below?
I tried testing this, but was not able to work out what it applies to.
If you let me know, I will give it a try.
Thanx, Paul
> Dave please send a patch for whatever is good..
>
> diff --git a/include/uapi/cxl/features.h b/include/uapi/cxl/features.h
> index d6db8984889fa6..e31862dfc2eda0 100644
> --- a/include/uapi/cxl/features.h
> +++ b/include/uapi/cxl/features.h
> @@ -8,10 +8,16 @@
> #define _UAPI_CXL_FEATURES_H_
>
> #include <linux/types.h>
> -#ifndef __KERNEL__
> -#include <uuid/uuid.h>
> -#else
> +
> +typedef struct {
> + __u8 b[16];
> +} __kernel_uuid_t;
> +
> +#ifdef __KERNEL__
> #include <linux/uuid.h>
> +static_assert(sizeof(__kernel_uuid_t) == sizeof(uuid_t) &&
> + __alignof__(__kernel_uuid_t) == __alignof__(uuid_t));
> +#define __kernel_uuid_t uuid_t
> #endif
>
> /*
> @@ -60,7 +66,7 @@ struct cxl_mbox_get_sup_feats_in {
> * Get Supported Features Supported Feature Entry
> */
> struct cxl_feat_entry {
> - uuid_t uuid;
> + __kernel_uuid_t uuid;
> __le16 id;
> __le16 get_feat_size;
> __le16 set_feat_size;
> @@ -110,7 +116,7 @@ struct cxl_mbox_get_sup_feats_out {
> * CXL spec r3.2 section 8.2.9.6.2 Table 8-99
> */
> struct cxl_mbox_get_feat_in {
> - uuid_t uuid;
> + __kernel_uuid_t uuid;
> __le16 offset;
> __le16 count;
> __u8 selection;
> @@ -143,7 +149,7 @@ enum cxl_get_feat_selection {
> */
> struct cxl_mbox_set_feat_in {
> __struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */,
> - uuid_t uuid;
> + __kernel_uuid_t uuid;
> __le32 flags;
> __le16 offset;
> __u8 version;
>
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-31 13:24 ` Jason Gunthorpe
2025-03-31 16:48 ` Paul E. McKenney
@ 2025-03-31 16:54 ` Dan Williams
2025-03-31 17:17 ` Jason Gunthorpe
2025-04-07 17:49 ` Jason Gunthorpe
1 sibling, 2 replies; 27+ messages in thread
From: Dan Williams @ 2025-03-31 16:54 UTC (permalink / raw)
To: Jason Gunthorpe, Dave Jiang
Cc: Dan Williams, Paul E. McKenney, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, gourry, linux-kernel,
linux-next, sfr
Jason Gunthorpe wrote:
> On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
> > > For now the following builds for me, but it is a quite a mess to undo
> > > the assumption that that the hardware object definitions can not use
> > > uuid_t:
> >
> > +Jason.
>
> Seems invasive?
Yeah, it left a bad taste for me as well.
> Maybe just like below?
I like that this avoids converting to the kernel's uuid API, however,
not quite happy that it forces userspace to contend with the
type-conflict with uuid/uuid.h.
So how about one more riff on your idea?
-- 8< --
From 6fbca9bb3e29f3a205861b9489a8fba46506e107 Mon Sep 17 00:00:00 2001
From: Dan Williams <dan.j.williams@intel.com>
Date: Mon, 31 Mar 2025 09:43:48 -0700
Subject: [PATCH] fwctl/cxl: Fix uuid_t usage in uapi
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The uuid_t type is kernel internal, and Paul reports the following build
error when it is used in a uapi header:
usr/include/cxl/features.h:59:9: error: unknown type name ‘uuid_t’
Create a uuid type (__uapi_uuid_t) compatible with the longstanding
definition uuid/uuid.h for userspace builds, and use uuid_t directly for
kernel builds.
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reported-by: "Paul E. McKenney" <paulmck@kernel.org>
Closes: http://lore.kernel.org/f6489337-67c7-48c8-b48a-58603ec15328@paulmck-laptop
Fixes: 9b8e73cdb141 ("cxl: Move cxl feature command structs to user header")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
include/uapi/cxl/features.h | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/include/uapi/cxl/features.h b/include/uapi/cxl/features.h
index d6db8984889f..dd8874860cec 100644
--- a/include/uapi/cxl/features.h
+++ b/include/uapi/cxl/features.h
@@ -8,10 +8,14 @@
#define _UAPI_CXL_FEATURES_H_
#include <linux/types.h>
-#ifndef __KERNEL__
-#include <uuid/uuid.h>
-#else
+
+typedef unsigned char __uapi_uuid_t[16];
+
+#ifdef __KERNEL__
#include <linux/uuid.h>
+static_assert(sizeof(__uapi_uuid_t) == sizeof(uuid_t) &&
+ __alignof__(__uapi_uuid_t) == __alignof__(uuid_t));
+#define __uapi_uuid_t uuid_t
#endif
/*
@@ -60,7 +64,7 @@ struct cxl_mbox_get_sup_feats_in {
* Get Supported Features Supported Feature Entry
*/
struct cxl_feat_entry {
- uuid_t uuid;
+ __uapi_uuid_t uuid;
__le16 id;
__le16 get_feat_size;
__le16 set_feat_size;
@@ -110,7 +114,7 @@ struct cxl_mbox_get_sup_feats_out {
* CXL spec r3.2 section 8.2.9.6.2 Table 8-99
*/
struct cxl_mbox_get_feat_in {
- uuid_t uuid;
+ __uapi_uuid_t uuid;
__le16 offset;
__le16 count;
__u8 selection;
@@ -143,7 +147,7 @@ enum cxl_get_feat_selection {
*/
struct cxl_mbox_set_feat_in {
__struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */,
- uuid_t uuid;
+ __uapi_uuid_t uuid;
__le32 flags;
__le16 offset;
__u8 version;
--
2.48.1
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-31 16:54 ` Dan Williams
@ 2025-03-31 17:17 ` Jason Gunthorpe
2025-03-31 19:47 ` Dan Williams
2025-04-07 17:49 ` Jason Gunthorpe
1 sibling, 1 reply; 27+ messages in thread
From: Jason Gunthorpe @ 2025-03-31 17:17 UTC (permalink / raw)
To: Dan Williams
Cc: Dave Jiang, Paul E. McKenney, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, gourry, linux-kernel,
linux-next, sfr
On Mon, Mar 31, 2025 at 09:54:55AM -0700, Dan Williams wrote:
> Jason Gunthorpe wrote:
> > On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
> > > > For now the following builds for me, but it is a quite a mess to undo
> > > > the assumption that that the hardware object definitions can not use
> > > > uuid_t:
> > >
> > > +Jason.
> >
> > Seems invasive?
>
> Yeah, it left a bad taste for me as well.
>
> > Maybe just like below?
>
> I like that this avoids converting to the kernel's uuid API, however,
> not quite happy that it forces userspace to contend with the
> type-conflict with uuid/uuid.h.
Oh I see
> So how about one more riff on your idea?
Sure, works for me, please post it..
Jason
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-31 17:17 ` Jason Gunthorpe
@ 2025-03-31 19:47 ` Dan Williams
2025-04-01 7:01 ` Venkat Rao Bagalkote
0 siblings, 1 reply; 27+ messages in thread
From: Dan Williams @ 2025-03-31 19:47 UTC (permalink / raw)
To: Jason Gunthorpe, Dan Williams
Cc: Dave Jiang, Paul E. McKenney, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, gourry, linux-kernel,
linux-next, sfr
Jason Gunthorpe wrote:
> On Mon, Mar 31, 2025 at 09:54:55AM -0700, Dan Williams wrote:
> > Jason Gunthorpe wrote:
> > > On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
> > > > > For now the following builds for me, but it is a quite a mess to undo
> > > > > the assumption that that the hardware object definitions can not use
> > > > > uuid_t:
> > > >
> > > > +Jason.
> > >
> > > Seems invasive?
> >
> > Yeah, it left a bad taste for me as well.
> >
> > > Maybe just like below?
> >
> > I like that this avoids converting to the kernel's uuid API, however,
> > not quite happy that it forces userspace to contend with the
> > type-conflict with uuid/uuid.h.
>
> Oh I see
>
> > So how about one more riff on your idea?
>
> Sure, works for me, please post it..
b4 am supports scissors lines, so:
b4 am -P _ 67eac8df3e217_201f02948d@dwillia2-xfh.jf.intel.com.notmuch
...works for me. Do you still need a separate posting?
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-31 19:47 ` Dan Williams
@ 2025-04-01 7:01 ` Venkat Rao Bagalkote
2025-04-01 14:08 ` Paul E. McKenney
2025-04-01 15:15 ` Dave Jiang
0 siblings, 2 replies; 27+ messages in thread
From: Venkat Rao Bagalkote @ 2025-04-01 7:01 UTC (permalink / raw)
To: Dan Williams, Jason Gunthorpe
Cc: Dave Jiang, Paul E. McKenney, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, gourry, linux-kernel,
linux-next, sfr, Madhavan Srinivasan
On 01/04/25 1:17 am, Dan Williams wrote:
> Jason Gunthorpe wrote:
>> On Mon, Mar 31, 2025 at 09:54:55AM -0700, Dan Williams wrote:
>>> Jason Gunthorpe wrote:
>>>> On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
>>>>>> For now the following builds for me, but it is a quite a mess to undo
>>>>>> the assumption that that the hardware object definitions can not use
>>>>>> uuid_t:
>>>>> +Jason.
>>>> Seems invasive?
>>> Yeah, it left a bad taste for me as well.
>>>
>>>> Maybe just like below?
>>> I like that this avoids converting to the kernel's uuid API, however,
>>> not quite happy that it forces userspace to contend with the
>>> type-conflict with uuid/uuid.h.
>> Oh I see
>>
>>> So how about one more riff on your idea?
>> Sure, works for me, please post it..
> b4 am supports scissors lines, so:
>
> b4 am -P _ 67eac8df3e217_201f02948d@dwillia2-xfh.jf.intel.com.notmuch
>
> ...works for me. Do you still need a separate posting?
>
This issue got introduced in next-20250307 and got fixed in
next-20250311(not sure what fixed).
But again got re-introduced in next-20250318. I tried bisection, below
are the logs.
One of the things I tried is to install the UUID packages on my set up
and after installing those packages, issue is not seen.
rpm -qa | grep uuid
libuuid-2.37.4-20.el9.ppc64le
uuid-1.6.2-55.el9.ppc64le
uuid-c++-1.6.2-55.el9.ppc64le
uuid-dce-1.6.2-55.el9.ppc64le
uuid-devel-1.6.2-55.el9.ppc64le
uuidd-2.37.4-20.el9.ppc64le
libuuid-devel-2.37.4-20.el9.ppc64le
So wondering is this not a setup issue? Please advice.
Bisect Log:
git bisect log
git bisect start
# status: waiting for both good and bad commits
# bad: [c4d4884b67802c41fd67399747165d65c770621a] Add linux-next
specific files for 20250318
git bisect bad c4d4884b67802c41fd67399747165d65c770621a
# status: waiting for good commit(s), bad commit known
# good: [4701f33a10702d5fc577c32434eb62adde0a1ae1] Linux 6.14-rc7
git bisect good 4701f33a10702d5fc577c32434eb62adde0a1ae1
# good: [cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb] Merge branch
'spi-nor/next' of
git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
git bisect good cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb
# good: [9b22611592aa21d10f7d1b89352a618436dea7ac] Merge branch 'next'
of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
git bisect good 9b22611592aa21d10f7d1b89352a618436dea7ac
# good: [264791f7669a8246d129cbb935c861debba2f116] Merge branch
'driver-core-next' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
git bisect good 264791f7669a8246d129cbb935c861debba2f116
# good: [3c51cb2d6ec7cecf724cd5d78a0633f61f31e726] Merge branch
'for-next' of
git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git
git bisect good 3c51cb2d6ec7cecf724cd5d78a0633f61f31e726
# good: [612481dbc16505cf5e940809ebf36d8460d174cf] Merge branch 'main'
of git://git.infradead.org/users/willy/xarray.git
git bisect good 612481dbc16505cf5e940809ebf36d8460d174cf
# bad: [892715be4379deb333376e573113fd75672eca6c] Merge branch
'rust-next' of https://github.com/Rust-for-Linux/linux.git
git bisect bad 892715be4379deb333376e573113fd75672eca6c
# bad: [b33f4167a8a2b9b9cc6b3e06f79b030db82cf530] Merge branch 'next' of
git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
git bisect bad b33f4167a8a2b9b9cc6b3e06f79b030db82cf530
# good: [3b5d43245f0a56390baaa670e1b6d898772266b3] Merge branch
'for-6.15/features' into cxl-for-next
git bisect good 3b5d43245f0a56390baaa670e1b6d898772266b3
# good: [d11af4ae2169672b690a4d07a9dfdfd76c082683] Merge branch
'for-next' of
git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git
git bisect good d11af4ae2169672b690a4d07a9dfdfd76c082683
# bad: [5908f3ed6dc209e5c824e63afda7545805f75a7e] cxl: Add support to
handle user feature commands for get feature
git bisect bad 5908f3ed6dc209e5c824e63afda7545805f75a7e
# good: [18285acc2c047cda2449f426c09fc8969b04b8b1] fwctl: Add documentation
git bisect good 18285acc2c047cda2449f426c09fc8969b04b8b1
# good: [15a26c223fff58d9fa4ada12a8c35697f8ecdf6c] Merge branch
'for-6.15/features' into fwctl
git bisect good 15a26c223fff58d9fa4ada12a8c35697f8ecdf6c
# bad: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl feature
command structs to user header
git bisect bad 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
# good: [858ce2f56b5253063f61f6b1c58a6dbf5d71da0b] cxl: Add FWCTL
support to CXL
git bisect good 858ce2f56b5253063f61f6b1c58a6dbf5d71da0b
# first bad commit: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move
cxl feature command structs to user header
9b8e73cdb1418f7c251c43b2082218ed9c0d0fee is the first bad commit
commit 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
Author: Dave Jiang <dave.jiang@intel.com>
Date: Fri Mar 7 13:55:32 2025 -0700
cxl: Move cxl feature command structs to user header
In preparation for cxl fwctl enabling, move data structures related to
cxl feature commands to a user header file.
Reviewed-by; Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link:
https://patch.msgid.link/r/20250307205648.1021626-3-dave.jiang@intel.com
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
include/cxl/features.h | 112 +----------------------------
include/uapi/cxl/features.h | 169
++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 170 insertions(+), 111 deletions(-)
create mode 100644 include/uapi/cxl/features.h
Regards,
Venkat.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-01 7:01 ` Venkat Rao Bagalkote
@ 2025-04-01 14:08 ` Paul E. McKenney
2025-04-01 15:15 ` Dave Jiang
1 sibling, 0 replies; 27+ messages in thread
From: Paul E. McKenney @ 2025-04-01 14:08 UTC (permalink / raw)
To: Venkat Rao Bagalkote
Cc: Dan Williams, Jason Gunthorpe, Dave Jiang, linux-cxl, dave,
jonathan.cameron, alison.schofield, vishal.l.verma, ira.weiny,
gourry, linux-kernel, linux-next, sfr, Madhavan Srinivasan
On Tue, Apr 01, 2025 at 12:31:20PM +0530, Venkat Rao Bagalkote wrote:
>
> On 01/04/25 1:17 am, Dan Williams wrote:
> > Jason Gunthorpe wrote:
> > > On Mon, Mar 31, 2025 at 09:54:55AM -0700, Dan Williams wrote:
> > > > Jason Gunthorpe wrote:
> > > > > On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
> > > > > > > For now the following builds for me, but it is a quite a mess to undo
> > > > > > > the assumption that that the hardware object definitions can not use
> > > > > > > uuid_t:
> > > > > > +Jason.
> > > > > Seems invasive?
> > > > Yeah, it left a bad taste for me as well.
> > > >
> > > > > Maybe just like below?
> > > > I like that this avoids converting to the kernel's uuid API, however,
> > > > not quite happy that it forces userspace to contend with the
> > > > type-conflict with uuid/uuid.h.
> > > Oh I see
> > > > So how about one more riff on your idea?
> > > Sure, works for me, please post it..
> > b4 am supports scissors lines, so:
> >
> > b4 am -P _ 67eac8df3e217_201f02948d@dwillia2-xfh.jf.intel.com.notmuch
> >
> > ...works for me. Do you still need a separate posting?
> >
>
> This issue got introduced in next-20250307 and got fixed in
> next-20250311(not sure what fixed).
>
> But again got re-introduced in next-20250318. I tried bisection, below are
> the logs.
>
> One of the things I tried is to install the UUID packages on my set up and
> after installing those packages, issue is not seen.
>
> rpm -qa | grep uuid
>
> libuuid-2.37.4-20.el9.ppc64le
> uuid-1.6.2-55.el9.ppc64le
> uuid-c++-1.6.2-55.el9.ppc64le
> uuid-dce-1.6.2-55.el9.ppc64le
> uuid-devel-1.6.2-55.el9.ppc64le
> uuidd-2.37.4-20.el9.ppc64le
> libuuid-devel-2.37.4-20.el9.ppc64le
>
> So wondering is this not a setup issue? Please advice.
Me, I would hope that it would not be necessary to install seven UUID
packages just to do an allmodconfig build of the kernel. Perhaps naive
of me, I know. ;-)
Thanx, Paul
> Bisect Log:
>
> git bisect log
> git bisect start
> # status: waiting for both good and bad commits
> # bad: [c4d4884b67802c41fd67399747165d65c770621a] Add linux-next specific
> files for 20250318
> git bisect bad c4d4884b67802c41fd67399747165d65c770621a
> # status: waiting for good commit(s), bad commit known
> # good: [4701f33a10702d5fc577c32434eb62adde0a1ae1] Linux 6.14-rc7
> git bisect good 4701f33a10702d5fc577c32434eb62adde0a1ae1
> # good: [cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb] Merge branch
> 'spi-nor/next' of
> git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
> git bisect good cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb
> # good: [9b22611592aa21d10f7d1b89352a618436dea7ac] Merge branch 'next' of
> git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
> git bisect good 9b22611592aa21d10f7d1b89352a618436dea7ac
> # good: [264791f7669a8246d129cbb935c861debba2f116] Merge branch
> 'driver-core-next' of
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
> git bisect good 264791f7669a8246d129cbb935c861debba2f116
> # good: [3c51cb2d6ec7cecf724cd5d78a0633f61f31e726] Merge branch 'for-next'
> of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git
> git bisect good 3c51cb2d6ec7cecf724cd5d78a0633f61f31e726
> # good: [612481dbc16505cf5e940809ebf36d8460d174cf] Merge branch 'main' of
> git://git.infradead.org/users/willy/xarray.git
> git bisect good 612481dbc16505cf5e940809ebf36d8460d174cf
> # bad: [892715be4379deb333376e573113fd75672eca6c] Merge branch 'rust-next'
> of https://github.com/Rust-for-Linux/linux.git
> git bisect bad 892715be4379deb333376e573113fd75672eca6c
> # bad: [b33f4167a8a2b9b9cc6b3e06f79b030db82cf530] Merge branch 'next' of
> git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
> git bisect bad b33f4167a8a2b9b9cc6b3e06f79b030db82cf530
> # good: [3b5d43245f0a56390baaa670e1b6d898772266b3] Merge branch
> 'for-6.15/features' into cxl-for-next
> git bisect good 3b5d43245f0a56390baaa670e1b6d898772266b3
> # good: [d11af4ae2169672b690a4d07a9dfdfd76c082683] Merge branch 'for-next'
> of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git
> git bisect good d11af4ae2169672b690a4d07a9dfdfd76c082683
> # bad: [5908f3ed6dc209e5c824e63afda7545805f75a7e] cxl: Add support to handle
> user feature commands for get feature
> git bisect bad 5908f3ed6dc209e5c824e63afda7545805f75a7e
> # good: [18285acc2c047cda2449f426c09fc8969b04b8b1] fwctl: Add documentation
> git bisect good 18285acc2c047cda2449f426c09fc8969b04b8b1
> # good: [15a26c223fff58d9fa4ada12a8c35697f8ecdf6c] Merge branch
> 'for-6.15/features' into fwctl
> git bisect good 15a26c223fff58d9fa4ada12a8c35697f8ecdf6c
> # bad: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl feature
> command structs to user header
> git bisect bad 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
> # good: [858ce2f56b5253063f61f6b1c58a6dbf5d71da0b] cxl: Add FWCTL support to
> CXL
> git bisect good 858ce2f56b5253063f61f6b1c58a6dbf5d71da0b
> # first bad commit: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl
> feature command structs to user header
>
> 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee is the first bad commit
> commit 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
> Author: Dave Jiang <dave.jiang@intel.com>
> Date: Fri Mar 7 13:55:32 2025 -0700
>
> cxl: Move cxl feature command structs to user header
>
> In preparation for cxl fwctl enabling, move data structures related to
> cxl feature commands to a user header file.
>
> Reviewed-by; Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Link:
> https://patch.msgid.link/r/20250307205648.1021626-3-dave.jiang@intel.com
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> Reviewed-by: Li Ming <ming.li@zohomail.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
>
> include/cxl/features.h | 112 +----------------------------
> include/uapi/cxl/features.h | 169
> ++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 170 insertions(+), 111 deletions(-)
> create mode 100644 include/uapi/cxl/features.h
>
>
> Regards,
>
> Venkat.
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-01 7:01 ` Venkat Rao Bagalkote
2025-04-01 14:08 ` Paul E. McKenney
@ 2025-04-01 15:15 ` Dave Jiang
2025-04-02 0:07 ` Paul E. McKenney
1 sibling, 1 reply; 27+ messages in thread
From: Dave Jiang @ 2025-04-01 15:15 UTC (permalink / raw)
To: Venkat Rao Bagalkote, Dan Williams, Jason Gunthorpe
Cc: Paul E. McKenney, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, gourry, linux-kernel,
linux-next, sfr, Madhavan Srinivasan
On 4/1/25 12:01 AM, Venkat Rao Bagalkote wrote:
>
> On 01/04/25 1:17 am, Dan Williams wrote:
>> Jason Gunthorpe wrote:
>>> On Mon, Mar 31, 2025 at 09:54:55AM -0700, Dan Williams wrote:
>>>> Jason Gunthorpe wrote:
>>>>> On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
>>>>>>> For now the following builds for me, but it is a quite a mess to undo
>>>>>>> the assumption that that the hardware object definitions can not use
>>>>>>> uuid_t:
>>>>>> +Jason.
>>>>> Seems invasive?
>>>> Yeah, it left a bad taste for me as well.
>>>>
>>>>> Maybe just like below?
>>>> I like that this avoids converting to the kernel's uuid API, however,
>>>> not quite happy that it forces userspace to contend with the
>>>> type-conflict with uuid/uuid.h.
>>> Oh I see
>>>
>>>> So how about one more riff on your idea?
>>> Sure, works for me, please post it..
>> b4 am supports scissors lines, so:
>>
>> b4 am -P _ 67eac8df3e217_201f02948d@dwillia2-xfh.jf.intel.com.notmuch
>>
>> ...works for me. Do you still need a separate posting?
>>
>
> This issue got introduced in next-20250307 and got fixed in next-20250311(not sure what fixed).
>
> But again got re-introduced in next-20250318. I tried bisection, below are the logs.
>
> One of the things I tried is to install the UUID packages on my set up and after installing those packages, issue is not seen.
>
> rpm -qa | grep uuid
>
> libuuid-2.37.4-20.el9.ppc64le
> uuid-1.6.2-55.el9.ppc64le
> uuid-c++-1.6.2-55.el9.ppc64le
> uuid-dce-1.6.2-55.el9.ppc64le
> uuid-devel-1.6.2-55.el9.ppc64le
> uuidd-2.37.4-20.el9.ppc64le
> libuuid-devel-2.37.4-20.el9.ppc64le
>
> So wondering is this not a setup issue? Please advice.
uuid/uuid.h only exists if the libuuid-devel package gets installed. And it seems that's where it resides in userspace.
DJ
>
>
> Bisect Log:
>
> git bisect log
> git bisect start
> # status: waiting for both good and bad commits
> # bad: [c4d4884b67802c41fd67399747165d65c770621a] Add linux-next specific files for 20250318
> git bisect bad c4d4884b67802c41fd67399747165d65c770621a
> # status: waiting for good commit(s), bad commit known
> # good: [4701f33a10702d5fc577c32434eb62adde0a1ae1] Linux 6.14-rc7
> git bisect good 4701f33a10702d5fc577c32434eb62adde0a1ae1
> # good: [cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb] Merge branch 'spi-nor/next' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
> git bisect good cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb
> # good: [9b22611592aa21d10f7d1b89352a618436dea7ac] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
> git bisect good 9b22611592aa21d10f7d1b89352a618436dea7ac
> # good: [264791f7669a8246d129cbb935c861debba2f116] Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
> git bisect good 264791f7669a8246d129cbb935c861debba2f116
> # good: [3c51cb2d6ec7cecf724cd5d78a0633f61f31e726] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git
> git bisect good 3c51cb2d6ec7cecf724cd5d78a0633f61f31e726
> # good: [612481dbc16505cf5e940809ebf36d8460d174cf] Merge branch 'main' of git://git.infradead.org/users/willy/xarray.git
> git bisect good 612481dbc16505cf5e940809ebf36d8460d174cf
> # bad: [892715be4379deb333376e573113fd75672eca6c] Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git
> git bisect bad 892715be4379deb333376e573113fd75672eca6c
> # bad: [b33f4167a8a2b9b9cc6b3e06f79b030db82cf530] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
> git bisect bad b33f4167a8a2b9b9cc6b3e06f79b030db82cf530
> # good: [3b5d43245f0a56390baaa670e1b6d898772266b3] Merge branch 'for-6.15/features' into cxl-for-next
> git bisect good 3b5d43245f0a56390baaa670e1b6d898772266b3
> # good: [d11af4ae2169672b690a4d07a9dfdfd76c082683] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git
> git bisect good d11af4ae2169672b690a4d07a9dfdfd76c082683
> # bad: [5908f3ed6dc209e5c824e63afda7545805f75a7e] cxl: Add support to handle user feature commands for get feature
> git bisect bad 5908f3ed6dc209e5c824e63afda7545805f75a7e
> # good: [18285acc2c047cda2449f426c09fc8969b04b8b1] fwctl: Add documentation
> git bisect good 18285acc2c047cda2449f426c09fc8969b04b8b1
> # good: [15a26c223fff58d9fa4ada12a8c35697f8ecdf6c] Merge branch 'for-6.15/features' into fwctl
> git bisect good 15a26c223fff58d9fa4ada12a8c35697f8ecdf6c
> # bad: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl feature command structs to user header
> git bisect bad 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
> # good: [858ce2f56b5253063f61f6b1c58a6dbf5d71da0b] cxl: Add FWCTL support to CXL
> git bisect good 858ce2f56b5253063f61f6b1c58a6dbf5d71da0b
> # first bad commit: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl feature command structs to user header
>
> 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee is the first bad commit
> commit 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
> Author: Dave Jiang <dave.jiang@intel.com>
> Date: Fri Mar 7 13:55:32 2025 -0700
>
> cxl: Move cxl feature command structs to user header
>
> In preparation for cxl fwctl enabling, move data structures related to
> cxl feature commands to a user header file.
>
> Reviewed-by; Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Link: https://patch.msgid.link/r/20250307205648.1021626-3-dave.jiang@intel.com
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> Reviewed-by: Li Ming <ming.li@zohomail.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
>
> include/cxl/features.h | 112 +----------------------------
> include/uapi/cxl/features.h | 169 ++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 170 insertions(+), 111 deletions(-)
> create mode 100644 include/uapi/cxl/features.h
>
>
> Regards,
>
> Venkat.
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-01 15:15 ` Dave Jiang
@ 2025-04-02 0:07 ` Paul E. McKenney
2025-04-02 0:18 ` Dave Jiang
0 siblings, 1 reply; 27+ messages in thread
From: Paul E. McKenney @ 2025-04-02 0:07 UTC (permalink / raw)
To: Dave Jiang
Cc: Venkat Rao Bagalkote, Dan Williams, Jason Gunthorpe, linux-cxl,
dave, jonathan.cameron, alison.schofield, vishal.l.verma,
ira.weiny, gourry, linux-kernel, linux-next, sfr,
Madhavan Srinivasan
On Tue, Apr 01, 2025 at 08:15:55AM -0700, Dave Jiang wrote:
>
>
> On 4/1/25 12:01 AM, Venkat Rao Bagalkote wrote:
> >
> > On 01/04/25 1:17 am, Dan Williams wrote:
> >> Jason Gunthorpe wrote:
> >>> On Mon, Mar 31, 2025 at 09:54:55AM -0700, Dan Williams wrote:
> >>>> Jason Gunthorpe wrote:
> >>>>> On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
> >>>>>>> For now the following builds for me, but it is a quite a mess to undo
> >>>>>>> the assumption that that the hardware object definitions can not use
> >>>>>>> uuid_t:
> >>>>>> +Jason.
> >>>>> Seems invasive?
> >>>> Yeah, it left a bad taste for me as well.
> >>>>
> >>>>> Maybe just like below?
> >>>> I like that this avoids converting to the kernel's uuid API, however,
> >>>> not quite happy that it forces userspace to contend with the
> >>>> type-conflict with uuid/uuid.h.
> >>> Oh I see
> >>>
> >>>> So how about one more riff on your idea?
> >>> Sure, works for me, please post it..
> >> b4 am supports scissors lines, so:
> >>
> >> b4 am -P _ 67eac8df3e217_201f02948d@dwillia2-xfh.jf.intel.com.notmuch
> >>
> >> ...works for me. Do you still need a separate posting?
> >>
> >
> > This issue got introduced in next-20250307 and got fixed in next-20250311(not sure what fixed).
> >
> > But again got re-introduced in next-20250318. I tried bisection, below are the logs.
> >
> > One of the things I tried is to install the UUID packages on my set up and after installing those packages, issue is not seen.
> >
> > rpm -qa | grep uuid
> >
> > libuuid-2.37.4-20.el9.ppc64le
> > uuid-1.6.2-55.el9.ppc64le
> > uuid-c++-1.6.2-55.el9.ppc64le
> > uuid-dce-1.6.2-55.el9.ppc64le
> > uuid-devel-1.6.2-55.el9.ppc64le
> > uuidd-2.37.4-20.el9.ppc64le
> > libuuid-devel-2.37.4-20.el9.ppc64le
> >
> > So wondering is this not a setup issue? Please advice.
>
> uuid/uuid.h only exists if the libuuid-devel package gets installed. And it seems that's where it resides in userspace.
Just to double-check...
As of some fairly recent time, it is now necessary to install the above
seven userspace packages if one wants to do an allmodconfig build of
the kernel? Or will there be a change similar to the ones put forward
earlier in this thread that will allow such builds to be carried out
without additional userspace packages needing to be installed?
I of course do have some concerns about the number of userspace packages
that might be required if CXL is adding seven of them... ;-)
Thanx, Paul
> DJ
>
> >
> >
> > Bisect Log:
> >
> > git bisect log
> > git bisect start
> > # status: waiting for both good and bad commits
> > # bad: [c4d4884b67802c41fd67399747165d65c770621a] Add linux-next specific files for 20250318
> > git bisect bad c4d4884b67802c41fd67399747165d65c770621a
> > # status: waiting for good commit(s), bad commit known
> > # good: [4701f33a10702d5fc577c32434eb62adde0a1ae1] Linux 6.14-rc7
> > git bisect good 4701f33a10702d5fc577c32434eb62adde0a1ae1
> > # good: [cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb] Merge branch 'spi-nor/next' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
> > git bisect good cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb
> > # good: [9b22611592aa21d10f7d1b89352a618436dea7ac] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
> > git bisect good 9b22611592aa21d10f7d1b89352a618436dea7ac
> > # good: [264791f7669a8246d129cbb935c861debba2f116] Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
> > git bisect good 264791f7669a8246d129cbb935c861debba2f116
> > # good: [3c51cb2d6ec7cecf724cd5d78a0633f61f31e726] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git
> > git bisect good 3c51cb2d6ec7cecf724cd5d78a0633f61f31e726
> > # good: [612481dbc16505cf5e940809ebf36d8460d174cf] Merge branch 'main' of git://git.infradead.org/users/willy/xarray.git
> > git bisect good 612481dbc16505cf5e940809ebf36d8460d174cf
> > # bad: [892715be4379deb333376e573113fd75672eca6c] Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git
> > git bisect bad 892715be4379deb333376e573113fd75672eca6c
> > # bad: [b33f4167a8a2b9b9cc6b3e06f79b030db82cf530] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
> > git bisect bad b33f4167a8a2b9b9cc6b3e06f79b030db82cf530
> > # good: [3b5d43245f0a56390baaa670e1b6d898772266b3] Merge branch 'for-6.15/features' into cxl-for-next
> > git bisect good 3b5d43245f0a56390baaa670e1b6d898772266b3
> > # good: [d11af4ae2169672b690a4d07a9dfdfd76c082683] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git
> > git bisect good d11af4ae2169672b690a4d07a9dfdfd76c082683
> > # bad: [5908f3ed6dc209e5c824e63afda7545805f75a7e] cxl: Add support to handle user feature commands for get feature
> > git bisect bad 5908f3ed6dc209e5c824e63afda7545805f75a7e
> > # good: [18285acc2c047cda2449f426c09fc8969b04b8b1] fwctl: Add documentation
> > git bisect good 18285acc2c047cda2449f426c09fc8969b04b8b1
> > # good: [15a26c223fff58d9fa4ada12a8c35697f8ecdf6c] Merge branch 'for-6.15/features' into fwctl
> > git bisect good 15a26c223fff58d9fa4ada12a8c35697f8ecdf6c
> > # bad: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl feature command structs to user header
> > git bisect bad 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
> > # good: [858ce2f56b5253063f61f6b1c58a6dbf5d71da0b] cxl: Add FWCTL support to CXL
> > git bisect good 858ce2f56b5253063f61f6b1c58a6dbf5d71da0b
> > # first bad commit: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl feature command structs to user header
> >
> > 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee is the first bad commit
> > commit 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
> > Author: Dave Jiang <dave.jiang@intel.com>
> > Date: Fri Mar 7 13:55:32 2025 -0700
> >
> > cxl: Move cxl feature command structs to user header
> >
> > In preparation for cxl fwctl enabling, move data structures related to
> > cxl feature commands to a user header file.
> >
> > Reviewed-by; Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Link: https://patch.msgid.link/r/20250307205648.1021626-3-dave.jiang@intel.com
> > Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> > Reviewed-by: Li Ming <ming.li@zohomail.com>
> > Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> > Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> >
> > include/cxl/features.h | 112 +----------------------------
> > include/uapi/cxl/features.h | 169 ++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 170 insertions(+), 111 deletions(-)
> > create mode 100644 include/uapi/cxl/features.h
> >
> >
> > Regards,
> >
> > Venkat.
> >
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-02 0:07 ` Paul E. McKenney
@ 2025-04-02 0:18 ` Dave Jiang
2025-04-02 0:47 ` Stephen Rothwell
0 siblings, 1 reply; 27+ messages in thread
From: Dave Jiang @ 2025-04-02 0:18 UTC (permalink / raw)
To: paulmck
Cc: Venkat Rao Bagalkote, Dan Williams, Jason Gunthorpe, linux-cxl,
dave, jonathan.cameron, alison.schofield, vishal.l.verma,
ira.weiny, gourry, linux-kernel, linux-next, sfr,
Madhavan Srinivasan
On 4/1/25 5:07 PM, Paul E. McKenney wrote:
> On Tue, Apr 01, 2025 at 08:15:55AM -0700, Dave Jiang wrote:
>>
>>
>> On 4/1/25 12:01 AM, Venkat Rao Bagalkote wrote:
>>>
>>> On 01/04/25 1:17 am, Dan Williams wrote:
>>>> Jason Gunthorpe wrote:
>>>>> On Mon, Mar 31, 2025 at 09:54:55AM -0700, Dan Williams wrote:
>>>>>> Jason Gunthorpe wrote:
>>>>>>> On Fri, Mar 28, 2025 at 05:26:42PM -0700, Dave Jiang wrote:
>>>>>>>>> For now the following builds for me, but it is a quite a mess to undo
>>>>>>>>> the assumption that that the hardware object definitions can not use
>>>>>>>>> uuid_t:
>>>>>>>> +Jason.
>>>>>>> Seems invasive?
>>>>>> Yeah, it left a bad taste for me as well.
>>>>>>
>>>>>>> Maybe just like below?
>>>>>> I like that this avoids converting to the kernel's uuid API, however,
>>>>>> not quite happy that it forces userspace to contend with the
>>>>>> type-conflict with uuid/uuid.h.
>>>>> Oh I see
>>>>>
>>>>>> So how about one more riff on your idea?
>>>>> Sure, works for me, please post it..
>>>> b4 am supports scissors lines, so:
>>>>
>>>> b4 am -P _ 67eac8df3e217_201f02948d@dwillia2-xfh.jf.intel.com.notmuch
>>>>
>>>> ...works for me. Do you still need a separate posting?
>>>>
>>>
>>> This issue got introduced in next-20250307 and got fixed in next-20250311(not sure what fixed).
>>>
>>> But again got re-introduced in next-20250318. I tried bisection, below are the logs.
>>>
>>> One of the things I tried is to install the UUID packages on my set up and after installing those packages, issue is not seen.
>>>
>>> rpm -qa | grep uuid
>>>
>>> libuuid-2.37.4-20.el9.ppc64le
>>> uuid-1.6.2-55.el9.ppc64le
>>> uuid-c++-1.6.2-55.el9.ppc64le
>>> uuid-dce-1.6.2-55.el9.ppc64le
>>> uuid-devel-1.6.2-55.el9.ppc64le
>>> uuidd-2.37.4-20.el9.ppc64le
>>> libuuid-devel-2.37.4-20.el9.ppc64le
>>>
>>> So wondering is this not a setup issue? Please advice.
>>
>> uuid/uuid.h only exists if the libuuid-devel package gets installed. And it seems that's where it resides in userspace.
>
> Just to double-check...
>
> As of some fairly recent time, it is now necessary to install the above
> seven userspace packages if one wants to do an allmodconfig build of
> the kernel? Or will there be a change similar to the ones put forward
> earlier in this thread that will allow such builds to be carried out
> without additional userspace packages needing to be installed?
>
> I of course do have some concerns about the number of userspace packages
> that might be required if CXL is adding seven of them... ;-)
Technically it's only 1 package. libuuid-devel. Do the other 6 come with the installation of libuuid-devel?
>
> Thanx, Paul
>
>> DJ
>>
>>>
>>>
>>> Bisect Log:
>>>
>>> git bisect log
>>> git bisect start
>>> # status: waiting for both good and bad commits
>>> # bad: [c4d4884b67802c41fd67399747165d65c770621a] Add linux-next specific files for 20250318
>>> git bisect bad c4d4884b67802c41fd67399747165d65c770621a
>>> # status: waiting for good commit(s), bad commit known
>>> # good: [4701f33a10702d5fc577c32434eb62adde0a1ae1] Linux 6.14-rc7
>>> git bisect good 4701f33a10702d5fc577c32434eb62adde0a1ae1
>>> # good: [cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb] Merge branch 'spi-nor/next' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
>>> git bisect good cda4d1b29991d4500e9f65c6936b5d3ccd99ecbb
>>> # good: [9b22611592aa21d10f7d1b89352a618436dea7ac] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
>>> git bisect good 9b22611592aa21d10f7d1b89352a618436dea7ac
>>> # good: [264791f7669a8246d129cbb935c861debba2f116] Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
>>> git bisect good 264791f7669a8246d129cbb935c861debba2f116
>>> # good: [3c51cb2d6ec7cecf724cd5d78a0633f61f31e726] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git
>>> git bisect good 3c51cb2d6ec7cecf724cd5d78a0633f61f31e726
>>> # good: [612481dbc16505cf5e940809ebf36d8460d174cf] Merge branch 'main' of git://git.infradead.org/users/willy/xarray.git
>>> git bisect good 612481dbc16505cf5e940809ebf36d8460d174cf
>>> # bad: [892715be4379deb333376e573113fd75672eca6c] Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git
>>> git bisect bad 892715be4379deb333376e573113fd75672eca6c
>>> # bad: [b33f4167a8a2b9b9cc6b3e06f79b030db82cf530] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
>>> git bisect bad b33f4167a8a2b9b9cc6b3e06f79b030db82cf530
>>> # good: [3b5d43245f0a56390baaa670e1b6d898772266b3] Merge branch 'for-6.15/features' into cxl-for-next
>>> git bisect good 3b5d43245f0a56390baaa670e1b6d898772266b3
>>> # good: [d11af4ae2169672b690a4d07a9dfdfd76c082683] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay.git
>>> git bisect good d11af4ae2169672b690a4d07a9dfdfd76c082683
>>> # bad: [5908f3ed6dc209e5c824e63afda7545805f75a7e] cxl: Add support to handle user feature commands for get feature
>>> git bisect bad 5908f3ed6dc209e5c824e63afda7545805f75a7e
>>> # good: [18285acc2c047cda2449f426c09fc8969b04b8b1] fwctl: Add documentation
>>> git bisect good 18285acc2c047cda2449f426c09fc8969b04b8b1
>>> # good: [15a26c223fff58d9fa4ada12a8c35697f8ecdf6c] Merge branch 'for-6.15/features' into fwctl
>>> git bisect good 15a26c223fff58d9fa4ada12a8c35697f8ecdf6c
>>> # bad: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl feature command structs to user header
>>> git bisect bad 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
>>> # good: [858ce2f56b5253063f61f6b1c58a6dbf5d71da0b] cxl: Add FWCTL support to CXL
>>> git bisect good 858ce2f56b5253063f61f6b1c58a6dbf5d71da0b
>>> # first bad commit: [9b8e73cdb1418f7c251c43b2082218ed9c0d0fee] cxl: Move cxl feature command structs to user header
>>>
>>> 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee is the first bad commit
>>> commit 9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
>>> Author: Dave Jiang <dave.jiang@intel.com>
>>> Date: Fri Mar 7 13:55:32 2025 -0700
>>>
>>> cxl: Move cxl feature command structs to user header
>>>
>>> In preparation for cxl fwctl enabling, move data structures related to
>>> cxl feature commands to a user header file.
>>>
>>> Reviewed-by; Jonathan Cameron <Jonathan.Cameron@huawei.com>
>>>
>>> Link: https://patch.msgid.link/r/20250307205648.1021626-3-dave.jiang@intel.com
>>> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
>>> Reviewed-by: Li Ming <ming.li@zohomail.com>
>>> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
>>> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
>>>
>>> include/cxl/features.h | 112 +----------------------------
>>> include/uapi/cxl/features.h | 169 ++++++++++++++++++++++++++++++++++++++++++++
>>> 2 files changed, 170 insertions(+), 111 deletions(-)
>>> create mode 100644 include/uapi/cxl/features.h
>>>
>>>
>>> Regards,
>>>
>>> Venkat.
>>>
>>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-02 0:18 ` Dave Jiang
@ 2025-04-02 0:47 ` Stephen Rothwell
2025-04-02 4:21 ` Paul E. McKenney
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2025-04-02 0:47 UTC (permalink / raw)
To: Dave Jiang
Cc: paulmck, Venkat Rao Bagalkote, Dan Williams, Jason Gunthorpe,
linux-cxl, dave, jonathan.cameron, alison.schofield,
vishal.l.verma, ira.weiny, gourry, linux-kernel, linux-next,
Madhavan Srinivasan
[-- Attachment #1: Type: text/plain, Size: 468 bytes --]
Hi all,
On Tue, 1 Apr 2025 17:18:23 -0700 Dave Jiang <dave.jiang@intel.com> wrote:
>
> > I of course do have some concerns about the number of userspace packages
> > that might be required if CXL is adding seven of them... ;-)
>
> Technically it's only 1 package. libuuid-devel. Do the other 6 come
> with the installation of libuuid-devel?
On my debian build machine, I only need uuid-dev and libuuid1 installed ...
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-02 0:47 ` Stephen Rothwell
@ 2025-04-02 4:21 ` Paul E. McKenney
2025-04-02 6:27 ` Venkat Rao Bagalkote
0 siblings, 1 reply; 27+ messages in thread
From: Paul E. McKenney @ 2025-04-02 4:21 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Dave Jiang, Venkat Rao Bagalkote, Dan Williams, Jason Gunthorpe,
linux-cxl, dave, jonathan.cameron, alison.schofield,
vishal.l.verma, ira.weiny, gourry, linux-kernel, linux-next,
Madhavan Srinivasan
On Wed, Apr 02, 2025 at 11:47:22AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> On Tue, 1 Apr 2025 17:18:23 -0700 Dave Jiang <dave.jiang@intel.com> wrote:
> >
> > > I of course do have some concerns about the number of userspace packages
> > > that might be required if CXL is adding seven of them... ;-)
> >
> > Technically it's only 1 package. libuuid-devel. Do the other 6 come
> > with the installation of libuuid-devel?
>
> On my debian build machine, I only need uuid-dev and libuuid1 installed ...
And libuuid-devel works on my Fedora systems.
So the various kernel-build howtos will be updated? Or is a patch
forthcoming?
Thanx, Paul
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-02 4:21 ` Paul E. McKenney
@ 2025-04-02 6:27 ` Venkat Rao Bagalkote
2025-04-02 11:44 ` Jason Gunthorpe
0 siblings, 1 reply; 27+ messages in thread
From: Venkat Rao Bagalkote @ 2025-04-02 6:27 UTC (permalink / raw)
To: paulmck, Stephen Rothwell
Cc: Dave Jiang, Dan Williams, Jason Gunthorpe, linux-cxl, dave,
jonathan.cameron, alison.schofield, vishal.l.verma, ira.weiny,
gourry, linux-kernel, linux-next, Madhavan Srinivasan
On 02/04/25 9:51 am, Paul E. McKenney wrote:
> On Wed, Apr 02, 2025 at 11:47:22AM +1100, Stephen Rothwell wrote:
>> Hi all,
>>
>> On Tue, 1 Apr 2025 17:18:23 -0700 Dave Jiang <dave.jiang@intel.com> wrote:
>>>> I of course do have some concerns about the number of userspace packages
>>>> that might be required if CXL is adding seven of them... ;-)
>>> Technically it's only 1 package. libuuid-devel. Do the other 6 come
>>> with the installation of libuuid-devel
>>> ?
I had to install only libuuid-devel on my system for this to work.
>> On my debian build machine, I only need uuid-dev and libuuid1 installed ...
> And libuuid-devel works on my Fedora systems.
>
> So the various kernel-build howtos will be updated? Or is a patch
> forthcoming?
>
> Thanx, Paul
FYI, now the issue is on the main line kernel also.
Regards,
Venkat.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-02 6:27 ` Venkat Rao Bagalkote
@ 2025-04-02 11:44 ` Jason Gunthorpe
2025-04-02 13:42 ` Venkat Rao Bagalkote
2025-04-02 17:20 ` Paul E. McKenney
0 siblings, 2 replies; 27+ messages in thread
From: Jason Gunthorpe @ 2025-04-02 11:44 UTC (permalink / raw)
To: Venkat Rao Bagalkote
Cc: paulmck, Stephen Rothwell, Dave Jiang, Dan Williams, linux-cxl,
dave, jonathan.cameron, alison.schofield, vishal.l.verma,
ira.weiny, gourry, linux-kernel, linux-next, Madhavan Srinivasan
On Wed, Apr 02, 2025 at 11:57:04AM +0530, Venkat Rao Bagalkote wrote:
> > So the various kernel-build howtos will be updated? Or is a patch
> > forthcoming?
I was going to pick up Dan's patch after the merge window closes
> FYI, now the issue is on the main line kernel also.
I thought the header test stuff was disabled now?? How are people
hitting this?
Jason
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-02 11:44 ` Jason Gunthorpe
@ 2025-04-02 13:42 ` Venkat Rao Bagalkote
2025-04-02 17:20 ` Paul E. McKenney
1 sibling, 0 replies; 27+ messages in thread
From: Venkat Rao Bagalkote @ 2025-04-02 13:42 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: paulmck, Stephen Rothwell, Dave Jiang, Dan Williams, linux-cxl,
dave, jonathan.cameron, alison.schofield, vishal.l.verma,
ira.weiny, gourry, linux-kernel, linux-next, Madhavan Srinivasan
On 02/04/25 5:14 pm, Jason Gunthorpe wrote:
> On Wed, Apr 02, 2025 at 11:57:04AM +0530, Venkat Rao Bagalkote wrote:
>>> So the various kernel-build howtos will be updated? Or is a patch
>>> forthcoming?
> I was going to pick up Dan's patch after the merge window closes
I have tested the proposed patch by applying on top of main line kernel,
and kernel builds with out any issue.
Note: Tested this patch by uninstalling uuid-devel package.
Commit Head on which this patch was
applied:acc4d5ff0b61eb1715c498b6536c38c1feb7f3c1
In case if you decided to merge this patch, please add below tags.
Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>
>> FYI, now the issue is on the main line kernel also.
> I thought the header test stuff was disabled now?? How are people
> hitting this?
On main line, I started seeing this issue with below head commit.
Commit ID: 91e5bfe317d8f8471fbaa3e70cf66cae1314a516
Regards,
Venkat.
>
> Jason
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-04-02 11:44 ` Jason Gunthorpe
2025-04-02 13:42 ` Venkat Rao Bagalkote
@ 2025-04-02 17:20 ` Paul E. McKenney
1 sibling, 0 replies; 27+ messages in thread
From: Paul E. McKenney @ 2025-04-02 17:20 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Venkat Rao Bagalkote, Stephen Rothwell, Dave Jiang, Dan Williams,
linux-cxl, dave, jonathan.cameron, alison.schofield,
vishal.l.verma, ira.weiny, gourry, linux-kernel, linux-next,
Madhavan Srinivasan
On Wed, Apr 02, 2025 at 08:44:12AM -0300, Jason Gunthorpe wrote:
> On Wed, Apr 02, 2025 at 11:57:04AM +0530, Venkat Rao Bagalkote wrote:
> > > So the various kernel-build howtos will be updated? Or is a patch
> > > forthcoming?
>
> I was going to pick up Dan's patch after the merge window closes
Very good, thank you!
> > FYI, now the issue is on the main line kernel also.
>
> I thought the header test stuff was disabled now?? How are people
> hitting this?
For me, an allmodconfig build hits it every time unless I have the
libuuid-devel package installed.
Thanx, Paul
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-31 16:54 ` Dan Williams
2025-03-31 17:17 ` Jason Gunthorpe
@ 2025-04-07 17:49 ` Jason Gunthorpe
1 sibling, 0 replies; 27+ messages in thread
From: Jason Gunthorpe @ 2025-04-07 17:49 UTC (permalink / raw)
To: Dan Williams
Cc: Dave Jiang, Paul E. McKenney, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, gourry, linux-kernel,
linux-next, sfr
On Mon, Mar 31, 2025 at 09:54:55AM -0700, Dan Williams wrote:
> >From 6fbca9bb3e29f3a205861b9489a8fba46506e107 Mon Sep 17 00:00:00 2001
> From: Dan Williams <dan.j.williams@intel.com>
> Date: Mon, 31 Mar 2025 09:43:48 -0700
> Subject: [PATCH] fwctl/cxl: Fix uuid_t usage in uapi
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> The uuid_t type is kernel internal, and Paul reports the following build
> error when it is used in a uapi header:
>
> usr/include/cxl/features.h:59:9: error: unknown type name ‘uuid_t’
>
> Create a uuid type (__uapi_uuid_t) compatible with the longstanding
> definition uuid/uuid.h for userspace builds, and use uuid_t directly for
> kernel builds.
>
> Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
> Reported-by: "Paul E. McKenney" <paulmck@kernel.org>
> Closes: http://lore.kernel.org/f6489337-67c7-48c8-b48a-58603ec15328@paulmck-laptop
> Fixes: 9b8e73cdb141 ("cxl: Move cxl feature command structs to user header")
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> include/uapi/cxl/features.h | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
Applied thanks
Jason
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [BUG -next] ./usr/include/cxl/features.h:11:10: fatal error: uuid/uuid.h: No such file or directory
2025-03-28 23:26 ` Dan Williams
2025-03-28 23:58 ` Paul E. McKenney
2025-03-29 0:26 ` Dave Jiang
@ 2025-04-05 17:34 ` Palmer Dabbelt
2 siblings, 0 replies; 27+ messages in thread
From: Palmer Dabbelt @ 2025-04-05 17:34 UTC (permalink / raw)
To: dan.j.williams
Cc: paulmck, dave.jiang, linux-cxl, dave, jonathan.cameron,
alison.schofield, vishal.l.verma, ira.weiny, dan.j.williams,
gourry, linux-kernel, linux-next, Stephen Rothwell
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7697 bytes --]
On Fri, 28 Mar 2025 16:26:21 PDT (-0700), dan.j.williams@intel.com wrote:
> Paul E. McKenney wrote:
> [..]
>> > > Making the above change got me this:
>> > >
>> > > usr/include/cxl/features.h:59:9: error: unknown type name ‘uuid_t’
>> > I wasn't able to hit that with allmodconfig on x86 with a Fedora 41 build setup. What is the specific command lines you are using?
>>
>> make clean
>> make allmodconfig
>> make -j$N
>>
>> Though encapsulated as follows:
>>
>> tools/testing/selftests/rcutorture/bin/torture.sh --do-none --do-allmodconfig
>
> The problem is that uuid_t is not defined for uapi headers to reuse.
> Perhaps checkpatch should be checking for uuid_t in uapi headers going
> forward.
>
> For now the following builds for me, but it is a quite a mess to undo
> the assumption that that the hardware object definitions can not use
> uuid_t:
>
> -- 8< --
> diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
> index f4daefe3180e..d626dd7c5fbf 100644
> --- a/drivers/cxl/core/features.c
> +++ b/drivers/cxl/core/features.c
> @@ -33,7 +33,11 @@ static bool is_cxl_feature_exclusive_by_uuid(const uuid_t *uuid)
>
> static bool is_cxl_feature_exclusive(struct cxl_feat_entry *entry)
> {
> - return is_cxl_feature_exclusive_by_uuid(&entry->uuid);
> + uuid_t uuid;
> +
> + import_uuid(&uuid, entry->uuid);
> +
> + return is_cxl_feature_exclusive_by_uuid(&uuid);
> }
>
> inline struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds)
> @@ -228,7 +232,7 @@ size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
> return 0;
>
> size_out = min(feat_out_size, cxl_mbox->payload_size);
> - uuid_copy(&pi.uuid, feat_uuid);
> + export_uuid(pi.uuid, feat_uuid);
> pi.selection = selection;
> do {
> data_to_rd_size = min(feat_out_size - data_rcvd_size,
> @@ -282,7 +286,7 @@ int cxl_set_feature(struct cxl_mailbox *cxl_mbox,
> if (!pi)
> return -ENOMEM;
>
> - uuid_copy(&pi->uuid, feat_uuid);
> + export_uuid(pi->uuid, feat_uuid);
> pi->version = feat_version;
> feat_flag &= ~CXL_SET_FEAT_FLAG_DATA_TRANSFER_MASK;
> feat_flag |= CXL_SET_FEAT_FLAG_DATA_SAVED_ACROSS_RESET;
> @@ -360,16 +364,19 @@ get_support_feature_info(struct cxl_features_state *cxlfs,
> const struct fwctl_rpc_cxl *rpc_in)
> {
> struct cxl_feat_entry *feat;
> - const uuid_t *uuid;
> + uuid_t in_uuid;
>
> - if (rpc_in->op_size < sizeof(uuid))
> + if (rpc_in->op_size < sizeof(in_uuid))
> return ERR_PTR(-EINVAL);
>
> - uuid = &rpc_in->set_feat_in.uuid;
> + import_uuid(&in_uuid, rpc_in->set_feat_in.uuid);
>
> for (int i = 0; i < cxlfs->entries->num_features; i++) {
> + uuid_t feat_uuid;
> +
> feat = &cxlfs->entries->ent[i];
> - if (uuid_equal(uuid, &feat->uuid))
> + import_uuid(&feat_uuid, feat->uuid);
> + if (uuid_equal(&in_uuid, &feat_uuid))
> return feat;
> }
>
> @@ -461,6 +468,7 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
> const struct cxl_mbox_get_feat_in *feat_in;
> u16 offset, count, return_code;
> size_t out_size = *out_len;
> + uuid_t uuid;
>
> if (rpc_in->op_size != sizeof(*feat_in))
> return ERR_PTR(-EINVAL);
> @@ -477,9 +485,10 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
> if (!rpc_out)
> return ERR_PTR(-ENOMEM);
>
> - out_size = cxl_get_feature(cxl_mbox, &feat_in->uuid,
> - feat_in->selection, rpc_out->payload,
> - count, offset, &return_code);
> + import_uuid(&uuid, feat_in->uuid);
> + out_size = cxl_get_feature(cxl_mbox, &uuid, feat_in->selection,
> + rpc_out->payload, count, offset,
> + &return_code);
> *out_len = sizeof(struct fwctl_rpc_cxl_out);
> if (!out_size) {
> rpc_out->size = 0;
> @@ -502,6 +511,7 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
> const struct cxl_mbox_set_feat_in *feat_in;
> size_t out_size, data_size;
> u16 offset, return_code;
> + uuid_t uuid;
> u32 flags;
> int rc;
>
> @@ -510,7 +520,8 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
>
> feat_in = &rpc_in->set_feat_in;
>
> - if (is_cxl_feature_exclusive_by_uuid(&feat_in->uuid))
> + import_uuid(&uuid, feat_in->uuid);
> + if (is_cxl_feature_exclusive_by_uuid(&uuid))
> return ERR_PTR(-EPERM);
>
> offset = le16_to_cpu(feat_in->offset);
> @@ -525,9 +536,9 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
> rpc_out->size = 0;
>
> data_size = rpc_in->op_size - sizeof(feat_in->hdr);
> - rc = cxl_set_feature(cxl_mbox, &feat_in->uuid,
> - feat_in->version, feat_in->feat_data,
> - data_size, flags, offset, &return_code);
> + rc = cxl_set_feature(cxl_mbox, &uuid, feat_in->version,
> + feat_in->feat_data, data_size, flags, offset,
> + &return_code);
> if (rc) {
> rpc_out->retval = return_code;
> return no_free_ptr(rpc_out);
> diff --git a/include/uapi/cxl/features.h b/include/uapi/cxl/features.h
> index d6db8984889f..1e3323854994 100644
> --- a/include/uapi/cxl/features.h
> +++ b/include/uapi/cxl/features.h
> @@ -8,11 +8,6 @@
> #define _UAPI_CXL_FEATURES_H_
>
> #include <linux/types.h>
> -#ifndef __KERNEL__
> -#include <uuid/uuid.h>
> -#else
> -#include <linux/uuid.h>
> -#endif
>
> /*
> * struct cxl_mbox_get_sup_feats_in - Get Supported Features input
> @@ -60,7 +55,7 @@ struct cxl_mbox_get_sup_feats_in {
> * Get Supported Features Supported Feature Entry
> */
> struct cxl_feat_entry {
> - uuid_t uuid;
> + __u8 uuid[16];
> __le16 id;
> __le16 get_feat_size;
> __le16 set_feat_size;
> @@ -110,7 +105,7 @@ struct cxl_mbox_get_sup_feats_out {
> * CXL spec r3.2 section 8.2.9.6.2 Table 8-99
> */
> struct cxl_mbox_get_feat_in {
> - uuid_t uuid;
> + __u8 uuid[16];
> __le16 offset;
> __le16 count;
> __u8 selection;
> @@ -143,7 +138,7 @@ enum cxl_get_feat_selection {
> */
> struct cxl_mbox_set_feat_in {
> __struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */,
> - uuid_t uuid;
> + __u8 uuid[16];
> __le32 flags;
> __le16 offset;
> __u8 version;
> diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
> index f2957a3e36fe..d0276ab3a92f 100644
> --- a/tools/testing/cxl/test/mem.c
> +++ b/tools/testing/cxl/test/mem.c
> @@ -1397,7 +1397,7 @@ static int mock_activate_fw(struct cxl_mockmem_data *mdata,
>
> static void fill_feature_vendor_test(struct cxl_feat_entry *feat)
> {
> - feat->uuid = CXL_VENDOR_FEATURE_TEST;
> + export_uuid(feat->uuid, &CXL_VENDOR_FEATURE_TEST);
> feat->id = 0;
> feat->get_feat_size = cpu_to_le16(0x4);
> feat->set_feat_size = cpu_to_le16(0x4);
> @@ -1441,8 +1441,10 @@ static int mock_get_feature(struct cxl_mockmem_data *mdata,
> struct cxl_mbox_cmd *cmd)
> {
> struct cxl_mbox_get_feat_in *input = cmd->payload_in;
> + uuid_t in_uuid;
>
> - if (uuid_equal(&input->uuid, &CXL_VENDOR_FEATURE_TEST))
> + import_uuid(&in_uuid, input->uuid);
> + if (uuid_equal(&in_uuid, &CXL_VENDOR_FEATURE_TEST))
> return mock_get_test_feature(mdata, cmd);
>
> cmd->return_code = CXL_MBOX_CMD_RC_UNSUPPORTED;
> @@ -1485,8 +1487,10 @@ static int mock_set_feature(struct cxl_mockmem_data *mdata,
> struct cxl_mbox_cmd *cmd)
> {
> struct cxl_mbox_set_feat_in *input = cmd->payload_in;
> + uuid_t in_uuid;
>
> - if (uuid_equal(&input->hdr.uuid, &CXL_VENDOR_FEATURE_TEST))
> + import_uuid(&in_uuid, input->hdr.uuid);
> + if (uuid_equal(&in_uuid, &CXL_VENDOR_FEATURE_TEST))
> return mock_set_test_feature(mdata, cmd);
>
> cmd->return_code = CXL_MBOX_CMD_RC_UNSUPPORTED;
I hit this too, also in allmodconfig (and in my case for a cross build,
so I have very few system headers). This seems to fix it, so
Tested-by: Palmer Dabbelt <palmer@rivosinc.com>
Thanks!
^ permalink raw reply [flat|nested] 27+ messages in thread