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: [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 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 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 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 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 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 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 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

[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: [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

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: 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

[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 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

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 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

[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] 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 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

[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

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

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

[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 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() >

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 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

[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 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

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

[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

[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

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

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 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 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:

[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 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

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] 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 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 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 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 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] 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 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

[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] 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

[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] 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 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 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

[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 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

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 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 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 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] 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 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

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/

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 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/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] 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: [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: 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] 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: [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 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

[PULL 06/10] hw/nvme: be compliant wrt. dsm processing limits

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen The specification states that, > The controller shall set all three processing limit fields (i.e., the > DMRL, DMRSL and DMSL fields) to non-zero values or shall clear all > three processing limit fields to 0h. So, set the DMRL and DMSL fields in addition to DMRSL. Reviewed-

[PULL 00/10] nvme queue

2025-02-27 Thread Klaus Jensen
/birkelund/qemu.git tags/pull-nvme-20250227 for you to fetch changes up to cad58ada8f104bf342097a7a683ef594ac949c8d: hw/nvme: remove nvme_aio_err() (2025-02-26 12:40:35 +0100)

[PULL 03/10] hw/nvme: make oacs dynamic

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen Virtualization Management needs sriov-related parameters. Only report support for the command when that conditions are true. Reviewed-by: Jesper Wendel Devantier Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 25 ++--- hw/nvme/nvme.h | 4 +

Re: [PATCH v2 6/6] qdev: Improve a few more PropertyInfo @description members

2025-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2025 at 09:56:01AM +0100, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/block/xen-block.c | 2 +- > hw/core/qdev-properties-system.c | 2 +- > hw/core/qdev-properties.c| 1 + > hw/s390x/ccw-device.c| 4 ++-- > target/sparc/c

[PULL 05/10] nvme: fix iocs status code values

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen The status codes related to I/O Command Sets are in the wrong group. Reviewed-by: Jesper Wendel Devantier Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 4 ++-- include/block/nvme.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/nvme/ctr

Re: [PATCH v3 15/28] hw/misc/aspeed_scu: Fix the revision ID cannot be set in the SOC layer for AST2700

2025-02-27 Thread Cédric Le Goater
Hello Jamin, On 2/26/25 07:38, Jamin Lin wrote: Hi Cedric, On 2/13/25 04:35, Jamin Lin wrote: According to the design of the AST2600, it has a Silicon Revision ID Register, specifically SCU004 and SCU014, to set the Revision ID for the AST2600. For the AST2600 A3, SCU004 is set to 0x050303

[PULL 08/10] hw/nvme: only set command abort requested when cancelled due to Abort

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen The Command Abort Requested status code should only be set if the command was explicitly cancelled due to an Abort command. Or, in the case the cancel was due to Submission Queue deletion, set the status code to Command Aborted due to SQ Deletion. Reviewed-by: Jesper Wendel De

[PULL 10/10] hw/nvme: remove nvme_aio_err()

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen nvme_rw_complete_cb() is the only remaining user of nvme_aio_err(), so open code the status code setting instead. Reviewed-by: Jesper Wendel Devantier Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 60 +++--- 1 file changed, 23

Re: [PATCH v3 032/162] tcg: Convert not to TCGOutOpUnary

2025-02-27 Thread Philippe Mathieu-Daudé
On 17/2/25 00:08, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target-has.h | 2 -- tcg/arm/tcg-target-has.h | 1 - tcg/i386/tcg-target-has.h| 2 -- tcg/loongarch64/tcg-target-has.h | 2 -- tcg/mips/tcg-target-has.h| 2 --

Re: [PATCH v2 1/6] qdev: Delete unused qdev_prop_enum

2025-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2025 at 09:55:56AM +0100, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > include/hw/qdev-properties.h | 1 - > hw/core/qdev-properties.c| 7 --- > 2 files changed, 8 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://b

Re: [PATCH v2 4/6] qdev: Change values of PropertyInfo member @type to be QAPI types

2025-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2025 at 09:55:59AM +0100, Markus Armbruster wrote: > PropertyInfo member @type is externally visible via QMP > device-list-properties and qom-list-properies. > > Its meaning is not documented at its definition. > > It gets passed to as @type argument to object_property_add() and

Re: [PATCH v2 5/6] qdev: Improve PropertyInfo member @description for enum properties

2025-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2025 at 09:56:00AM +0100, Markus Armbruster wrote: > Consistently use format "DESCRIPTION (VALUE/VALUE...)". > > Signed-off-by: Markus Armbruster > --- > hw/core/qdev-properties-system.c | 26 +++--- > 1 file changed, 11 insertions(+), 15 deletions(-) Reviewe

[PULL 01/10] hw/nvme: Add OCP SMART / Health Information Extended Log Page

2025-02-27 Thread Klaus Jensen
From: Stephen Bates The Open Compute Project [1] includes a Datacenter NVMe SSD Specification [2]. The most recent version of this specification (as of November 2024) is 2.6.1. This specification layers on top of the NVM Express specifications [3] to provide additional functionality. A key part o

Re: [PATCH] hw/arm/smmu-common: Remove the repeated ttb field

2025-02-27 Thread Eric Auger
Hi, On 2/21/25 4:10 AM, JianChunfu wrote: > SMMUTransCfg->ttb is never used in QEMU, TT base address > can be accessed by SMMUTransCfg->tt[i]->ttb. > > Signed-off-by: JianChunfu Reviewed-by: Eric Auger Thanks! Eric > --- > include/hw/arm/smmu-common.h | 1 - > 1 file changed, 1 deletion(-) > >

[PULL 04/10] hw/nvme: add knob for doorbell buffer config support

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen Add a 'dbcs' knob to allow Doorbell Buffer Config command to be disabled. Reviewed-by: Jesper Wendel Devantier Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 11 --- hw/nvme/nvme.h | 1 + include/block/nvme.h | 2 +- 3 files changed, 10 insertions(+)

Re: [PATCH v2 2/6] qdev: Change qdev_prop_pci_devfn member @name from "int32" to "str"

2025-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2025 at 09:55:57AM +0100, Markus Armbruster wrote: > Properties using qdev_prop_pci_devfn initially accepted a string of > the form "DEV.FN" or "DEV" where DEV and FN are in hexadecimal. > Member @name was "pci-devfn" initially. > > Commit b403298adb5 (qdev: make the non-legacy pci

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

2025-02-27 Thread Igor Mammedov
On Wed, 26 Feb 2025 17:14:06 +0100 Mauro Carvalho Chehab wrote: > Em Tue, 25 Feb 2025 10:43:27 +0100 > Igor Mammedov escreveu: > > > On Fri, 21 Feb 2025 07:02:21 +0100 > > Mauro Carvalho Chehab wrote: > > > > > Em Mon, 3 Feb 2025 15:34:23 +0100 > > > Igor Mammedov escreveu: > > > > >

Re: [PATCH v2 3/6] qdev: Rename PropertyInfo member @name to @type

2025-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2025 at 09:55:58AM +0100, Markus Armbruster wrote: > PropertyInfo member @name becomes ObjectProperty member @type, while > Property member @name becomes ObjectProperty member @name. Rename the > former. > > Signed-off-by: Markus Armbruster > --- > include/hw/qdev-properties.h

[PULL 02/10] hw/nvme: always initialize a subsystem

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen If no nvme-subsys is explicitly configured, instantiate one. Reviewed-by: Jesper Wendel Devantier Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 36 +++- hw/nvme/ns.c | 64 +- 2 files changed, 42 in

[PULL 07/10] hw/nvme: rework csi handling

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen The controller incorrectly allows a zoned namespace to be attached even if CS.CSS is configured to only support the NVM command set for I/O queues. Rework handling of namespace command sets in general by attaching supported namespaces when the controller is started instead of,

[PULL 09/10] hw/nvme: set error status code explicitly for misc commands

2025-02-27 Thread Klaus Jensen
From: Klaus Jensen The nvme_aio_err() does not handle Verify, Compare, Copy and other misc commands and defaults to setting the error status code to Internal Device Error. For some of these commands, we know better, so set it explicitly. For the commands using the nvme_misc_cb() callback (Copy,

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

2025-02-27 Thread Igor Mammedov
On Thu, 27 Feb 2025 08:26:38 +0100 Mauro Carvalho Chehab wrote: > Em Thu, 27 Feb 2025 08:19:27 +0100 > Mauro Carvalho Chehab escreveu: > > > Em Wed, 26 Feb 2025 16:52:26 +0100 > > Igor Mammedov escreveu: > > > > > On Fri, 21 Feb 2025 15:35:17 +0100 > > > Mauro Carvalho Chehab wrote: > > >

  1   2   3   4   >