Re: [PATCH v6 2/3] hw/s390x: add Control-Program Identification to QOM

2025-06-17 Thread Shalini Chellathurai Saroja
On 2025-06-17 19:09, Nina Schoetterl-Glausch wrote: On Mon, 2025-06-16 at 16:01 +0200, Shalini Chellathurai Saroja wrote: Add Control-Program Identification (CPI) data to the QEMU Object Model (QOM), along with the timestamp in which the data was received as shown below. virsh # qemu-monitor-co

[PATCH 0/3] target/loongarch: Code cleanup with tlb emulation

2025-06-17 Thread Bibo Mao
This patchset is small code cleanup with LoongArch TLB emulation. LoongArch does not support hardware page table walker, TLB handling is complicated compared with common architectures. Bibo Mao (3): target/loongarch: Correct spelling in helper_csrwr_pwcl() target/loongarch: Fix CSR STLBPS regi

[PATCH 2/3] target/loongarch: Fix CSR STLBPS register write emulation

2025-06-17 Thread Bibo Mao
Function helper_csrwr_stlbps() is emulation with CSR STLBPS register write operation. However there is only parameter checking action, and no register updating action. Here update value of CSR_STLBPS when parameter passes to check. Signed-off-by: Bibo Mao --- target/loongarch/tcg/csr_helper.c |

[PATCH 3/3] target/loongarch: Remove unnecessary page size validity checking

2025-06-17 Thread Bibo Mao
Page size of TLB entry comes from CSR STLBPS and pwcl register. With huge page, it is dir_base + dir_width from pwcl register. With normal page, it is field of PTBASE from pwcl register. So it is ok to check validity in function helper_ldpte() and function helper_csrwr_stlbps(). And it is unnecess

[PATCH 1/3] target/loongarch: Correct spelling in helper_csrwr_pwcl()

2025-06-17 Thread Bibo Mao
There is small typo issue in function helper_csrwr_pwcl(), this patch corrects this issue. Signed-off-by: Bibo Mao --- target/loongarch/tcg/csr_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/loongarch/tcg/csr_helper.c b/target/loongarch/tcg/csr_helper.c

Re: [PATCH v2 2/3] docs: remove legacy QAPI manual generator

2025-06-17 Thread Markus Armbruster
John Snow writes: > On Mon, Jun 16, 2025 at 8:20 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Thanks for your service! >> > >> > Remove the old qapidoc and the option to enable the transmogrifier, >> > leaving the "transmogrifier" as the ONLY qapi doc generator. This in >> > effec

[PATCH v2 4/7] esp.c: only call dma_memory_read function if transfer length is non-zero

2025-06-17 Thread Mark Cave-Ayland
In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible to for the calculated transfer length to be zero. Only call the dma_memory_read function where the transfer length is non-zero to avoid invoking the DMA engine for a zero length transfer which can have s

[PATCH v2 7/7] esp.c: only allow ESP commands permitted in the current asc_mode

2025-06-17 Thread Mark Cave-Ayland
If an ESP command is issued in an incorrect mode then an illegal command interrupt should be generated. Add a new esp_cmd_is_valid() function to indicate whether the ESP command is valid for the current mode, and if not then raise the illegal command interrupt. This fixes WinNT MIPS which issues I

[PATCH v2 5/7] esp.c: only call dma_memory_write function if transfer length is non-zero

2025-06-17 Thread Mark Cave-Ayland
In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible to for the calculated transfer length to be zero. Only call the dma_memory_write function where the transfer length is non-zero to avoid invoking the DMA engine for a zero length transfer which can have

[PATCH v2 6/7] esp.c: add asc_mode property to indicate the current ESP mode

2025-06-17 Thread Mark Cave-Ayland
Add a new asc_mode property to ESPState which indicates the current mode of the ESP and update the ESP state machine accordingly. Bump the vmstate version and include migration logic to ensure that asc_mode is set to initiator mode such that any commands in progress will always continue. Signed-o

[PATCH v2 1/7] esp.c: only raise IRQ in esp_transfer_data() for CMD_SEL, CMD_SELATN and CMD_TI commands

2025-06-17 Thread Mark Cave-Ayland
Clarify the logic in esp_transfer_data() to ensure that the deferred interrupt code can only be triggered for CMD_SEL, CMD_SELATN and CMD_TI commands. This should already be the case, but make it explicit to ensure the logic isn't triggered unexpectedly. Signed-off-by: Mark Cave-Ayland --- hw

[PATCH v2 0/7] esp.c: only allow ESP commands permitted in the current mode

2025-06-17 Thread Mark Cave-Ayland
This series contains a few minor tidy-ups along with an implementation of the logic to only allow ESP commands permitted in the current mode. The motivation is to fix GitLab issue #2464 which causes Windows NT MIPS to bluescreen on boot. Patches 1 to 5 are simple tidy-ups from investigating the is

