Re: [PATCH v5 3/4] hw/ssi/pnv_spi: Make bus names distinct for each controllers of a socket

2025-02-27 Thread Cédric Le Goater
On 2/28/25 04:03, Chalapathi V wrote: On 27-02-2025 07:24, Nicholas Piggin wrote: On Sat Jan 4, 2025 at 2:18 AM AEST, Chalapathi V wrote: Create a spi buses with distict names on each socket so that responders are attached to correct SPI controllers. QOM tree on a 2 socket machine: (qemu) inf

Re: [PATCH v2 1/6] hw/misc: Add MPFS system reset support

2025-02-27 Thread Alistair Francis
On Tue, Feb 25, 2025 at 10:55 AM Sebastian Huber wrote: > > Signed-off-by: Sebastian Huber Acked-by: Alistair Francis Alistair > --- > hw/misc/mchp_pfsoc_sysreg.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/hw/misc/mchp_pfsoc_sysreg.c b/hw/misc/mchp_pfsoc_sysreg.c > index

Re: [PATCH v10 6/8] hw/misc/riscv_iopmp: Add RISC-V IOPMP device

2025-02-27 Thread Alistair Francis
On Wed, Jan 22, 2025 at 6:48 PM Ethan Chen via wrote: > > Support IOPMP specification v0.9.2RC3. > The specification url: > https://github.com/riscv-non-isa/iopmp-spec/releases/tag/v0.9.2-RC3 > > The IOPMP checks whether memory access from a device or CPU is valid. > This implementation uses an IO

Re: [PATCH v2 0/3] riscv: AIA: refinement for KVM acceleration

2025-02-27 Thread Alistair Francis
On Mon, Feb 24, 2025 at 12:58 PM Yong-Xuan Wang wrote: > > Reorder the code to reduce the conditional checking and remove > unnecessary resource setting when using in-kernl AIA irqchip. > > --- > v2: > - remove the code reordering of the riscv-virt machine since it can't > work with NUMA setting

Re: [PATCH v10 8/8] hw/riscv/virt: Add IOPMP support

2025-02-27 Thread Alistair Francis
On Wed, Jan 22, 2025 at 6:49 PM Ethan Chen via wrote: > > - Add 'iopmp=on' option to enable IOPMP. It adds iopmp devices virt machine > to protect all regions of system memory. > > Signed-off-by: Ethan Chen > --- > docs/system/riscv/virt.rst | 7 > hw/riscv/Kconfig | 1 + > hw

Re: [PATCH v10 7/8] hw/misc/riscv_iopmp_dispatcher: Device for redirect IOPMP transaction infomation

2025-02-27 Thread Alistair Francis
On Wed, Jan 22, 2025 at 6:48 PM Ethan Chen via wrote: > > This device determines the target IOPMP device for forwarding information > based on: > * Address: For parallel IOPMP devices > * Stage: For cascading IOPMP devices > > Signed-off-by: Ethan Chen > --- > hw/misc/meson.build

Re: [PATCH v10 5/8] hw/misc/riscv_iopmp_txn_info: Add struct for transaction infomation

2025-02-27 Thread Alistair Francis
On Wed, Jan 22, 2025 at 6:49 PM Ethan Chen via wrote: > > The entire valid transaction must fit within a single IOPMP entry. > However, during IOMMU translation, the transaction size is not > available. This structure defines the transaction information required > by the IOPMP. > > Signed-off-by:

RE: [PATCH rfcv2 02/20] vfio/iommufd: Add properties and handlers to TYPE_HOST_IOMMU_DEVICE_IOMMUFD

2025-02-27 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: Re: [PATCH rfcv2 02/20] vfio/iommufd: Add properties and handlers to >TYPE_HOST_IOMMU_DEVICE_IOMMUFD > >Hi Zhenzhong, > > >On 2/19/25 9:22 AM, Zhenzhong Duan wrote: >> New added properties include IOMMUFD handle, devid and hwpt_id.

Re: [PATCH] hw/net: ftgmac100: copy eth_hdr for alignment

2025-02-27 Thread Andrew Jeffery
Hi Patrick, On Thu, 2025-02-27 at 15:42 +, Patrick Venture wrote: > eth_hdr requires 2 byte alignment > > Signed-off-by: Patrick Venture > --- >  hw/net/ftgmac100.c | 15 --- >  1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac10

Re: [RFC 1/2] system/memory: Allow creating IOMMU mappings from RAM discard populate notifiers

2025-02-27 Thread Chenyi Qiang
On 2/27/2025 7:27 PM, David Hildenbrand wrote: > On 27.02.25 04:26, Chenyi Qiang wrote: >> >> >> On 2/26/2025 8:43 PM, Chenyi Qiang wrote: >>> >>> >>> On 2/25/2025 5:41 PM, David Hildenbrand wrote: On 25.02.25 03:00, Chenyi Qiang wrote: > > > On 2/21/2025 6:04 PM, Chenyi Qiang w

[PATCH] virtio-pci: fix memory leak from device realization failure

2025-02-27 Thread Zheng Huang
This commit adds failback routine for `virtio_pci_realize` to fix the memory leak of an address space and the virtio-net device object. If the realization of the device failed, the address space should be destroyed too. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2845 Signed-off-by:

