Re: [PATCH 0/2] hw/nvme: two fixes

2023-08-09 Thread Jesper Devantier
On Tue, Aug 08, 2023 at 05:16:12PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Fix two potential accesses to null pointers. > > Klaus Jensen (2): > hw/nvme: fix null pointer access in directive receive > hw/nvme: fix null pointer access in ruh update > > hw/nvme/ctrl.c | 10

Re: [PATCH 0/4] hw/nvme: tp4146 misc

2023-06-09 Thread Jesper Devantier
On Wed, May 24, 2023 at 01:19:00PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > A set of fixes and small quality-of-life improvements for the TP4146 > ("Flexible Data Placement") support. > > Klaus Jensen (4): > hw/nvme: fix verification of number of ruhis > hw/nvme: verify

[PATCH v3 5/5] hw/nvme: flexible data placement emulation

2023-02-20 Thread Jesper Devantier
From: Jesper Devantier Add emulation of TP4146 ("Flexible Data Placement"). Signed-off-by: Jesper Devantier Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 698 ++- hw/nvme/ns.c | 143 + hw/nvme/nvme.h | 85 +

[PATCH v3 4/5] hw/nvme: basic directives support

2023-02-20 Thread Jesper Devantier
From: Gollu Appalanaidu Add support for the Directive Send and Recv commands and the Identify directive. Signed-off-by: Klaus Jensen Signed-off-by: Gollu Appalanaidu --- hw/nvme/ctrl.c | 40 +++- hw/nvme/nvme.h | 2 ++ include/block/nvme.h |

[PATCH v3 0/5] Support Flexible Data Placement (FDP)

2023-02-20 Thread Jesper Devantier
(Keith) - removed unused NVMe directives struct (Keith) Gollu Appalanaidu (1): hw/nvme: basic directives support Jesper Devantier (1): hw/nvme: flexible data placement emulation Joel Granados (1): hw/nvme: move adjustment of data_units{read,written} Klaus Jensen (1): hw/nvme: add bas

[PATCH v3 3/5] hw/nvme: add basic endurance group support

2023-02-20 Thread Jesper Devantier
From: Klaus Jensen Add the mandatory Endurance Group identify data structures and log pages. For now, all namespaces in a subsystem belongs to a single Endurance Group. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 48 +++- hw/nvme/ns.c

[PATCH v3 2/5] hw/nvme: store a pointer to the NvmeSubsystem in the NvmeNamespace

2023-02-20 Thread Jesper Devantier
From: Niklas Cassel Each NvmeNamespace can be used by serveral controllers, but a NvmeNamespace can at most belong to a single NvmeSubsystem. Store a pointer to the NvmeSubsystem, if the namespace was realized with a NvmeSubsystem. Signed-off-by: Niklas Cassel Signed-off-by: Klaus Jensen ---

[PATCH v3 1/5] hw/nvme: move adjustment of data_units{read,written}

2023-02-20 Thread Jesper Devantier
From: Joel Granados In order to return the units_{read/written} required by the SMART log we need to shift the number of bytes value by BDRV_SECTORS_BITS and multiply by 1000. This is a prep patch that moves this adjustment to where the SMART log is calculated in order to use the stats struct

[PATCH v2 1/5] hw/nvme: move adjustment of data_units{read,written}

2023-02-17 Thread Jesper Devantier
From: Joel Granados In order to return the units_{read/written} required by the SMART log we need to shift the number of bytes value by BDRV_SECTORS_BITS and multiply by 1000. This is a prep patch that moves this adjustment to where the SMART log is calculated in order to use the stats struct

[PATCH v2 5/5] hw/nvme: flexible data placement emulation

2023-02-17 Thread Jesper Devantier
From: Jesper Devantier Add emulation of TP4146 ("Flexible Data Placement"). Signed-off-by: Jesper Devantier Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 703 ++- hw/nvme/ns.c | 142 + hw/nvme/nvme.h | 85 +

[PATCH v2 2/5] hw/nvme: store a pointer to the NvmeSubsystem in the NvmeNamespace

