Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-20 Thread Stefan Hajnoczi
On Thu, Jul 06, 2023 at 12:48:20PM -0400, Michael S. Tsirkin wrote: > On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote: > > Currently QEMU has to know some details about the back-end to be able > > to setup the guest. While various parts of the setup can be delegated > > to the backend

Re: [virtio-dev] [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-20 Thread Stefan Hajnoczi
On Fri, Jul 07, 2023 at 12:27:39PM +0200, Stefano Garzarella wrote: > On Tue, Jul 04, 2023 at 04:02:42PM +0100, Alex Bennée wrote: > > > > Stefano Garzarella writes: > > > > > On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote: > > > > diff --git a/docs/interop/vhost-user.rst

Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-20 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote: > diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c > index c4e0cbd702..28b021d5d3 100644 > --- a/hw/virtio/vhost-user.c > +++ b/hw/virtio/vhost-user.c > @@ -202,6 +202,13 @@ typedef struct VhostUserInflight { > uint16_t

Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-20 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote: > Currently QEMU has to know some details about the back-end to be able > to setup the guest. While various parts of the setup can be delegated > to the backend (for example config handling) this is a very piecemeal > approach. > > This

Re: [PATCH v5 0/3] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-20 Thread Stefan Hajnoczi
Hi, I'm ready to merge this but encountered a bug when testing: $ qemu-system-x86_64 --device ufs --device ufs-lu Segmentation fault (core dumped) Please ensure there is an error message like with SCSI disks: $ qemu-system-x86_64 --device virtio-scsi-pci --device scsi-hd

Re: [PATCH 0/3] Support message-based DMA in vfio-user server

2023-07-20 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 01:06:24AM -0700, Mattias Nissler wrote: > This series adds basic support for message-based DMA in qemu's vfio-user > server. This is useful for cases where the client does not provide file > descriptors for accessing system memory via memory mappings. My motivating use >

Re: [PATCH 3/3] vfio-user: Message-based DMA support

2023-07-20 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 01:06:27AM -0700, Mattias Nissler wrote: > Wire up support for DMA for the case where the vfio-user client does not > provide mmap()-able file descriptors, but DMA requests must be performed > via the VFIO-user protocol. This installs an indirect memory region, > which

Re: [PATCH 1/3] softmmu: Support concurrent bounce buffers

2023-07-20 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 01:06:25AM -0700, Mattias Nissler wrote: > +if (qatomic_dec_fetch(_buffers_in_use) == 1) { > +cpu_notify_map_clients(); > } About my comment regarding removing this API: I see the next patch does that. Stefan signature.asc Description: PGP

Re: [PATCH 2/3] softmmu: Remove DMA unmap notification callback

2023-07-20 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 01:06:26AM -0700, Mattias Nissler wrote: > According to old commit messages, this was introduced to retry a DMA > operation at a later point in case the single bounce buffer is found to > be busy. This was never used widely - only the dma-helpers code made use > of it, but

Re: [PATCH 1/3] softmmu: Support concurrent bounce buffers

2023-07-20 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 01:06:25AM -0700, Mattias Nissler wrote: > It is not uncommon for device models to request mapping of several DMA > regions at the same time. An example is igb (and probably other net > devices as well) when a packet is spread across multiple descriptors. > > In order to

Re: [PATCH 6/6] vhost-user: Have reset_status fall back to reset

2023-07-20 Thread Stefan Hajnoczi
On Wed, Jul 19, 2023 at 04:27:58PM +0200, Hanna Czenczek wrote: > On 19.07.23 16:11, Hanna Czenczek wrote: > > On 18.07.23 17:10, Stefan Hajnoczi wrote: > > > On Tue, Jul 11, 2023 at 05:52:28PM +0200, Hanna Czenczek wrote: > > > > The only user of vhost_user_re

Re: [PATCH v2 1/4] vhost-user.rst: Migrating back-end-internal state

2023-07-20 Thread Stefan Hajnoczi
On Wed, 19 Jul 2023 at 12:35, Hanna Czenczek wrote: > > On 18.07.23 17:57, Stefan Hajnoczi wrote: > > On Wed, Jul 12, 2023 at 01:16:59PM +0200, Hanna Czenczek wrote: > >> For vhost-user devices, qemu can migrate the virtio state, but not the > >> back-end's inte

Re: [PATCH 5/6] vhost-vdpa: Match vhost-user's status reset

2023-07-19 Thread Stefan Hajnoczi
On Wed, 19 Jul 2023 at 10:10, Hanna Czenczek wrote: > > On 18.07.23 16:50, Stefan Hajnoczi wrote: > > On Tue, Jul 11, 2023 at 05:52:27PM +0200, Hanna Czenczek wrote: > >> vhost-vdpa and vhost-user differ in how they reset the status in their > >> respective vhos

Re: [PATCH] vhost-user.rst: Clarify enabling/disabling vrings

2023-07-19 Thread Stefan Hajnoczi
On Wed, 19 Jul 2023 at 09:34, Hanna Czenczek wrote: > > On 18.07.23 17:26, Stefan Hajnoczi wrote: > > On Wed, Jul 12, 2023 at 11:17:04AM +0200, Hanna Czenczek wrote: > >> Currently, the vhost-user documentation says that rings are to be > >> initia

Re: [PATCH v4 3/3] hw/ufs: Support for UFS logical unit

2023-07-18 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 05:33:59PM +0900, Jeuk Kim wrote: > +static Property ufs_lu_props[] = { > +DEFINE_PROP_DRIVE_IOTHREAD("drive", UfsLu, qdev.conf.blk), This device is not aware of IOThreads, so I think DEFINE_PROP_DRIVE() should be used instead. signature.asc Description: PGP

Re: [PATCH v4 2/3] hw/ufs: Support for Query Transfer Requests

2023-07-18 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 05:33:58PM +0900, Jeuk Kim wrote: > +static MemTxResult ufs_dma_read_prdt(UfsRequest *req) > +{ > +UfsHc *u = req->hc; > +uint16_t prdt_len = le16_to_cpu(req->utrd.prd_table_length); > +uint16_t prdt_byte_off = > +le16_to_cpu(req->utrd.prd_table_offset)

Re: [PATCH v4 1/3] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-07-18 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 05:33:57PM +0900, Jeuk Kim wrote: > From: Jeuk Kim > > Universal Flash Storage (UFS) is a high-performance mass storage device > with a serial interface. It is primarily used as a high-performance > data storage device for embedded applications. > > This commit contains

Re: PING: [PATCH v4 0/3] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-18 Thread Stefan Hajnoczi
On Tue, Jul 11, 2023 at 07:31:02PM +0900, Jeuk Kim wrote: > Hi, > Any more reviews...? > > Dear Stefan > If you don't mind, Could you give it "reviewed-by"? > And is there anything else I should do...? Sorry for the late reply. I was on vacation and am working my way through pending code review

Re: [PATCH v2 4/4] vhost-user-fs: Implement internal migration

2023-07-18 Thread Stefan Hajnoczi
nsfer migratory > state. It is its own dedicated subsection, so that for external > migration, it can be disabled. > > Signed-off-by: Hanna Czenczek > --- > hw/virtio/vhost-user-fs.c | 101 +- > 1 file changed, 100 insertions(+), 1 delet

Re: [PATCH v2 3/4] vhost: Add high-level state save/load functions

2023-07-18 Thread Stefan Hajnoczi
On Wed, Jul 12, 2023 at 01:17:01PM +0200, Hanna Czenczek wrote: > vhost_save_backend_state() and vhost_load_backend_state() can be used by > vhost front-ends to easily save and load the back-end's state to/from > the migration stream. > > Because we do not know the full state size ahead of time,

Re: [PATCH v2 2/4] vhost-user: Interface for migration state transfer

2023-07-18 Thread Stefan Hajnoczi
t; include/hw/virtio/vhost.h | 79 > hw/virtio/vhost-user.c| 147 ++ > hw/virtio/vhost.c | 37 > 4 files changed, 287 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v2 1/4] vhost-user.rst: Migrating back-end-internal state

2023-07-18 Thread Stefan Hajnoczi
On Wed, Jul 12, 2023 at 01:16:59PM +0200, Hanna Czenczek wrote: > @@ -1471,6 +1511,53 @@ Front-end message types >before. The back-end must again begin processing rings that are not >stopped, and it may resume background operations. > > +``VHOST_USER_SET_DEVICE_STATE_FD`` > + :id: 43 >

Re: [PATCH v2 1/4] vhost-user.rst: Migrating back-end-internal state

2023-07-18 Thread Stefan Hajnoczi
tes its data into the pipe, and the reading > side reads it until it sees an EOF. Then, the front-end will check for > success via CHECK_DEVICE_STATE, which on the destination side includes > checking for integrity (i.e. errors during deserialization). > > Suggested-by: Stefan Hajn

Re: [PATCH] vhost-user.rst: Clarify enabling/disabling vrings

2023-07-18 Thread Stefan Hajnoczi
On Wed, Jul 12, 2023 at 11:17:04AM +0200, Hanna Czenczek wrote: > Currently, the vhost-user documentation says that rings are to be > initialized in a disabled state when VHOST_USER_F_PROTOCOL_FEATURES is > negotiated. However, by the time of feature negotiation, all rings have > already been

Re: [PATCH 0/6] vhost-user: Add suspend/resume

2023-07-18 Thread Stefan Hajnoczi
On Tue, Jul 11, 2023 at 05:52:22PM +0200, Hanna Czenczek wrote: > Hi, > > As discussed on the previous version of the virtio-fs migration series > (https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg01575.html), > we currently don’t have a good way to have a vhost-user back-end fully >

Re: [PATCH 6/6] vhost-user: Have reset_status fall back to reset

2023-07-18 Thread Stefan Hajnoczi
On Tue, Jul 11, 2023 at 05:52:28PM +0200, Hanna Czenczek wrote: > The only user of vhost_user_reset_status() is vhost_dev_stop(), which > only uses it as a fall-back to stop the back-end if it does not support > SUSPEND. However, vhost-user's implementation is a no-op unless the > back-end

Re: [PATCH 5/6] vhost-vdpa: Match vhost-user's status reset

2023-07-18 Thread Stefan Hajnoczi
On Tue, Jul 11, 2023 at 05:52:27PM +0200, Hanna Czenczek wrote: > vhost-vdpa and vhost-user differ in how they reset the status in their > respective vhost_reset_status implementations: vhost-vdpa zeroes it, > then re-adds the S_ACKNOWLEDGE and S_DRIVER config bits. S_DRIVER_OK is > then set in

Re: [PATCH 3/6] vhost: Do not reset suspended devices on stop

2023-07-18 Thread Stefan Hajnoczi
end. > > Signed-off-by: Hanna Czenczek > --- > include/hw/virtio/vhost-vdpa.h | 2 -- > include/hw/virtio/vhost.h | 8 > hw/virtio/vhost-vdpa.c | 11 +++ > hw/virtio/vhost.c | 8 +++- > 4 files changed, 22 inser

Re: [PATCH 4/6] vhost-user: Implement suspend/resume

2023-07-18 Thread Stefan Hajnoczi
> Signed-off-by: Hanna Czenczek > --- > hw/virtio/vhost-user.c | 99 +- > 1 file changed, 97 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 2/6] vhost-vdpa: Move vhost_vdpa_reset_status() up

2023-07-18 Thread Stefan Hajnoczi
/vhost-vdpa.c | 28 ++-- > 1 file changed, 14 insertions(+), 14 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 1/6] vhost-user.rst: Add suspend/resume

2023-07-18 Thread Stefan Hajnoczi
On Tue, Jul 11, 2023 at 05:52:23PM +0200, Hanna Czenczek wrote: > When stopping the VM, qemu wants all devices to fully cease any > operation, too. Currently, we can only have vhost-user back-ends stop > processing vrings, but not background operations. Add the SUSPEND and > RESUME commands from

Re: [PATCH] thread-pool: signal "request_cond" while locked

2023-07-18 Thread Stefan Hajnoczi
ad_pool_submit_aio() as well with > signalling `request_cond`, but maybe it's much less likely to be an > issue? The caller must not submit work while destroying the pool, so I'm not sure when this problem could occur with thread_pool_submit_aio()? > --- > util/thread-pool.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) This is QEMU 8.1 material. Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v2] block: Fix pad_request's request restriction

