[PATCH] target/i386/hax: Add XCR0 support

2022-11-25 Thread Wang, Wenchao
Hi, maintainers, As HAXM v7.8.0 is released and it added XCR0 support, could you help to merge this patch to add corresponding support into HAX user space of QEMU? The patch has been included in the attachment. Thanks. Best Regards, Wenchao >From b1789f2523d06798b8883664bfa9a9df797bfccf Mon

Re: guest Linux Kernel hangs and reports CPU lockup/stuck gitlab bug

2022-11-25 Thread Gerd Hoffmann
> The last thing the X11 server sends is: > > 113.10: Client 1 --> 24 bytes > REQUEST: ConvertSelection >requestor: WIN 03c00b9b <--- qemu window >selection: > target: ATM 0201 >

[PATCH v6 08/14] block: bdrv_create_file is a coroutine_fn

2022-11-25 Thread Emanuele Giuseppe Esposito
It is always called in coroutine_fn callbacks, therefore it can directly call bdrv_co_create(). Rename it to bdrv_co_create_file too. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf --- block.c| 5 +++-- block/crypto.c | 2 +-

[PATCH v6 04/14] block-backend: replace bdrv_*_above with blk_*_above

2022-11-25 Thread Emanuele Giuseppe Esposito
Avoid mixing bdrv_* functions with blk_*, so create blk_* counterparts for bdrv_block_status_above and bdrv_is_allocated_above. Note that since blk_co_block_status_above only calls the g_c_w function bdrv_common_block_status_above and is marked as coroutine_fn, call directly

[PATCH v6 11/14] block-coroutine-wrapper.py: default to main loop aiocontext if function does not have a BlockDriverState parameter

2022-11-25 Thread Emanuele Giuseppe Esposito
Right now, we take the first parameter of the function to get the BlockDriverState to pass to bdrv_poll_co(), that internally calls functions that figure in which aiocontext the coroutine should run. However, it is useless to pass a bs just to get its own AioContext, so instead pass it directly,

Re: [PATCH] target/i386/hax: Add XCR0 support

2022-11-25 Thread Philippe Mathieu-Daudé
Hi, On 25/11/22 13:18, Wang, Wenchao wrote: Hi, maintainers, As HAXM v7.8.0 is released and it added XCR0 support, could you help to merge this patch to add corresponding support into HAX user space of QEMU? The patch has been included in the attachment. Thanks. See

[PATCH v6 07/14] block: distinguish between bdrv_create running in coroutine and not

2022-11-25 Thread Emanuele Giuseppe Esposito
Call two different functions depending on whether bdrv_create is in coroutine or not, following the same pattern as generated_co_wrapper functions. This allows to also call the coroutine function directly, without using CreateCo or relying in bdrv_create(). Signed-off-by: Emanuele Giuseppe

Re: [PATCH] docs/devel/reset.rst: Correct function names

2022-11-25 Thread Peter Maydell
On Fri, 25 Nov 2022 at 14:06, Akihiko Odaki wrote: > > resettable_class_set_parent_phases() was mistakenly called > resettable_class_set_parent_reset_phases() in some places. > > Signed-off-by: Akihiko Odaki > --- > docs/devel/reset.rst | 17 - > 1 file changed, 8 insertions(+),

[PATCH v2] e1000e: Configure ResettableClass

2022-11-25 Thread Akihiko Odaki
This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell --- hw/net/e1000e.c | 10 ++ hw/net/trace-events | 2

Re: [PATCH v2 12/15] block: Remove ignore_bds_parents parameter from drain_begin/end.

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/18/22 20:41, Kevin Wolf wrote: ignore_bds_parents is now ignored during drain_begin and drain_end, so we can just remove it there. It is still a valid optimisation for drain_all in bdrv_drained_poll(), so leave it around there. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir

Re: [PATCH for 7.2-rc3 v1 0/2] virtio fixes

2022-11-25 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Thu, Nov 24, 2022 at 10:24:14PM +, Alex Bennée wrote: >> >> "Michael S. Tsirkin" writes: >> >> > On Thu, Nov 24, 2022 at 09:21:15AM +, Alex Bennée wrote: >> >> >> >> "Michael S. Tsirkin" writes: >> >> >> >> > On Wed, Nov 23, 2022 at 04:03:49PM

Re: [PULL 0/4] Fixes 20221124 patches

2022-11-25 Thread Peter Maydell
On Fri, 25 Nov 2022 at 06:34, Gerd Hoffmann wrote: > > On Thu, Nov 24, 2022 at 01:03:21PM -0500, Stefan Hajnoczi wrote: > > On Thu, 24 Nov 2022 at 02:27, Gerd Hoffmann wrote: > > > usb+ui: fixes for 7.2 > > > > Hi Gerd, > > I already applied your previous pull request so these patches are in > >

