Re: [PATCH 04/11] rust/qemu-api: Add wrappers to run futures in QEMU

2025-02-12 Thread Paolo Bonzini
On 2/11/25 22:43, Kevin Wolf wrote: +/// Use QEMU's event loops to run a Rust [`Future`] to completion and return its result. +/// +/// This function must be called in coroutine context. If the future isn't ready yet, it yields. +pub fn qemu_co_run_future(future: F) -> F::Output { +let wake

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Daniel P . Berrangé
On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote: > This adds a separate block driver for the bochs image format called > 'bochs-rs' so that for the moment both the C implementation and the Rust > implementation can be present in the same build. The intention is to > remove the C implemen

Re: [PATCH 28/42] qapi/parser: prohibit untagged sections between tagged sections

2025-02-12 Thread Markus Armbruster
John Snow writes: > This is being done primarily to ensure consistency between the source > documents and the final, rendered HTML output. Because > member/feature/returns sections will always appear in a visually grouped > element in the HTML output, prohibiting free paragraphs between those > s

Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 09:27, Thomas Huth wrote: On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the p

Re: [PATCH 29/42] qapi: Add "Details:" disambiguation marker

2025-02-12 Thread Markus Armbruster
John Snow writes: > This clarifies sections that are mistaken by the parser as "intro" > sections to be "details" sections instead. Impact on output? See notes inline. > > Signed-off-by: John Snow > --- > qapi/machine.json | 2 ++ > qapi/migration.json| 4 > qapi/qom.json

[PATCH] rust: add module to convert -errno to io::Error

2025-02-12 Thread Paolo Bonzini
This is an initial, minimal part of the chardev bindings. It is a common convention in QEMU to return a positive value in case of success, and a negated errno value in case of error. Unfortunately, using errno portably in Rust is a bit complicated; on Unix the errno values are supported natively

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 09:14:57AM +, Daniel P. Berrangé wrote: > On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote: > > This adds a separate block driver for the bochs image format called > > 'bochs-rs' so that for the moment both the C implementation and the Rust > > implementation c

Re: [PATCH v4 26/33] vfio/migration: Multifd device state transfer support - receive init/cleanup

2025-02-12 Thread Cédric Le Goater
On 1/30/25 11:08, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Add support for VFIOMultifd data structure that will contain most of the receive-side data together with its init/cleanup methods. Signed-off-by: Maciej S. Szmigiero --- hw/vfio/migration.c | 52 +

[PATCH 5/5] target/i386: Mark WHPX APIC region as little-endian

2025-02-12 Thread Philippe Mathieu-Daudé
This device is only used by the x86 targets, which are only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daudé

[PATCH 4/5] hw/pci-host: Mark versatile regions as little-endian

2025-02-12 Thread Philippe Mathieu-Daudé
This device is only used by the ARM targets, which are only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daudé

[PATCH 0/5] hw: More DEVICE_ [NATIVE -> LITTLE] _ENDIAN conversions

2025-02-12 Thread Philippe Mathieu-Daudé
When devices are only built for little-endian targets, DEVICE_NATIVE_ENDIAN expand to DEVICE_LITTLE_ENDIAN. Replace by the latter to simplify. Philippe Mathieu-Daudé (5): hw/arm: Mark Allwinner Technology devices as little-endian hw/mips: Mark Boston machine devices as little-endian hw/mips:

[PATCH 3/5] hw/mips: Mark Loonson3 Virt machine devices as little-endian

2025-02-12 Thread Philippe Mathieu-Daudé
The Loonson3 Virt machine is only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/loongson3_vir

[PATCH 2/5] hw/mips: Mark Boston machine devices as little-endian

2025-02-12 Thread Philippe Mathieu-Daudé
The Boston machine is only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/boston.c | 6 +++---

Re: [PATCH v6 11/11] tests/functional: Have microblaze tests inherit common parent class

2025-02-12 Thread Thomas Huth
On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Have the MicroblazeMachine class being common to both MicroblazeBigEndianMachine and MicroblazeLittleEndianMachine classes. Move the xmaton and ballerina tests to the parent class. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth

