Re: [PATCH v2 2/2] qtest/migration-tests.c: use "-incoming defer" for postcopy tests

2023-05-30 Thread Peter Xu
On Tue, May 30, 2023 at 05:02:59PM +0800, Wei Wang wrote: > The Postcopy preempt capability requires to be set before incoming > starts, so change the postcopy tests to start with deferred incoming and > call migrate-incoming after the cap has been set. > > Signed-off-by: Wei Wang Hmm.. so we

Re: [PATCH 08/10] hw/i386/pc: Remove PC_MACHINE_DEVMEM_REGION_SIZE

2023-05-30 Thread Michael S. Tsirkin
On Tue, May 30, 2023 at 03:41:58PM +0200, David Hildenbrand wrote: > On 30.05.23 15:11, David Hildenbrand wrote: > > On 30.05.23 15:07, Michael S. Tsirkin wrote: > > > On Tue, May 30, 2023 at 01:38:36PM +0200, David Hildenbrand wrote: > > > > There are no remaining users in the tree, so let's

Re: [RFC] Native Library Calls

2023-05-30 Thread Peter Maydell
On Tue, 30 May 2023 at 15:26, Yeqi Fu wrote: > > This patch introduces a set of feature instructions for native calls > and provides helpers to translate these instructions to corresponding > native functions. A shared library is also implemented, where native > functions are rewritten as feature

Re: [PATCH v4 05/16] tcg/i386: Support 128-bit load/store

2023-05-30 Thread Peter Maydell
On Fri, 26 May 2023 at 01:24, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > tcg/i386/tcg-target.h | 4 +- > tcg/i386/tcg-target.c.inc | 191 +- > 2 files changed, 190 insertions(+), 5 deletions(-) Reviewed-by: Peter Maydell

Re: [PATCH] hw/clx: Fix CFMW config memory leak

2023-05-30 Thread Jonathan Cameron via
On Mon, 29 May 2023 15:59:56 +0800 Li Zhijian wrote: > Only 'fw' pointer is marked as g_autofree, so we shoud free other > resource manually in error path. > Good spot. Patch title typo hw/cxl: It's a bit annoying we can't handle this with more autofree magic. That would work for fw->targets

Re: [PATCH v5 9/9] vfio/migration: Add support for switchover ack capability

2023-05-30 Thread Cédric Le Goater
On 5/30/23 16:48, Avihai Horon wrote: Loading of a VFIO device's data can take a substantial amount of time as the device may need to allocate resources, prepare internal data structures, etc. This can increase migration downtime, especially for VFIO devices with a lot of resources. To solve

Re: [PATCH v2 04/20] target/arm: Use tcg_gen_qemu_ld_i128 for LDXP

2023-05-30 Thread Peter Maydell
On Fri, 26 May 2023 at 00:27, Richard Henderson wrote: > > While we don't require 16-byte atomicity here, using a single larger > load simplifies the code, and makes it a closer match to STXP. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

[PATCH 9/9] disas/riscv: Add support for XThead* instructions

2023-05-30 Thread Christoph Muellner
From: Christoph Müllner Support for emulating XThead* instruction has been added recently. This patch adds support for these instructions to the RISC-V disassembler. Co-developed-by: LIU Zhiwei Signed-off-by: Christoph Müllner --- disas/meson.build | 1 + disas/riscv-xthead.c

[PATCH 2/9] target/riscv: Factor out RISCVCPUConfig from cpu.h

