Re: [PATCH v9 06/12] vdpa: request iova_range only once

2022-12-21 Thread Jason Wang
On Fri, Dec 16, 2022 at 5:53 PM Eugenio Perez Martin wrote: > > On Fri, Dec 16, 2022 at 8:29 AM Jason Wang wrote: > > > > On Thu, Dec 15, 2022 at 7:32 PM Eugenio Pérez wrote: > > > > > > Currently iova range is requested once per queue pair in the case of > > > net. Reduce the number of ioctls a

Re: [PATCH RESEND v2 4/5] target/mips: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-21 Thread Philippe Mathieu-Daudé
On 20/12/22 12:11, Philippe Mathieu-Daudé wrote: Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Extract the QMP functions from cpu.c (which is always compiled) to the ne

Re: [PATCH] MIPS: remove support for trap and emulate KVM

2022-12-21 Thread Philippe Mathieu-Daudé
On 18/12/22 01:06, Paolo Bonzini wrote: This support was limited to the Malta board, drop it. I do not have a machine that can run VZ KVM, so I am assuming that it works for -M malta as well. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 9 --- docs/about/removed-fe

Re: [[PATCH]--edit 3/6] configure: repeat ourselves for the benefit of CI

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 08:42, Alex Bennée wrote: Our CI system echos the lines it executes but not the expansions. For the sake of a line of extra verbosity during the configure phase lets echo the invocation of script to stdout as well as the log when on CI. Signed-off-by: Alex Bennée Message-Id: <202212

Re: [[PATCH]--edit 4/6] tests/tcg: fix unused variable in linux-test

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 08:42, Alex Bennée wrote: The latest hexagon compiler picks up that we never consume wcount. Given the name of the #define that rcount checks against is WCOUNT_MAX I figured the check just got missed. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/linux/linux-test.c | 6 +-

