Re: [PATCH V2 1/1] hw/block/nvme: support command retry delay

2021-03-02 Thread Klaus Jensen
On Feb 14 23:28, Minwoo Im wrote: > Set CRDT1(Command Retry Delay Time 1) in the Identify controller data > structure to milliseconds units of 100ms by the given value of > 'cmd-retry-delay' parameter which is newly added. If > cmd-retry-delay=1000, it will be set CRDT1 to 10. This patch only > c

RE: [PATCH v3 02/21] sd: emmc: Add support for eMMC cards

2021-03-02 Thread Sai Pavan Boddu
Hi Cedric, > -Original Message- > From: Cédric Le Goater > Sent: Monday, March 1, 2021 4:32 PM > To: Sai Pavan Boddu ; Markus Armbruster > ; Kevin Wolf ; Max Reitz > ; Vladimir Sementsov-Ogievskiy > ; Eric Blake ; Joel Stanley > ; Vincent Palatin ; Dr. David Alan > Gilbert ; Thomas Huth ;

RE: [PATCH v3 12/21] sd: emmc: add CMD21 tuning sequence

2021-03-02 Thread Sai Pavan Boddu
Hi David, > -Original Message- > From: Dr. David Alan Gilbert > Sent: Monday, March 1, 2021 4:12 PM > To: Sai Pavan Boddu > Cc: Markus Armbruster ; Kevin Wolf > ; Max Reitz ; Vladimir Sementsov- > Ogievskiy ; Eric Blake ; > Joel Stanley ; Cédric Le Goater ; Vincent > Palatin ; Thomas Hut

[PATCH V2] file-posix: allow -EBUSY -EINVAL errors during write zeros on block

2021-03-02 Thread ChangLimin
Since Linux 5.10, write zeros to a multipath device using ioctl(fd, BLKZEROOUT, range) with cache none or directsync return -EBUSY permanently. Similar to handle_aiocb_write_zeroes_unmap, handle_aiocb_write_zeroes_block allow -EBUSY and -EINVAL errors during ioctl(fd, BLKZEROOUT, range). Referenc

Re: [PATCH v2 8/8] hw/vfio/pci-quirks: Replace the word 'blacklist'

2021-03-02 Thread Philippe Mathieu-Daudé
On 3/2/21 10:55 PM, Alex Williamson wrote: > On Fri, 5 Feb 2021 18:18:17 +0100 > Philippe Mathieu-Daudé wrote: > >> Follow the inclusive terminology from the "Conscious Language in your >> Open Source Projects" guidelines [*] and replace the word "blacklist" >> appropriately. >> >> [*] https://g

Re: [PATCH v2 8/8] hw/vfio/pci-quirks: Replace the word 'blacklist'

2021-03-02 Thread Alex Williamson
On Fri, 5 Feb 2021 18:18:17 +0100 Philippe Mathieu-Daudé wrote: > Follow the inclusive terminology from the "Conscious Language in your > Open Source Projects" guidelines [*] and replace the word "blacklist" > appropriately. > > [*] https://github.com/conscious-lang/conscious-lang-docs/blob/mai

Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*

2021-03-02 Thread Eric Blake
On 3/2/21 12:32 PM, Kevin Wolf wrote: > Am 26.02.2021 um 20:42 hat Eric Blake geschrieben: >> On 2/24/21 7:52 AM, Kevin Wolf wrote: >>> This adds a QAPI schema for the properties of the can-* objects. >>> >>> can-bus doesn't have any properties, so it only needs to be added to the >>> ObjectType en

Re: [PATCH] qom: Check for wellformed id in user_creatable_add_type()

2021-03-02 Thread Paolo Bonzini
On 02/03/21 18:16, Kevin Wolf wrote: Most code paths for creating a user creatable object go through QemuOpts, which ensures that the provided 'id' option is actually a valid identifier. However, there are some code paths that don't go through QemuOpts: qemu-storage-daemon --object (since commit

Re: [PATCH v2 27/31] qom: Add user_creatable_add_from_str()

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 23:21 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This is a version of user_creatable_process_cmdline() with an Error > > parameter that never calls exit() and is therefore usable in HMP. > > > > Signed-off-by: Kevin Wolf > > --- > > include/qom/objec