RE: [PATCH v1 06/15] intel_iommu: Handle PASID entry removing and updating

2025-06-17 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v1 06/15] intel_iommu: Handle PASID entry removing and >updating > >On 2025/6/6 18:04, Zhenzhong Duan wrote: >> This adds an new entry VTDPASIDCacheEntry in VTDAddressSpace to cache the >> pasid entry and track PASID usage and fut

Re: [PATCH v3 02/28] crypto/x509-utils: Add helper functions for certificate store

2025-06-17 Thread Markus Armbruster
Zhuoying Cai writes: > On 6/17/25 6:58 AM, Markus Armbruster wrote: >> Zhuoying Cai writes: >> >>> Add helper functions for x509 certificate which will be used in the next >>> patch for the certificate store. >>> >>> Signed-off-by: Zhuoying Cai [...] >> Ignorant question: why are these QAPI

Re: [PATCH RESEND] firmware: qemu_fw_cfg: Do not hard depend on CONFIG_HAS_IOPORT_MAP

2025-06-17 Thread kernel test robot
Hi Takashi, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v6.16-rc2 next-20250617] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as

Re: [PATCH 07/10] hw/loongarch: connect pch_msi controller to avec controller

2025-06-17 Thread gaosong
在 2025/6/17 下午3:34, Bibo Mao 写道: hi, here is  pch_msi  [start-256] gpio_out  connect to avec gpio_in [start, 256], not the avec connect to cpu. pch_msi is always connected to eiointc, and it is not connected to avec gpio_in. There is two MSI controllers coexisting together: pch_msi and avec,

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

2025-06-17 Thread Yi Liu
On 2025/6/17 21:11, Jason Gunthorpe wrote: On Tue, Jun 17, 2025 at 09:03:32PM +0800, Yi Liu wrote: I suggest fixing the Linux driver to refuse to run in sm_on mode if the HW supports scalable mode and ecap_slts = false. That may not be 100% spec compliant but it seems like a reasonable approach.

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

2025-06-17 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Gunthorpe >Subject: Re: [PATCH rfcv3 15/21] intel_iommu: Bind/unbind guest page table to >host > >On Tue, Jun 17, 2025 at 09:03:32PM +0800, Yi Liu wrote: >> > I suggest fixing the Linux driver to refuse to run in sm_on mode if >> > the HW supports scalab

RE: [PATCH v1 03/15] intel_iommu: Check for compatibility with IOMMUFD backed device when x-flts=on

2025-06-17 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 03/15] intel_iommu: Check for compatibility with >IOMMUFD backed device when x-flts=on > >Hi Zhenzhong, > >On 6/6/25 12:04 PM, Zhenzhong Duan wrote: >> When vIOMMU is configured x-flts=on in scalable mode, stage-1 page table >

Re: [RFC PATCH] target/arm: clamp value to account for RES0 fields

2025-06-17 Thread Richard Henderson
On 6/16/25 13:10, Alex Bennée wrote: If the user writes a large value to the register but with the bottom bits unset we could end up with something illegal. By clamping ahead of the check we at least assure we won't assert(bpr > 0) later in the GIC interface code. Signed-off-by: Alex Bennée ---

RE: [PATCH v1 02/15] intel_iommu: Optimize context entry cache utilization

