Re: Building QEMU as a Shared Library

2025-03-17 Thread Saanjh Sengupta
Hi Alex, You mentioned about a patch series; do you have it handy with you? If so, could you please direct me to the same ? On 14 Mar 2025, at 12:11 AM, Alex Bennée wrote: Saanjh Sengupta mailto:saanjhsengu...@outlook.com>> writes: Hi, What we are trying to achieve is that the QEMU should r

Re: [PATCH v2] microvm: do not use the lastest cpu version

2025-03-17 Thread Ani Sinha
On Wed, Mar 5, 2025 at 7:56 PM Ani Sinha wrote: > > On Wed, Mar 5, 2025 at 7:12 PM Stefan Hajnoczi wrote: > > > > On Wed, Mar 05, 2025 at 01:24:25PM +0530, Ani Sinha wrote: > > > On Sat, Mar 1, 2025 at 9:04 PM Ani Sinha wrote: > > > > > > > > On Thu, Feb 20, 2025 at 12:36 PM Zhao Liu wrote: > >

[PATCH] docs/system/arm: Use "functional tests" instead of "integration tests"

2025-03-17 Thread Thomas Huth
From: Thomas Huth We don't use the term "integration tests" for these kind of tests anymore, it's "functional tests" nowadays. Suggested-by: Niek Linnenbank Signed-off-by: Thomas Huth --- docs/system/arm/bananapi_m2u.rst | 6 +++--- docs/system/arm/orangepi.rst | 6 +++--- 2 files changed

[PATCH] docs/system: Use the meson binary from the pyvenv

2025-03-17 Thread Thomas Huth
From: Thomas Huth To avoid problems with the meson installation from the host system, we should always use the meson from our venv instead. Thus use this in the documentation, too. While we're at it, also mention that it has to be run from the build folder (in the igb.rst file; the other two fil

Re: [PATCH 00/17] rust/vmstate: Clean up, fix, enhance & test

2025-03-17 Thread Zhao Liu
On Mon, Mar 17, 2025 at 06:20:15PM +0100, Paolo Bonzini wrote: > Date: Mon, 17 Mar 2025 18:20:15 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH 00/17] rust/vmstate: Clean up, fix, enhance & test > > On Mon, Mar 17, 2025 at 3:52 PM Zhao Liu wrote: > > Hi, > > > > This series is in preparation

Re: [PATCH 14/17] rust/vmstate: Add unit test for vmstate_of macro

2025-03-17 Thread Zhao Liu
On Mon, Mar 17, 2025 at 06:11:35PM +0100, Paolo Bonzini wrote: > Date: Mon, 17 Mar 2025 18:11:35 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH 14/17] rust/vmstate: Add unit test for vmstate_of macro > > Thanks very much for the tests! > > On Mon, Mar 17, 2025 at 3:52 PM Zhao Liu wrote: > >

Re: [PATCH 13/17] rust/vmstate: Support vmstate_validate

2025-03-17 Thread Zhao Liu
> > +#[doc(alias = "VMSTATE_VALIDATE")] > > +#[macro_export] > > +macro_rules! vmstate_validate { > > +($struct_name:ty, $test_name:expr, $test_fn:expr $(,)?) => { > > +$crate::bindings::VMStateField { > > +name: ::std::ffi::CStr::as_ptr($test_name), > > +// TODO

Re: [PATCH 04/17] rust/vmstate: Use ident instead of expr to parse vmsd in vmstate_struct macro

2025-03-17 Thread Zhao Liu
On Tue, Mar 18, 2025 at 10:46:10AM +0800, Zhao Liu wrote: > Date: Tue, 18 Mar 2025 10:46:10 +0800 > From: Zhao Liu > Subject: Re: [PATCH 04/17] rust/vmstate: Use ident instead of expr to parse > vmsd in vmstate_struct macro > > On Mon, Mar 17, 2025 at 06:17:07PM +0100, Paolo Bonzini wrote: > > D

[PATCH 03/13] exec/target_page: runtime defintion for TARGET_PAGE_BITS_MIN