Re: [PATCH 2/4] .gitlab-ci.d/windows.yml: Keep 64-bit and 32-bit build scripts consistent

2022-11-25 Thread Thomas Huth
On 25/11/2022 11.49, Bin Meng wrote: From: Bin Meng At present the build scripts of 32-bit and 64-bit are inconsistent. Let's keep them consistent for easier maintenance. While we are here, add some comments to explain that for the 64-bit job, "--without-default-devices" is a must have, at

[PATCH v2 2/4] .gitlab-ci.d/windows.yml: Keep 64-bit and 32-bit build scripts consistent

2022-11-25 Thread Bin Meng
From: Bin Meng At present the build scripts of 32-bit and 64-bit are inconsistent. Let's keep them consistent for easier maintenance. While we are here, add some comments to explain that for the 64-bit job, "--without-default-devices" is a must have, at least for now. Signed-off-by: Bin Meng

[PATCH v6 03/14] nbd/server.c: add missing coroutine_fn annotations

2022-11-25 Thread Emanuele Giuseppe Esposito
These functions end up calling bdrv_*() implemented as generated_co_wrapper functions. In addition, they also happen to be always called in coroutine context, meaning all callers are coroutine_fn. This means that the g_c_w function will enter the qemu_in_coroutine() case and eventually suspend (or

[PATCH] e1000e: Configure ResettableClass

2022-11-25 Thread Akihiko Odaki
This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Signed-off-by: Akihiko Odaki --- hw/net/e1000e.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] docs/devel/reset.rst: Correct function names

2022-11-25 Thread Philippe Mathieu-Daudé
On 25/11/22 15:06, Akihiko Odaki wrote: resettable_class_set_parent_phases() was mistakenly called resettable_class_set_parent_reset_phases() in some places. Signed-off-by: Akihiko Odaki --- docs/devel/reset.rst | 17 - 1 file changed, 8 insertions(+), 9 deletions(-)

Re: [PATCH] e1000e: Remove pending interrupt flags

2022-11-25 Thread Philippe Mathieu-Daudé
On 25/11/22 15:02, Akihiko Odaki wrote: They are duplicate of running throttling timer flags and incomplete as the flags are not cleared when the interrupts are fired or the device is reset. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.h | 2 -- hw/net/e1000e.c | 3 ---

Re: [PATCH] e1000e: Configure ResettableClass

2022-11-25 Thread Peter Maydell
On Fri, 25 Nov 2022 at 14:10, Akihiko Odaki wrote: > > This is part of recent efforts of refactoring e1000 and e1000e. > > DeviceClass's reset member is deprecated so migrate to ResettableClass. > Thre is no behavioral difference. > > Signed-off-by: Akihiko Odaki > --- > hw/net/e1000e.c | 8

Re: [PATCH for 7.2-rc3 v1 0/2] virtio fixes

2022-11-25 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Thu, Nov 24, 2022 at 10:24:14PM +, Alex Bennée wrote: >> >> "Michael S. Tsirkin" writes: >> >> > On Thu, Nov 24, 2022 at 09:21:15AM +, Alex Bennée wrote: >> >> >> >> "Michael S. Tsirkin" writes: >> >> >> >> > On Wed, Nov 23, 2022 at 04:03:49PM

Re: [PATCH v2 06/15] block: Fix locking for bdrv_reopen_queue_child()

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/18/22 20:41, Kevin Wolf wrote: Callers don't agree whether bdrv_reopen_queue_child() should be called with the AioContext lock held or not. Standardise on holding the lock (as done by QMP blockdev-reopen and the replication block driver) and fix bdrv_reopen() to do the same.

[PATCH] e1000: Configure ResettableClass

2022-11-25 Thread Akihiko Odaki
This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] e1000: Configure ResettableClass

2022-11-25 Thread Peter Maydell
On Fri, 25 Nov 2022 at 14:09, Akihiko Odaki wrote: > > This is part of recent efforts of refactoring e1000 and e1000e. > > DeviceClass's reset member is deprecated so migrate to ResettableClass. > Thre is no behavioral difference. > > Signed-off-by: Akihiko Odaki > --- > hw/net/e1000.c | 7

[PATCH v4 0/2] Add OCP extended log to nvme QEMU

2022-11-25 Thread Joel Granados
The motivation and description are contained in the last patch in this set. Will copy paste it here for convenience: In order to evaluate write amplification factor (WAF) within the storage stack it is important to know the number of bytes written to the controller. The existing SMART

[PATCH 1/4] .gitlab-ci.d/windows.yml: Unify the prerequisite packages

2022-11-25 Thread Bin Meng
From: Bin Meng At present the prerequisite packages for 64-bit and 32-bit builds are slightly different. Let's use the same packages for both for easier maintenance in the future. Signed-off-by: Bin Meng --- .gitlab-ci.d/windows.yml | 12 +++- 1 file changed, 11 insertions(+), 1