2025-06-17 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 02/15] intel_iommu: Optimize context entry cache >utilization > >Hi Zhenzhong, > >On 6/6/25 12:04 PM, Zhenzhong Duan wrote: >> There are many call sites referencing context entry by calling >> vtd_dev_to_context_entry(

RE: [PATCH v1 02/15] intel_iommu: Optimize context entry cache utilization

2025-06-17 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: Re: [PATCH v1 02/15] intel_iommu: Optimize context entry cache >utilization > >On 2025/6/11 18:06, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Liu, Yi L >>> Subject: Re: [PATCH v1 02/15] intel_iommu: Optimize conte

Re: [PATCH] target/arm: Make RETA[AB] UNDEF when pauth is not implemented

2025-06-17 Thread Richard Henderson
On 6/16/25 10:15, Solomon Tan wrote: According to the Arm A-profile A64 Instruction Set Architecture, RETA[AB] should be decoded as UNDEF if the pauth feature is not implemented. Fixes: 0ebbe9021254f ("target/arm: Convert BRA[AB]Z, BLR[AB]Z, RETA[AB] to decodetree") Signed-off-by: Solomon Tan -

Re: QEMU emulating ARM Neoverse N1 unexpectectly emulates `retaa`

2025-06-17 Thread Richard Henderson
On 6/15/25 22:09, Philippe Mathieu-Daudé wrote: Hi Solomon, Cc'ing the qemu-arm@ list. On 14/6/25 06:51, r...@wjsota.com wrote: Hi! Is `qemu-aarch64 -cpu neoverse-n1` supposed to emulate the `retaa` instruction? I have a binary called `main_pac` compiled from https://learn.arm.com/learning-p

Re: [PATCH 00/19] i3c: aspeed: Add I3C support

2025-06-17 Thread Joe Komlodi
Hi, On Sun, Jun 15, 2025 at 11:49 PM Cédric Le Goater wrote: > > Hi > > + Jeremy > > On 6/13/25 02:03, Joe Komlodi wrote: > > Hi all, > > > > This series adds I3C bus support to QEMU and adds more functionality to the > > Aspeed I3C controller. > > > > This implementation is a basic implementatio

Re: [PATCH 01/19] hw/misc/aspeed_i3c: Move to i3c directory

2025-06-17 Thread Joe Komlodi
On Sun, Jun 15, 2025 at 11:42 PM Cédric Le Goater wrote: > > On 6/13/25 02:03, Joe Komlodi wrote: > > Moves the Aspeed I3C model and traces into hw/i3c and creates I3C build > > files. > > > > Signed-off-by: Joe Komlodi > > > Reviewed-by: Cédric Le Goater > > > Reviewed-by: Patrick Venture > >

Re: [PATCH 2/3] tracetool: introduce generate_unconditional

2025-06-17 Thread Alex Bennée
Tanish Desai writes: > This patch separates the generation logic of trace_foo() for the UST and > DTrace backends from other backends. > The motivation is to remove the unnecessary if (true) in the _no_check > function, as UST and DTrace do not require a trace_event_get_state check > without i

[PATCH -qemu] hw/cxl: Use runtime for bg cmd running semantics

2025-06-17 Thread Davidlohr Bueso
The current check incorrectly misses the 0% case, which semantically can either be not running or one that just started. The runtime is a better way to check for 0%, 100% or aborted. This is currently benign in the kernel equivalent without cancel support. Signed-off-by: Davidlohr Bueso --- Appl

Re: [PATCH v3 2/2] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-06-17 Thread Ilya Maximets
On 6/17/25 3:03 PM, Daniel Borkmann wrote: > On 6/17/25 1:59 PM, Ilya Maximets wrote: >> On 6/4/25 1:29 PM, Daniel Borkmann wrote: >>> While testing, it turned out that upon error in the queue creation loop, >>> we never trigger the af_xdp_cleanup() handler. This is because we pass >>> errp instead

Re: [PATCH v3 28/28] docs: Add secure IPL documentation

2025-06-17 Thread Collin Walling
On 6/4/25 5:56 PM, Zhuoying Cai wrote: > Add documentation for secure IPL > > Signed-off-by: Collin Walling > Signed-off-by: Zhuoying Cai > --- > docs/specs/s390x-secure-ipl.rst | 145 +++ > docs/system/s390x/secure-ipl.rst | 129 +++ > 2 fi

[PATCH] meson: Add most 3rd-party includes as system includes

2025-06-17 Thread Bernhard Beschow
When compiling QEMU against fuse3-3.17.1 with --enable-werror the build fails with: In file included from ../src/block/export/fuse.c:33: /usr/include/fuse3/fuse.h:959:5: error: redundant redeclaration of ‘fuse_main_real_versioned’ [-Werror=redundant-decls] 959 | int fuse_main_real_version

Re: [PATCH v2 2/3] docs: remove legacy QAPI manual generator

2025-06-17 Thread John Snow
On Mon, Jun 16, 2025 at 8:20 AM Markus Armbruster wrote: > John Snow writes: > > > Thanks for your service! > > > > Remove the old qapidoc and the option to enable the transmogrifier, > > leaving the "transmogrifier" as the ONLY qapi doc generator. This in > > effect also converts the QAPI test

Re: [PATCH 1/3] tracetool: removed the unused vcpu property

2025-06-17 Thread Alex Bennée
Tanish Desai writes: > The vcpu property is no longer used in these backends. Removing it avoids > unnecessary checks and simplifies the code generation for these trace > backends. > > Signed-off-by: Tanish Desai Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

[PATCH] qga/vss-win32: Add VSS provider unregistration retry

2025-06-17 Thread Elizabeth Ashurov
This commit improves the QGA VSS provider installation flow by attempting to unregister the VSS provider if it's already found during installation. This allows for a retry of installation even if a previous unregistration failed or was not performed. Signed-off-by: Elizabeth Ashurov --- qga/vss-

Re: [PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association

2025-06-17 Thread Donald Dutile
On 6/17/25 12:52 PM, Jonathan Cameron wrote: On Tue, 17 Jun 2025 09:49:54 +0200 Eric Auger wrote: On 6/16/25 12:20 PM, Jonathan Cameron wrote: On Fri, 13 Jun 2025 15:44:43 +0100 Shameer Kolothum wrote: Although this change does not affect functionality at present, it is Patch title s

Re: [PATCH 1/4] block/graph-lock: fix typo in comment

2025-06-17 Thread Eric Blake
On Wed, Jun 04, 2025 at 02:07:14PM +0200, Fiona Ebner wrote: > Signed-off-by: Fiona Ebner > --- > include/block/graph-lock.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/include/block/graph-lock.h b/include/block/graph-lock.h > index 2c26c72

[PATCH v2] tracetool: removed the unused vcpu property

2025-06-17 Thread Tanish Desai
The vcpu property is no longer used in these backends. Removing it avoids unnecessary checks and simplifies the code generation for these trace backends. Signed-off-by: Tanish Desai --- scripts/tracetool/__init__.py | 6 +++--- scripts/tracetool/backend/log.py| 6 +- scripts/tracet

Re: [PATCH 0/3] TDX: Fix and enhancement

2025-06-17 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] i386/tdx: Error and exit when named cpu model is requested

2025-06-17 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH 0/2] i386: Adjust CPUID_EXT_PDCM based on enable_pmu at realization