2025-03-17 Thread Pierrick Bouvier
We introduce later a mechanism to skip cpu definitions inclusion, so we can detect it here, and call the correct runtime function instead. Signed-off-by: Pierrick Bouvier --- include/exec/target_page.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/exec/target_page.h b/include/ex

[PATCH 04/13] exec/cpu-all: allow to include specific cpu

2025-03-17 Thread Pierrick Bouvier
Including "cpu.h" from code that is not compiled per target is ambiguous by definition. Thus we introduce a conditional include, to allow every architecture to set this, to point to the correct definition. hw/X or target/X will now include directly "target/X/cpu.h", and "target/X/cpu.h" will defin

[PATCH 10/13] target/arm/cpu: define same set of registers for aarch32 and aarch64

2025-03-17 Thread Pierrick Bouvier
To eliminate TARGET_AARCH64, we need to make various definitions common between 32 and 64 bit Arm targets. Added registers are used only by aarch64 code, and the only impact is on the size of CPUARMState, and added zarray (ARMVectorReg zarray[ARM_MAX_VQ * 16]) member (+64KB) It could be eventually

[PATCH 12/13] meson: add common hw files

2025-03-17 Thread Pierrick Bouvier
Those files will be compiled once per base architecture ("arm" in this case), instead of being compiled for every variant/bitness of architecture. We make sure to not include target cpu definitions (exec/cpu-defs.h) by defining header guard directly. This way, a given compilation unit can access a

[PATCH 06/13] exec/poison: KVM_HAVE_MCE_INJECTION can now be poisoned

2025-03-17 Thread Pierrick Bouvier
We prevent common code to use this define by mistake. Signed-off-by: Pierrick Bouvier --- include/exec/poison.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/exec/poison.h b/include/exec/poison.h index 8ed04b31083..816f6f99d16 100644 --- a/include/exec/poison.h +++ b/include/exec

[PATCH 02/13] exec/cpu-all: restrict compile time assert to target specific code

2025-03-17 Thread Pierrick Bouvier
TLB_FLAGS defines are based on TARGET_PAGE_BITS_MIN, which is defined for every target. In the next commit, we'll introduce a non-static define for TARGET_PAGE_BITS_MIN in common code, thus, we can't check this at compile time, except in target specific code. Signed-off-by: Pierrick Bouvier ---

[PATCH 13/13] hw/arm/boot: make compilation unit hw common

2025-03-17 Thread Pierrick Bouvier
Now we eliminated poisoned identifiers from headers, this file can now be compiled once for all arm targets. Signed-off-by: Pierrick Bouvier --- hw/arm/boot.c | 1 + hw/arm/meson.build | 5 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c ind

[PATCH 05/13] target/arm/cpu: move KVM_HAVE_MCE_INJECTION to kvm-all.c file directly

2025-03-17 Thread Pierrick Bouvier
This define is used only in accel/kvm/kvm-all.c, so we push directly the definition there. Add more visibility to kvm_arch_on_sigbus_vcpu() to allow removing this define from any header. The only other architecture defining KVM_HAVE_MCE_INJECTION is i386, which we can cleanup later. Signed-off-by

[PATCH 09/13] target/arm/cpu: define ARM_MAX_VQ once for aarch32 and aarch64

2025-03-17 Thread Pierrick Bouvier
This will affect zregs field for aarch32. This field is used for MVE and SVE implementations. MVE implementation is clipping index value to 0 or 1 for zregs[*].d[], so we should not touch the rest of data in this case anyway. Signed-off-by: Pierrick Bouvier --- target/arm/cpu.h | 6 +- 1 fil

[PATCH 08/13] target/arm/cpu: flags2 is always uint64_t

2025-03-17 Thread Pierrick Bouvier
Do not rely on target dependent type, but use a fixed type instead. Since the original type is unsigned, it should be safe to extend its size without any side effect. Signed-off-by: Pierrick Bouvier --- target/arm/cpu.h| 2 +- target/arm/tcg/hflags.c | 4 ++-- 2 files changed, 3 insertio

[PATCH 07/13] target/arm/cpu: always define kvm related registers

2025-03-17 Thread Pierrick Bouvier
This does not hurt, even if they are not used. Signed-off-by: Pierrick Bouvier --- target/arm/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 23c2293f7d1..96f7801a239 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -971,7 +971,6 @@ str