2023-07-17 Thread Stefan Hajnoczi
On Fri, Jul 14, 2023 at 10:59:38AM +0200, Hanna Czenczek wrote: > bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, > which bdrv_check_qiov_request() does not guarantee. > > bdrv_check_request32() however will guarantee this, and both of > bdrv_pad_request()'s callers

[PULL for-8.1 0/1] Block patches

2023-07-17 Thread Stefan Hajnoczi
ing startup. ---- Stefan Hajnoczi (1): block/nvme: invoke blk_io_plug_call() outside q->lock block/nvme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.40.1

[PULL for-8.1 1/1] block/nvme: invoke blk_io_plug_call() outside q->lock

2023-07-17 Thread Stefan Hajnoczi
ng the blk_io_plug_call() outside q->lock. This is safe because no other thread runs code related to this queue and blk_io_plug_call()'s internal state is immune to thread safety issues since it is thread-local. Reported-by: Lukáš Doktor Signed-off-by: Stefan Hajnoczi Tested-by: Lukas Doktor

drain_call_rcu() vs nested event loops

2023-07-13 Thread Stefan Hajnoczi
Hi, I've encountered a bug where two vcpu threads enter a device's MMIO emulation callback at the same time. This is never supposed to happen thanks to the Big QEMU Lock (BQL), but drain_call_rcu() and nested event loops make it possible: 1. A device's MMIO emulation callback invokes