[PATCH 3/4] .gitlab-ci.d/windows.yml: Exclude qTests from 64-bit CI job for now

2022-11-25 Thread Bin Meng
From: Bin Meng qTests don't run successfully with "--without-default-devices", so let's exclude the qtests from CI for now. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- .gitlab-ci.d/windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 2/4] .gitlab-ci.d/windows.yml: Keep 64-bit and 32-bit build scripts consistent

2022-11-25 Thread Bin Meng
From: Bin Meng At present the build scripts of 32-bit and 64-bit are inconsistent. Let's keep them consistent for easier maintenance. While we are here, add some comments to explain that for the 64-bit job, "--without-default-devices" is a must have, at least for now. Signed-off-by: Bin Meng

[PATCH 4/4] tests/qtest: Enable qtest build on Windows

2022-11-25 Thread Bin Meng
From: Bin Meng Now that we have fixed various test case issues as seen when running on Windows, let's enable the qtest build on Windows. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- tests/qtest/meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git

Re: [PATCH] hw/intc/arm_gicv3: Fix GICD_TYPER ITLinesNumber advertisement

2022-11-25 Thread Peter Maydell
On Tue, 22 Nov 2022 at 18:31, Luke Starrett wrote: > > The ARM GICv3 TRM describes that the ITLinesNumber field of GICD_TYPER > register: > > "indicates the maximum SPI INTID that the GIC implementation supports" > > As SPI #0 is absolute IRQ #32, the max SPI INTID should have accounted > for the

[PATCH v6 10/14] block-coroutine-wrapper.py: introduce co_wrapper

2022-11-25 Thread Emanuele Giuseppe Esposito
This new annotation creates just a function wrapper that creates a new coroutine. It assumes the caller is not a coroutine. It will be the default annotation to be used in the future. This is much better as c_w_mixed, because it is clear if the caller is a coroutine or not, and provides the

[PATCH v2] e1000: Use hw/net/mii.h

2022-11-25 Thread Akihiko Odaki
hw/net/mii.h provides common definitions for MII. Signed-off-by: Akihiko Odaki --- hw/net/e1000_regs.h| 46 hw/net/e1000x_common.h | 8 ++-- hw/net/e1000.c | 86 ++-- hw/net/e1000e.c| 1 + hw/net/e1000e_core.c | 99

[PATCH v2] e1000: Configure ResettableClass

2022-11-25 Thread Akihiko Odaki
This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff

[RFC PATCH 2/3] vdpa: load guest offloads at device start

2022-11-25 Thread Eugenio Pérez
This allows to migrate them. Save some device's startup time if they are the default. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index

[RFC PATCH 0/3] VIRTIO_NET_F_CTRL_GUEST_OFFLOADS vDPA Shadow VirtQueue implementation

2022-11-25 Thread Eugenio Pérez
This feature allows the driver to send control commands for dynamic offloads state configuration. When a guest is migrated the destination device needs to be restored with the same offloads. As other features configurable via CVQ, intercept the control messages, update the device model and load

[RFC PATCH 3/3] vdpa: add VIRTIO_NET_F_CTRL_GUEST_OFFLOADS to SVQ features

2022-11-25 Thread Eugenio Pérez
This way it is possible to migrate them. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 7ce094bd67..eca0184d3a 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -81,6 +81,7 @@ const int

Re: guest Linux Kernel hangs and reports CPU lockup/stuck gitlab bug

2022-11-25 Thread Fabiano Rosas
Gerd Hoffmann writes: > On Wed, Sep 21, 2022 at 11:55:01AM +0200, Claudio Fontana wrote: >> Hi, >> >> I think this bug report warrants some attention, >> >> can Gerd take a look here? >> >> The GTK Clipboard commit seems involved: >> >> https://gitlab.com/qemu-project/qemu/-/issues/1150 > >

[PATCH for-8.0 3/7] pci: Convert TYPE_PCIE_ROOT_PORT to 3-phase reset

2022-11-25 Thread Peter Maydell
Convert the TYPE_PCIE_ROOT_PORT device to 3-phase reset; this is a necessary precursor to converting any of its child classes. Signed-off-by: Peter Maydell --- hw/pci-bridge/pcie_root_port.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH for-8.0 5/7] hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset()

2022-11-25 Thread Peter Maydell
The realize method for the TYPE_ICS class uses qemu_register_reset() to register a reset handler, as a workaround for the fact that currently objects which directly inherit from TYPE_DEVICE don't get automatically reset. However, the reset function directly calls ics_reset(), which is the

Re: [RFC PATCH 1/3] hw/intc: Add missing include for goldfish_pic.h

