Re: [PATCH] nvme-pci: Avoid leak if pci_p2pmem_virt_to_bus() returns null

2019-06-25 Thread Heitke, Kenneth
On 6/24/2019 5:57 PM, Alan Mikhak wrote: Modify nvme_alloc_sq_cmds() to call pci_free_p2pmem() to free the memory it allocated using pci_alloc_p2pmem() in case pci_p2pmem_virt_to_bus() returns null. Make sure not to call pci_free_p2pmem() if pci_alloc_p2pmem() returned null which can happen i

Re: [PATCH v2 6/7] nvme-pci: add device coredump support

2019-05-07 Thread Heitke, Kenneth
On 5/7/2019 10:58 AM, Akinobu Mita wrote: + +static int nvme_get_telemetry_log_blocks(struct nvme_ctrl *ctrl, void *buf, +size_t bytes, loff_t offset) +{ + const size_t chunk_size = ctrl->max_hw_sectors * ctrl->page_size; Just curious if chunk_si

Re: [PATCH v2 4/7] nvme.h: add telemetry log page definisions

2019-05-07 Thread Heitke, Kenneth
On 5/7/2019 10:58 AM, Akinobu Mita wrote: Copy telemetry log page definisions from nvme-cli. Cc: Johannes Berg Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Minwoo Im Signed-off-by: Akinobu Mita --- * v2 - New patch in this version. include/linux/nvme.h

Re: [PATCH v2 6/7] nvme-pci: add device coredump support

2019-05-07 Thread Heitke, Kenneth
On 5/7/2019 10:58 AM, Akinobu Mita wrote: This enables to capture snapshot of controller information via device coredump machanism. s/machanism/mechanism/ The nvme device coredump creates the following coredump files. - regs: NVMe controller registers (00h to 4Fh) - sq: Submission queue

Re: [PATCH v2 0/7] nvme-pci: support device coredump

2019-05-07 Thread Heitke, Kenneth
On 5/7/2019 10:58 AM, Akinobu Mita wrote: This enables to capture snapshot of controller information via device coredump machanism, and it helps diagnose and debug issues. s/machanism/mechanism/ The nvme device coredump is triggered when command timeout occurs, and creates the following co

Re: [PATCH v2 4/7] nvme.h: add telemetry log page definisions

2019-05-07 Thread Heitke, Kenneth
On 5/7/2019 10:58 AM, Akinobu Mita wrote: Copy telemetry log page definisions from nvme-cli. Cc: Johannes Berg Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Minwoo Im Signed-off-by: Akinobu Mita --- * v2 - New patch in this version. include/linux/nvme.h

Re: [PATCH v2 3/7] devcoredump: allow to create several coredump files in one device

2019-05-07 Thread Heitke, Kenneth
On 5/7/2019 10:58 AM, Akinobu Mita wrote: @@ -292,6 +309,12 @@ void dev_coredumpm(struct device *dev, struct module *owner, if (device_add(&devcd->devcd_dev)) goto put_device; + for (i = 0; i < devcd->num_files; i++) { + if (device_create_bin_file(&de

Re: [PATCH v2 08/10] nvme/pci: implement the mdev external queue allocation interface

2019-05-02 Thread Heitke, Kenneth
On 5/2/2019 5:47 AM, Maxim Levitsky wrote: Note that currently the number of hw queues reserved for mdev, has to be pre determined on module load. (I used to allocate the queues dynamicaly on demand, but recent changes to allocate polled/read queues made this somewhat difficult, so I dropped

Re: [PATCH AUTOSEL 4.14 18/37] nvme-pci: fix conflicting p2p resource adds

2019-04-01 Thread Heitke, Kenneth
On 3/29/2019 7:30 PM, Sasha Levin wrote: From: Keith Busch [ Upstream commit 9fe5c59ff6a1e5e26a39b75489a1420e7eaaf0b1 ] The nvme pci driver had been adding its CMB resource to the P2P DMA subsystem everytime on on a controller reset. This results in the following warning:

Re: [PATCH AUTOSEL 4.19 28/57] nvme-pci: fix conflicting p2p resource adds

2019-04-01 Thread Heitke, Kenneth
On 3/29/2019 7:28 PM, Sasha Levin wrote: From: Keith Busch [ Upstream commit 9fe5c59ff6a1e5e26a39b75489a1420e7eaaf0b1 ] The nvme pci driver had been adding its CMB resource to the P2P DMA subsystem everytime on on a controller reset. This results in the following warning: