Re: [PATCH v7 0/3] hw/block/nvme: dulbe and dsm support

2020-10-29 Thread Klaus Jensen
On Oct 27 18:57, Klaus Jensen wrote: > From: Klaus Jensen > > This adds support for the Deallocated or Unwritten Logical Block error > recovery feature as well as the Dataset Management command. > > v7: > - Handle negative return value from bdrv_block_status. > - bdrv_get_info may not be sup

[PATCH v2] block: Remove unused BlockDeviceMapEntry

2020-10-29 Thread Markus Armbruster
BlockDeviceMapEntry has never been used. It was added in commit facd6e2 "so that it is published through the introspection mechanism." What exactly introspecting types that aren't used for anything could accomplish isn't clear. What "introspection mechanism" to use is also nebulous. To the best

[PATCH] block: Fix some code style problems, "foo* bar" should be "foo *bar"

2020-10-29 Thread shiliyang
There have some code style problems be found when read the block driver code. So I fixes some problems of this error, ERROR: "foo* bar" should be "foo *bar". Signed-off-by: Liyang Shi Reported-by: Euler Robot --- block/blkdebug.c | 2 +- block/dmg.c | 2 +- block/qcow2.c| 4 ++-- bl

block: Fix some code style problems, "foo* bar" should be "foo *bar"

2020-10-29 Thread shiliyang
There have some code style problems be found when read the block driver code. So I fixes some problems of this error, ERROR: "foo* bar" should be "foo *bar". Signed-off-by: Liyang Shi Reported-by: Euler Robot --- block/blkdebug.c | 2 +- block/dmg.c | 2 +- block/qcow2.c| 4 ++-- bl

[PATCH v8 10/11] hw/block/nvme: Add injection of Offline/Read-Only zones

2020-10-29 Thread Dmitry Fomichev
ZNS specification defines two zone conditions for the zones that no longer can function properly, possibly because of flash wear or other internal fault. It is useful to be able to "inject" a small number of such zones for testing purposes. This commit defines two optional device properties, "offl

[PATCH v8 06/11] hw/block/nvme: Support allocated CNS command variants

2020-10-29 Thread Dmitry Fomichev
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 namesp

[PATCH v8 11/11] hw/block/nvme: Document zoned parameters in usage text

2020-10-29 Thread 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 Cassel --- hw/block/nvme

[PATCH v8 05/11] hw/block/nvme: Add support for Namespace Types

2020-10-29 Thread Dmitry Fomichev
From: Niklas Cassel Define the structures and constants required to implement Namespace Types support. Namespace Types introduce a new command set, "I/O Command Sets", that allows the host to retrieve the command sets associated with a namespace. Introduce support for the command set and enable

[PATCH v8 04/11] hw/block/nvme: Merge nvme_write_zeroes() with nvme_write()

2020-10-29 Thread Dmitry Fomichev
nvme_write() now handles WRITE, WRITE ZEROES and ZONE_APPEND. Signed-off-by: Dmitry Fomichev Reviewed-by: Niklas Cassel Acked-by: Klaus Jensen --- hw/block/nvme.c | 72 +-- hw/block/trace-events | 1 - 2 files changed, 28 insertions(+), 45 deletio

[PATCH v8 09/11] hw/block/nvme: Support Zone Descriptor Extensions

2020-10-29 Thread Dmitry Fomichev
Zone Descriptor Extension is a label that can be assigned to a zone. It can be set to an Empty zone and it stays assigned until the zone is reset. This commit adds a new optional module property, "zoned.descr_ext_size". Its value must be a multiple of 64 bytes. If this value is non-zero, it become

[PATCH v8 08/11] hw/block/nvme: Introduce max active and open zone limits

2020-10-29 Thread Dmitry Fomichev
Add two module properties, "zoned.max_active" and "zoned.max_open" to control the maximum number of zones that can be active or open. Once these variables are set to non-default values, these limits are checked during I/O and Too Many Active or Too Many Open command status is returned if they are e

[PATCH v8 07/11] hw/block/nvme: Support Zoned Namespace Command Set

2020-10-29 Thread Dmitry Fomichev
The emulation code has been changed to advertise NVM Command Set when "zoned" device property is not set (default) and Zoned Namespace Command Set otherwise. Define values and structures that are needed to support Zoned Namespace Command Set (NVMe TP 4053) in PCI NVMe controller emulator. Define t

[PATCH v8 01/11] hw/block/nvme: Add Commands Supported and Effects log

2020-10-29 Thread Dmitry Fomichev
This log page becomes necessary to implement to allow checking for Zone Append command support in Zoned Namespace Command Set. This commit adds the code to report this log page for NVM Command Set only. The parts that are specific to zoned operation will be added later in the series. All incoming

[PATCH v8 02/11] hw/block/nvme: Generate namespace UUIDs

2020-10-29 Thread 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 namespace is initialized. Sugge

[PATCH v8 00/11] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-10-29 Thread Dmitry Fomichev
v7 -> v8: - Move refactoring commits to the front of the series. - Remove "attached" and "fill_pattern" device properties. - Only close open zones upon subsystem shutdown, not when CC.EN flag is set to 0. Avoid looping through all zones by iterating through lists of open and closed zone

[PATCH v8 03/11] hw/block/nvme: Separate read and write handlers

2020-10-29 Thread Dmitry Fomichev
With ZNS support in place, the majority of code in nvme_rw() has become 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 so far existed in the i/o path. This is a refactoring

Re: [PATCH 09/36] qdev: Make qdev_get_prop_ptr() get Object* arg

2020-10-29 Thread Stefan Berger
On 10/29/20 6:02 PM, Eduardo Habkost wrote: Make the code more generic and not specific to TYPE_DEVICE. Signed-off-by: Eduardo Habkost Reviewed-by:  Stefan Berger --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevin Wolf Cc: Max Reitz Cc: Paolo Bon

Re: [PATCH 14/36] qdev: Move dev->realized check to qdev_property_set()

2020-10-29 Thread Stefan Berger
On 10/29/20 6:02 PM, Eduardo Habkost wrote: Every single qdev property setter function manually checks dev->realized. We can just check dev->realized inside qdev_property_set() instead. The check is being added as a separate function (qdev_prop_allow_set()) because it will become a callback lat

Re: [PATCH 25/36] qdev: Rename qdev_get_prop_ptr() to object_static_prop_ptr()

2020-10-29 Thread Stefan Berger
On 10/29/20 6:02 PM, Eduardo Habkost wrote: The function will be moved to common QOM code, as it is not specific to TYPE_DEVICE anymore. Signed-off-by: Eduardo Habkost Reviewed-by:  Stefan Berger --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevi

[PATCH 14/36] qdev: Move dev->realized check to qdev_property_set()

2020-10-29 Thread Eduardo Habkost
Every single qdev property setter function manually checks dev->realized. We can just check dev->realized inside qdev_property_set() instead. The check is being added as a separate function (qdev_prop_allow_set()) because it will become a callback later. Signed-off-by: Eduardo Habkost --- Cc: S

[PATCH 25/36] qdev: Rename qdev_get_prop_ptr() to object_static_prop_ptr()

2020-10-29 Thread Eduardo Habkost
The function will be moved to common QOM code, as it is not specific to TYPE_DEVICE anymore. Signed-off-by: Eduardo Habkost --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevin Wolf Cc: Max Reitz Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo

[PATCH 09/36] qdev: Make qdev_get_prop_ptr() get Object* arg

2020-10-29 Thread Eduardo Habkost
Make the code more generic and not specific to TYPE_DEVICE. Signed-off-by: Eduardo Habkost --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevin Wolf Cc: Max Reitz Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: Richard Henderson C

Re: [PATCH v9 1/8] Introduce yank feature

2020-10-29 Thread Markus Armbruster
Nothing major, looks almost ready to me. Lukas Straub writes: > The yank feature allows to recover from hanging qemu by "yanking" > at various parts. Other qemu systems can register themselves and > multiple yank functions. Then all yank functions for selected > instances can be called by the 'y

Re: [PULL 00/30] nvme emulation patches for 5.2

