[PATCH v3 05/33] target/arm/kvm-stub: add kvm_arm_reset_vcpu stub

2025-04-30 Thread Pierrick Bouvier
Needed in target/arm/cpu.c once kvm is possible. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm-stub.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c index 2b73d0598c1..e34d3f5e6b4 100644 --- a/target/arm

[PATCH v3 24/33] target/arm/vfp_fpscr: compile file twice (user, system)

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index c8c80c3f969..06d479570e2 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -2,7 +2,6 @@ arm_ss =

[PATCH v3 09/33] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common

2025-04-30 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/cpu.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 37b11e8866f..00ae2778058 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1183,8 +1183,6 @@ static

[PATCH v3 18/33] target/arm/debug_helper: compile file twice (user, system)

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index de214fe5d56..48a6bf59353 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -1,7 +1,6 @@

[PATCH v3 04/33] target/arm: move kvm stubs and remove CONFIG_KVM from kvm_arm.h

2025-04-30 Thread Pierrick Bouvier
Add a forward decl for struct kvm_vcpu_init to avoid pulling all kvm headers. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm_arm.h | 83 +-- target/arm/kvm-stub.c | 77 +++ 2 files ch

Re: [PATCH 6/6] accel/tcg: Use vaddr in cpu_loop.h

2025-04-30 Thread Pierrick Bouvier
On 4/30/25 4:06 PM, Richard Henderson wrote: Use vaddr instead of abi_ptr or target_ulong for a guest address. Signed-off-by: Richard Henderson --- include/user/cpu_loop.h | 12 +--- accel/tcg/user-exec.c | 2 +- linux-user/signal.c | 4 ++-- 3 files changed, 8 insertions(+

Re: [PATCH 5/6] accel/tcg: Build tcg-all.c twice

2025-04-30 Thread Pierrick Bouvier
On 4/30/25 4:06 PM, Richard Henderson wrote: Remove some unused headers. Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 6 +- accel/tcg/meson.build | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) Reviewed-by: Pierrick Bouvier

Re: [PATCH 4/6] accel/tcg: Build translate-all.c twice

2025-04-30 Thread Pierrick Bouvier
On 4/30/25 4:06 PM, Richard Henderson wrote: Remove lots and lots of unused headers. That was a lt indeed. Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 32 accel/tcg/meson.build | 2 +- 2 files changed, 1 insertion(+), 33 del

Re: [PATCH 1/6] tcg: Define INSN_START_WORDS as constant 3

2025-04-30 Thread Pierrick Bouvier
On 4/30/25 4:06 PM, Richard Henderson wrote: Use the same value for all targets. Rename TARGET_INSN_START_WORDS and do not depend on TARGET_INSN_START_EXTRA_WORDS. Remove TCGContext.insn_start_words. Signed-off-by: Richard Henderson --- include/tcg/insn-start-words.h | 11 +-- inclu

[PATCH v3 33/33] target/arm/kvm-stub: compile file once (system)

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 29a36fb3c5e..bb1c09676d5 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -15,7 +15,7 @@ arm_sy

[PATCH v3 01/33] target/arm: Replace target_ulong -> uint64_t for HWBreakpoint

2025-04-30 Thread Pierrick Bouvier
From: Philippe Mathieu-Daudé CPUARMState::pc is of type uint64_t. Reviewed-by: Pierrick Bouvier Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/internals.h | 6 +++--- target/arm/hyp_gdbstub.c | 6 +++--- 2 files changed, 6 ins

[PATCH v3 22/33] target/arm/helper: remove remaining TARGET_AARCH64

2025-04-30 Thread Pierrick Bouvier
They were hiding aarch64_sve_narrow_vq and aarch64_sve_change_el, which we can expose safely. Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 8 1 file changed, 8 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 1db40caec38..1dd9035f47e 100644 --- a/t

[PATCH v3 23/33] target/arm/helper: compile file twice (user, system)

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 48a6bf59353..c8c80c3f969 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -2,7 +2,6 @@ arm_ss =

Re: [PATCH 3/6] accel/tcg: Use target_long_bits() in translate-all.c

2025-04-30 Thread Pierrick Bouvier
On 4/30/25 4:06 PM, Richard Henderson wrote: Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Pierrick Bouvier

[PATCH v3 21/33] target/arm/helper: expose aarch64 cpu registration

2025-04-30 Thread Pierrick Bouvier
associated define_arm_cp_regs are guarded by "cpu_isar_feature(aa64_*)", so it's safe to expose that code for arm target (32 bit). Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 595

