Re: [PATCH 35/57] docs/qapidoc: Fix static typing on qapidoc.py

2025-03-08 Thread Markus Armbruster
John Snow writes: > On Fri, Mar 7, 2025 at 7:00 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Now that the legacy code is factored out, fix up the typing on the >> > remaining code in qapidoc.py. Add a type ignore to qapi_legacy.py to >> > prevent the errors there from bleeding out

Re: [PATCH 54/57] docs/qapidoc: add transmogrifier test document

2025-03-08 Thread Markus Armbruster
John Snow writes: > This is just a test document that demonstrates the new qapi-domain doc > generator. Note that this test document uses a nesting depth of 2 for > the TOC unlike the existing QMP's reference nesting depth of 3. It's > arbitrary and can be changed to suit taste, it has nothing to

Re: [PATCH 35/57] docs/qapidoc: Fix static typing on qapidoc.py

2025-03-08 Thread John Snow
On Sun, Mar 9, 2025 at 12:38 AM Markus Armbruster wrote: > John Snow writes: > > > On Fri, Mar 7, 2025 at 7:00 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Now that the legacy code is factored out, fix up the typing on the > >> > remaining code in qapidoc.py. Add a type

Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-08 Thread Yan Vugenfirer
On Fri, Mar 7, 2025 at 4:55 AM Suthikulpanit, Suravee < suravee.suthikulpa...@amd.com> wrote: > > > On 3/5/2025 1:52 PM, Michael S. Tsirkin wrote: > > On Tue, Mar 04, 2025 at 06:37:47PM +, Suravee Suthikulpanit wrote: > >> The QEMU-emulated AMD IOMMU PCI device is implemented based on the AMD

Re: [PATCH v3 0/9] target/arm: Implement SEL2 physical and virtual timers

2025-03-08 Thread Michael Tokarev
04.02.2025 15:50, Peter Maydell wrote: This patchset is a respin of Alex's patches, with some extra fixes for bugs I discovered along the way in our existing code (and a bit of refactoring to make the fixes straightforward). It is: Based-on: 20250130182309.717346-1-peter.mayd...@linaro.org ("tar

Re: [PULL 00/31] testing, plugin and maintainer updates

2025-03-08 Thread Stefan Hajnoczi
On Sun, Mar 9, 2025 at 5:54 AM Alex Bennée wrote: > > The following changes since commit 98c7362b1efe651327385a25874a73e008c6549e: > > Merge tag 'accel-cpus-20250306' of https://github.com/philmd/qemu into > staging (2025-03-07 07:39:49 +0800) > > are available in the Git repository at: > > h

[PULL 04/23] include/exec: Split out exec/cpu-interrupt.h

2025-03-08 Thread Richard Henderson
Some of these bits are actually common to all cpus; while the reset have common reservations for target-specific usage. While generic code cannot know what the target-specific usage is, common code can know what to do with the bits, e.g. single-step. Tested-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [PATCH v4 03/14] hw/sd/sdhci: Introduce SDHCIClass stub

2025-03-08 Thread BALATON Zoltan
On Sun, 9 Mar 2025, Philippe Mathieu-Daudé wrote: On 8/3/25 23:34, BALATON Zoltan wrote: On Sat, 8 Mar 2025, Philippe Mathieu-Daudé wrote: TYPE_SYSBUS_SDHCI is a bit odd because it uses an union to work with both SysBus / PCI parent. As this is not a normal use, introduce SDHCIClass in its own

[PATCH v4 06/47] x86: qemu: Avoid accessing BSS too early

2025-03-08 Thread Simon Glass
BSS is placed in DRAM which is actually available early with QEMU. But it is cleared by the init sequence, so values stored there are lost. Move the system-type flag into a function, instead. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/qemu/qemu.c | 20 ++

[PATCH v4 11/14] hw/sd/sdhci: Add SDHCIClass::ro::capareg field

2025-03-08 Thread Philippe Mathieu-Daudé
Capability register is read-only. Since we allow instances to clear/set extra bits, log when read-only bits normally set by hardware are cleared at board level. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sdhci.h | 5 + hw/sd/sdhci.c | 6 ++ 2 files changed, 11 inser

[PATCH v2 02/21] hw/vfio/spapr: Do not include

2025-03-08 Thread Philippe Mathieu-Daudé
is already include by "system/kvm.h" in the next line. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater --- hw/vfio/spapr.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c