Re: [PATCH v2 3/3] binfmt: Add --ignore-family option

2025-02-27 Thread Alistair Francis
On Tue, Jan 28, 2025 at 4:29 AM Andrea Bolognani wrote: > > Until now, the script has worked under the assumption that a > host CPU can run binaries targeting any CPU in the same family. > That's a fair enough assumption when it comes to running i386 > binaries on x86_64, but it doesn't quite appl

Re: [PATCH v2 0/3] binfmt: Add --ignore-family option

2025-02-27 Thread Alistair Francis
On Tue, Jan 28, 2025 at 4:29 AM Andrea Bolognani wrote: > > Changes from [v1]: > > * adopt a completely different, more general approach. > > [v1] https://mail.gnu.org/archive/html/qemu-devel/2024-12/msg00459.html > > Andrea Bolognani (3): > binfmt: Shuffle things around > binfmt: Normalize

[PATCH v3] hw/arm/smmu: Introduce smmu_configs_inv_sid_range() helper

2025-02-27 Thread JianChunfu
Use a similar terminology smmu_hash_remove_by_sid_range() as the one being used for other hash table matching functions since smmuv3_invalidate_ste() name is not self explanatory, and introduce a helper that invokes the g_hash_table_foreach_remove. No functional change intended. Signed-off-by: Ji

Re: [PATCH v5 4/4] hw/ssi/pnv_spi: Put a limit to RDR match failures

2025-02-27 Thread Chalapathi V
On 27-02-2025 07:26, Nicholas Piggin wrote: On Sat Jan 4, 2025 at 2:18 AM AEST, Chalapathi V wrote: There is a possibility that SPI controller can get into loop due to indefinite RDR match failures. Hence put a limit to failures and stop the sequencer. Signed-off-by: Chalapathi V --- hw/ss

[PATCH v7 16/16] sev: Provide sev_features flags from IGVM VMSA to KVM_SEV_INIT2

2025-02-27 Thread Roy Hopkins
IGVM files can contain an initial VMSA that should be applied to each vcpu as part of the initial guest state. The sev_features flags are provided as part of the VMSA structure. However, KVM only allows sev_features to be set during initialization and not as the guest is being prepared for launch.

[PATCH] hw/loongarch/virt: Replace RSDT with XSDT table

2025-02-27 Thread Bibo Mao
XSDT table is introduced in ACPI Specification 5.0, it supports 64-bit address in the table. There is LoongArch system support from ACPI Specification 6.4 and later, XSDT is supported by LoongArch system. Here replace RSDT with XSDT table. Signed-off-by: Bibo Mao --- hw/loongarch/virt-acpi-buil

[PATCH v7 16/16] sev: Provide sev_features flags from IGVM VMSA to KVM_SEV_INIT2

2025-02-27 Thread Roy Hopkins
IGVM files can contain an initial VMSA that should be applied to each vcpu as part of the initial guest state. The sev_features flags are provided as part of the VMSA structure. However, KVM only allows sev_features to be set during initialization and not as the guest is being prepared for launch.

Re: [PATCH v5 3/4] hw/ssi/pnv_spi: Make bus names distinct for each controllers of a socket

2025-02-27 Thread Chalapathi V
On 27-02-2025 07:24, Nicholas Piggin wrote: On Sat Jan 4, 2025 at 2:18 AM AEST, Chalapathi V wrote: Create a spi buses with distict names on each socket so that responders are attached to correct SPI controllers. QOM tree on a 2 socket machine: (qemu) info qom-tree /machine (powernv10-machine)

Re: [PATCH v5 1/4] hw/ssi/pnv_spi: Replace PnvXferBuffer with Fifo8 structure

2025-02-27 Thread Chalapathi V
Hello Nick, Thank You for reviewing this series. On 27-02-2025 07:09, Nicholas Piggin wrote: On Sat Jan 4, 2025 at 2:18 AM AEST, Chalapathi V wrote: In PnvXferBuffer dynamically allocating and freeing is a process overhead. Hence used an existing Fifo8 buffer with capacity of 16 bytes. Signed

RE: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for invalidating user-managed HWPT

2025-02-27 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: Re: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for invalidating >user-managed HWPT > >Hi Zhenzhong, > > >On 2/19/25 9:22 AM, Zhenzhong Duan wrote: >> Signed-off-by: Nicolin Chen >> Signed-off-by: Zhenzhong Duan >in the titl

[PATCH v7 16/16] sev: Provide sev_features flags from IGVM VMSA to KVM_SEV_INIT2

2025-02-27 Thread Roy Hopkins
IGVM files can contain an initial VMSA that should be applied to each vcpu as part of the initial guest state. The sev_features flags are provided as part of the VMSA structure. However, KVM only allows sev_features to be set during initialization and not as the guest is being prepared for launch.

Re: [PATCH v10 5/8] hw/misc/riscv_iopmp_txn_info: Add struct for transaction infomation

2025-02-27 Thread Alistair Francis
On Wed, Jan 22, 2025 at 6:49 PM Ethan Chen via wrote: > > The entire valid transaction must fit within a single IOPMP entry. > However, during IOMMU translation, the transaction size is not > available. This structure defines the transaction information required > by the IOPMP. > > Signed-off-by:

