[PATCH 36/84] tcg: Split out tcg/debug-assert.h

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/tcg/debug-assert.h | 17 + include/tcg/tcg.h | 9 + 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 include/tcg/debug-assert.h diff --git a/include/tcg/debug-assert.h b/include/tcg/debug-assert.h

[PATCH 77/84] plugins: Move plugin_insn_append to translator.c

2023-05-03 Thread Richard Henderson
This function is only used in translator.c, and uses a target-specific typedef, abi_ptr. Signed-off-by: Richard Henderson --- include/exec/plugin-gen.h | 22 -- accel/tcg/translator.c| 21 + 2 files changed, 21 insertions(+), 22 deletions(-) diff --gi

[PATCH 31/84] tcg: Add page_bits and page_mask to TCGContext

2023-05-03 Thread Richard Henderson
Disconnect guest page size from TCG compilation. While this could be done via exec/target_page.h, we want to cache the value across multiple memory access operations, so we might as well initialize this early. The changes within tcg/ are entirely mechanical: sed -i s/TARGET_PAGE_BITS/s->page_

[PATCH v4 51/57] tcg/sparc64: Use atom_and_align_for_opc

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc64/tcg-target.c.inc | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tcg/sparc64/tcg-target.c.inc b/tcg/sparc64/tcg-target.c.inc index bb23038529..4f9ec02b1f 100644 --- a/tcg/sparc64/tcg-target.c.inc +++ b/tcg/sparc64/tcg-targ

[PATCH v4 36/57] tcg/loongarch64: Assert the host supports unaligned accesses

2023-05-03 Thread Richard Henderson
This should be true of all server class loongarch64. Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index e651ec5c71..ccc13ffdb4 100644 --- a/tcg/l

Re: [PULL v3 0/10] xenpvh3-tag

2023-05-03 Thread Richard Henderson
On 5/3/23 01:12, Stefano Stabellini wrote: Hi Peter, Vikram fixed the gitlab test problem, so now all the tests should succeed. There were no changes to the QEMU code. I am resending the pull request (I rebased it on staging, no conflicts.) For reference this was the previous pull request: http

[PATCH 81/84] tcg: Split out exec/user/guest-base.h

2023-05-03 Thread Richard Henderson
TCG will need this declaration, without all of the other bits that come with cpu-all.h. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 5 + include/exec/user/guest-base.h | 12 tcg/tcg.c | 3 +++ 3 files changed, 16 insertions(+), 4

[PATCH 46/84] target/hexagon: Include helper-gen.h where needed

2023-05-03 Thread Richard Henderson
This had been included via tcg-op-common.h via tcg-op.h, but that is going away. In idef-parser.y, shuffle some tcg related includes into a more logical order. Signed-off-by: Richard Henderson --- target/hexagon/genptr.c | 1 + target/hexagon/translate.c | 1 + ta

[PATCH 02/84] tcg: Widen gen_insn_data to uint64_t

2023-05-03 Thread Richard Henderson
We already pass uint64_t to restore_state_to_opc; this changes all of the other uses from insn_start through the encoding to decoding. Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 39 +-- include/tcg/tcg-opc.h | 2 +- include/tcg/tcg.h

[PATCH 78/84] plugins: Drop unused headers from exec/plugin-gen.h

2023-05-03 Thread Richard Henderson
Two headers are not required for the rest of the contents of plugin-gen.h. Signed-off-by: Richard Henderson --- include/exec/plugin-gen.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/plugin-gen.h b/include/exec/plugin-gen.h index e9a976f815..52828781bc 100644 --- a/include/e

[PATCH 82/84] disas: Remove target-specific headers

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/disas/disas.h | 6 -- disas/disas.c | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/disas/disas.h b/include/disas/disas.h index 6c394e0b09..176775eff7 100644 --- a/include/disas/disas.h +++ b/include/disas/di