2023-05-30 Thread Christoph Muellner
From: Christoph Müllner The file target/riscv/cpu.h cannot be included by files outside of target/riscv/. To share data with other parts of QEMU (e.g. the disassembler) we need to factor out the relevant code. Therefore, this patch moves the definition of RISCVCPUConfig (and tightly coupled

[PATCH v4 0/6] target/ppc: Assorted ppc target fixes

2023-05-30 Thread Nicholas Piggin
Reposting these since two were merged, and I moved the PMU fix out of the series since that's a crash fix. Should be no real change other than rebase and kvm-only build fix. Thanks, Nick Nicholas Piggin (6): target/ppc: Fix instruction loading endianness in alignment interrupt target/ppc:

[PATCH v4 1/6] target/ppc: Fix instruction loading endianness in alignment interrupt

2023-05-30 Thread Nicholas Piggin
powerpc ifetch endianness depends on MSR[LE] so it has to byteswap after cpu_ldl_code(). This corrects DSISR bits in alignment interrupts when running in little endian mode. Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- target/ppc/excp_helper.c | 22 +- 1

[PULL 06/21] hw/arm/smmuv3: Parse STE config for stage-2

2023-05-30 Thread Peter Maydell
From: Mostafa Saleh Parse stage-2 configuration from STE and populate it in SMMUS2Cfg. Validity of field values are checked when possible. Only AA64 tables are supported and Small Translation Tables (STT) are not supported. According to SMMUv3 UM(IHI0070E) "5.2 Stream Table Entry": All fields

[PULL 14/21] tests/qtest: Run arm-specific tests only if the required machine is available

2023-05-30 Thread Peter Maydell
From: Thomas Huth pflash-cfi02-test.c always uses the "musicpal" machine for testing, test-arm-mptimer.c always uses the "vexpress-a9" machine, and microbit-test.c requires the "microbit" machine, so we should only run these tests if the machines have been enabled in the configuration.

[PATCH v4 3/6] target/ppc: Add SRR1 prefix indication to interrupt handlers

2023-05-30 Thread Nicholas Piggin
ISA v3.1 introduced prefix instructions. Among the changes, various synchronous interrupts report whether they were caused by a prefix instruction in (H)SRR1. The case of instruction fetch that causes an HDSI due to access of a process-scoped table faulting on the partition scoped translation is

[PATCH v9 0/7] QEMU CXL Provide mock CXL events and irq support

2023-05-30 Thread Jonathan Cameron via
v9: A few remaining QMP documentation formatting fixes from Markus. Fingers crossed it's now clean! Based on: [PATCH v8 0/4] hw/cxl: Poison get, inject, clear Based on: Message-ID: 20230526170010.574-1-jonathan.came...@huawei.com Updated cover letter from earlier versions: One challenge here

Re: [RFC PATCH v2 4/4] vfio/pci: Enable AtomicOps completers on root ports

2023-05-30 Thread Cédric Le Goater
On 5/27/23 01:15, Alex Williamson wrote: Dynamically enable Atomic Ops completer support around realize/exit of vfio-pci devices reporting host support for these accesses and adhering to a minimal configuration standard. While the Atomic Ops completer bits in the root port device capabilities2

Re: [PATCH 22/30] mac_via: fix rtc command decoding from PRAM addresses 0x0 to 0xf

2023-05-30 Thread Laurent Vivier
Le 24/05/2023 à 23:10, Mark Cave-Ayland a écrit : A comparison between the rtc command table included in the comment and the code itself shows that the decoding for PRAM addresses 0x0 to 0xf is being done on the raw command, and not the shifted version held in value. Signed-off-by: Mark

[PATCH v9 1/7] hw/cxl/events: Add event status register

2023-05-30 Thread Jonathan Cameron via
From: Ira Weiny The device status register block was defined. However, there were no individual registers nor any data wired up. Define the event status register [CXL 3.0; 8.2.8.3.1] as part of the device status register block. Wire up the register and initialize the event status for each

Re: [PATCH v4 01/16] tcg: Fix register move type in tcg_out_ld_helper_ret

2023-05-30 Thread Peter Maydell
On Fri, 26 May 2023 at 01:25, Richard Henderson wrote: > > The first move was incorrectly using TCG_TYPE_I32 while the second > move was correctly using TCG_TYPE_REG. This prevents a 64-bit host > from moving all 128-bits of the return value. > > Fixes: ebebea53ef8 ("tcg: Support TCG_TYPE_I128

[PATCH v9 2/7] hw/cxl: Move CXLRetCode definition to cxl_device.h

2023-05-30 Thread Jonathan Cameron via
Following patches will need access to the mailbox return code type so move it to the header. Reviewed-by: Ira Weiny Reviewed-by: Fan Ni Signed-off-by: Jonathan Cameron --- include/hw/cxl/cxl_device.h | 28 hw/cxl/cxl-mailbox-utils.c | 28

[PATCH 2/2] Hexagon (tests/.../hex_test.h): use portable printf formats

2023-05-30 Thread Matheus Tavares Bernardino
This fixes compiler messages like "warning: format specifies type 'unsigned int' but the argument has type 'uint32_t' (aka 'unsigned long') [-Wformat]". Signed-off-by: Matheus Tavares Bernardino --- tests/tcg/hexagon/hex_test.h | 14 ++ 1 file changed, 10 insertions(+), 4

Re: [PATCH 03/16] migration: Use qemu_file_transferred_noflush() for block migration.

2023-05-30 Thread Fabiano Rosas
Juan Quintela writes: > We only care about the amount of bytes transferred. Flushing is done > by the system somewhere else. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

[PATCH 0/2] Hexagon tests: fix test_load_tmp2 and non-portable format

2023-05-30 Thread Matheus Tavares Bernardino
This series includes two fixes on hexagon test files: one for a non-porable printf specifier, and the other for the use of an uninitialized register. Marco Liebel (1): Hexagon (hvx_misc test): fix uninitialized regs at test_load_tmp2 Matheus Tavares Bernardino (1): Hexagon

[PATCH 1/2] Hexagon (hvx_misc test): fix uninitialized regs at test_load_tmp2

2023-05-30 Thread Matheus Tavares Bernardino
From: Marco Liebel This test case was using some vector registers which were not properly initialized. Signed-off-by: Marco Liebel Signed-off-by: Matheus Tavares Bernardino --- tests/tcg/hexagon/hvx_misc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v4 08/16] tcg/aarch64: Simplify constraints on qemu_ld/st

2023-05-30 Thread Peter Maydell
On Fri, 26 May 2023 at 01:26, Richard Henderson wrote: > > Adjust the softmmu tlb to use TMP[0-2], not any of the normally available > registers. Since we handle overlap betwen inputs and helper arguments, > we can allow any allocatable reg. > > Signed-off-by: Richard Henderson Reviewed-by:

Re: [PATCH v4 15/16] accel/tcg: Add aarch64 lse2 load_atom_extract_al16_or_al8

2023-05-30 Thread Peter Maydell
On Fri, 26 May 2023 at 01:25, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > .../aarch64/host/load-extract-al16-al8.h | 40 +++ > 1 file changed, 40 insertions(+) > create mode 100644 host/include/aarch64/host/load-extract-al16-al8.h Reviewed-by:

Re: [PATCH v2 1/2] migration: enfocre multifd and postcopy preempt to be set before incoming

2023-05-30 Thread Peter Xu
On Tue, May 30, 2023 at 05:02:58PM +0800, Wei Wang wrote: > qemu_start_incoming_migration needs to check the number of multifd > channels or postcopy ram channels to configure the backlog parameter (i.e. > the maximum length to which the queue of pending connections for sockfd > may grow) of

Re: [PATCH v2 18/20] tests/tcg/aarch64: Use stz2g in mte-7.c

2023-05-30 Thread Peter Maydell
On Fri, 26 May 2023 at 00:27, Richard Henderson wrote: > > We have many other instances of stg in the testsuite; > change these to provide an instance of stz2g. > > Signed-off-by: Richard Henderson > --- > tests/tcg/aarch64/mte-7.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH v2 0/4] Migration time prediction using calc-dirty-rate

