From: kernel test robot <lkp@intel.com>
To: Chaitanya Kulkarni <kch@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 4/4] vfio-nvme: implement TP4159 live migration cmds
Date: Mon, 4 Aug 2025 04:40:04 +0800 [thread overview]
Message-ID: <202508040432.A5v60BDB-lkp@intel.com> (raw)
In-Reply-To: <20250803024705.10256-5-kch@nvidia.com>
Hi Chaitanya,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on awilliam-vfio/next]
[also build test WARNING on axboe-block/for-next linus/master v6.16 next-20250801]
[cannot apply to linux-nvme/for-next awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Chaitanya-Kulkarni/vfio-nvme-add-vfio-nvme-lm-driver-infrastructure/20250803-105056
base: https://github.com/awilliam/linux-vfio.git next
patch link: https://lore.kernel.org/r/20250803024705.10256-5-kch%40nvidia.com
patch subject: [RFC PATCH 4/4] vfio-nvme: implement TP4159 live migration cmds
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250804/202508040432.A5v60BDB-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250804/202508040432.A5v60BDB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508040432.A5v60BDB-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/vfio/pci/nvme/nvme.c:332:18: warning: variable 'hdr' is uninitialized when used here [-Wuninitialized]
332 | if (le16_to_cpu(hdr->nvmecss) > NVME_LM_MAX_NVMECS ||
| ^~~
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
91 | #define le16_to_cpu __le16_to_cpu
| ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
drivers/vfio/pci/nvme/nvme.c:310:32: note: initialize the variable 'hdr' to silence this warning
310 | struct nvme_lm_ctrl_state *hdr;
| ^
| = NULL
1 warning generated.
vim +/hdr +332 drivers/vfio/pci/nvme/nvme.c
303
304 static int nvmevf_get_ctrl_state(struct pci_dev *dev,
305 __u8 csvi, __u8 csuuidi, __u8 csuidxp,
306 struct nvmevf_migration_file *migf,
307 struct nvme_lm_ctrl_state_info *state)
308 {
309 struct nvme_command c = { };
310 struct nvme_lm_ctrl_state *hdr;
311 /* Make sure hdr_len is a multiple of 4 */
312 size_t hdr_len = ALIGN(sizeof(*hdr), 4);
313 __u16 id = nvme_get_ctrl_id(dev);
314 void *local_buf;
315 size_t len;
316 int ret;
317
318 /* Step 1: Issue Migration Receive (Select = 0) to get header */
319 local_buf = kzalloc(hdr_len, GFP_KERNEL);
320 if (!local_buf)
321 return -ENOMEM;
322
323 nvmevf_init_get_ctrl_state_cmd(&c, id, csvi, csuuidi, csuidxp, hdr_len);
324 ret = nvme_submit_vf_cmd(dev, &c, NULL, local_buf, hdr_len);
325 if (ret) {
326 dev_warn(&dev->dev,
327 "nvme_admin_lm_recv failed (ret=0x%x)\n", ret);
328 kfree(local_buf);
329 return ret;
330 }
331
> 332 if (le16_to_cpu(hdr->nvmecss) > NVME_LM_MAX_NVMECS ||
333 le16_to_cpu(hdr->vss) > NVME_LM_MAX_VSD) {
334 kfree(local_buf);
335 return -EINVAL;
336 }
337
338 hdr = local_buf;
339 len = hdr_len + 4 * (le16_to_cpu(hdr->nvmecss) + le16_to_cpu(hdr->vss));
340
341 kfree(local_buf);
342
343 if (len == hdr_len)
344 dev_warn(&dev->dev, "nvmecss == 0 or vss = 0\n");
345
346 /* Step 2: Allocate full buffer */
347 migf->total_length = len;
348 migf->vf_data = kvzalloc(migf->total_length, GFP_KERNEL);
349 if (!migf->vf_data)
350 return -ENOMEM;
351
352 memset(&c, 0, sizeof(c));
353 nvmevf_init_get_ctrl_state_cmd(&c, id, csvi, csuuidi, csuidxp, len);
354 ret = nvme_submit_vf_cmd(dev, &c, NULL, migf->vf_data, len);
355 if (ret)
356 goto free_big;
357
358 /* Populate state struct */
359 hdr = (struct nvme_lm_ctrl_state *)migf->vf_data;
360 state->raw = hdr;
361 state->total_len = len;
362 state->version = hdr->version;
363 state->csattr = hdr->csattr;
364 state->nvmecss = hdr->nvmecss;
365 state->vss = hdr->vss;
366 state->nvme_cs = hdr->data;
367 state->vsd = hdr->data + le16_to_cpu(hdr->nvmecss) * 4;
368
369 return ret;
370
371 free_big:
372 kvfree(migf->vf_data);
373 return ret;
374 }
375
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-08-03 20:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-03 2:47 [RFC PATCH 0/4] Add new VFIO PCI driver for NVMe devices Chaitanya Kulkarni
2025-08-03 2:47 ` [RFC PATCH 1/4] vfio-nvme: add vfio-nvme lm driver infrastructure Chaitanya Kulkarni
2025-08-04 15:20 ` Shameerali Kolothum Thodi
2025-08-04 16:43 ` Bjorn Helgaas
2025-08-04 17:15 ` Alex Williamson
2025-08-03 2:47 ` [RFC PATCH 2/4] nvme: add live migration TP 4159 definitions Chaitanya Kulkarni
2025-08-03 23:04 ` kernel test robot
2025-08-03 2:47 ` [RFC PATCH 3/4] nvme: export helpers to implement vfio-nvme lm Chaitanya Kulkarni
2025-08-03 2:47 ` [RFC PATCH 4/4] vfio-nvme: implement TP4159 live migration cmds Chaitanya Kulkarni
2025-08-03 20:40 ` kernel test robot [this message]
2025-08-04 16:41 ` Bjorn Helgaas
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=202508040432.A5v60BDB-lkp@intel.com \
--to=lkp@intel.com \
--cc=kch@nvidia.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.