Re: [PATCH 4/4] target/arm: Retry pushing CPER error if necessary

2025-02-27 Thread Jonathan Cameron via
On Wed, 26 Feb 2025 14:58:46 +1000 Gavin Shan wrote: > On 2/25/25 9:19 PM, Igor Mammedov wrote: > > On Fri, 21 Feb 2025 11:04:35 + > > Jonathan Cameron wrote: > >> > >> Ideally I'd like whatever we choose to look like what a bare metal machine > >> does - mostly because we are less likely

Re: [PATCH v10 2/8] memory: Introduce memory region fetch operation

2025-02-27 Thread Alistair Francis
On Wed, Jan 22, 2025 at 6:39 PM Ethan Chen via wrote: > > Allow memory regions to have different behaviors for read and fetch > operations. > > For example, the RISC-V IOPMP could raise an interrupt when the CPU > tries to fetch from a non-executable region. > > If the fetch operation for a memory

Re: [PATCH 1/3] target/arm: Correct LDRD atomicity and fault behaviour

2025-02-27 Thread Richard Henderson
On 2/27/25 09:58, Peter Maydell wrote: On Thu, 27 Feb 2025 at 17:41, Richard Henderson wrote: On 2/27/25 06:27, Peter Maydell wrote: +static void do_ldrd_load(DisasContext *s, TCGv_i32 addr, int rt, int rt2) +{ +/* + * LDRD is required to be an atomic 64-bit access if the + * addr

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

2025-02-27 Thread Launchpad Bug Tracker
This bug was fixed in the package qemu - 1:9.2.1+ds-1ubuntu3 --- qemu (1:9.2.1+ds-1ubuntu3) plucky; urgency=medium * Fix qemu-aarch64-static segfaults running ldconfig.real (LP: #2072564) - lp-2072564-elfload-Fix-alignment-when-unmapping-excess-reservat.patch Thanks to Dimit

Re: [PATCH v3 044/162] tcg: Convert div2 to TCGOutOpDivRem

2025-02-27 Thread Philippe Mathieu-Daudé
On 17/2/25 00:08, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/tcg.c| 24 +++-- tcg/aarch64/tcg-target.c.inc | 4 +++ tcg/arm/tcg-target.c.inc | 4 +++ tcg/i386/tcg-target.c.inc| 17 tcg/loongarch64

Re: [PATCH v5 36/36] vfio/migration: Update VFIO migration documentation

2025-02-27 Thread Maciej S. Szmigiero
On 27.02.2025 07:59, Cédric Le Goater wrote: On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Update the VFIO documentation at docs/devel/migration describing the changes brought by the multifd device state transfer. Signed-off-by: Maciej S. Szmigiero ---   docs/devel

Re: [PATCH] tests/tcg: Suppress compiler false-positive warning on sha1.c

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

Re: Query on the dirty bitmap

2025-02-27 Thread Eric Blake
On Wed, Feb 19, 2025 at 04:23:26PM +0530, prashant patil wrote: > Hello All, > Hope this email finds you well. > > I have been trying with qemu for a while now, and have come across a > problem specific to dirty bitmaps. I have enabled bitmap on the qcow2 disk > image using 'qemu-img bitmap' comma

Re: [PATCH 3/3] target/arm: Drop unused address_offset from op_addr_{rr, ri}_post()

2025-02-27 Thread Philippe Mathieu-Daudé
On 27/2/25 15:27, Peter Maydell wrote: All the callers of op_addr_rr_post() and op_addr_ri_post() now pass in zero for the address_offset, so we can remove that argument. Signed-off-by: Peter Maydell --- target/arm/tcg/translate.c | 26 +- 1 file changed, 13 insertion

Re: [PATCH 1/5] hw/arm/omap1: Convert raw printfs to qemu_log_mask()

2025-02-27 Thread Philippe Mathieu-Daudé
On 27/2/25 18:01, Peter Maydell wrote: omap1.c is very old code, and it contains numerous calls direct to printf() for various error and information cases. In this commit, convert the printf() calls that are for either guest error or unimplemented functionality to qemu_log_mask() calls. This le

Re: [PATCH 5/5] hw/arm/versatilepb: Convert printfs to LOG_GUEST_ERROR

2025-02-27 Thread Philippe Mathieu-Daudé
On 27/2/25 18:01, Peter Maydell wrote: Convert some printf() calls for attempts to access nonexistent registers into LOG_GUEST_ERROR logging. Signed-off-by: Peter Maydell --- hw/arm/versatilepb.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Dau

Re: [PATCH 3/5] hw/arm/omap1: Convert information printfs to tracepoints

2025-02-27 Thread Philippe Mathieu-Daudé
On 27/2/25 18:01, Peter Maydell wrote: The omap1 code uses raw printf() statements to print information about some events; convert these to tracepoints. In particular, this will stop the functional test for the sx1 from printing the not-very-helpful note "omap_clkm_write: clocking scheme set t

Re: [PATCH 2/5] hw/arm/omap1: Drop ALMDEBUG ifdeffed out code

2025-02-27 Thread Philippe Mathieu-Daudé
On 27/2/25 18:01, Peter Maydell wrote: In omap1.c, there are some debug printfs in the omap_rtc_write() function that are guardad by ifdef ALMDEBUG. ALMDEBUG is never set, so this is all dead code. It's not worth the effort of converting all of these to tracepoints; a modern tracepoint approach

Re: [PATCH v3 034/162] tcg: Convert mul to TCGOutOpBinary

2025-02-27 Thread Philippe Mathieu-Daudé
On 17/2/25 00:08, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/tcg.c| 6 ++- tcg/aarch64/tcg-target.c.inc | 18 --- tcg/arm/tcg-target.c.inc | 23 tcg/i386/tcg-target.c.inc| 47 +--- tcg/loongarch64/

[PATCH] nbd: Defer trace init until after daemonization

2025-02-27 Thread Eric Blake
At least the simple trace backend works by spawning a helper thread, and setting up an atexit() handler that coordinates completion with the helper thread. But since atexit registrations survive fork() but helper threads do not, this means that qemu-nbd configured to use the simple trace will dead

Re: [PATCH v5 34/36] vfio/migration: Max in-flight VFIO device state buffer count limit

2025-02-27 Thread Maciej S. Szmigiero
On 27.02.2025 07:48, Cédric Le Goater wrote: On 2/19/25 21:34, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Allow capping the maximum count of in-flight VFIO device state buffers queued at the destination, otherwise a malicious QEMU source could theoretically cause the target QEMU to

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

2025-02-27 Thread Maciej S. Szmigiero
On 26.02.2025 18:28, 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

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

2025-02-27 Thread Maciej S. Szmigiero
On 26.02.2025 18:46, 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

Re: [PATCH 00/10] vfio/igd: Remove legacy mode

2025-02-27 Thread Alex Williamson
On Tue, 25 Feb 2025 02:29:17 +0800 Tomita Moeko wrote: > This patchset removes some legacy checks and converts the legacy mode > implicitly enabled by BDF 00:02.0 into x-igd-* options, including: > * Removing PCI ROM BAR and VGA IO/MMIO range check before applying quirk > * Using unified x-igd-op

[PATCH 5/5] hw/arm/versatilepb: Convert printfs to LOG_GUEST_ERROR

2025-02-27 Thread Peter Maydell
Convert some printf() calls for attempts to access nonexistent registers into LOG_GUEST_ERROR logging. Signed-off-by: Peter Maydell --- hw/arm/versatilepb.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index 941616cd25b..3

Re: [PATCH v2] vdpa: Fix endian bugs in shadow virtqueue

2025-02-27 Thread Konstantin Shkolnyy
On 2/27/2025 00:33, Michael Tokarev wrote: 25.02.2025 15:39, Konstantin Shkolnyy wrote: On 2/25/2025 03:30, Michael Tokarev wrote: This looks like a qemu-stable material. Please let me know if it is not. It won't help without my other "[PATCH v2] vdpa: Allow vDPA to work on big-endian mach

Re: [PATCH] iotests: Stop NBD server in test 162 before starting the next one

2025-02-27 Thread Eric Blake
On Tue, Feb 25, 2025 at 08:06:50AM +0100, Thomas Huth wrote: > Test 162 recently started failing for me for no obvious reasons (I > did not spot any suspicious commits in this area), but looking in > the 162.out.bad log file, there was a suspicious message at the end: > > qemu-nbd: Cannot lock pi

Re: [PATCH] trace/simple: Fix hang when using simpletrace with fork()

2025-02-27 Thread Eric Blake
On Wed, Feb 26, 2025 at 09:50:15AM +0100, Thomas Huth wrote: > When compiling QEMU with --enable-trace-backends=simple , the > iotest 233 is currently hanging. This happens because qemu-nbd > calls trace_init_backends() first - which causes simpletrace to > install its writer thread and the atexit(

Re: Problem with iotest 233

2025-02-27 Thread Eric Blake
On Wed, Feb 26, 2025 at 09:55:18AM +0100, Thomas Huth wrote: > > > Though, that does not look like the thread from the simpletrace, but > > > the the QEMU RCU thread instead ... so no clue where that writer > > > thread might have gone... > > > > OK, I think I now understood the problem: qemu-nbd

Re: [PATCH 2/5] rust: pl011: move register definitions out of lib.rs

2025-02-27 Thread Peter Maydell
On Thu, 27 Feb 2025 at 16:48, Paolo Bonzini wrote: > > Signed-off-by: Paolo Bonzini > --- > rust/hw/char/pl011/src/device.rs| 7 +- > rust/hw/char/pl011/src/lib.rs | 509 +--- > rust/hw/char/pl011/src/registers.rs | 507 +++ > 3 files c

Re: [PATCH] QIOChannelSocket: Flush zerocopy socket error queue on ENOBUF failure for sendmsg

2025-02-27 Thread Manish
On 27/02/25 11:26 pm, Peter Xu wrote: !---| CAUTION: External Email |---! On Thu, Feb 27, 2025 at 10:30:31PM +0530, Manish wrote: Again really sorry, missed this

Re: [PATCH 4/5] rust: pl011: switch to safe chardev operation

2025-02-27 Thread Peter Maydell
On Thu, 27 Feb 2025 at 18:02, Paolo Bonzini wrote: > > On Thu, Feb 27, 2025 at 6:25 PM Peter Maydell > wrote: > > Thinking about other devices, presumably for more complex > > devices we might need to pass more than just a single 'bool' > > back from PL011Registers::write. What other kinds of th

Re: [PATCH] hw/net: npcm7xx_emc: fix alignment to eth_hdr

2025-02-27 Thread Peter Maydell
On Thu, 27 Feb 2025 at 18:12, Patrick Venture wrote: > > > > On Thu, Feb 27, 2025 at 8:08 AM Patrick Venture wrote: >> >> >> >> On Thu, Feb 27, 2025 at 8:01 AM Peter Maydell >> wrote: >>> >>> On Thu, 27 Feb 2025 at 15:55, Patrick Venture wrote: >>> > >>> > >>> > >>> > On Thu, Feb 27, 2025 at 7

Re: [PATCH 2/5] rust: pl011: move register definitions out of lib.rs

2025-02-27 Thread Paolo Bonzini
On 2/27/25 18:28, Peter Maydell wrote: On Thu, 27 Feb 2025 at 16:48, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs| 7 +- rust/hw/char/pl011/src/lib.rs | 509 +--- rust/hw/char/pl011/src/registers.rs | 507 ++

Re: [PATCH 2/5] rust: pl011: move register definitions out of lib.rs

2025-02-27 Thread Paolo Bonzini
On 2/27/25 18:28, Peter Maydell wrote: On Thu, 27 Feb 2025 at 16:48, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs| 7 +- rust/hw/char/pl011/src/lib.rs | 509 +--- rust/hw/char/pl011/src/registers.rs | 507 ++

Re: [PATCH] hw/net: npcm7xx_emc: fix alignment to eth_hdr

2025-02-27 Thread Patrick Venture
On Thu, Feb 27, 2025 at 8:08 AM Patrick Venture wrote: > > > On Thu, Feb 27, 2025 at 8:01 AM Peter Maydell > wrote: > >> On Thu, 27 Feb 2025 at 15:55, Patrick Venture wrote: >> > >> > >> > >> > On Thu, Feb 27, 2025 at 7:52 AM Peter Maydell >> wrote: >> >> >> >> On Thu, 27 Feb 2025 at 15:40, Pa

Re: [PATCH 0/5] hw/arm: Remove printf() calls

2025-02-27 Thread Richard Henderson
On 2/27/25 09:01, Peter Maydell wrote: Peter Maydell (5): hw/arm/omap1: Convert raw printfs to qemu_log_mask() hw/arm/omap1: Drop ALMDEBUG ifdeffed out code hw/arm/omap1: Convert information printfs to tracepoints hw/arm/omap_sx1.c: Remove ifdeffed out debug printf hw/arm/versatile

Re: [PATCH 1/3] target/arm: Correct LDRD atomicity and fault behaviour

2025-02-27 Thread Richard Henderson
On 2/27/25 06:27, Peter Maydell wrote: Our LDRD implementation is wrong in two respects: * if the address is 4-aligned and the load crosses a page boundary and the second load faults and the first load was to the base register (as in cases like "ldrd r2, r3, [r2]", then we must not

[PATCH] scripts: dump stdin on meson-buildoptions error

2025-02-27 Thread Patrick Venture
From: Nabih Estefan Dump sys.stdin when it errors on meson-buildoptions.py, letting us debug the build errors instead of just saying "Couldn't parse" Signed-off-by: Nabih Estefan Signed-off-by: Patrick Venture --- scripts/meson-buildoptions.py | 10 -- 1 file changed, 8 insertions(+),

Re: [PATCH 4/5] rust: pl011: switch to safe chardev operation

2025-02-27 Thread Paolo Bonzini
On Thu, Feb 27, 2025 at 6:25 PM Peter Maydell wrote: > On Thu, 27 Feb 2025 at 16:48, Paolo Bonzini wrote: > > Switch bindings::CharBackend with chardev::CharBackend. This removes > > occurrences of "unsafe" due to FFI and switches the wrappers for receive, > > can_receive and event callbacks to

Re: [PATCH 1/3] target/arm: Correct LDRD atomicity and fault behaviour

2025-02-27 Thread Peter Maydell
On Thu, 27 Feb 2025 at 17:41, Richard Henderson wrote: > > On 2/27/25 06:27, Peter Maydell wrote: > > +static void do_ldrd_load(DisasContext *s, TCGv_i32 addr, int rt, int rt2) > > +{ > > +/* > > + * LDRD is required to be an atomic 64-bit access if the > > + * address is 8-aligned, tw

Re: [PATCH] QIOChannelSocket: Flush zerocopy socket error queue on ENOBUF failure for sendmsg

2025-02-27 Thread Peter Xu
On Thu, Feb 27, 2025 at 10:30:31PM +0530, Manish wrote: > Again really sorry, missed this due to some issue with my mail filters and > came to know about it via qemu-devel weblink. :) > > On 25/02/25 2:37 pm, Daniel P. Berrangé wrote: > > !--

Re: [PATCH 3/3] target/arm: Drop unused address_offset from op_addr_{rr, ri}_post()

2025-02-27 Thread Richard Henderson
On 2/27/25 06:27, Peter Maydell wrote: All the callers of op_addr_rr_post() and op_addr_ri_post() now pass in zero for the address_offset, so we can remove that argument. Signed-off-by: Peter Maydell --- target/arm/tcg/translate.c | 26 +- 1 file changed, 13 insertions

Re: [PATCH 2/3] target/arm: Correct STRD atomicity

2025-02-27 Thread Richard Henderson
On 2/27/25 06:27, Peter Maydell wrote: Our STRD implementation doesn't correctly implement the requirement: * if the address is 8-aligned the access must be a 64-bit single-copy atomic access, not two 32-bit accesses Rewrite the handling of STRD to use a single tcg_gen_qemu_st_i64() of a v

[PATCH] rust: hpet: decode HPET registers into enums

2025-02-27 Thread Paolo Bonzini
Generalize timer_and_addr() to decode all registers into a single enum HPETRegister, and use the TryInto derive to separate valid and invalid values. The main advantage lies in checking that all registers are enumerated in the "match" statements. Signed-off-by: Paolo Bonzini --- rust/Cargo.toml

[PULL 04/34] rust: subprojects: add libc crate

2025-02-27 Thread Paolo Bonzini
This allows access to errno values. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/Cargo.lock | 7 rust/qemu-api/Cargo.toml | 1 + scripts/archive-source.sh | 2 +- scripts/make-release

Re: [PATCH 2/2] vfio: Make vfio-platform available on Aarch64 platforms only

2025-02-27 Thread Alex Williamson
On Thu, 27 Feb 2025 09:32:46 +0100 Eric Auger wrote: > Hi Cédric, > > On 2/26/25 9:47 AM, Cédric Le Goater wrote: > > VFIO Platforms was designed for Aarch64. Restrict availability to > > 64-bit host platforms. > > > > Cc: Eric Auger > > Signed-off-by: Cédric Le Goater > Reviewed-by: Eric Au

Re: [PATCH 4/5] rust: pl011: switch to safe chardev operation

2025-02-27 Thread Peter Maydell
On Thu, 27 Feb 2025 at 16:48, Paolo Bonzini wrote: > > Switch bindings::CharBackend with chardev::CharBackend. This removes > occurrences of "unsafe" due to FFI and switches the wrappers for receive, > can_receive and event callbacks to the common ones implemented by > chardev::CharBackend. > > S

[PATCH 2/5] hw/arm/omap1: Drop ALMDEBUG ifdeffed out code

2025-02-27 Thread Peter Maydell
In omap1.c, there are some debug printfs in the omap_rtc_write() function that are guardad by ifdef ALMDEBUG. ALMDEBUG is never set, so this is all dead code. It's not worth the effort of converting all of these to tracepoints; a modern tracepoint approach would probably have a single tracepoint c

Re: [PATCH v7 10/16] docs/system: Add documentation on support for IGVM

2025-02-27 Thread Gupta, Pankaj
On 2/27/2025 3:29 PM, Roy Hopkins wrote: IGVM support has been implemented for Confidential Guests that support AMD SEV and AMD SEV-ES. Add some documentation that gives some background on the IGVM format and how to use it to configure a confidential guest. Signed-off-by: Roy Hopkins Reviewed-b

Re: [PATCH v7 08/16] i386/sev: Refactor setting of reset vector and initial CPU state

2025-02-27 Thread Gupta, Pankaj
On 2/27/2025 3:29 PM, Roy Hopkins wrote: When an SEV guest is started, the reset vector and state are extracted from metadata that is contained in the firmware volume. In preparation for using IGVM to setup the initial CPU state, the code has been refactored to populate vmcb_save_area for each C

[PATCH 3/5] hw/arm/omap1: Convert information printfs to tracepoints

2025-02-27 Thread Peter Maydell
The omap1 code uses raw printf() statements to print information about some events; convert these to tracepoints. In particular, this will stop the functional test for the sx1 from printing the not-very-helpful note "omap_clkm_write: clocking scheme set to synchronous scalable" to the test's defa

Re: [PATCH 3/4] ppc/amigaone: Add default environment

2025-02-27 Thread BALATON Zoltan
On Thu, 27 Feb 2025, Nicholas Piggin wrote: On Thu Feb 27, 2025 at 12:18 PM AEST, BALATON Zoltan wrote: On Thu, 27 Feb 2025, Nicholas Piggin wrote: On Sun Feb 23, 2025 at 3:52 AM AEST, BALATON Zoltan wrote: Initialise empty NVRAM with default values. This also enables IDE UDMA mode in AmigaOS

[PATCH 4/5] hw/arm/omap_sx1.c: Remove ifdeffed out debug printf

2025-02-27 Thread Peter Maydell
Remove an ifdeffed out debug printf from the static_write() function in omap_sx1.c. In theory we could turn this into a tracepoint, but for code this old it doesn't seem worthwhile. We can add tracepoints if and when we have a reason to debug something. Signed-off-by: Peter Maydell --- hw/arm/om

[PATCH 0/5] hw/arm: Remove printf() calls

2025-02-27 Thread Peter Maydell
I noticed while looking at the sx1 functional tests that the omap1 device emulation code prints to stdout "omap_clkm_write: clocking scheme set to synchronous scalable" which the test dutifully captures to its default.log. Printing this kind of debug or information message to stdout is definitely

Re: [PATCH] QIOChannelSocket: Flush zerocopy socket error queue on ENOBUF failure for sendmsg

2025-02-27 Thread Manish
Again really sorry, missed this due to some issue with my mail filters and came to know about it via qemu-devel weblink. :) On 25/02/25 2:37 pm, Daniel P. Berrangé wrote: !---| CAUTION: External Email |-

[PATCH 1/5] hw/arm/omap1: Convert raw printfs to qemu_log_mask()

2025-02-27 Thread Peter Maydell
omap1.c is very old code, and it contains numerous calls direct to printf() for various error and information cases. In this commit, convert the printf() calls that are for either guest error or unimplemented functionality to qemu_log_mask() calls. This leaves the printf() calls that are informat

Re: [PATCH] tests/tcg: Suppress compiler false-positive warning on sha1.c

2025-02-27 Thread Richard Henderson
On 2/27/25 06:13, Peter Maydell wrote: GCC versions at least 12 through 15 incorrectly report a warning about code in sha1.c: tests/tcg/multiarch/sha1.c:161:13: warning: ‘SHA1Transform’ reading 64 bytes from a region of size 0 [-Wstringop-overread] 161 | SHA1Transform(context->st

[PATCH v2 0/5] ppc/amigaone patches

2025-02-27 Thread BALATON Zoltan
Hello, v2: - change unused read function to g_assert_not_reached() - new patch to add defines to constants - added R-b tags This series adds NVRAM and support for -kernel, -initrd and -append options to the amigaone machine. This makes it easier to boot AmigaOS and avoids a crash in the guest whe

Re: [PATCH v7 38/52] i386/apic: Skip kvm_apic_put() for TDX

2025-02-27 Thread Francesco Lavra
On Fri, 2025-01-24 at 08:20 -0500, Xiaoyao Li wrote: > KVM neithers allow writing to MSR_IA32_APICBASE for TDs, nor allow > for > KVM_SET_LAPIC[*]. > > Note, KVM_GET_LAPIC is also disallowed for TDX. It is called in the > path > >   do_kvm_cpu_synchronize_state() >   -> kvm_arch_get_registers() >

[PATCH v2 1/5] ppc/amigaone: Simplify replacement dummy_fw

2025-02-27 Thread BALATON Zoltan
There's no need to do shift in a loop, doing it in one instruction works just as well, only the result is used. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- hw/ppc/amigaone.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/ppc/amigaone.c b/hw/ppc/ami

Re: [PATCH] QIOChannelSocket: Flush zerocopy socket error queue on ENOBUF failure for sendmsg

2025-02-27 Thread Manish
Really sorry, looks like there is some issue with my mail filters. I was not aware this patch was already reviewed. Just checked by chance qemu-devels weblink and saw reviews. Sorry for missing it. I will re-post by early next week. On 25/02/25 2:05 am, Peter Xu wrote: !-

[PATCH 0/5] rust: pl011 cleanups + chardev bindings

2025-02-27 Thread Paolo Bonzini
With this series, the only remaining use of unsafe is for vmstate's post load callback, which is small and self contained. All functionality used by pl011 and HPET devices are wrapped in Rust APIs, so they look like what a "real" from-scratch Rust device would be. Patch 2 is best reviewed with "g

[PATCH 3/5] rust: pl011: clean up visibilities of callbacks

2025-02-27 Thread Paolo Bonzini
Do not make callbacks unnecessarily "pub", they are only used through function pointers. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/devi

[PATCH 4/5] rust: pl011: switch to safe chardev operation

2025-02-27 Thread Paolo Bonzini
Switch bindings::CharBackend with chardev::CharBackend. This removes occurrences of "unsafe" due to FFI and switches the wrappers for receive, can_receive and event callbacks to the common ones implemented by chardev::CharBackend. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.r

[PATCH 5/5] rust: pl011: pass around registers::Data

2025-02-27 Thread Paolo Bonzini
The values stored in the Fifo are instances of the bitfield-struct registers::Data. Convert as soon as possible the value written into DR, and always refer to the bitfield struct; it's generally cleaner other than PL011State::receive having to do a double conversion u8=>u32=>registers::Data. Sign

[PATCH 1/5] rust: chardev: provide basic bindings to character devices

2025-02-27 Thread Paolo Bonzini
Most of the character device API is pretty simple, with "0 or -errno" or "number of bytes or -errno" as the convention for return codes. Add safe wrappers for the API to the CharBackend bindgen-generated struct. The API is not complete, but it covers the parts that are used by the PL011 device, pl

[PATCH 2/5] rust: pl011: move register definitions out of lib.rs

2025-02-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs| 7 +- rust/hw/char/pl011/src/lib.rs | 509 +--- rust/hw/char/pl011/src/registers.rs | 507 +++ 3 files changed, 513 insertions(+), 510 deletions(-) create mode 100644 ru

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

2025-02-27 Thread Peter Xu
On Thu, Feb 27, 2025 at 12:42:30AM +, Zhijian Li (Fujitsu) wrote: > > > On 26/02/2025 23:51, Peter Xu wrote: > > 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: > >> - Simila

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

2025-02-27 Thread Igor Mammedov
On Thu, 27 Feb 2025 17:00:38 +0100 Mauro Carvalho Chehab wrote: > Now that the ghes preparation patches were merged, let's add support > for error injection. > > On this version, HEST table got added to ACPI tables testing for aarch64 virt. > > There are also some patch reorder to help reviewer

Re: [PATCH] MAINTAINERS: Add myself as vfio-igd maintainer

2025-02-27 Thread Cédric Le Goater
On 2/27/25 17:27, Tomita Moeko wrote: As suggested by Cédric, I'm glad to be a maintainer of vfio-igd. Signed-off-by: Tomita Moeko Reviewed-by: Cédric Le Goater Thanks, C. --- MAINTAINERS | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINT

Re: [PATCH 2/4] ppc/amigaone: Implement NVRAM emulation

2025-02-27 Thread BALATON Zoltan
On Thu, 27 Feb 2025, Nicholas Piggin wrote: On Thu Feb 27, 2025 at 11:48 AM AEST, BALATON Zoltan wrote: On Thu, 27 Feb 2025, Nicholas Piggin wrote: On Sun Feb 23, 2025 at 3:52 AM AEST, BALATON Zoltan wrote: The board has a battery backed NVRAM where U-Boot environment is stored which is also a

[PATCH v2 5/5] ppc/amigaone: Add #defines for memory map constants

2025-02-27 Thread BALATON Zoltan
Suggested-by: Nicholas Piggin Signed-off-by: BALATON Zoltan --- hw/ppc/amigaone.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/hw/ppc/amigaone.c b/hw/ppc/amigaone.c index 04ff415a6b..f6c9eb69ab 100644 --- a/hw/ppc/amigaone.c +++ b/hw/ppc/amigaone.c @@

[PATCH v2 2/5] ppc/amigaone: Implement NVRAM emulation

2025-02-27 Thread BALATON Zoltan
The board has a battery backed NVRAM where U-Boot environment is stored which is also accessed by AmigaOS and e.g. C:NVGetVar command crashes without it having at least a valid checksum. Signed-off-by: BALATON Zoltan --- hw/ppc/amigaone.c | 113 -- 1 f

[PATCH v2 4/5] ppc/amigaone: Add kernel and initrd support

2025-02-27 Thread BALATON Zoltan
Add support for -kernel, -initrd and -append command line options. Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin --- hw/ppc/amigaone.c | 113 +- 1 file changed, 112 insertions(+), 1 deletion(-) diff --git a/hw/ppc/amigaone.c b/hw/ppc/ami

[PATCH v2 3/5] ppc/amigaone: Add default environment

2025-02-27 Thread BALATON Zoltan
Initialise empty NVRAM with default values. This also enables IDE UDMA mode in AmigaOS that is faster but has to be enabled in environment due to problems with real hardware but that does not affect emulation so we can use faster defaults here. Signed-off-by: BALATON Zoltan --- hw/ppc/amigaone.c

Re: [PATCH v7 28/52] i386/tdx: Wire TDX_REPORT_FATAL_ERROR with GuestPanic facility

2025-02-27 Thread Francesco Lavra
On Fri, 2025-01-24 at 08:20 -0500, Xiaoyao Li wrote: > diff --git a/system/runstate.c b/system/runstate.c > index 272801d30769..c4244c8915c6 100644 > --- a/system/runstate.c > +++ b/system/runstate.c > @@ -565,6 +565,60 @@ static void qemu_system_wakeup(void) > } >  } >   > +static char *tdx_p

[PATCH] MAINTAINERS: Add myself as vfio-igd maintainer

2025-02-27 Thread Tomita Moeko
As suggested by Cédric, I'm glad to be a maintainer of vfio-igd. Signed-off-by: Tomita Moeko --- MAINTAINERS | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1911949526..c6ed2f46f0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2176,10 +

[PATCH v6 00/19] Change ghes to use HEST-based offsets and add support for error inject

2025-02-27 Thread Mauro Carvalho Chehab
Now that the ghes preparation patches were merged, let's add support for error injection. On this version, HEST table got added to ACPI tables testing for aarch64 virt. There are also some patch reorder to help reviewers to check the changes. The code itself is almost identical to v4, with just

[PATCH v6 05/19] acpi/ghes: prepare to change the way HEST offsets are calculated

2025-02-27 Thread Mauro Carvalho Chehab
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. Such logic is not generic, not allowing to easily add more HEST entries nor

[PATCH v6 07/19] acpi/ghes: Use HEST table offsets when preparing GHES records

2025-02-27 Thread Mauro Carvalho Chehab
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 read ack. It is preferable to calculate them from the HEST table. This allows checking the source ID, the size of the table and the type of the HEST error blo

Re: [PATCH v7 00/16] Introduce support for IGVM files

2025-02-27 Thread Roy Hopkins
On Thu, 2025-02-27 at 16:32 +0100, Stefano Garzarella wrote: > Hi Roy, > > On Thu, Feb 27, 2025 at 01:38:08PM +, Roy Hopkins wrote: > > Here is v7 of the set of patches to add support for IGVM files to > > QEMU.  This is > > based on commit 40efe733e10cc00e4fb4f9f5790a28e744e63c62 of qemu. >

  1   2   3   4   >