[PULL 24/56] hw/block/nvme: enum style fix

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen Align with existing style and use a typedef for header-file enums. Signed-off-by: Klaus Jensen Tested-by: Dmitry Fomichev Reviewed-by: Dmitry Fomichev --- hw/block/nvme-ns.h | 4 ++-- include/block/nvme.h | 4 ++-- hw/block/nvme.c | 19 +-- 3

[PULL 22/56] hw/block/nvme: fix shutdown/reset logic

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen A shutdown is only about flushing stuff. It is the host that should delete any queues, so do not perform a reset here. Also, on shutdown, make sure that the PMR is flushed if in use. Fixes: 368f4e752cf9 ("hw/block/nvme: Process controller reset and shutdown differently")

[PULL 19/56] hw/block/nvme: Document zoned parameters in usage text

2021-02-08 Thread Klaus Jensen
From: Dmitry Fomichev Added brief descriptions of the new device properties that are now available to users to configure features of Zoned Namespace Command Set in the emulator. This patch is for documentation only, no functionality change. Signed-off-by: Dmitry Fomichev Reviewed-by: Niklas

[PULL 11/56] hw/block/nvme: Combine nvme_write_zeroes() and nvme_write()

2021-02-08 Thread Klaus Jensen
From: Dmitry Fomichev Move write processing to nvme_do_write() that now handles both WRITE and WRITE ZEROES. Both nvme_write() and nvme_write_zeroes() become inline helper functions. Signed-off-by: Dmitry Fomichev Reviewed-by: Niklas Cassel Reviewed-by: Keith Busch Signed-off-by: Klaus

[PULL 09/56] hw/block/nvme: Generate namespace UUIDs

2021-02-08 Thread Klaus Jensen
From: Dmitry Fomichev In NVMe 1.4, a namespace must report an ID descriptor of UUID type if it doesn't support EUI64 or NGUID. Add a new namespace property, "uuid", that provides the user the option to either specify the UUID explicitly or have a UUID generated automatically every time a

[PULL 21/56] hw/block/nvme: conditionally enable DULBE for zoned namespaces

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen The device uses the BDRV_BLOCK_ZERO flag to determine the "deallocated" status of logical blocks. Since the zoned namespaces command set specification defines that logical blocks SHALL be marked as deallocated when the zone is in the Empty or Offline states, DULBE can only be

[PULL 06/56] hw/block/nvme: add compare command

2021-02-08 Thread Klaus Jensen
From: Gollu Appalanaidu Add the Compare command. This implementation uses a bounce buffer to read in the data from storage and then compare with the host supplied buffer. Signed-off-by: Gollu Appalanaidu [k.jensen: rebased] Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im Reviewed-by:

[PULL 10/56] hw/block/nvme: Separate read and write handlers

2021-02-08 Thread Klaus Jensen
From: Dmitry Fomichev The majority of code in nvme_rw() is becoming read- or write-specific. Move these parts to two separate handlers, nvme_read() and nvme_write() to make the code more readable and to remove multiple is_write checks that has been present in the i/o path. This is a refactoring

[PULL 14/56] hw/block/nvme: Support allocated CNS command variants