2023-05-30 Thread Peter Xu
Hi, Andrei, On Thu, Apr 27, 2023 at 03:42:56PM +0300, Andrei Gudkov via wrote: > Afterwards we tried to migrate VM after randomly selecting max downtime > and bandwidth limit. Typical prediction error is 6-7%, with only 180 out > of 5779 experiments failing badly: prediction error >=25% or

[PATCH 0/4] Various xive fixes

2023-05-30 Thread Frederic Barrat
A set of small fixes for the interrupt controller (xive2) on P10. Frederic Barrat (4): pnv/xive2: Add definition for TCTXT Config register pnv/xive2: Add definition for the ESB cache configuration register pnv/xive2: Allow writes to the Physical Thread Enable registers pnv/xive2: Handle

[PATCH 2/4] pnv/xive2: Add definition for the ESB cache configuration register

2023-05-30 Thread Frederic Barrat
Add basic read/write support for the ESB cache configuration register on P10. We don't model the ESB cache in qemu so reading/writing the register won't do anything, but it avoids logging a guest error when skiboot configures it: qemu-system-ppc64 -machine powernv10 ... -d guest_errors ...

[PATCH 1/4] pnv/xive2: Add definition for TCTXT Config register

2023-05-30 Thread Frederic Barrat
Add basic read/write support for the TCTXT Config register on P10. qemu doesn't do anything with it yet, but it avoids logging a guest error when skiboot configures the fused-core state: qemu-system-ppc64 -machine powernv10 ... -d guest_errors ... [0.13167,5] XIVE: [ IC 00 ]

[PATCH 4/4] pnv/xive2: Handle TIMA access through all ports

2023-05-30 Thread Frederic Barrat
The Thread Interrupt Management Area (TIMA) can be accessed through 4 ports/snoop buses, targeted by the address. The base address of a TIMA is using port 0 and the other ports are 0x80 apart. Using one port or another can be useful to balance the load on the snoop buses. The TIMA registers are

[PATCH 3/4] pnv/xive2: Allow writes to the Physical Thread Enable registers

2023-05-30 Thread Frederic Barrat
Fix what was probably a silly mistake and allow to write the Physical Thread enable registers 0 and 1. Skiboot prefers to use the ENx_SET variant so it went unnoticed, but there's no reason to discard a write to the full register, it is Read-Write. Signed-off-by: Frederic Barrat ---