[PULL 1/1] virtio-blk: fix host notifier issues during dataplane start/stop

2023-07-12 Thread Stefan Hajnoczi
loop thread and correctly moves host notifier processing to the IOThread. Fixes: 1665d9326fd2 ("virtio-blk: implement BlockDevOps->drained_begin()") Reported-by: Lukáš Doktor Signed-off-by: Stefan Hajnoczi Tested-by: Lukas Doktor Message-id: 20230704151527.193586-1-stefa...@redhat.

[PULL 0/1] Block patches

2023-07-12 Thread Stefan Hajnoczi
to 75dcb4d790bbe5327169fd72b185960ca58e2fa6: virtio-blk: fix host notifier issues during dataplane start/stop (2023-07-12 15:20:32 -0400) Pull request Stefan Hajnoczi (1

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-12 Thread Stefan Hajnoczi
On Wed, 12 Jul 2023 at 10:51, Hanna Czenczek wrote: > > On 12.07.23 16:15, Stefan Hajnoczi wrote: > > On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: > >> On 11.07.23 22:23, Stefan Hajnoczi wrote: > >>> On Fri, Jun 09, 2023 at 10:33

Re: [PATCH] virtio-blk: fix host notifier issues during dataplane start/stop

2023-07-12 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 05:15:27PM +0200, Stefan Hajnoczi wrote: > The main loop thread can consume 100% CPU when using --device > virtio-blk-pci,iothread=. ppoll() constantly returns but > reading virtqueue host notifiers fails with EAGAIN. The file descriptors > are stale and remai

[PATCH] block/nvme: invoke blk_io_plug_call() outside q->lock

2023-07-12 Thread Stefan Hajnoczi
ng the blk_io_plug_call() outside q->lock. This is safe because no other thread runs code related to this queue and blk_io_plug_call()'s internal state is immune to thread safety issues since it is thread-local. Reported-by: Lukáš Doktor Fixes: f2e590002bd6 ("block/nvme: convert to blk_i

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-12 Thread Stefan Hajnoczi
On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: > On 11.07.23 22:23, Stefan Hajnoczi wrote: > > On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: > > > bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, > > > which bdr

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-11 Thread Stefan Hajnoczi
On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: > bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, > which bdrv_check_qiov_request() does not guarantee. > > bdrv_check_request32() however will guarantee this, and both of > bdrv_pad_request()'s callers

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-11 Thread Stefan Hajnoczi
On Tue, 11 Jul 2023 at 13:06, Stefano Garzarella wrote: > > CCing `./scripts/get_maintainer.pl -f drivers/scsi/virtio_scsi.c`, > since I found a few things in the virtio-scsi driver... > > FYI we have seen that Linux has problems with a QEMU patch for the > virtio-scsi device (details at the

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-07-10 Thread Stefan Hajnoczi
On Mon, 10 Jul 2023 at 06:55, Ilya Maximets wrote: > > On 7/10/23 05:51, Jason Wang wrote: > > On Fri, Jul 7, 2023 at 7:21 PM Ilya Maximets wrote: > >> > >> On 7/7/23 03:43, Jason Wang wrote: > >>> On Fri, Jul 7, 2023 at 3:08 AM Stefan Hajnoczi wrote:

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-07-10 Thread Stefan Hajnoczi
On Thu, 6 Jul 2023 at 21:43, Jason Wang wrote: > > On Fri, Jul 7, 2023 at 3:08 AM Stefan Hajnoczi wrote: > > > > On Wed, 5 Jul 2023 at 02:02, Jason Wang wrote: > > > > > > On Mon, Jul 3, 2023 at 5:03 PM Stefan Hajnoczi wrote: > > > > > &g

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-07-06 Thread Stefan Hajnoczi
On Wed, 5 Jul 2023 at 02:02, Jason Wang wrote: > > On Mon, Jul 3, 2023 at 5:03 PM Stefan Hajnoczi wrote: > > > > On Fri, 30 Jun 2023 at 09:41, Jason Wang wrote: > > > > > > On Thu, Jun 29, 2023 at 8:36 PM Stefan Hajnoczi > > > wrote: > > &

[PULL 1/1] block/blkio: fix module_block.py parsing

2023-07-04 Thread Stefan Hajnoczi
) Reported-by: Qing Wang Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Message-id: 20230704123436.187761-1-stefa...@redhat.com Cc: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- block/blkio.c | 108 ++ 1 file changed, 56 inserti

[PULL 0/1] Block patches

2023-07-04 Thread Stefan Hajnoczi
. Stefan Hajnoczi (1): block/blkio: fix module_block.py parsing block/blkio.c | 108 ++ 1 file changed, 56 insertions(+), 52 deletions(-) -- 2.40.1

[PATCH] virtio-blk: fix host notifier issues during dataplane start/stop

2023-07-04 Thread Stefan Hajnoczi
loop thread and correctly moves host notifier processing to the IOThread. Fixes: 1665d9326fd2 ("virtio-blk: implement BlockDevOps->drained_begin()") Reported-by: Lukáš Doktor Signed-off-by: Stefan Hajnoczi --- hw/block/dataplane/virtio-blk.c | 67 +++-- 1 fi

Re: [PATCH] block/blkio: fix module_block.py parsing

2023-07-04 Thread Stefan Hajnoczi
On Mon, 3 Jul 2023 at 12:55, Stefano Garzarella wrote: > > On Mon, Jul 03, 2023 at 12:35:24PM +0200, Stefan Hajnoczi wrote: > >When QEMU is built with --enable-modules, the module_block.py script > >parses block/*.c to find block drivers that are built as modules. The > >

[PATCH v2] block/blkio: fix module_block.py parsing

2023-07-04 Thread Stefan Hajnoczi
) Reported-by: Qing Wang Cc: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- v2: - Drop unnecessary backslashes [Stefano] --- block/blkio.c | 108 ++ 1 file changed, 56 insertions(+), 52 deletions(-) diff --git a/block/blkio.c b/block/blk

[PATCH] block/blkio: fix module_block.py parsing

2023-07-03 Thread Stefan Hajnoczi
) Reported-by: Qing Wang Cc: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- block/blkio.c | 110 ++ 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/block/blkio.c b/block/blkio.c index 527323d625..589f829a83 100644 --- a/block/blk

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-07-03 Thread Stefan Hajnoczi
On Fri, 30 Jun 2023 at 09:41, Jason Wang wrote: > > On Thu, Jun 29, 2023 at 8:36 PM Stefan Hajnoczi wrote: > > > > On Thu, 29 Jun 2023 at 07:26, Jason Wang wrote: > > > > > > On Wed, Jun 28, 2023 at 4:25 PM Stefan Hajnoczi > > > wrote: > > &

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-06-29 Thread Stefan Hajnoczi
On Thu, 29 Jun 2023 at 07:26, Jason Wang wrote: > > On Wed, Jun 28, 2023 at 4:25 PM Stefan Hajnoczi wrote: > > > > On Wed, 28 Jun 2023 at 10:19, Jason Wang wrote: > > > > > > On Wed, Jun 28, 2023 at 4:15 PM Stefan Hajnoczi > > > wrote: > > &

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-06-28 Thread Stefan Hajnoczi
On Wed, 28 Jun 2023 at 10:19, Jason Wang wrote: > > On Wed, Jun 28, 2023 at 4:15 PM Stefan Hajnoczi wrote: > > > > On Wed, 28 Jun 2023 at 09:59, Jason Wang wrote: > > > > > > On Wed, Jun 28, 2023 at 3:46 PM Stefan Hajnoczi > > > wrote: > > &

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-06-28 Thread Stefan Hajnoczi
On Wed, 28 Jun 2023 at 09:59, Jason Wang wrote: > > On Wed, Jun 28, 2023 at 3:46 PM Stefan Hajnoczi wrote: > > > > On Wed, 28 Jun 2023 at 05:28, Jason Wang wrote: > > > > > > On Wed, Jun 28, 2023 at 6:45 AM Ilya Maximets wrote: > > >

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-06-28 Thread Stefan Hajnoczi
On Wed, 28 Jun 2023 at 05:28, Jason Wang wrote: > > On Wed, Jun 28, 2023 at 6:45 AM Ilya Maximets wrote: > > > > On 6/27/23 04:54, Jason Wang wrote: > > > On Mon, Jun 26, 2023 at 9:17 PM Ilya Maximets wrote: > > >> > > >> On 6/26/23 08:32, Jason Wang wrote: > > >>> On Sun, Jun 25, 2023 at 3:06 

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-06-27 Thread Stefan Hajnoczi
Can multiple VMs share a host netdev by filtering incoming traffic based on each VM's MAC address and directing it to the appropriate XSK? If yes, then I think AF_XDP is interesting when SR-IOV or similar hardware features are not available. The idea of an AF_XDP passthrough device seems

Re: virtio-blk using a single iothread

2023-06-21 Thread Stefan Hajnoczi
Hi Sagi, I just got back from a conference and am going to be offline for a week starting tomorrow. I haven't had time to look through your email but will reply when I'm back from vacation. Stefan On Sun, 11 Jun 2023 at 14:29, Sagi Grimberg wrote: > > > > On 6/8/23 19:08, Stefan Ha

Re: [RFC 5/6] migration: Deprecate block migration

2023-06-21 Thread Stefan Hajnoczi
On Mon, Jun 12, 2023 at 09:33:43PM +0200, Juan Quintela wrote: > It is obsolete. It is better to use driver_mirror+NBD instead. > > CC: Kevin Wolf > CC: Eric Blake > CC: Stefan Hajnoczi > CC: Hanna Czenczek > > Signed-off-by: Juan Quintela > > --- >

Re: [RFC 2/4] qcow2: add configurations for zoned format extension

2023-06-20 Thread Stefan Hajnoczi
On Mon, Jun 19, 2023 at 10:50:31PM +0800, Sam Li wrote: > Stefan Hajnoczi 于2023年6月19日周一 22:42写道: > > > > On Mon, Jun 19, 2023 at 06:32:52PM +0800, Sam Li wrote: > > > Stefan Hajnoczi 于2023年6月19日周一 18:10写道: > > > > On Mon, Jun 05, 2023 at 06:41:06PM +0800

Re: [PATCH 05/12] hw/virtio: Add support for apple virtio-blk

2023-06-20 Thread Stefan Hajnoczi
On Wed, Jun 14, 2023 at 10:56:22PM +, Alexander Graf wrote: > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 39e7f23fab..76b85bb3cb 100644 > --- a/hw/block/virtio-blk.c > +++ b/hw/block/virtio-blk.c > @@ -1120,6 +1120,20 @@ static int

Re: [PATCH v2 3/3] hw/ufs: Support for UFS logical unit

2023-06-19 Thread Stefan Hajnoczi
On Mon, Jun 19, 2023 at 08:16:27PM +0900, Jeuk Kim wrote: > On Fri, Jun 19, 2023, Stefan Hajnoczi wrote: > >On Fri, Jun 16, 2023 at 03:58:27PM +0900, Jeuk Kim wrote: > >> This commit adds support for ufs logical unit. > >> The LU handles processing for the SCSI command,

Re: [RFC 2/4] qcow2: add configurations for zoned format extension

2023-06-19 Thread Stefan Hajnoczi
On Mon, Jun 19, 2023 at 06:32:52PM +0800, Sam Li wrote: > Stefan Hajnoczi 于2023年6月19日周一 18:10写道: > > On Mon, Jun 05, 2023 at 06:41:06PM +0800, Sam Li wrote: > > > diff --git a/block/qcow2.h b/block/qcow2.h > > > index 4f67eb912a..fe18dc4d97 100644 > > > --- a/b

Re: [RFC 4/4] iotests: test the zoned format feature for qcow2 file

2023-06-19 Thread Stefan Hajnoczi
On Mon, Jun 05, 2023 at 06:41:08PM +0800, Sam Li wrote: > The zoned format feature can be tested by: > $ tests/qemu-iotests/check zoned-qcow2 > > Signed-off-by: Sam Li > --- > tests/qemu-iotests/tests/zoned-qcow2 | 110 +++ > tests/qemu-iotests/tests/zoned-qcow2.out |

Re: [RFC 3/4] qcow2: add zoned emulation capability

2023-06-19 Thread Stefan Hajnoczi
On Mon, Jun 05, 2023 at 06:41:07PM +0800, Sam Li wrote: > By adding zone operations and zoned metadata, the zoned emulation > capability enables full emulation support of zoned device using > a qcow2 file. The zoned device metadata includes zone type, > zoned device state and write pointer of each

Re: [RFC 2/4] qcow2: add configurations for zoned format extension

2023-06-19 Thread Stefan Hajnoczi
On Mon, Jun 05, 2023 at 06:41:06PM +0800, Sam Li wrote: > To configure the zoned format feature on the qcow2 driver, it > requires following arguments: the device size, zoned profile, > zoned model, zone size, zone capacity, number of conventional > zones, limits on zone resources (max append

Re: [PATCH v2 3/3] hw/ufs: Support for UFS logical unit

2023-06-19 Thread Stefan Hajnoczi
On Fri, Jun 16, 2023 at 03:58:27PM +0900, Jeuk Kim wrote: > 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. Is UFS a SCSI Host Bus Adapter capable of

Re: [PATCH v2 2/3] hw/ufs: Support for Query Transfer Requests

2023-06-19 Thread Stefan Hajnoczi
On Fri, Jun 16, 2023 at 03:58:25PM +0900, Jeuk Kim wrote: > 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 > --- > hw/ufs/ufs.c | 968

Re: [PATCH v2 1/3] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-06-16 Thread Stefan Hajnoczi
On Fri, Jun 16, 2023 at 03:58:21PM +0900, Jeuk Kim wrote: > Universal Flash Storage (UFS) is a high-performance mass storage device > with a serial interface. It is primarily used as a high-performance > data storage device for embedded applications. > > This commit contains code for UFS device

Re: [PATCH v2 0/3] hw/ufs: Add Universal Flash Storage (UFS) support

2023-06-16 Thread Stefan Hajnoczi
On Fri, Jun 16, 2023 at 03:58:16PM +0900, Jeuk Kim wrote: > Since v1: > - use macros of "hw/registerfields.h" (Addressed Philippe's review comments) > > This patch series adds support for a new PCI-based UFS device. > > The UFS pci device id (PCI_DEVICE_ID_REDHAT_UFS) is not registered > in the

Re: [RFC 1/4] docs/qcow2: add the zoned format feature

2023-06-13 Thread Stefan Hajnoczi
On Mon, Jun 05, 2023 at 06:41:05PM +0800, Sam Li wrote: > Add the specs for the zoned format feature of the qcow2 driver. Once > the zoned_profile is set to `zbc`, then the qcow2 file can be taken > as zoned devices and passed through by virtio-blk device to the guest. > > Signed-off-by: Sam Li

Re: [PATCH] virtio-scsi: avoid dangling host notifier in ->ioeventfd_stop()

2023-06-11 Thread Stefan Hajnoczi
Buglink: https://gitlab.com/qemu-project/qemu/-/issues/1680 On Sun, Jun 11, 2023, 15:39 Stefan Hajnoczi wrote: > virtio_scsi_dataplane_stop() calls blk_drain_all(), which invokes > ->drained_begin()/->drained_end() after we've already detached the host > notifier. virtio_s

[PATCH] virtio-scsi: avoid dangling host notifier in ->ioeventfd_stop()

2023-06-11 Thread Stefan Hajnoczi
ed-off-by: Stefan Hajnoczi --- hw/scsi/virtio-scsi.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 9c8ef0aaa6..45b95ea070 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -1125,7 +1

Re: virtio-blk using a single iothread

2023-06-08 Thread Stefan Hajnoczi
On Thu, Jun 08, 2023 at 10:40:57AM +0300, Sagi Grimberg wrote: > Hey Stefan, Paolo, > > I just had a report from a user experiencing lower virtio-blk > performance than he expected. This user is running virtio-blk on top of > nvme-tcp device. The guest is running 12 CPU cores. > > The guest

Re: [PATCH] iotests: fix 194: filter out racy postcopy-active event

2023-06-07 Thread Stefan Hajnoczi
tests/qemu-iotests/194 | 5 + > tests/qemu-iotests/194.out | 1 - > 2 files changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 2/2] block/file-posix: fix wps checking in raw_co_prw

2023-06-07 Thread Stefan Hajnoczi
On Sun, Jun 04, 2023 at 02:16:58PM +0800, Sam Li wrote: > If the write operation fails and the wps is NULL, then accessing it will > lead to data corruption. > > Solving the issue by adding a nullptr checking in get_zones_wp() where > the wps is used. > > This issue is found by Peter Maydell

Re: [PATCH 1/2] block/file-posix: fix g_file_get_contents return path

2023-06-07 Thread Stefan Hajnoczi
io-blk-{pci,ccw} backed > by an NVMe partition e.g. /dev/nvme0n1p1 on s390x. > > Signed-off-by: Sam Li > --- > block/file-posix.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) The number of bytes returned was never used, so changing the return value to 0 or -er

Re: [PATCH v2 00/11] block: Re-enable the graph lock

2023-06-07 Thread Stefan Hajnoczi
| 23 > 8 files changed, 250 insertions(+), 41 deletions(-) > create mode 100755 tests/qemu-iotests/tests/iothreads-commit-active > create mode 100644 tests/qemu-iotests/tests/iothreads-commit-active.out > > -- > 2.40.1 > Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 0/1] update maintainers list for vfio-user & multi-process QEMU

2023-06-07 Thread Stefan Hajnoczi
NTAINERS for the time being. If he resumes work in this area he can be added back with a new email address. Reviewed-by: Stefan Hajnoczi

Re: [PATCH] gitlab: Disable io-raw-194 for build-tcg-disabled

2023-06-07 Thread Stefan Hajnoczi
On Wed, 7 Jun 2023 at 10:39, Vladimir Sementsov-Ogievskiy wrote: > > On 06.06.23 19:25, Richard Henderson wrote: > > This test consistently fails on Azure cloud build hosts in > > a way that suggests a timing problem in the test itself: > > > > --- .../194.out > > +++ .../194.out.bad > > @@ -14,7

Re: [PATCH] gitlab: Disable io-raw-194 for build-tcg-disabled

2023-06-07 Thread Stefan Hajnoczi
The line of output that has changed was originally added by the following commit: commit ae00aa2398476824f0eca80461da215e7cdc1c3b Author: Vladimir Sementsov-Ogievskiy Date: Fri May 22 01:06:46 2020 +0300 iotests: 194: test also migration of dirty bitmap Vladimir: Any idea why the

Re: [PATCH] xen-block: fix segv on unrealize

2023-06-06 Thread Stefan Hajnoczi
Sorry! Reviewed-by: Stefan Hajnoczi

[PULL 3/8] block/blkio: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefano Garzarella Acked-by: Kevin Wolf Message-id

[PULL 5/8] block/linux-aio: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
to laio_unplug_fn(). It is not obvious that this condition affects performance in practice, so I am removing it instead of trying to come up with a more complex mechanism to preserve the condition. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Acked-by: Kevin Wolf Reviewed-by: Stefano

[PULL 4/8] block/io_uring: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefano Garzarella Acked-by: Kevin Wolf Message-id

[PULL 1/8] block: add blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
()/blk_io_unplug() no longer require a BlockBackend argument because the plug state is now thread-local. Later patches convert block drivers to blk_io_plug_call() and then we can finally remove .bdrv_co_io_plug() once all block drivers have been converted. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake

[PULL 6/8] block: remove bdrv_co_io_plug() API

2023-06-01 Thread Stefan Hajnoczi
No block driver implements .bdrv_co_io_plug() anymore. Get rid of the function pointers. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefano Garzarella Acked-by: Kevin Wolf Message-id: 20230530180959.1108766-7-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi

[PULL 8/8] qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa

2023-06-01 Thread Stefan Hajnoczi
Hajnoczi Signed-off-by: Stefano Garzarella Message-id: 20230530071941.8954-3-sgarz...@redhat.com Signed-off-by: Stefan Hajnoczi --- qapi/block-core.json | 6 ++ meson.build | 4 2 files changed, 10 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index

[PULL 2/8] block/nvme: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefano Garzarella Acked-by: Kevin Wolf Message-id

[PULL 0/8] Block patches

2023-06-01 Thread Stefan Hajnoczi
() series Stefan Hajnoczi (6): block: add blk_io_plug_call() API block/nvme: convert to blk_io_plug_call() API block/blkio: convert to blk_io_plug_call() API block/io_uring: convert to blk_io_plug_call() API block/linux-aio

[PULL 7/8] block/blkio: use qemu_open() to support fd passing for virtio-blk

2023-06-01 Thread Stefan Hajnoczi
() to open the `path`, so we can handle fd passing from the management layer through the "/dev/fdset/N" special path. Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Message-id: 20230530071941.8954-2-sgarz...@redhat.com Signed-off-by: Stefan Hajnoczi --- block/bl

[PULL v2 06/11] qapi: make the vcpu parameters deprecated for 8.1

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée I don't think I can remove the parameters directly but certainly mark them as deprecated. Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-7-alex.ben...@linaro.org

Re: [PATCH v5 0/2] block/blkio: support fd passing for virtio-blk-vhost-vdpa driver

2023-06-01 Thread Stefan Hajnoczi
On Tue, May 30, 2023 at 09:19:39AM +0200, Stefano Garzarella wrote: > v5: > - moved `features` to the object level to simplify libvirt code [Jonathon] > - wrapped a line too long in the documentation [Markus] > - added Stefan R-b tags > > v4: >

[PULL v2 05/11] docs/deprecated: move QMP events bellow QMP command section

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée Also rename the section to make the fact this is part of the management protocol even clearer. Suggested-by: Markus Armbruster Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-6-alex.ben...@linaro.org Signed-off-by: Stefan Hajnoczi --- docs/about/deprecated.rst

[PULL v2 11/11] accel/tcg: include cs_base in our hash calculations

2023-06-01 Thread Stefan Hajnoczi
ned-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-id: 20230526165401.574474-12-alex.ben...@linaro.org Message-Id: <20230524133952.3971948-11-alex.ben...@linaro.org> Signed-off-by: Stefan Hajnoczi --- accel/tcg/tb-hash.h | 4 ++-- include/qemu/xxhash.h | 23 +-- a

[PULL v2 04/11] scripts/qapi: document the tool that generated the file

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée This makes it a little easier for developers to find where things where being generated. Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Alex Bennée Message-id

[PULL v2 03/11] trace: remove vcpu_id from the TraceEvent structure

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée This does involve temporarily stubbing out some helper functions before we excise the rest of the code. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-4-alex.ben

[PULL v2 08/11] trace: remove control-vcpu.h

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée Now we no longer have vcpu controlled trace events we can excise the code that allows us to query its status. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-9

<    7   8   9   10   11   12   13   14   15   16   >