2021-02-08 Thread Klaus Jensen
From: Niklas Cassel Many CNS commands have "allocated" command variants. These include a namespace as long as it is allocated, that is a namespace is included regardless if it is active (attached) or not. While these commands are optional (they are mandatory for controllers supporting the

[PULL 07/56] hw/block/nvme: fix bad clearing of CAP

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen Commit 37712e00b1f0 ("hw/block/nvme: factor out pmr setup") changed the control flow such that the CAP register is erronously cleared after nvme_init_pmr() has configured it. Since the entire NvmeCtrl structure is zero-filled initially, there is no need for the explicit

[PULL 03/56] hw/block/nvme: add dulbe support

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen Add support for reporting the Deallocated or Unwritten Logical Block Error (DULBE). Rely on the block status flags reported by the block layer and consider any block with the BDRV_BLOCK_ZERO flag to be deallocated. Multiple factors affect when a Write Zeroes command result

[PULL 04/56] nvme: add namespace I/O optimization fields to shared header

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen This adds the NPWG, NPWA, NPDG, NPDA and NOWS family of fields to the shared nvme.h header for use by later patches. Signed-off-by: Klaus Jensen Cc: Stefan Hajnoczi Cc: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Minwoo Im --- include/block/nvme.h | 7 ++- 1

[PULL 02/56] hw/block/nvme: pull aio error handling

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen Add a new function, nvme_aio_err, to handle errors resulting from AIOs and use this from the callbacks. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 61 + 1 file changed, 36 insertions(+), 25 deletions(-) diff --git

[PULL 08/56] hw/block/nvme: Process controller reset and shutdown differently

2021-02-08 Thread Klaus Jensen
From: Dmitry Fomichev Controller reset ans subsystem shutdown are handled very much the same in the current code, but some of the steps should be different in these two cases. Introduce two new functions, nvme_reset_ctrl() and nvme_shutdown_ctrl(), to separate some portions of the code from

[PULL 05/56] hw/block/nvme: add the dataset management command

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen Add support for the Dataset Management command and the Deallocate attribute. Deallocation results in discards being sent to the underlying block device. Whether of not the blocks are actually deallocated is affected by the same factors as Write Zeroes (see previous commit).

[PULL 01/56] hw/block/nvme: remove superfluous NvmeCtrl parameter

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen nvme_check_bounds has no use of the NvmeCtrl parameter; remove it. Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im --- hw/block/nvme.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index

[PULL 00/56] emulated nvme patches

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen The following changes since commit 4f799257b323e1238a900fd0c71c2057863e0308: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-02-08' into staging (2021-02-08 16:12:21 +) are available in the Git repository at: git://git.infradead.org/qemu-nvme.git

Re: [RFC PATCH v2 0/4] Allow changing bs->file on reopen

2021-02-08 Thread Vladimir Sementsov-Ogievskiy
08.02.2021 21:44, Alberto Garcia wrote: Hi, this series allows changing bs->file using x-blockdev-reopen. Read here for more details: https://lists.gnu.org/archive/html/qemu-block/2021-01/msg00437.html Version 2 of the series introduces a very significant change: x-blockdev-reopen now

Re: [PULL v3 00/27] Block patches

2021-02-08 Thread Thomas Huth
On 08/02/2021 21.21, Stefan Hajnoczi wrote: On Mon, Feb 08, 2021 at 11:02:57AM +0100, Philippe Mathieu-Daudé wrote: On 2/8/21 10:27 AM, Stefan Hajnoczi wrote: On Sat, Feb 06, 2021 at 05:03:20PM +, Peter Maydell wrote: On Fri, 5 Feb 2021 at 22:53, Peter Maydell wrote: On Fri, 5 Feb 2021

Re: [PATCH v4 02/10] iotests/297: Rewrite in Python and extend reach

2021-02-08 Thread Willian Rampazzo
On 1/18/21 7:09 AM, Max Reitz wrote: On 15.01.21 20:27, Willian Rampazzo wrote: On Fri, Jan 15, 2021 at 2:43 PM Max Reitz wrote: Instead of checking iotests.py only, check all Python files in the qemu-iotests/ directory.  Of course, most of them do not pass, so there is an extensive skip

Re: [PULL v3 00/27] Block patches

2021-02-08 Thread Alex Bennée
Jag Raman writes: >> On Feb 8, 2021, at 5:02 AM, Philippe Mathieu-Daudé wrote: >> >> On 2/8/21 10:27 AM, Stefan Hajnoczi wrote: >>> On Sat, Feb 06, 2021 at 05:03:20PM +, Peter Maydell wrote: On Fri, 5 Feb 2021 at 22:53, Peter Maydell wrote: > > On Fri, 5 Feb 2021 at

Re: [PATCH] hw/sd/sdhci: Do not modify BlockSizeRegister if transaction in progress

2021-02-08 Thread Philippe Mathieu-Daudé
On Mon, Feb 8, 2021 at 8:59 PM Mauro Matteo Cascella wrote: > On Mon, Feb 8, 2021 at 8:35 PM Philippe Mathieu-Daudé wrote: > > > > Per the "SD Host Controller Simplified Specification Version 2.00" > > spec. 'Table 2-4 : Block Size Register': > > > > Transfer Block Size [...] can be accessed

Re: [PATCH] hw/sd/sdhci: Do not modify BlockSizeRegister if transaction in progress

2021-02-08 Thread Mauro Matteo Cascella
On Mon, Feb 8, 2021 at 8:35 PM Philippe Mathieu-Daudé wrote: > > Per the "SD Host Controller Simplified Specification Version 2.00" > spec. 'Table 2-4 : Block Size Register': > > Transfer Block Size [...] can be accessed only if no > transaction is executing (i.e., after a transaction has

Re: [PATCH 1/4] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_DEVICES

2021-02-08 Thread Peter Maydell
On Mon, 8 Feb 2021 at 20:04, Philippe Mathieu-Daudé wrote: > > We want to be able to use the 'SH4' config for architecture > specific features. As CONFIG_SH4 is only used to select > peripherals, rename it CONFIG_SH4_DEVICES. > > Reviewed-by: Alex Bennée > Signed-off-by: Philippe Mathieu-Daudé

Re: [PULL v3 00/27] Block patches

2021-02-08 Thread Stefan Hajnoczi
On Mon, Feb 08, 2021 at 11:02:57AM +0100, Philippe Mathieu-Daudé wrote: > On 2/8/21 10:27 AM, Stefan Hajnoczi wrote: > > On Sat, Feb 06, 2021 at 05:03:20PM +, Peter Maydell wrote: > >> On Fri, 5 Feb 2021 at 22:53, Peter Maydell > >> wrote: > >>> > >>> On Fri, 5 Feb 2021 at 16:45, Stefan

Re: [PULL v3 00/27] Block patches

2021-02-08 Thread Jag Raman
> On Feb 8, 2021, at 5:02 AM, Philippe Mathieu-Daudé wrote: > > On 2/8/21 10:27 AM, Stefan Hajnoczi wrote: >> On Sat, Feb 06, 2021 at 05:03:20PM +, Peter Maydell wrote: >>> On Fri, 5 Feb 2021 at 22:53, Peter Maydell wrote: On Fri, 5 Feb 2021 at 16:45, Stefan Hajnoczi wrote:

[PATCH] hw/sd/sdhci: Do not modify BlockSizeRegister if transaction in progress

2021-02-08 Thread Philippe Mathieu-Daudé
Per the "SD Host Controller Simplified Specification Version 2.00" spec. 'Table 2-4 : Block Size Register': Transfer Block Size [...] can be accessed only if no transaction is executing (i.e., after a transaction has stopped). Read operations during transfers may return an invalid value,

Re: [PATCH 1/2] hw/block/nvme: use locally assigned QEMU IEEE OUI

2021-02-08 Thread Klaus Jensen
On Feb 8 19:56, Philippe Mathieu-Daudé wrote: > On 2/8/21 3:10 PM, Klaus Jensen wrote: > > From: Gollu Appalanaidu > > > > Commit 6eb7a071292a ("hw/block/nvme: change controller pci id") changed > > the controller to use a Red Hat assigned PCI Device and Vendor ID, but > > did not change the

Re: [PATCH 1/2] hw/block/nvme: use locally assigned QEMU IEEE OUI

2021-02-08 Thread Philippe Mathieu-Daudé
On 2/8/21 3:10 PM, Klaus Jensen wrote: > From: Gollu Appalanaidu > > Commit 6eb7a071292a ("hw/block/nvme: change controller pci id") changed > the controller to use a Red Hat assigned PCI Device and Vendor ID, but > did not change the IEEE OUI away from the Intel IEEE OUI. > > Fix that and use

Re: [PATCH] hw/block/nvme: add broadcast nsid support flush command

2021-02-08 Thread Klaus Jensen
On Feb 9 03:59, Keith Busch wrote: > On Mon, Jan 25, 2021 at 09:42:31PM +0100, Klaus Jensen wrote: > > @@ -1644,10 +1679,56 @@ static uint16_t nvme_compare(NvmeCtrl *n, > > NvmeRequest *req) > > > > static uint16_t nvme_flush(NvmeCtrl *n, NvmeRequest *req) > > { > > -

[RFC PATCH v2 4/4] iotests: Test reopening multiple devices at the same time

2021-02-08 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/245 | 40 ++ tests/qemu-iotests/245.out | 4 ++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index 850c9f070b..d18dbbe638 100755 ---

[RFC PATCH v2 3/4] block: Support multiple reopening with x-blockdev-reopen

2021-02-08 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- qapi/block-core.json | 2 +- include/block/block.h | 1 + block.c| 16 +-- blockdev.c | 85 +- tests/qemu-iotests/155 | 9 ++-- tests/qemu-iotests/165 | 4 +-

[RFC PATCH v2 2/4] iotests: Update 245 to support replacing files with x-blockdev-reopen

2021-02-08 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/245 | 54 +- tests/qemu-iotests/245.out | 4 +-- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index f9d68b3958..bad6911f0c 100755 ---

[RFC PATCH v2 0/4] Allow changing bs->file on reopen

2021-02-08 Thread Alberto Garcia
Hi, this series allows changing bs->file using x-blockdev-reopen. Read here for more details: https://lists.gnu.org/archive/html/qemu-block/2021-01/msg00437.html Version 2 of the series introduces a very significant change: x-blockdev-reopen now receives a list of BlockdevOptions instead of

[RFC PATCH v2 1/4] block: Allow changing bs->file on reopen

2021-02-08 Thread Alberto Garcia
When the x-blockdev-reopen was added it allowed reconfiguring the graph by replacing backing files, but changing the 'file' option was forbidden. Because of this restriction some operations are not possible, notably inserting and removing block filters. This patch adds support for replacing the

Re: [PATCH] hw/block/nvme: add broadcast nsid support flush command

2021-02-08 Thread Keith Busch
On Mon, Jan 25, 2021 at 09:42:31PM +0100, Klaus Jensen wrote: > @@ -1644,10 +1679,56 @@ static uint16_t nvme_compare(NvmeCtrl *n, NvmeRequest > *req) > > static uint16_t nvme_flush(NvmeCtrl *n, NvmeRequest *req) > { > -block_acct_start(blk_get_stats(req->ns->blkconf.blk), >acct, 0, > -

Re: [PATCH 0/2] hw/block/nvme: add support for telemetry log pages

2021-02-08 Thread Klaus Jensen
On Feb 9 00:40, Keith Busch wrote: > On Mon, Feb 08, 2021 at 03:10:10PM +0100, Klaus Jensen wrote: > > From: Klaus Jensen > > > > This adds support for the telemetry log pages and fixes up the > > controller IEEE OUI. > > Patch 1 is fine. > > I don't see the point for patch 2. We don't need

Re: [PATCH v2] qemu-nbd: Use SOMAXCONN for socket listen() backlog

2021-02-08 Thread Eric Blake
On 2/8/21 4:00 AM, Daniel P. Berrangé wrote: > On Fri, Feb 05, 2021 at 12:57:05PM -0600, Eric Blake wrote: >> Our default of a backlog of 1 connection is rather puny, particularly >> for scenarios where we expect multiple listeners to connect (such as >> qemu-nbd -e X). This is especially

Re: [PATCH] hw/block/nvme: add broadcast nsid support flush command

2021-02-08 Thread Klaus Jensen
On Jan 25 21:42, Klaus Jensen wrote: > From: Gollu Appalanaidu > > Add support for using the broadcast nsid to issue a flush on all > namespaces through a single command. > Gentle ping on this. signature.asc Description: PGP signature

Re: [PATCH RFC v2 4/8] hw/block/nvme: try to deal with the iov/qsg duality

2021-02-08 Thread Klaus Jensen
On Feb 9 00:45, Keith Busch wrote: > On Sun, Feb 07, 2021 at 10:49:36PM +0100, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Introduce NvmeSg and try to deal with that pesky qsg/iov duality that > > haunts all the memory-related functions. > > > > Signed-off-by: Klaus Jensen > > --- > >

Re: [PATCH RFC v2 4/8] hw/block/nvme: try to deal with the iov/qsg duality

2021-02-08 Thread Keith Busch
On Sun, Feb 07, 2021 at 10:49:36PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > Introduce NvmeSg and try to deal with that pesky qsg/iov duality that > haunts all the memory-related functions. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.h | 8 ++- > hw/block/nvme.c | 171

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-02-08 Thread Edgar E. Iglesias
On Mon, Feb 8, 2021 at 3:42 PM Bin Meng wrote: > On Thu, Jan 21, 2021 at 10:18 PM Francisco Iglesias > wrote: > > > > Hi Bin, > > > > On [2021 Jan 21] Thu 16:59:51, Bin Meng wrote: > > > Hi Francisco, > > > > > > On Thu, Jan 21, 2021 at 4:50 PM Francisco Iglesias > > > wrote: > > > > > > > >

Re: [PATCH RFC v2 2/8] hw/block/nvme: remove block accounting for write zeroes

2021-02-08 Thread Minwoo Im
On 21-02-07 22:49:34, Klaus Jensen wrote: > From: Klaus Jensen > > A Write Zeroes commands should not be counted in either the 'Data Units > Written' or in 'Host Write Commands' SMART/Health Information Log page. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH 0/2] hw/block/nvme: add support for telemetry log pages

2021-02-08 Thread Keith Busch
On Mon, Feb 08, 2021 at 03:10:10PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > This adds support for the telemetry log pages and fixes up the > controller IEEE OUI. Patch 1 is fine. I don't see the point for patch 2. We don't need an empty implementation for every optional spec feature

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-02-08 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:18 PM Francisco Iglesias wrote: > > Hi Bin, > > On [2021 Jan 21] Thu 16:59:51, Bin Meng wrote: > > Hi Francisco, > > > > On Thu, Jan 21, 2021 at 4:50 PM Francisco Iglesias > > wrote: > > > > > > Dear Bin, > > > > > > On [2021 Jan 20] Wed 22:20:25, Bin Meng wrote: > > >

Re: [PATCH v4 9/9] hw/sd: ssi-sd: Handle the rest commands with R1b response type

2021-02-08 Thread Bin Meng
HI Philippe, On Mon, Feb 8, 2021 at 10:27 PM Philippe Mathieu-Daudé wrote: > > On Mon, Feb 8, 2021 at 3:20 PM Bin Meng wrote: > > > > Hi Philippe, > > > > On Mon, Feb 8, 2021 at 10:08 PM Philippe Mathieu-Daudé > > wrote: > > > > > > On 1/28/21 7:30 AM, Bin Meng wrote: > > > > From: Bin Meng

Re: [PATCH v4 9/9] hw/sd: ssi-sd: Handle the rest commands with R1b response type

2021-02-08 Thread Philippe Mathieu-Daudé
On Mon, Feb 8, 2021 at 3:20 PM Bin Meng wrote: > > Hi Philippe, > > On Mon, Feb 8, 2021 at 10:08 PM Philippe Mathieu-Daudé > wrote: > > > > On 1/28/21 7:30 AM, Bin Meng wrote: > > > From: Bin Meng > > > > > > Besides CMD12, the following command's reponse type is R1b: > > > > > > -

Re: [PATCH 1/9] tests/qtest/arm-cpu-features: Remove Cortex-A15 check

2021-02-08 Thread John Snow
On 2/6/21 5:40 AM, Andrew Jones wrote: BTW is there some easy way to dump QMP traffic on stdio? You can use scripts/qmp/qmp-shell to manually test stuff. Thanks, drew If you enable debug logging in python too, it'll print to STDERR. This may or may not be useful depending on how the

Re: [PATCH v2] qemu-nbd: Use SOMAXCONN for socket listen() backlog

2021-02-08 Thread Eric Blake
On 2/5/21 1:55 PM, Nir Soffer wrote: > On Fri, Feb 5, 2021 at 8:57 PM Eric Blake wrote: >> >> Our default of a backlog of 1 connection is rather puny, particularly >> for scenarios where we expect multiple listeners to connect (such as >> qemu-nbd -e X). This is especially important for Unix

Re: [PATCH v4 9/9] hw/sd: ssi-sd: Handle the rest commands with R1b response type

2021-02-08 Thread Philippe Mathieu-Daudé
On 1/28/21 7:30 AM, Bin Meng wrote: > From: Bin Meng > > Besides CMD12, the following command's reponse type is R1b: > > - SET_WRITE_PROT (CMD28) > - CLR_WRITE_PROT (CMD29) > - ERASE (CMD38) > > Reuse the same s->stopping to indicate a R1b reponse is needed. > > Signed-off-by: Bin Meng > >

[PATCH 2/2] hw/block/nvme: add nvme telemetry log support

2021-02-08 Thread Klaus Jensen
From: Gollu Appalanaidu This adds basic support for Telemetry Host Initiated and Controller Initiated log pages. The controller does not record any telemetry but provides the log pages. Signed-off-by: Gollu Appalanaidu Signed-off-by: Klaus Jensen --- include/block/nvme.h | 23

Re: [PATCH] hw/sd: sd: Bypass the RCA check for CMD13 in SPI mode

2021-02-08 Thread Bin Meng
On Mon, Feb 8, 2021 at 9:55 PM Bin Meng wrote: > > Hi Philippe, > > On Mon, Feb 8, 2021 at 9:08 PM Philippe Mathieu-Daudé wrote: > > > > On 1/30/21 11:20 AM, Bin Meng wrote: > > > Hi Philippe, > > > > > > On Fri, Jan 29, 2021 at 10:11 PM Philippe Mathieu-Daudé > > > wrote: > > >> > > >> Hi

Re: [PATCH] hw/sd: sd: Bypass the RCA check for CMD13 in SPI mode

2021-02-08 Thread Bin Meng
Hi Philippe, On Mon, Feb 8, 2021 at 9:08 PM Philippe Mathieu-Daudé wrote: > > On 1/30/21 11:20 AM, Bin Meng wrote: > > Hi Philippe, > > > > On Fri, Jan 29, 2021 at 10:11 PM Philippe Mathieu-Daudé > > wrote: > >> > >> Hi Bin, > >> > >> On 1/29/21 9:51 AM, Bin Meng wrote: > >>> From: Bin Meng >

[PATCH 1/4] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_DEVICES

2021-02-08 Thread Philippe Mathieu-Daudé
We want to be able to use the 'SH4' config for architecture specific features. As CONFIG_SH4 is only used to select peripherals, rename it CONFIG_SH4_DEVICES. Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- hw/block/meson.build | 2 +- hw/char/meson.build | 2 +-

Re: [PATCH RFC v2 3/8] hw/block/nvme: fix strerror printing

2021-02-08 Thread Minwoo Im
On 21-02-07 22:49:35, Klaus Jensen wrote: > From: Klaus Jensen > > Fix missing sign inversion. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH RFC v2 1/8] hw/block/nvme: remove redundant len member in compare context

2021-02-08 Thread Minwoo Im
On 21-02-07 22:49:33, Klaus Jensen wrote: > From: Klaus Jensen > > The 'len' member of the nvme_compare_ctx struct is redundant since the > same information is available in the 'iov' member. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH v4 9/9] hw/sd: ssi-sd: Handle the rest commands with R1b response type

2021-02-08 Thread Bin Meng
Hi Philippe, On Mon, Feb 8, 2021 at 10:08 PM Philippe Mathieu-Daudé wrote: > > On 1/28/21 7:30 AM, Bin Meng wrote: > > From: Bin Meng > > > > Besides CMD12, the following command's reponse type is R1b: > > > > - SET_WRITE_PROT (CMD28) > > - CLR_WRITE_PROT (CMD29) > > - ERASE (CMD38) > > > >

[PATCH 0/2] hw/block/nvme: add support for telemetry log pages

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen This adds support for the telemetry log pages and fixes up the controller IEEE OUI. Gollu Appalanaidu (2): hw/block/nvme: use locally assigned QEMU IEEE OUI hw/block/nvme: add nvme telemetry log support include/block/nvme.h | 23 --- hw/block/nvme.c

[PATCH 1/2] hw/block/nvme: use locally assigned QEMU IEEE OUI

2021-02-08 Thread Klaus Jensen
From: Gollu Appalanaidu Commit 6eb7a071292a ("hw/block/nvme: change controller pci id") changed the controller to use a Red Hat assigned PCI Device and Vendor ID, but did not change the IEEE OUI away from the Intel IEEE OUI. Fix that and use the locally assigned QEMU IEEE OUI instead.

Re: [PATCH] hw/sd: sd: Bypass the RCA check for CMD13 in SPI mode

2021-02-08 Thread Philippe Mathieu-Daudé
On 1/30/21 11:20 AM, Bin Meng wrote: > Hi Philippe, > > On Fri, Jan 29, 2021 at 10:11 PM Philippe Mathieu-Daudé > wrote: >> >> Hi Bin, >> >> On 1/29/21 9:51 AM, Bin Meng wrote: >>> From: Bin Meng >>> >>> Unlike SD mode, when SD card is working in SPI mode, the argument >>> of CMD13 is stuff

Re: [PATCH v2 30/36] block: bdrv_reopen_multiple: refresh permissions on updated graph

2021-02-08 Thread Vladimir Sementsov-Ogievskiy
05.02.2021 20:57, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: Move bdrv_reopen_multiple to new paradigm of permission update: first update graph relations, then do refresh the permissions. We have to modify reopen process in file-posix driver: with

Re: [PATCH 1/3] hw/sd: sd: Fix address check in sd_erase()

2021-02-08 Thread Philippe Mathieu-Daudé
On 1/28/21 7:43 AM, Bin Meng wrote: > From: Bin Meng > > For high capacity memory cards, the erase start address and end > address are multiplied by 512, but the address check is still > based on the original block number in sd->erase_{start, end}. Oops, good catch. Reviewed-by: Philippe

Re: [PULL v3 00/27] Block patches

2021-02-08 Thread Philippe Mathieu-Daudé
On 2/8/21 10:27 AM, Stefan Hajnoczi wrote: > On Sat, Feb 06, 2021 at 05:03:20PM +, Peter Maydell wrote: >> On Fri, 5 Feb 2021 at 22:53, Peter Maydell wrote: >>> >>> On Fri, 5 Feb 2021 at 16:45, Stefan Hajnoczi wrote: The following changes since commit

Re: [PULL v3 00/27] Block patches

2021-02-08 Thread Stefan Hajnoczi
On Sat, Feb 06, 2021 at 05:03:20PM +, Peter Maydell wrote: > On Fri, 5 Feb 2021 at 22:53, Peter Maydell wrote: > > > > On Fri, 5 Feb 2021 at 16:45, Stefan Hajnoczi wrote: > > > > > > The following changes since commit > > > e2c5093c993ef646e4e28f7aa78429853bcc06ac: > > > > > > iotests:

Re: [PATCH] hw/block/nvme: improve invalid zasl value reporting

2021-02-08 Thread i...@dantalion.nl
On 08-02-2021 09:25, Klaus Jensen wrote: > The Zone Append Size Limit (ZASL) must be at least 4096 bytes, so > improve the user experience by adding an early parameter check in > nvme_check_constraints. I have confirmed this and it works for me, I don't think I am actually qualified or understand

Re: [PATCH v2] hw/block/nvme: add missing mor/mar constraint checks

2021-02-08 Thread Klaus Jensen
On Feb 8 00:13, Dmitry Fomichev wrote: > On Tue, 2021-01-26 at 13:15 +0100, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Firstly, if zoned.max_active is non-zero, zoned.max_open must be less > > than or equal to zoned.max_active. > > > > Secondly, if only zones.max_active is set, we have

Re: [PATCH 3/3] hw/sd: sd: Actually perform the erase operation

2021-02-08 Thread Philippe Mathieu-Daudé
On 1/28/21 7:43 AM, Bin Meng wrote: > From: Bin Meng > > At present the sd_erase() does not erase the requested range of card > data to 0xFFs. Let's make the erase operation actually happen. > > Signed-off-by: Bin Meng > > --- > > hw/sd/sd.c | 9 + > 1 file changed, 9 insertions(+)

Re: [PATCH 2/4] hw/block/fdc: Remove the check_media_rate property

2021-02-08 Thread Thomas Huth
On 05/02/2021 21.15, John Snow wrote: On 2/5/21 1:37 AM, Thomas Huth wrote: On 05/02/2021 01.40, John Snow wrote: On 2/3/21 12:18 PM, Thomas Huth wrote: This was only required for the pc-1.0 and earlier machine types. Now that these have been removed, we can also drop the corresponding code

Re: [PATCH 2/3] hw/sd: sd: Move the sd_block_{read, write} and macros ahead

2021-02-08 Thread Philippe Mathieu-Daudé
On 1/28/21 8:04 AM, Cédric Le Goater wrote: > Hello Bin, > > On 1/28/21 7:43 AM, Bin Meng wrote: >> From: Bin Meng >> >> These APIs and macros may be referenced by functions that are >> currently before them. Move them ahead a little bit. > > We could also change fprintf() by qemu_log_mask()

Re: [PATCH v2] qemu-nbd: Use SOMAXCONN for socket listen() backlog

2021-02-08 Thread Daniel P . Berrangé
On Fri, Feb 05, 2021 at 12:57:05PM -0600, Eric Blake wrote: > Our default of a backlog of 1 connection is rather puny, particularly > for scenarios where we expect multiple listeners to connect (such as > qemu-nbd -e X). This is especially important for Unix sockets, as a > definite benefit to

[PATCH] hw/block/nvme: improve invalid zasl value reporting

2021-02-08 Thread Klaus Jensen
From: Klaus Jensen The Zone Append Size Limit (ZASL) must be at least 4096 bytes, so improve the user experience by adding an early parameter check in nvme_check_constraints. When ZASL is still too small due to the host configuring the device for an even larger page size, convert the trace

Re: [PATCH v2 28/36] block: add bdrv_set_backing_noperm() transaction action

2021-02-08 Thread Vladimir Sementsov-Ogievskiy
05.02.2021 19:26, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: Split out no-perm part of bdrv_set_backing_hd() as a separate transaction action. Note the in case of existing BdrvChild we reuse it, not recreate, just to do less actions. Signed-off-by:

Re: [PATCH] hw/block/nvme: improve invalid zasl value reporting

2021-02-08 Thread Klaus Jensen
On Feb 8 10:15, i...@dantalion.nl wrote: > On 08-02-2021 09:25, Klaus Jensen wrote: > > The Zone Append Size Limit (ZASL) must be at least 4096 bytes, so > > improve the user experience by adding an early parameter check in > > nvme_check_constraints. > > I have confirmed this and it works for