2025-06-17 Thread Paolo Bonzini
Queued, thanks; sorry about the delay. Paolo

Re: [PATCH v1 03/15] intel_iommu: Check for compatibility with IOMMUFD backed device when x-flts=on

2025-06-17 Thread Eric Auger
Hi Zhenzhong, On 6/6/25 12:04 PM, Zhenzhong Duan wrote: > When vIOMMU is configured x-flts=on in scalable mode, stage-1 page table > is passed to host to construct nested page table. We need to check > compatibility of some critical IOMMU capabilities between vIOMMU and > host IOMMU to ensure gues

Re: [PATCH v12 5/7] plugins: Add memory hardware address read/write API

2025-06-17 Thread Pierrick Bouvier
On 6/17/25 3:24 AM, Alex Bennée wrote: Rowan Hart writes: From: novafacing This patch adds functions to the plugins API to allow plugins to read and write memory via hardware addresses. The functions use the current address space of the current CPU in order to avoid exposing address space in

Re: [PATCH v1 02/15] intel_iommu: Optimize context entry cache utilization

2025-06-17 Thread Eric Auger
Hi Zhenzhong, On 6/6/25 12:04 PM, Zhenzhong Duan wrote: > There are many call sites referencing context entry by calling > vtd_dev_to_context_entry() which will traverse the DMAR table. > > In most cases we can use cached context entry in vtd_as->context_cache_entry > except when its entry is stal

Re: [PATCH v1 01/15] intel_iommu: Rename vtd_ce_get_rid2pasid_entry to vtd_ce_get_pasid_entry

2025-06-17 Thread Eric Auger
Hi Zhenzhong, On 6/6/25 12:04 PM, Zhenzhong Duan wrote: > In early days vtd_ce_get_rid2pasid_entry() was used to get pasid entry > of rid2pasid, then it was extended to get any pasid entry. So a new name > vtd_ce_get_pasid_entry is better to match what it actually does. > > No functional change in

Re: [PATCH v6 2/3] hw/s390x: add Control-Program Identification to QOM

2025-06-17 Thread Nina Schoetterl-Glausch
On Mon, 2025-06-16 at 16:01 +0200, Shalini Chellathurai Saroja wrote: > Add Control-Program Identification (CPI) data to the QEMU Object > Model (QOM), along with the timestamp in which the data was received > as shown below. > > virsh # qemu-monitor-command vm --pretty '{"execute":"qom-list", > "

Re: [PATCH v4 5/8] qtest/bios-tables-test: Add test for when ITS is off on aarch64

2025-06-17 Thread Eric Auger
On 6/17/25 6:01 PM, Gustavo Romero wrote: > Hi Eric, > > On 6/17/25 12:51, Eric Auger wrote: >> >> >> On 6/17/25 5:12 PM, Gustavo Romero wrote: >>> Hi Eric, >>> >>> On 6/17/25 10:34, Eric Auger wrote: Hi Gustavo, On 6/16/25 3:18 PM, Gustavo Romero wrote: > From: Philippe Mathi

