Re: [Xen-devel] [RFC v2 1/4] elf: Add optional function ptr to load_elf() to parse ELF notes

2019-01-02 Thread Stefan Hajnoczi
On Fri, Dec 21, 2018 at 08:03:49PM +, Liam Merwick wrote: > diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h > index 74679ff8da3a..37d20a3800c1 100644 > --- a/include/hw/elf_ops.h > +++ b/include/hw/elf_ops.h > @@ -266,6 +266,7 @@ fail: > } > > static int glue(load_elf, SZ)(const ch

Re: [Xen-devel] [RFC v2 2/4] elf-ops.h: Add get_elf_note_type()

2019-01-02 Thread Stefan Hajnoczi
On Fri, Dec 21, 2018 at 08:03:50PM +, Liam Merwick wrote: > +while (note_type != elf_note_type) { > +nhdr_namesz = nhdr->n_namesz; > +nhdr_descsz = nhdr->n_descsz; > + > +elf_note_entry_offset = nhdr_size + > +QEMU_ALIGN_UP(nhdr_namesz, phdr_align) + > +

Re: [Xen-devel] [RFC v2 4/4] pvh: Boot uncompressed kernel using direct boot ABI

2019-01-02 Thread Stefan Hajnoczi
On Fri, Dec 21, 2018 at 08:03:52PM +, Liam Merwick wrote: > @@ -1336,7 +1470,7 @@ void pc_memory_init(PCMachineState *pcms, > int linux_boot, i; > MemoryRegion *ram, *option_rom_mr; > MemoryRegion *ram_below_4g, *ram_above_4g; > -FWCfgState *fw_cfg; > +FWCfgState *fw_cfg

Re: [Xen-devel] [Qemu-devel] [PATCH v3 0/4] QEMU changes to do PVH boot

2019-01-21 Thread Stefan Hajnoczi
On Mon, Jan 21, 2019 at 08:19:03AM +, Liam Merwick wrote: > On 21/01/2019 02:31, no-re...@patchew.org wrote: > > Patchew URL: > > https://patchew.org/QEMU/1547554687-12687-1-git-send-email-liam.merw...@oracle.com/ > ...> > >CC dma-helpers.o > >CC vl.o > > /tmp/qemu-test/src/b

[Xen-devel] [PULL 0/7] Tracing patches

2019-03-25 Thread Stefan Hajnoczi
ace points trace-events: Fix attribution of trace points to source Stefan Hajnoczi (2): trace: handle tracefs path truncation trace: avoid SystemTap dtrace(1) warnings on empty files trace/ftrace.c | 12 +- accel/kvm/trace-events | 2 +- accel/tcg/trace-events

[Xen-devel] [PULL 6/7] trace-events: Delete unused trace points

2019-03-25 Thread Stefan Hajnoczi
Message-Id: <20190314180929.27722-5-arm...@redhat.com> Signed-off-by: Stefan Hajnoczi --- block/trace-events | 1 - hw/arm/trace-events| 7 --- hw/block/trace-events | 2 -- hw/display/trace-events| 1 - hw/i386/trace-events | 2 -- hw/ide/trace-events

[Xen-devel] [PULL 2/7] trace: avoid SystemTap dtrace(1) warnings on empty files

2019-03-25 Thread Stefan Hajnoczi
ovider qemu {}" when there are no enabled trace events. Fixes: 23c3d569f44284066714ff7c46bc4f19e630583f ("target/hppa: add TLB trace events") Reported-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Reviewed-by: Liam Merwick Message-id: 201903

[Xen-devel] [PULL 1/7] trace: handle tracefs path truncation

2019-03-25 Thread Stefan Hajnoczi
/debug/tracing/, but the compiler is smart enough to foresee the possibility and warn about the unchecked snprintf(3) return value. This patch fixes the compiler warning. Reported-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Reviewed-by: Liam Merwick Message

[Xen-devel] [PULL 3/7] trace-events: Consistently point to docs/devel/tracing.txt

2019-03-25 Thread Stefan Hajnoczi
Message-id: 20190314180929.27722-2-arm...@redhat.com Message-Id: <20190314180929.27722-2-arm...@redhat.com> Signed-off-by: Stefan Hajnoczi --- accel/kvm/trace-events | 2 +- accel/tcg/trace-events | 2 +- hw/i386/xen/trace-events | 2 ++ nbd/trace-events | 2 ++ qapi/trace-e

[Xen-devel] [PULL 5/7] scripts/cleanup-trace-events: Update for current practice

2019-03-25 Thread Stefan Hajnoczi
ssage-id: 20190314180929.27722-4-arm...@redhat.com Message-Id: <20190314180929.27722-4-arm...@redhat.com> Signed-off-by: Stefan Hajnoczi --- scripts/cleanup-trace-events.pl | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/cleanup-trace-events.p

[Xen-devel] [PULL 7/7] trace-events: Fix attribution of trace points to source

2019-03-25 Thread Stefan Hajnoczi
, of course. Manually shorten its change to linux-user/trace-events to */signal.c. Signed-off-by: Markus Armbruster Message-id: 20190314180929.27722-6-arm...@redhat.com Message-Id: <20190314180929.27722-6-arm...@redhat.com> Signed-off-by: Stefan Hajnoczi --- authz/trace-events | 2

Re: [Xen-devel] [Qemu-block] [PATCH 2/3] xen-bus: allow AioContext to be specified for each event channel

2019-04-15 Thread Stefan Hajnoczi
> xen-devel@lists.xenproject.org; Stefano Stabellini > > ; Stefan Hajnoczi ; Kevin Wolf > > ; Max > > Reitz > > Subject: Re: [PATCH 2/3] xen-bus: allow AioContext to be specified for each > > event channel > > > > On Mon, Apr 08, 2019 at 04:16:16

Re: [Xen-devel] [RFC 1/3] pvh: Add x86/HVM direct boot ABI header file

2018-12-11 Thread Stefan Hajnoczi
On Wed, Dec 05, 2018 at 10:37:24PM +, Liam Merwick wrote: > From: Liam Merwick > > The x86/HVM direct boot ABI permits Qemu to be able to boot directly > into the uncompressed Linux kernel binary without the need to run firmware. > > https://xenbits.xen.org/docs/unstable/misc/pvh.html

Re: [Xen-devel] [RFC 2/3] pc: Read PVH entry point from ELF note in kernel binary

2018-12-11 Thread Stefan Hajnoczi
On Wed, Dec 05, 2018 at 10:37:25PM +, Liam Merwick wrote: > From: Liam Merwick > > Add support to read the PVH Entry address from an ELF note in the > uncompressed kernel binary (as defined by the x86/HVM direct boot ABI). > This 32-bit entry point will be used by QEMU to load the kernel in t

Re: [Xen-devel] [PATCH 2/2] avoid TABs in files that only contain a few

2018-12-14 Thread Stefan Hajnoczi
cg/cris/check_glibc_kernelversion.c | 8 +- > tests/tcg/cris/check_mmap3.c | 2 +- > tests/tcg/cris/check_openpf1.c | 2 +- > tests/tcg/cris/check_settls1.c | 2 +- > tests/tcg/i386/hello-i386.c

Re: [Xen-devel] [Qemu-block] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Stefan Hajnoczi
On Tue, Mar 20, 2018 at 03:54:36AM +0200, Michael S. Tsirkin wrote: > QEMU coding style at the moment asks for all non-system > include files to be used with #include "foo.h". > However this rule actually does not make sense and > creates issues for when the included file is generated. > > In C, i

[Xen-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-14 Thread Stefan Hajnoczi
Determining the size of a field is useful when you don't have a struct variable handy. Open-coding this is ugly. This patch adds the sizeof_field() macro, which is similar to typeof_field(). Existing instances are updated to use the macro. Signed-off-by: Stefan Hajnoczi --- include/hw/x

Re: [Xen-devel] [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-15 Thread Stefan Hajnoczi
On Thu, Jun 14, 2018 at 9:33 PM, Philippe Mathieu-Daudé wrote: > On 06/14/2018 04:17 PM, John Snow wrote: >> On 06/14/2018 12:44 PM, Stefan Hajnoczi wrote: >>> Determining the size of a field is useful when you don't have a struct >>> variable handy. Open-coding

Re: [Xen-devel] [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-18 Thread Stefan Hajnoczi
On Thu, Jun 14, 2018 at 05:44:31PM +0100, Stefan Hajnoczi wrote: > Determining the size of a field is useful when you don't have a struct > variable handy. Open-coding this is ugly. > > This patch adds the sizeof_field() macro, which is similar to > typeof_field(). Ex

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread Stefan Hajnoczi
On Mon, Sep 21, 2020 at 01:56:08PM -0700, no-re...@patchew.org wrote: > ERROR: Macros with multiple statements should be enclosed in a do - while loop > #2968: FILE: include/qemu/atomic.h:152: > +#define qemu_atomic_rcu_read__nocheck(ptr, valptr) \ > __atomic_load(ptr, valptr, __ATOMIC_RE

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread Stefan Hajnoczi
On Mon, Sep 21, 2020 at 04:29:10PM -0500, Eric Blake wrote: > On 9/21/20 11:23 AM, Stefan Hajnoczi wrote: Thanks for the review! Your feedback prompted me to do this more systematically. I fixed the command-lines and published a diff of just the manual changes I made on top of the mechani

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-23 Thread Stefan Hajnoczi
On Tue, Sep 22, 2020 at 09:18:49AM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 22, 2020 at 08:56:06AM +0200, Paolo Bonzini wrote: > > On 22/09/20 08:45, David Hildenbrand wrote: > > >> It's certainly a good idea but it's quite verbose. > > >> > > >> What about using atomic__* as the prefix? It

Re: [PATCH v2] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-23 Thread Stefan Hajnoczi
On Tue, Sep 22, 2020 at 01:35:37PM +0200, Paolo Bonzini wrote: > On 22/09/20 10:58, Stefan Hajnoczi wrote: > I think the reviews crossed, are you going to respin using a qatomic_ > prefix? Yes, let's do qatomic_. I'll send a v3. Stefan signature.asc Description: PGP signature

Re: [PATCH v3] qemu/atomic.h: rename atomic_ to qatomic_

2020-09-23 Thread Stefan Hajnoczi
On Wed, Sep 23, 2020 at 11:56:46AM +0100, Stefan Hajnoczi wrote: > clang's C11 atomic_fetch_*() functions only take a C11 atomic type > pointer argument. QEMU uses direct types (int, etc) and this causes a > compiler error when a QEMU code calls these functions in a source fi

Re: [PATCH 23/24] virtio-blk: remove a spurious call to revalidate_disk_size

2020-11-09 Thread Stefan Hajnoczi
drivers/block/virtio_blk.c | 1 - > 1 file changed, 1 deletion(-) Modulo Paolo's comment: Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v4 3/3] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-01-25 Thread Stefan Hajnoczi
On Thu, Jan 19, 2023 at 02:03:08AM -0500, Alexander Bulekov wrote: > This protects devices from bh->mmio reentrancy issues. > > Signed-off-by: Alexander Bulekov > --- > hw/9pfs/xen-9p-backend.c| 4 +++- > hw/block/dataplane/virtio-blk.c | 3 ++- > hw/block/dataplane/xen-block.c | 5 +++-

Re: [PATCH v4 3/3] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-01-25 Thread Stefan Hajnoczi
| 6 -- > hw/usb/xen-usb.c| 3 ++- > hw/virtio/virtio-balloon.c | 5 +++-- > hw/virtio/virtio-crypto.c | 3 ++- > 25 files changed, 66 insertions(+), 35 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-03-01 Thread Stefan Hajnoczi
Resend - for some reason my email didn't make it out. - Forwarded message from Stefan Hajnoczi - Date: Tue, 21 Feb 2023 10:17:01 -0500 From: Stefan Hajnoczi To: Viresh Kumar Cc: qemu-de...@nongnu.org, virtio-...@lists.oasis-open.org, "Michael S. Tsirkin" , Vincent

Re: [virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-03-01 Thread Stefan Hajnoczi
On Wed, Mar 01, 2023 at 04:31:41PM +, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > [[PGP Signed Part:Undecided]] > > Resend - for some reason my email didn't make it out. > > > > From: Stefan Hajnoczi > > Subject: Re: [virtio-dev] [R

Re: [virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-03-02 Thread Stefan Hajnoczi
On Thu, Mar 02, 2023 at 01:49:07PM +0530, Viresh Kumar wrote: > On 01-03-23, 12:29, Stefan Hajnoczi wrote: > > What is the advantage over defining separate messages? Separate messages > > are cleaner and more typesafe. > > I thought we wanted to keep single message for one

Re: [PATCH V2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-06 Thread Stefan Hajnoczi
On Mon, Mar 06, 2023 at 04:40:24PM +0530, Viresh Kumar wrote: > The current model of memory mapping at the back-end works fine where a > standard call to mmap() (for the respective file descriptor) is enough > before the front-end can start accessing the guest memory. > > There are other complex c

Re: [PATCH V2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-07 Thread Stefan Hajnoczi
On Tue, Mar 07, 2023 at 11:13:36AM +0530, Viresh Kumar wrote: > On 06-03-23, 10:34, Stefan Hajnoczi wrote: > > On Mon, Mar 06, 2023 at 04:40:24PM +0530, Viresh Kumar wrote: > > > +Xen mmap description > > > + > > > + > > &

Re: [PATCH V3 1/2] docs: vhost-user: Define memory region separately

2023-03-15 Thread Stefan Hajnoczi
n optimization, the protocol remains the same. > > Signed-off-by: Viresh Kumar > --- > docs/interop/vhost-user.rst | 39 +-------- > 1 file changed, 18 insertions(+), 21 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH V3 2/2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-15 Thread Stefan Hajnoczi
ional memory mapping requirements. > When this feature is negotiated, the front-end will send the additional > information within the memory regions themselves. > > Signed-off-by: Viresh Kumar > --- > docs/interop/vhost-user.rst | 21 +++++ > 1 file changed, 21

Re: [PATCH V3 0/2] qemu: vhost-user: Support Xen memory mapping quirks

2023-03-15 Thread Stefan Hajnoczi
On Thu, Mar 09, 2023 at 02:20:59PM +0530, Viresh Kumar wrote: > Hello, > > This patchset tries to update the vhost-user protocol to make it support > special > memory mapping required in case of Xen hypervisor. > > The first patch is mostly cleanup and second one introduces a new xen specific >

[PATCH 05/13] block/export: wait for vhost-user-blk requests when draining

2023-04-03 Thread Stefan Hajnoczi
when there are requests in flight. The in-flight counter needs to be atomic. Signed-off-by: Stefan Hajnoczi --- include/qemu/vhost-user-server.h | 4 +++- block/export/vhost-user-blk-server.c | 19 +++ util/vhost-user-server.c | 14 ++ 3 files c

[PATCH 06/13] block/export: stop using is_external in vhost-user-blk server

2023-04-03 Thread Stefan Hajnoczi
d the aio_disable_external() API cannot be used since multiple AioContext may be processing I/O, not just one. Switch to BlockDevOps->drained_begin/end() callbacks. Signed-off-by: Stefan Hajnoczi --- block/export/vhost-user-blk-server.c | 43 ++-- util/vhost-user-server.c

[PATCH 03/13] block/export: only acquire AioContext once for vhost_user_server_stop()

2023-04-03 Thread Stefan Hajnoczi
vhost_user_server_stop() uses AIO_WAIT_WHILE(). AIO_WAIT_WHILE() requires that AioContext is only acquired once. Since blk_exp_request_shutdown() already acquires the AioContext it shouldn't be acquired again in vhost_user_server_stop(). Signed-off-by: Stefan Hajnoczi --- util/vhost

[PATCH 02/13] virtio-scsi: stop using aio_disable_external() during unplug

2023-04-03 Thread Stefan Hajnoczi
simple_device_unplug_cb() returns. Thanks to these two conditions we don't need aio_disable_external() anymore. Cc: Zhengui Li Signed-off-by: Stefan Hajnoczi --- hw/scsi/scsi-disk.c | 1 + hw/scsi/virtio-scsi.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/h

[PATCH 01/13] virtio-scsi: avoid race between unplug and transport event

2023-04-03 Thread Stefan Hajnoczi
also needs to be updated to filter out SCSIDevices that are unrealized. These changes ensure that the guest driver does not see the SCSIDevice that's being unplugged if it responds very quickly to the transport reset event. Signed-off-by: Stefan Hajnoczi --- hw/scsi/scsi-bus.c| 3 ++

[PATCH 09/13] hw/xen: do not set is_external=true on evtchn fds

2023-04-03 Thread Stefan Hajnoczi
ock's processing will continue. This is part of ongoing work to remove the aio_disable_external() API. Signed-off-by: Stefan Hajnoczi --- hw/xen/xen-bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c index c59850b1de..c4fd26a

[PATCH 04/13] util/vhost-user-server: rename refcount to in_flight counter

2023-04-03 Thread Stefan Hajnoczi
e are no more requests. Avoid confusing by renaming refcount and ref/unref to in_flight and inc/dec. Signed-off-by: Stefan Hajnoczi --- include/qemu/vhost-user-server.h | 6 +++--- block/export/vhost-user-blk-server.c | 11 +++ util/vhost-user-server.c | 14 +++-

[PATCH 00/13] block: remove aio_disable_external() API

2023-04-03 Thread Stefan Hajnoczi
Based-on: 087bc644b7634436ca9d52fe58ba9234e2bef026 (kevin/block-next) Stefan Hajnoczi (13): virtio-scsi: avoid race between unplug and transport event virtio-scsi: stop using aio_disable_external() during unplug block/export: only acquire AioContext once for vhost_user_server_stop() util/vhost-user-server: rename r

[PATCH 07/13] virtio: do not set is_external=true on host notifiers

2023-04-03 Thread Stefan Hajnoczi
ues have a finite size, so queuing requests does not lead to unbounded memory usage. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 98c4819fcc..dcd7aabb4e 100644 --- a

[PATCH 08/13] hw/xen: do not use aio_set_fd_handler(is_external=true) in xen_xenstore

2023-04-03 Thread Stefan Hajnoczi
There is no need to suspend activity between aio_disable_external() and aio_enable_external(), which is mainly used for the block layer's drain operation. This is part of ongoing work to remove the aio_disable_external() API. Signed-off-by: Stefan Hajnoczi --- hw/i386/kvm/xen_xenstore.

[PATCH 12/13] block/fuse: do not set is_external=true on FUSE fd

2023-04-03 Thread Stefan Hajnoczi
This is part of ongoing work to remove the aio_disable_external() API. Use BlockDevOps .drained_begin/end/poll() instead of aio_set_fd_handler(is_external=true). As a side-effect the FUSE export now follows AioContext changes like the other export types. Signed-off-by: Stefan Hajnoczi

[PATCH 10/13] block/export: rewrite vduse-blk drain code

2023-04-03 Thread Stefan Hajnoczi
resume them in .drained_end(). This eliminates the need for the aio_set_fd_handler(is_external=true) flag, which is being removed from QEMU. This is a long list but splitting it into individual commits would probably lead to git bisect failures - the changes are all related. Signed-off-by:

[PATCH 13/13] aio: remove aio_disable_external() API

2023-04-03 Thread Stefan Hajnoczi
, is_external, io_read, io_poll, io_poll_ready; @@ - aio_set_event_notifier(ctx, notifier, is_external, io_read, io_poll, io_poll_ready) + aio_set_event_notifier(ctx, notifier, io_read, io_poll, io_poll_ready) Signed-off-by: Stefan Hajnoczi --- include/block/aio.h | 55

[PATCH 11/13] block/fuse: take AioContext lock around blk_exp_ref/unref()

2023-04-03 Thread Stefan Hajnoczi
These functions must be called with the AioContext acquired: /* Callers must hold exp->ctx lock */ void blk_exp_ref(BlockExport *exp) ... /* Callers must hold exp->ctx lock */ void blk_exp_unref(BlockExport *exp) Signed-off-by: Stefan Hajnoczi --- block/export/fuse.c | 4

Re: [PATCH 01/13] virtio-scsi: avoid race between unplug and transport event

2023-04-04 Thread Stefan Hajnoczi
On Mon, Apr 03, 2023 at 10:47:11PM +0200, Philippe Mathieu-Daudé wrote: > On 3/4/23 20:29, Stefan Hajnoczi wrote: > > Only report a transport reset event to the guest after the SCSIDevice > > has been unrealized by qdev_simple_device_unplug_cb(). > > > > qdev_simple_

Re: [PATCH 11/13] block/fuse: take AioContext lock around blk_exp_ref/unref()

2023-04-04 Thread Stefan Hajnoczi
On Tue, Apr 04, 2023 at 03:46:34PM +0200, Paolo Bonzini wrote: > On 4/3/23 20:30, Stefan Hajnoczi wrote: > > These functions must be called with the AioContext acquired: > > > >/* Callers must hold exp->ctx lock */ > >void blk_exp_ref(BlockExport *exp) >

Re: [PATCH 00/13] block: remove aio_disable_external() API

2023-04-04 Thread Stefan Hajnoczi
On Tue, Apr 04, 2023 at 03:43:20PM +0200, Paolo Bonzini wrote: > On 4/3/23 20:29, Stefan Hajnoczi wrote: > > The aio_disable_external() API temporarily suspends file descriptor > > monitoring > > in the event loop. The block layer uses this to prevent new I/O requests &g

Re: Enabling hypervisor agnosticism for VirtIO backends

2021-08-17 Thread Stefan Hajnoczi
On Wed, Aug 04, 2021 at 12:20:01PM -0700, Stefano Stabellini wrote: > > Could we consider the kernel internally converting IOREQ messages from > > the Xen hypervisor to eventfd events? Would this scale with other kernel > > hypercall interfaces? > > > > So any thoughts on what directions are worth

Re: Enabling hypervisor agnosticism for VirtIO backends

2021-08-23 Thread Stefan Hajnoczi
On Mon, Aug 23, 2021 at 03:25:00PM +0900, AKASHI Takahiro wrote: > Hi Stefan, > > On Tue, Aug 17, 2021 at 11:41:01AM +0100, Stefan Hajnoczi wrote: > > On Wed, Aug 04, 2021 at 12:20:01PM -0700, Stefano Stabellini wrote: > > > > Could we consider the kernel internally con

Re: Enabling hypervisor agnosticism for VirtIO backends

2021-08-25 Thread Stefan Hajnoczi
On Wed, Aug 25, 2021 at 07:29:45PM +0900, AKASHI Takahiro wrote: > On Mon, Aug 23, 2021 at 10:58:46AM +0100, Stefan Hajnoczi wrote: > > On Mon, Aug 23, 2021 at 03:25:00PM +0900, AKASHI Takahiro wrote: > > > Hi Stefan, > > > > > > On Tue, Aug 17, 2021 at 11:

Re: [PATCH 08/26] virtio_blk: remove virtblk_update_cache_mode

2024-06-11 Thread Stefan Hajnoczi
- > drivers/block/virtio_blk.c | 13 +++-- > 1 file changed, 3 insertions(+), 10 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v3 0/6] block: add blk_io_plug_call() API

2023-05-31 Thread Stefan Hajnoczi
Hi Kevin, Do you want to review the thread-local blk_io_plug() patch series or should I merge it? Thanks, Stefan signature.asc Description: PGP signature

Re: [PATCH v3 0/6] block: add blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
On Tue, May 30, 2023 at 02:09:53PM -0400, Stefan Hajnoczi wrote: > v3 > - Patch 5: Mention why dev_max_batch condition was dropped [Stefano] > v2 > - Patch 1: "is not be freed" -> "is not freed" [Eric] > - Patch 2: Remove unused nvme_process_completion_

[PULL 0/8] Block patches

2023-06-01 Thread Stefan Hajnoczi
thread-local blk_io_plug() 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_cal

[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 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 7/8] block/blkio: use qemu_open() to support fd passing for virtio-blk

2023-06-01 Thread Stefan Hajnoczi
qemu_open() 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 ---

[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 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 5/8] block/linux-aio: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
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 8/8] qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa

2023-06-01 Thread Stefan Hajnoczi
kus Armbruster Reviewed-by: Stefan 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-cor

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

2023-06-01 Thread Stefan Hajnoczi
lk_io_plug()/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:

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

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

Re: [RFC PATCH v3 08/78] hw/block: add fallthrough pseudo-keyword

2023-10-16 Thread Stefan Hajnoczi
aplane/xen-block.c | 4 ++-- > hw/block/m25p80.c | 2 +- > hw/block/onenand.c | 2 +- > hw/block/pflash_cfi01.c| 1 + > hw/block/pflash_cfi02.c| 6 -- > 5 files changed, 9 insertions(+), 6 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [PULL 0/7] xenfv-stable queue

2023-11-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/15] xenfv.for-upstream queue

2023-11-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

[PATCH] block: get rid of blk->guest_block_size

2022-05-18 Thread Stefan Hajnoczi
9064d50639 ("block: Don't use guest sector size for qemu_blockalign()"). This value has not been used since 2013. Get rid of it. Cc: Xie Yongji Signed-off-by: Stefan Hajnoczi --- include/sysemu/block-backend-io.h| 1 - block/block-backend.c| 10 -- bl

[PATCH v2 0/6] aio-posix: split poll check from ready handler

2021-12-02 Thread Stefan Hajnoczi
e the dataplane handler function now has the same function signature as the non-dataplane handler function. Stefano Garzarella prompted me to make this refactoring. Stefan Hajnoczi (6): aio-posix: split poll check from ready handler virtio: get rid of VirtIOHandleAIOOutput virtio-blk: drop u

[PATCH v2 1/6] aio-posix: split poll check from ready handler

2021-12-02 Thread Stefan Hajnoczi
32 Notice that ppoll(2) and eventfd read(2) syscalls are eliminated because the IOThread stays in polling mode instead of falling back to file descriptor monitoring. As usual, polling is not implemented on Windows so this patch ignores the new io_poll_read() callback in aio-win32.c. Signed-off-

[PATCH v2 2/6] virtio: get rid of VirtIOHandleAIOOutput

2021-12-02 Thread Stefan Hajnoczi
will be made for virtio-blk and virtio-scsi in the next patch. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 3 +-- hw/block/dataplane/virtio-blk.c | 4 ++-- hw/scsi/virtio-scsi-dataplane.c | 18 ++ hw/virtio/virtio.c | 12 4

[PATCH v2 3/6] virtio-blk: drop unused virtio_blk_handle_vq() return value

2021-12-02 Thread Stefan Hajnoczi
ioeventfd more specific. This way it won't trigger when dataplane has already been started. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-blk.h | 2 +- hw/block/virtio-blk.c | 14 +++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/hw/v

[PATCH v2 4/6] virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane

2021-12-02 Thread Stefan Hajnoczi
Prepare virtio_scsi_handle_cmd() to be used by both dataplane and non-dataplane by making the condition for starting ioeventfd more specific. This way it won't trigger when dataplane has already been started. Signed-off-by: Stefan Hajnoczi --- hw/scsi/virtio-scsi.c | 2 +- 1 file chang

[PATCH v2 5/6] virtio: use ->handle_output() instead of ->handle_aio_output()

2021-12-02 Thread Stefan Hajnoczi
The difference between ->handle_output() and ->handle_aio_output() was that ->handle_aio_output() returned a bool return value indicating progress. This was needed by the old polling API but now that the bool return value is gone, the two functions can be unified. Signed-off-by: Stefan

[PATCH v2 6/6] virtio: unify dataplane and non-dataplane ->handle_output()

2021-12-02 Thread Stefan Hajnoczi
Now that virtio-blk and virtio-scsi are ready, get rid of the handle_aio_output() callback. It's no longer needed. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 4 +-- hw/block/dataplane/virtio-blk.c | 16 ++ hw/scsi/virtio-scsi-dataplane.c

Re: [PATCH v2 0/6] aio-posix: split poll check from ready handler

2021-12-02 Thread Stefan Hajnoczi
On Thu, Dec 02, 2021 at 03:49:08PM +, Richard W.M. Jones wrote: > > Not sure if this is related, but builds are failing with: > > FAILED: libblockdev.fa.p/block_export_fuse.c.o > cc -m64 -mcx16 -Ilibblockdev.fa.p -I. -I.. -Iqapi -Itrace -Iui -Iui/shader > -I/usr/include/fuse3 -I/usr/include

[PATCH v3 0/6] aio-posix: split poll check from ready handler

2021-12-07 Thread Stefan Hajnoczi
oring. Stefan Hajnoczi (6): aio-posix: split poll check from ready handler virtio: get rid of VirtIOHandleAIOOutput virtio-blk: drop unused virtio_blk_handle_vq() return value virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane virtio: use ->handle_output() instead of ->handle

[PATCH v3 3/6] virtio-blk: drop unused virtio_blk_handle_vq() return value

2021-12-07 Thread Stefan Hajnoczi
ioeventfd more specific. This way it won't trigger when dataplane has already been started. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-blk.h | 2 +- hw/block/virtio-blk.c | 14 +++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/hw/v

[PATCH v3 2/6] virtio: get rid of VirtIOHandleAIOOutput

2021-12-07 Thread Stefan Hajnoczi
will be made for virtio-blk and virtio-scsi in the next patch. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 3 +-- hw/block/dataplane/virtio-blk.c | 4 ++-- hw/scsi/virtio-scsi-dataplane.c | 18 ++ hw/virtio/virtio.c | 12 4

[PATCH v3 4/6] virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane

2021-12-07 Thread Stefan Hajnoczi
Prepare virtio_scsi_handle_cmd() to be used by both dataplane and non-dataplane by making the condition for starting ioeventfd more specific. This way it won't trigger when dataplane has already been started. Signed-off-by: Stefan Hajnoczi --- hw/scsi/virtio-scsi.c | 2 +- 1 file chang

[PATCH v3 1/6] aio-posix: split poll check from ready handler

2021-12-07 Thread Stefan Hajnoczi
32 Notice that ppoll(2) and eventfd read(2) syscalls are eliminated because the IOThread stays in polling mode instead of falling back to file descriptor monitoring. As usual, polling is not implemented on Windows so this patch ignores the new io_poll_read() callback in aio-win32.c. Signed-off-

[PATCH v3 6/6] virtio: unify dataplane and non-dataplane ->handle_output()

2021-12-07 Thread Stefan Hajnoczi
Now that virtio-blk and virtio-scsi are ready, get rid of the handle_aio_output() callback. It's no longer needed. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 4 +-- hw/block/dataplane/virtio-blk.c | 16 ++ hw/scsi/virtio-scsi-dataplane.c

[PATCH v3 5/6] virtio: use ->handle_output() instead of ->handle_aio_output()

2021-12-07 Thread Stefan Hajnoczi
The difference between ->handle_output() and ->handle_aio_output() was that ->handle_aio_output() returned a bool return value indicating progress. This was needed by the old polling API but now that the bool return value is gone, the two functions can be unified. Signed-off-by: Stefan

Re: [PATCH v3 0/6] aio-posix: split poll check from ready handler

2021-12-13 Thread Stefan Hajnoczi
On Tue, Dec 07, 2021 at 01:23:30PM +, Stefan Hajnoczi wrote: > v3: > - Fixed FUSE export aio_set_fd_handler() call that I missed and double-checked > for any other missing call sites using Coccinelle [Rich] > v2: > - Cleaned up unused return values in nvme and virt

[PULL 0/6] Block patches

2022-01-12 Thread Stefan Hajnoczi
Pull request ---- Stefan Hajnoczi (6): aio-posix: split poll check from ready handler virtio: get rid of VirtIOHandleAIOOutput virtio-blk: drop unused virtio_blk_handle_vq() return value virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane virtio: use -&

[PULL 1/6] aio-posix: split poll check from ready handler

2022-01-12 Thread Stefan Hajnoczi
by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Message-id: 20211207132336.36627-2-stefa...@redhat.com [Fixed up aio_set_event_notifier() calls in tests/unit/test-fdmon-epoll.c added after this series was queued. --Stefan] Signed-off-by: Stefan Hajnoczi --- include/block/aio.h |

[PULL 3/6] virtio-blk: drop unused virtio_blk_handle_vq() return value

2022-01-12 Thread Stefan Hajnoczi
ioeventfd more specific. This way it won't trigger when dataplane has already been started. Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Message-id: 20211207132336.36627-4-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-blk.h | 2 +- hw/block/v

[PULL 4/6] virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane

2022-01-12 Thread Stefan Hajnoczi
Prepare virtio_scsi_handle_cmd() to be used by both dataplane and non-dataplane by making the condition for starting ioeventfd more specific. This way it won't trigger when dataplane has already been started. Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Messa

[PULL 5/6] virtio: use ->handle_output() instead of ->handle_aio_output()

2022-01-12 Thread Stefan Hajnoczi
The difference between ->handle_output() and ->handle_aio_output() was that ->handle_aio_output() returned a bool return value indicating progress. This was needed by the old polling API but now that the bool return value is gone, the two functions can be unified. Signed-off-by: Stefan

[PULL 6/6] virtio: unify dataplane and non-dataplane ->handle_output()

2022-01-12 Thread Stefan Hajnoczi
Now that virtio-blk and virtio-scsi are ready, get rid of the handle_aio_output() callback. It's no longer needed. Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Message-id: 20211207132336.36627-7-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- include/hw/v

[PULL 2/6] virtio: get rid of VirtIOHandleAIOOutput

2022-01-12 Thread Stefan Hajnoczi
will be made for virtio-blk and virtio-scsi in the next patch. Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Message-id: 20211207132336.36627-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 3 +-- hw/block/dataplane/virtio-blk.c

[PATCH 02/12] tests: remove aio_context_acquire() tests

2023-11-29 Thread Stefan Hajnoczi
The aio_context_acquire() API is being removed. Drop the test case that calls the API. Signed-off-by: Stefan Hajnoczi --- tests/unit/test-aio.c | 67 +-- 1 file changed, 1 insertion(+), 66 deletions(-) diff --git a/tests/unit/test-aio.c b/tests/unit/test

[PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock

2023-11-29 Thread Stefan Hajnoczi
aio_wait_bh_oneshot(). This avoids more locking to protect the virtqueue and SCSI layer state. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-scsi.h | 3 +- hw/scsi/virtio-scsi.c | 62 ++--- 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a

[PATCH 03/12] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-11-29 Thread Stefan Hajnoczi
incrementally. I have performed "make check" and qemu-iotests stress tests across x86-64, ppc64le, and aarch64 to confirm that there are no failures as a result of eliminating the lock. Signed-off-by: Stefan Hajnoczi --- util/async.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 00/12] aio: remove AioContext lock

2023-11-29 Thread Stefan Hajnoczi
es 10-12 remove comments. Based-on: 20231123194931.171598-1-stefa...@redhat.com ("[PATCH 0/4] scsi: eliminate AioContext lock") Since SCSI needs to stop relying on the AioContext lock before we can remove the lock. Stefan Hajnoczi (12): virtio-scsi: replace AioContext lock with tm

[PATCH 08/12] aio: remove aio_context_acquire()/aio_context_release() API

2023-11-29 Thread Stefan Hajnoczi
everyone who helped with this effort, including Eric Blake, code reviewer extraordinaire, and others who I've forgotten to mention. Signed-off-by: Stefan Hajnoczi --- include/block/aio.h | 17 - util/async.c| 10 -- 2 files changed, 27 deletions(-) diff --git a

  1   2   3   4   >