[PATCH 3/5] tests/qtest/bios-tables-test: Update changed ACPI blobs

2025-05-25 Thread Gustavo Romero
Update the aarch64 'virt' base blob and all of its variants. All of them have the same diff, so only one is shown below. The essential changes is in the AML code of the _OSC (OS Capabilities) method, (variable name from 'CTRL' to 'Local0') and the scope for GED device. DSDT table diff: Definitio

Re: [PULL 8/9] alsaaudio: Set try-poll to false by default

2025-05-25 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: BALATON Zoltan > > Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to > use an event loop instead of the audio timer. This works most of the > time. But the poll event handler in the ALSA backend has a bug. For > example, if the guest

Re: [PATCH] tests/qtest: Remove migration-helpers.c

2025-05-25 Thread Markus Armbruster
Fabiano Rosas writes: > Commit 407bc4bf90 ("qapi: Move include/qapi/qmp/ to include/qobject/") > brought the migration-helpers.c back by mistake. This file has been > replaced with migration/migration-qmp.c and > migration/migration-util.c. > > Fixes: 407bc4bf90 ("qapi: Move include/qapi/qmp/ to

Re: [PATCH v4 10/15] qapi: make s390x specific CPU commands unconditionally available

2025-05-25 Thread Thomas Huth
On 22/05/2025 21.05, Pierrick Bouvier wrote: From: Daniel P. Berrangé This removes the TARGET_S390X and CONFIG_KVM conditions from the CPU commands that are conceptually specific to s390x. Top level stubs are provided to cope with non-s390x targets, or builds without KVM. The removal of CONFIG

Re: [PATCH 3/4] hw/microblaze: Remove the big-endian variants of ml605 and xlnx-zynqmp-pmu

2025-05-25 Thread Thomas Huth
On 25/05/2025 21.19, Philippe Mathieu-Daudé wrote: On 16/5/25 16:06, Thomas Huth wrote: On 16/05/2025 17.00, Philippe Mathieu-Daudé wrote: On 15/5/25 15:20, Thomas Huth wrote: From: Thomas Huth Both machines were added with little-endian in mind only (the "endianness" CPU property was hard-w

Re: [PATCH v4] tests/functional: Add PCI hotplug test for aarch64

2025-05-25 Thread Thomas Huth
On 24/05/2025 17.38, Alex Bennée wrote: Gustavo Romero writes: Add a functional test, aarch64_hotplug_pci, to exercise PCI hotplug and hot-unplug on arm64. Signed-off-by: Gustavo Romero Reviewed-by: Daniel P. Berrangé --- MAINTAINERS | 5 ++ tests/functi

Re: [PATCH 00/22] ACPI PCI Hotplug support on ARM

2025-05-25 Thread Gustavo Romero
Hi Eric, On 5/14/25 14:00, Eric Auger wrote: This series enables ACPI PCI hotplug/hotunplug on ARM and makes it default for 10.1 machine type. This aligns with x86 q35 machine. Expected benefits should be similar to those listed in [1]. It is still possible to disable it using a virt machine op

Re: New test in bios-tables-test.c for the ACPI PCI hotplug on ARM series

2025-05-25 Thread Gustavo Romero
Hi Eric, On 5/22/25 22:13, Gustavo Romero wrote: Hi Eric, While we go through the ACPI PCI Hotplug series [0] and review it, I'm starting to take a look at tests/qtest/bios-tables-test.c. You mentioned testing the combinations of "acpi-root-pci-hotplug" and "acpi-pci-hotplug-with-bridge-suppor

[PATCH 4/5] tests/qtest/bios-tables-test: Add aarch64 ACPI PCI hotplug test

2025-05-25 Thread Gustavo Romero
Add a test to verify that the aarch64 'virt' machine correctly generates the ACPI tables and AML code for PCI device hotplug. Signed-off-by: Gustavo Romero --- tests/data/acpi/aarch64/virt/DSDT.acpipcihp | 0 tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/qtest/bios-tables-test.c

[PATCH v4 06/11] qemu-thread: Use futex for QemuEvent on Windows

2025-05-25 Thread Akihiko Odaki
Use the futex-based implementation of QemuEvent on Windows to remove code duplication and remove the overhead of event object construction and destruction. Signed-off-by: Akihiko Odaki --- include/qemu/thread-posix.h | 9 include/qemu/thread-win32.h | 6 --- include/qemu/thread.h

[PATCH v4 04/11] qemu-thread: Replace __linux__ with CONFIG_LINUX

2025-05-25 Thread Akihiko Odaki
scripts/checkpatch.pl warns for __linux__ saying "architecture specific defines should be avoided". Signed-off-by: Akihiko Odaki --- include/qemu/thread-posix.h | 2 +- util/qemu-thread-posix.c| 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qemu/thread-posi

[PATCH 5/5] qtest/bios-tables-test: Update aarch64/virt 'acpipcihp' variant blob

2025-05-25 Thread Gustavo Romero
Update the .acpipcihp blob variant for the aarch64 'virt' machine. Since this is a new blob, the diff is large and not particularly useful, so below is the diff against the base DSDT blob with ACPI PCI off. Main changes include: a) The _OSC method, which now allows the platform to control PCIe

[PATCH 2/5] tests/qtest/bios-tables-test: Keep ACPI PCI hotplug off

2025-05-25 Thread Gustavo Romero
ACPI PCI hotplug is now turned on by default so we need to change the existing tests to keep it off. However, even setting the ACPI PCI hotplug off in the existing tests, there will be changes in the ACPI tables because the _OSC method was modified, hence in the next patch of this series the blobs

[PATCH 0/5] ACPI tests for PCI Hotplug on ARM

2025-05-25 Thread Gustavo Romero
This series updates the existing ACPI tests to work with the new support for ACPI PCI hotplug on aarch64, which is now enabled by default in the 'virt' machine. Because ACPI PCI hotplug is now enabled by default it's necessary to disable it (acpi-pcihp=off) for the existing tests, because they use

[PATCH v4 09/11] migration/colo: Replace QemuSemaphore with QemuEvent

2025-05-25 Thread Akihiko Odaki
colo_exit_sem and colo_incoming_sem represent one-shot events so they can be converted into QemuEvent, which is more lightweight. Signed-off-by: Akihiko Odaki Reviewed-by: Fabiano Rosas --- migration/migration.h | 6 +++--- migration/colo.c | 20 ++-- 2 files changed, 13 i

[PATCH v4 10/11] migration/postcopy: Replace QemuSemaphore with QemuEvent

2025-05-25 Thread Akihiko Odaki
thread_sync_sem is an one-shot event so it can be converted into QemuEvent, which is more lightweight. Signed-off-by: Akihiko Odaki Reviewed-by: Fabiano Rosas --- migration/migration.h| 4 ++-- migration/postcopy-ram.c | 10 +- migration/savevm.c | 2 +- 3 files changed, 8 i

[PATCH v4 03/11] qemu-thread: Remove qatomic_read() in qemu_event_set()

2025-05-25 Thread Akihiko Odaki
The pair of smp_mb() and qatomic_read() sometimes allows skipping the following qatomic_xchg() call, but it is unclear if it improves performance so remove it. Commit 374293ca6fb0 ("qemu-thread: use acquire/release to clarify semantics of QemuEvent") replaced atomic_mb_read() in qemu_event_set() w

[PATCH v4 00/11] Improve futex usage

2025-05-25 Thread Akihiko Odaki
In a recent discussion, Phil Dennis-Jordan pointed out a quirk in QemuEvent destruction due to futex-like abstraction, which prevented the usage of QemuEvent in new and existing code[1]. With some more thoughts after this discussion, I also found other problem and room of improvement in futex usage

[PATCH v4 05/11] qemu-thread: Avoid futex abstraction for non-Linux

2025-05-25 Thread Akihiko Odaki
qemu-thread used to abstract pthread primitives into futex for the QemuEvent implementation of POSIX systems other than Linux. However, this abstraction has one key difference: unlike futex, pthread primitives require an explicit destruction, and it must be ordered after wait and wake operations.

[PATCH v4 08/11] migration: Replace QemuSemaphore with QemuEvent

2025-05-25 Thread Akihiko Odaki
pause_event can utilize qemu_event_reset() to discard events. Signed-off-by: Akihiko Odaki --- migration/migration.h | 2 +- migration/migration.c | 21 + 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/migration/migration.h b/migration/migration.h index d53

[PATCH v4 11/11] hw/display/apple-gfx: Replace QemuSemaphore with QemuEvent

2025-05-25 Thread Akihiko Odaki
sem in AppleGFXReadMemoryJob is an one-shot event so it can be converted into QemuEvent, which is more specialized for such a use case. Signed-off-by: Akihiko Odaki --- hw/display/apple-gfx.m | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/display/apple-gfx.m b/

[PATCH v4 07/11] qemu-thread: Use futex if available for QemuLockCnt

2025-05-25 Thread Akihiko Odaki
This unlocks the futex-based implementation of QemuLockCnt to Windows. Signed-off-by: Akihiko Odaki --- include/qemu/lockcnt.h | 2 +- util/lockcnt.c | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/qemu/lockcnt.h b/include/qemu/lockcnt.h index f4b62a3f

[PATCH v4 01/11] futex: Check value after qemu_futex_wait()

2025-05-25 Thread Akihiko Odaki
futex(2) - Linux manual page https://man7.org/linux/man-pages/man2/futex.2.html > Note that a wake-up can also be caused by common futex usage patterns > in unrelated code that happened to have previously used the futex > word's memory location (e.g., typical futex-based implementations of > Pthrea

[PATCH v4 02/11] futex: Support Windows

2025-05-25 Thread Akihiko Odaki
Windows supports futex-like APIs since Windows 8 and Windows Server 2012. Signed-off-by: Akihiko Odaki --- meson.build | 2 ++ include/qemu/futex.h | 53 ++- tests/unit/test-aio-multithread.c | 2 +- util/lockcnt.c

Re: [PATCH] virtio-net: Add queues for RSS during migration

2025-05-25 Thread Akihiko Odaki
On 2025/05/26 9:41, Jason Wang wrote: On Thu, May 22, 2025 at 12:39 PM Akihiko Odaki wrote: On 2025/05/22 10:50, 'Jason Wang' via devel wrote: On Wed, May 21, 2025 at 11:51 AM Akihiko Odaki wrote: On 2025/05/21 9:51, Jason Wang wrote: On Fri, May 16, 2025 at 11:29 AM Akihiko Odaki wrote:

Re: [PATCH v1 2/3] target/i386: Add a new CPU feature word for CPUID.7.1.ECX

2025-05-25 Thread Xiaoyao Li
On 1/3/2025 4:48 PM, Xin Li (Intel) wrote: The immediate form of MSR access instructions will use this new CPU feature word. Signed-off-by: Xin Li (Intel) --- target/i386/cpu.c | 23 ++- target/i386/cpu.h | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --g

RE: [PATCH rfcv3 15/21] intel_iommu: Bind/unbind guest page table to host

2025-05-25 Thread Duan, Zhenzhong
>-Original Message- >From: Nicolin Chen >Subject: Re: [PATCH rfcv3 15/21] intel_iommu: Bind/unbind guest page table to ... >> yes based on the current design. when guest GPTT==PT, attach device >> to S2 hwpt, when it goes to S1, then attach it to a S1 hwpt whose >> parent is the aforeme

RE: [PATCH rfcv3 15/21] intel_iommu: Bind/unbind guest page table to host

2025-05-25 Thread Duan, Zhenzhong
>-Original Message- >From: Nicolin Chen ... >> >I think you did some substantial work to isolate the get_hw_info >> >part inside the iommufd backend code, which looks nice and clean >> >as the vIOMMU code simply does iodc->get_cap(). >> > >> >However, that then makes these direct raw ba

Re: [PATCH v1 1/3] target/i386: Remove FRED dependency on WRMSRNS

2025-05-25 Thread Xiaoyao Li
On 1/3/2025 4:48 PM, Xin Li (Intel) wrote: WRMSRNS doesn't become a required feature for FERD, and Linux has removed the dependency, as such remove it from Qemu. Signed-off-by: Xin Li (Intel) Reviewed-by: Xiaoyao Li --- target/i386/cpu.c | 4 1 file changed, 4 deletions(-) diff --

RE: [PATCH V3 29/42] backends/iommufd: change process ioctl

2025-05-25 Thread Duan, Zhenzhong
>-Original Message- >From: Steven Sistare >Subject: Re: [PATCH V3 29/42] backends/iommufd: change process ioctl > >On 5/23/2025 10:56 AM, Steven Sistare wrote: >> On 5/23/2025 4:56 AM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PA

Re: [PATCH] virtio-net: Add queues for RSS during migration

2025-05-25 Thread Jason Wang
On Thu, May 22, 2025 at 12:39 PM Akihiko Odaki wrote: > > On 2025/05/22 10:50, 'Jason Wang' via devel wrote: > > On Wed, May 21, 2025 at 11:51 AM Akihiko Odaki > > wrote: > >> > >> On 2025/05/21 9:51, Jason Wang wrote: > >>> On Fri, May 16, 2025 at 11:29 AM Akihiko Odaki > >>> wrote: > >

Re: [PATCH V5] vfio: return mr from vfio_get_xlat_addr

2025-05-25 Thread Cédric Le Goater
Michael, On 5/20/25 15:46, Cédric Le Goater wrote: @@ -1010,6 +1017,8 @@ static void vfio_iommu_map_dirty_notify(IOMMUNotifier *n, IOMMUTLBEntry *iotlb)   ram_addr_t translated_addr;   Error *local_err = NULL;   int ret = -EINVAL; +    MemoryRegion *mr; +    ram_addr_t xlat; xla

Re: [PATCH v5 03/25] plugins: add hooks for new discontinuity related callbacks

2025-05-25 Thread Julian Ganz
Hi Richard, Richard Henderson wrote: > On 5/19/25 16:19, Julian Ganz wrote: > > diff --git a/plugins/core.c b/plugins/core.c > > index dc1f5cb4d8..f07813d588 100644 > > --- a/plugins/core.c > > +++ b/plugins/core.c > > @@ -104,6 +104,44 @@ static void plugin_vcpu_cb__simple(CPUState *cpu, enum >

Re: [PATCH v5 14/25] target/openrisc: call plugin trap callbacks

2025-05-25 Thread Julian Ganz
Hi Richard, > On 5/19/25 16:19, Julian Ganz wrote: > > diff --git a/target/openrisc/interrupt.c b/target/openrisc/interrupt.c > > index 486823094c..08f0ed9b89 100644 > > --- a/target/openrisc/interrupt.c > > +++ b/target/openrisc/interrupt.c > > @@ -25,11 +25,13 @@ > > #ifndef CONFIG_USER_ONLY >

Re: [PATCH v5 03/25] plugins: add hooks for new discontinuity related callbacks

2025-05-25 Thread Julian Ganz
Hi Richard, CC-ing all the maintainers again. Richard Henderson wrote: > On 5/19/25 16:19, Julian Ganz wrote: > > +QEMU_DISABLE_CFI > > +static void plugin_vcpu_cb__discon(CPUState *cpu, > > + enum qemu_plugin_discon_type type, > > +

Re: [PATCH v5 05/25] target/alpha: call plugin trap callbacks

2025-05-25 Thread Julian Ganz
Hi Richard, May 25, 2025 at 2:14 PM, Richard Henderson wrote: > Having read the whole series now, I think it would be better to change the > TCGCPUOps.do_interrupt interface. > > Instead of having each target call qemu_plugin_*, instead have each > do_interrupt return the discontinuity type, or

Re: [PATCH v2 10/10] target/microblaze: Simplify compute_ldst_addr_type{a,b}

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:20PM +0100, Richard Henderson wrote: > Require TCGv_i32 and TCGv be identical, so drop > the extensions. Return constants when possible > instead of a mov into a temporary. Return register > inputs unchanged when possible. > > Signed-off-by: Richard Henderson Revi

Re: [PATCH v2 09/10] target/microblaze: Drop DisasContext.r0

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:19PM +0100, Richard Henderson wrote: > Return a constant 0 from reg_for_read, and a new > temporary from reg_for_write. > > Signed-off-by: Richard Henderson Reviewed-by: Edgar E. Iglesias > --- > target/microblaze/translate.c | 24 ++-- > 1

Re: [PATCH v2 08/10] target/microblaze: Use TARGET_LONG_BITS == 32 for system mode

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:18PM +0100, Richard Henderson wrote: > Now that the extended address instructions are handled separately > from virtual addresses, we can narrow the emulation to 32-bit. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Richard Henderson > --- > configs/targets/

Re: [PATCH v2 07/10] target/microblaze: Fix printf format in mmu_translate

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:17PM +0100, Richard Henderson wrote: > Use TARGET_FMT_lx to match the target_ulong type of vaddr. > > Signed-off-by: Richard Henderson Reviewed-by: Edgar E. Iglesias > --- > target/microblaze/mmu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > d

Re: [PATCH v2 06/10] target/microblaze: Use TCGv_i64 for compute_ldst_addr_ea

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:16PM +0100, Richard Henderson wrote: > Use an explicit 64-bit type for extended addresses. > > Signed-off-by: Richard Henderson Reviewed-by: Edgar E. Iglesias > --- > target/microblaze/translate.c | 24 > 1 file changed, 12 insertions(+)

Re: [PATCH v2 05/10] target/microblaze: Use uint64_t for CPUMBState.ear

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:15PM +0100, Richard Henderson wrote: > Use an explicit 64-bit type for EAR. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Richard Henderson > --- > target/microblaze/cpu.h | 2 +- > target/microblaze/translate.c | 2 +- > 2 files changed, 2 insertions(

Re: [PATCH v2 04/10] target/microblaze: Implement extended address load/store out of line

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:14PM +0100, Richard Henderson wrote: > Use helpers and address_space_ld/st instead of inline > loads and stores. This allows us to perform operations > on physical addresses wider than virtual addresses. > > Signed-off-by: Richard Henderson Reviewed-by: Edgar E. Ig

Re: [PATCH v2 01/10] target/microblaze: Split out mb_unaligned_access_internal

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:11PM +0100, Richard Henderson wrote: > Use an explicit 64-bit type for the address to store in EAR. > > Signed-off-by: Richard Henderson Reviewed-by: Edgar E. Iglesias > --- > target/microblaze/helper.c | 64 +- > 1 file chang

Re: [PATCH v2 03/10] target/microblaze: Split out mb_transaction_failed_internal

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:13PM +0100, Richard Henderson wrote: > Use an explicit 64-bit type for the address to store in EAR. > > Signed-off-by: Richard Henderson Reviewed-by: Edgar E. Iglesias > --- > target/microblaze/op_helper.c | 70 +-- > 1 file chang

Re: [PATCH v2 02/10] target/microblaze: Introduce helper_unaligned_access

2025-05-25 Thread Edgar E. Iglesias
On Sun, May 25, 2025 at 05:02:12PM +0100, Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Edgar E. Iglesias > --- > target/microblaze/helper.h | 12 ++-- > target/microblaze/helper.c | 7 +++ > 2 files changed, 13 insertions(+), 6 deletions(-) > > diff -

Re: [PATCH 3/4] hw/microblaze: Remove the big-endian variants of ml605 and xlnx-zynqmp-pmu

2025-05-25 Thread Philippe Mathieu-Daudé
On 16/5/25 16:06, Thomas Huth wrote: On 16/05/2025 17.00, Philippe Mathieu-Daudé wrote: On 15/5/25 15:20, Thomas Huth wrote: From: Thomas Huth Both machines were added with little-endian in mind only (the "endianness" CPU property was hard-wired to "true", see commits 133d23b3ad1 and a88bbb00

Re: [PATCH 1/4] hw/microblaze: Add endianness property to the petalogix_s3adsp1800 machine

2025-05-25 Thread Philippe Mathieu-Daudé
+Markus On 24/5/25 13:55, Richard Henderson wrote: On 5/15/25 14:20, Thomas Huth wrote: +static int machine_get_endianness(Object *obj, Error **errp G_GNUC_UNUSED) +{ +    S3Adsp1800MachineState *ms = PETALOGIX_S3ADSP1800_MACHINE(obj); +    return ms->endianness; +} + +static void machine_set_

Re: [PATCH v5 1/6] io: Fix partial struct copy in qio_dns_resolver_lookup_sync_inet()

2025-05-25 Thread Michael Tokarev
On 21.05.2025 16:52, Juraj Marcin wrote: From: Juraj Marcin Commit aec21d3175 (qapi: Add InetSocketAddress member keep-alive) introduces the keep-alive flag, but this flag is not copied together with other options in qio_dns_resolver_lookup_sync_inet(). This patch fixes this issue and also pre

[PATCH v2 06/10] target/microblaze: Use TCGv_i64 for compute_ldst_addr_ea

2025-05-25 Thread Richard Henderson
Use an explicit 64-bit type for extended addresses. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index b1fc9e5624..dc

[PATCH v2 05/10] target/microblaze: Use uint64_t for CPUMBState.ear

2025-05-25 Thread Richard Henderson
Use an explicit 64-bit type for EAR. Signed-off-by: Richard Henderson --- target/microblaze/cpu.h | 2 +- target/microblaze/translate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 6ad8643f2e..3ce28b302f 1006

[PATCH v2 08/10] target/microblaze: Use TARGET_LONG_BITS == 32 for system mode

2025-05-25 Thread Richard Henderson
Now that the extended address instructions are handled separately from virtual addresses, we can narrow the emulation to 32-bit. Signed-off-by: Richard Henderson --- configs/targets/microblaze-softmmu.mak | 4 +--- configs/targets/microblazeel-softmmu.mak | 4 +--- 2 files changed, 2 insertion

[PATCH v2 10/10] target/microblaze: Simplify compute_ldst_addr_type{a, b}

2025-05-25 Thread Richard Henderson
Require TCGv_i32 and TCGv be identical, so drop the extensions. Return constants when possible instead of a mov into a temporary. Return register inputs unchanged when possible. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 26 +- 1 file changed,

[PATCH v2 09/10] target/microblaze: Drop DisasContext.r0

2025-05-25 Thread Richard Henderson
Return a constant 0 from reg_for_read, and a new temporary from reg_for_write. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/transl

[PATCH v2 04/10] target/microblaze: Implement extended address load/store out of line

2025-05-25 Thread Richard Henderson
Use helpers and address_space_ld/st instead of inline loads and stores. This allows us to perform operations on physical addresses wider than virtual addresses. Signed-off-by: Richard Henderson --- target/microblaze/helper.h| 10 +++ target/microblaze/op_helper.c | 40 ++

[PATCH v2 00/10] target/microblaze: Always use TARGET_LONG_BITS == 32

2025-05-25 Thread Richard Henderson
v1: https://lore.kernel.org/qemu-devel/20250212220155.1147144-1-richard.hender...@linaro.org/ Use out-of-line helpers to implement extended address memory ops. With this, we can reduce TARGET_LONG_BITS to the more natural 32 for this 32-bit cpu. Changes for v2: - Handle alignment check inline,

[PATCH v2 01/10] target/microblaze: Split out mb_unaligned_access_internal

2025-05-25 Thread Richard Henderson
Use an explicit 64-bit type for the address to store in EAR. Signed-off-by: Richard Henderson --- target/microblaze/helper.c | 64 +- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index

[PATCH v2 02/10] target/microblaze: Introduce helper_unaligned_access

2025-05-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/microblaze/helper.h | 12 ++-- target/microblaze/helper.c | 7 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/target/microblaze/helper.h b/target/microblaze/helper.h index f740835fcb..41f56a5601 100644 --- a/target/micr

[PATCH v2 03/10] target/microblaze: Split out mb_transaction_failed_internal

2025-05-25 Thread Richard Henderson
Use an explicit 64-bit type for the address to store in EAR. Signed-off-by: Richard Henderson --- target/microblaze/op_helper.c | 70 +-- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/target/microblaze/op_helper.c b/target/microblaze/op_helper.c

[PATCH v2 07/10] target/microblaze: Fix printf format in mmu_translate

2025-05-25 Thread Richard Henderson
Use TARGET_FMT_lx to match the target_ulong type of vaddr. Signed-off-by: Richard Henderson --- target/microblaze/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c index 95a12e16f8..8703ff5c65 100644 --- a/target/microbl

Re: [PATCH 16/22] hw/acpi/ged: Prepare the device to react to PCI hotplug events

2025-05-25 Thread Philippe Mathieu-Daudé
Hi Eric, On 14/5/25 18:01, Eric Auger wrote: QEMU will notify the OS about PCI hotplug/hotunplug events through GED interrupts. Let the GED device handle a new PCI hotplug event. On its occurrence it calls the \\_SB.PCI0.PCNT method with the BLCK mutex held. The GED device uses a dedicated MMIO

Re: [PATCH 01/22] hw/i386/acpi-build: Make aml_pci_device_dsm() static

2025-05-25 Thread Philippe Mathieu-Daudé
On 14/5/25 18:00, Eric Auger wrote: No need to export aml_pci_device_dsm() as it is only used in hw/i386/acpi-build.c. Signed-off-by: Eric Auger --- include/hw/acpi/pci.h | 1 - hw/i386/acpi-build.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Dau

Re: [PATCH] tests/functional/test_mem_addr_space: Use set_machine() to select the machine

2025-05-25 Thread Philippe Mathieu-Daudé
On 21/5/25 15:37, Thomas Huth wrote: From: Thomas Huth By using self.set_machine() the tests get properly skipped in case the machine has not been compiled into the QEMU binary, e.g. when "configure" has been run with "--without-default-devices". Signed-off-by: Thomas Huth --- tests/functio

Re: [PULL 0/9] Audio patches

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

Re: [PATCH v3 19/20] gdbstub: Implement qGDBServerVersion packet

2025-05-25 Thread Philippe Mathieu-Daudé
On 21/5/25 17:42, Alex Bennée wrote: From: Dominik 'Disconnect3d' Czarnota This commit adds support for the `qGDBServerVersion` packet to the qemu gdbstub which could be used by clients to detect the QEMU version (and, e.g., use a workaround for known bugs). This packet is not documented/stan

Re: [PATCH v3 10/20] MAINTAINERS: add Akihiko and Dmitry as reviewers

2025-05-25 Thread Philippe Mathieu-Daudé
On 21/5/25 17:42, Alex Bennée wrote: Thanks for volunteering to help. Cc: Akihiko Odaki Cc: Dmitry Osipenko Signed-off-by: Alex Bennée --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PULL 00/19] Ui patches

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

Re: [PATCH v3 07/20] contrib/plugins: add a scaling factor to the ips arg

2025-05-25 Thread Philippe Mathieu-Daudé
On 22/5/25 06:45, Akihiko Odaki wrote: On 2025/05/22 1:42, Alex Bennée wrote: It's easy to get lost in zeros while setting the numbers of instructions per second. Add a scaling suffix to make things simpler. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier --- v2    - normalise the s

Re: [PATCH v3 05/20] tests/Makefile: include test-plugins in per-arch build deps

2025-05-25 Thread Philippe Mathieu-Daudé
On 22/5/25 11:35, Akihiko Odaki wrote: On 2025/05/22 19:31, Alex Bennée wrote: Akihiko Odaki writes: On 2025/05/22 1:42, Alex Bennée wrote: The user can run a subset of the tcg tests directly, e.g.:     make run-tcg-tests-hexagon-linux-user but in this case we fail if there has not been a fu

Re: [PATCH v3 04/20] tests/qtest: fix igb test failure under --enable-ubsan

2025-05-25 Thread Philippe Mathieu-Daudé
On 22/5/25 06:19, Akihiko Odaki wrote: On 2025/05/22 1:42, Alex Bennée wrote: From: Nabih Estefan    ../tests/qtest/libqos/igb.c:106:5: runtime error: load of misaligned address 0x562040be8e33 for type 'uint32_t', which requires 4 byte alignment Instead of straight casting the uint8_t arra

[Stable-10.0.1 28/59] target/riscv: pmp: move Smepmp operation conversion into a function

2025-05-25 Thread Michael Tokarev
From: Loïc Lefort Signed-off-by: Loïc Lefort Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by: LIU Zhiwei Message-ID: <20250313193011.720075-3-l...@rivosinc.com> Signed-off-by: Alistair Francis Cc: qemu-sta...@nongnu.org (cherry picked from commit 915b203745540e

[Stable-10.0.1 30/59] hw/riscv: Fix type conflict of GLib function pointers

2025-05-25 Thread Michael Tokarev
From: Paolo Bonzini qtest_set_command_cb passed to g_once should match GThreadFunc, which it does not. But using g_once is actually unnecessary, because the function is called by riscv_harts_realize() under the Big QEMU Lock. Reported-by: Kohei Tokunaga Signed-off-by: Paolo Bonzini Reviewed-b

[PULL 6/9] audio/mixeng: remove unnecessary pointer type casts

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin A simple assignment automatically converts a void pointer type to any other pointer type. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin Message-Id: <20250515054429.7385-6-vr_q...@t-online.de> --- audio/mixeng.c | 8 1 file changed, 4 insertions(+),

[PULL 0/9] Audio patches

2025-05-25 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 668df86ee8076152320345d8e36be7c95ec0a09a: Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging (2025-05-23 09:26:29 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git tags

[PULL 7/9] audio: add float sample endianness converters

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin Commit ed2a4a7941 ("audio: proper support for float samples in mixeng") added support for float audio samples. As there were no audio frontend devices with float support at that time, the code was limited to native endian float samples. When nobody was paying attention, an a

[PULL 8/9] alsaaudio: Set try-poll to false by default

2025-05-25 Thread marcandre . lureau
From: BALATON Zoltan Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to use an event loop instead of the audio timer. This works most of the time. But the poll event handler in the ALSA backend has a bug. For example, if the guest can't provide enough audio frames in time, the

[PULL 9/9] audio: Reset rate control when adding bytes

2025-05-25 Thread marcandre . lureau
From: Akihiko Odaki Commit 90320051ea99 ("spiceaudio: add a pcm_ops buffer_get_free function") caused to emit messages saying "Resetting rate control" frequently when the guest generates no frames. audio_rate_peek_bytes() resets the rate control when frames < 0 || frames > 65536 where frames is

[PULL 1/9] tests/functional: use 'none' audio driver for q800 tests

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin Since commit ac13a6b3fd ("audio: add Apple Sound Chip (ASC) emulation") the Quadra 800 machine has an audio device. It is not guaranteed that the default audio driver of the audio subsystem will work correctly on all host systems. Therefore, the 'none' audio driver should be

[PULL 4/9] hw/audio/asc: fix SIGSEGV in asc_realize()

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin AUD_open_out() may fail and return NULL. This may then lead to a segmentation fault in memset() below. The memset() behaviour is undefined if the pointer to the destination object is a null pointer. Add the missing error handling code. Reviewed-by: Marc-André Lureau Signed

[PULL 3/9] audio: fix size calculation in AUD_get_buffer_size_out()

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin The buffer size calculated by AUD_get_buffer_size_out() is often incorrect. sw->hw->samples * sw->hw->info.bytes_per_frame is the size of the mixing engine buffer in audio frames multiplied by the size of one frame of the audio backend. Due to resampling or format conversion,

[PULL 5/9] hw/audio/asc: replace g_malloc0() with g_malloc()

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin There is no need to allocate initialized memory with g_malloc0() if it's directly followed by a memset() function call. g_malloc() is sufficient. Reviewed-by: Marc-André Lureau Reviewed-by: Mark Cave-Ayland Signed-off-by: Volker Rümelin Message-Id: <20250515054429.7385-5-

[PULL 2/9] audio: fix SIGSEGV in AUD_get_buffer_size_out()

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin As far as the emulated audio devices are concerned the pointer returned by AUD_open_out() is an opaque handle. This includes the NULL pointer. In this case, AUD_get_buffer_size_out() should return a sensible buffer size instead of triggering a segmentation fault. All other pu

[Stable-10.0.1 50/59] i386/tcg: Make CPUID_HT and CPUID_EXT3_CMP_LEG supported

2025-05-25 Thread Michael Tokarev
From: Xiaoyao Li Since commit c6bd2dd63420 ("i386/cpu: Set up CPUID_HT in x86_cpu_expand_features() instead of cpu_x86_cpuid()") and commit 99a637a86f55 ("i386/cpu: Set and track CPUID_EXT3_CMP_LEG in env->features[FEAT_8000_0001_ECX]"), it gets warnings when booting the VM with vcpus >= 2 and wi

[Stable-10.0.1 39/59] target/riscv: rvv: Apply vext_check_input_eew to vector integer extension instructions(OPMVV)

2025-05-25 Thread Michael Tokarev
From: Max Chou Handle the overlap of source registers with different EEWs. Co-authored-by: Anton Blanchard Reviewed-by: Daniel Henrique Barboza Signed-off-by: Max Chou Message-ID: <20250408103938.3623486-8-max.c...@sifive.com> Signed-off-by: Alistair Francis Cc: qemu-sta...@nongnu.org (cherr

Re: [PATCH v5 05/25] target/alpha: call plugin trap callbacks

2025-05-25 Thread Richard Henderson
On 5/19/25 16:19, Julian Ganz wrote: We recently introduced API for registering callbacks for trap related events as well as the corresponding hook functions. Due to differences between architectures, the latter need to be called from target specific code. This change places hooks for Alpha targ

[Stable-10.0.1 34/59] target/riscv: rvv: Add CHECK arg to GEN_OPFVF_WIDEN_TRANS

2025-05-25 Thread Michael Tokarev
From: Anton Blanchard Signed-off-by: Anton Blanchard Reviewed-by: Daniel Henrique Barboza Reviewed-by: Max Chou Signed-off-by: Max Chou Message-ID: <20250408103938.3623486-3-max.c...@sifive.com> Signed-off-by: Alistair Francis Cc: qemu-sta...@nongnu.org (cherry picked from commit b0450a101d6

[Stable-10.0.1 53/59] hw/pci-host: Remove unused pci_host_data_be_ops

2025-05-25 Thread Michael Tokarev
From: Rakesh Jeyasingh pci_host_data_be_ops became unused after endianness fixes Suggested-by: Paolo Bonzini Signed-off-by: Rakesh Jeyasingh Reviewed-by: Philippe Mathieu-Daudé Tested-by: Thomas Huth Link: https://lore.kernel.org/r/20250429170354.150581-3-rakeshjb...@gmail.com Signed-off-by:

[Stable-10.0.1 57/59] target/hppa: Copy instruction code into fr1 on FPU assist fault

2025-05-25 Thread Michael Tokarev
From: Helge Deller The hardware stores the instruction code in the lower bits of the FP exception register #1 on FP assist traps. This fixes the FP exception handler on Linux, as the Linux kernel uses the value to decide on the correct signal which should be pushed into userspace (see decode_fpu(

[Stable-10.0.1 58/59] linux-user/hppa: Send proper si_code on SIGFPE exception

2025-05-25 Thread Michael Tokarev
From: Helge Deller Improve the linux-user emulation to send the correct si_code depending on overflow (TARGET_FPE_FLTOVF), underflow (TARGET_FPE_FLTUND), ... Note that the hardware stores the relevant flags in FP exception register #1, which is actually the lower 32-bits of the 64-bit fr[0] regis

[Stable-10.0.1 54/59] qapi/misc-target: Fix the doc to distinguish query-sgx and query-sgx-capabilities

2025-05-25 Thread Michael Tokarev
From: Zhao Liu There're 2 QMP commands: query-sgx and query-sgx-capabilities, but their outputs are very similar and the documentation lacks clear differentiation. >From the codes, query-sgx is used to gather guest's SGX capabilities (including SGX related CPUIDs and EPC sections' size, in SGXIn

[Stable-10.0.1 26/59] hw/nvme: fix nvme hotplugging

2025-05-25 Thread Michael Tokarev
From: Klaus Jensen Commit cd59f50ab017 caused a regression on nvme hotplugging for devices with an implicit nvm subsystem. The nvme-subsys device was incorrectly left with being marked as non-hotpluggable. Fix this. Cc: qemu-sta...@nongnu.org Reported-by: Stéphane Graber Tested-by: Stéphane Gr

[Stable-10.0.1 52/59] hw/pci-host/gt64120: Fix endianness handling

2025-05-25 Thread Michael Tokarev
From: Rakesh Jeyasingh The GT-64120 PCI controller requires special handling where: 1. Host bridge(bus 0 ,device 0) must never be byte-swapped 2. Other devices follow MByteSwap bit in GT_PCI0_CMD The previous implementation incorrectly swapped all accesses, breaking host bridge detection (lspci

[Stable-10.0.1 51/59] i386/hvf: Make CPUID_HT supported

2025-05-25 Thread Michael Tokarev
From: Xiaoyao Li Since Commit c6bd2dd63420 ("i386/cpu: Set up CPUID_HT in x86_cpu_expand_features() instead of cpu_x86_cpuid()"), CPUID_HT will be set in env->features[] in x86_cpu_expand_features() when vcpus >= 2. Later in x86_cpu_filter_features() it will check against the HVF supported bits.

[Stable-10.0.1 42/59] target/riscv: Fix the rvv reserved encoding of unmasked instructions

2025-05-25 Thread Michael Tokarev
From: Max Chou According to the v spec, the encodings of vcomoress.vm and vector mask-register logical instructions with vm=0 are reserved. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Max Chou Message-ID: <20250408103938.3623486-11-max.c...@sifive.com> Signed-off-by: Alistair Francis

[Stable-10.0.1 55/59] migration/multifd: Don't send device state packets with zerocopy flag

2025-05-25 Thread Michael Tokarev
From: "Maciej S. Szmigiero" If zerocopy is enabled for multifd then QIO_CHANNEL_WRITE_FLAG_ZERO_COPY flag is forced into all multifd channel write calls via p->write_flags that was setup in multifd_nocomp_send_setup(). However, device state packets aren't compatible with zerocopy - the data buff

[Stable-10.0.1 56/59] migration: Allow caps to be set when preempt or multifd cap enabled

2025-05-25 Thread Michael Tokarev
From: Peter Xu With commit 82137e6c8c ("migration: enforce multifd and postcopy preempt to be set before incoming"), and if postcopy preempt / multifd is enabled, one cannot setup any capability because these checks would always fail. (qemu) migrate_set_capability xbzrle off Error: Postcopy pree

[Stable-10.0.1 33/59] target/riscv: rvv: Source vector registers cannot overlap mask register

2025-05-25 Thread Michael Tokarev
From: Anton Blanchard Add the relevant ISA paragraphs explaining why source (and destination) registers cannot overlap the mask register. Signed-off-by: Anton Blanchard Reviewed-by: Daniel Henrique Barboza Reviewed-by: Max Chou Signed-off-by: Max Chou Message-ID: <20250408103938.3623486-2-ma

[Stable-10.0.1 59/59] target/hppa: Fix FPE exceptions

2025-05-25 Thread Michael Tokarev
From: Helge Deller Implement FP exception register #1 (lower 32-bits of 64-bit fr[0]). A proper implementation is necessary to allow the Linux kernel in system mode and the qemu linux-user to send proper si_code values on SIGFPE signal. Always set the T-bit on taken exception, and merge over- an

[Stable-10.0.1 36/59] target/riscv: rvv: Apply vext_check_input_eew to OPIVI/OPIVX/OPFVF(vext_check_ss) instructions

2025-05-25 Thread Michael Tokarev
From: Max Chou Handle the overlap of source registers with different EEWs. Co-authored-by: Anton Blanchard Reviewed-by: Daniel Henrique Barboza Signed-off-by: Max Chou Message-ID: <20250408103938.3623486-5-max.c...@sifive.com> Signed-off-by: Alistair Francis Cc: qemu-sta...@nongnu.org (cherr

[Stable-10.0.1 48/59] target/riscv/kvm: add kvm_csr_cfgs[]

2025-05-25 Thread Michael Tokarev
From: Daniel Henrique Barboza At this moment we're not checking if the host has support for any specific CSR before doing get/put regs. This will cause problems if the host KVM doesn't support it (see [1] as an example). We'll use the same approach done with the CPU extensions: read all known KV

  1   2   >