Re: [PATCH v20 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-05-03 Thread Pierre Morel
On 5/2/23 14:30, Cédric Le Goater wrote: On 4/25/23 18:14, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. [...] + +/** + * s390_topology_init: + * @ms: the machine state where the machine topology is defined + * + *

[PULL v2 03/12] qemu/bitops.h: Limit rotate amounts

2023-05-03 Thread Richard Henderson
From: Dickon Hood Rotates have been fixed up to only allow for reasonable rotate amounts (ie, no rotates >7 on an 8b value etc.) This fixes a problem with riscv vector rotate instructions. Signed-off-by: Dickon Hood Reviewed-by: Richard Henderson Message-Id: <20230428144757.57530-9-lawrence.h

[PATCH 72/84] accel/tcg: Tidy includes for translator.[ch]

2023-05-03 Thread Richard Henderson
Reduce the header to only bswap.h and cpu_ldst.h. Move exec/translate-all.h to translator.c. Reduce tcg.h and tcg-op.h to tcg-op-common.h. Remove otherwise unused headers. Signed-off-by: Richard Henderson --- include/exec/translator.h | 6 +- accel/tcg/translator.c| 8 +++- 2 files c

[PATCH 01/84] tcg: Split out memory ops to tcg-op-ldst.c

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg-op-ldst.c | 1017 + tcg/tcg-op.c | 985 --- tcg/meson.build |1 + 3 files changed, 1018 insertions(+), 985 deletions(-) create mode 100644 tcg/tcg-op-ldst.

[PATCH 76/84] tcg: Remove target-specific headers from tcg.[ch]

2023-05-03 Thread Richard Henderson
This finally paves the way for tcg/ to be built once per mode. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 - accel/tcg/plugin-gen.c | 1 + tcg/region.c | 2 +- tcg/tcg-op.c | 2 +- tcg/tcg.c | 2 +- 5 files changed, 4 insertions(+), 4 deletio

[PATCH 30/84] tcg: Move TCG_TYPE_TL from tcg.h to tcg-op.h

2023-05-03 Thread Richard Henderson
Removes the only use of TARGET_LONG_BITS from tcg.h, which is to be target independent. Move the symbol to a define in tcg-op.h, which will continue to be target dependent. Rather than complicate matters for the use in tb_gen_code(), expand the definition there. Signed-off-by: Richard Henderson

[PATCH 26/84] tcg/riscv: Remove TARGET_LONG_BITS, TCG_TYPE_TL

2023-05-03 Thread Richard Henderson
All uses replaced with TCGContext.addr_type. Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.c.inc | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index 16e35ea6a6..fdc1faab1b 100644 --- a/tcg/riscv

[PATCH 84/84] tcg: Build once for system and once for user-only

2023-05-03 Thread Richard Henderson
Create two static libraries for use by each execution mode. Signed-off-by: Richard Henderson --- tcg/meson.build | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tcg/meson.build b/tcg/meson.build index f56c465f4d..bbac401fbf 100644 --- a/tcg/mes

RE: [PATCH v3 1/2] igb: RX descriptors handling cleanup

2023-05-03 Thread Sriram Yagnaraman
> -Original Message- > From: Tomasz Dzieciol/VIM Integration (NC) /SRPOL/Engineer/Samsung > Electronics > Sent: Tuesday, 2 May 2023 16:01 > To: Sriram Yagnaraman ; qemu- > de...@nongnu.org; akihiko.od...@daynix.com > Cc: jasow...@redhat.com; k.kwiec...@samsung.com; > m.socha...@samsung.c

[PATCH 83/84] exec/poison: Do not poison CONFIG_SOFTMMU

2023-05-03 Thread Richard Henderson
If CONFIG_USER_ONLY is ok generically, so is CONFIG_SOFTMMU, because they are exactly opposite. Signed-off-by: Richard Henderson --- include/exec/poison.h | 1 - scripts/make-config-poison.sh | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/exec/poison.h

Re: [PATCH v4 03/20] virtio-scsi: avoid race between unplug and transport event

2023-05-03 Thread Kevin Wolf
Am 02.05.2023 um 20:56 hat Stefan Hajnoczi geschrieben: > On Tue, May 02, 2023 at 05:19:46PM +0200, Kevin Wolf wrote: > > Am 25.04.2023 um 19:26 hat Stefan Hajnoczi geschrieben: > > > Only report a transport reset event to the guest after the SCSIDevice > > > has been unrealized by qdev_simple_devi

Re: [PATCH v4 07/20] block/export: stop using is_external in vhost-user-blk server

2023-05-03 Thread Kevin Wolf
Am 02.05.2023 um 22:06 hat Stefan Hajnoczi geschrieben: > On Tue, May 02, 2023 at 06:04:24PM +0200, Kevin Wolf wrote: > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > > > vhost-user activity must be suspended during bdrv_drained_begin/end(). > > > This prevents new requests from interf

Re: [PATCH v11 01/14] accel/tcg: introduce TBStatistics structure

2023-05-03 Thread Richard Henderson
On 4/21/23 14:24, Fei Wu wrote: From: "Vanderson M. do Rosario" To store statistics for each TB, we created a TBStatistics structure which is linked with the TBs. TBStatistics can stay alive after tb_flush and be relinked to a regenerated TB. So the statistics can be accumulated even through fl

Re: [PATCH 6/9] target/s390x: Finish conversion to tcg_gen_qemu_{ld,st}_*

2023-05-03 Thread David Hildenbrand
On 02.05.23 15:57, Richard Henderson wrote: Convert away from the old interface with the implicit MemOp argument. Signed-off-by: Richard Henderson --- Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 9/9] tcg: Remove compatability helpers for qemu ld/st

2023-05-03 Thread David Hildenbrand
On 02.05.23 17:39, Taylor Simpson wrote: -Original Message- From: Richard Henderson Sent: Tuesday, May 2, 2023 8:58 AM To: qemu-devel@nongnu.org Cc: mrol...@gmail.com; edgar.igles...@gmail.com; Taylor Simpson ; a...@rev.ng; a...@rev.ng; laur...@vivier.eu; phi...@linaro.org; jiaxun.y..

[PATCH 4/4] libvhost-user: add write_msg cb to dev struct

2023-05-03 Thread Albert Esteve
Add vu_write_msg_cb type as a member of the VuDev struct. In order to interact with the virtio-dmabuf API, vhost-user backends have available a special message type that can be sent to the frontend in Qemu, in order to add, lookup, or remove entries. To send these messages and avoid code replicat

[PATCH 2/4] vhost-user: add shared_object msg

2023-05-03 Thread Albert Esteve
Add new vhost-user protocol message `VHOST_USER_BACKEND_SHARED_OBJECT`. This new message is sent from vhost-user back-ends to interact with the virtio-dmabuf table in order to add, remove, or lookup for virtio dma-buf shared objects. The action taken in the front-end depends on the type stored in

[PATCH 3/4] vhost-user: refactor send_resp code

2023-05-03 Thread Albert Esteve
Refactor code to send response message so that all common parts both for the common REPLY_ACK case, and other data responses, can call it and avoid code repetition. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c | 52 +++--- 1 file changed, 24 inserti

[PATCH 1/4] virtio-dmabuf: introduce virtio-dmabuf

2023-05-03 Thread Albert Esteve
This API manages objects (in this iteration, dmabuf fds) that can be shared along different virtio devices. The API allows the different devices to add, remove and/or retrieve the objects by simply invoking the public functions that reside in the virtio-dmabuf file. Signed-off-by: Albert Esteve

[PATCH 0/4] Virtio shared dma-buf

2023-05-03 Thread Albert Esteve
This patch covers the required steps to add support for virtio cross-device resource sharing[1], which support is already available in the kernel. The main usecase will be sharing dma buffers from virtio-gpu devices (as the exporter -see VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID in [2]), to virtio-vid

Re: [PATCH 0/5] eBPF RSS through QMP support.

2023-05-03 Thread Daniel P . Berrangé
On Mon, May 01, 2023 at 10:20:56AM +0300, Andrew Melnychenko wrote: > This series of patches provides the ability to retrieve eBPF program > through qmp, so management application may load bpf blob with proper > capabilities. > Now, virtio-net devices can accept eBPF programs and maps through prop

Re: [PATCH v11 02/14] accel: collecting TB execution count

2023-05-03 Thread Richard Henderson
On 4/21/23 14:24, Fei Wu wrote: From: "Vanderson M. do Rosario" If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS enabled, then we instrument the start code of this TB to atomically count the number of times it is executed. We count both the number of "normal" executions and atomic execut

Re: [PATCH v20 03/21] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-05-03 Thread Pierre Morel
On 5/2/23 19:22, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- MAINTAINERS

[PATCH 06/11] tcg/riscv: Support rotates from Zbb

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 4 ++-- tcg/riscv/tcg-target.c.inc | 34 ++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/tcg/riscv/tcg-target.h b/tcg/riscv/tcg-target.h index 9f58d46208..317d385924 100644 --- a/

[PATCH 01/11] disas/riscv: Decode czero.{eqz,nez}

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- disas/riscv.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/disas/riscv.c b/disas/riscv.c index d6b0fbe5e8..c0a8b1006a 100644 --- a/disas/riscv.c +++ b/disas/riscv.c @@ -935,6 +935,8 @@ typedef enum { rv_op_vsetvli = 766,

[PATCH 03/11] tcg/riscv: Support ANDN, ORN, XNOR from Zbb

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-set.h | 1 + tcg/riscv/tcg-target-con-str.h | 1 + tcg/riscv/tcg-target.h | 12 +- tcg/riscv/tcg-target.c.inc | 41 ++ 4 files changed, 49 insertions(+), 6 deletions(-) diff --git

[PATCH 00/11] tcg/riscv: Support for Zba, Zbb, Zicond extensions

2023-05-03 Thread Richard Henderson
Based-on: 20230503070656.1746170-1-richard.hender...@linaro.org ("[PATCH v4 00/57] tcg: Improve atomicity support") I've been vaguely following the __hw_probe syscall progress in the upstream kernel. The initial version only handled bog standard F+D and C extensions, which everything expects to b

[PATCH 08/11] tcg/riscv: Support CPOP from Zbb

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 4 ++-- tcg/riscv/tcg-target.c.inc | 9 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tcg/riscv/tcg-target.h b/tcg/riscv/tcg-target.h index 8e327afc3a..e0b23006c4 100644 --- a/tcg/riscv/tcg-target.h +++

[PATCH 11/11] tcg/riscv: Support CTZ, CLZ from Zbb

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-set.h | 1 + tcg/riscv/tcg-target.h | 8 tcg/riscv/tcg-target.c.inc | 35 ++ 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/tcg/riscv/tcg-target-con-set.h b/tcg/ri

[PATCH 05/11] tcg/riscv: Use ADD.UW for guest address generation

2023-05-03 Thread Richard Henderson
The instruction is a combined zero-extend and add. Use it for exactly that. Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.c.inc | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.

[PATCH 09/11] tcg/riscv: Improve setcond expansion

2023-05-03 Thread Richard Henderson
Split out a helper function, tcg_out_setcond_int, which does not always produce the complete boolean result, but returns a set of flags to do so. Based on 21af16198425, the same improvement for loongarch64. Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.c.inc | 164 ++

[PATCH 10/11] tcg/riscv: Implement movcond

2023-05-03 Thread Richard Henderson
Implement with and without Zicond. Without Zicond, we were letting the middle-end expand to a 5 insn sequence; better to use a branch over a single insn. Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-set.h | 1 + tcg/riscv/tcg-target.h | 4 +- tcg/riscv/tcg-target.c.

[PATCH 04/11] tcg/riscv: Support ADD.UW, SEXT.B, SEXT.H, ZEXT.H from Zba+Zbb

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.c.inc | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index c5b060023f..53a7f97b29 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/

[PATCH 02/11] tcg/riscv: Probe for Zba, Zbb, Zicond extensions

2023-05-03 Thread Richard Henderson
Define a useful subset of the extensions. Probe for them via compiler pre-processor feature macros and SIGILL. Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 6 +++ tcg/riscv/tcg-target.c.inc | 96 ++ 2 files changed, 102 insertions(+) di

[PATCH 07/11] tcg/riscv: Support REV8 from Zbb

2023-05-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 10 +- tcg/riscv/tcg-target.c.inc | 29 + 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/tcg/riscv/tcg-target.h b/tcg/riscv/tcg-target.h index 317d385924..8e327afc3a 100644 --- a

Re: [PATCH 2/3] target/openrisc: Set PC to cpu state on FPU exception

2023-05-03 Thread Stafford Horne
On Wed, May 03, 2023 at 08:36:13AM +0100, Richard Henderson wrote: > On 5/2/23 19:57, Stafford Horne wrote: > > @@ -55,6 +56,9 @@ void HELPER(update_fpcsr)(CPUOpenRISCState *env) > > if (tmp) { > > env->fpcsr |= tmp; > > if (env->fpcsr & FPCSR_FPEE) { > > +

Re: [PATCH v20 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-05-03 Thread Thomas Huth
On 28/04/2023 14.35, Pierre Morel wrote: On 4/27/23 15:38, Thomas Huth wrote: On 25/04/2023 18.14, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawe

[PATCH 06/22] hw/arm: Select VIRTIO_BLK for virt machine

2023-05-03 Thread Alex Bennée
From: Fabiano Rosas The virt machine has IF_VIRTIO as block_default_type, which causes the generic code to try to create a virtio-blk-pci device pair at configure_blockdev()/qemu_create_cli_devices(). Select VIRTIO_BLK and VIRTIO_PCI from CONFIG_ARM_VIRT to avoid errors when PCI_DEVICES=n (due t

[PATCH 00/22] testing/next: cirrus, docker, docs, ci, configs, gitlab

2023-05-03 Thread Alex Bennée
This started as trying to un-wedge the FreeBSD 13 failure by running a restricted build but then led down a rabbit hole of getting the --without-default-devices build to pass. Fabiano had already been down some of this road with ARM so I've nabbed his patches here but feel free to cherry-pick into

[PATCH 09/22] hw/arm: Select e1000e for sbsa-ref machine

2023-05-03 Thread Alex Bennée
From: Fabiano Rosas This machine explicitly selects the e1000e network adapter if no other option was given in the command line. Make sure e1000e is present in the build. Signed-off-by: Fabiano Rosas Signed-off-by: Alex Bennée Message-Id: <20230208192654.8854-10-faro...@suse.de> --- hw/arm/Kc

[PATCH 11/22] hw/alpha: make E1000_PCI a hard dependency for clipper

2023-05-03 Thread Alex Bennée
We can't just imply it as the board will fail to create otherwise. This shows up as a "make check" failure with a --without-default-devices build. Signed-off-by: Alex Bennée --- hw/alpha/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/alpha/Kconfig b/hw/alpha/Kconf

[PATCH 07/22] hw/arm: Select XLNX_USB_SUBSYS for xlnx-zcu102 machine

2023-05-03 Thread Alex Bennée
From: Fabiano Rosas This machine hardcodes initialization of the USB device, so select the corresponding Kconfig. It is not enough to have it as "default y if XLNX_VERSAL" at usb/Kconfig because building --without-default-devices disables the default selection resulting in: $ ./qemu-system-aarch

[PATCH 08/22] hw/arm: Select GICV3_TCG for sbsa-ref machine

2023-05-03 Thread Alex Bennée
From: Fabiano Rosas This machine hardcodes the creation of the interrupt controller, so make sure the dependency is explicitly described in the Kconfig. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Maydell Signed-off-by: Alex Bennée Message-Id: <20230208192654.8854-9-faro...@suse.de> ---

[PATCH 02/22] tests/docker: bump the xtensa base to debian:11-slim

2023-05-03 Thread Alex Bennée
Stretch is going out of support so things like security updates will fail. As the toolchain itself is binary it hopefully won't mind the underlying OS being updated. Signed-off-by: Alex Bennée Reported-by: Richard Henderson --- tests/docker/dockerfiles/debian-xtensa-cross.docker | 2 +- 1 file

[PATCH 04/22] scripts/ci: add gitlab-runner to kvm group

2023-05-03 Thread Alex Bennée
One of the main reasons to have custom runners it so we can run KVM tests. Enable the "kvm" additional group so we can access the feature on the kernel. Signed-off-by: Alex Bennée Reported-by: Peter Maydell --- scripts/ci/setup/gitlab-runner.yml | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 19/22] gitlab: add ubuntu-22.04-aarch64-without-defaults

2023-05-03 Thread Alex Bennée
This does a very minimal build without default devices or features. I chose the aarch64 runner as it doesn't count towards CI minutes and is a fairly under-utilised builder. Signed-off-by: Alex Bennée --- .../custom-runners/ubuntu-22.04-aarch64.yml | 22 +++ 1 file changed, 22

[RFC 3/7] virtio : add a ptr for vdpa_iommufd in VirtIODevice

2023-05-03 Thread Cindy Lu
To support iommufd, vdpa needs to save the ioas_id and the ASID, which need to be shared between all vhost_vdpa devices. So Add a pointer in VirtIODevice. vdpa device need to init it when the dev start, Add all the vdpa device will read/write this same ptr. TODO: need to add a lock for read and wr

[PATCH 15/22] hw/sh4: make RTL8139 a hard dependency for RD2

2023-05-03 Thread Alex Bennée
We can't just imply it as the board will fail to create otherwise. This shows up as a "make check" failure with a --without-default-devices build. Signed-off-by: Alex Bennée --- hw/sh4/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sh4/Kconfig b/hw/sh4/Kconfig ind

[RFC 0/7] vhost-vdpa: add support for iommufd

2023-05-03 Thread Cindy Lu
Hi All There is the RFC to support the IOMMUFD in vdpa device any comments are welcome Thanks Cindy Cindy Lu (7): vhost: introduce new UAPI to support IOMMUFD qapi: support iommufd in vdpa virtio : add a ptr for vdpa_iommufd in VirtIODevice net/vhost-vdpa: Add the check for iommufd vhost

Re: [PATCH 3/3] target/openrisc: Setup FPU for detecting tininess before rounding

2023-05-03 Thread Stafford Horne
On Wed, May 03, 2023 at 08:37:31AM +0100, Richard Henderson wrote: > On 5/2/23 19:57, Stafford Horne wrote: > > OpenRISC defines tininess to be detected before rounding. Setup qemu to > > obey this. > > > > Signed-off-by: Stafford Horne > > --- > > target/openrisc/cpu.c | 5 + > > 1 file

[PATCH 05/22] hw/arm: Select VIRTIO_NET for virt machine

2023-05-03 Thread Alex Bennée
From: Fabiano Rosas The 'virt' machine uses virtio-net-pci as a fallback when no other network driver has been selected via command line. Select VIRTIO_NET and VIRTIO_PCI from CONFIG_ARM_VIRT to avoid errors when PCI_DEVICES=n (due to e.g. --without-default-devices): $ ./qemu-system-aarch64 -M v

[PATCH 12/22] hw/hppa: add TULIP as a dependency for HPPA_B160L

2023-05-03 Thread Alex Bennée
These are needed for board creation so fail under "make check" with a --without-default-devices build. Signed-off-by: Alex Bennée --- hw/hppa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/hppa/Kconfig b/hw/hppa/Kconfig index 5dd8b5b21e..f405663839 100644 --- a/hw/hppa/Kconfig ++

[PATCH 01/22] gitlab/cirrus: reduce scope of the FreeBSD testing matrix

2023-05-03 Thread Alex Bennée
While the Cirrus build machines are quite beefy it looks like we are still hitting timeouts. Lets reduce the testing matrix like we do for the other BSDs to see if this brings us under the line. This is however a pretty restricted set and I'm sure there are stalls happening on FreeBSD which should

[RFC 6/7] vhost-vdpa: init iommufd function in vhost_vdpa start

2023-05-03 Thread Cindy Lu
Add support for iommufd, init the vdpa_iommufd in vdpa_start in this step, driver will bind to the iommufd device and attach the default ASID(asid 0) to iommufd Signed-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/hw/virtio/vh

[PATCH 17/22] hw/xtensa: add VIRTIO as dependencies for XTENSA_VIRT

2023-05-03 Thread Alex Bennée
These are needed for board creation so fail under "make check" with a --without-default-devices build. Signed-off-by: Alex Bennée --- hw/xtensa/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xtensa/Kconfig b/hw/xtensa/Kconfig index 0740657ea5..a54a9d395e 100644 --- a/hw/xtensa/

[PATCH 18/22] scripts/ci: clean-up the 20.04/22.04 confusion in ansible

2023-05-03 Thread Alex Bennée
We have a bunch of references to 20.04 (which s390x is still on) although we are basically building on 22.04 now. Clean up the textual references and use lcitool to generate the full package list to be consistent. We can drop "Install packages to build QEMU on Ubuntu on non-s390x" as when we upgra

[RFC 1/7] vhost: introduce new UAPI to support IOMMUFD

2023-05-03 Thread Cindy Lu
Add 3 new UAPI VHOST_VDPA_SET_IOMMU_FD: this to bind the vdpa device to iommufd VDPA_DEVICE_ATTACH_IOMMUFD_AS: attach new ioas to iommufd VDPA_DEVICE_DTTACH_IOMMUFD_AS: detach all the ioas from iommufd Signed-off-by: Cindy Lu --- linux-headers/linux/vhost.h | 72 +

[RFC 4/7] net/vhost-vdpa: Add the check for iommufd

2023-05-03 Thread Cindy Lu
Add the check for object iommufd, if the iommfd enabled. pass the information to vhost_vdpa. vhost_vdpa dev start will check this bool and connect to the iommufd Signed-off-by: Cindy Lu --- net/vhost-vdpa.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-)

Re: [PATCH v4 08/10] migration: process_incoming_migration_co(): move colo part to colo

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 02.05.23 23:54, Peter Xu wrote: On Fri, Apr 28, 2023 at 10:49:26PM +0300, Vladimir Sementsov-Ogievskiy wrote: +int coroutine_fn colo_incoming_co(void) +{ +MigrationIncomingState *mis = migration_incoming_get_current(); +Error *local_err = NULL; +QemuThread th; + +assert(!qemu_

[PATCH 13/22] hw/sparc: add a TCX dependency for SUN4M machines

2023-05-03 Thread Alex Bennée
This is the fallback VGA devices needed for board creation so will otherwise fail under "make check" with a --without-default-devices build. Signed-off-by: Alex Bennée --- hw/sparc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/sparc/Kconfig b/hw/sparc/Kconfig index 79d58beb7a..7

[RFC 7/7] vhost-vdpa-iommufd: Add iommufd support for vdpa

2023-05-03 Thread Cindy Lu
This file is support iommufd for vdpa, including the function: 1> iommufd bind/unbind the iommufd device  bind the vdpa device to iommufd and attach the ASID 0 to iommufd 2> iommufd map/unmap function.The map function working process is    a. Check if the asid was used before.    b. If this is

[RFC 2/7] qapi: support iommufd in vdpa

2023-05-03 Thread Cindy Lu
Add a new option for iommufd, The usage is -object iommufd,id=iommufd0 \ -device virtio-net-pci,netdev=vhost-vdpa1,disable-legacy=on,disable-modern=off\ -netdev type=vhost-vdpa,vhostdev=/dev/vhost-vdpa-0,id=vhost-vdpa1,iommufd=iommufd0\ ... Signed-off-by: Cindy Lu --- qapi/net.json | 1 +

Re: [PATCH] block/blkio: add 'fd' option to virtio-blk-vhost-vdpa driver

2023-05-03 Thread Stefano Garzarella
On Tue, May 02, 2023 at 03:02:32PM -0400, Stefan Hajnoczi wrote: On Tue, May 02, 2023 at 04:50:50PM +0200, Stefano Garzarella wrote: The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the new 'fd' property. Let's expose this to the user, so the management layer can pass the file descrip

[PATCH 14/22] hw/loongarch: add VIRTIO as a dependency for LOONGARCH_VIRT

2023-05-03 Thread Alex Bennée
These are needed for board creation so fail under "make check" with a --without-default-devices build. Signed-off-by: Alex Bennée --- hw/loongarch/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig index eb112af990..74d8449100 100644 --- a/h

[PATCH 03/22] docs: document breakpoint and watchpoint support

2023-05-03 Thread Alex Bennée
This varies by accelerator. Also mention the modern bear trap that is ASLR. Signed-off-by: Alex Bennée --- docs/system/gdb.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/docs/system/gdb.rst b/docs/system/gdb.rst index 453eb73f6c..7d3718deef 100644 --- a/docs/syst

[RFC 5/7] vhost-vdpa: Add the iommufd support in the map/unmap function

2023-05-03 Thread Cindy Lu
1.Change the map/umap function to legacy_map/unmap 2. Add the check for iommufd support,    a>If support iommufd, call the iommufd-related function   b>In order to use kernel's iotlb process. Still need to call     the legacy mode iotlb message, Kernel will check and      skip the legacy iotlb m

[PATCH 10/22] hw/arm: Select VGA_PCI for sbsa-ref machine

2023-05-03 Thread Alex Bennée
From: Fabiano Rosas The sbsa-ref machine explicitly creates a VGA PCI device, so make sure vga-pci.c is included in the build. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Maydell Signed-off-by: Alex Bennée Message-Id: <20230208192654.8854-11-faro...@suse.de> --- hw/arm/Kconfig | 1 + 1 f

Re: [PULL 00/21] Migration 20230428 patches

2023-05-03 Thread Juan Quintela
Peter Maydell wrote: > On Tue, 2 May 2023 at 11:39, Juan Quintela wrote: >> Richard, once that we are here, one of the problem that we are having is >> that the test is exiting with an abort, so we have no clue what is >> happening. Is there a way to get a backtrace, or at least the number > > T

[PATCH v2 02/10] trace-events: remove the remaining vcpu trace events

2023-05-03 Thread Alex Bennée
While these are all in helper functions being designated vcpu events complicates the removal of the dynamic vcpu state code. TCG plugins allow you to instrument vcpu_[init|exit|idle]. We rename cpu_reset and make it a normal watch point. Message-Id: <20230420150009.1675181-3-alex.ben...@linaro.or

[PATCH v2 04/10] scripts/qapi: document the tool that generated the file

2023-05-03 Thread Alex Bennée
This makes it a little easier for developers to find where things where being generated. Signed-off-by: Alex Bennée --- scripts/qapi/gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index 8f8f784f4a..e724507e1a 100644 --- a/

[PATCH v2 00/10] tracing: remove dynamic vcpu state

2023-05-03 Thread Alex Bennée
Hi Stefan, The references dynamic vcpu tracing support was removed when the original TCG trace points where removed. However there was still a legacy of dynamic trace state to track this in cpu.h and extra hash variables to track TBs. While the removed vcpu tracepoints are not in generated code (o

[PATCH v2 01/10] *-user: remove the guest_user_syscall tracepoints

2023-05-03 Thread Alex Bennée
This is pure duplication now. Both bsd-user and linux-user have builtin strace support and we can also track syscalls via the plugins system. Message-Id: <20230420150009.1675181-2-alex.ben...@linaro.org> Reviewed-by: Warner Losh Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Bennée --- inclu

[PATCH v2 06/10] trace: remove code that depends on setting vcpu

2023-05-03 Thread Alex Bennée
Now we no longer have any events that are for vcpus we can start excising the code from the trace control. As the vcpu parameter is encoded as part of QMP we just stub out the has_vcpu/vcpu parameters rather than alter the API. Message-Id: <20230420150009.1675181-7-alex.ben...@linaro.org> Reviewed

[PATCH v2 09/10] hw/9pfs: use qemu_xxhash4

2023-05-03 Thread Alex Bennée
No need to pass zeros as we have helpers that do that for us. Message-Id: <20230420150009.1675181-10-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Christian Schoenebeck Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Bennée --- hw/9pfs/9p.c | 4 ++-- 1 file changed

[PATCH v2 03/10] trace: remove vcpu_id from the TraceEvent structure

2023-05-03 Thread Alex Bennée
This does involve temporarily stubbing out some helper functions before we excise the rest of the code. Message-Id: <20230420150009.1675181-4-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Bennée --- trace/control-internal.h |

[PATCH v2 08/10] tcg: remove the final vestiges of dstate

2023-05-03 Thread Alex Bennée
Now we no longer have dynamic state affecting things we can remove the additional fields in cpu.h and simplify the TB hash calculation. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1358 Message-Id: <20230420150009.1675181-9-alex.ben...@linaro.org> Reviewed-by: Stefan Hajnoczi Signed-of

[PATCH v2 05/10] qapi: make the vcpu parameters deprecated for 8.1

2023-05-03 Thread Alex Bennée
I don't think I can remove the parameters directly but certainly mark them as deprecated. Message-Id: <20230420150009.1675181-6-alex.ben...@linaro.org> Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Bennée --- qapi/trace.json | 22 +++--- 1 file changed, 7 insertions(+), 15 de

[PATCH v2 10/10] xxhash: remove qemu_xxhash7

2023-05-03 Thread Alex Bennée
Now we no longer have users for qemu_xxhash7 we can drop an additional multiply and rol and make qemu_xxhash6 the implementation. Adjust the smaller hash functions accordingly. Message-Id: <20230420150009.1675181-11-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan H

Re: [PATCH 01/22] gitlab/cirrus: reduce scope of the FreeBSD testing matrix

2023-05-03 Thread Thomas Huth
On 03/05/2023 11.12, Alex Bennée wrote: While the Cirrus build machines are quite beefy it looks like we are still hitting timeouts. Lets reduce the testing matrix like we do for the other BSDs to see if this brings us under the line. This is however a pretty restricted set and I'm sure there are

[PATCH v2 07/10] trace: remove control-vcpu.h

2023-05-03 Thread Alex Bennée
Now we no longer have vcpu controlled trace events we can excise the code that allows us to query its status. Message-Id: <20230420150009.1675181-8-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Bennée --- trace/control-vcpu.h

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-05-03 Thread David Hildenbrand
On 25.04.23 18:14, Vladimir Sementsov-Ogievskiy wrote: On incoming migration we have the following sequence to load option ROM: 1. On device realize we do normal load ROM from the file 2. Than, on incoming migration we rewrite ROM from the incoming RAM block. If sizes mismatch we fail. Thi

[PATCH v2 0/6] misc tweaks for kvm and the 64bit pci window

2023-05-03 Thread Gerd Hoffmann
v2 changes: - e820 conflict fix Gerd Hoffmann (6): better kvm detection detect physical address space size move 64bit pci window to end of address space be less conservative with the 64bit pci io window qemu: log reservations in fw_cfg e820 table check for e820 conflict src/e820map.

[PATCH v2 3/6] move 64bit pci window to end of address space

2023-05-03 Thread Gerd Hoffmann
When the size of the physical address space is known (PhysBits is not zero) move the 64bit pci io window to the end of the address space. Signed-off-by: Gerd Hoffmann --- src/fw/pciinit.c | 8 1 file changed, 8 insertions(+) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index badf13

Re: [PATCH 02/22] tests/docker: bump the xtensa base to debian:11-slim

2023-05-03 Thread Thomas Huth
On 03/05/2023 11.12, Alex Bennée wrote: Stretch is going out of support so things like security updates will fail. As the toolchain itself is binary it hopefully won't mind the underlying OS being updated. Let's hope there won't be any problems with dynamic libraries... Reviewed-by: Thomas Hut

[PATCH v2 1/6] better kvm detection

2023-05-03 Thread Gerd Hoffmann
In case kvm emulates features of another hypervisor (for example hyperv) two VMM CPUID blocks will be present, one for the emulated hypervisor and one for kvm itself. This patch makes seabios loop over the VMM CPUID blocks to make sure it will properly detect kvm when multiple blocks are present.

[PATCH v2 6/6] check for e820 conflict

2023-05-03 Thread Gerd Hoffmann
Add support to check for overlaps with e820 entries. In case the 64bit pci io window has conflicts move it down. The only known case where this happens is AMD processors with 1TB address space which has some space just below 1TB reserved for HT. Signed-off-by: Gerd Hoffmann --- src/e820map.h

[PATCH v2 4/6] be less conservative with the 64bit pci io window

2023-05-03 Thread Gerd Hoffmann
Current seabios code will only enable and use the 64bit pci io window in case it runs out of space in the 32bit pci mmio window below 4G. This patch will also enable the 64bit pci io window when (a) RAM above 4G is present, and (b) the physical address space size is known, and (c) seabios is

[PATCH v2 5/6] qemu: log reservations in fw_cfg e820 table

2023-05-03 Thread Gerd Hoffmann
With loglevel 1 (same we use for RAM entries), so it is included in the firmware log by default. Signed-off-by: Gerd Hoffmann --- src/fw/paravirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index a84968661aee..2c9ed4c3f4d6 100644 --

[PATCH v2 2/6] detect physical address space size

2023-05-03 Thread Gerd Hoffmann
Check for pae and long mode using cpuid. If present also read the physical address bits. Apply some qemu sanity checks (see below). Record results in PhysBits and LongMode variables. In case we are not sure what the address space size is leave the PhysBits variable unset. On qemu we have the pr

<    1   2   3   4   5   6   >