Re: [PATCH] virtio-net: Copy all for dhclient workaround

2025-04-18 Thread Akihiko Odaki
On 2025/04/11 22:20, Antoine Damhet wrote: On Fri, Apr 11, 2025 at 05:01:01PM +0900, Akihiko Odaki wrote: On 2025/04/07 17:29, Antoine Damhet wrote: On Sat, Apr 05, 2025 at 05:04:28PM +0900, Akihiko Odaki wrote: The goal of commit 7987d2be5a8b ("virtio-net: Copy received header to buffer") was

Re: [PATCH] virtio: Call set_features during reset

2025-04-18 Thread Akihiko Odaki
On 2025/04/16 14:46, Jason Wang wrote: On Thu, Apr 10, 2025 at 3:42 PM Akihiko Odaki wrote: virtio-net expects set_features() will be called when the feature set used by the guest changes to update the number of virtqueues. Call it during reset as reset clears all features and the queues added

Re: [PATCH v3 3/9] vnc: h264: send additional frames after the display is clean

2025-04-18 Thread Marc-André Lureau
On Fri, Apr 18, 2025 at 3:54 PM Dietmar Maurer wrote: > > The H264 implementation only sends frames when it detects changes in > the server's framebuffer. This leads to artifacts when there are no > further changes, as the internal H264 encoder may still contain data. > > This patch modifies the c

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-18 Thread Marc-André Lureau
Hi On Fri, Apr 18, 2025 at 3:41 PM Dietmar Maurer wrote: > > This patch implements H264 support for VNC. The RFB protocol > extension is defined in: > > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding > > Currently the Gstreamer x264enc plugin (software encoder)

Re: [PATCH v3 1/9] new configure option to enable gstreamer

2025-04-18 Thread Marc-André Lureau
On Fri, Apr 18, 2025 at 3:51 PM Dietmar Maurer wrote: > > GStreamer is required to implement H264 encoding for VNC. Please note > that QEMU already depends on this library when you enable Spice. > > Signed-off-by: Dietmar Maurer > --- > meson.build | 10 ++ > meson_opti

Re: [RFC PATCH v3 11/14] hw/core/machine: Allow dynamic registration of valid CPU types

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 18:16, Pierrick Bouvier wrote: On 4/18/25 10:29, Philippe Mathieu-Daudé wrote: Add MachineClass::valid_cpu_types_list, a dynamic list of strings. CPU types can be registered with machine_class_add_valid_cpu_type(). Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud

Re: [PATCH 00/11] hw/arm: Define machines as generic QOM types

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 11:48, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: On 18/4/25 18:33, Pierrick Bouvier wrote: On 4/18/25 01:53, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: While DEFINE_MACHINE() is a succinct macro, it doesn't allow register

