Re: [RFC v4 0/5] Add packed virtqueue to shadow virtqueue

2025-02-10 Thread Eugenio Perez Martin
On Mon, Feb 10, 2025 at 5:25 PM Sahil Siddiq wrote: > > Hi, > > On 2/10/25 7:53 PM, Eugenio Perez Martin wrote: > > On Mon, Feb 10, 2025 at 11:58 AM Sahil Siddiq wrote: > >> On 2/6/25 8:47 PM, Sahil Siddiq wrote: > >>> On 2/6/25 12:42 PM, Eugenio Perez Martin wrote: > On Thu, Feb 6, 2025 at

[PATCH v5 7/7] hw/loongarch/virt: Enable cpu hotplug feature on virt machine

2025-02-10 Thread Bibo Mao
On virt machine, enable CPU hotplug feature has_hotpluggable_cpus. For hot-added CPUs, there is socket-id/core-id/thread-id property set, arch_id can be caculated from these properties. So that cpu slot can be searched from its arch_id. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- h

Re: [PATCH v3 1/7] util/error: Introduce warn_report_err_once()

2025-02-10 Thread Markus Armbruster
Cédric Le Goater writes: > On 2/6/25 14:14, Cédric Le Goater wrote: >> Depending on the configuration of the host and VM, a passthrough >> device may generate recurring DMA mapping errors at runtime. In such >> cases, reporting the issue once is sufficient. >> >> We have already the warn/error_re

Re: [PATCH v3 0/2] include: move include/qapi/qmp/ to include/qobject/

2025-02-10 Thread Markus Armbruster
Markus Armbruster writes: > Daniel P. Berrangé writes: > >> Hi Markus, >> >> These patches seem to have got lost/delayed along the way. Are >> you able to send a pull for them soon ? > > My bad! Will send them out a.s.a.p. Thanks for the reminder! It's in master now.

Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust)

2025-02-10 Thread Junjie Mao
Paolo Bonzini writes: > On 2/10/25 10:59, Zhao Liu wrote: >> On Thu, Feb 06, 2025 at 12:15:14PM +0100, Paolo Bonzini wrote: >>> Not a major change but, as a small but significant step in creating >>> qdev bindings, show how pl011_create can be written without "unsafe" >>> calls (apart from conv

Re: [PATCH 1/2] hw/cxl/cxl-mailbox-utils: Add support for Media operations discovery commands (8.2.9.9.5.3)

2025-02-10 Thread Vinayak Holikatti
On 24/01/25 02:56PM, Jonathan Cameron wrote: On Thu, 23 Jan 2025 10:39:02 +0530 Vinayak Holikatti wrote: Hi Vinayak, Thanks for your patch! Good to add support for this. Various comments inline, but all fairly minor things. thanks, Jonathan CXL spec 3.1 section 8.2.9.9.5.3 describes

[PATCH v5 2/7] hw/loongarch/virt: Add topo properties on CPU object

2025-02-10 Thread Bibo Mao
Add some properties such as socket_id, core_id, thread_id and node_id on LoongArch CPU object. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- target/loongarch/cpu.c | 9 + target/loongarch/cpu.h | 4 2 files changed, 13 insertions(+) diff --git a/target/loongarch/cpu.c b

Re: [PATCH 12/12] rust: pl011: convert pl011_create to safe Rust

2025-02-10 Thread Zhao Liu
On Fri, Feb 07, 2025 at 11:16:23AM +0100, Paolo Bonzini wrote: > Date: Fri, 7 Feb 2025 11:16:23 +0100 > From: Paolo Bonzini > Subject: [PATCH 12/12] rust: pl011: convert pl011_create to safe Rust > X-Mailer: git-send-email 2.48.1 > > Not a major change but, as a small but significant step in cre

[PATCH v5 5/7] hw/loongarch/virt: Implement cpu plug interface

2025-02-10 Thread Bibo Mao
Implement cpu plug interface, and cold-plug cpu uses plug interface when cpu object is created. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- hw/loongarch/virt.c| 88 -- target/loongarch/cpu.c | 1 + 2 files changed, 78 insertions(+), 11 d

Re: [PATCH 11/12] rust: chardev, qdev: add bindings to qdev_prop_set_chr

2025-02-10 Thread Zhao Liu
On Fri, Feb 07, 2025 at 11:16:22AM +0100, Paolo Bonzini wrote: > Date: Fri, 7 Feb 2025 11:16:22 +0100 > From: Paolo Bonzini > Subject: [PATCH 11/12] rust: chardev, qdev: add bindings to > qdev_prop_set_chr > X-Mailer: git-send-email 2.48.1 > > Because the argument to the function is an Owned, t

Re: [PATCH 10/12] rust: irq: define ObjectType for IRQState

2025-02-10 Thread Zhao Liu
> +unsafe impl ObjectType for IRQState { > +type Class = ObjectClass; > +const TYPE_NAME: &'static CStr = > +unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_IRQ) }; > +} > +qom_isa!(IRQState: Object); This is necessary for Owned<>, though IRQState has been defined in C.

[PATCH v5 4/7] hw/loongarch/virt: Implement cpu unplug interface

2025-02-10 Thread Bibo Mao
Implement cpu unplug interfaces including virt_cpu_unplug_request() and virt_cpu_unplug(). Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 58 + 1 file changed, 58 insertions(+) diff --git a/hw/loongarch/virt.c b/hw/loo

[PATCH v5 1/7] hw/loongarch/virt: Add CPU topology support

2025-02-10 Thread Bibo Mao
Add topological relationships for Loongarch VCPU and initialize topology member variables. On LoongArch system there is socket/core/thread topo information, physical CPU id is calculated from CPU topo, every topo sub-field is aligned by power of 2. So it is different from logical cpu index. Co-de

[PATCH v5 6/7] hw/loongarch/virt: Update the ACPI table for hotplug cpu

2025-02-10 Thread Bibo Mao
On LoongArch virt machine, ACPI GED hardware is used for CPU hotplug handler, here CPU hotplug support feature is added based on GED handler, also CPU scan and reject method is added about CPU device in DSDT table. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- hw/loongarch/Kconfig

[PATCH v5 0/7] hw/loongarch/virt: Add cpu hotplug support

2025-02-10 Thread Bibo Mao
LoongArch cpu hotplug is based on ACPI GED device, it depends on patchset where TYPE_HOTPLUG_HANDLER interface is added in ipi and extioi interrupt controller class for cpu hotplug event notification. https://lore.kernel.org/qemu-devel/0d920309-c7ba-48d8-b46d-04ac1e38e...@linaro.org/T/#t It can

[PATCH v5 3/7] hw/loongarch/virt: Add basic cpu plug interface framework

2025-02-10 Thread Bibo Mao
Add basic cpu hotplug interface framework, cpu hotplug interface is stub function and only framework is added here. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- hw/loongarch/virt.c| 29 + target/loongarch/cpu.c | 13 + target/loongarch/cpu

Re: [PATCH 09/12] rust: bindings for MemoryRegionOps

2025-02-10 Thread Zhao Liu
On Fri, Feb 07, 2025 at 11:16:20AM +0100, Paolo Bonzini wrote: > Date: Fri, 7 Feb 2025 11:16:20 +0100 > From: Paolo Bonzini > Subject: [PATCH 09/12] rust: bindings for MemoryRegionOps > X-Mailer: git-send-email 2.48.1 > > Signed-off-by: Paolo Bonzini > --- > rust/hw/char/pl011/src/device.rs

Re: [PATCH 07/12] rust: qdev: switch from legacy reset to Resettable

2025-02-10 Thread Zhao Liu
On Fri, Feb 07, 2025 at 11:16:18AM +0100, Paolo Bonzini wrote: > Date: Fri, 7 Feb 2025 11:16:18 +0100 > From: Paolo Bonzini > Subject: [PATCH 07/12] rust: qdev: switch from legacy reset to Resettable > X-Mailer: git-send-email 2.48.1 > > Signed-off-by: Paolo Bonzini > --- > meson.build

Re: [PULL 00/17] testing and gdbstub updates

2025-02-10 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/25] Block layer patches

2025-02-10 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/12] target-arm queue

2025-02-10 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

[PATCH 0/1] mem/cxl-type3: Add a default value of sn