[PATCH 00/13] single-binary: start make hw/arm/ common (boot.c)

2025-03-17 Thread Pierrick Bouvier
This series focuses on removing compilation units duplication in hw/arm. We start with this architecture because it should not be too hard to transform it, and should give us some good hints on the difficulties we'll meet later. We first start by making changes in global headers to be able to not

Re: [BUG][powerpc] KVM Guest Boot Failure – Hangs at "Booting Linux via __start()”

2025-03-17 Thread Nicholas Piggin
Thanks for the report. Tricky problem. A secondary CPU is hanging before it is started by the primary via rtas call. That secondary keeps calling kvm_cpu_exec(), which keeps exiting out early with EXCP_HLT because kvm_arch_process_async_events() returns true because that cpu has ->halted=1. That

Re: [PATCH v3 0/7] Move memory listener register to vhost_vdpa_init

2025-03-17 Thread Jason Wang
On Tue, Mar 18, 2025 at 9:55 AM Lei Yang wrote: > > Hi Jonah > > I tested this series with the vhost_vdpa device based on mellanox > ConnectX-6 DX nic and hit the host kernel crash. This problem can be > easier to reproduce under the hotplug/unplug device scenario. > For the core dump messages ple

Re: [PATCH 12/17] rust/vmstate: Support version field in vmstate macros

2025-03-17 Thread Zhao Liu
On Mon, Mar 17, 2025 at 05:38:10PM +0100, Paolo Bonzini wrote: > Date: Mon, 17 Mar 2025 17:38:10 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH 12/17] rust/vmstate: Support version field in vmstate > macros > > On Mon, Mar 17, 2025 at 3:52 PM Zhao Liu wrote: > > Add "version = *" in vmstate

Re: [PATCH 04/17] rust/vmstate: Use ident instead of expr to parse vmsd in vmstate_struct macro

2025-03-17 Thread Zhao Liu
On Mon, Mar 17, 2025 at 06:17:07PM +0100, Paolo Bonzini wrote: > Date: Mon, 17 Mar 2025 18:17:07 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH 04/17] rust/vmstate: Use ident instead of expr to parse > vmsd in vmstate_struct macro > > On Mon, Mar 17, 2025 at 3:52 PM Zhao Liu wrote: > > > > W

Re: [PATCH 03/17] rust/vmstate: Add a prefix separator ", " for the array field in vmstate macros

2025-03-17 Thread Zhao Liu
On Mon, Mar 17, 2025 at 05:37:06PM +0100, Paolo Bonzini wrote: > Date: Mon, 17 Mar 2025 17:37:06 +0100 > From: Paolo Bonzini > Subject: Re: [PATCH 03/17] rust/vmstate: Add a prefix separator ", " for > the array field in vmstate macros > > On Mon, Mar 17, 2025 at 3:52 PM Zhao Liu wrote: > > > >

Re: [PATCH v3 4/7] memory-attribute-manager: Introduce MemoryAttributeManager to manage RAMBLock with guest_memfd

2025-03-17 Thread Chenyi Qiang
On 3/18/2025 1:01 AM, Gupta, Pankaj wrote: > On 3/17/2025 11:36 AM, David Hildenbrand wrote: >> On 17.03.25 03:54, Chenyi Qiang wrote: >>> >>> >>> On 3/14/2025 8:11 PM, Gupta, Pankaj wrote: On 3/10/2025 9:18 AM, Chenyi Qiang wrote: > As the commit 852f0048f3 ("RAMBlock: make guest_memfd

Re: [PATCH v3 0/7] Move memory listener register to vhost_vdpa_init

2025-03-17 Thread Lei Yang
Hi Jonah I tested this series with the vhost_vdpa device based on mellanox ConnectX-6 DX nic and hit the host kernel crash. This problem can be easier to reproduce under the hotplug/unplug device scenario. For the core dump messages please review the attachment. FW version: # flint -d :0d:00.

[PATCH v6 03/18] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h

2025-03-17 Thread Pierrick Bouvier
They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 12 include/exec/memory_ldst.h.inc | 4

RE: [PATCH 16/39] target/hexagon: Implement hex_tlb_lookup_by_asid()

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

[BUG][powerpc] KVM Guest Boot Failure and Hang at "Booting Linux via __start()"

2025-03-17 Thread misanjum
Bug Description: Encountering a boot failure when launching a KVM guest with 'qemu-system-ppc64'. The guest hangs at boot, and the QEMU monitor crashes. Reproduction Steps: # qemu-system-ppc64 --version QEMU emulator version 9.2.50 (v9.2.0-2799-g0462a32b4f) Copyright (c) 2003-2025 Fabrice Bel

[PATCH v2] tests/functional/test_arm_orangepi: rename test class to 'OrangePiMachine'

2025-03-17 Thread Niek Linnenbank
The test class in this file contains all functional test cases for testing the Orange Pi PC board. It should be given a name matching the Qemu machine it covers. This commit sets the test class name to 'OrangePiMachine'. Fixes: 380f7268b7b ("tests/functional: Convert the OrangePi tests to the fu

Re: [PATCH] docs/system: Fix the information on how to run certain functional tests

2025-03-17 Thread Niek Linnenbank
Hi Thomas, On Mon, Mar 17, 2025 at 7:50 AM Thomas Huth wrote: > Hi! > > On 16/03/2025 21.21, Niek Linnenbank wrote: > > Hi Thomas, > > > > On Tue, Mar 11, 2025 at 5:08 PM Thomas Huth > > wrote: > > > > The tests have been converted to the functional framework, so

[BUG][powerpc] KVM Guest Boot Failure – Hangs at "Booting Linux via __start()”

2025-03-17 Thread misanjum
Bug Description: Encountering a boot failure when launching a KVM guest with qemu-system-ppc64. The guest hangs at boot, and the QEMU monitor crashes. Reproduction Steps: # qemu-system-ppc64 --version QEMU emulator version 9.2.50 (v9.2.0-2799-g0462a32b4f) Copyright (c) 2003-2025 Fabrice Bella

Re: [PATCH 0/1 RFC] FUSE Export Coroutine Integration Cover Letter

2025-03-17 Thread Stefan Hajnoczi
On Sun, Mar 16, 2025 at 01:30:06AM +0800, saz97 wrote: > Signed-off-by: Changzhi Xie > > FUSE Export Coroutine Integration Cover Letter > > This patch series refactors QEMU's FUSE export module to leverage coroutines > for read/write operations, > addressing concurrency limitations and alignin

Re: [PATCH RFC v2] Integration coroutines into fuse export

2025-03-17 Thread Stefan Hajnoczi
On Sun, Mar 16, 2025 at 01:30:20AM +0800, saz97 wrote: > Signed-off-by: Changzhi Xie > > This commit refactors the FUSE export to process read and write operations > using coroutines, improving concurrency and avoiding blocking the main loop. > > The main changes include: > 1. Introduce FuseIOR

RE: [PATCH 27/39] target/hexagon: Implement hexagon_find_last_irq()

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH v6 13/18] system/xen: remove inline stubs

2025-03-17 Thread Richard Henderson
On 3/17/25 11:34, Pierrick Bouvier wrote: Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- include/system/xen-mapcache.h | 41 --- include/system/xen.h | 21 +++--- 2 files changed, 3 insertions(+), 59 deletions(-)

[PATCH for-10.1 2/9] gdbstub: Allow gdb_core_xml_file to be set at runtime

2025-03-17 Thread Peter Maydell
Currently the CPUClass:gdb_core_xml_file setting is a simple 'const char *' which the CPU class must set to a fixed string. Allow the CPU class to instead set a new method gdb_get_core_xml_file() which returns this string. This will allow Arm CPUs to use different XML files for AArch32 vs AArch64

RE: [PATCH 29/39] target/hexagon: Add pkt_ends_tb to translation

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-17 Thread Nicolin Chen
On Mon, Mar 17, 2025 at 04:24:53PM -0300, Jason Gunthorpe wrote: > On Mon, Mar 17, 2025 at 12:10:19PM -0700, Nicolin Chen wrote: > > Another question: how does an emulated device work with a vSMMUv3? > > I could imagine that all the accel steps would be bypassed since > > !sdev->idev. Yet, the emul

RE: [PATCH 28/39] target/hexagon: Implement modify_ssr, resched, pending_interrupt

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 26/39] target/hexagon: Decode trap1, rte as COF

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 25/39] target/hexagon: Add hexagon_cpu_mmu_index()

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 24/39] target/hexagon: Add exec-start-addr prop

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 20/39] target/hexagon: Implement siad inst

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

[PATCH 7/9] cxl-mailbox-utils: 0x5603 - FMAPI Get DC Region Extent Lists

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5603 implemented per CXL r3.2 Spec Section 7.6.7.6.4 Very similar to previously implemented command 0x4801. Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 84 ++ 1 file changed, 84 insertions(+) diff --gi

RE: [PATCH 19/39] target/hexagon: Implement hexagon_tlb_fill()

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

[PATCH 3/9] cxl/type3: Add dsmas_flags to CXLDCRegion struct

2025-03-17 Thread anisa . su887
From: Anisa Su Add dsmas_flags field to DC Region struct in preparation for next command, which returns the dsmas flags in the response. Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 2 ++ include/hw/cxl/cxl_device.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/mem/cxl_

[PATCH 6/9] cxl-mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5602 implemented per CXL r3.2 Spec Section 7.6.7.6.3 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 100 +++ hw/mem/cxl_type3.c | 2 +- include/hw/cxl/cxl_device.h | 3 ++ include/hw/cxl/cxl_m

[PATCH 8/9] cxl-mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5604 implemented per CXL r3.2 Spec Section 7.6.7.6.5 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 173 hw/mem/cxl_type3.c | 8 +- include/hw/cxl/cxl_device.h | 4 + 3 files changed, 181 in

[PATCH 9/9] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section 7.6.7.6.6 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 94 ++ 1 file changed, 94 insertions(+) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-util

[PATCH 0/9] CXL: FMAPI DCD Management Commands 0x5600-0x5605

2025-03-17 Thread anisa . su887
From: Anisa Su This patchset adds support for 6 FM API DCD Management commands (0x5600-0x5605) according to the CXL r3.2 Spec. It is based on the following branch: https://gitlab.com/jic23/qemu/-/tree/cxl-2025-02-20. The code was tested with libcxlmi, which runs in the QEMU VM and sends 56xxh co

[PATCH 4/9] cxl-mailbox-utils: 0x5601 - FMAPI Get Host Region Config

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5601 implemented per CXL r3.2 Spec Section 7.6.7.6.2 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 97 ++ 1 file changed, 97 insertions(+) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-uti

[PATCH 1/9] cxl/type3: Add supported block sizes bitmask to CXLDCRegion struct

2025-03-17 Thread anisa . su887
From: Anisa Su Add supported_blk_size field to CXLDCRegion struct in preparation for next patch. It is needed by command 0x5600 Get DC Region Config. Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 3 +++ include/hw/cxl/cxl_device.h | 1 + 2 files changed, 4 insertions(+) diff --git

[PATCH 5/9] cxl_events.h: move definition for dynamic_capacity_uuid and enum for DC event types

2025-03-17 Thread anisa . su887
From: Anisa Su move definition for dynamic_capacity_uuid and enum for DC event types to cxl_events.h from cxl_type3.c for shared use in next patch Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 15 --- include/hw/cxl/cxl_events.h | 15 +++ 2 files changed, 15

[PATCH 2/9] cxl-mailbox-utils: 0x5600 - FMAPI Get DCD Info

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5600 implemented per CXL 3.2 Spec Section 7.6.7.6.1 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 67 ++ hw/cxl/i2c_mctp_cxl.c | 6 +++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git

RE: [PATCH 14/39] target/hexagon: Add system event, cause codes

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 15/39] target/hexagon: Implement hex_tlb_entry_get_perm()

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 11/39] target/hexagon: Add representation to count cycles

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-17 Thread Jason Gunthorpe
On Mon, Mar 17, 2025 at 12:10:19PM -0700, Nicolin Chen wrote: > Another question: how does an emulated device work with a vSMMUv3? > I could imagine that all the accel steps would be bypassed since > !sdev->idev. Yet, the emulated iotlb should cache its translation > so we will need to flush the io