2020-10-29 Thread Klaus Jensen
On Oct 29 13:20, Philippe Mathieu-Daudé wrote: > On 10/29/20 12:52 PM, Klaus Jensen wrote: > > On Oct 29 11:39, Peter Maydell wrote: > >> On Tue, 27 Oct 2020 at 10:49, Klaus Jensen wrote: > >>> > >>> From: Klaus Jensen > >>> > >>> Hi Peter, > >>> > >>> The following changes since commit > >>> 1d

Re: block: Remove unused include

2020-10-29 Thread AlexChen
Kindly ping. Thanks, Alex On 2020/10/21 17:12, AlexChen wrote: > The "qemu-common.h" include is not used, remove it. > > Reported-by: Euler Robot > Signed-off-by: AlexChen > --- > block/dmg-lzfse.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/block/dmg-lzfse.c b/block/dmg-lzfse.c

Re: [PATCH 4/4] iotests: rewrite iotest 240 in python

2020-10-29 Thread Paolo Bonzini
On 29/10/20 12:16, Christian Borntraeger wrote: > On 19.10.20 18:37, Maxim Levitsky wrote: >> The recent changes that brought RCU delayed device deletion, >> broke few tests and this test breakage went unnoticed. >> >> Fix this test by rewriting it in python >> (which allows to wait for DEVICE_DELE

Re: [PULL 00/30] nvme emulation patches for 5.2

2020-10-29 Thread Philippe Mathieu-Daudé
On 10/29/20 12:52 PM, Klaus Jensen wrote: > On Oct 29 11:39, Peter Maydell wrote: >> On Tue, 27 Oct 2020 at 10:49, Klaus Jensen wrote: >>> >>> From: Klaus Jensen >>> >>> Hi Peter, >>> >>> The following changes since commit 1dc887329a10903940501b43e8c0cc67af7c06d5: >>> >>> Merge remote-tracking

Re: [PULL 00/30] nvme emulation patches for 5.2

2020-10-29 Thread Klaus Jensen
On Oct 29 11:39, Peter Maydell wrote: > On Tue, 27 Oct 2020 at 10:49, Klaus Jensen wrote: > > > > From: Klaus Jensen > > > > Hi Peter, > > > > The following changes since commit 1dc887329a10903940501b43e8c0cc67af7c06d5: > > > > Merge remote-tracking branch > > 'remotes/philmd-gitlab/tags/sd-ne

Re: [PULL 00/30] nvme emulation patches for 5.2

2020-10-29 Thread Peter Maydell
On Tue, 27 Oct 2020 at 10:49, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi Peter, > > The following changes since commit 1dc887329a10903940501b43e8c0cc67af7c06d5: > > Merge remote-tracking branch 'remotes/philmd-gitlab/tags/sd-next-20201026' > into staging (2020-10-26 17:19:26 +) > >

Re: [PATCH 4/4] iotests: rewrite iotest 240 in python

2020-10-29 Thread Christian Borntraeger
On 19.10.20 18:37, Maxim Levitsky wrote: > The recent changes that brought RCU delayed device deletion, > broke few tests and this test breakage went unnoticed. > > Fix this test by rewriting it in python > (which allows to wait for DEVICE_DELETED events before continuing). While this is now fine

[PULL 1/5] io: Fix Lesser GPL version number

2020-10-29 Thread Daniel P . Berrangé
From: Chetan Pant There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurrences of "Lesser GPL version 2" with "Lesser GPL version 2.1" in comment section. Signed-off-by: Chetan Pant Signed-off-by:

[PULL 5/5] util: include the target address in socket connect failures

2020-10-29 Thread Daniel P . Berrangé
Reporting "Failed to connect socket" is essentially useless for a user attempting to diagnose failure. It needs to include the target address details. Similarly when failing to create a socket we should include the socket family info, so the user understands what particular feature was missing in t

[PULL 0/5] Misc next patches

2020-10-29 Thread Daniel P . Berrangé
The following changes since commit bbc48d2bcb9711614fbe751c2c5ae13e172fbca8: Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-20201027' = into staging (2020-10-28 16:25:31 +) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/misc-next-pull-requ

[PULL 2/5] crypt: Fix Lesser GPL version number

2020-10-29 Thread Daniel P . Berrangé
From: Chetan Pant There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurrences of "Lesser GPL version 2" with "Lesser GPL version 2.1" in comment section. Signed-off-by: Chetan Pant Signed-off-by:

[PULL 3/5] authz: Fix Lesser GPL version number

2020-10-29 Thread Daniel P . Berrangé
From: Chetan Pant There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurrences of "Lesser GPL version 2" with "Lesser GPL version 2.1" in comment section. Signed-off-by: Chetan Pant Signed-off-by:

[PULL 4/5] io: Don't use '#' flag of printf format

2020-10-29 Thread Daniel P . Berrangé
From: AlexChen Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: AlexChen Signed-off-by: Daniel P. Berrangé --- io/channel-websock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/channel-websock.c b/io/channel-websock.c index bb545fa327..03c1f7cb62 100644 --- a/io/ch

[PATCH-for-6.0 v2 25/25] block/nvme: Simplify Completion Queue Command Identifier field use

2020-10-29 Thread Philippe Mathieu-Daudé
The "Completion Queue Entry: DW 2" describes it as: This identifier is assigned by host software when the command is submitted to the Submission As the is just an opaque cookie, it is pointless to byte-swap it. Suggested-by: Keith Busch Signed-off-by: Philippe Mathieu-Daudé --- block/nvme

[PATCH-for-5.2 v2 23/25] block/nvme: Fix use of write-only doorbells page on Aarch64 arch

2020-10-29 Thread Philippe Mathieu-Daudé
qemu_vfio_pci_map_bar() calls mmap(), and mmap(2) states: 'offset' must be a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE). In commit f68453237b9 we started to use an offset of 4K which broke this contract on Aarch64 arch. Fix by mapping at offset 0, and and accessing door