2025-02-10 Thread Yuquan Wang
The previous default value of sn is UI64_NULL which would cause the cookie of nd_interleave_set be '0' and the "invalid interleave-set -cookie" failure in label validation. As many users maybe not know how to set a unique sn for cxl-type3 device and perhaps be confuesd by the failure of label vali

[PATCH 1/1] mem/cxl-type3: Add a default value of sn

2025-02-10 Thread Yuquan Wang
The previous default value of sn is UI64_NULL which would cause the cookie of nd_interleave_set be '0' and the "invalid interleave-set -cookie" failure in label validation. As many users maybe not know how to set a unique sn for cxl-type3 device and perhaps be confuesd by the failure of label vali

Re: [PATCH v2 03/10] target/arm: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Richard Henderson
On 2/10/25 14:59, Philippe Mathieu-Daudé wrote: On 10/2/25 23:10, Richard Henderson wrote: On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé ---   target/arm/cpu.c | 10 +++

Re: [RFC] target/i386: sev: Add cmdline option to enable the Allowed SEV Features feature

2025-02-10 Thread Tom Lendacky
On 2/10/25 12:53, Tom Lendacky wrote: > On 2/7/25 17:33, Kim Phillips wrote: >> The Allowed SEV Features feature allows the host kernel to control >> which SEV features it does not want the guest to enable [1]. >> >> This has to be explicitly opted-in by the user because it has the >> ability to br

Re: [PATCH v2 03/10] target/arm: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
On 10/2/25 23:10, Richard Henderson wrote: On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé ---   target/arm/cpu.c | 10 +++---   1 file changed, 3 insertions(+), 7 dele

Re: [PATCH v2 18/18] hw/rtc: Add Ricoh RS5C372 RTC emulation

2025-02-10 Thread Bernhard Beschow
Am 10. Februar 2025 14:26:00 UTC schrieb "Philippe Mathieu-Daudé" : >On 6/2/25 22:58, Bernhard Beschow wrote: >> >> >> Am 6. Februar 2025 17:32:31 UTC schrieb Peter Maydell >> : >>> On Tue, 4 Feb 2025 at 09:21, Bernhard Beschow wrote: The implementation just allows Linux to deter

Re: [PATCH v2 04/18] hw/arm: Add i.MX 8M Plus EVK board

2025-02-10 Thread Bernhard Beschow
Am 10. Februar 2025 17:30:01 UTC schrieb Peter Maydell : >On Tue, 4 Feb 2025 at 09:21, Bernhard Beschow wrote: >> >> As a first step, implement the bare minimum: CPUs, RAM, interrupt controller, >> serial. All other devices of the A53 memory map are represented as >> TYPE_UNIMPLEMENTED_DEVICE,

[PATCH v3 10/10] disas: Remove target_words_bigendian() call in initialize_debug_target()

2025-02-10 Thread Philippe Mathieu-Daudé
All CPUClass implementating disas_set_info() must set the disassemble_info::endian value. Ensure that by setting %endian to BFD_ENDIAN_UNKNOWN before calling the CPUClass::disas_set_info() handler, then asserting %endian is not BFD_ENDIAN_UNKNOWN after the call. This allows removing the target_wo

[PATCH v3 06/10] target/ppc: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback always set\ the disassemble_info::endian field. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/ppc/cpu_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/ppc/cpu_init.c b/tar

[PATCH v3 09/10] target/xtensa: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/xtensa/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/xtensa/cpu.c b/target/xtensa/c

[PATCH v3 05/10] target/mips: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/mips/cpu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/mips/cp

[PATCH v3 07/10] target/riscv: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/riscv/cpu.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/riscv/cpu.c b/target/ris

[PATCH v3 02/10] target: Set disassemble_info::endian value for big-endian targets

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field for big-endian targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/hppa/cpu.c | 1 + target/m68k/cpu.c | 1 + target/openrisc/cpu.c | 1 + t

[PATCH v3 08/10] target/sh4: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/sh4/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c inde

[PATCH v3 01/10] target: Set disassemble_info::endian value for little-endian targets

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field for little-endian targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/alpha/cpu.c | 1 + target/avr/cpu.c | 1 + target/hexagon/cpu.c |

[PATCH v3 00/10] disas: Have CPUClass::disas_set_info() callback set the endianness