[PATCH 1/5] hw/arm: Mark Allwinner Technology devices as little-endian

2025-02-12 Thread Philippe Mathieu-Daudé
These devices are only used by the ARM targets, which are only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daud

Re: [PATCH v6 01/11] hw/qdev-properties-system: Introduce EndianMode QAPI enum

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 12:37, Thomas Huth wrote: On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros. Endianness can be BIG, LITTLE or unspecified (default). Signed-off-by: Philippe Mathieu-Daudé ---   qapi/common.json    | 1

Re: [PATCH v6 02/11] hw/intc/xilinx_intc: Make device endianness configurable

2025-02-12 Thread Thomas Huth
On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine usin

Re: [PATCH v6 07/11] tests/functional: Avoid using www.qemu-advent-calendar.org URL

2025-02-12 Thread Thomas Huth
On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Avoid fetching assets from www.qemu-advent-calendar.org website, prefer fetching microblaze assets from GitLab servers. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- tests/functional/test_microblazeel_s3adsp1800.py | 3

Re: [PATCH v6 01/11] hw/qdev-properties-system: Introduce EndianMode QAPI enum

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 12:43, Philippe Mathieu-Daudé wrote: On 12/2/25 12:37, Thomas Huth wrote: On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros. Endianness can be BIG, LITTLE or unspecified (default). Signed-off-by: Philippe Mathieu-Dau

Re: [PATCH v6 11/11] tests/functional: Have microblaze tests inherit common parent class

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 12:46, Thomas Huth wrote: On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Have the MicroblazeMachine class being common to both MicroblazeBigEndianMachine and MicroblazeLittleEndianMachine classes. Move the xmaton and ballerina tests to the parent class. Signed-off-by: Philippe Ma

Re: [PATCH v6 01/11] hw/qdev-properties-system: Introduce EndianMode QAPI enum

2025-02-12 Thread Thomas Huth
On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros. Endianness can be BIG, LITTLE or unspecified (default). Signed-off-by: Philippe Mathieu-Daudé --- qapi/common.json| 16 include/hw/qdev-p

Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 11:24, Thomas Huth wrote: On 12/02/2025 10.19, Philippe Mathieu-Daudé wrote: On 12/2/25 09:27, Thomas Huth wrote: On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "littl

Re: [PATCH v6 07/11] tests/functional: Avoid using www.qemu-advent-calendar.org URL

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 12:49, Thomas Huth wrote: On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Avoid fetching assets from www.qemu-advent-calendar.org website, prefer fetching microblaze assets from GitLab servers. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé ---   tests/functiona

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 10:10, Daniel P. Berrangé wrote: On Tue, Feb 11, 2025 at 07:53:32PM +0100, Philippe Mathieu-Daudé wrote: On 11/2/25 19:48, Philippe Mathieu-Daudé wrote: On 11/2/25 19:26, Stefan Hajnoczi wrote: On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé wrote: The following changes si

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-12 Thread Gerd Hoffmann
On Wed, Feb 12, 2025 at 12:30:20PM +0100, Alexander Graf wrote: > > On 12.02.25 11:24, Gerd Hoffmann wrote: > > > > Why do you use confidential computing in the first place if you trust > > the host with your EFI variables? I'd rather see something simliar > > running under guest control, in svs

Re: [PATCH v6 01/11] hw/qdev-properties-system: Introduce EndianMode QAPI enum

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 01:02:18PM +0100, Philippe Mathieu-Daudé wrote: > On 12/2/25 12:43, Philippe Mathieu-Daudé wrote: > > On 12/2/25 12:37, Thomas Huth wrote: > > > On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: > > > > Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros. > >

[PATCH v7] target/riscv: Add support to access ctrsource, ctrtarget, ctrdata regs.