[PATCH-for-5.2 v2 24/25] block/nvme: Fix nvme_submit_command() on big-endian host

2020-10-29 Thread Philippe Mathieu-Daudé
The Completion Queue Command Identifier is a 16-bit value, so nvme_submit_command() is unlikely to work on big-endian hosts, as the relevant bits are truncated. Fix by using the correct byte-swap function. Fixes: bdd6a90a9e5 ("block: Add VFIO based NVMe driver") Reported-by: Keith Busch Signed-of

Re: [PATCH v3 0/9] block-backend: Introduce I/O hang

2020-10-29 Thread cenjiahui
On 2020/10/27 0:53, Stefan Hajnoczi wrote: > On Thu, Oct 22, 2020 at 09:02:54PM +0800, Jiahui Cen wrote: >> A VM in the cloud environment may use a virutal disk as the backend storage, >> and there are usually filesystems on the virtual block device. When backend >> storage is temporarily down, a

[PATCH-for-5.2 v2 20/25] block/nvme: Change size and alignment of queue

2020-10-29 Thread Philippe Mathieu-Daudé
From: Eric Auger In preparation of 64kB host page support, let's change the size and alignment of the queue so that the VFIO DMA MAP succeeds. We align on the host page size. Signed-off-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --

[PATCH-for-5.2 v2 22/25] block/nvme: Align iov's va and size on host page size

2020-10-29 Thread Philippe Mathieu-Daudé
From: Eric Auger Make sure iov's va and size are properly aligned on the host page size. Signed-off-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 14 -- 1 file chang

[PATCH-for-5.2 v2 19/25] block/nvme: Change size and alignment of IDENTIFY response buffer

2020-10-29 Thread Philippe Mathieu-Daudé
From: Eric Auger In preparation of 64kB host page support, let's change the size and alignment of the IDENTIFY command response buffer so that the VFIO DMA MAP succeeds. We align on the host page size. Signed-off-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi

[PATCH-for-5.2 v2 18/25] block/nvme: Correct minimum device page size