2025-02-10 Thread Philippe Mathieu-Daudé
Since v2: - Addressed Richard comments, tricore not disingenuously modified. Since v1: - Addressed Thomas & Richard comments Targets are aware of their endianness. No need for a global target_words_bigendian() call in disas/ where we call the CPUClass::disas_set_info() handler which already updat

[PATCH v3 03/10] target/arm: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/cpu.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index

[PATCH v3 04/10] target/microblaze: Set disassemble_info::endian value in disas_set_info

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/microblaze/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/microblaze/cpu.c b/target/

Re: [PATCH v2 10/10] disas: Remove target_words_bigendian() call in initialize_debug_target()

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: All CPUClass implementations must implement disas_set_info() which sets the disassemble_info::endian value. Ensure that by: 1/ assert disas_set_info() handler is not NULL Can we do that earlier than here? @@ -61,15 +60,11 @@ void disas_initial

Re: [PATCH v2 07/10] target/riscv: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/riscv/cpu.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/risc

Re: [PATCH v2 09/10] target/xtensa: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/xtensa/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/xtensa/

Re: [PATCH v2 06/10] target/ppc: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback always set\ the disassemble_info::endian field. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/

Re: [PATCH v2 08/10] target/sh4: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/sh4/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/sh4/cpu.c

Re: [PATCH v2 05/10] target/mips: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have theCPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/mips/cpu.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Richard Henderson

Re: [PATCH v2 04/10] target/microblaze: Set disassemble_info::endian value in disas_set_info

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/microblaze/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/microbla

Re: [PATCH v2 03/10] target/arm: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/target/arm/cpu.c b/ta

Re: [PATCH v2 01/10] target: Set disassemble_info::endian value for little-endian targets

2025-02-10 Thread Philippe Mathieu-Daudé
On 10/2/25 22:54, Richard Henderson wrote: On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: @@ -35,6 +35,11 @@ static const gchar *tricore_gdb_arch_name(CPUState *cs)   return "tricore";   } +static void tricore_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +{ +    info->endian

Re: [PATCH v3 00/24] cpus: Restrict CPU has_work() handlers to system emulation

2025-02-10 Thread Philippe Mathieu-Daudé
On 25/1/25 18:01, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (24): cpus: Restrict cpu_has_work() to system emulation cpus: Un-inline cpu_has_work() cpus: Introduce SysemuCPUOps::has_work() handler target/alpha: Move has_work() from CPUClass to SysemuCPUOps target/arm: Mo

Re: [PATCH v2 00/10] cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro

2025-02-10 Thread Philippe Mathieu-Daudé
On 22/1/25 10:30, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (10): hw/core/generic-loader: Do not open-code cpu_set_pc() gdbstub: Clarify no more than @gdb_num_core_regs can be accessed cpus: Cache CPUClass early in instance_init() handler cpus: Prefer cached CpuClass over

Re: [PATCH v2 02/10] target: Set disassemble_info::endian value for big-endian targets

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: Have theCPUClass::disas_set_info() callback set the disassemble_info::endian field for big-endian targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/hppa/cpu.c | 1 + target/m68k/cpu.c | 1 + target/openr

Re: [PATCH v2 01/10] target: Set disassemble_info::endian value for little-endian targets

2025-02-10 Thread Richard Henderson
On 2/10/25 13:29, Philippe Mathieu-Daudé wrote: @@ -35,6 +35,11 @@ static const gchar *tricore_gdb_arch_name(CPUState *cs) return "tricore"; } +static void tricore_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +{ +info->endian = BFD_ENDIAN_LITTLE; +} While this is no