Re: [PATCH v4 03/14] hw/sd/sdhci: Introduce SDHCIClass stub

2025-03-08 Thread Philippe Mathieu-Daudé
On 8/3/25 23:34, BALATON Zoltan wrote: On Sat, 8 Mar 2025, Philippe Mathieu-Daudé wrote: TYPE_SYSBUS_SDHCI is a bit odd because it uses an union to work with both SysBus / PCI parent. As this is not a normal use, introduce SDHCIClass in its own commit. Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH v2 21/21] hw/vfio/platform: Compile once

2025-03-08 Thread Philippe Mathieu-Daudé
Since the file doesn't use any target-specific knowledge anymore, move it to system_ss[] to build it once. Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH v2 15/21] hw/vfio/pci: Check CONFIG_IOMMUFD at runtime using iommufd_builtin()

2025-03-08 Thread Philippe Mathieu-Daudé
Convert the compile time check on the CONFIG_IOMMUFD definition by a runtime one by calling iommufd_builtin(). Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/pci.c | 38 ++ 1 file changed, 18 in

[PULL 18/31] gitlab: add a new build_unit job to track build size

2025-03-08 Thread Alex Bennée
We want to reduce the total number of build units in the system to get on our way to a single binary. It will help to have some numbers so lets add a job to gitlab to track our progress. Cc: Pierrick Bouvier Cc: Philippe Mathieu-Daudé Cc: Richard Henderson Signed-off-by: Alex Bennée Message-Id

[PATCH v2 11/21] hw/vfio/igd: Define TYPE_VFIO_PCI_IGD_LPC_BRIDGE

2025-03-08 Thread Philippe Mathieu-Daudé
Define TYPE_VFIO_PCI_IGD_LPC_BRIDGE once to help following where the QOM type is used in the code. We'll use it once more in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/pci-quirks.h | 2 ++ hw/vfio/igd.c| 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) di

[PATCH v2 01/21] hw/vfio/common: Include missing 'system/tcg.h' header

2025-03-08 Thread Philippe Mathieu-Daudé
Always include necessary headers explicitly, to avoid when refactoring unrelated ones: hw/vfio/common.c:1176:45: error: implicit declaration of function ‘tcg_enabled’; 1176 | tcg_enabled() ? DIRTY_CLIENTS_ALL : |

[PULL 17/23] accel/tcg: Restrict GETPC_ADJ to 'tb-internal.h'

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé GETPC_ADJ is only used within accel/tcg/, no need to expose it to all the code base. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20250308072348.65723-2-phi...@linaro.org> Signed-off-by: Richard Henderson --- accel/tcg/tb-internal.h | 11 +++ include

[PATCH v2 16/21] hw/vfio/pci: Compile once

2025-03-08 Thread Philippe Mathieu-Daudé
Since the files don't use any target-specific knowledge anymore, move them to system_ss[] to build them once. Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/meson.build | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-)

[PATCH v2 18/21] hw/vfio/ccw: Check CONFIG_IOMMUFD at runtime using iommufd_builtin()

2025-03-08 Thread Philippe Mathieu-Daudé
Convert the compile time check on the CONFIG_IOMMUFD definition by a runtime one by calling iommufd_builtin(). Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/ccw.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/

[PATCH v2 07/21] hw/vfio: Compile display.c once

2025-03-08 Thread Philippe Mathieu-Daudé
display.c doesn't rely on target specific definitions, move it to system_ss[] to build it once. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater --- hw/vfio/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH v2 19/21] hw/vfio/s390x: Compile AP and CCW once

2025-03-08 Thread Philippe Mathieu-Daudé
Since the files don't use any target-specific knowledge anymore, move them to system_ss[] to build them once, even if they are only used for one unique binary (qemu-system-s390x). Because files in system_ss[] don't get the target/foo/ path in their CPPFLAGS, use header paths relative to the root d

[PATCH v2 08/21] system/kvm: Expose kvm_irqchip_[add, remove]_change_notifier()

2025-03-08 Thread Philippe Mathieu-Daudé
Currently kvm_irqchip_add_irqfd_notifier() and kvm_irqchip_remove_irqfd_notifier() are only declared on target specific code. There is not particular reason to, as their prototypes don't use anything target related. Move their declaration with common prototypes, otherwise the next commit would tri

[PATCH v2 12/21] hw/vfio/igd: Check CONFIG_VFIO_IGD at runtime using vfio_igd_builtin()