[PATCH v3 30/33] target/arm/ptw: remove TARGET_AARCH64 from arm_casq_ptw

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/ptw.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 424d1b54275..f428c9b9267 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -737,7 +737,14 @@ static uint64_t arm_c

[PATCH v3 08/33] target/arm/cpu: remove TARGET_BIG_ENDIAN dependency

2025-04-30 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Reviewed-by: Anton Johansson Signed-off-by: Pierrick Bouvier --- target/arm/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 07f279fec8c..37b11e8866f 100644 --- a/target/arm/cpu.c +++ b/target/ar

[PATCH v3 12/33] target/arm/cpu32-stubs.c: compile file twice (user, system)

2025-04-30 Thread Pierrick Bouvier
It could be squashed with commit introducing it, but I would prefer to introduce target/arm/cpu.c first. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/arm/meson.

[PATCH v3 29/33] target/arm/ptw: replace target_ulong with uint64_t

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/ptw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index d0a53d0987f..424d1b54275 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -1660,7 +1660,7 @@ static bool get_phys_addr_lpae

[PATCH v3 00/33] single-binary: compile target/arm twice

2025-04-30 Thread Pierrick Bouvier
More work toward single-binary. Some files have external dependencies for the single-binary: - target/arm/machine.c: migration - target/arm/gdbstub.c: gdbhelpers - target/arm/arm-qmp-cmds.c: qapi They will not be ported in this series. Built on {linux, windows, macos} x {x86_64, aarch64} Fully te

[PATCH v3 02/33] include/system/hvf: missing vaddr include

2025-04-30 Thread Pierrick Bouvier
On MacOS x86_64: In file included from ../target/i386/hvf/x86_task.c:13: /Users/runner/work/qemu/qemu/include/system/hvf.h:42:5: error: unknown type name 'vaddr' vaddr pc; ^ /Users/runner/work/qemu/qemu/include/system/hvf.h:43:5: error: unknown type name 'vaddr' vaddr saved_insn;

[PATCH v3 32/33] target/arm/meson: accelerator files are not needed in user mode

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 151184da71c..29a36fb3c5e 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -5,9 +5,6 @@ arm_s

[PATCH v3 13/33] target/arm/helper: use i64 for exception_pc_alignment

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/helper.h| 2 +- target/arm/tcg/tlb_helper.c| 2 +- target/arm/tcg/translate-a64.c | 2 +- target/arm/tcg/translate.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/helper.h b/target/arm/helper.h

[PATCH v3 15/33] target/arm/helper: extract common helpers

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/helper.h | 1152 +- target/arm/tcg/helper.h | 1153 +++ 2 files changed, 1155 insertions(+), 1150 deletions(-) create mode 100644 target/arm/tcg/helper.h diff --git a/targe

[PATCH v3 14/33] target/arm/helper: user i64 for probe_access

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/helper.h| 2 +- target/arm/tcg/op_helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.h b/target/arm/helper.h index 450c9d841bf..f870b707c7f 100644 --- a/target/arm/helper.h +++ b/target/arm/helpe

[PATCH v3 31/33] target/arm/ptw: compile file once (system)

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 6e0327b6f5b..151184da71c 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -17,7 +17,6 @@ arm_comm

[PATCH v3 07/33] accel/hvf: add hvf_enabled() for common code

2025-04-30 Thread Pierrick Bouvier
Other accelerators define a CONFIG_{accel}_IS_POSSIBLE when COMPILING_PER_TARGET is not defined, except hvf. Without this change, target/arm/cpu.c can't find hvf_enabled. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/system/hvf.h | 14 +- accel/hvf/hvf

[PATCH v3 26/33] target/arm/arch_dump: compile file once (system)

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 06d479570e2..95a2b077dd6 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -15,7 +15,6 @@ arm_ss.a

[PATCH v3 20/33] target/arm/helper: replace target_ulong by vaddr

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 085c1656027..595d9334977 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -10641,7 +10641,7 @@ static void arm_c

[PATCH v3 16/33] target/arm/debug_helper: only include common helpers

2025-04-30 Thread Pierrick Bouvier
Avoid pulling helper.h which contains TARGET_AARCH64. Signed-off-by: Pierrick Bouvier --- target/arm/debug_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 473ee2af38e..357bc2141ae 100644 --- a/target/arm/

[PATCH v3 25/33] target/arm/arch_dump: remove TARGET_AARCH64 conditionals