[PATCH v3 38/48] target/mips: Tidy helpers for translation

2023-05-30 Thread Richard Henderson
Move most includes from *translate*.c to translate.h, ensuring that we get the ordering correct. Ensure cpu.h is first. Use disas/disas.h instead of exec/log.h. Drop otherwise unused includes. Signed-off-by: Richard Henderson --- target/mips/tcg/translate.h| 6 --

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

2023-05-30 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 bdc185a485..565c60bc96 100644 ---

[PATCH v3 04/48] tcg/sparc64: Remove TARGET_LONG_BITS, TCG_TYPE_TL

2023-05-30 Thread Richard Henderson
All uses replaced with TCGContext.addr_type. Signed-off-by: Richard Henderson --- tcg/sparc64/tcg-target.c.inc | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tcg/sparc64/tcg-target.c.inc b/tcg/sparc64/tcg-target.c.inc index d2d0f604c2..48efd83817 100644 ---

[PATCH v3 08/48] *: Add missing includes of qemu/error-report.h

2023-05-30 Thread Richard Henderson
This had been pulled in from tcg/tcg.h, via exec/cpu_ldst.h, via exec/exec-all.h, but the include of tcg.h will be removed. Signed-off-by: Richard Henderson --- target/avr/helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/avr/helper.c b/target/avr/helper.c index

Re: [PATCH v3 44/48] tcg: Remove target-specific headers from tcg.[ch]

2023-05-30 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: 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

Re: [PATCH 1/2] vdpa: Add vhost_vdpa_net_load_offloads

2023-05-30 Thread Jason Wang
On Mon, May 29, 2023 at 9:18 PM Hawkins Jiawei wrote: > > This patch introduces vhost_vdpa_net_load_offloads() to > restore offloads state at device's startup. > > Signed-off-by: Hawkins Jiawei > --- > net/vhost-vdpa.c | 26 ++ > 1 file changed, 26 insertions(+) > > diff

Re: [PATCH 2/2] vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ

2023-05-30 Thread Jason Wang
On Mon, May 29, 2023 at 9:18 PM Hawkins Jiawei wrote: > > Enable SVQ with VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature. > > Signed-off-by: Hawkins Jiawei Acked-by: Jason Wang Thanks > --- > net/vhost-vdpa.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/vhost-vdpa.c