2025-02-12 Thread Rajnesh Kanwal
CTR entries are accessed using ctrsource, ctrtarget and ctrdata registers using smcsrind/sscsrind extension. This commits extends the csrind extension to support CTR registers. ctrsource is accessible through xireg CSR, ctrtarget is accessible through xireg1 and ctrdata is accessible through xireg

Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-12 Thread Thomas Huth
On 12/02/2025 10.19, Philippe Mathieu-Daudé wrote: On 12/2/25 09:27, Thomas Huth wrote: On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the devic

Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 10:19, Philippe Mathieu-Daudé wrote: On 12/2/25 09:27, Thomas Huth wrote: On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device e

[PATCH] block/rbd: Do not use BDS's AioContext

2025-02-12 Thread Hanna Czenczek
RBD schedules the request completion code (qemu_rbd_finish_bh()) to run in the BDS's AioContext. The intent seems to be to run it in the same context that the original request coroutine ran in, i.e. the thread on whose stack the RBDTask object exists (see qemu_rbd_start_co()). However, with multi

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-12 Thread Daniel P . Berrangé
On Tue, Feb 11, 2025 at 07:53:32PM +0100, Philippe Mathieu-Daudé wrote: > On 11/2/25 19:48, Philippe Mathieu-Daudé wrote: > > On 11/2/25 19:26, Stefan Hajnoczi wrote: > > > On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé > > > wrote: > > > > > > > > The following changes since commit > > >

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-12 Thread Gerd Hoffmann
Hi, > > +/* read header */ > > +dma_memory_read(&address_space_memory, dma, > > +uv->buffer, sizeof(*mhdr), > > +MEMTXATTRS_UNSPECIFIED); > > Depending on DMA sounds appealing at first, but can fall apart in corner > cases. I know of 2 cases where

[PATCH v7 03/10] hw/net/xilinx_ethlite: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Signed-off-by: Philippe Mathieu-D

[PATCH v7 07/10] tests/functional: Explicit endianness of microblaze assets

2025-02-12 Thread Philippe Mathieu-Daudé
The archive used in test_microblaze_s3adsp1800.py (testing a big-endian target) contains a big-endian kernel. Rename using the _BE suffix. Similarly, the archive in test_microblazeel_s3adsp1800 (testing a little-endian target) contains a little-endian kernel. Rename using _LE suffix. These change

[PATCH v7 09/10] tests/functional: Remove sleep() kludges from microblaze tests

2025-02-12 Thread Philippe Mathieu-Daudé
Commit f0ec14c78c4 ("tests/avocado: Fix console data loss") fixed QEMUMachine's problem with console, we don't need to use the sleep() kludges. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20250206131052.30

[PATCH v7 02/10] hw/intc/xilinx_intc: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v7 10/10] tests/functional: Have microblaze tests inherit common parent class

2025-02-12 Thread Philippe Mathieu-Daudé
Have the MicroblazeMachine class being common to both MicroblazeBigEndianMachine and MicroblazeLittleEndianMachine classes. Move the xmaton and ballerina tests to the parent class. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250206131052.30207-16-phi...@linaro.o

[PATCH v7 01/10] hw/qdev-properties-system: Introduce EndianMode QAPI enum

2025-02-12 Thread Philippe Mathieu-Daudé
Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros. Endianness can be BIG, LITTLE or unspecified (default). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- qapi/common.json| 16 include/hw/qdev-properties-system.h | 7 +

[PATCH v7 00/10] hw/microblaze: Allow running cross-endian vCPUs

2025-02-12 Thread Philippe Mathieu-Daudé
Since v6: - Simplify MemoryRegionOps indexing (Thomas) Since v5: - Introduce QAPI EndianMode - Update RISCV machine while rebasing - Fixed INTC use on PPC (Thomas) - Dropped patch adding more machines (Daniel) Since v4 & v3: - Addressed Thomas review comments Since v2: - Addressed Richard's revi

[PATCH v7 04/10] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v7 06/10] hw/ssi/xilinx_spi: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Signed-off-by: Philippe Mathieu-D

[PATCH v7 08/10] tests/functional: Allow microblaze tests to take a machine name argument

