Re: [PATCH 4/4] tcg:tlb: use tcg_debug_assert() in assert_cpu_is_self()

2025-02-26 Thread Igor Mammedov
On Tue, 25 Feb 2025 12:02:02 -0800 Richard Henderson wrote: > On 2/25/25 10:46, Alex Bennée wrote: > > From: Igor Mammedov > > > > that will enable assert_cpu_is_self when QEMU is configured with > > --enable-debug > > without need for manual patching DEBUG_TLB_GATE define. > > > > Need to

[PATCH 00/25] maintainer updates for 10.0 softfreeze (gpu/tcg tests, plugins, MAINTAINERS)

2025-02-26 Thread Alex Bennée
As we rapidly approach softfreeze (due March 11th) its time to collect together what I'm planning to merge for this release. Testing - expand the aarch64 GPU tests - bump libvirt-ci for vulkan-tools - some fixes for clang compile of tcg I've dropped the host-gpu patch in favour of just ski

[PATCH 15/25] plugins/api: use qemu_target_page_mask() to get value

2025-02-26 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. Signed-off-by: Alex Bennée Message-Id: <20250225110844.3296991-2-alex.ben...@linaro.org> --- v2 - use the proper qemu_target_page_mask() api --- plugins/api.c

[PATCH 10/25] tests/vm: bump timeout for shutdown

2025-02-26 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. Double the timeout to avoid this. Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests

[PATCH 13/25] tests/tcg: fix constraints in test-i386-adcox

2025-02-26 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"

[PATCH 01/25] tests/functional: move aarch64 GPU test into own file

2025-02-26 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. Signed-off-by: Alex Bennée Message-Id: <20250219150009.1662688-2-alex.ben...@linaro.org> --- tests/functional/meson

[PATCH 24/25] plugins/api: build only once

2025-02-26 Thread Alex Bennée
Now all the softmmu/user-mode stuff has been split out we can build this compilation unit only once. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20250225110844.3296991-11-alex.ben...@linaro.org> --- plugins/api.c | 11 --- plugins/meson.build | 3 +-- 2

[PATCH 14/25] tests/tcg: enable -fwrapv for test-i386-bmi

2025-02-26 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. Signed-off-by: Alex Bennée --- tests/tcg/i386/Makefile.targ

[PATCH 06/25] tests/functional: Introduce the dso_suffix() helper

2025-02-26 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 02/25] tests/functional: factor out common code in gpu test

2025-02-26 Thread Alex Bennée
In preparation for handling more tests split out the common machine setup details from the test specific stuff. Signed-off-by: Alex Bennée Message-Id: <20250219150009.1662688-3-alex.ben...@linaro.org> --- tests/functional/test_aarch64_virt_gpu.py | 30 +++ 1 file changed, 14

[PATCH 25/25] MAINTAINERS: remove widely sanctioned entities

2025-02-26 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

[PATCH 07/25] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts

2025-02-26 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

[PATCH 09/25] libvirt-ci: bump to latest for vulkan-tools (libvirt MR 525)

2025-02-26 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. Signed-off-by: Alex Bennée --- .gitlab-ci.d/cirrus/freebsd-14.vars | 2 +- .gitlab-ci.d/cirrus/macos-14.vars | 2 +- scripts/ci/setup/ubuntu/ubuntu-2204-

[PATCH 03/25] tests/functional: ensure we have a GPU device for tests

2025-02-26 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. Signed-off-by: Alex Bennée Message-Id: <20250219150009.1662688-4-alex.ben...@linaro.org> --- tests/functional/test_aarch64_virt_gpu.py | 3 +++ 1 file changed, 3 inser

Re: [PATCH 4/4] tcg:tlb: use tcg_debug_assert() in assert_cpu_is_self()

2025-02-26 Thread Igor Mammedov
On Tue, 25 Feb 2025 12:04:40 -0800 Richard Henderson wrote: > On 2/25/25 12:02, Richard Henderson wrote: > > Not checked here are any of the other reasons a flush might be ok: > > > > (2) The system as a whole is stopped, on the way in from migration/vmload. > > (3) The cpu is offline, on the wa

Re: [PATCH V4] migration: ram block cpr blockers