2022-11-25 Thread Philippe Mathieu-Daudé
On 24/11/22 22:29, Jiaxun Yang wrote: hw/sysbus.h is missed in goldfish_pic.h. Signed-off-by: Jiaxun Yang --- include/hw/intc/goldfish_pic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/intc/goldfish_pic.h b/include/hw/intc/goldfish_pic.h index e9d552f796..3e79580367

[PATCH v6 00/14] Still more coroutine and various fixes in block layer

2022-11-25 Thread Emanuele Giuseppe Esposito
This is a dump of all minor coroutine-related fixes found while looking around and testing various things in the QEMU block layer. Patches aim to: - add missing coroutine_fn annotation to the functions - simplify to avoid the typical "if in coroutine: fn() // else create_coroutine(fn)" already

[PATCH v6 14/14] block/dirty-bitmap: convert coroutine-only functions to co_wrapper

2022-11-25 Thread Emanuele Giuseppe Esposito
bdrv_can_store_new_dirty_bitmap and bdrv_remove_persistent_dirty_bitmap check if they are running in a coroutine, directly calling the coroutine callback if it's the case. Except that no coroutine calls such functions, therefore that check can be removed, and function creation can be offloaded to

[PATCH v6 01/14] block-io: introduce coroutine_fn duplicates for bdrv_common_block_status_above callers

2022-11-25 Thread Emanuele Giuseppe Esposito
bdrv_common_block_status_above() is a g_c_w, and it is being called by many "wrapper" functions like bdrv_is_allocated(), bdrv_is_allocated_above() and bdrv_block_status_above(). Because we want to eventually split the coroutine from non-coroutine case in g_c_w, create duplicate wrappers that

Re: [PATCH v2 07/15] block: Drain invidual nodes during reopen

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
in subject: s/invidual/individual/ On 11/18/22 20:41, Kevin Wolf wrote: bdrv_reopen() and friends use subtree drains as a lazy way of covering all the nodes they touch. Turns out that this lazy way is a lot more complicated than just draining the nodes individually, even not accounting for the

Re: [PATCH for-8.0 1/7] hw/virtio: Convert TYPE_VIRTIO_PCI to 3-phase reset

2022-11-25 Thread Philippe Mathieu-Daudé
On 25/11/22 12:52, Peter Maydell wrote: Convert the TYPE_VIRTIO_PCI class to 3-phase reset. This is necessary so that we can convert the subclass TYPE_VIRTIO_VGA_BASE also to 3-phase reset. Signed-off-by: Peter Maydell --- hw/virtio/virtio-pci.c | 8 +--- 1 file changed, 5

Re: [PATCH for-8.0 5/7] hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset()

2022-11-25 Thread Greg Kurz
On Fri, 25 Nov 2022 13:24:00 +0100 Cédric Le Goater wrote: > On 11/25/22 12:52, Peter Maydell wrote: > > The realize method for the TYPE_ICS class uses qemu_register_reset() > > to register a reset handler, as a workaround for the fact that > > currently objects which directly inherit from

[PATCH] e1000e: Use memcpy to intialize registers

2022-11-25 Thread Akihiko Odaki
Use memcpy instead of memmove to initialize registers. The initial register templates and register table instances will never overlap. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/e1000e_core.c

Re: [PATCH v2] e1000: Configure ResettableClass

2022-11-25 Thread Peter Maydell
On Fri, 25 Nov 2022 at 14:33, Akihiko Odaki wrote: > > This is part of recent efforts of refactoring e1000 and e1000e. > > DeviceClass's reset member is deprecated so migrate to ResettableClass. > Thre is no behavioral difference. > > Signed-off-by: Akihiko Odaki > --- Reviewed-by: Peter

Re: [PATCH] hw/intc/arm_gicv3: Fix GICD_TYPER ITLinesNumber advertisement

2022-11-25 Thread Luke Starrett
On 11/25/2022 8:34 AM, Peter Maydell wrote: On Tue, 22 Nov 2022 at 18:31, Luke Starrett wrote: The ARM GICv3 TRM describes that the ITLinesNumber field of GICD_TYPER register: "indicates the maximum SPI INTID that the GIC implementation supports" As SPI #0 is absolute IRQ #32, the max SPI

Re: [PATCH v2 11/15] block: Call drain callbacks only once

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/18/22 20:41, Kevin Wolf wrote: We only need to call both the BlockDriver's callback and the parent callbacks when going from undrained to drained or vice versa. A second drain section doesn't make a difference for the driver or the parent, they weren't supposed to send new requests before

Re: [PATCH for 7.2-rc3 v1 0/2] virtio fixes