Re: [PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association

2025-06-17 Thread Jonathan Cameron via
On Tue, 17 Jun 2025 09:49:54 +0200 Eric Auger wrote: > On 6/16/25 12:20 PM, Jonathan Cameron wrote: > > On Fri, 13 Jun 2025 15:44:43 +0100 > > Shameer Kolothum wrote: > > > >> Although this change does not affect functionality at present, it is > > Patch title says PCIe. This check is vs PC

[RFC PATCH 02/11] target/arm: re-arrange debug_cp_reginfo

2025-06-17 Thread Alex Bennée
Although we are using structure initialisation the order of the op[012]/cr[nm] fields don't match the rest of the code base. Re-organise to be consistent and help the poor engineer who is grepping for system registers. Signed-off-by: Alex Bennée --- target/arm/debug_helper.c | 12 +++- 1

[RFC PATCH 10/11] kvm/arm: implement a basic hypercall handler

2025-06-17 Thread Alex Bennée
For now just deal with the basic version probe we see during startup. Signed-off-by: Alex Bennée --- target/arm/kvm.c| 44 + target/arm/trace-events | 1 + 2 files changed, 45 insertions(+) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 0

[RFC PATCH 07/11] target/arm: clamp value on icc_bpr_write to account for RES0 fields

2025-06-17 Thread Alex Bennée
If the user writes a large value to the register but with the bottom bits unset we could end up with something illegal. By clamping ahead of the check we at least assure we won't assert(bpr > 0) later in the GIC interface code. Signed-off-by: Alex Bennée --- hw/intc/arm_gicv3_cpuif.c | 5 -

[RFC PATCH 09/11] kvm/arm: implement sysreg trap handler

2025-06-17 Thread Alex Bennée
Fortunately all the information about which sysreg is being accessed should be in the ISS field of the ESR. Once we process that we can figure out what we need to do. [AJB: the read/write stuff should probably go into a shared helper]. Signed-off-by: Alex Bennée --- target/arm/kvm.c| 95

[RFC PATCH 06/11] kvm/arm: allow out-of kernel GICv3 to work with KVM

2025-06-17 Thread Alex Bennée
Previously we suppressed this option as KVM would get confused if it started trapping GIC system registers without a GIC configured. However if we know we are trapping harder we can allow it much like we do for HVF. Signed-off-by: Alex Bennée --- target/arm/kvm_arm.h | 8 hw/arm/

[RFC PATCH 11/11] kvm/arm: implement WFx traps for KVM

2025-06-17 Thread Alex Bennée
This allows the vCPU guest core to go to sleep on a WFx instruction. Signed-off-by: Alex Bennée --- target/arm/kvm.c| 28 target/arm/trace-events | 1 + 2 files changed, 29 insertions(+) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 1280e2c1e8..63b

[RFC PATCH 08/11] kvm/arm: plumb in a basic trap harder handler

2025-06-17 Thread Alex Bennée
Currently we do nothing but report we don't handle anything and let KVM come to a halt. Signed-off-by: Alex Bennée --- target/arm/syndrome.h | 4 target/arm/kvm-stub.c | 5 + target/arm/kvm.c | 44 +++ 3 files changed, 53 insertions(+) dif

[RFC PATCH 03/11] linux-headers: Update to Linux 6.15.1 with trap-mem-harder (WIP)

2025-06-17 Thread Alex Bennée
Import headers for trap-me-harder, based on 6.15.1. Signed-off-by: Alex Bennée --- include/standard-headers/linux/virtio_pci.h | 1 + linux-headers/linux/kvm.h | 8 linux-headers/linux/vhost.h | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-)

[RFC PATCH 01/11] target/arm: allow gdb to read ARM_CP_NORAW regs (!upstream)

2025-06-17 Thread Alex Bennée
Before this we suppress all ARM_CP_NORAW registers being listed under GDB. This includes useful registers like CurrentEL which gets tagged as ARM_CP_NO_RAW because it is one of the ARM_CP_SPECIAL_MASK registers. These are registers TCG can directly compute because we have the information at compile

[RFC PATCH 04/11] kvm: expose a trap-harder option to the command line

2025-06-17 Thread Alex Bennée
It would be nice to only have the variable for this is a KVM_ARM_STATE but currently everything is just held together in the common KVMState. Only KVM ARM can set the flag though. Signed-off-by: Alex Bennée --- include/system/kvm_int.h | 4 target/arm/kvm.c | 19 +++

[RFC PATCH 05/11] target/arm: enable KVM_VM_TYPE_ARM_TRAP_ALL when asked

2025-06-17 Thread Alex Bennée
Signed-off-by: Alex Bennée --- target/arm/kvm_arm.h | 9 + hw/arm/virt.c| 7 +-- target/arm/kvm.c | 7 +++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 7dc83caed5..a4f68e14cb 100644 --- a/target/arm/k

[RFC PATCH 00/11] kvm/arm: trap-me-harder implementation

2025-06-17 Thread Alex Bennée
The following is an RFC to explore how KVM would look if we forwarded almost all traps back to QEMU to deal with. Why - won't it be horribly slow? Maybe, that's why its an RFC. Traditionally KVM tries to avoid full vmexit's to QEMU because the additional context

Re: [PULL v2 4/6] python: add qapi static analysis tests

