Re: [PULL 3/5] hw/ufs: Support for Query Transfer Requests

2023-09-14 Thread Jeuk Kim
On 23. 9. 14. 23:40, Peter Maydell wrote: On Thu, 7 Sept 2023 at 19:17, Stefan Hajnoczi wrote: From: Jeuk Kim This commit makes the UFS device support query and nop out transfer requests. The next patch would be support for UFS logical unit and scsi command transfer request.

Re: [PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-14 Thread Jeuk Kim
On 23. 9. 15. 02:31, Paolo Bonzini wrote: On 9/7/23 20:16, Stefan Hajnoczi wrote: From: Jeuk Kim This commit adds support for ufs logical unit. The LU handles processing for the SCSI command, unit descriptor query request. This commit enables the UFS device to process IO requests.

Re: [PATCH v3 2/2] qemu-img: map: report compressed data blocks

2023-09-14 Thread Andrey Drobyshev
On 9/15/23 00:17, Eric Blake wrote: > On Fri, Sep 08, 2023 at 12:02:26AM +0300, Andrey Drobyshev wrote: >> Right now "qemu-img map" reports compressed blocks as containing data >> but having no host offset. This is not very informative. Instead, >> let's add another boolean field named

Re: [PATCH v3 2/2] qemu-img: map: report compressed data blocks

2023-09-14 Thread Eric Blake
On Fri, Sep 08, 2023 at 12:02:26AM +0300, Andrey Drobyshev wrote: > Right now "qemu-img map" reports compressed blocks as containing data > but having no host offset. This is not very informative. Instead, > let's add another boolean field named "compressed" in case JSON output > mode is

Re: [PATCH v6 3/3] hw/nvme: add nvme management interface model

2023-09-14 Thread Corey Minyard
On Thu, Sep 14, 2023 at 11:53:43AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add the 'nmi-i2c' device that emulates an NVMe Management Interface > controller. > > Initial support is very basic (Read NMI DS, Configuration Get). > > This is based on previously posted code by Padmakar

Re: [PATCH v6 2/3] hw/i2c: add mctp core

2023-09-14 Thread Corey Minyard
On Thu, Sep 14, 2023 at 11:53:42AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add an abstract MCTP over I2C endpoint model. This implements MCTP > control message handling as well as handling the actual I2C transport > (packetization). > > Devices are intended to derive from this and

Re: [PATCH v6 1/3] hw/i2c: add smbus pec utility function

2023-09-14 Thread Corey Minyard
On Thu, Sep 14, 2023 at 11:53:41AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add i2c_smbus_pec() to calculate the SMBus Packet Error Code for a > message. Seems fine. Acked-by: Corey Minyard > > Reviewed-by: Jonathan Cameron > Signed-off-by: Klaus Jensen > --- >

Re: [PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-14 Thread Paolo Bonzini
On 9/7/23 20:16, Stefan Hajnoczi wrote: From: Jeuk Kim This commit adds support for ufs logical unit. The LU handles processing for the SCSI command, unit descriptor query request. This commit enables the UFS device to process IO requests. Signed-off-by: Jeuk Kim Reviewed-by: Stefan Hajnoczi

Re: [PATCH 4/4] virtio-blk: don't lock AioContext in the submission code path

2023-09-14 Thread Eric Blake
On Thu, Sep 14, 2023 at 10:01:01AM -0400, Stefan Hajnoczi wrote: > There is no need to acquire the AioContext lock around blk_aio_*() or > blk_get_geometry() anymore. I/O plugging (defer_call()) also does not > require the AioContext lock anymore. > > Signed-off-by: Stefan Hajnoczi > --- >

Re: [PATCH 3/4] virtio-blk: don't lock AioContext in the completion code path

2023-09-14 Thread Eric Blake
On Thu, Sep 14, 2023 at 10:01:00AM -0400, Stefan Hajnoczi wrote: > Nothing in the completion code path relies on the AioContext lock > anymore. Virtqueues are only accessed from one thread at any moment and > the s->rq global state is protected by its own lock now. > > Signed-off-by: Stefan

Re: [PATCH 2/4] virtio-blk: add lock to protect s->rq

2023-09-14 Thread Eric Blake
On Thu, Sep 14, 2023 at 10:00:59AM -0400, Stefan Hajnoczi wrote: > s->rq is accessed from IO_CODE and GLOBAL_STATE_CODE. Introduce a lock > to protect s->rq and eliminate reliance on the AioContext lock. > > Signed-off-by: Stefan Hajnoczi > --- > include/hw/virtio/virtio-blk.h | 3 +- >

Re: [PATCH 1/4] block/file-posix: set up Linux AIO and io_uring in the current thread

2023-09-14 Thread Eric Blake
On Thu, Sep 14, 2023 at 10:00:58AM -0400, Stefan Hajnoczi wrote: > The file-posix block driver currently only sets up Linux AIO and > io_uring in the BDS's AioContext. In the multi-queue block layer we must > be able to submit I/O requests in AioContexts that do not have Linux AIO > and io_uring

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-14 Thread Denis V. Lunev
On 9/14/23 16:10, Eric Blake wrote: On Wed, Sep 13, 2023 at 10:36:35AM -0500, Eric Blake wrote: On Wed, Sep 06, 2023 at 04:09:17PM +0200, Denis V. Lunev wrote: Each particular testcase could skipped intentionally and accidentally. For example the test is not designed for a particular image

Re: [PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-14 Thread Peter Maydell
On Thu, 7 Sept 2023 at 19:18, Stefan Hajnoczi wrote: > > From: Jeuk Kim > > This commit adds support for ufs logical unit. > The LU handles processing for the SCSI command, > unit descriptor query request. > > This commit enables the UFS device to process > IO requests. > > Signed-off-by: Jeuk

Re: [PULL 3/5] hw/ufs: Support for Query Transfer Requests

2023-09-14 Thread Peter Maydell
On Thu, 7 Sept 2023 at 19:17, Stefan Hajnoczi wrote: > > From: Jeuk Kim > > This commit makes the UFS device support query > and nop out transfer requests. > > The next patch would be support for UFS logical > unit and scsi command transfer request. > > Signed-off-by: Jeuk Kim > Reviewed-by:

Re: [PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-14 Thread Peter Maydell
On Thu, 7 Sept 2023 at 19:18, Stefan Hajnoczi wrote: > > From: Jeuk Kim > > This commit adds support for ufs logical unit. > The LU handles processing for the SCSI command, > unit descriptor query request. > > This commit enables the UFS device to process > IO requests. > > Signed-off-by: Jeuk

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-14 Thread Eric Blake
On Wed, Sep 13, 2023 at 10:36:35AM -0500, Eric Blake wrote: > On Wed, Sep 06, 2023 at 04:09:17PM +0200, Denis V. Lunev wrote: > > Each particular testcase could skipped intentionally and accidentally. > > For example the test is not designed for a particular image format or > > is not run due to

[PATCH 4/4] virtio-blk: don't lock AioContext in the submission code path

2023-09-14 Thread Stefan Hajnoczi
There is no need to acquire the AioContext lock around blk_aio_*() or blk_get_geometry() anymore. I/O plugging (defer_call()) also does not require the AioContext lock anymore. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH 3/4] virtio-blk: don't lock AioContext in the completion code path

2023-09-14 Thread Stefan Hajnoczi
Nothing in the completion code path relies on the AioContext lock anymore. Virtqueues are only accessed from one thread at any moment and the s->rq global state is protected by its own lock now. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 34 -- 1

[PATCH 0/4] virtio-blk: prepare for the multi-queue block layer

2023-09-14 Thread Stefan Hajnoczi
The virtio-blk device will soon be able to assign virtqueues to IOThreads, eliminating the single IOThread bottleneck. In order to do that, the I/O code path must support running in multiple threads. This patch series removes the AioContext lock from the virtio-blk I/O code path, adds

[PATCH 1/4] block/file-posix: set up Linux AIO and io_uring in the current thread

2023-09-14 Thread Stefan Hajnoczi
The file-posix block driver currently only sets up Linux AIO and io_uring in the BDS's AioContext. In the multi-queue block layer we must be able to submit I/O requests in AioContexts that do not have Linux AIO and io_uring set up yet since any thread can call into the block driver. Set up Linux

[PATCH 2/4] virtio-blk: add lock to protect s->rq

2023-09-14 Thread Stefan Hajnoczi
s->rq is accessed from IO_CODE and GLOBAL_STATE_CODE. Introduce a lock to protect s->rq and eliminate reliance on the AioContext lock. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-blk.h | 3 +- hw/block/virtio-blk.c | 67 +++--- 2 files

Re: [PATCH v3 0/2] qemu-img: map: implement support for compressed clusters

2023-09-14 Thread Kevin Wolf
Am 07.09.2023 um 23:02 hat Andrey Drobyshev via geschrieben: > v2 --> v3: > * Make "compressed" field mandatory, not optional; > * Adjust field description in qapi/block-core.json; > * Squash patch 3 into patch 2 so that failing tests don't break bisect; > * Update even more tests' outputs

Re: [PATCH v2 00/21] Graph locking part 4 (node management)

2023-09-14 Thread Kevin Wolf
Am 12.09.2023 um 18:49 hat Stefan Hajnoczi geschrieben: > On Mon, Sep 11, 2023 at 11:45:59AM +0200, Kevin Wolf wrote: > > The previous parts of the graph locking changes focussed mostly on the > > BlockDriver side and taking reader locks while performing I/O. This > > series focusses more on the

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-14 Thread Peter Maydell
On Thu, 14 Sept 2023 at 13:29, Kevin Wolf wrote: > > Am 13.09.2023 um 18:31 hat Eric Blake geschrieben: > > I guess it boils down to whether there is an actionable response in > > that message. If a test is skipped because it is the wrong format > > (for example, ./check -raw skipping a test

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-14 Thread Kevin Wolf
Am 13.09.2023 um 18:31 hat Eric Blake geschrieben: > On Wed, Sep 13, 2023 at 04:47:54PM +0100, Daniel P. Berrangé wrote: > > On Wed, Sep 06, 2023 at 04:09:17PM +0200, Denis V. Lunev wrote: > > > Each particular testcase could skipped intentionally and accidentally. > > > For example the test is

Re: [PATCH v3 2/5] test-bdrv-drain: avoid race with BH in IOThread drain test

2023-09-14 Thread Stefan Hajnoczi
On Wed, Sep 13, 2023 at 11:08:54AM -0500, Eric Blake wrote: > On Tue, Sep 12, 2023 at 07:10:34PM -0400, Stefan Hajnoczi wrote: > > This patch fixes a race condition in test-bdrv-drain that is difficult > > to reproduce. test-bdrv-drain sometimes fails without an error message > > on the block pull

[PATCH 2/2] iotests: add new test case for image streaming

2023-09-14 Thread Andrey Zhadchenko via
Check if we can list named block nodes when the block-stream is finalized but not yet dismissed This previously led to a crash Signed-off-by: Andrey Zhadchenko --- tests/qemu-iotests/030 | 17 + tests/qemu-iotests/030.out | 4 ++-- 2 files changed, 19 insertions(+), 2

[PATCH 1/2] block: do not try to list nearly-dropped filters

2023-09-14 Thread Andrey Zhadchenko via
When the block job ends, it removes filter from the tree. However the last reference to filter bds is dropped when the job is destroyed. So when we have finalized but not dismissed job, if we try to 'query-named-block-nodes', QEMU will stumble upon a half-dead filter and crash, since the filter

[PATCH 0/2] block: do not try to list nearly-dropped filters

2023-09-14 Thread Andrey Zhadchenko via
QEMU crashes on QMP command 'query-named-block-nodes' if we have finalized but not dismissed block job with filter, for example block-stream. This happens because the filter no longer has references from which QEMU can query block info. Skip such filters while listing block nodes. This patchset

[PATCH v6 3/3] hw/nvme: add nvme management interface model

2023-09-14 Thread Klaus Jensen
From: Klaus Jensen Add the 'nmi-i2c' device that emulates an NVMe Management Interface controller. Initial support is very basic (Read NMI DS, Configuration Get). This is based on previously posted code by Padmakar Kalghatgi, Arun Kumar Agasar and Saurav Kumar. Reviewed-by: Jonathan Cameron

[PATCH v6 2/3] hw/i2c: add mctp core

2023-09-14 Thread Klaus Jensen
From: Klaus Jensen Add an abstract MCTP over I2C endpoint model. This implements MCTP control message handling as well as handling the actual I2C transport (packetization). Devices are intended to derive from this and implement the class methods. Parts of this implementation is inspired by

[PATCH v6 0/3] hw/{i2c,nvme}: mctp endpoint, nvme management interface model

2023-09-14 Thread Klaus Jensen
This adds a generic MCTP endpoint model that other devices may derive from. Also included is a very basic implementation of an NVMe-MI device, supporting only a small subset of the required commands. Since this all relies on i2c target mode, this can currently only be used with an SoC that

[PATCH v6 1/3] hw/i2c: add smbus pec utility function

2023-09-14 Thread Klaus Jensen
From: Klaus Jensen Add i2c_smbus_pec() to calculate the SMBus Packet Error Code for a message. Reviewed-by: Jonathan Cameron Signed-off-by: Klaus Jensen --- hw/i2c/smbus_master.c | 26 ++ include/hw/i2c/smbus_master.h | 2 ++ 2 files changed, 28 insertions(+)

Re: [PATCH v5 3/3] hw/nvme: add nvme management interface model

2023-09-14 Thread Andrew Jeffery
Hi Klaus, On Thu, 2023-09-14 at 08:51 +0200, Klaus Jensen wrote: > On Sep 12 13:50, Andrew Jeffery wrote: > > Hi Klaus, > > > > On Tue, 2023-09-05 at 10:38 +0200, Klaus Jensen wrote: > > > > > > > > +static void nmi_handle_mi_config_get(NMIDevice *nmi, NMIRequest > > > > *request) > > > > +{ >

Re: [PATCH v5 3/3] hw/nvme: add nvme management interface model

2023-09-14 Thread Klaus Jensen
On Sep 12 13:50, Andrew Jeffery wrote: > Hi Klaus, > > On Tue, 2023-09-05 at 10:38 +0200, Klaus Jensen wrote: > > > > > > +static void nmi_handle_mi_config_get(NMIDevice *nmi, NMIRequest > > > *request) > > > +{ > > > +    uint32_t dw0 = le32_to_cpu(request->dw0); > > > +    uint8_t identifier =

Re: [PATCH v3 1/5] block: remove AIOCBInfo->get_aio_context()

2023-09-14 Thread Klaus Jensen
On Sep 12 19:10, Stefan Hajnoczi wrote: > The synchronous bdrv_aio_cancel() function needs the acb's AioContext so > it can call aio_poll() to wait for cancellation. > > It turns out that all users run under the BQL in the main AioContext, so > this callback is not needed. > > Remove the