2025-04-30 Thread Pierrick Bouvier
Associated code is protected by cpu_isar_feature(aa64*) Signed-off-by: Pierrick Bouvier --- target/arm/arch_dump.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/arm/arch_dump.c b/target/arm/arch_dump.c index c40df4e7fd7..1dd79849c13 100644 --- a/target/arm/arch_dump.c +++ b/tar

[PATCH v3 17/33] target/arm/debug_helper: remove target_ulong

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/debug_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 357bc2141ae..50ef5618f51 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -381,7 +

[PATCH v3 11/33] target/arm/cpu: compile file twice (user, system) only

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index c39ddc4427b..89e305eb56a 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -1,6 +1,6 @@ ar

[PATCH v3 28/33] target/arm/cortex-regs: compile file once (system)

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 7db573f4a97..6e0327b6f5b 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -16,7 +16,6 @@ arm_syst

[PATCH v3 19/33] target/arm/helper: restrict include to common helpers

2025-04-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 257b1ba5270..085c1656027 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -12,7 +12,6 @@ #include "cpu.h" #

[PATCH v3 10/33] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features

2025-04-30 Thread Pierrick Bouvier
Need to stub cpu64 finalize functions. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/cpu.c | 2 -- target/arm/cpu32-stubs.c | 26 ++ target/arm/meson.build | 11 +++ 3 files changed, 33 insertions(+), 6 deletions(-) cre

[PATCH v3 06/33] target/arm/cpu: move arm_cpu_kvm_set_irq to kvm.c

2025-04-30 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm_arm.h | 2 ++ target/arm/cpu.c | 31 --- target/arm/kvm-stub.c | 5 + target/arm/kvm.c | 29 + 4 files changed, 36 insertions(+), 31 deletion

[PATCH v3 03/33] meson: add common libs for target and target_system

2025-04-30 Thread Pierrick Bouvier
Following what we did for hw/, we need target specific common libraries for target. We need 2 different libraries: - code common to a base architecture - system code common to a base architecture For user code, it can stay compiled per target for now. Reviewed-by: Richard Henderson Signed-off-by

RE: [PATCH v3 0/6] ui/spice: Enable gl=on option for non-local or remote clients

2025-04-30 Thread Kasireddy, Vivek
Hi Marc-Andre, > Subject: Re: [PATCH v3 0/6] ui/spice: Enable gl=on option for non-local or > remote clients > > Hi Vivek > > On Tue, Apr 29, 2025 at 10:13 AM Vivek Kasireddy > wrote: > > > > To address the limitation that this option is incompatible with > > remote clients, this patch series a

RE: [PATCH v3 3/6] ui/spice: Submit the gl_draw requests at 60 FPS for remote clients

2025-04-30 Thread Kasireddy, Vivek
Hi Marc-Andre, > Subject: Re: [PATCH v3 3/6] ui/spice: Submit the gl_draw requests at 60 FPS > for remote clients > > Hi Vivek > > On Tue, Apr 29, 2025 at 10:19 AM Vivek Kasireddy > wrote: > > > > In the specific case where the display layer (virtio-gpu) is using > > dmabuf, and if remote clien

RE: [PATCH v3 5/6] ui/spice: Create a new texture with linear layout when gl=on is enabled

2025-04-30 Thread Kasireddy, Vivek
Hi Marc-Andre, > Subject: Re: [PATCH v3 5/6] ui/spice: Create a new texture with linear layout > when gl=on is enabled > > Hi > > On Tue, Apr 29, 2025 at 10:13 AM Vivek Kasireddy > wrote: > > > > Since most encoders/decoders (invoked by Spice) may not work with > > tiled memory associated with

RE: [PATCH v3 4/6] ui/console-gl: Add a helper to create a texture with linear memory layout

2025-04-30 Thread Kasireddy, Vivek
Hi Marc-Andre, > > On Tue, Apr 29, 2025 at 10:14 AM Vivek Kasireddy > wrote: > > > > There are cases where we do not want the memory layout of a texture to > > be tiled as the component processing the texture would not know how to > > de-tile either via software or hardware. Therefore, ensuring

RE: [PATCH v3 4/6] ui/console-gl: Add a helper to create a texture with linear memory layout

2025-04-30 Thread Kasireddy, Vivek
Hi Dmitry, > Subject: Re: [PATCH v3 4/6] ui/console-gl: Add a helper to create a texture > with linear memory layout > > On 4/29/25 09:08, Vivek Kasireddy wrote: > > +#ifdef GL_EXT_memory_object_fd > > +glCreateMemoryObjectsEXT(1, &mem_obj); > > +glImportMemoryFdEXT(mem_obj, size, > GL_HA

OSUOSL in trouble