Re: [[PATCH]--edit 5/6] tests/docker: use prebuilt toolchain for debian-hexagon-cross

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 08:42, Alex Bennée wrote: From: Mukilan Thiyagarajan The current docker image for cross compiling hexagon guests is manually built since it takes >2 hours to build from source. This patch: 1. Solves the above issue by using the prebuilt clang toolchain hosted on CodeLinaro [

Re: [[PATCH]--edit 6/6] gitlab-ci: Disable docs and GUIs for the build-tci and build-tcg-disabled jobs

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 08:42, Alex Bennée wrote: From: Thomas Huth These jobs use their own "script:" section and thus do not profit from the global "--disable-docs" from the template. While we're at it, disable also some GUI front ends here since we do not gain any additional test coverage by compiling t

[PATCH v2 1/6] configure: Fix check-tcg not executing any tests

2022-12-21 Thread Alex Bennée
From: Mukilan Thiyagarajan After configuring with --target-list=hexagon-linux-user running `make check-tcg` just prints the following: ``` make: Nothing to be done for 'check-tcg' ``` In the probe_target_compiler function, the 'break' command is used incorrectly. There are no lexically enclosin

[PATCH v2 6/6] gitlab-ci: Disable docs and GUIs for the build-tci and build-tcg-disabled jobs

2022-12-21 Thread Alex Bennée
From: Thomas Huth These jobs use their own "script:" section and thus do not profit from the global "--disable-docs" from the template. While we're at it, disable also some GUI front ends here since we do not gain any additional test coverage by compiling those here again. Signed-off-by: Thomas

[PATCH v2 0/6] current status of testing/next

2022-12-21 Thread Alex Bennée
Hi, Here is the current state of my testing/next tree. Nothing particularly out of the ordinary but we do now have a binary release of the hexagon tools. Hopefully this time without the header damage. The following still need review: - tests/tcg: fix unused variable in linux-test - configure:

[PATCH v2 4/6] tests/tcg: fix unused variable in linux-test

2022-12-21 Thread Alex Bennée
The latest hexagon compiler picks up that we never consume wcount. Given the name of the #define that rcount checks against is WCOUNT_MAX I figured the check just got missed. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/linux/linux-test.c | 6 +- 1 file changed, 5 insertions(+), 1 dele

[PATCH v2 3/6] configure: repeat ourselves for the benefit of CI

2022-12-21 Thread Alex Bennée
Our CI system echos the lines it executes but not the expansions. For the sake of a line of extra verbosity during the configure phase lets echo the invocation of script to stdout as well as the log when on CI. Signed-off-by: Alex Bennée Message-Id: <20221202174746.1218017-1-alex.ben...@linaro.or

[PATCH v2 5/6] tests/docker: use prebuilt toolchain for debian-hexagon-cross

2022-12-21 Thread Alex Bennée
From: Mukilan Thiyagarajan The current docker image for cross compiling hexagon guests is manually built since it takes >2 hours to build from source. This patch: 1. Solves the above issue by using the prebuilt clang toolchain hosted on CodeLinaro [1] and maintained by QUIC [2]. 2. The doc

[PATCH v2 2/6] gitlab: turn off verbose logging for make check on custom runners

2022-12-21 Thread Alex Bennée
The verbosity adds a lot of unnecessary output to the CI logs which end up getting truncated anyway. We can always extract information from the meson test logs on a failure and for the custom runners its generally easier to re-create failures anyway. Signed-off-by: Alex Bennée Reviewed-by: Thomas

Re: [PATCH v4 0/6] Only generate cluster node in PPTT when specified

2022-12-21 Thread Yicong Yang via
On 2022/12/21 14:27, Michael S. Tsirkin wrote: > On Tue, Nov 01, 2022 at 03:10:42PM +0800, Yicong Yang wrote: >> From: Yicong Yang >> >> This series mainly change the policy for building a cluster topology node >> in PPTT. Previously we'll always build a cluster node in PPTT without >> asking the

Re: [PATCH v2 3/6] configure: repeat ourselves for the benefit of CI

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 10:04, Alex Bennée wrote: Our CI system echos the lines it executes but not the expansions. For the sake of a line of extra verbosity during the configure phase lets echo the invocation of script to stdout as well as the log when on CI. Signed-off-by: Alex Bennée Message-Id: <202212

Re: [PATCH v2 6/6] gitlab-ci: Disable docs and GUIs for the build-tci and build-tcg-disabled jobs

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 10:04, Alex Bennée wrote: From: Thomas Huth These jobs use their own "script:" section and thus do not profit from the global "--disable-docs" from the template. While we're at it, disable also some GUI front ends here since we do not gain any additional test coverage by compiling t

Re: [PATCH v2 4/6] tests/tcg: fix unused variable in linux-test

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 10:04, Alex Bennée wrote: The latest hexagon compiler picks up that we never consume wcount. Given the name of the #define that rcount checks against is WCOUNT_MAX I figured the check just got missed. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/linux/linux-test.c | 6 +-

Re: [PATCH v2 5/6] tests/docker: use prebuilt toolchain for debian-hexagon-cross

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 10:04, Alex Bennée wrote: From: Mukilan Thiyagarajan The current docker image for cross compiling hexagon guests is manually built since it takes >2 hours to build from source. This patch: 1. Solves the above issue by using the prebuilt clang toolchain hosted on CodeLinaro [

[PATCH v2] MIPS: remove support for trap and emulate KVM

2022-12-21 Thread Philippe Mathieu-Daudé
From: Paolo Bonzini This support was limited to the Malta board, drop it. I do not have a machine that can run VZ KVM, so I am assuming that it works for -M malta as well. Signed-off-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- Since Paolo's v1: - Remove cpu_mips_kvm_um_phys_to

Re: [PATCH 1/2] hw/arm/virt: Consolidate GIC finalize logic

2022-12-21 Thread Alexander Graf
Hey Zengui, On 21.12.22 04:35, Zenghui Yu wrote: On 2022/12/21 7:04, Alexander Graf wrote: diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index c7dd59d7f1..365d19f7a3 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -109,12 +109,12 @@ typedef enum VirtMSIControllerT

[PATCH v2 2/2] hw/arm/virt: Make accels in GIC finalize logic explicit

2022-12-21 Thread Alexander Graf
Let's explicitly list out all accelerators that we support when trying to determine the supported set of GIC versions. KVM was already separate, so the only missing one is HVF which simply reuses all of TCG's emulation code and thus has the same compatibility matrix. Signed-off-by: Alexander Graf

[PATCH 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()

2022-12-21 Thread Alexander Graf
The finalize_gic_version() function tries to determine which GIC version the current accelerator / host combination supports. During the initial HVF porting efforts, I didn't realize that I also had to touch this function. Then Zenghui brought up this function as reply to my HVF GICv3 enablement pa

[PATCH v2 1/2] hw/arm/virt: Consolidate GIC finalize logic

2022-12-21 Thread Alexander Graf
Up to now, the finalize_gic_version() code open coded what is essentially a support bitmap match between host/emulation environment and desired target GIC type. This open coding leads to undesirable side effects. For example, a VM with KVM and -smp 10 will automatically choose GICv3 while the same

Re: [RFC PATCH v2 20/22] i386/xen: HVMOP_set_param / HVM_PARAM_CALLBACK_IRQ

2022-12-21 Thread Paul Durrant
On 21/12/2022 01:41, David Woodhouse wrote: On Mon, 2022-12-12 at 16:16 +, Paul Durrant wrote: @@ -287,24 +289,53 @@ static bool kvm_xen_hcall_memory_op(struct kvm_xen_exit *exit,   return true;   } +static int handle_set_param(struct kvm_xen_exit *exit, X86CPU *cpu, + 

Re: [PATCH v2 2/2] hw/arm/virt: Make accels in GIC finalize logic explicit

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 10:28, Alexander Graf wrote: Let's explicitly list out all accelerators that we support when trying to determine the supported set of GIC versions. KVM was already separate, so the only missing one is HVF which simply reuses all of TCG's emulation code and thus has the same compatibil

Re: [PATCH-for-8.0 4/4] hw/ppc/spapr_ovec: Avoid target_ulong spapr_ovec_parse_vector()

2022-12-21 Thread Cédric Le Goater
On 12/16/22 17:47, Daniel Henrique Barboza wrote: On 12/13/22 09:35, Philippe Mathieu-Daudé wrote: spapr_ovec.c is a device, but it uses target_ulong which is target specific. The hwaddr type (declared in "exec/hwaddr.h") better fits hardware addresses. As said by Harsh, spapr_ovec is in fac

Re: [RFC PATCH v3 03/38] xen: Add XEN_DISABLED mode and make it default

2022-12-21 Thread Paul Durrant
On 20/12/2022 22:59, David Woodhouse wrote: On Tue, 2022-12-20 at 14:39 +, Paul Durrant wrote: On 16/12/2022 00:40, David Woodhouse wrote: From: David Woodhouse Also check for XEN_ATTACH mode in xen_init() Suggested-by: Paolo Bonzini Signed-off-by: David Woodhouse ---    accel/xen/xen

[PATCH] target/hexagon: suppress unused variable warning

2022-12-21 Thread Alessandro Di Federico via
This patch manually suppresses a warning for an unused variable (yynerrs) emitted by bison. This warning has been triggered for the first time by clang 15. This patch also disables `-Wextra`, which is not usually adopted in QEMU. However, clang 15 triggers the warning fixed in this patch even in

Re: [PATCH] target/hexagon: suppress unused variable warning

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 11:02, Alessandro Di Federico wrote: This patch manually suppresses a warning for an unused variable (yynerrs) emitted by bison. This warning has been triggered for the first time by clang 15. This patch also disables `-Wextra`, which is not usually adopted in QEMU. However, clang 1

Re: [PATCH RESEND v2 5/5] target/ppc: Restrict 'qapi-commands-machine.h' to system emulation

2022-12-21 Thread Cédric Le Goater
On 12/20/22 12:11, Philippe Mathieu-Daudé wrote: Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Move the QMP functions from cpu_init.c (which is always compiled) to moni

Re: [PATCH v2 0/6] current status of testing/next

2022-12-21 Thread Philippe Mathieu-Daudé
On 21/12/22 10:04, Alex Bennée wrote: Hi, Here is the current state of my testing/next tree. Nothing particularly out of the ordinary but we do now have a binary release of the hexagon tools. Hopefully this time without the header damage. The following still need review: - tests/tcg: fix unu

Re: [PULL 00/15] ppc queue

2022-12-21 Thread Daniel Henrique Barboza
On 12/20/22 19:13, Philippe Mathieu-Daudé wrote: On 20/12/22 22:34, Peter Maydell wrote: On Tue, 20 Dec 2022 at 13:53, Daniel Henrique Barboza wrote: This fails 'make check'; I think the sdhci changes have broken the npmcm7xx-sdhci device: https://gitlab.com/qemu-project/qemu/-/jobs/3504

Re: [PATCH 0/6] Trivial PPC cleanups

2022-12-21 Thread Daniel Henrique Barboza
On 12/20/22 19:53, Bernhard Beschow wrote: Am 20. Dezember 2022 22:40:25 UTC schrieb Bernhard Beschow : Am 16. Dezember 2022 17:50:41 UTC schrieb Daniel Henrique Barboza : Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Thanks Daniel! Is there a way we could accomodate for

Re: [PATCH 4/5] replay: Extract core API to 'exec/replay-core.h'

2022-12-21 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 19.12.2022 20:08, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daude replay API is used deeply within TCG common code (common to user and system emulation). Unfortunately "sysemu/replay.h" requires some QAPI headers for few system-specific declarations,

Re: [PATCH 10/11] alsaaudio: change default playback settings

2022-12-21 Thread Christian Schoenebeck
On Sunday, December 18, 2022 6:15:38 PM CET Volker Rümelin wrote: > The currently used default playback settings in the ALSA audio > backend are a bit unfortunate. With a few emulated audio devices, > audio playback does not work properly. Here is a short part of > the debug log while audio is play

Re: [PATCH v20 08/10] virtio-net: add support for configure interrupt

2022-12-21 Thread Michael S. Tsirkin
On Mon, Dec 12, 2022 at 01:20:40AM +0800, Cindy Lu wrote: > Add functions to support configure interrupt in virtio_net > Add the functions to support vhost_net_config_pending > and vhost_net_config_mask. > > Signed-off-by: Cindy Lu Causes a bunch of failures including mingw. See: https://gitla

Re: [PATCH RESEND v5 0/3] Fix the virtio features negotiation flaw

2022-12-21 Thread Michael S. Tsirkin
On Tue, Dec 20, 2022 at 05:17:57PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > v5(resend): > -rebase on master Causes failures on some configurations: https://gitlab.com/mstredhat/qemu/-/jobs/3506121251 /usr/bin/ld: libcommon.fa.p/hw_net_vhost_net.c.o: in function `vhost

Re: [PATCH v2 09/10] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

2022-12-21 Thread Yongji Xie
On Wed, Dec 21, 2022 at 3:27 AM Marcel Holtmann wrote: > > It seems there is no need to keep the inuse field signed and end up with > compiler warnings for sign-compare. > > CC libvduse.o > libvduse.c: In function ‘vduse_queue_pop’: > libvduse.c:789:19: error: comparison of integer express

Re: [PATCH 4/5] include/hw/pci: Split pci_device.h off pci.h

2022-12-21 Thread Michael S. Tsirkin
On Fri, Dec 09, 2022 at 02:48:01PM +0100, Markus Armbruster wrote: > PCIDeviceClass and PCIDevice are defined in pci.h. Many users of the > header don't actually need them. Similar structs live in their own > headers: PCIBusClass and PCIBus in pci_bus.h, PCIBridge in > pci_bridge.h, PCIHostBridge

Re: [PATCH 0/5] include/hw/pci include/hw/cxl: Clean up includes

2022-12-21 Thread Michael S. Tsirkin
On Fri, Dec 09, 2022 at 02:47:57PM +0100, Markus Armbruster wrote: > Back in 2016, we discussed[1] rules for headers, and these were > generally liked: > > 1. Have a carefully curated header that's included everywhere first. We >got that already thanks to Peter: osdep.h. > > 2. Headers shoul

Re: [RFC v2 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-21 Thread Yongji Xie
On Wed, Dec 21, 2022 at 3:27 AM Marcel Holtmann wrote: > > CC libvduse.o > libvduse.c: In function ‘vring_set_avail_event’: > libvduse.c:603:7: error: dereferencing type-punned pointer will break > strict-aliasing rules [-Werror=strict-aliasin] > 603 | *((uint16_t *)&vq->vring.used-

Re: [PATCH v9 06/12] vdpa: request iova_range only once

2022-12-21 Thread Michael S. Tsirkin
On Wed, Dec 21, 2022 at 04:21:52PM +0800, Jason Wang wrote: > On Fri, Dec 16, 2022 at 5:53 PM Eugenio Perez Martin > wrote: > > > > On Fri, Dec 16, 2022 at 8:29 AM Jason Wang wrote: > > > > > > On Thu, Dec 15, 2022 at 7:32 PM Eugenio Pérez wrote: > > > > > > > > Currently iova range is requested

[PATCH v3 4/4] vdpa: do not handle VIRTIO_NET_F_GUEST_ANNOUNCE in vhost-vdpa

2022-12-21 Thread Eugenio Pérez
So qemu emulates it even in case the device does not support it. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 0b0712cd8a..6e71c74da2 100644 --- a/net/vhost-vdpa.c +++ b/net/vho

[PATCH v3 0/4] Guest announce feature emulation using Shadow VirtQueue

2022-12-21 Thread Eugenio Pérez
A gratuitous ARP is recommended after a live migration to reduce the amount of time needed by the network links to be aware of the new location. A hypervisor may not have the knowledge of the guest network configuration, and this is especially true on passthrough devices, so its simpler to ask the

[PATCH v3 2/4] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it

2022-12-21 Thread Eugenio Pérez
Status part of the emulated feature. It will follow device model, so we must copy it as long as NIC device model has it set. Signed-off-by: Eugenio Pérez --- v3: Add virtio byte swapping writing net config status. --- hw/net/virtio-net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/n

[PATCH v3 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-12-21 Thread Eugenio Pérez
Since this capability is emulated by qemu shadowed CVQ cannot forward it to the device. Process all that command within qemu. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c

[PATCH v3 1/4] virtio_net: Modify virtio_net_get_config to early return

2022-12-21 Thread Eugenio Pérez
Next patches introduce more code on vhost-vdpa branch, with already have too much indentation. Signed-off-by: Eugenio Pérez Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Acked-by: Jason Wang --- hw/net/virtio-net.c | 28 +++- 1 file changed, 15 in

Re: [RFC PATCH v2 20/22] i386/xen: HVMOP_set_param / HVM_PARAM_CALLBACK_IRQ

2022-12-21 Thread David Woodhouse
On 21 December 2022 09:37:36 GMT, Paul Durrant wrote: >On 21/12/2022 01:41, David Woodhouse wrote: +    exit->u.hcall.result = err; >>> >>> This is a bit on the ugly side isn't it? Why not return the err and have >>> kvm_xen_hcall_hvm_op() deal with passing it back? >> >> Because 'return

[PATCH] m25p80: Add the is25wp256 SFPD table

2022-12-21 Thread Guenter Roeck
Generated from hardware using the following command and then padding with 0xff to fill out a power-of-2: xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp Cc: Michael Walle Cc: Tudor Ambarus Signed-off-by: Guenter Roeck --- hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp.c | 40 +++

Re: [RFC PATCH-for-8.0 2/3] hw/ppc/spapr: Replace tswap64(HPTE) by cpu_to_be64(HPTE)

2022-12-21 Thread Peter Maydell
On Wed, 21 Dec 2022 at 01:35, David Gibson wrote: > On Mon, Dec 19, 2022 at 10:39:40AM +, Peter Maydell wrote: > > OK. I still think we should consistently change all the places that are > > accessing this data structure, though, not just half of them. > > Yes, that makes sense. Although what

Re: [PULL v3 0/6] QEMU Guest Agent misc patches

2022-12-21 Thread Peter Maydell
On Tue, 20 Dec 2022 at 14:02, Konstantin Kostiuk wrote: > > The following changes since commit 33698d3abf8ce65c38bb4b12b600b130d2682c79: > > Merge tag 'pull-monitor-2022-12-19' of https://repo.or.cz/qemu/armbru into > staging (2022-12-19 16:12:59 +) > > are available in the Git repository a

[PULL 00/41] virtio,pc,pci: features, cleanups, fixes

2022-12-21 Thread Michael S. Tsirkin
The following changes since commit c15dc499cc22f4a71639e42e36051e118761c25f: Merge tag 'pull-misc-20221218' of https://gitlab.com/rth7680/qemu into staging (2022-12-19 10:28:57 +) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstr

[PULL 02/41] hw/isa: add trace events for ICH9 LPC chip config access

2022-12-21 Thread Michael S. Tsirkin
From: Daniel P. Berrangé These tracepoints aid in understanding and debugging the guest drivers for the TCO watchdog. Reviewed-by: Richard W.M. Jones Signed-off-by: Daniel P. Berrangé Message-Id: <20221216125749.596075-3-berra...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Mich

[PULL 03/41] hw/watchdog: add trace events for watchdog action handling

2022-12-21 Thread Michael S. Tsirkin
From: Daniel P. Berrangé The tracepoints aid in debugging the triggering of watchdog devices. Reviewed-by: Richard W.M. Jones Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé Message-Id: <20221216125749.596075-4-berra...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed

[PULL 07/41] ich9: honour 'enable_tco' property

2022-12-21 Thread Michael S. Tsirkin
From: Daniel P. Berrangé An 'ICH9-LPC.enable_tco' property has been exposed for a very long time, but attempts to set it have never been honoured. Originally, any user provided 'enable_tco' value was force replaced by a value passed from the machine type setup code that was determine by machine

[PULL 06/41] hw/isa: enable TCO watchdog reboot pin strap by default

2022-12-21 Thread Michael S. Tsirkin
From: Daniel P. Berrangé The TCO watchdog implementation default behaviour from POV of the guest OS relies on the initial values for two I/O ports: * TCO1_CNT == 0x0 Since bit 11 (TCO Timer Halt) is clear, the watchdog state is considered to be initially running * GCS == 0x20

[PULL 01/41] hw/acpi: add trace events for TCO watchdog register access

2022-12-21 Thread Michael S. Tsirkin
From: Daniel P. Berrangé These tracepoints aid in understanding and debugging the guest drivers for the TCO watchdog. Reviewed-by: Richard W.M. Jones Signed-off-by: Daniel P. Berrangé Message-Id: <20221216125749.596075-2-berra...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Mich

[PULL 10/41] vdpa: add vdpa-dev-pci support

2022-12-21 Thread Michael S. Tsirkin
From: Longpeng Supports vdpa-dev-pci, we can use the device as follow: -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng Message-Id: <20221215134944.2809-4-longpe...@huawei.com> Reviewed-by: Michael S. Tsirki

[PULL 13/41] vhost: set SVQ device call handler at SVQ start

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez By the end of this series CVQ is shadowed as long as the features support it. Since we don't know at the beginning of qemu running if this is supported, move the event notifier handler setting to the start of the SVQ, instead of the start of qemu run. This will avoid to creat

[PATCH v6 0/3] Fix the virtio features negotiation flaw

2022-12-21 Thread huangy81
From: Hyman Huang(黄勇) v6: -rebase on master -fix the compling issue vhost_user_save_acked_features symbol only exists when "vhost-user" be configured. Add MACRO statement before calling vhost_user_save_acked_features. Thanks Michael for pointing out that issue in time. Please review, Yong

[PULL 31/41] acpi/tests/avocado/bits: add mformat as one of the dependencies

2022-12-21 Thread Michael S. Tsirkin
From: Ani Sinha mformat is needed by grub-mkrescue and hence, add this as one of the dependencies to run bits tests. This avoids errors such as the following: /var/tmp/acpi-bits-wju6tqoa.tmp/grub-inst-x86_64-efi/bin/grub-mkrescue: 360: mformat: not found Signed-off-by: Ani Sinha Message-Id: <

[PULL 05/41] pc: clean up compat machines

2022-12-21 Thread Michael S. Tsirkin
From: Cornelia Huck We can move setting default_cpu_version into the base machine options, and we need to unset alias and is_default only once. Suggested-by: Thomas Huth Signed-off-by: Cornelia Huck Message-Id: <20221212152145.124317-3-coh...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed

[PULL 19/41] vdpa: allocate SVQ array unconditionally

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez SVQ may run or not in a device depending on runtime conditions (for example, if the device can move CVQ to its own group or not). Allocate the SVQ array unconditionally at startup, since its hard to move this allocation elsewhere. Signed-off-by: Eugenio Pérez Acked-by: Jaso

[PULL 16/41] vdpa: add vhost_vdpa_net_valid_svq_features

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez It will be reused at vdpa device start so let's extract in its own function. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Message-Id: <20221215113144.322011-6-epere...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/vhost-vdpa.c

[PULL 12/41] vdpa: use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez This function used to trust in v->shadow_vqs != NULL to know if it must start svq or not. This is not going to be valid anymore, as qemu is going to allocate svq array unconditionally (but it will only start them conditionally). Signed-off-by: Eugenio Pérez Acked-by: Jason

[PULL 08/41] virtio: get class_id and pci device id by the virtio id

2022-12-21 Thread Michael S. Tsirkin
From: Longpeng Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Acked-by: Jason Wang Signed-off-by: Longpeng Message-Id: <20221215134944.2809-2-longpe...@hua

[PULL 41/41] contrib/vhost-user-blk: Replace lseek64 with lseek

2022-12-21 Thread Michael S. Tsirkin
From: Khem Raj 64bit off_t is already in use since build uses _FILE_OFFSET_BITS=64 already. Using lseek/off_t also makes it work with latest musl without using _LARGEFILE64_SOURCE macro. This macro is implied with _GNU_SOURCE when using glibc but not with musl. Signed-off-by: Khem Raj Cc: Micha

[PULL 18/41] vdpa: move SVQ vring features check to net/

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez The next patches will start control SVQ if possible. However, we don't know if that will be possible at qemu boot anymore. Since the moved checks will be already evaluated at net/ to know if it is ok to shadow CVQ, move them. Signed-off-by: Eugenio Pérez Acked-by: Jason Wan

[PULL 15/41] vhost: move iova_tree set to vhost_svq_start

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez Since we don't know if we will use SVQ at qemu initialization, let's allocate iova_tree only if needed. To do so, accept it at SVQ start, not at initialization. This will avoid to create it if the device does not support SVQ. Signed-off-by: Eugenio Pérez Acked-by: Jason Wan

[PULL 09/41] vdpa: add vdpa-dev support

2022-12-21 Thread Michael S. Tsirkin
From: Longpeng Supports vdpa-dev, we can use the deivce directly: -M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \ vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng Message-Id: <20221215134944.2809-3-longpe...

[PATCH v6 1/3] vhost-user: Refactor vhost acked features saving

2022-12-21 Thread huangy81
From: Hyman Huang(黄勇) Abstract vhost acked features saving into vhost_user_save_acked_features, export it as util function. Signed-off-by: Hyman Huang(黄勇) Signed-off-by: Guoyi Tu --- include/net/vhost-user.h | 1 + net/vhost-user.c | 21 +++-- 2 files changed, 16 inse

[PULL 20/41] vdpa: add asid parameter to vhost_vdpa_dma_map/unmap

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez So the caller can choose which ASID is destined. No need to update the batch functions as they will always be called from memory listener updates at the moment. Memory listener updates will always update ASID 0, as it's the passthrough ASID. All vhost devices's ASID are 0 at

[PULL 17/41] vdpa: request iova_range only once

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez Currently iova range is requested once per queue pair in the case of net. Reduce the number of ioctls asking it once at initialization and reusing that value for each vhost_vdpa. Signed-off-by: Eugenio Pérez Message-Id: <20221215113144.322011-7-epere...@redhat.com> Reviewed-

[PULL 04/41] hw: Add compat machines for 8.0

2022-12-21 Thread Michael S. Tsirkin
From: Cornelia Huck Add 8.0 machine types for arm/i440fx/m68k/q35/s390x/spapr. Reviewed-by: Cédric Le Goater [ppc] Reviewed-by: Thomas Huth [s390x] Reviewed-by: Greg Kurz [ppc] Signed-off-by: Cornelia Huck Message-Id: <20221212152145.124317-2-coh...@redhat.com> Reviewed-by: Michael S. Tsirki

[PULL 11/41] vdpa-dev: mark the device as unmigratable

2022-12-21 Thread Michael S. Tsirkin
From: Longpeng The generic vDPA device doesn't support migration currently, so mark it as unmigratable temporarily. Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Signed-off-by: Longpeng Message-Id: <20221215134944.2809-5-longpe...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off

[PULL 40/41] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-21 Thread Michael S. Tsirkin
From: Marcel Holtmann It seems there is no need to keep the inuse field signed and end up with compiler warnings for sign-compare. CC libvhost-user.o libvhost-user.c: In function ‘vu_queue_pop’: libvhost-user.c:2763:19: error: comparison of integer expressions of different signedness: ‘

[PATCH v6 3/3] vhost-user: Fix the virtio features negotiation flaw

2022-12-21 Thread huangy81
From: Hyman Huang(黄勇) This patch aims to fix unexpected negotiation features for vhost-user netdev interface. When openvswitch reconnect Qemu after an unexpected disconnection and Qemu therefore start the vhost_dev, acked_features field in vhost_dev is initialized with value fetched from acked_f

[PULL 38/41] hw/virtio: Extract config read/write accessors to virtio-config-io.c

2022-12-21 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé These config helpers use the target-dependent LD/ST API. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221213111707.34921-6-phi...@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-config-io.c | 204

[PULL 25/41] include/hw: attempt to document VirtIO feature variables

2022-12-21 Thread Michael S. Tsirkin
From: Alex Bennée We have a bunch of variables associated with the device and the vhost backend which are used inconsistently throughout the code base. Lets start trying to bring some order by agreeing what each variable is for. Signed-off-by: Alex Bennée Cc: Stefano Garzarella Cc: "Michael S.

[PATCH v3 09/10] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

2022-12-21 Thread Marcel Holtmann
It seems there is no need to keep the inuse field signed and end up with compiler warnings for sign-compare. CC libvduse.o libvduse.c: In function ‘vduse_queue_pop’: libvduse.c:789:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign

[PATCH v6 2/3] vhost-user: Refactor the chr_closed_bh

2022-12-21 Thread huangy81
From: Hyman Huang(黄勇) Use vhost_user_save_acked_features to implemente acked features saving. Signed-off-by: Hyman Huang(黄勇) Signed-off-by: Guoyi Tu --- net/vhost-user.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index f5cb095.

[PATCH v3 03/10] libvhost-user: Cast rc variable to avoid compiler warning

2022-12-21 Thread Marcel Holtmann
The assert from recvmsg() return value against an uint32_t size field from a protocol struct throws a compiler warning. CC libvhost-user.o In file included from libvhost-user.c:27: libvhost-user.c: In function ‘vu_message_read_default’: libvhost-user.c:363:19: error: comparison of integer

[PULL 27/41] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled

2022-12-21 Thread Michael S. Tsirkin
From: Jason Wang When vIOMMU is enabled, the vq->used_phys is actually the IOVA not GPA. So we need to translate it to GPA before the syncing otherwise we may hit the following crash since IOVA could be out of the scope of the GPA log size. This could be noted when using virtio-IOMMU with vhost u

[PULL 23/41] vdpa: always start CVQ in SVQ mode if possible

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez Isolate control virtqueue in its own group, allowing to intercept control commands but letting dataplane run totally passthrough to the guest. Signed-off-by: Eugenio Pérez Message-Id: <20221215113144.322011-13-epere...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-

[PULL 21/41] vdpa: store x-svq parameter in VhostVDPAState

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez CVQ can be shadowed two ways: - Device has x-svq=on parameter (current way) - The device can isolate CVQ in its own vq group QEMU needs to check for the second condition dynamically, because CVQ index is not known before the driver ack the features. Since this is dynamic, the

Re: [RFC v2 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-21 Thread Marcel Holtmann
Hi Yongji, >> CC libvduse.o >> libvduse.c: In function ‘vring_set_avail_event’: >> libvduse.c:603:7: error: dereferencing type-punned pointer will break >> strict-aliasing rules [-Werror=strict-aliasin] >> 603 | *((uint16_t *)&vq->vring.used->ring[vq->vring.num]) = >> htole16(val); >

[PATCH v3 06/10] libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant

2022-12-21 Thread Marcel Holtmann
The assignment of dev->postcopy_ufd can be moved into an else clause and then the code becomes C90 compliant. CC libvhost-user.o libvhost-user.c: In function ‘vu_set_postcopy_advise’: libvhost-user.c:1625:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-sta

[PULL 22/41] vdpa: add shadow_data to vhost_vdpa

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez The memory listener that thells the device how to convert GPA to qemu's va is registered against CVQ vhost_vdpa. memory listener translations are always ASID 0, CVQ ones are ASID 1 if supported. Let's tell the listener if it needs to register them on iova tree or not. Signed

[PATCH v3 05/10] libvhost-user: Declare uffdio_register early to make it C90 compliant

2022-12-21 Thread Marcel Holtmann
When using libvhost-user source in an external project that wants to comply with the C90 standard, it is best to declare variables before code. CC libvhost-user.o libvhost-user.c: In function ‘generate_faults’: libvhost-user.c:683:9: error: ISO C90 forbids mixed declarations and code [-We

[PULL 24/41] vhost-user: send set log base message only once

2022-12-21 Thread Michael S. Tsirkin
From: Yajun Wu Vhost message VHOST_USER_SET_LOG_BASE is device wide. So only send it once with the first queue pair. Signed-off-by: Yajun Wu Acked-by: Parav Pandit Message-Id: <20221122051447.248462-1-yaj...@nvidia.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- h

[PULL 26/41] acpi/tests/avocado/bits: add SPDX license identifiers for bios bits tests

2022-12-21 Thread Michael S. Tsirkin
From: Ani Sinha Added the SPDX license identifiers for biosbits tests. Also added a comment on each of the test scripts to indicate that they run from within the biosbits environment and hence are not subjected to the regular maintenance activities for QEMU and is excluded from the dependency man

[PATCH v3 02/10] libvhost-user: Replace typeof with __typeof__

2022-12-21 Thread Marcel Holtmann
Strictly speaking only -std=gnu99 support the usage of typeof and for easier inclusion in external projects, it is better to use __typeof__. CC libvhost-user.o libvhost-user.c: In function ‘vu_log_queue_fill’: libvhost-user.c:86:13: error: implicit declaration of function ‘typeof’ [-Werro

[PATCH v3 00/10] Compiler warning fixes for libvhost-user,libvduse

2022-12-21 Thread Marcel Holtmann
The libvhost-user and libvduse libraries are also useful for external usage outside of QEMU and thus it would be nice if their files could be just copied and used. However due to different compiler settings, a lot of manual fixups are needed. This is the first attempt at some obvious fixes that can

[PATCH v3 01/10] libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-21 Thread Marcel Holtmann
Then the libvhost-user sources are used by another project, it can not be guaranteed that _GNU_SOURCE is set by the build system. If it is for example not set, errors like this show up. CC libvhost-user.o libvhost-user.c: In function ‘vu_panic’: libvhost-user.c:195:9: error: implicit decla

[PULL 30/41] docs/acpi/bits: document BITS_DEBUG environment variable

2022-12-21 Thread Michael S. Tsirkin
From: Ani Sinha Debug specific actions can be enabled in bios bits acpi tests by passing BITS_DEBUG in the environment variable while running the test. Document that. CC: qemu-triv...@nongnu.org Signed-off-by: Ani Sinha Message-Id: <20221203132346.34479-1-...@anisinha.ca> Reviewed-by: Michael S

[PATCH v3 04/10] libvhost-user: Use unsigned int i for some for-loop iterations

2022-12-21 Thread Marcel Holtmann
The sign-compare warning also hits some of the for-loops, but it easy fixed by just making the iterator variable unsigned int. CC libvhost-user.o libvhost-user.c: In function ‘vu_gpa_to_va’: libvhost-user.c:223:19: error: comparison of integer expressions of different signedness: ‘int’ an

[PULL 14/41] vhost: allocate SVQ device file descriptors at device start

2022-12-21 Thread Michael S. Tsirkin
From: Eugenio Pérez The next patches will start control SVQ if possible. However, we don't know if that will be possible at qemu boot anymore. Delay device file descriptors until we know it at device start. This will avoid to create them if the device does not support SVQ. Signed-off-by: Eugeni

[PULL 35/41] hw/virtio: Rename virtio_ss[] -> specific_virtio_ss[]

2022-12-21 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé Since virtio_ss[] is added to specific_ss[], rename it as specific_virtio_ss[] to make it clearer. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221213111707.34921-3-phi...@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- h

Re: [PATCH-for-8.0 4/4] hw/ppc/spapr_ovec: Avoid target_ulong spapr_ovec_parse_vector()

2022-12-21 Thread Daniel Henrique Barboza
On 12/21/22 06:46, Cédric Le Goater wrote: On 12/16/22 17:47, Daniel Henrique Barboza wrote: On 12/13/22 09:35, Philippe Mathieu-Daudé wrote: spapr_ovec.c is a device, but it uses target_ulong which is target specific. The hwaddr type (declared in "exec/hwaddr.h") better fits hardware addr

  1   2   3   4   >