2025-06-17 Thread John Snow
On Tue, Jun 17, 2025, 7:44 AM Markus Armbruster wrote: > John Snow writes: > > > Update the python tests to also check QAPI and the QAPI Sphinx > > extensions. The docs/sphinx/qapidoc_legacy.py file is not included in > > these checks, as it is destined for removal soon. mypy is also not > > cal

[PATCH v8 01/14] arm/cpu: Add sysreg definitions in cpu-sysregs.h

2025-06-17 Thread Cornelia Huck
From: Eric Auger This new header contains macros that define aarch64 registers. In a subsequent patch, this will be replaced by a more exhaustive version that will be generated from linux arch/arm64/tools/sysreg file. Those macros are sufficient to migrate the storage of those ID regs from named

Re: [PATCH v4 5/8] qtest/bios-tables-test: Add test for when ITS is off on aarch64

2025-06-17 Thread Gustavo Romero
Hi Eric, On 6/17/25 12:51, Eric Auger wrote: On 6/17/25 5:12 PM, Gustavo Romero wrote: Hi Eric, On 6/17/25 10:34, Eric Auger wrote: Hi Gustavo, On 6/16/25 3:18 PM, Gustavo Romero wrote: From: Philippe Mathieu-Daudé Arm64 GIC ITS (Interrupt Translation Service) is an optional piece of ha

Re: [PATCH v5 5/5] hw/arm/virt: Allow virt extensions with KVM

2025-06-17 Thread Miguel Luis
Hi Eric, > On 17 Jun 2025, at 15:41, Eric Auger wrote: > > > > On 6/17/25 5:23 PM, Miguel Luis wrote: >> Hi Alyssa, >> >>> On 17 Jun 2025, at 14:17, Alyssa Ross wrote: >>> >>> Eric Auger writes: >>> From: Haibo Xu Up to now virt support on guest has been only supported wi

[PATCH v8 08/14] arm/cpu: Store id_isar0-7 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- hw/intc/armv7m_nvic.c | 12 ++-- target/arm/cpu-features.h | 36 +- target/arm/cpu.c | 24 +++ target/arm/cpu.h | 7 --

Re: [PATCH v4 5/8] qtest/bios-tables-test: Add test for when ITS is off on aarch64

2025-06-17 Thread Gustavo Romero
Hi Eric, On 6/17/25 12:51, Eric Auger wrote: On 6/17/25 5:12 PM, Gustavo Romero wrote: Hi Eric, On 6/17/25 10:34, Eric Auger wrote: Hi Gustavo, On 6/16/25 3:18 PM, Gustavo Romero wrote: From: Philippe Mathieu-Daudé Arm64 GIC ITS (Interrupt Translation Service) is an optional piece of ha

Re: [PULL v2 00/31] Block patches

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

Re: [PATCH v3 2/2] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-06-17 Thread Ilya Maximets
On 6/4/25 1:29 PM, Daniel Borkmann wrote: > While testing, it turned out that upon error in the queue creation loop, > we never trigger the af_xdp_cleanup() handler. This is because we pass > errp instead of a local err pointer into the various AF_XDP setup functions > instead of a scheme like: >

Re: [PULL 0/9] target-arm queue

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

[PATCH v8 14/14] arm/kvm: use fd instead of fdarray[2]

2025-06-17 Thread Cornelia Huck
We have fd, so might as well neaten things up. Suggested-by: Eric Auger Reviewed-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/kvm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 3df046b2b911..70919aedd0a4 100

[PATCH v8 13/14] arm/cpu: switch to a generated cpu-sysregs.h.inc

2025-06-17 Thread Cornelia Huck
Generated against Linux 6.15. Reviewed-by: Sebastian Ott Reviewed-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-sysregs.h.inc | 43 +--- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/target/arm/cpu-sysregs.h.inc b/target/arm/cp

Re: [PATCH v3 1/2] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-06-17 Thread Ilya Maximets
On 6/4/25 1:29 PM, Daniel Borkmann wrote: > Extend 'inhibit=on' setting with the option to specify a pinned XSK map > path along with a starting index (default 0) to push the created XSK > sockets into. Example usage: > > # ./build/qemu-system-x86_64 [...] \ >-netdev > af-xdp,ifname=enp2s0f

[PATCH v8 05/14] arm/cpu: Store aa64mmfr0-3 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-features.h | 74 +++ target/arm/cpu.h | 4 --- target/arm/cpu64.c| 8 ++--- target/arm/h

Re: [PATCH v8 12/14] arm/cpu: Add sysreg generation scripts