2022-11-25 Thread Michael S. Tsirkin
On Thu, Nov 24, 2022 at 10:24:14PM +, Alex Bennée wrote: > > "Michael S. Tsirkin" writes: > > > On Thu, Nov 24, 2022 at 09:21:15AM +, Alex Bennée wrote: > >> > >> "Michael S. Tsirkin" writes: > >> > >> > On Wed, Nov 23, 2022 at 04:03:49PM +, Alex Bennée wrote: > >> >> > >> >>

Re: [RFC PATCH 2/3] hw/misc: Add MIPS Trickbox device

2022-11-25 Thread BALATON Zoltan
Hello, I can't review the patch, I can only correct grammar in commit message. (Also Philippe has a new preferred email address now.) On Thu, 24 Nov 2022, Jiaxun Yang wrote: MIPS Trickbox is a emulated device present in MIPS's proprietary an emulated simulators for decadeds. It's capable

Re: [PATCH v2 2/4] .gitlab-ci.d/windows.yml: Keep 64-bit and 32-bit build scripts consistent

2022-11-25 Thread Thomas Huth
On 25/11/2022 12.40, Bin Meng wrote: From: Bin Meng At present the build scripts of 32-bit and 64-bit are inconsistent. Let's keep them consistent for easier maintenance. While we are here, add some comments to explain that for the 64-bit job, "--without-default-devices" is a must have, at

Re: [PATCH v2 3/4] .gitlab-ci.d/windows.yml: Exclude qTests from 64-bit CI job for now

2022-11-25 Thread Thomas Huth
On 25/11/2022 12.40, Bin Meng wrote: From: Bin Meng qTests don't run successfully with "--without-default-devices", so let's exclude the qtests from CI for now. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- (no changes since v1) .gitlab-ci.d/windows.yml | 4 +++- 1 file

Re: [PATCH 3/4] .gitlab-ci.d/windows.yml: Exclude qTests from 64-bit CI job for now

2022-11-25 Thread Thomas Huth
On 25/11/2022 11.49, Bin Meng wrote: From: Bin Meng qTests don't run successfully with "--without-default-devices", so let's exclude the qtests from CI for now. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- .gitlab-ci.d/windows.yml | 4 +++- 1 file changed, 3

[PATCH v6 12/14] block-coroutine-wrapper.py: support also basic return types

2022-11-25 Thread Emanuele Giuseppe Esposito
Extend the regex to cover also return type, pointers included. This implies that the value returned by the function cannot be a simple "int" anymore, but the custom return type. Therefore remove poll_state->ret and instead use a per-function custom "ret" field. Signed-off-by: Emanuele Giuseppe

[PATCH v6 05/14] block/vmdk: add missing coroutine_fn annotations

2022-11-25 Thread Emanuele Giuseppe Esposito
These functions end up calling bdrv_create() implemented as generated_co_wrapper functions. In addition, they also happen to be always called in coroutine context, meaning all callers are coroutine_fn. This means that the g_c_w function will enter the qemu_in_coroutine() case and eventually

[PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-25 Thread Marc Hartmayer
The virtiofsd currently crashes on s390x. This is because of a `sigreturn` system call. See audit log below: type=SECCOMP msg=audit(1669382477.611:459): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 pid=6649 comm="virtiofsd"

[RFC PATCH 1/3] virtio_net: export virtio_net_guest_offloads_by_features

2022-11-25 Thread Eugenio Pérez
vdpa NIC can use it to know if it needs to restore guest offloads at startup / migration. Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio-net.h | 1 + hw/net/virtio-net.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/virtio/virtio-net.h

Re: [PATCH v2 13/15] block: Drop out of coroutine in bdrv_do_drained_begin_quiesce()

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/18/22 20:41, Kevin Wolf wrote: The next patch adds a parent drain to bdrv_attach_child_common(), which shouldn't be, but is currently called from coroutines in some cases (e.g. .bdrv_co_create implementations generally open new nodes). Therefore, the assertion that we're not in a coroutine

[PATCH v2] riscv: Add RISCVCPUConfig.satp_mode to set sv48, sv57, etc.

2022-11-25 Thread Alexandre Ghiti
RISC-V specifies multiple sizes for addressable memory and Linux probes for the machine's support at startup via the satp CSR register (done in csr.c:validate_vm). As per the specification, sv64 must support sv57, which in turn must support sv48...etc. So we can restrict machine support by simply

Re: [PATCH 2/4] .gitlab-ci.d/windows.yml: Keep 64-bit and 32-bit build scripts consistent

2022-11-25 Thread Bin Meng
On Fri, Nov 25, 2022 at 6:56 PM Thomas Huth wrote: > > On 25/11/2022 11.49, Bin Meng wrote: > > From: Bin Meng > > > > At present the build scripts of 32-bit and 64-bit are inconsistent. > > Let's keep them consistent for easier maintenance. > > > > While we are here, add some comments to

[PATCH v2 4/4] tests/qtest: Enable qtest build on Windows

2022-11-25 Thread Bin Meng
From: Bin Meng Now that we have fixed various test case issues as seen when running on Windows, let's enable the qtest build on Windows. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- (no changes since v1) tests/qtest/meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH v2 1/4] .gitlab-ci.d/windows.yml: Unify the prerequisite packages

2022-11-25 Thread Bin Meng
From: Bin Meng At present the prerequisite packages for 64-bit and 32-bit builds are slightly different. Let's use the same packages for both for easier maintenance in the future. Signed-off-by: Bin Meng --- (no changes since v1) .gitlab-ci.d/windows.yml | 12 +++- 1 file changed,

[PATCH v2 3/4] .gitlab-ci.d/windows.yml: Exclude qTests from 64-bit CI job for now

2022-11-25 Thread Bin Meng
From: Bin Meng qTests don't run successfully with "--without-default-devices", so let's exclude the qtests from CI for now. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- (no changes since v1) .gitlab-ci.d/windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[PATCH for-8.0 0/7] virtio, pci, xics: 3-phase reset conversions

2022-11-25 Thread Peter Maydell
This patchset converts a miscellaneous collection of classes to 3-phase reset. The common link, as with other series I've sent out recently, is converting child classes that currently use device_class_set_parent_reset() so that we can remove that function. To do this we first need to convert the

[PATCH for-8.0 2/7] hw/display/virtio-vga: Convert TYPE_VIRTIO_VGA_BASE to 3-phase reset

2022-11-25 Thread Peter Maydell
Convert the TYPE_VIRTIO_VGA_BASE class to 3-phase reset, so we don't need to use device_class_set_parent_reset() any more. Note that this is an abstract class itself; none of the subclasses override its reset method. Signed-off-by: Peter Maydell --- hw/display/virtio-vga.h | 2 +-

[PATCH for-8.0 4/7] pci: Convert child classes of TYPE_PCIE_ROOT_PORT to 3-phase reset

2022-11-25 Thread Peter Maydell
Convert the TYPE_CXL_ROOT_PORT and TYPE_PNV_PHB_ROOT_PORT classes to 3-phase reset, so they don't need to use the deprecated device_class_set_parent_reset() function any more. We have to do both in the same commit, because they keep the parent_reset field in their common parent class's class

[PATCH for-8.0 7/7] hw/pci-host/pnv_phb3_msi: Convert TYPE_PHB3_MSI to 3-phase reset

2022-11-25 Thread Peter Maydell
Convert the TYPE_PHB3_MSI class to 3-phase reset, so we can avoid using the device_class_set_parent_reset() function. Signed-off-by: Peter Maydell --- include/hw/ppc/xics.h | 2 +- hw/pci-host/pnv_phb3_msi.c | 15 +-- 2 files changed, 10 insertions(+), 7 deletions(-) diff

[PATCH for-8.0 1/7] hw/virtio: Convert TYPE_VIRTIO_PCI to 3-phase reset

2022-11-25 Thread Peter Maydell
Convert the TYPE_VIRTIO_PCI class to 3-phase reset. This is necessary so that we can convert the subclass TYPE_VIRTIO_VGA_BASE also to 3-phase reset. Signed-off-by: Peter Maydell --- hw/virtio/virtio-pci.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH for-8.0 6/7] hw/intc/xics: Convert TYPE_ICS to 3-phase reset

2022-11-25 Thread Peter Maydell
Convert the TYPE_ICS class to 3-phase reset; this will allow us to convert the TYPE_PHB3_MSI class which inherits from it. Signed-off-by: Peter Maydell --- hw/intc/xics.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index

Re: [PATCH for-8.0 7/7] hw/pci-host/pnv_phb3_msi: Convert TYPE_PHB3_MSI to 3-phase reset

2022-11-25 Thread Cédric Le Goater
On 11/25/22 12:52, Peter Maydell wrote: Convert the TYPE_PHB3_MSI class to 3-phase reset, so we can avoid using the device_class_set_parent_reset() function. Signed-off-by: Peter Maydell Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/ppc/xics.h | 2 +-

Re: [RFC PATCH 3/3] hw/mips: Add MIPS VirtIO board

2022-11-25 Thread BALATON Zoltan
On Thu, 24 Nov 2022, Jiaxun Yang wrote: MIPS VirtIO board is design to utilize existing VirtIO infrastures Only riscv seems to call it a VirtIO machine, which I think is a misnomer as it's called "virt" and does not only use virtio devices but some others too. Better call it a virt machine

[PATCH v6 13/14] block: convert bdrv_create to co_wrapper

2022-11-25 Thread Emanuele Giuseppe Esposito
This function is never called in coroutine context, therefore instead of manually creating a new coroutine, delegate it to the block-coroutine-wrapper script, defining it as co_wrapper. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf --- block.c|