Re: [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:32, Philippe Mathieu-Daudé wrote: On 18/4/25 19:23, Pierrick Bouvier wrote: On 4/18/25 10:10, Philippe Mathieu-Daudé wrote: On 18/4/25 19:07, Pierrick Bouvier wrote: On 4/18/25 10:04, Philippe Mathieu-Daudé wrote: On 18/4/25 18:30, Pierrick Bouvier wrote: On 4/18/25 07:07, Phil

Re: [RFC PATCH v3 11/14] hw/core/machine: Allow dynamic registration of valid CPU types

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:29, Philippe Mathieu-Daudé wrote: Add MachineClass::valid_cpu_types_list, a dynamic list of strings. CPU types can be registered with machine_class_add_valid_cpu_type(). Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 8

Re: [RFC PATCH v3 13/14] qemu/target_info: Add target_aarch64() helper

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:29, Philippe Mathieu-Daudé wrote: Add a helper to distinct the binary is targetting Aarch64 or not. Start with a dump strcmp() implementation, leaving room for future optimizations. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/target_info.h | 7 +++ target_info.c

Re: [RFC PATCH v3 08/14] config/target: Implement per-binary TargetInfo structure (ARM, AARCH64)

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:29, Philippe Mathieu-Daudé wrote: Implement the TargetInfo structure for qemu-system-arm and qemu-system-aarch64 binaries. Signed-off-by: Philippe Mathieu-Daudé --- configs/targets/aarch64-softmmu.c | 22 ++ configs/targets/arm-softmmu.c | 22 +++

Re: [RFC PATCH v3 07/14] meson: Prepare to accept per-binary TargetInfo structure implementation

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:29, Philippe Mathieu-Daudé wrote: If a file defining the binary TargetInfo structure is available, link with it. Otherwise keep using the stub. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 9 - configs/targets/meson.build | 3 +++ 2 files cha

Re: [RFC PATCH v3 06/14] hw/arm: Filter machine types for qemu-system-arm/aarch64 binaries

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:29, Philippe Mathieu-Daudé wrote: Since the qemu-system-aarch64 binary is able to run all machines indistinctly, simply register the TYPE_TARGET_AARCH64_MACHINE interface for all existing machines under the hw/arm/ directory. Very few machines are restricted to the qemu-system-aarc

Re: [RFC PATCH v3 05/14] hw/core: Allow ARM/Aarch64 binaries to use the 'none' machine

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:28, Philippe Mathieu-Daudé wrote: When we'll start to use target_machine_typename() to filter machines for the ARM/Aarch64 binaries, the 'none' machine will be filtered out. Register the proper interfaces to keep it available. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/nu

Re: [RFC PATCH v3 04/14] hw/arm: Register TYPE_TARGET_ARM/AARCH64_MACHINE QOM interfaces

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:28, Philippe Mathieu-Daudé wrote: Define the TYPE_TARGET_ARM_MACHINE and TYPE_TARGET_AARCH64_MACHINE QOM interface names to allow machines to implement them. Register these interfaces in common code in target_info-qom.c used by all binaries because QOM interfaces must be registered

Re: [RFC PATCH v3 03/14] system/vl: Filter machine list available for a particular target binary

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:28, Philippe Mathieu-Daudé wrote: Binaries can register a QOM type to filter their machines by filling their TargetInfo::machine_typename field. This can be used by example by main() -> machine_help_func() to filter the machines list. Signed-off-by: Philippe Mathieu-Daudé --- m

Re: [PATCH] xen: mapcache: Fix finding matching entry

2025-04-18 Thread Stefano Stabellini
On Thu, 10 Apr 2025, Aleksandr Partanen wrote: > If we have request without lock and hit unlocked or invalid > entry during the search, we remap it immediately, > even if we have matching entry in next entries in bucket. > This leads to duplication of mappings of the same size, > and to possibility

Re: [PATCH] common-user/host/riscv: use tail pseudoinstruction for calling tail

2025-04-18 Thread Richard Henderson
On 4/17/25 00:22, Icenowy Zheng wrote: The j pseudoinstruction maps to a JAL instruction, which can only handle a jump to somewhere with a signed 20-bit destination. In case of static linking and LTO'ing this easily leads to "relocation truncated to fit" error. Switch to use tail pseudoinstructi

Re: [PATCH v2 01/11] block: Expand block status mode from bool to enum

2025-04-18 Thread Eric Blake
On Fri, Apr 18, 2025 at 02:02:20PM -0500, Eric Blake wrote: > > I have trouble understanding what the exact semantics are of these modes > > are. Would it be possible to pass flags to block status calls that can > > be ORed together instead: WANT_OFFSET_VALID, WANT_ZERO, etc? The flags > > would be

[PATCH v2.5 02/11] file-posix, gluster: Handle zero block status hint better

2025-04-18 Thread Eric Blake
Although the previous patch to change 'bool want_zero' into a bitmask made no semantic change, it is now time to differentiate. When the caller specifically wants to know what parts of the file read as zero, we need to use lseek and actually reporting holes, rather than short-circuiting and advert

[PATCH v2.5 01/11] block: Expand block status mode from bool to flags

2025-04-18 Thread Eric Blake
This patch is purely mechanical, changing bool want_zero into an unsigned int for bitwise-or of flags. As of this patch, all implementations are unchanged (the old want_zero==true is now mode==BDRV_WANT_PRECISE which is a superset of BDRV_WANT_ZERO); but the callers in io.c that used to pass want_

Re: [PATCH 2/5] vfio: Move realize() after attach_device()

2025-04-18 Thread Donald Dutile
On 4/11/25 6:17 AM, Zhenzhong Duan wrote: Previously device attaching depends on realize() getting host iommu capabilities to check dirty tracking support. Now we save a caps copy in VFIODevice and check that copy for dirty tracking support, there is no dependency any more, move realize() ca

Re: [PATCH 2/5] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-04-18 Thread Donald Dutile
On 4/16/25 1:38 AM, Shameerali Kolothum Thodi wrote: -Original Message- From: Nicolin Chen Sent: Wednesday, April 16, 2025 5:19 AM To: Shameerali Kolothum Thodi Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; ddut..

Re: [PATCH 0/5] Add support for user creatable SMMUv3 device

2025-04-18 Thread Donald Dutile
Shameer, Hi! First off, like the partitioning of these pieces. On 4/15/25 4:10 AM, Shameer Kolothum wrote: Hi All, This patch series introduces support for a user-creatable SMMUv3 device (-device arm-smmuv3-dev) in QEMU. Can we drop the '-dev', as 'arm-smmu' is sufficient, as is '-device'?

Re: [PATCH] io: Set unix socket buffers on macOS

2025-04-18 Thread Nir Soffer
> On 18 Apr 2025, at 21:55, Eric Blake wrote: > > On Fri, Apr 18, 2025 at 05:24:36PM +0300, Nir Soffer wrote: >> Testing with qemu-nbd shows that computing a hash of an image via >> qemu-nbd is 5-7 times faster with this change. >> > >> +++ b/io/channel-socket.c >> @@ -410,6 +410,19 @@ qio_ch

Re: [PATCH] io: Set unix socket buffers on macOS

2025-04-18 Thread Nir Soffer
This should be changed also on the client side. The libnbd part is here: https://gitlab.com/nbdkit/libnbd/-/merge_requests/21 We may want to change also the nbd client code used in qemu-img. I can look at this later. > On 18 Apr 2025, at 17:24, Nir Soffer wrote: > > Testing with qemu-nbd sho

Re: [PATCH] io: Set unix socket buffers on macOS

2025-04-18 Thread Nir Soffer
> On 18 Apr 2025, at 17:50, Philippe Mathieu-Daudé wrote: > > Hi Nir, > > On 18/4/25 16:24, Nir Soffer wrote: >> Testing with qemu-nbd shows that computing a hash of an image via >> qemu-nbd is 5-7 times faster with this change. >> Tested with 2 qemu-nbd processes: >> $ ./qemu-nbd-after -

[Bug 1037606] Re: vmwgfx does not work with kvm vmware vga

2025-04-18 Thread Jürg Häfliger
** Tags added: kernel-daily-bug -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1037606 Title: vmwgfx does not work with kvm vmware vga Status in Linux: Confirmed Status in QEMU: Won't Fix Statu

Re: [PATCH v2 04/11] block: Add new bdrv_co_is_all_zeroes() function

2025-04-18 Thread Eric Blake
On Thu, Apr 17, 2025 at 04:35:33PM -0400, Stefan Hajnoczi wrote: > On Thu, Apr 17, 2025 at 01:39:09PM -0500, Eric Blake wrote: > > There are some optimizations that require knowing if an image starts > > out as reading all zeroes, such as making blockdev-mirror faster by > > skipping the copying of

Re: [PATCH v2 01/11] block: Expand block status mode from bool to enum

2025-04-18 Thread Eric Blake
On Thu, Apr 17, 2025 at 04:17:55PM -0400, Stefan Hajnoczi wrote: > On Thu, Apr 17, 2025 at 01:39:06PM -0500, Eric Blake wrote: > > This patch is purely mechanical, changing bool want_zero into a new > > enum BlockStatusMode. As of this patch, all implementations are > > unchanged (the old want_zer

Re: [PATCH 00/11] hw/arm: Define machines as generic QOM types

2025-04-18 Thread BALATON Zoltan
On Fri, 18 Apr 2025, Pierrick Bouvier wrote: On 4/18/25 10:07, Philippe Mathieu-Daudé wrote: On 18/4/25 19:03, Pierrick Bouvier wrote: On 4/18/25 09:59, Philippe Mathieu-Daudé wrote: On 18/4/25 18:33, Pierrick Bouvier wrote: On 4/18/25 01:53, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philip

Re: [PATCH] io: Set unix socket buffers on macOS

2025-04-18 Thread Eric Blake
On Fri, Apr 18, 2025 at 05:24:36PM +0300, Nir Soffer wrote: > Testing with qemu-nbd shows that computing a hash of an image via > qemu-nbd is 5-7 times faster with this change. > > +++ b/io/channel-socket.c > @@ -410,6 +410,19 @@ qio_channel_socket_accept(QIOChannelSocket *ioc, > } > #endif

Re: [PATCH 00/11] hw/arm: Define machines as generic QOM types

2025-04-18 Thread BALATON Zoltan
On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: On 18/4/25 18:33, Pierrick Bouvier wrote: On 4/18/25 01:53, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: While DEFINE_MACHINE() is a succinct macro, it doesn't allow registering QOM interfaces to the defined machine

Re: [PATCH 8/8] gdbstub/helpers: Evaluate TARGET_BIG_ENDIAN at compile time

2025-04-18 Thread Richard Henderson
On 4/17/25 06:10, Philippe Mathieu-Daudé wrote: Rather than evaluating TARGET_BIG_ENDIAN at preprocessing time via #ifdef'ry, do it in C at compile time Signed-off-by: Philippe Mathieu-Daudé --- include/gdbstub/helpers.h | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff

Re: [PATCH 7/8] hw/microblaze: Evaluate TARGET_BIG_ENDIAN at compile time

2025-04-18 Thread Richard Henderson
On 4/17/25 06:10, Philippe Mathieu-Daudé wrote: Rather than evaluating TARGET_BIG_ENDIAN at preprocessing time via #ifdef'ry, do it in C at compile time Signed-off-by: Philippe Mathieu-Daudé --- hw/microblaze/petalogix_ml605_mmu.c | 12 ++-- hw/microblaze/xlnx-zynqmp-pmu.c | 12 ++

Re: [PATCH 6/8] hw/mips: Evaluate TARGET_BIG_ENDIAN at compile time

2025-04-18 Thread Richard Henderson
On 4/17/25 06:10, Philippe Mathieu-Daudé wrote: Rather than evaluating TARGET_BIG_ENDIAN at preprocessing time via #ifdef'ry, do it in C at compile time Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/jazz.c| 10 +++--- hw/mips/malta.c | 21 ++--- hw/mips/mipssim

Re: [PATCH 5/8] target/xtensa: Evaluate TARGET_BIG_ENDIAN at compile time

2025-04-18 Thread Richard Henderson
On 4/17/25 06:10, Philippe Mathieu-Daudé wrote: Rather than evaluating TARGET_BIG_ENDIAN at preprocessing time via #ifdef'ry, do it in C at compile time Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/translate.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Revie

Re: [PATCH 4/8] target/ppc: Evaluate TARGET_BIG_ENDIAN at compile time

2025-04-18 Thread Richard Henderson
On 4/17/25 06:10, Philippe Mathieu-Daudé wrote: static inline bool needs_byteswap(const CPUPPCState *env) { -#if TARGET_BIG_ENDIAN - return FIELD_EX64(env->msr, MSR, LE); -#else - return !FIELD_EX64(env->msr, MSR, LE); -#endif + return TARGET_BIG_ENDIAN ^ FIELD_EX64(env->msr, MSR, LE); }

Re: [PATCH 3/8] target/mips: Check CPU endianness at runtime using env_is_bigendian()

2025-04-18 Thread Richard Henderson
On 4/17/25 06:09, Philippe Mathieu-Daudé wrote: Since CPU endianness can be toggled at runtime before resetting, checking the endianness at build time preprocessing the TARGET_BIG_ENDIAN definition isn't correct. We have to call mips_env_is_bigendian() to get the CPU endianness at runtime. Signe

Re: [PATCH 2/8] accel/kvm: Use target_needs_bswap()

2025-04-18 Thread Richard Henderson
On 4/17/25 06:09, Philippe Mathieu-Daudé wrote: Check whether we need to swap at runtime using target_needs_bswap(). Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-all.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) Reviewed-by: Richard Hende

Re: [PATCH 1/8] linux-user/elfload: Use target_needs_bswap()

2025-04-18 Thread Richard Henderson
On 4/17/25 06:09, Philippe Mathieu-Daudé wrote: Check whether we need to swap at runtime using target_needs_bswap(). Signed-off-by: Philippe Mathieu-Daudé --- linux-user/elfload.c | 63 +++- 1 file changed, 39 insertions(+), 24 deletions(-) Reviewed-b

Re: [PATCH 0/7] cpus: Replace CPU_RESOLVING_TYPE -> target_cpu_type()

2025-04-18 Thread Richard Henderson
On 4/17/25 09:54, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (7): qemu: Introduce target_cpu_type() cpus: Replace CPU_RESOLVING_TYPE -> target_cpu_type() cpus: Move target-agnostic methods out of cpu-target.c accel: Implement accel_init_ops_interfaces() for both system/user

Re: [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 19:23, Pierrick Bouvier wrote: On 4/18/25 10:10, Philippe Mathieu-Daudé wrote: On 18/4/25 19:07, Pierrick Bouvier wrote: On 4/18/25 10:04, Philippe Mathieu-Daudé wrote: On 18/4/25 18:30, Pierrick Bouvier wrote: On 4/18/25 07:07, Philippe Mathieu-Daudé wrote: On 18/4/25 05:07, Pier

[RFC PATCH v3 13/14] qemu/target_info: Add target_aarch64() helper

2025-04-18 Thread Philippe Mathieu-Daudé
Add a helper to distinct the binary is targetting Aarch64 or not. Start with a dump strcmp() implementation, leaving room for future optimizations. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/target_info.h | 7 +++ target_info.c | 5 + 2 files changed, 12 inserti

Re: [RFC PATCH v3 01/14] qapi: Rename TargetInfo structure as BinaryTargetInfo

2025-04-18 Thread Philippe Mathieu-Daudé
+Daniel/Markus on this single one. On 18/4/25 19:28, Philippe Mathieu-Daudé wrote: The QAPI-generated 'TargetInfo' structure name is only used in a single file. We want to heavily use another structure similarly named. Rename the QAPI one, since structure names are not part of the public API. S

[RFC PATCH v3 14/14] hw/arm/virt: Replace TARGET_AARCH64 -> target_aarch64()

2025-04-18 Thread Philippe Mathieu-Daudé
Replace the target-specific TARGET_AARCH64 definition by a call to the generic target_aarch64() helper. Signed-off-by: Philippe Mathieu-Daudé --- This removes the last TARGET_AARCH64 in hw/arm/. --- hw/arm/virt.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/arm

[RFC PATCH v3 04/14] hw/arm: Register TYPE_TARGET_ARM/AARCH64_MACHINE QOM interfaces

2025-04-18 Thread Philippe Mathieu-Daudé
Define the TYPE_TARGET_ARM_MACHINE and TYPE_TARGET_AARCH64_MACHINE QOM interface names to allow machines to implement them. Register these interfaces in common code in target_info-qom.c used by all binaries because QOM interfaces must be registered before being checked (see next commit with the 'n

[RFC PATCH v3 05/14] hw/core: Allow ARM/Aarch64 binaries to use the 'none' machine

2025-04-18 Thread Philippe Mathieu-Daudé
When we'll start to use target_machine_typename() to filter machines for the ARM/Aarch64 binaries, the 'none' machine will be filtered out. Register the proper interfaces to keep it available. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/null-machine.c | 6 ++ 1 file changed, 6 insertio

[RFC PATCH v3 12/14] hw/arm/virt: Register valid CPU types dynamically

2025-04-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a3c9ffe29eb..48a0c3588ce 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3134,32 +3134,30 @@ sta

[RFC PATCH v3 01/14] qapi: Rename TargetInfo structure as BinaryTargetInfo

2025-04-18 Thread Philippe Mathieu-Daudé
The QAPI-generated 'TargetInfo' structure name is only used in a single file. We want to heavily use another structure similarly named. Rename the QAPI one, since structure names are not part of the public API. Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pie

[RFC PATCH v3 11/14] hw/core/machine: Allow dynamic registration of valid CPU types

2025-04-18 Thread Philippe Mathieu-Daudé
Add MachineClass::valid_cpu_types_list, a dynamic list of strings. CPU types can be registered with machine_class_add_valid_cpu_type(). Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 8 hw/core/machine.c | 30 +

[RFC PATCH v3 02/14] qemu: Convert target_name() to TargetInfo API

2025-04-18 Thread Philippe Mathieu-Daudé
Have target_name() be a target-agnostic method, dispatching to a per-target TargetInfo singleton structure. By default a stub singleton is used. No logical change expected. Inspired-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- meson.build

[RFC PATCH v3 09/14] hw/arm/aspeed: Build objects once

2025-04-18 Thread Philippe Mathieu-Daudé
Now than Aspeed machines can be filtered when running a qemu-system-arm or qemu-system-aarch64 binary, we can remove the TARGET_AARCH64 #ifdef'ry and compile the aspeed.c file once, moving it from arm_ss[] source set to arm_common_ss[]. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick

[RFC PATCH v3 10/14] hw/arm/raspi: Build objects once

2025-04-18 Thread Philippe Mathieu-Daudé
Now than Raspi machines can be filtered when running a qemu-system-arm or qemu-system-aarch64 binary, we can remove the TARGET_AARCH64 #ifdef'ry and compile the aspeed.c file once, moving it from arm_ss[] source set to arm_common_ss[]. Note, we expose the TYPE_BCM2837 type to qemu-system-arm, but i

[RFC PATCH v3 06/14] hw/arm: Filter machine types for qemu-system-arm/aarch64 binaries

2025-04-18 Thread Philippe Mathieu-Daudé
Since the qemu-system-aarch64 binary is able to run all machines indistinctly, simply register the TYPE_TARGET_AARCH64_MACHINE interface for all existing machines under the hw/arm/ directory. Very few machines are restricted to the qemu-system-aarch64 binary: $ git grep TARGET_AARCH64 hw/arm/me

[RFC PATCH v3 07/14] meson: Prepare to accept per-binary TargetInfo structure implementation

2025-04-18 Thread Philippe Mathieu-Daudé
If a file defining the binary TargetInfo structure is available, link with it. Otherwise keep using the stub. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 9 - configs/targets/meson.build | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 10

[RFC PATCH v3 08/14] config/target: Implement per-binary TargetInfo structure (ARM, AARCH64)

2025-04-18 Thread Philippe Mathieu-Daudé
Implement the TargetInfo structure for qemu-system-arm and qemu-system-aarch64 binaries. Signed-off-by: Philippe Mathieu-Daudé --- configs/targets/aarch64-softmmu.c | 22 ++ configs/targets/arm-softmmu.c | 22 ++ 2 files changed, 44 insertions(+) crea

[RFC PATCH v3 03/14] system/vl: Filter machine list available for a particular target binary

2025-04-18 Thread Philippe Mathieu-Daudé
Binaries can register a QOM type to filter their machines by filling their TargetInfo::machine_typename field. This can be used by example by main() -> machine_help_func() to filter the machines list. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 1 + include/qemu

[RFC PATCH v3 00/14] single-binary: Make hw/arm/ common

2025-04-18 Thread Philippe Mathieu-Daudé
Since v2: - More comments from Pierrick addressed - Use GList to register valid CPUs list - Remove all TARGET_AARCH64 uses in hw/arm/ Since v1: - Dropped unrelated / irrelevant patches - Addressed Pierrick comments - Added R-b tag - Only considering machines, not CPUs. Hi, At this point this ser

Re: [PATCH 00/11] hw/arm: Define machines as generic QOM types

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:07, Philippe Mathieu-Daudé wrote: On 18/4/25 19:03, Pierrick Bouvier wrote: On 4/18/25 09:59, Philippe Mathieu-Daudé wrote: On 18/4/25 18:33, Pierrick Bouvier wrote: On 4/18/25 01:53, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: While DEFINE_MACHINE(

Re: [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:10, Philippe Mathieu-Daudé wrote: On 18/4/25 19:07, Pierrick Bouvier wrote: On 4/18/25 10:04, Philippe Mathieu-Daudé wrote: On 18/4/25 18:30, Pierrick Bouvier wrote: On 4/18/25 07:07, Philippe Mathieu-Daudé wrote: On 18/4/25 05:07, Pierrick Bouvier wrote: On 4/17/25 17:50, Phil

Re: [RFC PATCH v2 02/11] qemu: Convert target_name() to TargetInfo API

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 18:23, Pierrick Bouvier wrote: On 4/18/25 07:02, Philippe Mathieu-Daudé wrote: On 18/4/25 05:01, Pierrick Bouvier wrote: On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Have target_name() be a target-agnostic method, dispatching to a per-target TargetInfo singleton structure. By def

[PATCH v2 3/5] python: update missing dependencies from minreqs

2025-04-18 Thread John Snow
We pin all dependencies for the "check-minreqs" test because pip lacks a dependency resolver that installs "the oldest possible package that meets dependency criteria". So, in order to test our stated minimum requirements, we pin all of our dependencies (and their dependencies, transitively) at the

[PATCH v2 1/5] qapi: Add some pylint ignores

2025-04-18 Thread John Snow
This restores the linting baseline in QAPI. Signed-off-by: John Snow --- scripts/qapi/backend.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qapi/backend.py b/scripts/qapi/backend.py index 14e60aa67af..49ae6ecdd33 100644 --- a/scripts/qapi/backend.py +++ b/scripts/qapi/backend.

Re: [PATCH v3 1/2] file-posix: probe discard alignment on Linux block devices

2025-04-18 Thread Eric Blake
On Thu, Apr 17, 2025 at 11:27:42AM -0500, Eric Blake wrote: > On Mon, Apr 14, 2025 at 04:12:13PM -0400, Stefan Hajnoczi wrote: > > Populate the pdiscard_alignment block limit so the block layer is able > > align discard requests correctly. > > > > Signed-off-by: Stefan Hajnoczi > > --- > > block

RE: [PATCH v3 05/10] hw/arm/aspeed: Add support for loading vbootrom image via "-bios"

2025-04-18 Thread Jamin Lin
Hi Nabih, > Subject: Re: [PATCH v3 05/10] hw/arm/aspeed: Add support for loading > vbootrom image via "-bios" > > This has to happen after we have the bootrom in QEMU or it will fail on the > default cases. Besides that it looks good. > Thanks for review and suggestion. Will update the patch orde

Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs

2025-04-18 Thread Gustavo Romero
Hi Igor and Michael, On 4/10/25 13:22, Gustavo Romero wrote: Hi Igor, On 4/10/25 03:50, Igor Mammedov wrote: On Wed, 9 Apr 2025 12:49:36 -0300 Gustavo Romero wrote: Hi Igor, On 4/9/25 11:05, Igor Mammedov wrote: On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero wrote: Hi Phil, On 4/3/25

[PATCH 01/11] hw/core/null-machine: Define machine as generic QOM type

2025-04-18 Thread Philippe Mathieu-Daudé
While DEFINE_MACHINE() is a succinct macro, it doesn't allow registering QOM interfaces to the defined machine. Convert to the generic DEFINE_TYPES() in preparation to register interfaces. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/null-machine.c | 14 -- 1 file changed, 12 in

[PATCH 04/11] hw/arm/digic: Define machine as generic QOM type

2025-04-18 Thread Philippe Mathieu-Daudé
While DEFINE_MACHINE() is a succinct macro, it doesn't allow registering QOM interfaces to the defined machine. Convert to the generic DEFINE_TYPES() in preparation to register interfaces. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/digic_boards.c | 14 -- 1 file changed, 12 ins

Re: [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 19:07, Pierrick Bouvier wrote: On 4/18/25 10:04, Philippe Mathieu-Daudé wrote: On 18/4/25 18:30, Pierrick Bouvier wrote: On 4/18/25 07:07, Philippe Mathieu-Daudé wrote: On 18/4/25 05:07, Pierrick Bouvier wrote: On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Define the TYPE_TARGET

[PATCH v4 01/10] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize

2025-04-18 Thread Jamin Lin via
The variable "sram_name" was only used for naming the SRAM memory region. Rename it to "name" for consistency with similar code and avoid unnecessary new local variable declarations. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Tested-by: Nabih Estefan --- hw/arm/aspeed_ast27x0.c | 8

[PATCH v4 0/2] block: discard alignment fixes

2025-04-18 Thread Stefan Hajnoczi
v4: - Mention -EINVAL in bdrv_co_pdiscard() comment [Kevin] v3: - Refine error handling when pdiscard_alignment is not a multiple of request_alignment [Hanna] v2: - Fix inverted logic in alignment check [Qing Wang] Two discard alignment issues were identified in https://issues.redhat.com/browse/R

Re: [RFC PATCH v2 09/11] config/target: Implement per-binary TargetInfo structure (Aarch64)

2025-04-18 Thread Pierrick Bouvier
On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Implement the TargetInfo structure for qemu-system-aarch64 binary. Signed-off-by: Philippe Mathieu-Daudé --- configs/targets/aarch64-softmmu.c | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 configs/targets/aa

Re: [RFC V3 PATCH 09/13] microvm: enable sleep GED event

2025-04-18 Thread Annie Li
Hi Gustavo, On 4/17/2025 1:35 PM, Gustavo Romero wrote: Hi Annie, On 4/11/25 17:43, Annie Li wrote: The sleep GED event is enabled for MicroVM. Also, the system suspend is enabled when the GED register is set for sleep. nit: in the commit messages, please stick with a single case for microvm

Re: [PATCH 10/18] amd_iommu: Add a page walker to sync shadow page tables on invalidation

2025-04-18 Thread Ethan MILON
Hi, On 4/13/25 10:02 PM, Alejandro Jimenez wrote: > For the specified address range, walk the page table identifying regions > as mapped or unmapped and invoke registered notifiers with the > corresponding event type. > > Signed-off-by: Alejandro Jimenez > --- > hw/i386/amd_iommu.c | 74 +++

Re: [RFC V3 PATCH 03/13] acpi: Support Control Method sleep button for x86

2025-04-18 Thread Annie Li
Hi Gustavo, On 4/17/2025 1:30 PM, Gustavo Romero wrote: Hi Annie, On 4/11/25 17:34, Annie Li wrote: Add Control Method Sleep button and its GPE event handler for x86 platform. The GPE event handler notifies OSPM when the Sleep button event is triggered. Signed-off-by: Annie Li ---   hw/i386/

Re: [RFC V3 PATCH 06/13] test/acpi: allow DSDT table changes for microvm

2025-04-18 Thread Annie Li
Hi Gustavo, On 4/17/2025 1:33 PM, Gustavo Romero wrote: Annie, On 4/11/25 17:42, Annie Li wrote: list changed files in tests/qtest/bios-tables-test-allowed-diff.h nit: List Good catch, will fix it. Annie Signed-off-by: Annie Li ---   tests/qtest/bios-tables-test-allowed-diff.h | 5 +

Re: [RFC V3 PATCH 10/13] tests/qtest/bios-table-tests: Update ACPI table binaries for microvm

2025-04-18 Thread Annie Li
Hi Gustavo, On 4/17/2025 1:36 PM, Gustavo Romero wrote: Hi Annie, On 4/11/25 17:44, Annie Li wrote: Following is the diff generated by the step 5 and 6 in tests/qtest/bios-tables-test.c Diff from iasl to show changes in DSDT table: --- /tmp/asl-2F0N42.dsl 2025-04-11 12:50:02.892883467 +

Re: [PATCH 00/11] hw/arm: Define machines as generic QOM types

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 19:03, Pierrick Bouvier wrote: On 4/18/25 09:59, Philippe Mathieu-Daudé wrote: On 18/4/25 18:33, Pierrick Bouvier wrote: On 4/18/25 01:53, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: While DEFINE_MACHINE() is a succinct macro, it doesn't allow registeri

Re: [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 10:04, Philippe Mathieu-Daudé wrote: On 18/4/25 18:30, Pierrick Bouvier wrote: On 4/18/25 07:07, Philippe Mathieu-Daudé wrote: On 18/4/25 05:07, Pierrick Bouvier wrote: On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Define the TYPE_TARGET_ARM_MACHINE and TYPE_TARGET_AARCH64_MACHIN

Re: [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 18:30, Pierrick Bouvier wrote: On 4/18/25 07:07, Philippe Mathieu-Daudé wrote: On 18/4/25 05:07, Pierrick Bouvier wrote: On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Define the TYPE_TARGET_ARM_MACHINE and TYPE_TARGET_AARCH64_MACHINE QOM interface names to allow machines to implem

Re: [PATCH 00/11] hw/arm: Define machines as generic QOM types

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 09:59, Philippe Mathieu-Daudé wrote: On 18/4/25 18:33, Pierrick Bouvier wrote: On 4/18/25 01:53, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: While DEFINE_MACHINE() is a succinct macro, it doesn't allow registering QOM interfaces to the defined machine. C

Re: [PATCH 00/11] hw/arm: Define machines as generic QOM types

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 18:33, Pierrick Bouvier wrote: On 4/18/25 01:53, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: While DEFINE_MACHINE() is a succinct macro, it doesn't allow registering QOM interfaces to the defined machine. Convert to the generic DEFINE_TYPES() in preparati

Re: [PATCH v3 2/2] block/io: skip head/tail requests on EINVAL

2025-04-18 Thread Kevin Wolf
Am 14.04.2025 um 22:12 hat Stefan Hajnoczi geschrieben: > When guests send misaligned discard requests, the block layer breaks > them up into a misaligned head, an aligned main body, and a misaligned > tail. > > The file-posix block driver on Linux returns -EINVAL on misaligned > discard requests.

Re: [RFC V3 PATCH 09/13] microvm: enable sleep GED event

2025-04-18 Thread Gustavo Romero
Hi Annie, On 4/11/25 17:43, Annie Li wrote: The sleep GED event is enabled for MicroVM. Also, the system suspend is enabled when the GED register is set for sleep. nit: in the commit messages, please stick with a single case for microvm (or MicroVM, etc). Signed-off-by: Annie Li --- hw/i

Re: [PATCH 01/19] hw/core/loader.c: Fix type conflict of GLib function pointers

2025-04-18 Thread Kohei Tokunaga
Hi Daniel and Philippe, >>> On emscripten, function pointer casts can cause function call failure. >>> This commit fixes the function definition to match to the type of the >>> function call using g_list_sort_with_data. >>> >>> Signed-off-by: Kohei Tokunaga >>> --- >>> hw/core/loader.c | 4 ++--

[RFC PATCH v2 01/11] qapi: Rename TargetInfo structure as BinaryTargetInfo

2025-04-18 Thread Philippe Mathieu-Daudé
The QAPI-generated 'TargetInfo' structure name is only used in a single file. We want to heavily use another structure similarly named. Rename the QAPI one, since structure names are not part of the public API. Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé --- qapi/machin

Re: [PATCH 01/19] hw/core/loader.c: Fix type conflict of GLib function pointers

2025-04-18 Thread Kohei Tokunaga
Hi Daniel, Paolo and Thomas, > > > I suggested this solution to Kohei because it's easy to check that we're > > > converting all users and not introducing new ones in the future (see > > > poisoning in patch 10). > > > > It is easy to check this /one/ example, but this pattern of bad casts > > is

Re: [PATCH] exec: Rename target_words_bigendian() -> target_big_endian()

2025-04-18 Thread Michael S. Tsirkin
On Thu, Apr 17, 2025 at 11:00:25PM +0200, Philippe Mathieu-Daudé wrote: > In commit 98ed8ecfc9d ("exec: introduce target_words_bigendian() > helper") target_words_bigendian() was matching the definition it > was depending on (TARGET_WORDS_BIGENDIAN). Later in commit > ee3eb3a7ce7 ("Replace TARGET_W

Re: [PATCH 00/11] hw/arm: Define machines as generic QOM types

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 01:53, BALATON Zoltan wrote: On Fri, 18 Apr 2025, Philippe Mathieu-Daudé wrote: While DEFINE_MACHINE() is a succinct macro, it doesn't allow registering QOM interfaces to the defined machine. Convert to the generic DEFINE_TYPES() in preparation to register interfaces. Philippe Mathie

Re: [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 07:07, Philippe Mathieu-Daudé wrote: On 18/4/25 05:07, Pierrick Bouvier wrote: On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Define the TYPE_TARGET_ARM_MACHINE and TYPE_TARGET_AARCH64_MACHINE QOM interface names to allow machines to implement them. Signed-off-by: Philippe Mathieu-

Re: [RFC PATCH v2 02/11] qemu: Convert target_name() to TargetInfo API

2025-04-18 Thread Pierrick Bouvier
On 4/18/25 07:02, Philippe Mathieu-Daudé wrote: On 18/4/25 05:01, Pierrick Bouvier wrote: On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Have target_name() be a target-agnostic method, dispatching to a per-target TargetInfo singleton structure. By default a stub singleton is used. No logical c

Re: A question about how to calculate the "Maximum transfer length" in case of its absence in the Block Limits VPD device response from the hardware

2025-04-18 Thread Stefan Hajnoczi
On Thu, Apr 17, 2025 at 07:27:26PM +0800, lma wrote: > Hi all, > > In case of SCSI passthrough, If the Block Limits VPD device response is > absent from hardware, QEMU handles it. > > There are several variables involved in this process as follows: > * The bl.max_transfer > * The bl.max_iov that

[PATCH v3 2/9] add vnc h264 encoder

2025-04-18 Thread Dietmar Maurer
This patch implements H264 support for VNC. The RFB protocol extension is defined in: https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding Currently the Gstreamer x264enc plugin (software encoder) is used to encode the video stream. The gstreamer pipe is: appsrc ->

Re: [PATCH] io: Set unix socket buffers on macOS

2025-04-18 Thread Philippe Mathieu-Daudé
Hi Nir, On 18/4/25 16:24, Nir Soffer wrote: Testing with qemu-nbd shows that computing a hash of an image via qemu-nbd is 5-7 times faster with this change. Tested with 2 qemu-nbd processes: $ ./qemu-nbd-after -r -t -e 0 -f raw -k /tmp/after.sock /var/tmp/bench/data-10g.img & $ ./qe

[PATCH v3 7/9] h264: do not reduce vnc update speed while we have an active h264 stream

2025-04-18 Thread Dietmar Maurer
Signed-off-by: Dietmar Maurer --- ui/vnc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index feab4c0043..6db03a1550 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3222,6 +3222,7 @@ static void vnc_refresh(DisplayChangeListener *dcl) VncDisplay *vd =

[PATCH] io: Set unix socket buffers on macOS

2025-04-18 Thread Nir Soffer
Testing with qemu-nbd shows that computing a hash of an image via qemu-nbd is 5-7 times faster with this change. Tested with 2 qemu-nbd processes: $ ./qemu-nbd-after -r -t -e 0 -f raw -k /tmp/after.sock /var/tmp/bench/data-10g.img & $ ./qemu-nbd-before -r -t -e 0 -f raw -k /tmp/before.so

Re: [RFC PATCH v2 03/11] system/vl: Filter machine list available for a particular target binary

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 05:06, Pierrick Bouvier wrote: On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Binaries can register a QOM type to filter their machines by filling their TargetInfo::machine_typename field. Signed-off-by: Philippe Mathieu-Daudé ---   include/qemu/target_info-impl.h |  3 +++   includ

Re: [PATCH v2] Hexagon (target/hexagon) Remove gen_tcg_func_table.py

2025-04-18 Thread Brian Cain
On 4/16/2025 10:03 AM, Taylor Simpson wrote: This can easily be done in C with opcodes_def_generated.h.inc Note that gen_tcg_func_table.py has some logic to skip instructions. However, there aren't any instructions currently in the code that would be skipped by this logic. So, it is safe to b

Re: [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces

2025-04-18 Thread Philippe Mathieu-Daudé
On 18/4/25 05:07, Pierrick Bouvier wrote: On 4/17/25 17:50, Philippe Mathieu-Daudé wrote: Define the TYPE_TARGET_ARM_MACHINE and TYPE_TARGET_AARCH64_MACHINE QOM interface names to allow machines to implement them. Signed-off-by: Philippe Mathieu-Daudé ---   meson.build    |  1

  1   2   >