2025-06-17 Thread Cornelia Huck
On Tue, Jun 17 2025, Cornelia Huck wrote: > diff --git a/scripts/arm-gen-cpu-sysregs-header.awk > b/scripts/arm-gen-cpu-sysregs-header.awk > new file mode 100755 > index ..f92bbbafa727 > --- /dev/null > +++ b/scripts/arm-gen-cpu-sysregs-header.awk > @@ -0,0 +1,37 @@ > +#!/bin/awk -f

Re: [PATCH v2 06/12] python: upgrade to python3.9+ syntax

2025-06-17 Thread John Snow
On Tue, Jun 17, 2025, 5:16 AM Mads Ynddal wrote: > > > diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py > > index cef81b0707f..a013e4402de 100755 > > --- a/scripts/simpletrace.py > > +++ b/scripts/simpletrace.py > > @@ -9,13 +9,15 @@ > > # > > # For help see docs/devel/tracing.rst > >

Re: [PATCH v3 1/2] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-06-17 Thread Daniel Borkmann via
On 6/17/25 1:59 PM, Ilya Maximets wrote: On 6/4/25 1:29 PM, Daniel Borkmann wrote: Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \

[PATCH v8 10/14] arm/cpu: Store id_dfr0/1 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- hw/intc/armv7m_nvic.c | 2 +- target/arm/cpu-features.h | 16 target/arm/cpu.c | 13 + target/arm/cpu.h |

[PATCH v8 12/14] arm/cpu: Add sysreg generation scripts

2025-06-17 Thread Cornelia Huck
From: Eric Auger Introduce scripts that automate the generation of system register definitions from a given linux source tree arch/arm64/tools/sysreg. Invocation of ./update-aarch64-sysreg-code.sh $PATH_TO_LINUX_SOURCE_TREE in scripts directory generates target/arm/cpu-sysregs.h.inc containing d

[PATCH v8 03/14] arm/cpu: Store aa64isar1/2 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-features.h | 44 +++ target/arm/cpu.c | 13 target/arm/cpu.h | 2 -- target

[PATCH v8 07/14] arm/cpu: Store aa64smfr0 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-features.h | 6 +++--- target/arm/cpu.h | 1 - target/arm/cpu64.c| 7 ++- target/arm/helper.c | 2 +- target/arm/kvm

Re: [PATCH v4 5/8] qtest/bios-tables-test: Add test for when ITS is off on aarch64

2025-06-17 Thread Eric Auger
On 6/17/25 5:12 PM, Gustavo Romero wrote: > Hi Eric, > > On 6/17/25 10:34, Eric Auger wrote: >> Hi Gustavo, >> >> On 6/16/25 3:18 PM, Gustavo Romero wrote: >>> From: Philippe Mathieu-Daudé >>> >>> Arm64 GIC ITS (Interrupt Translation Service) is an optional piece of >>> hardware introduced in G

Re: [PATCH-for-10.1 v4 0/8] hw/arm: GIC 'its=off' ACPI table fixes

2025-06-17 Thread Gustavo Romero
Hi Eric, Thanks a lot for doing a first pass on this series! On 6/17/25 06:35, Eric Auger wrote: Hi Gustavo, On 6/16/25 3:18 PM, Gustavo Romero wrote: Since v2: - Fixed no_tcg_its inverted logic (rth) Since v3: - Fixed remappings in the IORT table when ITS is no present - Rebased on master a

Re: [PATCH v3 2/2] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-06-17 Thread Daniel Borkmann via
On 6/17/25 1:59 PM, Ilya Maximets wrote: On 6/4/25 1:29 PM, Daniel Borkmann wrote: While testing, it turned out that upon error in the queue creation loop, we never trigger the af_xdp_cleanup() handler. This is because we pass errp instead of a local err pointer into the various AF_XDP setup fun

Re: [PATCH v4 5/8] qtest/bios-tables-test: Add test for when ITS is off on aarch64

2025-06-17 Thread Eric Auger
Hi Gustavo, On 6/16/25 3:18 PM, Gustavo Romero wrote: > From: Philippe Mathieu-Daudé > > Arm64 GIC ITS (Interrupt Translation Service) is an optional piece of > hardware introduced in GICv3 and, being optional, it can be disabled > in QEMU aarch64 VMs that support it using machine option "its=off

[PATCH v4 6/8] amd_iommu: Fix the calculation for Device Table size

2025-06-17 Thread Alejandro Jimenez
Correctly calculate the Device Table size using the format encoded in the Device Table Base Address Register (MMIO Offset h). Cc: qemu-sta...@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde --- hw/i386/amd_iommu.c |

[PATCH v8 11/14] arm/cpu: Store id_mmfr0-5 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- hw/intc/armv7m_nvic.c | 8 ++-- target/arm/cpu-features.h | 18 target/arm/cpu.h | 6 --- target/arm/cpu64.c| 16 +++ targ

Re: Build platform guarantees, docs, tests, and snakes in the garden