2025-03-08 Thread Philippe Mathieu-Daudé
Convert the compile time check on the CONFIG_VFIO_IGD definition by a runtime one by calling vfio_igd_builtin(), which check whether VFIO_IGD is built in a qemu-system binary. Add stubs to avoid when VFIO_IGD is not built in: /usr/bin/ld: libqemu-x86_64-softmmu.a.p/hw_vfio_pci-quirks.c.o: in fu

[PULL 23/23] accel/tcg: Build tcg-runtime-gvec.c once

2025-03-08 Thread Richard Henderson
Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime-gvec.c | 1 - accel/tcg/meson.build| 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/accel/tcg/tcg-runtime-

[PATCH v2 13/21] hw/vfio/igd: Compile once

2025-03-08 Thread Philippe Mathieu-Daudé
The file doesn't use any target-specific knowledge anymore, move it to system_ss[] to build it once. Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/vfio/meson.build b/hw/vfio/meson.build index 6ab711d0539.

[PULL 16/23] accel/tcg: Build tcg-accel-ops-mttcg.c once

2025-03-08 Thread Richard Henderson
All that is required is to avoid including exec-all.h. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tcg-accel-ops-mttcg.c | 1 - accel/tcg/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/accel/tcg/tcg-accel-ops-mttcg.c

[PULL 19/23] qemu/atomic: Rename atomic128-cas.h headers using .h.inc suffix

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented in the Coding Style: If

[PATCH v2 20/21] hw/vfio/platform: Check CONFIG_IOMMUFD at runtime using iommufd_builtin

2025-03-08 Thread Philippe Mathieu-Daudé
Convert the compile time check on the CONFIG_IOMMUFD definition by a runtime one by calling iommufd_builtin(). Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/platform.c | 25 - 1 file changed, 12 insertions

[PATCH v2 17/21] hw/vfio/ap: Check CONFIG_IOMMUFD at runtime using iommufd_builtin()

2025-03-08 Thread Philippe Mathieu-Daudé
Convert the compile time check on the CONFIG_IOMMUFD definition by a runtime one by calling iommufd_builtin(). Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/ap.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/hw/

[PATCH v2 03/21] hw/vfio: Compile some common objects once

2025-03-08 Thread Philippe Mathieu-Daudé
Some files don't rely on any target-specific knowledge and can be compiled once: - helpers.c - container-base.c - migration.c (removing unnecessary "exec/ram_addr.h") - migration-multifd.c - cpr.c Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Hend

[PULL 03/23] include/exec: Move TARGET_PAGE_{SIZE, MASK, BITS} to target_page.h

2025-03-08 Thread Richard Henderson
Re-use the TARGET_PAGE_BITS_VARY mechanism to define TARGET_PAGE_SIZE and friends when not compiling per-target. Inline qemu_target_page_{size,mask,bits} as they are now trivial. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 21 +- i

[PULL 07/23] exec: Declare tlb_set_page_full() in 'exec/cputlb.h'

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move CPU TLB related methods to "exec/cputlb.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20241114011310.3615-16-phi...@linaro.org> --- include/exec/cputlb.h | 23 +++

[PULL 17/31] tests/tcg: Suppress compiler false-positive warning on sha1.c

2025-03-08 Thread Alex Bennée
From: Peter Maydell GCC versions at least 12 through 15 incorrectly report a warning about code in sha1.c: tests/tcg/multiarch/sha1.c:161:13: warning: ‘SHA1Transform’ reading 64 bytes from a region of size 0 [-Wstringop-overread] 161 | SHA1Transform(context->state, &data[i]);

[PATCH v2 14/21] system/iommufd: Introduce iommufd_builtin() helper

2025-03-08 Thread Philippe Mathieu-Daudé
iommufd_builtin() can be used to check at runtime whether the IOMMUFD feature is built in a qemu-system binary. Signed-off-by: Philippe Mathieu-Daudé --- docs/devel/vfio-iommufd.rst | 2 +- include/system/iommufd.h| 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs

[PATCH v2 04/21] hw/vfio: Compile more objects once

2025-03-08 Thread Philippe Mathieu-Daudé
These files depend on the VFIO symbol in their Kconfig definition. They don't rely on target specific definitions, move them to system_ss[] to build them once. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater ---

[PATCH v2 10/21] qom: Introduce type_is_registered()