Re: [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP

2025-02-10 Thread Eric Blake
On Thu, Feb 06, 2025 at 10:20:09AM +0300, Vladimir Sementsov-Ogievskiy wrote: > > --- > > qapi/block-export.json | 10 ++ > > include/block/nbd.h| 6 +++--- > > [..] > > > @@ -52,6 +57,10 @@ > > # > > # @addr: Address on which to listen. > > # > > +# @handshak

Re: [PATCH v3 24/24] cpus: Remove CPUClass::has_work() handler

2025-02-10 Thread Richard Henderson
On 2/10/25 13:36, Philippe Mathieu-Daudé wrote: I'll amend to the description: --- Note, since cpu-common.c is in meson's common_ss[] source set, we must define cpu_exec_class_post_init() in cpu-target.c (which is in the specific_ss[] source set) to have CONFIG_USER_ONLY defined. --- Excellent

Re: [PATCH v3 24/24] cpus: Remove CPUClass::has_work() handler

2025-02-10 Thread Philippe Mathieu-Daudé
On 27/1/25 08:50, Philippe Mathieu-Daudé wrote: On 26/1/25 13:31, Richard Henderson wrote: On 1/25/25 09:01, Philippe Mathieu-Daudé wrote: diff --git a/cpu-target.c b/cpu-target.c index 98e9e7cc4a1..778f622b07a 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -230,6 +230,14 @@ void cpu_class_ini

[PATCH v2 08/10] target/sh4: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/sh4/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index e3c2aea1a64..9d3e6cb2fd7 10

[PATCH v2 09/10] target/xtensa: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/xtensa/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index efbfe73fcfb..bc170

[PATCH v2 04/10] target/microblaze: Set disassemble_info::endian value in disas_set_info

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/microblaze/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 13d194cef88

[PATCH v2 01/10] target: Set disassemble_info::endian value for little-endian targets

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field for little-endian targets. Note, there was no disas_set_info() handler registered for the TriCore target, so we implement one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/alpha/cpu

[PATCH v2 10/10] disas: Remove target_words_bigendian() call in initialize_debug_target()

2025-02-10 Thread Philippe Mathieu-Daudé
All CPUClass implementations must implement disas_set_info() which sets the disassemble_info::endian value. Ensure that by: 1/ assert disas_set_info() handler is not NULL 2/ set %endian to BFD_ENDIAN_UNKNOWN before calling the CPUClass::disas_set_info() handler, then assert %endian is not B

[PATCH v2 06/10] target/ppc: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback always set\ the disassemble_info::endian field. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 25e835d

[PATCH v2 05/10] target/mips: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/mips/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 0b267d2e507..f6d247b530f 1

[PATCH v2 02/10] target: Set disassemble_info::endian value for big-endian targets

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field for big-endian targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/hppa/cpu.c | 1 + target/m68k/cpu.c | 1 + target/openrisc/cpu.c | 1 + target/s390x/cpu.c| 1 + targ

[PATCH v2 03/10] target/arm: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 94f1c55622b..68b3a9d3ab0 100644

[PATCH v2 07/10] target/riscv: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/riscv/cpu.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 3d4bd157d2c..b39a

[PATCH v2 00/10] disas: Have CPUClass::disas_set_info() callback set the endianness

2025-02-10 Thread Philippe Mathieu-Daudé
Missing review: patch #3 Since v1: - Addressed Thomas & Richard comments Targets are aware of their endianness. No need for a global target_words_bigendian() call in disas/ where we call the CPUClass::disas_set_info() handler which already update disassemble_info fields. Specify the target endian

Re: [PATCH 03/10] target/arm: Set disassemble_info::endian value in disas_set_info()

2025-02-10 Thread Philippe Mathieu-Daudé
On 27/1/25 14:57, Thomas Huth wrote: On 27/01/2025 12.54, Philippe Mathieu-Daudé wrote: Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé ---   target/arm/cpu.c | 2 ++   1 file changed, 2 insertions(+) diff --git a/targe

[PULL 13/32] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
Do not explain why VFIO_PLATFORM devices are user_creatable, have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to make explicit that they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Message-

[PULL 32/32] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo

2025-02-10 Thread Philippe Mathieu-Daudé
From: Peter Maydell The SMC91C111 includes an MMU Command register which permits the guest to remove entries from the RX FIFO. The datasheet does not specify what happens if the guest tries to do this when the FIFO is already empty; there are no status registers containing error bits which might

[PULL 27/32] tests/functional: Explicit endianness of microblaze assets

2025-02-10 Thread Philippe Mathieu-Daudé
The archive used in test_microblaze_s3adsp1800.py (testing a big-endian target) contains a big-endian kernel. Rename using the _BE suffix. Similarly, the archive in test_microblazeel_s3adsp1800 (testing a little-endian target) contains a little-endian kernel. Rename using _LE suffix. These change

[PULL 26/32] hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus

2025-02-10 Thread Philippe Mathieu-Daudé
Using the auto_create_sdcard feature without SD Bus is irrelevant. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20250204200934.65279-8-phi...@linaro.org> --- system/vl.c | 16 1 file changed, 16 insertions(+) diff --git a/system/vl.c b/system/vl.

[PULL 29/32] tests/functional: Remove sleep() kludges from microblaze tests

2025-02-10 Thread Philippe Mathieu-Daudé
Commit f0ec14c78c4 ("tests/avocado: Fix console data loss") fixed QEMUMachine's problem with console, we don't need to use the sleep() kludges. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250206131052.30

[PULL 22/32] hw/boards: Rename no_sdcard -> auto_create_sdcard

2025-02-10 Thread Philippe Mathieu-Daudé
Invert the 'no_sdcard' logic, renaming it as the more explicit "auto_create_sdcard". Machines are supposed to create a SD Card drive when this flag is set. In many cases it doesn't make much sense (as boards don't expose SD Card host controller), but this is patch only aims to expose that nonsense;