2020-10-29 Thread Philippe Mathieu-Daudé
While trying to simplify the code using a macro, we forgot the 12-bit shift... Correct that. Fixes: fad1eb68862 ("block/nvme: Use register definitions from 'block/nvme.h'") Reported-by: Eric Auger Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Philipp

[PATCH-for-5.2 v2 17/25] block/nvme: Set request_alignment at initialization

2020-10-29 Thread Philippe Mathieu-Daudé
Commit bdd6a90a9e5 ("block: Add VFIO based NVMe driver") sets the request_alignment in nvme_refresh_limits(). For consistency, also set it during initialization. Reported-by: Stefan Hajnoczi Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Math

[PATCH-for-5.2 v2 21/25] block/nvme: Change size and alignment of prp_list_pages

2020-10-29 Thread Philippe Mathieu-Daudé
From: Eric Auger In preparation of 64kB host page support, let's change the size and alignment of the prp_list_pages so that the VFIO DMA MAP succeeds with 64kB host page size. We align on the host page size. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Eric Auger Reviewed-by: Stefan Haj

[PATCH-for-5.2 v2 07/25] block/nvme: Trace queue pair creation/deletion

2020-10-29 Thread Philippe Mathieu-Daudé
Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 3 +++ block/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block/nvme.c b/block/nvme.c index 29d2541b911..e95d59d3126 100644 --- a/blo

[PATCH-for-5.2 v2 12/25] block/nvme: Introduce Completion Queue definitions

2020-10-29 Thread Philippe Mathieu-Daudé
Rename Submission Queue flags with 'Sq' to differentiate submission queue flags from command queue flags, and introduce Completion Queue flag definitions. Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- include/block/nvme.h | 18 -- 1 fil

[PATCH-for-5.2 v2 14/25] block/nvme: Correctly initialize Admin Queue Attributes

2020-10-29 Thread Philippe Mathieu-Daudé
>From the specification chapter 3.1.8 "AQA - Admin Queue Attributes" the Admin Submission Queue Size field is a 0’s based value: Admin Submission Queue Size (ASQS): Defines the size of the Admin Submission Queue in entries. Enabling a controller while this field is cleared to 00h pr

[PATCH-for-5.2 v2 13/25] block/nvme: Use definitions instead of magic values in add_io_queue()

2020-10-29 Thread Philippe Mathieu-Daudé
Replace magic values by definitions, and simplifiy since the number of queues will never reach 64K. Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-)

[PATCH-for-5.2 v2 05/25] block/nvme: Trace nvme_poll_queue() per queue

2020-10-29 Thread Philippe Mathieu-Daudé
As we want to enable multiple queues, report the event in each nvme_poll_queue() call, rather than once in the callback calling nvme_poll_queues(). Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 2 +- b

[PATCH-for-5.2 v2 09/25] block/nvme: Use unsigned integer for queue counter/size

2020-10-29 Thread Philippe Mathieu-Daudé
We can not have negative queue count/size/index, use unsigned type. Rename 'nr_queues' as 'queue_count' to match the spec naming. Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 38 ++

[PATCH-for-5.2 v2 15/25] block/nvme: Simplify ADMIN queue access

2020-10-29 Thread Philippe Mathieu-Daudé
We don't need to dereference from BDRVNVMeState each time. Use a NVMeQueuePair pointer on the admin queue. The nvme_init() becomes easier to review, matching the style of nvme_add_io_queue(). Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Math

[PATCH-for-5.2 v2 16/25] block/nvme: Simplify nvme_cmd_sync()

2020-10-29 Thread Philippe Mathieu-Daudé
As all commands use the ADMIN queue, it is pointless to pass it as argument each time. Remove the argument, and rename the function as nvme_admin_cmd_sync() to make this new behavior clearer. Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c |

[PATCH-for-5.2 v2 10/25] block/nvme: Make nvme_identify() return boolean indicating error

2020-10-29 Thread Philippe Mathieu-Daudé
Just for consistency, following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), return a boolean value indicating an error is set or not. Directly pass errp as the local_err is not requested in our case. Tested-by: Eric Auger Signed-off-by: Philippe Mathi

[PATCH-for-5.2 v2 11/25] block/nvme: Make nvme_init_queue() return boolean indicating error