Re: [PATCH v2 11/31] qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:33 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the tls-* objects. > > > > The 'loaded' property doesn't seem to make sense as an external > > interface: It is automatically set to true in ucc->complete, a

Re: [PATCH v2 10/31] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:17 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > diff --git a/qapi/qom.json b/qapi/qom.json > > index 449dca8ec5..2668ad8369 100644 > > --- a/qapi/qom.json > > +++ b/qapi/qom.json > > @@ -7,6 +7,7 @@ > > { 'include': 'authz.json' } > > { 'include': 'b

Re: [PATCH v2 07/31] qapi/qom: Add ObjectOptions for memory-backend-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 17:23 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the memory-backend-* > > objects. > > > > HostMemPolicy has to be moved to an include file that can be used by the > > storage daemon, too, because ObjectOpt

Re: [PATCH] qom: Check for wellformed id in user_creatable_add_type()

2021-03-02 Thread Eric Blake
On 3/2/21 11:16 AM, Kevin Wolf wrote: > Most code paths for creating a user creatable object go through > QemuOpts, which ensures that the provided 'id' option is actually a > valid identifier. > > However, there are some code paths that don't go through QemuOpts: > qemu-storage-daemon --object (s

Re: [PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 22:18 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This converts object-add from 'gen': false to the ObjectOptions QAPI > > type. As an immediate benefit, clients can now use QAPI schema > > introspection for user creatable QOM objects. > > > > It is als

Re: [PATCH v2 17/31] qapi/qom: Add ObjectOptions for input-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 21:55 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the input-* objects. > > > > ui.json cannot be included in qom.json because the storage daemon can't > > use it, so move GrabToggleKeys to common.json. > >

Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:42 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the can-* objects. > > > > can-bus doesn't have any properties, so it only needs to be added to the > > ObjectType enum without adding a new branch to Object

Re: [PATCH v2 09/31] qapi/qom: Add ObjectOptions for throttle-group

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 18:26 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the throttle-group object. > > > > The only purpose of the x-* properties is to make the nested options in > > 'limits' available for a command line parser t

Re: [PATCH v2 06/31] qapi/qom: Add ObjectOptions for dbus-vmstate

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 16:58 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the dbus-vmstate object. > > > > A list represented as a comma separated string is clearly not very > > QAPI-like, but for now just describe the existing int

Re: [PATCH v2 03/31] qapi/qom: Add ObjectOptions for iothread

2021-03-02 Thread Kevin Wolf
Am 25.02.2021 um 23:55 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > Add an ObjectOptions union that will eventually describe the options of > > all user creatable object types. As unions can't exist without any > > branches, also add the first object type. > > > > This a

[PATCH] qom: Check for wellformed id in user_creatable_add_type()

2021-03-02 Thread Kevin Wolf
Most code paths for creating a user creatable object go through QemuOpts, which ensures that the provided 'id' option is actually a valid identifier. However, there are some code paths that don't go through QemuOpts: qemu-storage-daemon --object (since commit 8db1efd3) and QMP object-add (since it

Re: [PATCH v3 2/5] monitor: drain requests queue with 'channel closed' event

2021-03-02 Thread Vladimir Sementsov-Ogievskiy
02.03.2021 19:32, Denis V. Lunev wrote: On 3/2/21 6:25 PM, Vladimir Sementsov-Ogievskiy wrote: 02.03.2021 16:53, Markus Armbruster wrote: Andrey Shinkevich via writes: When CHR_EVENT_CLOSED comes, the QMP requests queue may still contain unprocessed commands. It can happen with QMP capabilit

Re: [PATCH] file-posix: allow -EBUSY errors during write zeros on block

2021-03-02 Thread Nir Soffer
On Tue, Mar 2, 2021 at 4:08 AM ChangLimin wrote: > > After Linux 5.10, write zeros to a multipath device using > ioctl(fd, BLKZEROOUT, range) with cache none or directsync will return EBUSY. > > Similar to handle_aiocb_write_zeroes_unmap, handle_aiocb_write_zeroes_block > allow -EBUSY errors durin

Re: [PATCH v3 2/5] monitor: drain requests queue with 'channel closed' event

2021-03-02 Thread Denis V. Lunev
On 3/2/21 6:25 PM, Vladimir Sementsov-Ogievskiy wrote: > 02.03.2021 16:53, Markus Armbruster wrote: >> Andrey Shinkevich via writes: >> >>> When CHR_EVENT_CLOSED comes, the QMP requests queue may still contain >>> unprocessed commands. It can happen with QMP capability OOB enabled. >>> Let the dis

Re: [PATCH v3 2/5] monitor: drain requests queue with 'channel closed' event

2021-03-02 Thread Vladimir Sementsov-Ogievskiy
02.03.2021 16:53, Markus Armbruster wrote: Andrey Shinkevich via writes: When CHR_EVENT_CLOSED comes, the QMP requests queue may still contain unprocessed commands. It can happen with QMP capability OOB enabled. Let the dispatcher complete handling requests rest in the monitor queue. Signed-o

Re: [PATCH v3] qemu-storage-daemon: add --pidfile option

2021-03-02 Thread Richard W.M. Jones
On Tue, Mar 02, 2021 at 02:27:46PM +, Stefan Hajnoczi wrote: > Daemons often have a --pidfile option where the pid is written to a file > so that scripts can stop the daemon by sending a signal. > > The pid file also acts as a lock to prevent multiple instances of the > daemon from launching f

[PATCH v3] qemu-storage-daemon: add --pidfile option

2021-03-02 Thread Stefan Hajnoczi
Daemons often have a --pidfile option where the pid is written to a file so that scripts can stop the daemon by sending a signal. The pid file also acts as a lock to prevent multiple instances of the daemon from launching for a given pid file. QEMU, qemu-nbd, qemu-ga, virtiofsd, and qemu-pr-helpe

Re: [PATCH] file-posix: allow -EBUSY errors during write zeros on block

2021-03-02 Thread Kevin Wolf
Am 02.03.2021 um 02:56 hat ChangLimin geschrieben: > After Linux 5.10, write zeros to a multipath device using > ioctl(fd, BLKZEROOUT, range) with cache none or directsync will return EBUSY. > > Similar to handle_aiocb_write_zeroes_unmap, handle_aiocb_write_zeroes_block > allow -EBUSY errors durin

Re: [PATCH v2] qemu-storage-daemon: add --pidfile option

2021-03-02 Thread Kevin Wolf
Am 02.03.2021 um 10:29 hat Stefan Hajnoczi geschrieben: > Daemons often have a --pidfile option where the pid is written to a file > so that scripts can stop the daemon by sending a signal. > > The pid file also acts as a lock to prevent multiple instances of the > daemon from launching for a give

Re: [PATCH v3 2/5] monitor: drain requests queue with 'channel closed' event

2021-03-02 Thread Markus Armbruster
Andrey Shinkevich via writes: > When CHR_EVENT_CLOSED comes, the QMP requests queue may still contain > unprocessed commands. It can happen with QMP capability OOB enabled. > Let the dispatcher complete handling requests rest in the monitor > queue. > > Signed-off-by: Andrey Shinkevich > --- >

Re: [PATCH v3 4/5] iotests: 129 don't check backup "busy"

2021-03-02 Thread Markus Armbruster
Andrey Shinkevich via writes: > From: Vladimir Sementsov-Ogievskiy > > Busy is racy, job has it's "pause-points" when it's not busy. Drop this > check. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- > tests/qemu-iotests/129 | 1 - > 1 file changed, 1 deletion(-

Re: [PATCH v3 1/5] monitor: change function obsolete name in comments

2021-03-02 Thread Markus Armbruster
Andrey Shinkevich via writes: > The function name monitor_qmp_bh_dispatcher() has been changed to > monitor_qmp_dispatcher_co() since the commit 9ce44e2c. Let's amend the > comments. > > Signed-off-by: Andrey Shinkevich > --- > monitor/qmp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deleti

[PATCH V4 8/8] hw/block/nvme: support Identify NS Attached Controller List

2021-03-02 Thread Minwoo Im
Support Identify command for Namespace attached controller list. This command handler will traverse the controller instances in the given subsystem to figure out whether the specified nsid is attached to the controllers or not. The 4096bytes Identify data will return with the first entry (16bits)

[PATCH V4 7/8] hw/block/nvme: support changed namespace asyncrohous event

2021-03-02 Thread Minwoo Im
If namespace inventory is changed due to some reasons (e.g., namespace attachment/detachment), controller can send out event notifier to the host to manage namespaces. This patch sends out the AEN to the host after either attach or detach namespaces from controllers. To support clear of the event

[PATCH V4 6/8] hw/block/nvme: support namespace attachment command

2021-03-02 Thread Minwoo Im
This patch supports Namespace Attachment command for the pre-defined nvme-ns device nodes. Of course, attach/detach namespace should only be supported in case 'subsys' is given. This is because if we detach a namespace from a controller, somebody needs to manage the detached, but allocated namesp

[PATCH V4 5/8] hw/block/nvme: refactor nvme_select_ns_iocs

2021-03-02 Thread Minwoo Im
This patch has no functional changes. This patch just refactored nvme_select_ns_iocs() to iterate the attached namespaces of the controlller and make it invoke __nvme_select_ns_iocs(). Signed-off-by: Minwoo Im Tested-by: Klaus Jensen Reviewed-by: Klaus Jensen --- hw/block/nvme.c | 36

[PATCH V4 3/8] hw/block/nvme: fix allocated namespace list to 256

2021-03-02 Thread Minwoo Im
Expand allocated namespace list (subsys->namespaces) to have 256 entries which is a value lager than at least NVME_MAX_NAMESPACES which is for attached namespace list in a controller. Allocated namespace list should at least larger than attached namespace list. n->num_namespaces = NVME_MA

[PATCH V4 4/8] hw/block/nvme: support allocated namespace type

2021-03-02 Thread Minwoo Im
>From NVMe spec 1.4b "6.1.5. NSID and Namespace Relationships" defines valid namespace types: - Unallocated: Not exists in the NVMe subsystem - Allocated: Exists in the NVMe subsystem - Inactive: Not attached to the controller - Active: Attached to the controller T

[PATCH V4 2/8] hw/block/nvme: fix namespaces array to 1-based

2021-03-02 Thread Minwoo Im
subsys->namespaces array used to be sized to NVME_SUBSYS_MAX_NAMESPACES. But subsys->namespaces are being accessed with 1-based namespace id which means the very first array entry will always be empty(NULL). Signed-off-by: Minwoo Im Tested-by: Klaus Jensen Reviewed-by: Klaus Jensen --- hw/bloc

[PATCH V4 1/8] hw/block/nvme: support namespace detach

2021-03-02 Thread Minwoo Im
Given that now we have nvme-subsys device supported, we can manage namespace allocated, but not attached: detached. This patch introduced a parameter for nvme-ns device named 'detached'. This parameter indicates whether the given namespace device is detached from a entire NVMe subsystem('subsys'

[PATCH V4 0/8] hw/block/nvme: support namespace attachment

2021-03-02 Thread Minwoo Im
Hello, This series supports namespace attachment: attach and detach. This is the fourth version of series with replacing changed namespace list to bitmap to indicate changed namespace IDs. Please review. Thanks, Since V3: - Replace changed ns list to bitmap to not only represent relationship

Re: [PATCH v2] qemu-storage-daemon: add --pidfile option

2021-03-02 Thread Richard W.M. Jones
On Tue, Mar 02, 2021 at 09:29:26AM +, Stefan Hajnoczi wrote: > Daemons often have a --pidfile option where the pid is written to a file > so that scripts can stop the daemon by sending a signal. > > The pid file also acts as a lock to prevent multiple instances of the > daemon from launching f

[PATCH RFC 4/4] hw/block/nvme: convert zone reset to aiocb

2021-03-02 Thread Klaus Jensen
From: Klaus Jensen Convert zone reset from ad-hoc multi aio tracking to use standard QEMU AIOCB processing. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 233 +--- 1 file changed, 139 insertions(+), 94 deletions(-) diff --git a/hw/block/nvme.c b

[PATCH RFC 1/4] hw/block/nvme: convert dsm to aiocb

2021-03-02 Thread Klaus Jensen
From: Klaus Jensen Convert dataset management from ad-hoc multi aio tracking to use standard QEMU AIOCB processing. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 187 -- hw/block/trace-events | 2 +- 2 files changed, 125 insertions(+), 64 del

[PATCH RFC 3/4] hw/block/nvme: convert flush to aiocb

2021-03-02 Thread Klaus Jensen
From: Klaus Jensen Convert flush from ad-hoc multi aio tracking to use standard QEMU AIOCB processing. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 143 +--- 1 file changed, 74 insertions(+), 69 deletions(-) diff --git a/hw/block/nvme.c b/hw/bl

[PATCH RFC 2/4] hw/block/nvme: convert copy to aiocb

2021-03-02 Thread Klaus Jensen
From: Klaus Jensen Convert copy from ad-hoc multi aio tracking to use standard QEMU AIOCB processing. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 382 +--- 1 file changed, 199 insertions(+), 183 deletions(-) diff --git a/hw/block/nvme.c b/hw/b

[PATCH RFC 0/4] hw/block/nvme: convert ad-hoc aio tracking to aiocbs

2021-03-02 Thread Klaus Jensen
From: Klaus Jensen The nvme device currently uses an ad-hoc approach to tracking AIO completion when a request results in multiple issued AIOs. This series convert those operations (DSM, Copy, Flush and Zone Reset) to use "proper" QEMU AIOCB processing instead. This requires more code, but the e

Re: [RFC PATCH v2 3/3] hw/block/pflash: use memory_region_init_rom_device_from_file()

2021-03-02 Thread Stefan Hajnoczi
On Tue, Mar 02, 2021 at 08:04:46AM +0100, Philippe Mathieu-Daudé wrote: > On 3/1/21 7:13 PM, Stefan Hajnoczi wrote: > > On Mon, Mar 01, 2021 at 12:53:29PM +0100, Philippe Mathieu-Daudé wrote: > > FWIW this API isn't perfect because the file could be reopened with QMP > > and the existing mmap would

Re: [PATCH v2] qemu-storage-daemon: add --pidfile option

2021-03-02 Thread Daniel P . Berrangé
On Tue, Mar 02, 2021 at 09:29:26AM +, Stefan Hajnoczi wrote: > Daemons often have a --pidfile option where the pid is written to a file > so that scripts can stop the daemon by sending a signal. > > The pid file also acts as a lock to prevent multiple instances of the > daemon from launching f

Re: [PATCH v3 00/21] eMMC support

2021-03-02 Thread Cédric Le Goater
Hello, Adding the SD maintainers for more feedback. Thanks, C. On 2/28/21 8:33 PM, Sai Pavan Boddu wrote: > Hi, > > This patch series add support for eMMC cards. This work was previosly > submitted by Vincent, rebased few changes on top. > > Cedric & Joel has helped to added boot partition a

[PATCH v2] qemu-storage-daemon: add --pidfile option

2021-03-02 Thread Stefan Hajnoczi
Daemons often have a --pidfile option where the pid is written to a file so that scripts can stop the daemon by sending a signal. The pid file also acts as a lock to prevent multiple instances of the daemon from launching for a given pid file. QEMU, qemu-nbd, qemu-ga, virtiofsd, and qemu-pr-helpe

Re: [PATCH V3 7/8] hw/block/nvme: support changed namespace asyncrohous event

2021-03-02 Thread Klaus Jensen
On Mar 2 18:26, Minwoo Im wrote: > On 21-03-01 06:56:02, Klaus Jensen wrote: > > On Mar 1 01:10, Minwoo Im wrote: > > > If namespace inventory is changed due to some reasons (e.g., namespace > > > attachment/detachment), controller can send out event notifier to the > > > host to manage namespace

Re: [PATCH V3 7/8] hw/block/nvme: support changed namespace asyncrohous event

2021-03-02 Thread Minwoo Im
On 21-03-01 06:56:02, Klaus Jensen wrote: > On Mar 1 01:10, Minwoo Im wrote: > > If namespace inventory is changed due to some reasons (e.g., namespace > > attachment/detachment), controller can send out event notifier to the > > host to manage namespaces. > > > > This patch sends out the AEN to

Re: [PATCH] qemu-storage-daemon: add --pidfile option

2021-03-02 Thread Stefan Hajnoczi
On Mon, Mar 01, 2021 at 04:24:09PM +, Richard W.M. Jones wrote: > On Mon, Mar 01, 2021 at 04:15:47PM +, Daniel P. Berrangé wrote: > > On Mon, Mar 01, 2021 at 04:08:57PM +, Stefan Hajnoczi wrote: > > > Daemons often have a --pidfile option where the pid is written to a file > > > so that