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 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 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 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 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 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 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 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

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

[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 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 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

[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 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 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 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 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 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,

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: 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

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 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 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 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 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 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 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 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, 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] 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 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

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 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] 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: [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: [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 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 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 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] 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:

[PATCH v8 2/2] tests/functional: add memlock tests

2025-05-25 Thread Alexandr Moshkov
Add new tests to check the correctness of the `-overcommit memlock` option (possible values: off, on, on-fault) by using `/proc/{qemu_pid}/status` file to check in VmSize, VmRSS and VmLck values: * if `memlock=off`, then VmLck = 0; * if `memlock=on`, then VmLck > 0 and almost all memory is residen

[PATCH v8 1/2] tests/functional: add skipLockedMemoryTest decorator

2025-05-25 Thread Alexandr Moshkov
Used in future commit to skipping execution of a tests if the system's locked memory limit is below the required threshold. Signed-off-by: Alexandr Moshkov Reviewed-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/decorators.py | 18 ++

[PATCH v8 0/2] tests/functional: add memlock tests

2025-05-25 Thread Alexandr Moshkov
Add new tests to check the correctness of the `-overcommit memlock` option (possible values: off, on, on-fault) by using `/proc/{qemu_pid}/status` file to check in VmSize, VmRSS and VmLck values: * if `memlock=off`, then VmLck = 0; * if `memlock=on`, then VmLck > 0 and almost all memory is res

Re: [PATCH 0/3] target/hppa: Fix FP exception handling

2025-05-25 Thread Michael Tokarev
On 25.05.2025 03:42, Helge Deller wrote: On 5/24/25 12:26, Michael Tokarev wrote: On 17.05.2025 15:00, del...@kernel.org wrote: From: Helge Deller This series fixes and improves the floating point exception handling in the hppa system and user emulation. A testcase is included in patch #3. P

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 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 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] 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: [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

[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

[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 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 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 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

[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 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 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 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 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 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 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 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 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

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

[Stable-7.2.18 v2 00/21] Patch Round-up for stable 7.2.18, freeze on 2025-05-24 (frozen)

2025-05-25 Thread Michael Tokarev
The following patches are queued for QEMU stable v7.2.18: https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 Patch freeze is 2025-05-24, and the release is planned for 2025-05-26: https://wiki.qemu.org/Planning/7.2 Please respond here or CC qemu-sta...@nongnu.org on any patches you

[Stable-7.2.18 19/21] virtio: Call set_features during reset

2025-05-25 Thread Michael Tokarev
From: Akihiko Odaki virtio-net expects set_features() will be called when the feature set used by the guest changes to update the number of virtqueues but it is not called during reset, which will clear all features, leaving the queues added for VIRTIO_NET_F_MQ or VIRTIO_NET_F_RSS. Not only these

[Stable-7.2.18 20/21] common-user/host/riscv: use tail pseudoinstruction for calling tail

2025-05-25 Thread Michael Tokarev
From: Icenowy Zheng 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 pseudoinstruction, which is the st

[Stable-9.2.4 37/62] 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-9.2.4 v2 00/62] Patch Round-up for stable 9.2.4, freeze on 2025-05-24 (frozen)

2025-05-25 Thread Michael Tokarev
The following patches are queued for QEMU stable v9.2.4: https://gitlab.com/qemu-project/qemu/-/commits/staging-9.2 Patch freeze is 2025-05-24, and the release is planned for 2025-05-26: https://wiki.qemu.org/Planning/9.2 Please respond here or CC qemu-sta...@nongnu.org on any patches you t

[Stable-9.2.4 42/62] target/riscv: rvv: Apply vext_check_input_eew to vrgather instructions to check mismatched input EEWs encoding constraint

2025-05-25 Thread Michael Tokarev
From: Max Chou According to the v spec, a vector register cannot be used to provide source operands with more than one EEW for a single instruction. The vs1 EEW of vrgatherei16.vv is 16. Co-authored-by: Anton Blanchard Reviewed-by: Daniel Henrique Barboza Signed-off-by: Max Chou Message-ID: <

[Stable-9.2.4 36/62] virtio: Call set_features during reset

2025-05-25 Thread Michael Tokarev
From: Akihiko Odaki virtio-net expects set_features() will be called when the feature set used by the guest changes to update the number of virtqueues but it is not called during reset, which will clear all features, leaving the queues added for VIRTIO_NET_F_MQ or VIRTIO_NET_F_RSS. Not only these

[Stable-9.2.4 46/62] 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

[Stable-9.2.4 52/62] target/riscv/kvm: fix leak in kvm_riscv_init_multiext_cfg()

2025-05-25 Thread Michael Tokarev
From: Daniel Henrique Barboza 'reglist' is being g-malloc'ed but never freed. Reported-by: Andrew Jones Signed-off-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones Reviewed-by: Alistair Francis Message-ID: <20250429124421.223883-3-dbarb...@ventanamicro.com> Signed-off-by: Alistair Franc

[Stable-9.2.4 45/62] target/riscv: rvv: Apply vext_check_input_eew to vector slide instructions(OPIVI/OPIVX)

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-7-max.c...@sifive.com> Signed-off-by: Alistair Francis Cc: qemu-sta...@nongnu.org (cherr

[Stable-9.2.4 41/62] 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

Re: [PATCH] audio: Reset rate control when adding bytes

2025-05-25 Thread Marc-André Lureau
On Mon, Mar 17, 2025 at 9:07 AM Akihiko Odaki wrote: > > 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 fr

[Stable-9.2.4 v3 00/61] Patch Round-up for stable 9.2.4, freeze on 2025-05-24 (frozen)

2025-05-25 Thread Michael Tokarev
The following patches are queued for QEMU stable v9.2.4: https://gitlab.com/qemu-project/qemu/-/commits/staging-9.2 Patch freeze is 2025-05-24, and the release is planned for 2025-05-26: https://wiki.qemu.org/Planning/9.2 v3: drop single riscv-related change: 51 73f81da0a362 Daniel Henriqu

[Stable-9.2.4 40/62] 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-9.2.4 54/62] target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macro

2025-05-25 Thread Michael Tokarev
From: Daniel Henrique Barboza We need the reg_id_ulong() helper to be a macro to be able to create a static array of KVMCPUConfig that will hold CSR information. Despite the amount of changes all of them are tedious/trivial: - replace instances of "kvm_riscv_reg_id_ulong" with "KVM_RISCV_REG_

[Stable-9.2.4 47/62] target/riscv: rvv: Apply vext_check_input_eew to vector narrow/widen instructions

2025-05-25 Thread Michael Tokarev
From: Max Chou Handle the overlap of source registers with different EEWs. The vd of vector widening mul-add instructions is one of the input operands. Co-authored-by: Anton Blanchard Reviewed-by: Daniel Henrique Barboza Signed-off-by: Max Chou Message-ID: <20250408103938.3623486-9-max.c...@s

[Stable-9.2.4 35/62] s390x: Fix leak in machine_set_loadparm

2025-05-25 Thread Michael Tokarev
From: Fabiano Rosas ASAN spotted a leaking string in machine_set_loadparm(): Direct leak of 9 byte(s) in 1 object(s) allocated from: #0 0x560ffb5bb379 in malloc ../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:69:3 #1 0x7f1aca926518 in g_malloc ../glib/gmem.c:106 #2 0x7f1aca94

[Stable-9.2.4 55/62] 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

[Stable-9.2.4 59/62] 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-9.2.4 60/62] 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-9.2.4 56/62] 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-9.2.4 53/62] target/riscv/kvm: turn u32/u64 reg functions into macros

2025-05-25 Thread Michael Tokarev
From: Daniel Henrique Barboza This change is motivated by a future change w.r.t CSRs management. We want to handle them the same way as KVM extensions, i.e. a static array with KVMCPUConfig objs that will be read/write during init and so on. But to do that properly we must be able to declare a st

[Stable-9.2.4 43/62] 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-9.2.4 38/62] target/riscv: fix endless translation loop on big endian systems

2025-05-25 Thread Michael Tokarev
From: Ziqiao Kong On big endian systems, pte and updated_pte hold big endian host data while pte_pa points to little endian target data. This means the branch at cpu_helper.c:1669 will be always satisfied and restart translation, causing an endless translation loop. The correctness of this patch

[Stable-9.2.4 50/62] target/riscv: Fix vslidedown with rvv_ta_all_1s

2025-05-25 Thread Michael Tokarev
From: Anton Blanchard vslidedown always zeroes elements past vl, where it should use the tail policy. Signed-off-by: Anton Blanchard Reviewed-by: Alistair Francis Message-ID: <20250414213006.3509058-1-ant...@tenstorrent.com> Signed-off-by: Alistair Francis Cc: qemu-sta...@nongnu.org (cherry p

[Stable-9.2.4 49/62] 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

  1   2   >