2025-02-26 Thread Steven Sistare
On 2/25/2025 4:10 PM, David Hildenbrand wrote: +    /* Ram device is remapped in new QEMU */ +    if (memory_region_is_ram_device(mr)) { +    return true; +    } + +    /* Named files are remapped in new QEMU, same contents if shared (no COW) */ +    if (qemu_ram_is_shared(rb) && qemu_ram_is

[PATCH 12/25] tests/tcg: add message to _Static_assert in test-avx

2025-02-26 Thread Alex Bennée
In preparation for enabling clang and avoiding: error: '_Static_assert' with no message is a C2x extension [-Werror,-Wc2x-extensions] lets just add the message. Signed-off-by: Alex Bennée --- tests/tcg/i386/test-avx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests

[PATCH 05/25] plugins: add explicit dependency in functional tests

2025-02-26 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

[PATCH 19/25] plugins/plugin.h: include queue.h

2025-02-26 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: <20250225110844.3296991-6-alex.ben...@linaro.org> --- plugins/plugin.h | 1 + 1

[PATCH 11/25] tests/tcg: mark test-vma as a linux-only test

2025-02-26 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. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/{ => linux}/test-vma.c | 0 1 file

[PATCH 21/25] plugins/api: split out binary path/start/end/entry code

2025-02-26 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

[PATCH 08/25] tests/functional: skip vulkan tests with nVidia

2025-02-26 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

[PATCH 04/25] tests/functional: expand tests to cover virgl

2025-02-26 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. We might want to eventually add more directed tests and individual features later on but the glmark/vkmark tests are a good general smoke test

[PATCH 22/25] plugins/api: split out the vaddr/hwaddr helpers

2025-02-26 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: <20250225110844.3296991-9-alex.ben...@linaro.org> --- plugins/api-system.c | 58 plugins/api-user.c | 40 +

[PATCH 20/25] plugins/loader: compile loader only once

2025-02-26 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

[PATCH 17/25] include/qemu: plugin-memory.h doesn't need cpu-defs.h

2025-02-26 Thread Alex Bennée
hwaddr is a fixed size on all builds. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250225110844.3296991-4-alex.ben...@linaro.org> --- include/qemu/plugin-memory.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/qemu/plugin-memory.h b/include/qemu/plugin-me

[PATCH 16/25] plugins/loader: populate target_name with target_name()

2025-02-26 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: <20250225110844.3296991-3-alex.ben...@linaro.org> --- plugins/loader.c | 2 +- 1 file changed,

Re: [PATCH v4 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-26 Thread Mauro Carvalho Chehab
Em Wed, 26 Feb 2025 15:16:56 +0100 Igor Mammedov escreveu: > On Fri, 21 Feb 2025 15:35:09 +0100 > Mauro Carvalho Chehab wrote: > > > Now that the ghes preparation patches were merged, let's add support > > for error injection. > > > > On this series, the first 6 patches chang to the math used

[PATCH 2/2] target/riscv: Support matching scontext in Sdtrig's textra CSRs

2025-02-26 Thread Florian Lugou
Support setting textra32.sselect or textra64.sselect to 1 (scontext). The trigger will only match if the content of scontext matches the value in svalue, after it is masked as configured in sbytemask. Signed-off-by: Florian Lugou --- target/riscv/debug.c | 75 +++-

[PATCH 0/2] target/riscv: Support scontext-based trigger matching

2025-02-26 Thread Florian Lugou
Hi, These 2 patches allow scontext-based trigger matching as specified by the Sdtrig extension. Patch 1 allows access to the scontext CSR and patch 2 enforces scontext matching as specified by the textra CSRs. Florian Lugou (2): target/riscv: Add scontext CSR handling target/riscv: Support ma

[PATCH 23/25] plugins/api: split out time control helpers

2025-02-26 Thread Alex Bennée
These are only usable in system mode where we control the timer. For user-mode make them NOPs. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20250225110844.3296991-10-alex.ben...@linaro.org> --- plugins/api-system.c | 34 ++ plugins/api-u

Re: [PATCH v5 20/36] vfio/migration: Add vfio_add_bytes_transferred()

2025-02-26 Thread Maciej S. Szmigiero
On 26.02.2025 09:06, Cédric Le Goater wrote: On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This way bytes_transferred can also be incremented in other translation units than migration.c. Signed-off-by: Maciej S. Szmigiero Looks good. Just a small aesthetic issue.

Re: [PATCH v4 2/6] migration: check RDMA and capabilities are compatible on both sides

2025-02-26 Thread Peter Xu
On Wed, Feb 26, 2025 at 02:30:39PM +0800, Li Zhijian wrote: > Depending on the order of starting RDMA and setting capability, > the following scenarios can be categorized into the following scenarios: > Source: > S1: [set capabilities] -> [Start RDMA outgoing] > Destination: > D1: [set capabiliti

Re: [PATCH v4 04/14] acpi/ghes: don't hard-code the number of sources for HEST table

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:13 +0100 Mauro Carvalho Chehab wrote: > The current code is actually dependent on having just one error > structure with a single source, as any change there would cause > migration issues. > > As the number of sources should be arch-dependent, as it will depend on > wh

Re: [PATCH v4 4/6] migration/rdma: Remove redundant migration_in_postcopy checks

2025-02-26 Thread Peter Xu
On Wed, Feb 26, 2025 at 02:30:41PM +0800, Li Zhijian wrote: > Since we have disabled RDMA + postcopy, it's safe to remove > the migration_in_postcopy() that follows the migrate_rdma(). > > Signed-off-by: Li Zhijian Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 0/2] vfio: Restrict to 64-bit host platforms

2025-02-26 Thread Cédric Le Goater
Hello On 2/26/25 15:01, Daniel P. Berrangé wrote: On Wed, Feb 26, 2025 at 09:47:19AM +0100, Cédric Le Goater wrote: Hello, This series avoids compiling VFIO on 32-bit host platforms where it is not needed. If it was previously enabled on 32-bit and was possible to successfully build & use, t

Re: [PATCH v4 08/14] acpi/generic_event_device: add logic to detect if HEST addr is available

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:17 +0100 Mauro Carvalho Chehab wrote: > Create a new property (x-has-hest-addr) and use it to detect if > the GHES table offsets can be calculated from the HEST address > (qemu 10.0 and upper) or via the legacy way via an offset obtained > from the hardware_errors firmwa

Re: [PATCH v4 5/6] migration: Unfold control_save_page()

2025-02-26 Thread Peter Xu
On Wed, Feb 26, 2025 at 02:30:42PM +0800, Li Zhijian wrote: > control_save_page() is for RDMA only, unfold it to make the code more > clear. > In addition: > - Similar to other branches style in ram_save_target_page(), involve RDMA >only if the condition 'migrate_rdma()' is true. > - Further

Re: [PATCH v4 10/14] tests/acpi: virt: allow acpi table changes for a new table: HEST

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:19 +0100 Mauro Carvalho Chehab wrote: > The DSDT table will also be affected by such change. > > Signed-off-by: Mauro Carvalho Chehab > --- > tests/qtest/bios-tables-test-allowed-diff.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/qtest/bios-tables-

Re: [PATCH v5 19/36] vfio/migration: Convert bytes_transferred counter to atomic

2025-02-26 Thread Cédric Le Goater
On 2/26/25 14:55, Maciej S. Szmigiero wrote: On 26.02.2025 08:52, Cédric Le Goater wrote: On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" So it can be safety accessed from multiple threads. This variable type needs to be changed to unsigned long since 32-bit host pla

Re: [PATCH 03/25] tests/functional: ensure we have a GPU device for tests

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: It's possible to build QEMU without support for the GL enabled GPU devices and we can catch that earlier with an explicit check. Signed-off-by: Alex Bennée Message-Id: <20250219150009.1662688-4-alex.ben...@linaro.org> --- tests/functional/test_aarch64_v

Re: [PATCH v4 11/14] arm/virt: Wire up a GED error device for ACPI / GHES

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:20 +0100 Mauro Carvalho Chehab wrote: > Adds support to ARM virtualization to allow handling > generic error ACPI Event via GED & error source device. > > It is aligned with Linux Kernel patch: > https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@

[Bug 2072564] Re: qemu-aarch64-static segfaults running ldconfig.real (amd64 host)

2025-02-26 Thread Lukas Märdian
** Changed in: qemu (Ubuntu) Status: Triaged => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/2072564 Title: qemu-aarch64-static segfaults running ldconfig.real (amd64 host) Sta

Re: [PATCH v2 0/2] Emulated AMD IOMMU cleanup and fixes

2025-02-26 Thread Michael Tokarev
26.02.2025 15:53, Vasant Hegde wrote: Hi Michael, Hi! On 2/25/2025 2:17 PM, Michael Tokarev wrote: ...>> Is this qemu-stable material (current series: 7.2, 8.2, 9.2)? Linux kernel doesn't use these changes. So its fine. But I believe we care for other OS as well? if yes then better to back

Re: [PATCH v4 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-26 Thread Igor Mammedov
On Wed, 26 Feb 2025 15:51:43 +0100 Igor Mammedov wrote: > On Wed, 26 Feb 2025 15:39:13 +0100 > Mauro Carvalho Chehab wrote: [...] > > PS: do not respin until I've finish this review. finished > > > > > > > > > > > > --- > > > > v4: > > > > - added an extra comment for AcpiGhesState st

[PATCH v5 1/3] Add support for emulation of CRC32 instructions

2025-02-26 Thread Aleksandar Rakic
From: Aleksandar Rakic Add emulation of MIPS' CRC32 (Cyclic Redundancy Check) instructions. Reuse zlib crc32() and Linux crc32c(). Enable CRC for mips64r6. Cherry-picked 4cc974938aee1588f852590509004e340c072940 from https://github.com/MIPS/gnutools-qemu Signed-off-by: Yongbok Kim Signed-off-b

[PATCH v5 2/3] Skip NaN mode check for soft-float

2025-02-26 Thread Aleksandar Rakic
From: Aleksandar Rakic Skip NaN mode check for soft-float since NaN mode is irrelevant if an ELF binary's FPU mode is soft-float, i.e. it doesn't utilize a FPU. Cherry-picked 63492a56485f6b755fccf7ad623f7a189bfc79b6 from https://github.com/MIPS/gnutools-qemu Signed-off-by: Faraz Shahbazker Sig

[PATCH v5 3/3] target/mips: Enable MSA ASE using a CLI flag

2025-02-26 Thread Aleksandar Rakic
From: Aleksandar Rakic Enable MSA ASE using a CLI flag -cpu ,msa=on. Signed-off-by: Aleksandar Rakic --- target/mips/cpu.c | 16 target/mips/cpu.h | 1 + target/mips/internal.h | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/target/mips/cpu.c

[PATCH v5 0/3] Improve Mips target

2025-02-26 Thread Aleksandar Rakic
Hi, This patch series adds support for emulation of CRC32 instructions for the Mips target in QEMU, enables CRC for mips64r6, skips NaN mode check for soft-float, and adds a CLI flag for enabling an MSA feature. The CRC32 instructions are available in MD00087 Revision 6.06. Since the disassembly

Re: [PATCH v5 25/36] vfio/migration: Multifd device state transfer support - receive init/cleanup

2025-02-26 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Add support for VFIOMultifd data structure that will contain most of the receive-side data together with its init/cleanup methods. Signed-off-by: Maciej S. Szmigiero --- hw/vfio/migration-multifd.c | 33 +

Re: [PATCH 1/2] vfio: Make vfio-pci available on 64-bit host platforms only

2025-02-26 Thread BALATON Zoltan
On Wed, 26 Feb 2025, Cédric Le Goater wrote: On 2/26/25 15:12, BALATON Zoltan wrote: On Wed, 26 Feb 2025, Cédric Le Goater wrote: VFIO PCI never worked on PPC32 nor ARM, S390x is 64-bit, it might have worked on i386 long ago but we have no plans to further support VFIO on any 32-bit host platfo

Re: [PATCH v5 32/36] vfio/migration: Make x-migration-multifd-transfer VFIO property mutable

2025-02-26 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" DEFINE_PROP_ON_OFF_AUTO() property isn't runtime-mutable so using it would mean that the source VM would need to decide upfront at startup time whether it wants to do a multifd device state transfer at some point. Source

Re: [PATCH v5 33/36] hw/core/machine: Add compat for x-migration-multifd-transfer VFIO property

2025-02-26 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Add a hw_compat entry for recently added x-migration-multifd-transfer VFIO property. Signed-off-by: Maciej S. Szmigiero Reviewed-by: Cédric Le Goater Thanks, C. --- hw/core/machine.c | 1 + 1 file changed, 1

Re: [PATCH 3/4] cputlb: introduce tlb_flush_other_cpu for reset use

2025-02-26 Thread Richard Henderson
On 2/26/25 06:29, Alex Bennée wrote: I guess we want something like: /* tlb_reset() - reset the TLB when the CPU is not running * cs: the cpu * * Only to be used when the CPU is definitely not running */ void tlb_reset(CPUState *cs) { g_assert(cs->cpu_stopped); for (i = 0;

Re: [PATCH 01/25] tests/functional: move aarch64 GPU test into own file

2025-02-26 Thread Alex Bennée
Richard Henderson writes: > On 2/26/25 06:03, Alex Bennée wrote: >> 'aarch64_virt' : 720, >> + 'aarch64_virt_gpu' : 720, > > Does the split mean that we can reduce the timeout? My run with all 4 tests takes ~100s but when people --enable-debug and santisers that expands quickly. > > > r~

Re: [PATCH] hw/misc/npcm_clk: fix buffer-overflow

2025-02-26 Thread Pierrick Bouvier
On 2/26/25 03:50, Peter Maydell wrote: On Tue, 25 Feb 2025 at 20:57, Pierrick Bouvier wrote: On 2/25/25 05:41, Peter Maydell wrote: (Looking more closely at the cold_reset_values handling in npcm_gcr.c, that looks not quite right in a different way; I'll send a reply to that patch email about

Re: [PATCH 1/2] vfio: Make vfio-pci available on 64-bit host platforms only

2025-02-26 Thread BALATON Zoltan
On Wed, 26 Feb 2025, Cédric Le Goater wrote: VFIO PCI never worked on PPC32 nor ARM, S390x is 64-bit, it might have worked on i386 long ago but we have no plans to further support VFIO on any 32-bit host platforms. Restrict to 64-bit host platforms. Cc: Harsh Prateek Bora Cc: Tony Krowiak Cc:

Re: [PATCH 3/4] cputlb: introduce tlb_flush_other_cpu for reset use

2025-02-26 Thread Alex Bennée
Richard Henderson writes: > On 2/25/25 10:46, Alex Bennée wrote: >> The commit 30933c4fb4 (tcg/cputlb: remove other-cpu capability from >> TLB flushing) introduced a regression that only shows up when >> --enable-debug-tcg is used. The main use case of tlb_flush outside of >> the current_cpu cont

[PATCH 1/2] target/riscv: Add scontext CSR handling

2025-02-26 Thread Florian Lugou
scontext size is 16 bits on RV32 and 32 bits on RV64, as recommended by version 1.0 2025-02-21 of the debug specification. When the Smstateen extension is implemented, accessibility to the scontext CSR is controlled by bit 57 of the [mh]stateen0 CSRs. Signed-off-by: Florian Lugou --- target/ris

Re: [PATCH 02/10] python: add qapi static analysis tests

2025-02-26 Thread John Snow
On Wed, Feb 26, 2025 at 4:29 AM Markus Armbruster wrote: > John Snow writes: > > > On Mon, Feb 24, 2025 at 7:36 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > Update the python tests to also check qapi. No idea why I didn't do > this > >> > before. I guess I was counting

Re: [PATCH v4 03/14] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:12 +0100 Mauro Carvalho Chehab wrote: > There are two pointers that are needed during error injection: > > 1. The start address of the CPER block to be stored; > 2. The address of the ack. s/ack/read_ack/ > > It is preferable to calculate them from the HEST table. Th

Re: [PATCH 01/25] tests/functional: move aarch64 GPU test into own file

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: 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. Signed-off-by: Alex Bennée Message-Id: <20250219150009.1662688-2-alex.ben.

Re: [PATCH v4 06/14] acpi/ghes: create an ancillary acpi_ghes_get_state() function

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:15 +0100 Mauro Carvalho Chehab wrote: > Instead of having a function to check if ACPI is enabled > (acpi_ghes_present), change its logic to be more generic, > returing a pointed to AcpiGhesState. > > Such change allows cleanup the ghes GED state code, avoiding > to read

Re: [PATCH v5 28/36] vfio/migration: Multifd device state transfer support - config loading support

2025-02-26 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Load device config received via multifd using the existing machinery behind vfio_load_device_config_state(). Also, make sure to process the relevant main migration channel flags. Signed-off-by: Maciej S. Szmigiero ---

Re: [PATCH v5 19/36] vfio/migration: Convert bytes_transferred counter to atomic

2025-02-26 Thread Maciej S. Szmigiero
On 26.02.2025 08:52, Cédric Le Goater wrote: On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" So it can be safety accessed from multiple threads. This variable type needs to be changed to unsigned long since 32-bit host platforms lack the necessary addition atomics on

Re: [PATCH v5 27/36] vfio/migration: Multifd device state transfer support - load thread

2025-02-26 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Since it's important to finish loading device state transferred via the main migration channel (via save_live_iterate SaveVMHandler) before starting loading the data asynchronously transferred via multifd the thread doing

[PATCH 18/25] plugins/api: clean-up the includes

2025-02-26 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: <20250225110844.3296991-5-alex.ben...@linaro.org> --- plugins/api.c | 3 --- 1 file changed, 3 deletions(-)

Re: [PATCH v4 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:09 +0100 Mauro Carvalho Chehab wrote: > Now that the ghes preparation patches were merged, let's add support > for error injection. > > On this series, the first 6 patches chang to the math used to calculate > offsets at HEST > table and hardware_error firmware file, t

Re: [PATCH 21/25] plugins/api: split out binary path/start/end/entry code

2025-02-26 Thread Warner Losh
On Wed, Feb 26, 2025 at 7:11 AM Alex Bennée wrote: > 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 bi

Re: [PATCH 04/10] docs/qapidoc: support header-less freeform sections

2025-02-26 Thread John Snow
On Wed, Feb 26, 2025, 4:37 AM Markus Armbruster wrote: > Markus Armbruster writes: > > > John Snow writes: > > > >> The code as written crashes when a free-form documentation block doesn't > >> start with a heading or subheading, for example: > >> > >> | ## > >> | # Just text, no heading. > >>

Re: [PATCH 02/25] tests/functional: factor out common code in gpu test

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: In preparation for handling more tests split out the common machine setup details from the test specific stuff. Signed-off-by: Alex Bennée Message-Id: <20250219150009.1662688-3-alex.ben...@linaro.org> --- tests/functional/test_aarch64_virt_gpu.py | 30 +

Re: [PATCH 0/2] vfio: Restrict to 64-bit host platforms

2025-02-26 Thread Daniel P . Berrangé
On Wed, Feb 26, 2025 at 09:47:19AM +0100, Cédric Le Goater wrote: > Hello, > > This series avoids compiling VFIO on 32-bit host platforms where it is > not needed. If it was previously enabled on 32-bit and was possible to successfully build & use, then it needs to go through the deprecation proc

Re: [PATCH] Fix data race with the state Field of ThreadPoolElement

2025-02-26 Thread mordan
Hello! Please take a look at the new version of the patch here: https://lore.kernel.org/all/20250224161719.3831357-1-mor...@ispras.ru Thank you! February 20, 2025 6:10 AM, "Paolo Bonzini" wrote: > On 2/19/25 17:12, Vitalii Mordan wrote: > >> diff --git a/util/thread-pool.c b/util/thread-pool.c

Re: [PATCH v4 01/14] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:10 +0100 Mauro Carvalho Chehab wrote: > Add a new ags flag to change the way HEST offsets are calculated. > Currently, offsets needed to store ACPI HEST offsets and read ack > are calculated based on a previous knowledge from the logic > which creates the HEST table. >

Re: [PATCH v4 02/14] acpi/ghes: add a firmware file with HEST address

2025-02-26 Thread Igor Mammedov
On Fri, 21 Feb 2025 15:35:11 +0100 Mauro Carvalho Chehab wrote: > Store HEST table address at GPA, placing its the start of the table at > hest_addr_le variable. > > Signed-off-by: Mauro Carvalho Chehab > Reviewed-by: Jonathan Cameron > Reviewed-by: Igor Mammedov > --- > hw/acpi/ghes.c

Re: [PATCH v4 00/14] Change ghes to use HEST-based offsets and add support for error inject

2025-02-26 Thread Igor Mammedov
On Wed, 26 Feb 2025 15:39:13 +0100 Mauro Carvalho Chehab wrote: > Em Wed, 26 Feb 2025 15:16:56 +0100 > Igor Mammedov escreveu: > > > On Fri, 21 Feb 2025 15:35:09 +0100 > > Mauro Carvalho Chehab wrote: > > > > > Now that the ghes preparation patches were merged, let's add support > > > for e

Re: [PATCH 03/10] qapi: delete un-needed python static analysis configs

2025-02-26 Thread John Snow
On Wed, Feb 26, 2025 at 2:28 AM Markus Armbruster wrote: > John Snow writes: > > > The pylint config is being left in place because the settings differ > > enough from the python/ directory settings that we need a chit-chat on > > how to merge them O:-) > > > > Everything else can go. > > > > Si

Re: [PATCH 04/25] tests/functional: expand tests to cover virgl

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: 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. We might want to eventually add more directed tests and individual features later on but the glmark/

Re: [PATCH v5 22/36] vfio/migration: Multifd device state transfer support - basic types

2025-02-26 Thread Maciej S. Szmigiero
On 26.02.2025 09:52, Cédric Le Goater wrote: On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Add basic types and flags used by VFIO multifd device state transfer support. Since we'll be introducing a lot of multifd transfer specific code, add a new file migration-mult

Re: [PATCH 08/25] tests/functional: skip vulkan tests with nVidia

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: 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

Re: [PATCH 09/25] libvirt-ci: bump to latest for vulkan-tools (libvirt MR 525)

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: The alpine baseline has also been updated in the meantime so we need to address that while we are at it. Signed-off-by: Alex Bennée --- Reviewed-by: Thomas Huth

Re: [PATCH v3 03/14] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-02-26 Thread Mauro Carvalho Chehab
Em Tue, 25 Feb 2025 10:43:27 +0100 Igor Mammedov escreveu: > On Fri, 21 Feb 2025 07:02:21 +0100 > Mauro Carvalho Chehab wrote: > > > Em Mon, 3 Feb 2025 15:34:23 +0100 > > Igor Mammedov escreveu: > > > > > On Fri, 31 Jan 2025 18:42:44 +0100 > > > Mauro Carvalho Chehab wrote: > > > > >

Re: [PATCH 10/25] tests/vm: bump timeout for shutdown

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: On my fairly beefy machine the timeout was triggering leaving a corrupted disk image due to power being pulled before the disk had synced. Double the timeout to avoid this. Triple the timeout? Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 2 +-

Re: [PATCH 12/25] tests/tcg: add message to _Static_assert in test-avx

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: In preparation for enabling clang and avoiding: error: '_Static_assert' with no message is a C2x extension [-Werror,-Wc2x-extensions] lets just add the message. let's ? Signed-off-by: Alex Bennée --- tests/tcg/i386/test-avx.c | 2 +- 1 file ch

Re: [PATCH] hw/gpio: npcm7xx: fixup out-of-bounds access

2025-02-26 Thread Patrick Venture
On Tue, Feb 25, 2025 at 11:04 PM Philippe Mathieu-Daudé wrote: > On 26/2/25 03:46, Patrick Venture wrote: > > The reg isn't validated to be a possible register before > > it's dereferenced for one case. The mmio space registered > > for the gpio device is 4KiB but there aren't that many > > regi

Re: [PATCH 11/25] tests/tcg: mark test-vma as a linux-only test

2025-02-26 Thread Thomas Huth
On 26/02/2025 15.03, Alex Bennée wrote: 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. Signed-off-by: Alex Bennée --- tests/tcg/mu

Re: [PATCH v5 19/36] vfio/migration: Convert bytes_transferred counter to atomic

2025-02-26 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" So it can be safety accessed from multiple threads. This variable type needs to be changed to unsigned long since 32-bit host platforms lack the necessary addition atomics on 64-bit variables. Using 32-bit counters on 32

Re: [PATCH 01/25] tests/functional: move aarch64 GPU test into own file

2025-02-26 Thread Richard Henderson
On 2/26/25 06:03, Alex Bennée wrote: 'aarch64_virt' : 720, + 'aarch64_virt_gpu' : 720, Does the split mean that we can reduce the timeout? r~

Re: [PATCH v5 25/36] vfio/migration: Multifd device state transfer support - receive init/cleanup

2025-02-26 Thread Cédric Le Goater
On 2/26/25 11:14, Cédric Le Goater wrote: On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Add support for VFIOMultifd data structure that will contain most of the receive-side data together with its init/cleanup methods. Signed-off-by: Maciej S. Szmigiero ---   hw/vf

Re: [PATCH 1/2] vfio: Make vfio-pci available on 64-bit host platforms only

2025-02-26 Thread Cédric Le Goater
On 2/26/25 15:12, BALATON Zoltan wrote: On Wed, 26 Feb 2025, Cédric Le Goater wrote: VFIO PCI never worked on PPC32 nor ARM, S390x is 64-bit, it might have worked on i386 long ago but we have no plans to further support VFIO on any 32-bit host platforms. Restrict to 64-bit host platforms. Cc: H

[PATCH v5 0/3] Improve Mips target

2025-02-26 Thread Aleksandar Rakic
From: Aleksandar Rakic Aleksandar Rakic (3): Add support for emulation of CRC32 instructions Skip NaN mode check for soft-float target/mips: Enable MSA ASE using a CLI flag linux-user/mips/cpu_loop.c| 6 +- target/mips/cpu-defs.c.inc| 10 +- targ

Re: [PATCH] tests/functional: Update the ppc64 pseries and pnv tests

2025-02-26 Thread Cédric Le Goater
Hello, On 2/26/25 10:04, Daniel P. Berrangé wrote: On Wed, Feb 26, 2025 at 08:01:09AM +0100, Thomas Huth wrote: On 26/02/2025 07.54, Cédric Le Goater wrote: The tests are using a now archived Fedora29 release. Switch to the most recent Fedora41 release. Signed-off-by: Cédric Le Goater ---

Re: [PATCH v5 30/36] vfio/migration: Multifd device state transfer support - send side

2025-02-26 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Implement the multifd device state transfer via additional per-device thread inside save_live_complete_precopy_thread handler. Switch between doing the data transfer in the new handler and doing it in the old save_state h

Re: [PATCH v5 17/36] migration: Add save_live_complete_precopy_thread handler

2025-02-26 Thread Peter Xu
On Wed, Feb 19, 2025 at 09:33:59PM +0100, Maciej S. Szmigiero wrote: > From: "Maciej S. Szmigiero" > > This SaveVMHandler helps device provide its own asynchronous transmission > of the remaining data at the end of a precopy phase via multifd channels, > in parallel with the transfer done by save

Re: [PATCH v5 3/3] target/mips: Enable MSA ASE using a CLI flag

2025-02-26 Thread Richard Henderson
On 2/26/25 09:03, Aleksandar Rakic wrote: --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -399,7 +399,7 @@ static inline void compute_hflags(CPUMIPSState *env) } } if (ase_msa_available(env)) { -if (env->CP0_Config5 & (1 << CP0C5_MSAEn)) { +if ((

Re: [PATCH 13/25] tests/tcg: fix constraints in test-i386-adcox

2025-02-26 Thread Richard Henderson
On 2/26/25 06:03, Alex Bennée wrote: 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" (

Re: [PATCH 15/25] plugins/api: use qemu_target_page_mask() to get value

2025-02-26 Thread Richard Henderson
On 2/26/25 06:03, Alex Bennée wrote: 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. Signed-off-by: Alex Bennée Message-Id:<20250225110844.3296991-2-alex.ben...@linaro.org> --- v2 - use the proper qemu_targ

Re: [PATCH 14/25] tests/tcg: enable -fwrapv for test-i386-bmi

2025-02-26 Thread Richard Henderson
On 2/26/25 06:03, Alex Bennée wrote: 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. Signed-off-by: Alex

Re: [PATCH 21/25] plugins/api: split out binary path/start/end/entry code

2025-02-26 Thread Richard Henderson
On 2/26/25 06:03, Alex Bennée wrote: +++ b/linux-user/plugin-api.c @@ -0,0 +1,14 @@ +/* + * QEMU Plugin API - linux-user-mode only implementations + * + * Common user-mode only APIs are in plugins/api-user. These helpers + * are only specific to linux-user. + * + * Copyright (C) 2017, Emilio G. C

Re: [PATCH v5 25/36] vfio/migration: Multifd device state transfer support - receive init/cleanup

2025-02-26 Thread Cédric Le Goater
On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Add support for VFIOMultifd data structure that will contain most of the receive-side data together with its init/cleanup methods. Signed-off-by: Maciej S. Szmigiero --- hw/vfio/migration-multifd.c | 33 +

  1   2   3   >