2025-03-08 Thread Philippe Mathieu-Daudé
In order to be able to check whether a QOM type has been registered, introduce the type_is_registered() helper. Signed-off-by: Philippe Mathieu-Daudé --- include/qom/object.h | 8 qom/object.c | 5 + 2 files changed, 13 insertions(+) diff --git a/include/qom/object.h b/incl

[PATCH v2 09/21] hw/vfio/pci: Convert CONFIG_KVM check to runtime one

2025-03-08 Thread Philippe Mathieu-Daudé
Use the runtime kvm_enabled() helper to check whether KVM is available or not. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater --- hw/vfio/pci.c | 19 +-- 1 file changed, 9 insertions(+), 10 delet

[PATCH v2 05/21] hw/vfio: Compile iommufd.c once

2025-03-08 Thread Philippe Mathieu-Daudé
Removing unused "exec/ram_addr.h" header allow to compile iommufd.c once for all targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater --- hw/vfio/iommufd.c | 1 - hw/vfio/meson.build | 6 +++--- 2 files cha

[PATCH v2 06/21] system: Declare qemu_[min/max]rampagesize() in 'system/hostmem.h'

2025-03-08 Thread Philippe Mathieu-Daudé
Both qemu_minrampagesize() and qemu_maxrampagesize() are related to host memory backends, having the following call stack: qemu_minrampagesize() -> find_min_backend_pagesize() -> object_dynamic_cast(obj, TYPE_MEMORY_BACKEND) qemu_maxrampagesize() -> find_max_backend_pagesiz

[PATCH v2 00/21] hw/vfio: Build various objects once

2025-03-08 Thread Philippe Mathieu-Daudé
By doing the following changes: - Clean some headers up - Replace compile-time CONFIG_KVM check by kvm_enabled() - Replace compile-time CONFIG_IOMMUFD check by iommufd_builtin() we can build less vfio objects. Since v1: - Added R-b tags - Introduce type_is_registered() - Split builtin check VS mes

[PULL 14/23] accel/tcg: Build tcg-accel-ops-icount.c once

2025-03-08 Thread Richard Henderson
All that is required is to avoid including exec-all.h. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tcg-accel-ops-icount.c | 2 +- accel/tcg/meson.build| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/tcg-accel-ops-icou

[PULL 22/23] accel/tcg: Build tcg-runtime.c once

2025-03-08 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime.c | 8 ++-- accel/tcg/meson.build | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c index 9fa539ad3d..fa7ed9739c 100644 --- a/acce

[PULL 15/23] accel/tcg: Build tcg-accel-ops-rr.c once

2025-03-08 Thread Richard Henderson
All that is required is to use cpu-common.h instead of exec-all.h. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tcg-accel-ops-rr.c | 2 +- accel/tcg/meson.build| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/tcg-accel-ops-

[PULL 12/23] system: Build watchpoint.c once

2025-03-08 Thread Richard Henderson
Now that watchpoint.c uses cputlb.h instead of exec-all.h, it can be built once. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- system/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PULL 06/23] exec: Declare tlb_reset_dirty*() in 'exec/cputlb.h'

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move CPU TLB related methods to "exec/cputlb.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-ID: <20241114011310.3615-14-phi...@linaro.org> Signed-off-by: Richard Henderson --- include/exec/cputlb.h | 7 +++ include/exec/exec

[PULL 13/23] accel/tcg: Build tcg-accel-ops.c once

2025-03-08 Thread Richard Henderson
Now that tcg-accel-ops.c uses cputlb.h instead of exec-all.h, it can be built once. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 97

[PULL 21/23] qemu/atomic128: Include missing 'qemu/atomic.h' header

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé qatomic_cmpxchg__nocheck() is declared in "qemu/atomic.h". Include it in order to avoid when refactoring unrelated headers: In file included from ../../accel/tcg/tcg-runtime-gvec.c:22: In file included from include/exec/helper-proto-common.h:10: In file i

[PULL 05/23] accel/tcg: Compile watchpoint.c once

2025-03-08 Thread Richard Henderson
Move tb_check_watchpoint declaration from tb-internal.h, which is still target-specific, to internal-common.h, which isn't. Otherwise, all that is required to build watchpoint.c once is to include the new exec/cpu-interrupt.h instead of exec/exec-all.h. Tested-by: Philippe Mathieu-Daudé Reviewed-

[PULL 18/23] accel/tcg: Split out getpc.h

2025-03-08 Thread Richard Henderson
Split out GETPC to a target-independent header. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20250308072348.65723-3-phi...@linaro.org> Signed-off-by: Richard Henderson --- include/accel/tcg/getpc.h | 24 +