2023-02-17 Thread Jesper Devantier
From: Niklas Cassel Each NvmeNamespace can be used by serveral controllers, but a NvmeNamespace can at most belong to a single NvmeSubsystem. Store a pointer to the NvmeSubsystem, if the namespace was realized with a NvmeSubsystem. Signed-off-by: Niklas Cassel Signed-off-by: Klaus Jensen ---

[PATCH v2 4/5] hw/nvme: basic directives support

2023-02-17 Thread Jesper Devantier
From: Gollu Appalanaidu Add support for the Directive Send and Recv commands and the Identify directive. Signed-off-by: Klaus Jensen Signed-off-by: Gollu Appalanaidu --- hw/nvme/ctrl.c | 40 +++- hw/nvme/nvme.h | 2 ++ include/block/nvme.h |

[PATCH v2 3/5] hw/nvme: add basic endurance group support

2023-02-17 Thread Jesper Devantier
From: Klaus Jensen Add the mandatory Endurance Group identify data structures and log pages. For now, all namespaces in a subsystem belongs to a single Endurance Group. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 48 +++- hw/nvme/ns.c

[PATCH v2 0/5] Support Flexible Data Placement (FDP)

2023-02-17 Thread Jesper Devantier
directives. The final patch adds FDP support itself. Changelog: == * v1 -> v2: - "hw/nvme: add fleible...": check that max 128 placement handles are being created (Keith) - removed unused NVMe directives struct (Keith) Gollu Appalanaidu (1): hw/nvme: basic dir

Re: [PATCH 5/5] hw/nvme: flexible data placement emulation

2023-02-16 Thread Jesper Devantier
Correct. We deliberately allow enabling fdp as a startup parameter to side-step the need for NS mgmt. You are also correct on the second point - the NS placement handle list can at most hold 128 elements. > On 16 Feb 2023, at 19.26, Keith Busch wrote: > > This mostly looks fine. I need to

[PATCH 2/5] hw/nvme: store a pointer to the NvmeSubsystem in the NvmeNamespace

2023-02-16 Thread Jesper Devantier
From: Niklas Cassel Each NvmeNamespace can be used by serveral controllers, but a NvmeNamespace can at most belong to a single NvmeSubsystem. Store a pointer to the NvmeSubsystem, if the namespace was realized with a NvmeSubsystem. Signed-off-by: Niklas Cassel Signed-off-by: Klaus Jensen ---

[PATCH 5/5] hw/nvme: flexible data placement emulation

2023-02-16 Thread Jesper Devantier
From: Jesper Devantier Add emulation of TP4146 ("Flexible Data Placement"). Signed-off-by: Jesper Devantier Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 703 ++- hw/nvme/ns.c | 141 + hw/nvme/nvme.h | 85 +

[PATCH 3/5] hw/nvme: add basic endurance group support

2023-02-16 Thread Jesper Devantier
From: Klaus Jensen Add the mandatory Endurance Group identify data structures and log pages. For now, all namespaces in a subsystem belongs to a single Endurance Group. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 48 +++- hw/nvme/ns.c

[PATCH 0/5] Support Flexible Data Placement (FDP)

2023-02-16 Thread Jesper Devantier
directives. The final patch adds FDP support itself. Gollu Appalanaidu (1): hw/nvme: basic directives support Jesper Devantier (1): hw/nvme: flexible data placement emulation Joel Granados (1): hw/nvme: move adjustment of data_units{read,written} Klaus Jensen (1): hw/nvme: add basic endur

[PATCH 4/5] hw/nvme: basic directives support

2023-02-16 Thread Jesper Devantier
From: Gollu Appalanaidu Add support for the Directive Send and Recv commands and the Identify directive. Signed-off-by: Klaus Jensen Signed-off-by: Gollu Appalanaidu --- hw/nvme/ctrl.c | 40 +++- hw/nvme/nvme.h | 2 ++ include/block/nvme.h |

[PATCH 1/5] hw/nvme: move adjustment of data_units{read,written}

2023-02-16 Thread Jesper Devantier
From: Joel Granados In order to return the units_{read/written} required by the SMART log we need to shift the number of bytes value by BDRV_SECTORS_BITS and multiply by 1000. This is a prep patch that moves this adjustment to where the SMART log is calculated in order to use the stats struct