RE: [PATCH 10/39] target/hexagon: Implement arch_{s, g}et_{thread, system}_reg()

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 08/39] target/hexagon: Implement get_exe_mode()

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-17 Thread Nicolin Chen
On Mon, Mar 17, 2025 at 07:07:52PM +0100, Eric Auger wrote: > On 3/17/25 6:54 PM, Nicolin Chen wrote: > > On Wed, Mar 12, 2025 at 04:15:10PM +0100, Eric Auger wrote: > >> On 3/11/25 3:10 PM, Shameer Kolothum wrote: > >>> Based on SMMUv3 as a parent device, add a user-creatable smmuv3-accel > >>> de

Re: [PATCH] rust: pl011: Cut down amount of text quoted from PL011 TRM

2025-03-17 Thread Daniel P . Berrangé
On Mon, Mar 17, 2025 at 05:32:39PM +, Peter Maydell wrote: > Currently the comments in the Rust pl011 register.rs file include > large amounts of text from the PL011 TRM. This is much more > commentary than we typically quote from a device reference manual, > and much of it is not relevant to

RE: [PATCH 07/39] target/hexagon: Implement wait helper

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 09/39] target/hexagon: Implement arch_get_system_reg()

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

[PATCH v6 17/18] system/memory: make compilation unit common

2025-03-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/memory.c| 17 + system/meson.build | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/system/memory.c b/system/memory.c index 4c829793a0a..eddd21a6cdb 100644 --- a/system/memory.c

[PATCH v6 16/18] include/exec/memory: move devend functions to memory-internal.h

2025-03-17 Thread Pierrick Bouvier
Only system/physmem.c and system/memory.c use those functions, so we can move then to internal header. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory-internal.h | 19 +++ include/exec/memory.h | 18 -- 2 files chan

[PATCH v6 11/18] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index f5d574261a3..92e8708af76 100644 --- a/include/exec/ram_addr.h +++ b/inclu

[PATCH v6 12/18] hw/xen: add stubs for various functions

2025-03-17 Thread Pierrick Bouvier
Those symbols are used by system/physmem.c, and are called only if xen_enabled() (which happens only if CONFIG_XEN is set and xen is available). So we can crash the stubs in case those are called, as they are linked only when CONFIG_XEN is not set. Acked-by: Richard Henderson Reviewed-by: Anthon

[PATCH v6 05/18] exec/memory.h: make devend_memop "target defines" agnostic

2025-03-17 Thread Pierrick Bouvier
Will allow to make system/memory.c common later. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index da21e9150b5..069021

[PATCH v6 13/18] system/xen: remove inline stubs

2025-03-17 Thread Pierrick Bouvier
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- include/system/xen-mapcache.h | 41 --- include/system/xen.h | 21 +++--- 2 files changed, 3 insertions(+), 59 deletions(-) diff --git a/include/system/xen-mapcache.h b/i

[PATCH v6 01/18] exec/tswap: target code can use TARGET_BIG_ENDIAN instead of target_words_bigendian()

2025-03-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/tswap.h | 11 ++- cpu-target.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index ecd4faef015..2683da0adb7 100644 --- a/include/ex

[PATCH v6 10/18] system/kvm: make kvm_flush_coalesced_mmio_buffer() accessible for common code

2025-03-17 Thread Pierrick Bouvier
This function is used by system/physmem.c will be turn into common code in next commit. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/system/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h i

[PATCH v6 04/18] exec/memory_ldst_phys: extract memory_ldst_phys declarations from cpu-all.h

2025-03-17 Thread Pierrick Bouvier
They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Move stl_phys_notdirty function as well. Cached endianness agnostic version rely on st/ld*_p, which is available through tswap.h. Reviewed-by: Richard Henderson

[PATCH v6 14/18] system/physmem: compilation unit is now common to all targets

2025-03-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/meson.build b/system/meson.build index eec07a94513..bd82ef132e7 100644 --- a/system/meson.build +++ b/system/meson.build @@ -3,7 +3,6 @

[PATCH v6 18/18] system/ioport: make compilation unit common