[PULL 20/23] qemu/atomic: Rename atomic128-ldst.h headers using .h.inc suffix

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented in the Coding Style: If

[PULL 01/23] linux-user/main: Allow setting tb-size

2025-03-08 Thread Richard Henderson
From: Ilya Leoshkevich While qemu-system can set tb-size using -accel tcg,tb-size=n, there is no similar knob for qemu-user. Add one in a way similar to how one-insn-per-tb is already handled. Signed-off-by: Ilya Leoshkevich Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson M

[PULL 02/23] accel/tcg: Restrict CPU_TLB_DYN_*_BITS definitions to accel/tcg/

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé CPU_TLB_DYN_*_BITS definitions are only used by accel/tcg/cputlb.c and accel/tcg/translate-all.c. Move them to accel/tcg/tb-internal.h. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Richard Henderson Message-ID: <2025030519185

[PULL 11/23] exec: Declare tlb_flush*() in 'exec/cputlb.h'

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move CPU TLB related methods to "exec/cputlb.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-ID: <20241114011310.3615-19-phi...@linaro.org> Signed-off-by: Richard Henderson --- include/exec/cputlb.h

[PULL 09/23] exec: Declare tlb_set_page() in 'exec/cputlb.h'

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move CPU TLB related methods to "exec/cputlb.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20241114011310.3615-18-phi...@linaro.org> --- include/exec/cputlb.h | 11 +++

[PULL 10/23] exec: Declare tlb_hit*() in 'exec/cputlb.h'

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move CPU TLB related methods to "exec/cputlb.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20241114011310.3615-20-phi...@linaro.org> --- include/exec/cpu-all.h | 23 --- a

[PATCH v2] linux-user/riscv: Fix handling of cpu mask in riscv_hwprobe syscall

2025-03-08 Thread Richard Henderson
The third argument of the syscall contains the size of the cpu mask in bytes, not bits. Nor is the size rounded up to a multiple of sizeof(abi_ulong). Cc: qemu-sta...@nongnu.org Reported-by: Andreas Schwab Fixes: 9e1c7d982d7 ("linux-user/riscv: Add syscall riscv_hwprobe") Signed-off-by: Richard

[PULL 00/23] tcg patch queue

2025-03-08 Thread Richard Henderson
The following changes since commit 98c7362b1efe651327385a25874a73e008c6549e: Merge tag 'accel-cpus-20250306' of https://github.com/philmd/qemu into staging (2025-03-07 07:39:49 +0800) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-202

[PULL 08/23] exec: Declare tlb_set_page_with_attrs() in 'exec/cputlb.h'

2025-03-08 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move CPU TLB related methods to "exec/cputlb.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20241114011310.3615-17-phi...@linaro.org> --- include/exec/cputlb.h| 28

Re: [PATCH v4 08/14] hw/sd/sdhci: Simplify MemoryRegionOps endianness check

2025-03-08 Thread BALATON Zoltan
On Sat, 8 Mar 2025, Philippe Mathieu-Daudé wrote: While little endianness is the default, ome controllers Typo, ome -> some. Regards, BALATON Zoltan might be only implemented in big endianness. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 18 -- 1 file changed,

[PATCH v4 06/14] hw/sd/sdhci: Enforce little endianness on PCI devices

2025-03-08 Thread Philippe Mathieu-Daudé
This is the default, but better be safe than sorry. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c index 5268c0dee50..5f82178a76f 100644 --- a/hw/sd/sdhci-pci.c +++ b/hw/sd/sdhci-pci.c @@ -32,6

Re: [PATCH v4 03/14] hw/sd/sdhci: Introduce SDHCIClass stub

2025-03-08 Thread BALATON Zoltan
On Sat, 8 Mar 2025, Philippe Mathieu-Daudé wrote: TYPE_SYSBUS_SDHCI is a bit odd because it uses an union to work with both SysBus / PCI parent. As this is not a normal use, introduce SDHCIClass in its own commit. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sdhci.h | 9 + hw/

Re: [PATCH 00/14] hw/vfio: Build various objects once

2025-03-08 Thread Philippe Mathieu-Daudé
On 8/3/25 18:48, Cédric Le Goater wrote: Hello, On 3/7/25 19:03, Philippe Mathieu-Daudé wrote: By doing the following changes: - Clean some headers up - Replace compile-time CONFIG_KVM check by kvm_enabled() - Replace compile-time CONFIG_IOMMUFD check by iommufd_builtin() we can build less vfio