2025-06-17 Thread Markus Armbruster
John Snow writes: > Hi, I've long been a little confused about the specifics of our build > platform guarantee and how it applies to documentation and testing. "Guarantee" feels too strong. See below. > My *current* understanding is that our build platform guarantee applies to > both unit test

[PATCH v8 04/14] arm/cpu: Store aa64pfr0/1 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-features.h | 40 - target/arm/cpu.c | 29 target/arm/cpu.h | 2 --

Re: [PATCH v12 5/7] plugins: Add memory hardware address read/write API

2025-06-17 Thread Rowan Hart
My main concern about the long list of caveats for writing memory is the user will almost certainly cause weird things to happen which will then be hard to debug. I can see the patcher example however it would be useful to know what other practical uses this interface provides. Of course! My main

[PATCH v8 06/14] arm/cpu: Store aa64dfr0/1 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-features.h | 16 target/arm/cpu.c | 15 +-- target/arm/cpu.h | 2 -- target/arm/cpu64.c

Re: [PULL 0/2] QGA patches for 2025-06-12

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

[PATCH v8 00/14] arm: rework id register storage

2025-06-17 Thread Cornelia Huck
Mostly addressed Peter's feedback: - make sure every inbetween stage compiles (also fixed some bonus issues) - try to make the scripts more robust, add a note the generated file, and make sure to grab only registers we actually want - I did a half-hearted attempt to use python instead of awk, b

Re: [PULL v2 4/6] python: add qapi static analysis tests

2025-06-17 Thread Markus Armbruster
John Snow writes: > Update the python tests to also check QAPI and the QAPI Sphinx > extensions. The docs/sphinx/qapidoc_legacy.py file is not included in > these checks, as it is destined for removal soon. mypy is also not > called on the QAPI Sphinx extensions, owing to difficulties supporting

Re: [PULL v3 0/1] Tracing patches

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

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

2025-06-17 Thread Yi Liu
On 2025/6/17 20:37, Jason Gunthorpe wrote: On Mon, Jun 16, 2025 at 08:14:27PM -0700, Nicolin Chen wrote: On Mon, Jun 16, 2025 at 08:15:11AM +, Duan, Zhenzhong wrote: IIUIC, the guest kernel cmdline can switch the mode between the stage1 (nesting) and stage2 (legacy/emulated VT-d), right?

[PATCH v8 02/14] arm/cpu: Store aa64isar0/aa64zfr0 into the idregs arrays

2025-06-17 Thread Cornelia Huck
From: Eric Auger Also add kvm accessors for storing host features into idregs. Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- target/arm/cpu-features.h | 57 --- target/arm/cpu.c

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

2025-06-17 Thread Gustavo Romero
Hi Alex, On 6/17/25 06:49, Alex Bennée wrote: Gustavo Romero writes: Add a functional test, aarch64_hotplug_pci, to exercise PCI hotplug and hot-unplug on arm64. Queued to testing/next, thanks. Thanks a lot! Cheers, Gustavo

[PATCH v8 09/14] arm/cpu: Store id_pfr0/1/2 into the idregs array

2025-06-17 Thread Cornelia Huck
From: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Sebastian Ott Signed-off-by: Eric Auger Signed-off-by: Cornelia Huck --- hw/intc/armv7m_nvic.c | 5 ++-- target/arm/cpu-features.h | 10 target/arm/cpu.c | 8 +++--- target/arm/cpu.h | 3 --- targe

Re: [PATCH v5 5/5] hw/arm/virt: Allow virt extensions with KVM

2025-06-17 Thread Eric Auger
On 6/17/25 5:23 PM, Miguel Luis wrote: > Hi Alyssa, > >> On 17 Jun 2025, at 14:17, Alyssa Ross wrote: >> >> Eric Auger writes: >> >>> From: Haibo Xu >>> >>> Up to now virt support on guest has been only supported with TCG. >>> Now it becomes feasible to use it with KVM acceleration. >>> >>> A

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

2025-06-17 Thread Jason Gunthorpe
On Mon, Jun 16, 2025 at 08:14:27PM -0700, Nicolin Chen wrote: > On Mon, Jun 16, 2025 at 08:15:11AM +, Duan, Zhenzhong wrote: > > >IIUIC, the guest kernel cmdline can switch the mode between the > > >stage1 (nesting) and stage2 (legacy/emulated VT-d), right? > > > > Right. E.g., kexec from "int

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

2025-06-17 Thread Jason Gunthorpe
On Tue, Jun 17, 2025 at 09:03:32PM +0800, Yi Liu wrote: > > I suggest fixing the Linux driver to refuse to run in sm_on mode if > > the HW supports scalable mode and ecap_slts = false. That may not be > > 100% spec compliant but it seems like a reasonable approach. > > running sm_on with only ecap

  1   2   >