[PATCH v6 09/14] block: rename generated_co_wrapper in co_wrapper_mixed

2022-11-25 Thread Emanuele Giuseppe Esposito
In preparation to the incoming new function specifiers, rename g_c_w with a more meaningful name and document it. Signed-off-by: Emanuele Giuseppe Esposito --- block/coroutines.h | 4 +- docs/devel/block-coroutine-wrapper.rst | 6 +-- include/block/block-common.h

[PATCH v6 02/14] block-copy: add missing coroutine_fn annotations

2022-11-25 Thread Emanuele Giuseppe Esposito
These functions end up calling bdrv_common_block_status_above(), a generated_co_wrapper function. In addition, they also happen to be always called in coroutine context, meaning all callers are coroutine_fn. This means that the g_c_w function will enter the qemu_in_coroutine() case and eventually

Re: [PATCH for-8.0 6/7] hw/intc/xics: Convert TYPE_ICS to 3-phase reset

2022-11-25 Thread Greg Kurz
On Fri, 25 Nov 2022 11:52:39 + Peter Maydell wrote: > Convert the TYPE_ICS class to 3-phase reset; this will allow us > to convert the TYPE_PHB3_MSI class which inherits from it. > > Signed-off-by: Peter Maydell > --- Reviewed-by: Greg Kurz > hw/intc/xics.c | 9 + > 1 file

[PATCH] docs/devel/reset.rst: Correct function names

2022-11-25 Thread Akihiko Odaki
resettable_class_set_parent_phases() was mistakenly called resettable_class_set_parent_reset_phases() in some places. Signed-off-by: Akihiko Odaki --- docs/devel/reset.rst | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/devel/reset.rst

[PATCH v4 1/2] nvme: Move adjustment of data_units{read,written}

2022-11-25 Thread Joel Granados
In order to return the units_{read/written} required by the SMART log we need to shift the number of bytes value by BDRV_SECTORS_BITS and multiply by 1000. This is a prep patch that moves this adjustment to where the SMART log is calculated in order to use the stats struct for calculating OCP

[PATCH v4 2/2] nvme: Add physical writes/reads from OCP log

2022-11-25 Thread Joel Granados
In order to evaluate write amplification factor (WAF) within the storage stack it is important to know the number of bytes written to the controller. The existing SMART log value of Data Units Written is too coarse (given in units of 500 Kb) and so we add the SMART health information extended from

Re: [PATCH v6 11/11] tests/qtest: Enable qtest build on Windows

2022-11-25 Thread Bin Meng
Hi Marc-André, On Wed, Nov 23, 2022 at 10:14 PM Marc-André Lureau wrote: > > Hi Bin > > On Fri, Oct 28, 2022 at 9:06 AM Bin Meng wrote: > > > > Now that we have fixed various test case issues as seen when running > > on Windows, let's enable the qtest build on Windows. > > > > Signed-off-by:

Re: [PATCH for-8.0 5/7] hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset()

2022-11-25 Thread Cédric Le Goater
On 11/25/22 12:52, Peter Maydell wrote: The realize method for the TYPE_ICS class uses qemu_register_reset() to register a reset handler, as a workaround for the fact that currently objects which directly inherit from TYPE_DEVICE don't get automatically reset. However, the reset function

Re: [PATCH for-8.0 6/7] hw/intc/xics: Convert TYPE_ICS to 3-phase reset

2022-11-25 Thread Cédric Le Goater
On 11/25/22 12:52, Peter Maydell wrote: Convert the TYPE_ICS class to 3-phase reset; this will allow us to convert the TYPE_PHB3_MSI class which inherits from it. Signed-off-by: Peter Maydell Reviewed-by: Cédric Le Goater Thanks, C. --- hw/intc/xics.c | 9 + 1 file changed,

Re: [RFC PATCH 3/3] hw/mips: Add MIPS VirtIO board

2022-11-25 Thread Philippe Mathieu-Daudé
On 24/11/22 22:29, Jiaxun Yang wrote: MIPS VirtIO board is design to utilize existing VirtIO infrastures but also comptitable with MIPS's existing internal simulation tools. It includes virtio-mmio, pcie gpex, flash rom, fw_cfg, goldfish-rtc, and optional goldfish_pic in case MIPS GIC is not

[PATCH v6 06/14] block: avoid duplicating filename string in bdrv_create

2022-11-25 Thread Emanuele Giuseppe Esposito
We know that the string will stay around until the function returns, and the parameter of drv->bdrv_co_create_opts is const char*, so it must not be modified either. Suggested-by: Kevin Wolf Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf --- block.c | 7 ++- 1 file

[PATCH] e1000e: Remove pending interrupt flags