Re: [PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-30 Thread Wu, Fei
On 5/30/2023 6:08 PM, Alex Bennée wrote: > > "Wu, Fei" writes: > >> On 5/30/2023 1:01 PM, Wu, Fei wrote: >>> On 5/30/2023 12:07 PM, Richard Henderson wrote: On 5/29/23 04:49, Fei Wu wrote: > +/* > + * The TCGProfile structure holds data for analysing the quality of > + * the

Re: [RFC] Native Library Calls

2023-05-30 Thread LIU Zhiwei
On 2023/5/30 22:24, Yeqi Fu wrote: This patch introduces a set of feature instructions for native calls and provides helpers to translate these instructions to corresponding native functions. A shared library is also implemented, where native functions are rewritten as feature instructions. At

Re: [PATCH] tap: introduce IFF_NAPI

2023-05-30 Thread Jason Wang
On Wed, May 31, 2023 at 11:17 AM Jon Kohler wrote: > > If kernel supports IFF_NAPI, lets use it, which is especially useful > on kernels containing fb3f903769e8 ("tun: support NAPI for packets > received from batched XDP buffs"), as IFF_NAPI allows the > vhost_tx_batch path to use NAPI on XDP

Re: [PATCH v2 1/1] target/i386: add support for LAM in CPUID enumeration

2023-05-30 Thread Xiaoyao Li
On 5/31/2023 9:32 AM, Binbin Wu wrote: From: Robert Hoo Linear Address Masking (LAM) is a new Intel CPU feature, which allows software to use of the untranslated address bits for metadata. The bit definition: CPUID.(EAX=7,ECX=1):EAX[26] Add CPUID definition for LAM. More info can be found

Re: [PATCH] tap: introduce IFF_NAPI

2023-05-30 Thread Jon Kohler
> On May 30, 2023, at 11:35 PM, Jason Wang wrote: > > On Wed, May 31, 2023 at 11:32 AM Jason Wang wrote: >> >> On Wed, May 31, 2023 at 11:17 AM Jon Kohler wrote: >>> >>> If kernel supports IFF_NAPI, lets use it, which is especially useful >>> on kernels containing fb3f903769e8 ("tun:

[PATCH v3 06/48] tcg: Widen CPUTLBEntry comparators to 64-bits

2023-05-30 Thread Richard Henderson
This makes CPUTLBEntry agnostic to the address size of the guest. When 32-bit addresses are in effect, we can simply read the low 32 bits of the 64-bit field. Similarly when we need to update the field for setting TLB_NOTDIRTY. For TCG backends that could in theory be big-endian, but in practice

[PATCH v3 19/48] tcg: Move TCGHelperInfo and dependencies to tcg/helper-info.h

2023-05-30 Thread Richard Henderson
This will be required outside of tcg-internal.h soon. Signed-off-by: Richard Henderson --- include/tcg/helper-info.h | 59 +++ tcg/tcg-internal.h| 47 +-- 2 files changed, 60 insertions(+), 46 deletions(-) create mode

[PATCH v3 23/48] tcg: Split helper-gen.h

2023-05-30 Thread Richard Henderson
Create helper-gen-common.h without the target specific portion. Use that in tcg-op-common.h. Reorg headers in target/arm to ensure that helper-gen.h is included before helper-info.c.inc. All other targets are already correct in this regard. Signed-off-by: Richard Henderson ---

[PATCH v3 34/48] accel/tcg: Move most of gen-icount.h into translator.c

2023-05-30 Thread Richard Henderson
The only usage of gen_tb_start and gen_tb_end are here. Move the static icount_start_insn variable into a local within translator_loop. Simplify the two subroutines by passing in the existing local cflags variable. Leave only the declaration of gen_io_start in gen-icount.h. Signed-off-by:

[PATCH v3 42/48] tcg: Fix PAGE/PROT confusion

2023-05-30 Thread Richard Henderson
The bug was hidden because they happen to have the same values. Signed-off-by: Richard Henderson --- tcg/region.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tcg/region.c b/tcg/region.c index bef4c4756f..f8410ba5db 100644 --- a/tcg/region.c +++

[PATCH v3 47/48] exec/poison: Do not poison CONFIG_SOFTMMU

2023-05-30 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

[PATCH v3 24/48] tcg: Split helper-proto.h

2023-05-30 Thread Richard Henderson
Create helper-proto-common.h without the target specific portion. Use that in tcg-op-common.h. Include helper-proto.h in target/arm and target/hexagon before helper-info.c.inc; all other targets are already correct in this regard. Signed-off-by: Richard Henderson ---

[PATCH v3 39/48] *: Add missing includes of exec/translation-block.h

2023-05-30 Thread Richard Henderson
This had been pulled in via exec/exec-all.h, via exec/translator.h, but the include of exec-all.h will be removed. Signed-off-by: Richard Henderson --- target/hexagon/translate.c | 1 + target/loongarch/translate.c | 3 +-- target/mips/tcg/translate.c | 1 + 3 files changed, 3 insertions(+),

[PATCH v3 45/48] plugins: Move plugin_insn_append to translator.c

2023-05-30 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

[PATCH v3 44/48] tcg: Remove target-specific headers from tcg.[ch]

2023-05-30 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

[PATCH v3 43/48] tcg: Move env defines out of NEED_CPU_H in helper-head.h

2023-05-30 Thread Richard Henderson
Since the change to CPUArchState, we have a common typedef that can always be used. Signed-off-by: Richard Henderson --- include/exec/helper-head.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/exec/helper-head.h b/include/exec/helper-head.h index

[PATCH v3 33/48] include/exec: Remove CODE_GEN_AVG_BLOCK_SIZE

2023-05-30 Thread Richard Henderson
The last use was removed with 2ac01d6dafab. Fixes: 2ac01d6dafab ("translate-all: use a binary search tree to track TBs in TBContext") Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/include/exec/exec-all.h

[PATCH v3 12/48] target/arm: Fix test of TCG_OVERSIZED_GUEST

2023-05-30 Thread Richard Henderson
The symbol is always defined, even if to 0. We wanted to test for TCG_OVERSIZED_GUEST == 0. Signed-off-by: Richard Henderson --- target/arm/ptw.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 69c05cd9da..b0d2a05403 100644 ---

Re: [PATCH v3 48/48] tcg: Build once for system and once for user-only

2023-05-30 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: 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(-)  Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] tap: introduce IFF_NAPI

2023-05-30 Thread Jason Wang
On Wed, May 31, 2023 at 11:47 AM Jon Kohler wrote: > > > > > On May 30, 2023, at 11:35 PM, Jason Wang wrote: > > > > On Wed, May 31, 2023 at 11:32 AM Jason Wang wrote: > >> > >> On Wed, May 31, 2023 at 11:17 AM Jon Kohler wrote: > >>> > >>> If kernel supports IFF_NAPI, lets use it, which is

[PATCH v3 02/48] tcg/riscv: Remove TARGET_LONG_BITS, TCG_TYPE_TL

2023-05-30 Thread Richard Henderson
All uses replaced with TCGContext.addr_type. Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.c.inc | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index c0257124fa..a8f99f7e77 100644 ---

[PATCH v3 18/48] tcg: Remove outdated comments in helper-head.h

2023-05-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/exec/helper-head.h | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/include/exec/helper-head.h b/include/exec/helper-head.h index f863a6ef5d..a355ef8ebe 100644 --- a/include/exec/helper-head.h +++

[PATCH v3 00/48] tcg: Build once for system, once for user

2023-05-30 Thread Richard Henderson
The goal here is only tcg/, leaving accel/tcg/ for future work. Changes for v3: * Prerequisites and 3 patches merged. r~ Richard Henderson (48): tcg/ppc: Remove TARGET_LONG_BITS, TCG_TYPE_TL tcg/riscv: Remove TARGET_LONG_BITS, TCG_TYPE_TL tcg/s390x: Remove TARGET_LONG_BITS, TCG_TYPE_TL

[PATCH v3 32/48] tcg: Spit out exec/translation-block.h

2023-05-30 Thread Richard Henderson
This is all that is required by tcg/ from exec-all.h. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 135 +-- include/exec/translation-block.h | 152 +++ tcg/tcg-op-ldst.c| 2 +- 3 files changed, 154

[PATCH v3 25/48] tcg: Add insn_start_words to TCGContext

2023-05-30 Thread Richard Henderson
This will enable replacement of TARGET_INSN_START_WORDS in tcg.c. Split out "tcg/insn-start-words.h" and use it in target/. Signed-off-by: Richard Henderson --- include/tcg/insn-start-words.h | 17 + include/tcg/tcg-op.h | 8 include/tcg/tcg-opc.h |

[PATCH v3 17/48] target/hexagon: Include helper-gen.h where needed

2023-05-30 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 +

Re: [PATCH 03/12] aspeed: Use the boot_rom region of the fby35 machine

2023-05-30 Thread Cédric Le Goater
On 5/30/23 23:27, Philippe Mathieu-Daudé wrote: On 8/5/23 09:58, Cédric Le Goater wrote: This change completes commits 5aa281d757 ("aspeed: Introduce a spi_boot region under the SoC") and 8b744a6a47 ("aspeed: Add a boot_rom overlap region in the SoC spi_boot container") which introduced a

[PATCH v3 29/48] tcg: Remove NO_CPU_IO_DEFS

2023-05-30 Thread Richard Henderson
>From this remove, it's no longer clear what this is attempting to protect. The last time a use of this define was added to the source tree, as opposed to merely moved around, was 2008. There have been many cleanups since that time and this is no longer required for the build to succeed.

[PATCH v3 01/48] tcg/ppc: Remove TARGET_LONG_BITS, TCG_TYPE_TL

2023-05-30 Thread Richard Henderson
All uses replaced with TCGContext.addr_type. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index d47a9e3478..11955a6cc2 100644 ---

Re: [PATCH v3 29/48] tcg: Remove NO_CPU_IO_DEFS

2023-05-30 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: From this remove, it's no longer clear what this is attempting to protect. The last time a use of this define was added to the source tree, as opposed to merely moved around, was 2008. There have been many cleanups since that time and this is no

Re: [RFC PATCH 1/5] target/ppc: gdbstub init spr gdb_id for all CPUs

2023-05-30 Thread Philippe Mathieu-Daudé
On 31/5/23 03:23, Nicholas Piggin wrote: Make sure each CPU gets its state set up for gdb, not just the ones before PowerPCCPUClass has had its gdb state set up. Cc: qemu-sta...@nongnu.org Fixes: 707c7c2ee1 ("target/ppc: Enable reporting of SPRs to GDB") Signed-off-by: Nicholas Piggin ---

Re: [PATCH 05/12] hw/ssi: Introduce a ssi_get_cs() helper

2023-05-30 Thread Cédric Le Goater
On 5/30/23 22:34, Philippe Mathieu-Daudé wrote: On 8/5/23 09:58, Cédric Le Goater wrote: Simple routine to retrieve a DeviceState object on a SPI bus using its address/cs. It will be useful for the board to wire the CS lines. Cc: Alistair Francis Signed-off-by: Cédric Le Goater ---  

[PATCH v2] hw/cxl: Fix CFMW config memory leak

2023-05-30 Thread Li Zhijian
Only 'fw' pointer is marked as g_autofree, so we shoud free other resource manually in error path. Signed-off-by: Li Zhijian --- V2: Delete unnecesarry check --- hw/cxl/cxl-host.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/cxl/cxl-host.c

[PATCH v3 13/48] tcg: Split out tcg/oversized-guest.h

2023-05-30 Thread Richard Henderson
Move a use of TARGET_LONG_BITS out of tcg/tcg.h. Include the new file only where required. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 3 +-- include/tcg/oversized-guest.h | 23 +++ include/tcg/tcg.h

[PATCH v3 15/48] tcg: Split tcg/tcg-op-common.h from tcg/tcg-op.h

2023-05-30 Thread Richard Henderson
Create tcg/tcg-op-common.h, moving everything that does not concern TARGET_LONG_BITS or TCGv. Adjust tcg/*.c to use the new header instead of tcg-op.h, in preparation for compiling tcg/ only once. Signed-off-by: Richard Henderson --- include/tcg/tcg-op-common.h | 996

[PATCH v3 03/48] tcg/s390x: Remove TARGET_LONG_BITS, TCG_TYPE_TL

2023-05-30 Thread Richard Henderson
All uses replaced with TCGContext.addr_type. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index 503126cd66..2795242b60 100644 ---

[PATCH v3 16/48] target/arm: Include helper-gen.h in translator.h

2023-05-30 Thread Richard Henderson
This had been included via tcg-op-common.h via tcg-op.h, but that is going away. It is needed for inlines within translator.h, so we might as well do it there and not individually in each translator c file. Signed-off-by: Richard Henderson --- target/arm/tcg/translate.h | 1 +

[PATCH v3 26/48] tcg: Add guest_mo to TCGContext

2023-05-30 Thread Richard Henderson
This replaces of TCG_GUEST_DEFAULT_MO in tcg-op-ldst.c. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + accel/tcg/translate-all.c | 5 + tcg/tcg-op-ldst.c | 4 +--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/tcg/tcg.h

[PATCH v3 07/48] tcg: Add tlb_fast_offset to TCGContext

2023-05-30 Thread Richard Henderson
Disconnect the layout of ArchCPU from TCG compilation. Pass the relative offset of 'env' and 'neg.tlb.f' as a parameter. Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 39 +- include/exec/tlb-common.h| 56

[PATCH v3 30/48] exec-all: Widen tb_page_addr_t for user-only

2023-05-30 Thread Richard Henderson
This is a step toward making TranslationBlock agnostic to the address size of the guest. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index

[PATCH v3 28/48] tcg: Split tcg/tcg-op-gvec.h

2023-05-30 Thread Richard Henderson
Create tcg/tcg-op-gvec-common.h, moving everything that does not concern TARGET_LONG_BITS. Adjust tcg-op-gvec.c to use the new header. Signed-off-by: Richard Henderson --- include/tcg/tcg-op-gvec-common.h | 426 + include/tcg/tcg-op-gvec.h| 444

[PATCH v3 35/48] accel/tcg: Introduce translator_io_start

2023-05-30 Thread Richard Henderson
New wrapper around gen_io_start which takes care of the USE_ICOUNT check, as well as marking the DisasContext to end the TB. Remove exec/gen-icount.h. Signed-off-by: Richard Henderson --- MAINTAINERS | 1 - include/exec/gen-icount.h | 6 --

[PATCH v3 40/48] *: Add missing includes of exec/exec-all.h

2023-05-30 Thread Richard Henderson
This had been pulled in via exec/translator.h, but the include of exec-all.h will be removed. Signed-off-by: Richard Henderson --- target/arm/tcg/translate.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h index 5b53b6215d..4d88197715

[PATCH v3 05/48] tcg: Move TCG_TYPE_TL from tcg.h to tcg-op.h

2023-05-30 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. Reviewed-by: Philippe

[PATCH v3 20/48] tcg: Pass TCGHelperInfo to tcg_gen_callN

2023-05-30 Thread Richard Henderson
In preparation for compiling tcg/ only once, eliminate the all_helpers array. Instantiate the info structs for the generic helpers in accel/tcg/, and the structs for the target-specific helpers in each translate.c. Since we don't see all of the info structs at startup, initialize at first use,

[PATCH v3 09/48] *: Add missing includes of tcg/debug-assert.h

2023-05-30 Thread Richard Henderson
This had been pulled in from tcg/tcg.h, via exec/cpu_ldst.h, via exec/exec-all.h, but the include of tcg.h will be removed. Signed-off-by: Richard Henderson --- target/avr/cpu.c | 1 + target/rx/cpu.c | 1 + target/rx/op_helper.c | 1 + target/tricore/cpu.c | 1 + 4 files changed, 4

[PATCH v3 37/48] target/arm: Tidy helpers for translation

2023-05-30 Thread Richard Henderson
Move most includes from *translate*.c to translate.h, ensuring that we get the ordering correct. Ensure cpu.h is first. Use disas/disas.h instead of exec/log.h. Drop otherwise unused includes. Signed-off-by: Richard Henderson --- target/arm/tcg/translate.h| 3 +++

Re: [PATCH v3 34/48] accel/tcg: Move most of gen-icount.h into translator.c

2023-05-30 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: The only usage of gen_tb_start and gen_tb_end are here. Move the static icount_start_insn variable into a local within translator_loop. Simplify the two subroutines by passing in the existing local cflags variable. Leave only the declaration of

Re: [PATCH v3 37/48] target/arm: Tidy helpers for translation

2023-05-30 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: Move most includes from *translate*.c to translate.h, ensuring that we get the ordering correct. Ensure cpu.h is first. Use disas/disas.h instead of exec/log.h. Drop otherwise unused includes. Signed-off-by: Richard Henderson ---

Re: [PATCH 3/4] tests/qtest: Fix a comment typo in vhost-user-test.c

2023-05-30 Thread Thomas Huth
On 24/05/2023 15.34, Milan Zamazal wrote: Signed-off-by: Milan Zamazal --- tests/qtest/vhost-user-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index e4f95b2858..8ab10732f8 100644 ---

Re: [PATCH v3 38/48] target/mips: Tidy helpers for translation

2023-05-30 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: Move most includes from *translate*.c to translate.h, ensuring that we get the ordering correct. Ensure cpu.h is first. Use disas/disas.h instead of exec/log.h. Drop otherwise unused includes. Signed-off-by: Richard Henderson ---

Re: [PATCH] tests/avocado/virtio-gpu: Cancel test if drm rendering is not available

2023-05-30 Thread Philippe Mathieu-Daudé
On 30/5/23 20:03, Thomas Huth wrote: The test_vhost_user_vga_virgl test currently fails on some CI machines with: qemu-system-x86_64: egl: no drm render node available qemu-system-x86_64: egl: render node init failed The other test in this file already checks whether there is an error

[PATCH] tap: introduce IFF_NAPI

2023-05-30 Thread Jon Kohler
If kernel supports IFF_NAPI, lets use it, which is especially useful on kernels containing fb3f903769e8 ("tun: support NAPI for packets received from batched XDP buffs"), as IFF_NAPI allows the vhost_tx_batch path to use NAPI on XDP buffs. Benchmark w/ iperf -c (remote srv) -P (thread count) -l

Re: [PATCH] tap: introduce IFF_NAPI

2023-05-30 Thread Jason Wang
On Wed, May 31, 2023 at 11:55 AM Jason Wang wrote: > > On Wed, May 31, 2023 at 11:47 AM Jon Kohler wrote: > > > > > > > > > On May 30, 2023, at 11:35 PM, Jason Wang wrote: > > > > > > On Wed, May 31, 2023 at 11:32 AM Jason Wang wrote: > > >> > > >> On Wed, May 31, 2023 at 11:17 AM Jon Kohler

Re: [PATCH v3 43/48] tcg: Move env defines out of NEED_CPU_H in helper-head.h

2023-05-30 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: Since the change to CPUArchState, we have a common typedef that can always be used. Signed-off-by: Richard Henderson --- include/exec/helper-head.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2] hw/cxl: Fix CFMW config memory leak

2023-05-30 Thread Philippe Mathieu-Daudé
Hi Li, On 31/5/23 04:34, Li Zhijian wrote: Only 'fw' pointer is marked as g_autofree, so we shoud free other resource manually in error path. Signed-off-by: Li Zhijian --- V2: Delete unnecesarry check --- hw/cxl/cxl-host.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-)

Re: [PATCH] tap: introduce IFF_NAPI

2023-05-30 Thread Jason Wang
On Wed, May 31, 2023 at 11:32 AM Jason Wang wrote: > > On Wed, May 31, 2023 at 11:17 AM Jon Kohler wrote: > > > > If kernel supports IFF_NAPI, lets use it, which is especially useful > > on kernels containing fb3f903769e8 ("tun: support NAPI for packets > > received from batched XDP buffs"), as

[PATCH v3 46/48] plugins: Drop unused headers from exec/plugin-gen.h

2023-05-30 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 ---

[PATCH v3 27/48] tcg: Move TLB_FLAGS_MASK check out of get_alignment_bits

2023-05-30 Thread Richard Henderson
The replacement isn't ideal, as the raw count of bits is not easily synced with exec/cpu-all.h, but it does remove from tcg.h the target dependency on TARGET_PAGE_BITS_MIN which is built into TLB_FLAGS_MASK. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 3 +++ include/tcg/tcg.h

<    1   2   3   4   5   6   7   >