2025-04-30 Thread Paolo Bonzini
>From LWN > Lance Albertson writes that the Oregon State University Open Source Lab, the home of many prominent free-software projects over the years, has run into financial trouble: > > I am writing to inform you about a critical and time-sensitive situation facing the Open Source Lab. Over the p

[PATCH v6 0/1] Optimizing the print format of the QEMU monitor 'info mtree'

2025-04-30 Thread Chao Liu
Hi, all: Thanks to BALATON, and David for their reviews. In PATCH v6: 1. Replaced the bool type with enum mtree_node_type to improve code readability. 2. Modified the output to use only one horizontal dash instead of two, and aligned character printing for a cleaner look. like this: ``` $ ./

[PATCH v6 1/1] system: improve visual representation of node hierarchy in 'info mtree' output for qemu monitor

2025-04-30 Thread Chao Liu
Make the hierarchical relationship between nodes clearer by adding characters. e.g. ``` $ qemu-system-riscv64 -M virt -monitor stdio -display none (qemu) info mtree ... address-space: memory `- - (prio 0, i/o): system |- 1000- (prio

Re: [PATCH v2 0/9] hw/riscv/virt.c: memmap usage cleanup

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 11:00 PM Daniel Henrique Barboza wrote: > > Hi, > > In this new version a small change was made in patch 9 after > discussions with Joel during v1 [1]. The idea is that we want to be > consistent (as close as we can) with the idea that a > memory address is a hwaddr type. >

Re: [PATCH v2 8/9] hw/riscv/virt.c: use s->memmap in finalize_fdt() functions

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 11:01 PM Daniel Henrique Barboza wrote: > > Change create_fdt_pcie(), create_fdt_reset(), create_fdt_uart() and > create_fdt_rtc() to use s->memmap in their logic. > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > hw/riscv/virt.

Re: [PATCH v2 9/9] hw/riscv/virt.c: remove 'long' casts in fmt strings

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 11:01 PM Daniel Henrique Barboza wrote: > > We can avoid the 'long' casts by using PRIx64 and HWADDR_PRIx on the fmt > strings for uint64_t and hwaddr types. > > Signed-off-by: Daniel Henrique Barboza > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis

Re: [PATCH v2 7/9] hw/riscv/virt.c: use s->memmap in create_fdt_virtio()

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 11:02 PM Daniel Henrique Barboza wrote: > > create_fdt_virtio() can use s->memmap instead of having an extra > argument for it. > > While we're at it rewrite it a little bit to avoid the clunky line in > 'name' and code repetition: > > - declare 'virtio_base' out of the loo

Re: [PATCH v2 6/9] hw/riscv/virt.c: use s->memmap in create_fdt_sockets() path

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 11:01 PM Daniel Henrique Barboza wrote: > > create_fdt_sockets() and all its fdt helpers (create_fdt_socket_aplic(), > create_fdt_imsic(), create_fdt_socket_plic(), create_fdt_socket_aclint() > and create_fdt_socket_memory()) can use s->memmap from their > RISCVVirtState po

Re: [PATCH v2 5/9] hw/riscv/virt.c: use s->memmap in create_fdt() path

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 11:01 PM Daniel Henrique Barboza wrote: > > create_fdt(), create_fdt_flash() and create_fdt_fw_cfg() can access the > memmap via their RISCVVirtState pointers. > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > hw/riscv/virt.c |

Re: [PATCH v2 4/9] hw/riscv/virt.c: add 'base' arg in create_fw_cfg()

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 11:00 PM Daniel Henrique Barboza wrote: > > The function can receive the value via s->memmap[VIRT_FW_CFG].base from > the caller, avoiding the use of virt_memmap. > > Signed-off-by: Daniel Henrique Barboza > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Franc

Re: [PATCH v2 3/9] hw/riscv/virt.c: use s->memmap in virt_machine_done()

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 10:59 PM Daniel Henrique Barboza wrote: > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > hw/riscv/virt.c | 15 +++ > 1 file changed, 7 insertions(+), 8 deletions(-) > > diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c

Re: [PATCH v2 2/9] hw/riscv/virt.c: remove trivial virt_memmap references

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 10:59 PM Daniel Henrique Barboza wrote: > > We should use s->memmap instead of virt_memmap to be able to use an > updated memmap when we start versioning the board. > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > hw/riscv/virt

Re: [PATCH] target/riscv: Fix fcvt.s.bf16 NaN box checking

2025-04-30 Thread Alistair Francis
On Wed, Apr 30, 2025 at 6:23 PM Anton Blanchard wrote: > > fcvt.s.bf16 uses the FP16 check_nanbox_h() which returns an FP16 > quiet NaN. Add check_nanbox_bf16() which returns a BF16 quiet NaN. You are missing a Signed-off-by line Alistair > --- > target/riscv/fpu_helper.c | 2 +- > target/ris

Re: [PATCH v2 08/12] target/arm/cpu: remove TARGET_BIG_ENDIAN dependency

2025-04-30 Thread Anton Johansson via
On 30/04/25, Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier > --- > target/arm/cpu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > index 07f279fec8c..37b11e8866f 100644 > --- a/target/arm/cpu.c > +++ b/target/arm/cpu.c

Re: [PATCH v5 0/9] target/riscv/kvm: CSR related fixes

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 10:46 PM Daniel Henrique Barboza wrote: > > Hi, > > This version has a fix on patch 8 where I did use an extra variable and > happened to set the wrong mask too. > > We'll let the compiler cast the uint32_t from an uint64_t reg. A cast > was added for extra clarity when rea

Re: [PATCH v5 9/9] target/riscv/kvm: add scounteren CSR

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 10:47 PM Daniel Henrique Barboza wrote: > > Add support for the scounteren KVM CSR. Note that env->scounteren is a > 32 bit and all KVM CSRs are target_ulong, so scounteren will be capped > to 32 bits read/writes. > > Reported-by: Andrew Jones > Signed-off-by: Daniel Henri

Re: [PATCH v5 8/9] target/riscv/kvm: read/write KVM regs via env size

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 10:46 PM Daniel Henrique Barboza wrote: > > We're going to add support for scounteren in the next patch. KVM defines > as a target_ulong CSR, while QEMU defines env->scounteren as a 32 bit > field. This will cause the current code to read/write a 64 bit CSR in a > 32 bit fi

Re: [PATCH v5 7/9] target/riscv/kvm: add senvcfg CSR

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 10:47 PM Daniel Henrique Barboza wrote: > > We're missing the senvcfg CSRs which is already present in the > KVM UAPI. > > Reported-by: Andrew Jones > Signed-off-by: Daniel Henrique Barboza > Reviewed-by: Andrew Jones Acked-by: Alistair Francis Alistair > --- > targ

[PATCH 2/6] accel/tcg: Don't use TARGET_LONG_BITS in decode_sleb128

2025-04-30 Thread Richard Henderson
When we changed decode_sleb128 from target_long to int64_t, we failed to adjust the shift limit. Cc: qemu-sta...@nongnu.org Fixes: c9ad8d27caa ("tcg: Widen gen_insn_data to uint64_t") Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 6/6] accel/tcg: Use vaddr in cpu_loop.h

2025-04-30 Thread Richard Henderson
Use vaddr instead of abi_ptr or target_ulong for a guest address. Signed-off-by: Richard Henderson --- include/user/cpu_loop.h | 12 +--- accel/tcg/user-exec.c | 2 +- linux-user/signal.c | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/user/cpu_l

Re: [PATCH v5 6/9] target/riscv/kvm: do not read unavailable CSRs

2025-04-30 Thread Alistair Francis
On Tue, Apr 29, 2025 at 10:45 PM Daniel Henrique Barboza wrote: > > [1] reports that commit 4db19d5b21 broke a KVM guest running kernel 6.6. > This happens because the kernel does not know 'senvcfg', making it > unable to boot because QEMU is reading/wriiting it without any checks. > > After conve

[PATCH 3/6] accel/tcg: Use target_long_bits() in translate-all.c

2025-04-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index acf32e6c08..6b6e10be9d 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -54,6 +

[PATCH 1/6] tcg: Define INSN_START_WORDS as constant 3

2025-04-30 Thread Richard Henderson
Use the same value for all targets. Rename TARGET_INSN_START_WORDS and do not depend on TARGET_INSN_START_EXTRA_WORDS. Remove TCGContext.insn_start_words. Signed-off-by: Richard Henderson --- include/tcg/insn-start-words.h | 11 +-- include/tcg/tcg-op.h | 17 ++---

[PATCH 5/6] accel/tcg: Build tcg-all.c twice

2025-04-30 Thread Richard Henderson
Remove some unused headers. Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 6 +- accel/tcg/meson.build | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 0ce34ac912..6e5dc333d5 100644 --- a/accel/tcg/tcg-all.

[PATCH 0/6] accel/tcg: Build translate-all, tcg-all twice

2025-04-30 Thread Richard Henderson
Based-on: 20250430164854.2233995-1-richard.hender...@linaro.org ("[PATCH v2 00/16] accel/tcg: Compile cpu-exec.c twice") Based-on: 20250403234914.9154-6-phi...@linaro.org ("RFC PATCH-for-10.1 05/19] qemu: Introduce target_long_bits()") The finish line for accel/tcg is in sight... r~ Richard Hend

[PATCH 4/6] accel/tcg: Build translate-all.c twice

2025-04-30 Thread Richard Henderson
Remove lots and lots of unused headers. Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 32 accel/tcg/meson.build | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c in

Re: [PATCH 7/7] target/riscv: Fix write_misa vs aligned next_pc

2025-04-30 Thread Alistair Francis
On Wed, Apr 30, 2025 at 12:34 AM Richard Henderson wrote: > > On 4/25/25 08:23, Richard Henderson wrote: > > -if ((val & RVC) && (GETPC() & ~3) != 0) { > > +/* Suppress 'C' if next instruction is not aligned. */ > > +if ((val & RVC) && (get_next_pc(env, ra) & ~3) != 0) { > > Bah. I pr

Re: [PATCH] qtest/migration/rdma: Add test for rdma migration with ipv6

2025-04-30 Thread Peter Xu
On Wed, Apr 30, 2025 at 09:49:40AM +, Zhijian Li (Fujitsu) wrote: > > > On 30/04/2025 16:48, Zhijian Li (Fujitsu) via wrote: > >>> stderr: > >>> qemu-system-x86_64: cannot get rkey > >>> qemu-system-x86_64: error while loading state section id 2(ram) > >>> qemu-system-x86_64: load of migratio

Re: [PATCH v3 1/1] system: optimizing info mtree printing for monitors

2025-04-30 Thread David Hildenbrand
On 30.04.25 11:58, Philippe Mathieu-Daudé wrote: Hi Chao, On 30/4/25 11:02, Chao Liu wrote: Make the hierarchical relationship between nodes clearer by adding characters W.r.t. $Subject, it isn't really about "optimization" but making output clearer, as you describe. e.g. qemu-system-risc

Re: [PATCH v5 0/1] Optimizing the print format of the QEMU monitor 'info mtree'

2025-04-30 Thread BALATON Zoltan
On Thu, 1 May 2025, Chao Liu wrote: Hi, all: Thanks to Markus, BALATON, and Philippe for their reviews In PATCH v5: Fix one comment, level 0 no longer prints line characters. ``` -/* Level 0 always has a col. */ +/* Level 0 always has not a col. */ if (level == 0 || col_string == N

Re: [PATCH v7 0/6] Report vfio-ap configuration changes

2025-04-30 Thread Rorie Reyes
On 4/28/25 5:29 PM, Cédric Le Goater wrote: On 4/25/25 07:23, Rorie Reyes wrote: Changelog: v7: - Dropped initial commit for linux-header file vfio.h since I created two new commits to address the changes made in v6 - Moved patches 6 and 7 to the beginning of the series after dropping the f

Re: [PATCH v3 2/2] io: Increase unix socket buffers on Linux

2025-04-30 Thread Nir Soffer
> On 29 Apr 2025, at 0:37, Eric Blake wrote: > > On Sun, Apr 27, 2025 at 07:50:29PM +0300, Nir Soffer wrote: >> Like macOS we have similar issue on Linux. For TCP socket the send >> buffer size is 2626560 bytes (~2.5 MiB) and we get good performance. >> However for unix socket the default and m

[PATCH v2 10/15] vfio: add device IO ops vector

2025-04-30 Thread John Levon
For vfio-user, device operations such as IRQ handling and region read/writes are implemented in userspace over the control socket, not ioctl() to the vfio kernel driver; add an ops vector to generalize this, and implement vfio_device_io_ops_ioctl for interacting with the kernel vfio driver. Origin

Re: [PATCH 8/9] virtio-gpu: fix hang under TCG when unmapping blob

2025-04-30 Thread Dmitry Osipenko
On 4/30/25 13:24, Alex Bennée wrote: >> On 4/30/25 00:19, Alex Bennée wrote: This change makes QEMU to crash. >>> What is your command line to cause the crash? >> I applied this patch on top of native context v11, ran AMD nctx and >> got a crash on SDDM startup. > Did you also include the pre-

[PATCH v2 1/2] block/null: Report DATA if not reading zeroes

2025-04-30 Thread Nir Soffer
If read-zeroes is not set, we did not report BDRV_BLOCK_DATA or BDRV_BLOCK_ZERO. This is not consistent with other drivers and can confuse users or other programs: % qemu-img map --output json "json:{'driver': 'raw', 'file': {'driver': 'null-co', 'size': '1g'}}" [{ "start": 0, "length": 1

[PATCH v2 0/2] block/null: Add read-pattern option

2025-04-30 Thread Nir Soffer
The null driver is very usefull for testing and benchmarking, but it can not emulate an image full of zeroes or an image full of non-zero bytes. Such images are needed for testing computing a blkhash via qemu-nbd or qemu-storage-daemon. This change adds `read-pattern` option allowing emulution of

[PATCH v2 2/2] block/null: Add read-pattern option

2025-04-30 Thread Nir Soffer
When the `read-zeroes` is set, reads produce zeroes, and block status return BDRV_BLOCK_ZERO, emulating a sparse image. If we don't set `read-zeros` we report BDRV_BLOCK_DATA, but image data is undefined; posix_memalign, _aligned_malloc, valloc, or memalign do not promise to zero allocated memory.

[PATCH v2 03/15] vfio: add vfio_attach_device_by_iommu_type()

2025-04-30 Thread John Levon
Allow attachment by explicitly passing a TYPE_VFIO_IOMMU_* string; vfio-user will use this later. Reviewed-by: Cédric Le Goater Signed-off-by: John Levon --- hw/vfio/device.c | 22 +++--- include/hw/vfio/vfio-device.h | 3 +++ 2 files changed, 18 insertions(+), 7 d

Re: [PATCH 2/2] block/null: Add read-pattern option

2025-04-30 Thread Nir Soffer
> On 29 Apr 2025, at 0:55, Eric Blake wrote: > > On Mon, Apr 28, 2025 at 01:59:00AM +0300, Nir Soffer wrote: >> When the `read-zeroes` is set, reads produce zeroes, and block status >> return BDRV_BLOCK_ZERO, emulating a sparse image. >> >> If we don't set `read-zeros` we report BDRV_BLOCK_DA

[PATCH v2 02/15] vfio: add vfio_unprepare_device()

2025-04-30 Thread John Levon
Add a helper that's the inverse of vfio_prepare_device(). Signed-off-by: John Levon --- hw/vfio/container.c | 6 +++--- hw/vfio/device.c | 7 +++ hw/vfio/iommufd.c | 4 +--- include/hw/vfio/vfio-device.h | 1 + 4 files changed, 12 insertions(+), 6 deletions

Re: [PATCH 2/2] block/null: Add read-pattern option

2025-04-30 Thread Nir Soffer
> On 29 Apr 2025, at 9:00, Markus Armbruster wrote: > > Eric Blake writes: > >> On Mon, Apr 28, 2025 at 01:59:00AM +0300, Nir Soffer wrote: >>> When the `read-zeroes` is set, reads produce zeroes, and block status >>> return BDRV_BLOCK_ZERO, emulating a sparse image. >>> >>> If we don't set

[PATCH v2 08/15] vfio: add unmap_all flag to DMA unmap callback

2025-04-30 Thread John Levon
We'll use this parameter shortly; this just adds the plumbing. Signed-off-by: John Levon --- hw/vfio/container-base.c | 4 ++-- hw/vfio/container.c | 8 ++-- hw/vfio/iommufd.c | 6 +- hw/vfio/listener.c| 8 i

[PATCH v2 11/15] vfio: add region info cache

2025-04-30 Thread John Levon
Instead of requesting region information on demand with VFIO_DEVICE_GET_REGION_INFO, maintain a cache: this will become necessary for performance for vfio-user, where this call becomes a message over the control socket, so is of higher overhead than the traditional path. We will also need it to ge

[PATCH v2 14/15] vfio/container: pass listener_begin/commit callbacks

2025-04-30 Thread John Levon
The vfio-user container will later need to hook into these callbacks; set up vfio to use them, and optionally pass them through to the container. Signed-off-by: John Levon --- hw/vfio/listener.c| 28 +++ include/hw/vfio/vfio-container-base.h | 2 ++ 2

[PATCH v2 01/15] vfio: add vfio_prepare_device()

2025-04-30 Thread John Levon
Commonize some initialization code shared by the legacy and iommufd vfio implementations. Reviewed-by: Cédric Le Goater Signed-off-by: John Levon --- hw/vfio/container.c | 14 ++ hw/vfio/device.c | 14 ++ hw/vfio/iommufd.c | 9 +---

Re: [PATCH 1/2] block/null: Report DATA if not reading zeroes

2025-04-30 Thread Nir Soffer
> On 29 Apr 2025, at 0:49, Eric Blake wrote: > > On Mon, Apr 28, 2025 at 01:58:59AM +0300, Nir Soffer wrote: >> If read-zeroes is not set, we did not report BDRV_BLOCK_DATA or >> BDRV_BLOCK_ZERO. This is not consistent with other drivers and can >> confuse users or other programs: >> >>%

[PATCH v2 00/15] vfio: preparation for vfio-user

2025-04-30 Thread John Levon
Hi, this series is against the vfio-next tree: https://github.com/legoater/qemu/commits/vfio-next The series contains patches to vfio to prepare for the vfio-user implementation. A previous version of these patches can be found at https://lore.kernel.org/all/20250409134814.478903-1-john.le...@nuta

[PATCH v2 15/15] vfio/container: pass MemoryRegion to DMA operations

2025-04-30 Thread John Levon
Pass through the MemoryRegion to DMA operation handlers of vfio containers. The vfio-user container will need this later. Originally-by: John Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John Levon --- hw/vfio/container-base.c | 4 ++--

[PATCH v2 05/15] vfio: consistently handle return value for helpers

2025-04-30 Thread John Levon
Various bits of code that call vfio device APIs should consistently use the "return -errno" approach for passing errors back, rather than presuming errno is (still) set correctly. Signed-off-by: John Levon --- hw/vfio/pci.c | 33 - 1 file changed, 20 insertions(+)

[PATCH v2 09/15] vfio: implement unmap all for DMA unmap callbacks

2025-04-30 Thread John Levon
Handle unmap_all in the DMA unmap handlers rather than in the caller. Signed-off-by: John Levon --- hw/vfio/container.c | 45 +++-- hw/vfio/iommufd.c | 15 ++- hw/vfio/listener.c | 19 ++- 3 files changed, 55 insertions(+), 2

[PATCH v2 04/15] vfio: add vfio_device_get_irq_info() helper

2025-04-30 Thread John Levon
Add a helper similar to vfio_device_get_region_info() and use it everywhere. Replace a couple of needless allocations with stack variables. As a side-effect, this fixes a minor error reporting issue in the call from vfio_msix_early_setup(). Reviewed-by: Cédric Le Goater Signed-off-by: John Levo

[PATCH v2 12/15] vfio: add read/write to device IO ops vector

2025-04-30 Thread John Levon
Now we have the region info cache, add ->region_read/write device I/O operations instead of explicit pread()/pwrite() system calls. --- hw/vfio/device.c | 38 +++ hw/vfio/pci.c | 28 +- hw/vfio/region.c

[PATCH v2 06/15] include/qemu: add strread/writeerror()

2025-04-30 Thread John Levon
Add simple helpers to correctly report failures from read/write routines using the return -errno style. Signed-off-by: John Levon --- include/qemu/error-report.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h index 3a

[PATCH v2 07/15] vfio: add vfio_pci_config_space_read/write()

2025-04-30 Thread John Levon
Add these helpers that access config space and return an -errno style return. Signed-off-by: John Levon --- hw/vfio/pci.c | 123 -- 1 file changed, 80 insertions(+), 43 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 768c48d7ad..8455

[PATCH v2 13/15] vfio: add vfio-pci-base class

2025-04-30 Thread John Levon
Split out parts of TYPE_VFIO_PCI into a base TYPE_VFIO_PCI_BASE, although we have not yet introduced another subclass, so all the properties have remained in TYPE_VFIO_PCI. Note that currently there is no need for additional data for TYPE_VFIO_PCI, so it shares the same C struct type as TYPE_VFIO_

Re: [PATCH qemu v2 1/2] accel/tcg: Fixed cross-page overflow for 32 bit guest

2025-04-30 Thread Richard Henderson
On 4/29/25 09:03, ~percival_foss wrote: From: Percival Foss The bug being resolved is that the current code in mmu_lookup() assumes a valid 64-bit address space. If a guest has a 32-bit address space, a page translation that crosses beyond the last page in the address space will overflow out of

Re: [PATCH v2 07/12] accel/hvf: add hvf_enabled() for common code

2025-04-30 Thread Pierrick Bouvier
On 4/30/25 11:43 AM, Richard Henderson wrote: On 4/30/25 07:58, Pierrick Bouvier wrote: +++ b/accel/hvf/hvf-stub.c @@ -0,0 +1,3 @@ +#include "qemu/osdep.h" + +bool hvf_allowed; Even small files require license lines. Otherwise, Reviewed-by: Richard Henderson I'll add it, thanks. r~

  1   2   3   4   >