2025-03-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/ioport.c| 1 - system/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/system/ioport.c b/system/ioport.c index 55c2a752396..89daae9d602 100644 --- a/system/ioport.c +++ b/system/ioport.

[PATCH v6 02/18] exec/tswap: implement {ld, st}.*_p as functions instead of macros

2025-03-17 Thread Pierrick Bouvier
Defining functions allows to use them from common code, by not depending on TARGET_BIG_ENDIAN. Remove previous macros from exec/cpu-all.h. By moving them out of cpu-all.h, we'll be able to break dependency on cpu.h for memory related functions coming in next commits. Reviewed-by: Richard Henderson

[PATCH v6 06/18] codebase: prepare to remove cpu.h from exec/exec-all.h

2025-03-17 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/tcg/tcg-op.h | 1 + target/ppc/helper_regs.h | 2 ++ hw/ppc/spapr_nested.c | 1 + hw/sh4/sh7750.c| 1 + page-vary-target.c | 2 +- target/ppc/tcg-excp_helper.c | 1 +

[PATCH v6 15/18] include/exec/memory: extract devend_big_endian from devend_memop

2025-03-17 Thread Pierrick Bouvier
we'll use it in system/memory.c. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 069021ac3ff..70177304a92 100644 -

[PATCH v6 07/18] exec/exec-all: remove dependency on cpu.h

2025-03-17 Thread Pierrick Bouvier
Previous commit changed files relying transitively on it. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index dd5c40f2233..19b0eda44a7 100644 --- a/i

[PATCH v6 09/18] exec/ram_addr: remove dependency on cpu.h

2025-03-17 Thread Pierrick Bouvier
Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index e4c28fbec9b..f5d574261

[PATCH v6 08/18] exec/memory-internal: remove dependency on cpu.h

2025-03-17 Thread Pierrick Bouvier
Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 100c1237ac2..b729f

[PATCH v6 00/18] make system memory API available for common code

2025-03-17 Thread Pierrick Bouvier
The main goal of this series is to be able to call any memory ld/st function from code that is *not* target dependent. As a positive side effect, we can turn related system compilation units into common code. The first 5 patches remove dependency of memory API to cpu headers and remove dependency

Re: [PATCH v3 2/4] hw/s390x/skeys: Introduce TYPE_DUMP_SKEYS_INTERFACE

2025-03-17 Thread Thomas Huth
On 10/03/2025 16.14, Philippe Mathieu-Daudé wrote: The storage keys are part of the machine memory. Introduce the TYPE_DUMP_SKEYS_INTERFACE type, allowing machine using storage keys to dump them when a DumpSKeysInterface::qmp_dump_skeys() callback is provided. Signed-off-by: Philippe Mathieu-Da

[PATCH 12/17] rust/vmstate: Support version field in vmstate macros

2025-03-17 Thread Zhao Liu
Add "version = *" in vmstate macros to help set version_id in VMStateField. Signed-off-by: Zhao Liu --- rust/qemu-api/src/vmstate.rs | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs index 3d4c50ca86f9..bb41bfd29

Re: [PATCH] docs/system: Fix the information on how to run certain functional tests

2025-03-17 Thread Thomas Huth
Hi! On 16/03/2025 21.21, Niek Linnenbank wrote: Hi Thomas, On Tue, Mar 11, 2025 at 5:08 PM Thomas Huth > wrote: The tests have been converted to the functional framework, so we should not talk about Avocado here anymore. ... diff --git a/docs/system/arm

Re: [RFC PATCH v2 09/20] hw/arm/smmuv3-accel: Add set/unset_iommu_device callback

2025-03-17 Thread Nicolin Chen
On Mon, Mar 17, 2025 at 08:38:23AM +, Shameerali Kolothum Thodi wrote: > Hi Nicolin, > > > -Original Message- > > From: Nicolin Chen > > Sent: Tuesday, March 11, 2025 9:08 PM > > To: Shameerali Kolothum Thodi > > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; > > eric.au...@redhat.c

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-17 Thread Eric Auger
On 3/17/25 6:54 PM, Nicolin Chen wrote: > On Wed, Mar 12, 2025 at 04:15:10PM +0100, Eric Auger wrote: >> On 3/11/25 3:10 PM, Shameer Kolothum wrote: >>> Based on SMMUv3 as a parent device, add a user-creatable smmuv3-accel >>> device. In order to support vfio-pci dev assignment with a Guest >>