[PULL 13/31] tests/tcg: mark test-vma as a linux-only test

2025-03-08 Thread Alex Bennée
The main multiarch tests should compile for any POSIX system, however test-vma's usage of MAP_NORESERVE makes it a linux-only test. Simply moving the source file is enough for the build logic to skip on BSD's. Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Me

Re: [PATCH 08/14] system/kvm: Expose kvm_irqchip_[add,remove]_change_notifier()

2025-03-08 Thread Philippe Mathieu-Daudé
On 7/3/25 21:09, Richard Henderson wrote: On 3/7/25 10:03, Philippe Mathieu-Daudé wrote: Currently kvm_irqchip_add_irqfd_notifier() and kvm_irqchip_remove_irqfd_notifier() are only declared on target specific code. There is not particular reason to, as their prototypes don't use anything target

[PULL 25/31] plugins/loader: compile loader only once

2025-03-08 Thread Alex Bennée
There is very little in loader that is different between builds save for a tiny user/system mode difference in the plugin_info structure. Create two new files, user and system to hold mode specific helpers and move loader into common_ss. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée

[PULL 24/31] plugins/plugin.h: include queue.h

2025-03-08 Thread Alex Bennée
Headers should bring in what they need so don't rely on getting queue.h by side effects. This will help with clean-ups in the following patches. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-25-alex.ben...@linaro.org> diff --git a/plugins/plugin.h

[PULL 21/31] plugins/loader: populate target_name with target_name()

2025-03-08 Thread Alex Bennée
We have a function we can call for this, lets not rely on macros that stop us building once. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-22-alex.ben...@linaro.org> diff --git a/plugins/loader.c b/plugins/load

[PULL 20/31] plugins/api: use qemu_target_page_mask() to get value

2025-03-08 Thread Alex Bennée
Requiring TARGET_PAGE_MASK to be defined gets in the way of building this unit once. qemu_target_page_mask() will tell us what it is. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-21-alex.ben...@linaro.org> dif

[PULL 23/31] plugins/api: clean-up the includes

2025-03-08 Thread Alex Bennée
Thanks to re-factoring and clean-up work (especially to exec-all) we no longer need such broad headers for the api. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-24-alex.ben...@linaro.org> diff --git a/plugins/api.c b/plugins/api.c index fa4d49527

[PULL 27/31] plugins/api: split out the vaddr/hwaddr helpers

2025-03-08 Thread Alex Bennée
These only work for system-mode and are NOPs for user-mode. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-28-alex.ben...@linaro.org> diff --git a/plugins/api-system.c b/plugins/api-system.c index cb0dd8f730..38560de342 100644 --- a/plugins/api-sys

[PULL 22/31] include/qemu: plugin-memory.h doesn't need cpu-defs.h

2025-03-08 Thread Alex Bennée
hwaddr is a fixed size on all builds. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-23-alex.ben...@linaro.org> diff --git a/include/qemu/plugin-memory.h b/include/qemu/plugin-memory.h index 71c1123308..6065ec7aaf 100644 --- a/include/qemu/plugin-m

[PULL 05/31] tests/functional: skip vulkan tests with nVidia

2025-03-08 Thread Alex Bennée
While running the new GPU tests it was noted that the proprietary nVidia driver barfed when run under the sanitiser: 2025-02-20 11:13:08,226: [11:13:07.782] Output 'headless' attempts EOTF mode SDR and colorimetry mode default. 2025-02-20 11:13:08,227: [11:13:07.784] Output 'headless' using

[PULL 30/31] plugins/core: make a single build unit

2025-03-08 Thread Alex Bennée
Trim through the includes and remove everything not needed for the core. Only include tcg-op-common.h to remove the need to TARGET_LONG_BITS and move the build unit into the common set. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-31-alex.ben...@l

[PULL 12/31] tests/vm: bump timeout for shutdown

2025-03-08 Thread Alex Bennée
On my fairly beefy machine the timeout was triggering leaving a corrupted disk image due to power being pulled before the disk had synced. Triple the timeout to avoid this. Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-13-alex.ben...@linaro.org> diff --

[PULL 08/31] plugins: add explicit dependency in functional tests