2025-02-12 Thread Philippe Mathieu-Daudé
Make microblaze tests a bit more generic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250206131052.30207-14-phi...@linaro.org> --- tests/functional/test_microblaze_s3adsp1800.py | 7 +-- tests/functional/test_microblazeel_s3adsp1800.py | 7 +-- 2 file

Re: [PATCH v7 02/10] hw/intc/xilinx_intc: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 13:36, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Grr, please read: Add the "endianness" proper

Re: [PATCH 04/11] rust/qemu-api: Add wrappers to run futures in QEMU

2025-02-12 Thread Kevin Wolf
Am 12.02.2025 um 10:28 hat Paolo Bonzini geschrieben: > On 2/11/25 22:43, Kevin Wolf wrote: > > +/// Use QEMU's event loops to run a Rust [`Future`] to completion and > > return its result. > > +/// > > +/// This function must be called in coroutine context. If the future isn't > > ready yet, it

[PATCH v7 05/10] hw/char/xilinx_uartlite: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine using the device. Signed-off-by: Philippe Mathieu-D

Re: [PATCH v7 02/10] hw/intc/xilinx_intc: Make device endianness configurable

2025-02-12 Thread Thomas Huth
On 12/02/2025 13.36, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine usin

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Kevin Wolf
Am 12.02.2025 um 10:41 hat Daniel P. Berrangé geschrieben: > On Wed, Feb 12, 2025 at 09:14:57AM +, Daniel P. Berrangé wrote: > > On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote: > > > This adds a separate block driver for the bochs image format called > > > 'bochs-rs' so that for the

Re: [PATCH 2/3] hw/cxl/cxl-mailbox-utils.c: Added support for Clear Log (Opcode 0403h)

2025-02-12 Thread Arpit Kumar
On 04/02/25 10:53AM, Jonathan Cameron wrote: On Mon, 3 Feb 2025 11:29:49 +0530 Arpit Kumar wrote: Add some description of what is being added here. Key issue in here is that clearing the CEL doesn't make sense. It is a description of what the device supports, there is no state to clear in it.

Re: [PATCH v6 01/11] hw/qdev-properties-system: Introduce EndianMode QAPI enum

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 13:56, BALATON Zoltan wrote: On Wed, 12 Feb 2025, Philippe Mathieu-Daudé wrote: On 12/2/25 12:37, Thomas Huth wrote: On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros. Endianness can be BIG, LITTLE or unspecified (de

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-12 Thread Alexander Graf
On 12.02.25 13:28, Gerd Hoffmann wrote: On Wed, Feb 12, 2025 at 12:30:20PM +0100, Alexander Graf wrote: On 12.02.25 11:24, Gerd Hoffmann wrote: Why do you use confidential computing in the first place if you trust the host with your EFI variables? I'd rather see something simliar running und

Re: [PATCH v6 02/11] hw/intc/xilinx_intc: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 12:42, Thomas Huth wrote: On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the p

Re: [PATCH 1/3] hw/cxl/cxl-mailbox-utils.c: Added support for Get Log Capabilities (Opcode 0402h)

2025-02-12 Thread Arpit Kumar
On 04/02/25 10:28AM, Jonathan Cameron wrote: On Mon, 3 Feb 2025 11:29:48 +0530 Arpit Kumar wrote: Please add some descriptive teext here. Sure, will append here in V2 patch. Signed-off-by: Arpit Kumar Reviewed-by: Alok Rathore Reviewed-by: Krishna Kanth Reddy Hi Arpit, Whilst it is g

Re: [PATCH 3/3] hw/cxl/cxl-mailbox-utils.c: Added support for Populate Log (Opcode 0404h) as background operation

2025-02-12 Thread Arpit Kumar
On 04/02/25 10:58AM, Jonathan Cameron wrote: On Mon, 3 Feb 2025 11:29:50 +0530 Arpit Kumar wrote: Signed-off-by: Arpit Kumar Reviewed-by: Alok Rathore Reviewed-by: Krishna Kanth Reddy Likewise, the CEL isn't a dynamic thing. Asking to populate it makes little sense so the log capability

Re: [PATCH v7 04/10] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-12 Thread Thomas Huth
On 12/02/2025 13.36, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine usin

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 01:58:15PM +0100, Kevin Wolf wrote: > Am 12.02.2025 um 10:41 hat Daniel P. Berrangé geschrieben: > > On Wed, Feb 12, 2025 at 09:14:57AM +, Daniel P. Berrangé wrote: > > > On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote: > > > > This adds a separate block drive

Re: [PATCH v7 06/10] hw/ssi/xilinx_spi: Make device endianness configurable

2025-02-12 Thread Thomas Huth
On 12/02/2025 13.36, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine

Re: [PATCH v7 05/10] hw/char/xilinx_uartlite: Make device endianness configurable

2025-02-12 Thread Thomas Huth
On 12/02/2025 13.36, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine

Re: [PATCH] block/rbd: Do not use BDS's AioContext

2025-02-12 Thread Kevin Wolf
Am 12.02.2025 um 10:32 hat Hanna Czenczek geschrieben: > RBD schedules the request completion code (qemu_rbd_finish_bh()) to run > in the BDS's AioContext. The intent seems to be to run it in the same > context that the original request coroutine ran in, i.e. the thread on > whose stack the RBDTas

Re: [PATCH v5 3/5] migration: enable multifd and postcopy together

2025-02-12 Thread Prasad Pandit
Hi, On Tue, 11 Feb 2025 at 20:50, Peter Xu wrote: > > * Yes. AFAIU, tls/file channels don't send magic values. > Please double check whether TLS will send magics. AFAICT, they should. === * ... Also tls live migration already does * tls handshake while initializing main channel so with tls t

Re: [PULL 0/7] Functional tests and Gitlab-CI patches

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

Re: [PATCH v6 01/11] hw/qdev-properties-system: Introduce EndianMode QAPI enum

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 14:53, Philippe Mathieu-Daudé wrote: On 12/2/25 13:56, BALATON Zoltan wrote: On Wed, 12 Feb 2025, Philippe Mathieu-Daudé wrote: On 12/2/25 12:37, Thomas Huth wrote: On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros.

Re: [PULL 02/14] os: add an ability to lock memory on_fault

2025-02-12 Thread Stefan Hajnoczi
On Tue, Feb 11, 2025 at 5:52 PM Peter Xu wrote: > > From: Daniil Tatianin > > This will be used in the following commits to make it possible to only > lock memory on fault instead of right away. Hi Peter and Daniil, Please take a look at this CI failure: https://gitlab.com/qemu-project/qemu/-/jo

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Philippe Mathieu-Daudé
Hi Daniil, On 12/2/25 15:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --- include/system/os-posix.h | 2 +- include/system/os-win32.h | 3 ++- meson.build

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Vladimir Sementsov-Ogievskiy
On 12.02.25 17:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-12 Thread Konstantin Shkolnyy
On 2/12/2025 07:38, Eugenio Perez Martin wrote: On Tue, Feb 11, 2025 at 5:20 PM Konstantin Shkolnyy wrote: Add .set_vnet_le() function that always returns success, assuming that vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and outputs the message: "backend does not

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 5:48 PM, Philippe Mathieu-Daudé wrote: Hi Daniil, On 12/2/25 15:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin ---   include/system/os-posix.h |  2 +-   in

Re: [PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-12 Thread Philippe Mathieu-Daudé
On 11/2/25 17:19, Konstantin Shkolnyy wrote: Add .set_vnet_le() function that always returns success, assuming that vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and outputs the message: "backend does not support LE vnet headers; falling back on userspace virtio" Signe

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 15:51, Daniil Tatianin wrote: On 2/12/25 5:48 PM, Philippe Mathieu-Daudé wrote: Hi Daniil, On 12/2/25 15:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --

Re: [PATCH 3/8] hw/arm/realview: Explicit number of GIC external IRQs

2025-02-12 Thread Philippe Mathieu-Daudé
On 30/1/25 19:36, Peter Maydell wrote: On Thu, 30 Jan 2025 at 18:25, Philippe Mathieu-Daudé wrote: When not specified, Cortex-A9MP configures its GIC with 64 external IRQs (see commit a32134aad89 "arm:make the number of GIC interrupts configurable"). Add the GIC_EXT_IRQS definition (with a com

Re: [PATCH 03/11] rust: Add some block layer bindings

2025-02-12 Thread Kevin Wolf
Am 12.02.2025 um 10:29 hat Paolo Bonzini geschrieben: > On 2/11/25 22:43, Kevin Wolf wrote: > > Signed-off-by: Kevin Wolf > > --- > > rust/wrapper.h| 4 > > meson.build | 1 + > > rust/qemu-api/src/zeroable.rs | 5 +++-- > > 3 files changed, 8 insertions

Re: [PATCH v6 01/11] hw/qdev-properties-system: Introduce EndianMode QAPI enum

2025-02-12 Thread BALATON Zoltan
On Wed, 12 Feb 2025, Philippe Mathieu-Daudé wrote: On 12/2/25 12:37, Thomas Huth wrote: On 12/02/2025 12.24, Philippe Mathieu-Daudé wrote: Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros. Endianness can be BIG, LITTLE or unspecified (default). Signed-off-by: Philippe Mathieu-

Re: [PATCH 04/11] rust/qemu-api: Add wrappers to run futures in QEMU

2025-02-12 Thread Paolo Bonzini
On Wed, Feb 12, 2025 at 1:47 PM Kevin Wolf wrote: > > > +pub fn qemu_co_run_future(future: F) -> F::Output { > > > +let waker = Arc::new(RunFutureWaker { > > > +co: unsafe { bindings::qemu_coroutine_self() }, > > > +}) > > > +.into(); > > > > into what? :) Maybe you can add th

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Kevin Wolf
Am 12.02.2025 um 08:45 hat Philippe Mathieu-Daudé geschrieben: > On 11/2/25 22:43, Kevin Wolf wrote: > > This adds a separate block driver for the bochs image format called > > 'bochs-rs' so that for the moment both the C implementation and the Rust > > implementation can be present in the same bui

Re: [PATCH v7 03/10] hw/net/xilinx_ethlite: Make device endianness configurable

2025-02-12 Thread Thomas Huth
On 12/02/2025 13.36, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness on the single machine

Re: [PATCH v4 27/33] vfio/migration: Multifd device state transfer support - received buffers queuing

2025-02-12 Thread Cédric Le Goater
On 1/30/25 11:08, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" The multifd received data needs to be reassembled since device state packets sent via different multifd channels can arrive out-of-order. Therefore, each VFIO device state packet carries a header indicating its position i

Re: [PATCH 03/11] rust: Add some block layer bindings

2025-02-12 Thread Paolo Bonzini
On Wed, Feb 12, 2025 at 2:13 PM Kevin Wolf wrote: > Yes, we definitely need some proper bindings there. I'm already tired of > writing things like this: > > return -(bindings::EINVAL as std::os::raw::c_int) > > Or even: > > return e > .raw_os_error() > .unwrap_or(-(bindings

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 13:59, Kevin Wolf wrote: Am 12.02.2025 um 08:45 hat Philippe Mathieu-Daudé geschrieben: On 11/2/25 22:43, Kevin Wolf wrote: This adds a separate block driver for the bochs image format called 'bochs-rs' so that for the moment both the C implementation and the Rust implementation can

Re: [PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-12 Thread Eugenio Perez Martin
On Tue, Feb 11, 2025 at 5:20 PM Konstantin Shkolnyy wrote: > > Add .set_vnet_le() function that always returns success, assuming that > vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and > outputs the message: > "backend does not support LE vnet headers; falling back on u

Re: [PULL 02/14] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 5:13 PM, Stefan Hajnoczi wrote: On Tue, Feb 11, 2025 at 5:52 PM Peter Xu wrote: From: Daniil Tatianin This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Hi Peter and Daniil, Please take a look at this CI failure: ht

Re: [PATCH] block/rbd: Do not use BDS's AioContext

2025-02-12 Thread Hanna Czenczek
On 12.02.25 14:26, Kevin Wolf wrote: Am 12.02.2025 um 10:32 hat Hanna Czenczek geschrieben: RBD schedules the request completion code (qemu_rbd_finish_bh()) to run in the BDS's AioContext. The intent seems to be to run it in the same context that the original request coroutine ran in, i.e. the

[PATCH] qapi: merge common parts of NbdServerOptions and nbd-server-start data

2025-02-12 Thread Vladimir Sementsov-Ogievskiy
Instead of comment "Keep this type consistent with the nbd-server-start arguments", we can simply merge these things. Signed-off-by: Vladimir Sementsov-Ogievskiy --- No problem for me to rebase on top of [PATCH 0/2] nbd: Allow debugging tuning of handshake limit if it goes earlier. Also, not th

Re: [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP

2025-02-12 Thread Vladimir Sementsov-Ogievskiy
On 11.02.25 00:46, Eric Blake wrote: On Thu, Feb 06, 2025 at 10:20:09AM +0300, Vladimir Sementsov-Ogievskiy wrote: --- qapi/block-export.json | 10 ++ include/block/nbd.h| 6 +++--- [..] @@ -52,6 +57,10 @@ # # @addr: Address on which to listen. # +#

Re: [PATCH v5 3/5] migration: enable multifd and postcopy together

2025-02-12 Thread Peter Xu
On Wed, Feb 12, 2025 at 06:57:48PM +0530, Prasad Pandit wrote: > Hi, > > On Tue, 11 Feb 2025 at 20:50, Peter Xu wrote: > > > * Yes. AFAIU, tls/file channels don't send magic values. > > Please double check whether TLS will send magics. AFAICT, they should. > === > * ... Also tls live migration

[PATCH v5 0/4] overcommit: introduce mem-lock-onfault

2025-02-12 Thread Daniil Tatianin
Currently, passing mem-lock=on to QEMU causes memory usage to grow by huge amounts: no memlock: $ ./qemu-system-x86_64 -overcommit mem-lock=off $ ps -p $(pidof ./qemu-system-x86_64) -o rss= 45652 $ ./qemu-system-x86_64 -overcommit mem-lock=off -enable-kvm $ ps -p $(pidof ./qem

[PATCH v5 2/4] system/vl: extract overcommit option parsing into a helper

2025-02-12 Thread Daniil Tatianin
This will be extended in the future commits, let's move it out of line right away so that it's easier to read. Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Peter Xu Signed-off-by: Daniil Tatianin --- system/vl.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletion

[PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --- include/system/os-posix.h | 2 +- include/system/os-win32.h | 3 ++- meson.build | 6 ++ migration/postcopy-ram.c | 2 +- o

[PATCH v5 3/4] system: introduce a new MlockState enum

2025-02-12 Thread Daniil Tatianin
Replace the boolean value enable_mlock with an enum and add a helper to decide whether we should be calling os_mlock. This is a stepping stone towards introducing a new mlock mode, which will be the third possible state of this enum. Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Peter X

[PATCH v5 4/4] overcommit: introduce mem-lock=on-fault

2025-02-12 Thread Daniil Tatianin
Locking the memory without MCL_ONFAULT instantly prefaults any mmaped anonymous memory with a write-fault, which introduces a lot of extra overhead in terms of memory usage when all you want to do is to prevent kcompactd from migrating and compacting QEMU pages. Add an option to only lock pages laz

[PULL 0/1] Tracing patches

2025-02-12 Thread Stefan Hajnoczi
The following changes since commit f9edf32ea2e18a56de5d92f57e9d10565c822367: Merge tag 'pull-request-2025-02-11' of https://gitlab.com/thuth/qemu into staging (2025-02-11 13:27:32 -0500) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-12 Thread Gerd Hoffmann
Hi, > > Yes. Knowing both physical and virtual address works only for memory > > you allocated yourself before ExitBootServices. So you can't pass on > > pointers from the OS, you have to copy the data to a buffer where you > > know the physical address instead. Yes, some overhead. Should st

[PULL 1/1] scripts: improve error from qemu-trace-stap on missing 'stap'

2025-02-12 Thread Stefan Hajnoczi
From: Daniel P. Berrangé If the 'stap' binary is missing in $PATH, a huge trace is thrown $ qemu-trace-stap list /usr/bin/qemu-system-x86_64 Traceback (most recent call last): File "/usr/bin/qemu-trace-stap", line 169, in main() File "/usr/bin/qemu-trace-stap", line 165, in main arg

Re: [PATCH v3 5/7] memory: pass MemTxAttrs to memory_access_is_direct()

2025-02-12 Thread Peter Xu
On Mon, Feb 10, 2025 at 09:46:46AM +0100, David Hildenbrand wrote: > We want to pass another flag that will be stored in MemTxAttrs. So pass > MemTxAttrs directly. > > Reviewed-by: Peter Xu > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: David Hildenbrand > --- > hw/core/loader.c

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 6:23 PM, Peter Xu wrote: On Wed, Feb 12, 2025 at 05:39:17PM +0300, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin --- include/system/os-posix.h | 2 +- incl

Re: [PULL 04/32] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
On 12/2/25 10:34, Philippe Mathieu-Daudé wrote: On 12/2/25 10:19, Philippe Mathieu-Daudé wrote: On 12/2/25 09:27, Thomas Huth wrote: On 10/02/2025 21.41, Philippe Mathieu-Daudé wrote: Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add th

Re: [PATCH 03/11] rust: Add some block layer bindings

2025-02-12 Thread Paolo Bonzini
On 2/11/25 22:43, Kevin Wolf wrote: Signed-off-by: Kevin Wolf --- rust/wrapper.h| 4 meson.build | 1 + rust/qemu-api/src/zeroable.rs | 5 +++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rust/wrapper.h b/rust/wrapper.h index 41be87

Re: [PATCH] cryptodev/vhost: allocate CryptoDevBackendVhost using g_mem0()

2025-02-12 Thread zhenwei pi
Acked-by: zhenwei pi On 2/11/25 21:55, Stefano Garzarella wrote: The function `vhost_dev_init()` expects the `struct vhost_dev` (passed as a parameter) to be fully initialized. This is important because some parts of the code check whether `vhost_dev->config_ops` is NULL to determine if it has

Re: [PATCH] scripts: improve error from qemu-trace-stap on missing 'stap'

2025-02-12 Thread Daniel P . Berrangé
Hi Stefan, Are you ok with queuing this patch ? On Fri, Dec 06, 2024 at 11:45:24AM +, Daniel P. Berrangé wrote: > If the 'stap' binary is missing in $PATH, a huge trace is thrown > > $ qemu-trace-stap list /usr/bin/qemu-system-x86_64 > Traceback (most recent call last): > File "/usr/bi

Re: [PATCH 01/11] rust: Build separate qemu_api_tools and qemu_api_system

2025-02-12 Thread Paolo Bonzini
On 2/11/25 22:43, Kevin Wolf wrote: The existing qemu_api library can't be linked into tools because it contains a few bindings for things that only exist in the system emulator. This adds a new "system" feature to the qemu_api crate that enables the system emulator parts in it, and build the cr

[PATCH v6 04/11] hw/timer/xilinx_timer: Make device endianness configurable

2025-02-12 Thread Philippe Mathieu-Daudé
Replace the DEVICE_NATIVE_ENDIAN MemoryRegionOps by a pair of DEVICE_LITTLE_ENDIAN / DEVICE_BIG_ENDIAN. Add the "little-endian" property to select the device endianness, defaulting to little endian. Set the proper endianness for each machine using the device. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v6 00/11] hw/microblaze: Allow running cross-endian vCPUs

2025-02-12 Thread Philippe Mathieu-Daudé
Since v5: - Introduce QAPI EndianMode - Update RISCV machine while rebasing - Fixed INTC use on PPC (Thomas) - Dropped patch adding more machines (Daniel) Since v4 & v3: - Addressed Thomas review comments Since v2: - Addressed Richard's review comments Since v1: - Make device endianness configur

  1   2   3   >