Re: [PATCH 0/2] exec: Restrict memory-internal.h to system/

2025-03-17 Thread Richard Henderson
On 3/17/25 09:13, Philippe Mathieu-Daudé wrote: Only file units within the system/ directory need access to "memory-internal.h". Move it to system/ to restrict its scope. Based-on: <20250314173139.2122904-1-pierrick.bouv...@linaro.org> Philippe Mathieu-Daudé (2): accel/tcg: Remove unnecesary

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-17 Thread Nicolin Chen
On Wed, Mar 12, 2025 at 04:15:10PM +0100, Eric Auger wrote: > On 3/11/25 3:10 PM, Shameer Kolothum wrote: > > Based on SMMUv3 as a parent device, add a user-creatable smmuv3-accel > > device. In order to support vfio-pci dev assignment with a Guest > guest > > SMMUv3, the physical SMMUv3 has to be

RE: [PATCH 06/39] target/hexagon: Implement {g,s}etimask helpers

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 05/39] target/hexagon: Implement modify SSR

2025-03-17 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH v3 8/8] tests/functional: Add test for fadump in PSeries

2025-03-17 Thread Aditya Gupta
On 17/03/25 12:30, Thomas Huth wrote: On 17/03/2025 07.51, Aditya Gupta wrote: Hi Thomas, <...snip...> +    def test_fadump_pseries_kvm(self): +    """ +    Test Fadump in PSeries with KVM accel +    """ +    self.do_test_fadump(is_kvm=True, is_powernv=False) + +if __name__ ==

[PATCH] rust: pl011: Cut down amount of text quoted from PL011 TRM

2025-03-17 Thread Peter Maydell
Currently the comments in the Rust pl011 register.rs file include large amounts of text from the PL011 TRM. This is much more commentary than we typically quote from a device reference manual, and much of it is not relevant to QEMU. Compress and rephrase the comments so that we are not quoting su

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-17 Thread Alexander Graf
On 17.03.25 10:56, Gerd Hoffman wrote: On Fri, Mar 14, 2025 at 03:50:19PM +0100, Alexander Graf wrote: On 14.03.25 15:08, Gerd Hoffman wrote: Hi, Ok, assuming we allow the guest submit a IGVM image (which makes sense indeed, otherwise we'll probably end up re-inventing IGVM). How will

[PATCH 07/17] rust/vmstate: Fix type check for varray in vmstate_struct

2025-03-17 Thread Zhao Liu
When pass a varray to vmstate_struct, the `type` parameter should be the type of the element in the varray, for example: vmstate_struct!(HPETState, timers, [0 .. num_timers], VMSTATE_HPET_TIMER, BqlRefCell, version = 0) But this breaks current type check, because it checks the typ

[PATCH 06/17] rust/vmstate: Fix size field of VMStateField with VMS_ARRAY_OF_POINTER flag

2025-03-17 Thread Zhao Liu
The `size` field of the VMStateField with VMS_ARRAY_OF_POINTER flag should stores the size of pointer, which depends on platform. Currently, `*const`, `*mut`, `NonNull`, `Box<>` and their wrapper are supported, and they have the same size as `usize`. Store the size (of `usize`) when VMS_ARRAY_OF_

Re: [PATCH v3 1/4] hw/s390x/skeys: Declare QOM types using DEFINE_TYPES() macro

2025-03-17 Thread Thomas Huth
On 10/03/2025 16.14, Philippe Mathieu-Daudé wrote: When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/s39

Re: [PATCH v5 00/17] make system memory API available for common code

2025-03-17 Thread Philippe Mathieu-Daudé
Hi, On 14/3/25 19:39, Pierrick Bouvier wrote: On 3/14/25 11:34, Anthony PERARD wrote: On Fri, Mar 14, 2025 at 10:33:08AM -0700, Pierrick Bouvier wrote: Hi, one patch is missing review: [PATCH v5 12/17] hw/xen: add stubs for various functions. My "Acked-by" wasn't enough? Feel free try chang

  1   2   3   >