2025-03-08 Thread Alex Bennée
From: Pierrick Bouvier ./tests/functional/test_aarch64_tcg_plugins.py needs to have plugin libinsn built. However, it's not listed as a dependency, so meson can't know it needs to be built. Thus, we keep track of all plugins, and add them as an explicit dependency. Fixes: 4c134d07b9e ("tests: a

[PULL 26/31] plugins/api: split out binary path/start/end/entry code

2025-03-08 Thread Alex Bennée
To move the main api.c to a single build compilation object we need to start splitting out user and system specific code. As we need to grob around host headers we move these particular helpers into the *-user mode directories. The binary/start/end/entry helpers are all NOPs for system mode. Whil

[PULL 04/31] tests/functional: bail early if vkmark hangs

2025-03-08 Thread Alex Bennée
The message: MESA-VIRTIO: debug: stuck in fence wait with iter at %d Seems to occur more often on debug builds. Rather than waiting for our long timeout to hit we might as well bail as soon as we see the message. Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20250304222439

[PULL 19/31] tests/functional: add boot error detection for RME tests

2025-03-08 Thread Alex Bennée
From: Pierrick Bouvier It was identified that those tests randomly fail with a synchronous exception at boot (reported by EDK2). While we solve this problem, report failure immediately so tests don't timeout in CI. Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 31/31] MAINTAINERS: remove widely sanctioned entities

2025-03-08 Thread Alex Bennée
The following organisations appear on the US sanctions list: Yadro: https://sanctionssearch.ofac.treas.gov/Details.aspx?id=41125 ISPRAS: https://sanctionssearch.ofac.treas.gov/Details.aspx?id=50890 As a result maintainers interacting with such entities would face legal risk in a number of jur

[PULL 01/31] tests/functional: move aarch64 GPU test into own file

2025-03-08 Thread Alex Bennée
I want to expand the number of tests to cover a wide range of configurations. That starts with splitting off from the normal virt test from which it doesn't really share much code. We can also reduce the timeout of the original virt test now it is now longer burdened with testing the GPU. Reviewed

[PULL 10/31] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts

2025-03-08 Thread Alex Bennée
From: Philippe Mathieu-Daudé Not all platforms use the '.so' suffix for shared libraries, which is how plugins are built. Use the recently introduced dso_suffix() helper to get the proper host suffix. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2804 Suggested-by: Pierrick Bouvier Su

[PULL 15/31] tests/tcg: fix constraints in test-i386-adcox

2025-03-08 Thread Alex Bennée
Clang complains: clang -O2 -m64 -mcx16 /home/alex/lsrc/qemu.git/tests/tcg/i386/test-i386-adcox.c -o test-i386-adcox -static /home/alex/lsrc/qemu.git/tests/tcg/i386/test-i386-adcox.c:32:26: error: invalid input constraint '0' in asm : "r" ((REG)-1), "0" (flags), "1" (out_adcx), "2"

[PULL 16/31] tests/tcg: enable -fwrapv for test-i386-bmi

2025-03-08 Thread Alex Bennée
We allow things like: tests/tcg/i386/test-i386-bmi2.c:124:35: warning: shifting a negative signed value is undefined [-Wshift-negative-value] assert(result == (mask & ~(-1 << 30))); in the main code, so allow it for the test. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée M

[PULL 29/31] plugins/api: build only once

2025-03-08 Thread Alex Bennée
Now all the softmmu/user-mode stuff has been split out we can build this compilation unit only once. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-30-alex.ben...@linaro.org> diff --git a/plugins/api.c b/plugins/api.c index 832bf6ee5e..604ce06802 1

[PULL 03/31] tests/functional: ensure we have a GPU device for tests

2025-03-08 Thread Alex Bennée
It's possible to build QEMU without support for the GL enabled GPU devices and we can catch that earlier with an explicit check. Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-4-alex.ben...@linaro.org> diff --git a/tests/functional/test_aarch64_virt_gpu.

[PULL 06/31] tests/functional: expand tests to cover virgl

2025-03-08 Thread Alex Bennée
Add two more test modes using glmark2-wayland to exercise the OpenGL pass-through modes with virgl. Virgl can run with or without the hostmem blob support. To avoid repeating ourselves too much we make the initial pass a simple --validate pass. We might want to eventually add more directed tests a

[PULL 02/31] tests/functional: factor out common code in gpu test

2025-03-08 Thread Alex Bennée
In preparation for handling more tests split out the common machine setup details from the test specific stuff and add a helper for launching the weston test. Instead of searching for "vkmark score" we set a custom PS1 and wait for a successful completion. This ensures we capture the score in the c

[PULL 07/31] tests/functional: update the aarch64_virg_gpu images

2025-03-08 Thread Alex Bennée
Update to the most recent aarch64_virt_gpu image. The principle differences are: - target a v8.0 baseline CPU - latest vkmark (2025.1) - actually uses the rootfs (previously was initrd) - rootfs includes more testing tools for interactive use See README.md in https://fileserver.linaro.org

[PULL 14/31] tests/tcg: add message to _Static_assert in test-avx

2025-03-08 Thread Alex Bennée
In preparation for enabling clang and avoiding: error: '_Static_assert' with no message is a C2x extension [-Werror,-Wc2x-extensions] let us just add the message to silence the warning. Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250304

[PULL 11/31] libvirt-ci: bump to latest for vulkan-tools

2025-03-08 Thread Alex Bennée
The alpine baseline has also been updated in the meantime so we need to address that while we are at it. Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20250304222439.2035603-12-alex.ben...@linaro.org> diff --git a/.gitlab-ci.d/cirrus/freebsd-14.vars b/.gitlab-ci.d/cirrus/fre

[PULL 00/31] testing, plugin and maintainer updates

2025-03-08 Thread Alex Bennée
The following changes since commit 98c7362b1efe651327385a25874a73e008c6549e: Merge tag 'accel-cpus-20250306' of https://github.com/philmd/qemu into staging (2025-03-07 07:39:49 +0800) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-10.0-for-softfreeze-0

[PULL 09/31] tests/functional: Introduce the dso_suffix() helper

2025-03-08 Thread Alex Bennée
From: Philippe Mathieu-Daudé Introduce a helper to get the default shared library suffix used on the host. Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Thomas Huth Message-Id: <20250220080215.49165-3-phi...@linaro.org> [AJB:

[PATCH v4 08/14] hw/sd/sdhci: Simplify MemoryRegionOps endianness check

2025-03-08 Thread Philippe Mathieu-Daudé
While little endianness is the default, ome controllers might be only implemented in big endianness. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index ae485f90dfe..a2

[PATCH v4 00/14] hw/sd/sdhci: Set reset value of interrupt registers

2025-03-08 Thread Philippe Mathieu-Daudé
Since v3: - Fix "hw/qdev-properties-system.h" (first patch) - Convert to EndianMode (patch #10) Rainy saturday, time for some hobbyist contributions :) In this series we try to address the issue Zoltan reported and try to fix in [*], but using a more generic approach. The SDHCI code ends up bette

[PATCH v4 14/14] hw/ppc/e500: Replace generic SDHCI by Freescale eSDHC

2025-03-08 Thread Philippe Mathieu-Daudé
As Zoltan reported, some U-Boot versions seem to expect correctly initialized registers before expecting interrupts. Now than we have a proper Freescale eSDHC implementation, use it. Reported-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/e500.c | 10 +- 1 file cha

[PATCH v4 07/14] hw/sd/sdhci: Allow SDHCI classes to register their own MemoryRegionOps

2025-03-08 Thread Philippe Mathieu-Daudé
Add MemoryRegionOps as a class property. For now it is only used by TYPE_IMX_USDHC. Otherwise the default remains in little endian. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sdhci.h | 1 + hw/sd/sdhci.c | 22 -- 2 files changed, 9 insertions(+), 14 dele

[PATCH v4 09/14] hw/sd/sdhci: Unify default MemoryRegionOps

2025-03-08 Thread Philippe Mathieu-Daudé
Note, sdhci_mmio_le_ops[] was missing .impl.access_size = 4. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 46 -- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index a2e7162e289..23af3958a1d 1

[PATCH v4 12/14] hw/sd/sdhci: Allow SDHCI classes to have different register reset values

2025-03-08 Thread Philippe Mathieu-Daudé
For the registers which are not zeroed at reset, allow the different implementations to set particular reset values. Remove the misleading values commented in sdhci-internal.h. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci-internal.h | 24 include/hw/sd/sdhci.h

[PATCH v4 13/14] hw/sd/sdhci: Implement Freescale eSDHC as TYPE_FSL_ESDHC

2025-03-08 Thread Philippe Mathieu-Daudé
Per the MPC8569E reference manual, its SDHC I/O range is 4KiB wide, mapped in big endian order, and it only accepts 32-bit aligned access. Set the default register reset values. Reported-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sdhci.h | 2 ++ hw/sd/sdhci.c

  1   2   >