[PULL 31/32] hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header

2025-02-10 Thread Philippe Mathieu-Daudé
opentitan_machine_init() calls get_system_memory(), which is declared in "exec/address-spaces.h". Include it in order to avoid when refactoring unrelated headers: hw/riscv/opentitan.c:83:29: error: call to undeclared function 'get_system_memory' 83 | MemoryRegion *sys_mem = get_system_

[PULL 18/32] hw/xen: Prefer QOM cast for XenLegacyDevice

2025-02-10 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Makes the code less sensitive regarding changes in the class hierarchy which will be performed in the next patch. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20250127094129.15941-1-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Da

[PULL 28/32] tests/functional: Allow microblaze tests to take a machine name argument

2025-02-10 Thread Philippe Mathieu-Daudé
Make microblaze tests a bit more generic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250206131052.30207-14-phi...@linaro.org> --- tests/functional/test_microblaze_s3adsp1800.py | 7 +-- tests/functional/test_microblazeel_s3adsp1800.py | 7 +-- 2 file

[PULL 11/32] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro

2025-02-10 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Reviewed-b

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
On 25/1/25 19:13, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (9): hw/sysbus: Use sizeof(BusState) in main_system_bus_create() hw/sysbus: Declare QOM types using DEFINE_TYPES() macro hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE hw/vfio: Have VFIO_PLATFORM devices inherit

[PULL 23/32] hw/boards: Do not create unusable default if=sd drives

2025-02-10 Thread Philippe Mathieu-Daudé
A number of machines create an if=sd drive by default even though they lack an SD bus, and therefore cannot use the drive. This drive is created when the machine sets flag @auto_create_sdcard. See for example running HMP "info block" on the HPPA C3700 machine: $ qemu-system-hppa -M C3700 -moni

[PULL 25/32] hw/riscv: Remove all invalid uses of auto_create_sdcard=true

2025-02-10 Thread Philippe Mathieu-Daudé
MachineClass::auto_create_sdcard is only useful to automatically create a SD card, attach a IF_SD block drive to it and plug the card onto a SD bus. None of the RISCV machines modified by this commit try to use the IF_SD interface. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth M

[PULL 19/32] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
Because the legacy Xen backend devices can optionally be plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Remove the implicit TYPE_XENSYSDEV instance_size. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alexander Graf Tested-by: Bernhard Beschow Reviewed

[PULL 24/32] hw/arm: Remove all invalid uses of auto_create_sdcard=true

2025-02-10 Thread Philippe Mathieu-Daudé
MachineClass::auto_create_sdcard is only useful to automatically create a SD card, attach a IF_SD block drive to it and plug the card onto a SD bus. None of the ARM machines modified by this commit try to use the IF_SD interface. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Mes

[PULL 03/32] hw/net/xilinx_ethlite: Make device endianness configurable

2025-02-10 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Signed-off-by: Philippe Mathieu-D

[PULL 30/32] tests/functional: Have microblaze tests inherit common parent class

2025-02-10 Thread Philippe Mathieu-Daudé
Have the MicroblazeMachine class being common to both MicroblazeBigEndianMachine and MicroblazeLittleEndianMachine classes. Move the xmaton and ballerina tests to the parent class. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250206131052.30207-16-phi...@linaro.o