2022-11-25 Thread Akihiko Odaki
They are duplicate of running throttling timer flags and incomplete as the flags are not cleared when the interrupts are fired or the device is reset. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.h | 2 -- hw/net/e1000e.c | 3 --- hw/net/e1000e_core.c | 19 +++

[PATCH v2] e1000e: Remove pending interrupt flags

2022-11-25 Thread Akihiko Odaki
They are duplicate of running throttling timer flags and incomplete as the flags are not cleared when the interrupts are fired or the device is reset. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.h | 2 -- hw/net/e1000e.c | 5 ++--- hw/net/e1000e_core.c | 19 +++

Re: [PATCH v2] e1000e: Configure ResettableClass

2022-11-25 Thread Philippe Mathieu-Daudé
On 25/11/22 15:36, Akihiko Odaki wrote: This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. Thre is no behavioral difference. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell --- hw/net/e1000e.c

Re: [PATCH v6 09/14] block: rename generated_co_wrapper in co_wrapper_mixed

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote: In preparation to the incoming new function specifiers, rename g_c_w with a more meaningful name and document it. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-25 Thread Stefan Hajnoczi
Thanks, applied to qemu.git/master. Stefan

Re: [PATCH v2 15/15] block: Remove poll parameter from bdrv_parent_drained_begin_single()

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/18/22 20:41, Kevin Wolf wrote: All callers of bdrv_parent_drained_begin_single() pass poll=false now, so we don't need the parameter any more. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v2 14/15] block: Don't poll in bdrv_replace_child_noperm()

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/18/22 20:41, Kevin Wolf wrote: In order to make sure that bdrv_replace_child_noperm() doesn't have to poll any more, get rid of the bdrv_parent_drained_begin_single() call. This is possible now because we can require that the parent is already drained through the child in question when

Re: [PATCH v6 07/14] block: distinguish between bdrv_create running in coroutine and not

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote: Call two different functions depending on whether bdrv_create is in coroutine or not, following the same pattern as generated_co_wrapper functions. This allows to also call the coroutine function directly, without using CreateCo or relying in

Re: [PATCH v6 13/14] block: convert bdrv_create to co_wrapper

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote: This function is never called in coroutine context, therefore instead of manually creating a new coroutine, delegate it to the block-coroutine-wrapper script, defining it as co_wrapper. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by:

[PATCH] hw/display/next-fb: Fix comment typo

2022-11-25 Thread Evgeny Ermakov
Signed-off-by: Evgeny Ermakov --- hw/display/next-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/next-fb.c b/hw/display/next-fb.c index dd6a1aa8ae..8446ff3c00 100644 --- a/hw/display/next-fb.c +++ b/hw/display/next-fb.c @@ -126,7 +126,7 @@ static void

Re: [Virtio-fs] [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-25 Thread German Maglione
On Fri, Nov 25, 2022 at 3:40 PM Marc Hartmayer wrote: > > The virtiofsd currently crashes on s390x. This is because of a > `sigreturn` system call. See audit log below: > > type=SECCOMP msg=audit(1669382477.611:459): auid=4294967295 uid=0 gid=0 > ses=4294967295

Re: [PATCH v6 03/14] nbd/server.c: add missing coroutine_fn annotations

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote: These functions end up calling bdrv_*() implemented as generated_co_wrapper functions. In addition, they also happen to be always called in coroutine context, meaning all callers are coroutine_fn. This means that the g_c_w function will enter

Re: [PATCH v6 04/14] block-backend: replace bdrv_*_above with blk_*_above

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote: Avoid mixing bdrv_* functions with blk_*, so create blk_* counterparts for bdrv_block_status_above and bdrv_is_allocated_above. Note that since blk_co_block_status_above only calls the g_c_w function bdrv_common_block_status_above and is

Re: [PATCH v6 05/14] block/vmdk: add missing coroutine_fn annotations

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote: These functions end up calling bdrv_create() implemented as generated_co_wrapper functions. In addition, they also happen to be always called in coroutine context, meaning all callers are coroutine_fn. This means that the g_c_w function will

[PATCH-for-8.0] coroutine: Add missing include

2022-11-25 Thread Philippe Mathieu-Daudé
qemu_co_mutex_assert_locked() calls qatomic_read(), which is declared in . This fixes when refactoring: In file included from include/qemu/osdep.h:113, from ../../util/error-report.c:13: include/qemu/coroutine.h: In function 'qemu_co_mutex_assert_locked':

Re: [PATCH v6 08/14] block: bdrv_create_file is a coroutine_fn

2022-11-25 Thread Vladimir Sementsov-Ogievskiy
On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote: It is always called in coroutine_fn callbacks, therefore it can directly call bdrv_co_create(). Rename it to bdrv_co_create_file too. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Reviewed-by: Vladimir

  1   2   >