2020-10-29 Thread Philippe Mathieu-Daudé
Just for consistency, following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), return a boolean value indicating an error is set or not. Directly pass errp as the local_err is not requested in our case. This simplifies a bit nvme_create_queue_pair(). Revi

[PATCH-for-5.2 v2 08/25] block/nvme: Move definitions before structure declarations

2020-10-29 Thread Philippe Mathieu-Daudé
To be able to use some definitions in structure declarations, move them earlier. No logical change. Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 19 ++- 1 file changed, 10 insertions(+), 9 d

[PATCH-for-5.2 v2 06/25] block/nvme: Improve nvme_free_req_queue_wait() trace information

2020-10-29 Thread Philippe Mathieu-Daudé
What we want to trace is the block driver state and the queue index. Suggested-by: Stefan Hajnoczi Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 2 +- block/trace-events | 2 +- 2 files changed, 2 ins

[PATCH-for-5.2 v2 04/25] block/nvme: Trace controller capabilities

2020-10-29 Thread Philippe Mathieu-Daudé
Controllers have different capabilities and report them in the CAP register. We are particularly interested by the page size limits. Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 13 + bloc

[PATCH-for-5.2 v2 03/25] block/nvme: Report warning with warn_report()

2020-10-29 Thread Philippe Mathieu-Daudé
Instead of displaying warning on stderr, use warn_report() which also displays it on the monitor. Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

[PATCH-for-5.2 v2 02/25] block/nvme: Use hex format to display offset in trace events

2020-10-29 Thread Philippe Mathieu-Daudé
Use the same format used for the hw/vfio/ trace events. Suggested-by: Eric Auger Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe Mathieu-Daudé --- block/trace-events | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --

[PATCH-for-5.2 v2 01/25] MAINTAINERS: Cover 'block/nvme.h' file

2020-10-29 Thread Philippe Mathieu-Daudé
The "block/nvme.h" header is shared by both the NVMe block driver and the NVMe emulated device. Add the 'F:' entry on both sections, so all maintainers/reviewers are notified when it is changed. Reviewed-by: Klaus Jensen Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger Signed-off-by: Philippe

[PATCH-for-5.2 v2 00/25] block/nvme: Fix Aarch64 or big-endian hosts

2020-10-29 Thread Philippe Mathieu-Daudé
Add a bit of tracing, clean around to finally fix few bugs. In particular, restore NVMe on Aarch64 host. Since v1: - addressed Stefan and Eric review comments - dropped unnecessary patches - added BE fix reported by Keith Patches missing review: #10, #24, #25 Supersedes: <20201027135547.374946-1

Re: [PATCH 00/25] block/nvme: Fix Aarch64 host

2020-10-29 Thread Philippe Mathieu-Daudé
On 10/28/20 7:10 PM, Auger Eric wrote: > Hi Philippe, > > On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: >> Add a bit of tracing, clean around to finally fix few bugs. >> In particular, restore NVMe on Aarch64 host. >> >> Eric Auger (4): >> block/nvme: Change size and alignment of IDENTIFY r

Re: [PATCH 13/25] block/nvme: Introduce Completion Queue definitions

2020-10-29 Thread Philippe Mathieu-Daudé
On 10/28/20 7:24 PM, Philippe Mathieu-Daudé wrote: > On 10/28/20 4:16 PM, Stefan Hajnoczi wrote: >> On Tue, Oct 27, 2020 at 02:55:35PM +0100, Philippe Mathieu-Daudé wrote: >>> Rename Submission Queue flags with 'Sq' and introduce >>> Completion Queue flag definitions. >>> >>> Signed-off-by: Phili

Re: [PATCH 17/25] block/nvme: Simplify nvme_cmd_sync()

2020-10-29 Thread Philippe Mathieu-Daudé
On 10/28/20 4:21 PM, Stefan Hajnoczi wrote: > On Tue, Oct 27, 2020 at 02:55:39PM +0100, Philippe Mathieu-Daudé wrote: >> As all commands use the ADMIN queue, it is pointless to pass >> it as argument each time. Remove the argument. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> block/nvm