[PULL 20/32] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state

2025-02-10 Thread Philippe Mathieu-Daudé
MachineClass::no_sdcard is initialized as false by default. To catch all uses, convert it to a tri-state, having the current default (false) becoming AUTO. No logical change intended. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250204200934.65279-2-phi...@linar

[PULL 17/32] hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
Because the TPM TIS sysbus device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Reviewed-by: Clément Mathieu--Drif Reviewed-by: Stefan Berg

[PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-10 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Reviewed-by: Richard Henderson Signed

[PULL 14/32] hw/display: Have RAMFB device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
Because the RAM FB device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Reviewed-by: Clément Mathieu--Drif Message-Id: <20250125181343.5915

[PULL 21/32] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF

2025-02-10 Thread Philippe Mathieu-Daudé
Update MachineClass::no_sdcard default implicit AUTO initialization to explicit OFF. This flag is consumed in system/vl.c::qemu_disable_default_devices(). Use this place to assert we don't have anymore AUTO state. In hw/ppc/e500.c we add the ppce500_machine_class_init() method to initialize once a

[PULL 09/32] hw/core/machine: Reject thread level cache

2025-02-10 Thread Philippe Mathieu-Daudé
From: Zhao Liu Currently, neither i386 nor ARM have real hardware support for per- thread cache, and there is no clear demand for this specific cache topology. Additionally, since ARM even can't support this special cache topology in device tree, it is unnecessary to support it at this moment, e

[PULL 07/32] hw/arm/xlnx-zynqmp: Use &error_abort for programming errors

2025-02-10 Thread Philippe Mathieu-Daudé
When a property value is static (not provided by QMP or CLI), error shouldn't happen, otherwise it is a programming error. Therefore simplify and use &error_abort as this can't fail. Reported-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <2

[PULL 16/32] hw/net: Have eTSEC device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
Because the network eTSEC device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Reviewed-by: Clément Mathieu--Drif Tested-by: Bernhard Besch

[PULL 10/32] hw/sysbus: Use sizeof(BusState) in main_system_bus_create()

2025-02-10 Thread Philippe Mathieu-Daudé
Rather than using the obscure system_bus_info.instance_size, directly use sizeof(BusState). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Reviewed-by: Clément Mathieu--Drif Message-Id: <20250125181343.59151-2-phi...@linaro.org> --- hw/core/sys

[PULL 15/32] hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
Do not explain why _X86_IOMMU devices are user_creatable, have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to explicit they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Reviewed-by: Clément

[PULL 06/32] hw/ssi/xilinx_spi: Make device endianness configurable

2025-02-10 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Reviewed-by: Richard Henderson S

[PULL 12/32] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
Some TYPE_SYS_BUS_DEVICEs can be optionally dynamically plugged on the TYPE_PLATFORM_BUS_DEVICE. Rather than sometimes noting that with comment around the 'user_creatable = true' line in each DeviceRealize handler, introduce an abstract TYPE_DYNAMIC_SYS_BUS_DEVICE class. Signed-off-by: Philippe Ma

[PULL 00/32] Misc HW patches for 2025-02-10

2025-02-10 Thread Philippe Mathieu-Daudé
The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886: Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/armbru into staging (2025-02-10 10:47:31 -0500) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-misc-202

[PULL 08/32] hw/intc/apic: Fixes magic number use, removes outdated comment

2025-02-10 Thread Philippe Mathieu-Daudé
From: Phil Dennis-Jordan This changes replaces the use of an explicit literal constant for the APIC base address mask with the existing symbolic constant intended for this purpose. Additionally, we remove the comment about not being able to re-enable the APIC after disabling it. This is no longe

[PULL 01/32] backends/tpm: Use qemu_hexdump_line() to avoid sprintf()

2025-02-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1. Using qemu_hexdump_line() both fixes the deprecation warning and simplifies the code base. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Berger [rth: Keep the linebreaks every 16 bytes] Signed-off-by: Richard Henderson

[PULL 02/32] hw/intc/xilinx_intc: Make device endianness configurable

2025-02-10 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Reviewed-by: Richard Henderson Signed

  1   2   3   4   >