[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] block/nvme: introduce PMR support from NVMe 1.4 spec
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v4] block/nvme: introduce PMR support from NVMe 1.4 spec |
Date: |
Mon, 23 Mar 2020 13:28:29 +0000 |
On Fri, Mar 20, 2020 at 02:50:29PM -0700, Andrzej Jakowski wrote:
> This patch introduces support for PMR that has been defined as part of NVMe
> 1.4
> spec. User can now specify a pmrdev option that should point to
> HostMemoryBackend.
> pmrdev memory region will subsequently be exposed as PCI BAR 2 in emulated
> NVMe
> device. Guest OS can perform mmio read and writes to the PMR region that will
> stay
> persistent across system reboot.
>
> Signed-off-by: Andrzej Jakowski <address@hidden>
> Reviewed-by: Klaus Jensen <address@hidden>
> ---
> v3:
> - replaced qemu_msync() use with qemu_ram_writeback() to allow pmem_persist()
> or qemu_msync() be called depending on configuration [4] (Stefan)
> - rephrased comments to improve clarity and fixed code style issues [4]
> (Stefan, Klaus)
>
> v2:
> - reworked PMR to use HostMemoryBackend instead of directly mapping PMR
> backend file into qemu [1] (Stefan)
>
> v1:
> - provided support for Bit 1 from PMRWBM register instead of Bit 0 to ensure
> improved performance in virtualized environment [2] (Stefan)
>
> - added check if pmr size is power of two in size [3] (David)
>
> - addressed cross compilation build problems reported by CI environment
>
> [1]: https://lore.kernel.org/qemu-devel/address@hidden/
> [2]:
> https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf
> [3]: https://lore.kernel.org/qemu-devel/address@hidden/
> [4]: https://lore.kernel.org/qemu-devel/address@hidden/
> ---
> Persistent Memory Region (PMR) is a new optional feature provided in NVMe 1.4
> specification. This patch implements initial support for it in NVMe driver.
> ---
> hw/block/Makefile.objs | 2 +-
> hw/block/nvme.c | 109 ++++++++++++++++++++++++++
> hw/block/nvme.h | 2 +
> hw/block/trace-events | 4 +
> include/block/nvme.h | 172 +++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 288 insertions(+), 1 deletion(-)
Excellent, thank you!
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature