Re: [PATCH preview 0/3] reviving minimal QAPI generation from 2021

2025-06-12 Thread Zhao Liu
On Thu, Jun 12, 2025 at 12:24:44PM +0200, Paolo Bonzini wrote: > Date: Thu, 12 Jun 2025 12:24:44 +0200 > From: Paolo Bonzini > Subject: Re: [PATCH preview 0/3] reviving minimal QAPI generation from 2021 > > On Wed, Jun 11, 2025 at 10:57 AM Paolo Bonzini wrote: > > Yes. If using serde the impleme

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

2025-06-12 Thread Akihiko Odaki
On 2025/06/06 4:35, John Snow wrote: Hi, I've long been a little confused about the specifics of our build platform guarantee and how it applies to documentation and testing. My *current* understanding is that our build platform guarantee applies to both unit tests and building documentation,

Re: [PATCH v15 0/4] arm/virt: CXL support via pxb_cxl

2025-06-12 Thread Itaru Kitayama
On Thu, Jun 12, 2025 at 02:43:34PM +0100, Jonathan Cameron wrote: > v15: > - Split the address map calculations and mmio setup into separate > functions in patch 2, allowing v14 patch 3 to be dropped as not > x86 and arm make the same calls. Note I felt this was a sufficient > change

Re: [PATCH v2 02/25] hw/arm/virt: Introduce machine state acpi pcihp flags and props

2025-06-12 Thread Eric Auger
Hi Gustavo, On 6/13/25 5:01 AM, Gustavo Romero wrote: > Hi Eric, > > On 6/12/25 09:55, Igor Mammedov wrote: >> On Wed, 11 Jun 2025 10:50:04 +0200 >> Eric Auger wrote: >> >>> Hi Igor, >>> On 6/11/25 10:45 AM, Igor Mammedov wrote: On Wed, 11 Jun 2025 08:53:28 +0200 Eric Auger wrote:

Re: [PATCH V1 2/2] hw/loongarch: add rtc acpi table

2025-06-12 Thread Bibo Mao
On 2025/6/13 上午9:31, Xianglai Li wrote: Add the acpi table to the loongson rtc hardware so that the virtual machine kernel can use the loongson RTC-related drivers. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Song Gao Cc: Jiaxun Yang Cc: Xianglai Li hw/loongarch/virt-acpi-build.c

Re: [PATCH V1 1/2] hw/rtc: Fixed loongson rtc emulation errors

2025-06-12 Thread Bibo Mao
On 2025/6/13 上午9:31, Xianglai Li wrote: The expire time is sent to the timer only when the expire Time is greater than 0 or greater than now. Otherwise, the timer will trigger interruption continuously. Timer interrupts are sent using pulse functions. Signed-off-by: Xianglai Li --- Cc: Bibo

[PATCH] hw/acpi: Fix GPtrArray memory leak in crs_range_merge

2025-06-12 Thread Li Zhijian via
This leak was detected by the valgrind. The crs_range_merge() function unconditionally allocated a GPtrArray 'even when range->len was zero, causing an early return without freeing the allocated array. This resulted in a memory leak when an empty range was processed. Fix this by moving the GPtrAr

Re: [PATCH v2 02/25] hw/arm/virt: Introduce machine state acpi pcihp flags and props

2025-06-12 Thread Gustavo Romero
Hi Eric, On 6/12/25 09:55, Igor Mammedov wrote: On Wed, 11 Jun 2025 10:50:04 +0200 Eric Auger wrote: Hi Igor, On 6/11/25 10:45 AM, Igor Mammedov wrote: On Wed, 11 Jun 2025 08:53:28 +0200 Eric Auger wrote: Hi Gustavo, Alex, On 5/28/25 12:33 PM, Igor Mammedov wrote: On Tue, 27 May 2025

RE: [PATCH v2] hw/misc/aspeed_scu: Handle AST2600 protection key registers correctly

2025-06-12 Thread Jamin Lin
> registers correctly > > Hi Tan, > > > Subject: [PATCH v2] hw/misc/aspeed_scu: Handle AST2600 protection key > > registers correctly > > > > The AST2600 SCU has two protection key registers (0x00 and 0x10) that > > both need to be unlocked. Each must be unlocked individually, but > > locking one

Re: [PATCH V1 1/2] hw/rtc: Fixed loongson rtc emulation errors

2025-06-12 Thread Bibo Mao
On 2025/6/13 上午9:31, Xianglai Li wrote: The expire time is sent to the timer only when the expire Time is greater than 0 or greater than now. Otherwise, the timer will trigger interruption continuously. Again, one line of the comments should no more than 75 bytes :) I think it should be spli

RE: [PATCH v2] hw/misc/aspeed_scu: Handle AST2600 protection key registers correctly

2025-06-12 Thread Jamin Lin
Hi Tan, > Subject: [PATCH v2] hw/misc/aspeed_scu: Handle AST2600 protection key > registers correctly > > The AST2600 SCU has two protection key registers (0x00 and 0x10) that both > need to be unlocked. Each must be unlocked individually, but locking one will > lock both. > > This commit update

Re: [PATCH v13 2/7] hw/core/machine: topology functions capabilities added

2025-06-12 Thread Zhao Liu
On Wed, Jun 11, 2025 at 04:56:13PM +0100, Alireza Sanaee wrote: > Date: Wed, 11 Jun 2025 16:56:13 +0100 > From: Alireza Sanaee > Subject: [PATCH v13 2/7] hw/core/machine: topology functions capabilities > added > X-Mailer: git-send-email 2.34.1 > > Add two functions one of which finds the lowest

Re: [PATCH V1 2/2] hw/loongarch: add rtc acpi table

2025-06-12 Thread Bibo Mao
Xianglai, On 2025/6/13 上午9:31, Xianglai Li wrote: Add the acpi table to the loongson rtc hardware so that the virtual machine kernel can use the loongson RTC-related drivers. One line of the comments is no more than 75 bytes, it seems that it is far less than 75 bytes. Signed-off-by: Xian

Re: [PATCH v15 2/4] hw/cxl: Make the CXL fixed memory windows devices.

2025-06-12 Thread Zhijian Li (Fujitsu)
On 12/06/2025 21:43, Jonathan Cameron wrote: > Previously these somewhat device like structures were tracked using a list > in the CXLState in each machine. This is proving restrictive in a few > cases where we need to iterate through these without being aware of the > machine type. Just make the

Re: [PATCH v15 1/4] hw/cxl-host: Add an index field to CXLFixedMemoryWindow

2025-06-12 Thread Zhijian Li (Fujitsu)
On 12/06/2025 21:43, Jonathan Cameron wrote: > To enable these to be found in a fixed order, that order needs to be known. > This will later be used to sort a list of these structures so that address > map and ACPI table entries are predictable. > > Reviewed-by: Li Zhijian > Reviewed-by: Fan Ni

[PATCH V1 2/2] hw/loongarch: add rtc acpi table

2025-06-12 Thread Xianglai Li
Add the acpi table to the loongson rtc hardware so that the virtual machine kernel can use the loongson RTC-related drivers. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Song Gao Cc: Jiaxun Yang Cc: Xianglai Li hw/loongarch/virt-acpi-build.c | 24 1 file changed,

[PATCH V1 0/2] Fix the rtc issue on loongarch

2025-06-12 Thread Xianglai Li
The first patch fixed the issue with rtc hardware emulation on the loongarch platform. The second patch adds an acpi table to the rtc hardware simulation of the loongarch platform, enabling the virtual machine kernel to use the loongson rtc driver through the acpi table. Cc: Bibo Mao Cc: Song Ga

[PATCH V1 1/2] hw/rtc: Fixed loongson rtc emulation errors

2025-06-12 Thread Xianglai Li
The expire time is sent to the timer only when the expire Time is greater than 0 or greater than now. Otherwise, the timer will trigger interruption continuously. Timer interrupts are sent using pulse functions. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: Song Gao Cc: Jiaxun Yang Cc: Xian

[PATCH 15/19] hw/i3c/dw-i3c: Add controller resets

2025-06-12 Thread Joe Komlodi
Adds behavior to the device reset register. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture Reviewed-by: Stephen Longfield --- hw/i3c/dw-i3c.c | 117 hw/i3c/trace-events | 1 + 2 files changed, 118 insertions(+) diff --git a/hw/i3c/d

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

2025-06-12 Thread Joe Komlodi
Moves the Aspeed I3C model and traces into hw/i3c and creates I3C build files. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture Reviewed-by: Titus Rwantare --- hw/Kconfig| 1 + hw/arm/Kconfig| 1 + hw/i3c/Kconfig

[PATCH 17/19] hw/i3c: Add Mock target

2025-06-12 Thread Joe Komlodi
Adds a simple i3c device to be used for testing in lieu of a real device. The mock target supports the following features: - A buffer that users can read and write to. - CCC support for commonly used CCCs when probing devices on an I3C bus. - IBI sending upon receiving a user-defined byte. Signed

[PATCH 10/19] hw/i3c/dw-i3c: Use 32 bits on MMIO writes

2025-06-12 Thread Joe Komlodi
The registers are only 32 bits wide, so we should cast the 64-bit value passed in to only be 32 bits wide. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture Reviewed-by: Titus Rwantare --- hw/i3c/dw-i3c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/i3c/dw

[PATCH 12/19] hw/i3c/dw-i3c: Add data TX and RX

2025-06-12 Thread Joe Komlodi
This adds data and CCC transmission, reception, and the associated queues required for data transmission and reception to happen. The I3C controller transmits data by the user writing into a command queue. When the queue has a command and an argument in it, the controller starts executing the comm

[PATCH 18/19] hw/arm/aspeed: Build with I3C_DEVICES

2025-06-12 Thread Joe Komlodi
Allows us to attach the mock I3C target Signed-off-by: Joe Komlodi --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 53d62cd08d..940418b46b 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -532,6 +532,7 @@ config ASPEED_SOC selec

[PATCH 13/19] hw/i3c/dw-i3c: Add IBI handling

2025-06-12 Thread Joe Komlodi
Adds handling for different IBI events that the controller can receive. This includes: - Handling a hot-join from a target - Handling a secondary controller on the bus requesting to be the primary bus controller - Handling an interrupt request from a target. When receiving an IBI, the controller

[PATCH 16/19] hw/i3c/aspeed: Add I3C bus get function

2025-06-12 Thread Joe Komlodi
To retrieve the I3C bus object normally, the order is Aspeed I3C -> DW I3C[n] -> bus object, so make a nice wrapper for people to use. Signed-off-by: Joe Komlodi --- hw/i3c/aspeed_i3c.c | 9 + include/hw/i3c/aspeed_i3c.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/hw/

[PATCH 14/19] hw/i3c/dw-i3c: Add ctrl MMIO handling

2025-06-12 Thread Joe Komlodi
Adds functionality to the CTRL register. Signed-off-by: Joe Komlodi Reviewed-by: Titus Rwantare Reviewed-by: Patrick Venture --- hw/i3c/dw-i3c.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index c5af331ac4..61845c9

[PATCH 19/19] hw/i3c: Add hotplug support

2025-06-12 Thread Joe Komlodi
This adds support for hotplugging in I3C. Conceptually this can be thought of as an I3C target being physically socketed onto a board. It is then the target's responsibility to go through the hot-join and DAA process so it can participate on the bus. Signed-off-by: Joe Komlodi Reviewed-by: Patri

[PATCH 06/19] hw/i3c/dw-i3c: Add more reset values

2025-06-12 Thread Joe Komlodi
Adds reset values for the new registers added. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture --- hw/i3c/dw-i3c.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index b252903ea4..845fbd5efd 100644 --- a/hw/i3c

[PATCH 11/19] hw/i3c/dw-i3c: Add IRQ MMIO behavior

2025-06-12 Thread Joe Komlodi
Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture Reviewed-by: Hao Wu --- hw/i3c/dw-i3c.c | 56 + 1 file changed, 56 insertions(+) diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index ecd79aba8c..c58e12964c 100644 --- a/hw/i3c/dw-i3c.c +++

[PATCH 08/19] hw/i3c/dw-i3c: Add register RO field masks

2025-06-12 Thread Joe Komlodi
Adds read-only register masks for the DwC I3C controller. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture --- hw/i3c/dw-i3c.c | 40 1 file changed, 40 insertions(+) diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index 845fbd5efd..4f40f999f4 100

[PATCH 04/19] hw/i3c/dw-i3c: Add more register fields

2025-06-12 Thread Joe Komlodi
Adds the rest of the Designware register fields. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture --- hw/i3c/dw-i3c.c | 216 1 file changed, 216 insertions(+) diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index 4b1a3f3f07..b252903ea4 10

[PATCH 02/19] hw/i3c: Add bus support

2025-06-12 Thread Joe Komlodi
Adds an I3C bus and a target class. The bus supports: - I3C data transmission and reception - CCCs (including ENTDAA) - IBIs - legacy I2C transactions General usage of the bus is similar to I2C. Users are expected to initialize a bus via i3c_init_bus, and use the bus returned from the init functio

[PATCH 07/19] hw/i3c/aspeed_i3c: Add register RO field masks

2025-06-12 Thread Joe Komlodi
Adds read-only register masks for the Aspeed I3C controller registers. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture --- hw/i3c/aspeed_i3c.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/i3c/aspeed_i3c.c b/hw/i3c/aspeed_i3c.c index 7a16dfec53..1ad25e5a00 10

[PATCH 09/19] hw/i3c/dw-i3c: Treat more registers as read-as-zero

2025-06-12 Thread Joe Komlodi
RESET_CTRL and INTR_FORCE are write-only. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture --- hw/i3c/dw-i3c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index 4f40f999f4..bf51c00935 100644 --- a/hw/i3c/dw-i3c.c +++ b/hw/i3c/dw-i3c.c @@ -359

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

2025-06-12 Thread Joe Komlodi
Hi all, This series adds I3C bus support to QEMU and adds more functionality to the Aspeed I3C controller. This implementation is a basic implementation that introduces IBIs (including hot-join), CCCs, and SDR data transfer. As-is, it doesn't support multi-controller buses or HDR transfers. Firs

[PATCH 03/19] hw/i3c: Split DesignWare I3C out of Aspeed I3C

2025-06-12 Thread Joe Komlodi
The Aspeed I3C IP block is technically an Aspeed IP block that manages 6 DW I3C controllers. To help reflect this better and to make it easier for other SoCs to use the DW I3C model, we'll split out the DW portion from the Aspeed portion. Signed-off-by: Joe Komlodi --- hw/arm/Kconfig

[PATCH 05/19] hw/i3c/aspeed_i3c: Add more register fields

2025-06-12 Thread Joe Komlodi
Adds the rest of the Aspeed I3C controller register fields. Signed-off-by: Joe Komlodi Reviewed-by: Patrick Venture --- hw/i3c/aspeed_i3c.c | 54 +++-- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/hw/i3c/aspeed_i3c.c b/hw/i3c/aspeed_i3

[PATCH v4] meson: fix Windows build

2025-06-12 Thread oltolm
The build fails on Windows. Replace calls to Unix programs like ´cat´, ´sed´ and ´true´ with calls to ´python´ and wrap calls to ´os.path.relpath´ in try-except because it can fail when the two paths are on different drives. Make sure to convert the Windows paths to Unix paths to prevent warnings i

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

2025-06-12 Thread John Snow
Thanks for your service! Remove the old qapidoc and the option to enable the transmogrifier, leaving the "transmogrifier" as the ONLY qapi doc generator. This in effect also converts the QAPI test to use the new documentation generator, too. Signed-off-by: John Snow --- docs/interop/qemu-ga-ref

[PATCH v2 3/3] docs: remove special parsing for freeform sections

2025-06-12 Thread John Snow
This change removes special parsing for freeform sections and allows them to simply be unmodified rST syntax. The existing headings in the QAPI schema are adjusted to reflect the new paradigm. Signed-off-by: John Snow --- docs/devel/qapi-code-gen.rst | 28 ++--- docs/inte

[PATCH v2 1/3] docs: fix errors formatting in tests/qapi-schema/doc-good

2025-06-12 Thread John Snow
If we remove the legacy parser, the doc-good.json formatting begins to fail because the body text is appended directly after the field list entry, which is invalid rST syntax. Without this change, we see this error: /home/jsnow/src/qemu/docs/../tests/qapi-schema/doc-good.json:169: WARNING: Field

[PATCH v2 0/3] docs: remove legacy qapidoc

2025-06-12 Thread John Snow
Remove docs/sphinx/qapidoc_legacy.py, and remove special parsing of freeform QAPI documentation block sections in favor of using standard rST syntax that is included in the final document with no special parsing or post-processing. v2: - rebased on origin/master (2025-06-12) - Revised commit mes

Re: [PATCH RESEND v3] meson: fix Windows build

2025-06-12 Thread BALATON Zoltan
On Thu, 12 Jun 2025, Oleg Tolmatcev wrote: Am Do., 12. Juni 2025 um 21:35 Uhr schrieb Stefan Hajnoczi : On Sat, Jun 7, 2025 at 5:47 AM oltolm wrote: Sorry, I forgot to cc the maintainers. The build failed when run on Windows. I replaced calls to Unix programs like ´cat´, ´sed´ and ´true´ wi

Re: [PATCH v15 4/4] qtest/cxl: Add aarch64 virt test for CXL

2025-06-12 Thread Itaru Kitayama
On Thu, Jun 12, 2025 at 02:43:38PM +0100, Jonathan Cameron wrote: > Add a single complex case for aarch64 virt machine. > Given existing much more comprehensive tests for x86 cover the > common functionality, a single test should be enough to verify > that the aarch64 part continue to work. > > Si

Re: [PATCH v2 01/20] memory: Adjust event ranges to fit within notifier boundaries

2025-06-12 Thread Alejandro Jimenez
On 6/12/25 2:54 AM, Vasant Hegde wrote: Alejandro, On 5/2/2025 7:45 AM, Alejandro Jimenez wrote: Invalidating the entire address space (i.e. range of [0, ~0ULL]) is a valid and required operation by vIOMMU implementations. However, such invalidations currently trigger an assertion unless th

[PATCH v4 4/4] qapi: rephrase return docs to avoid type name

2025-06-12 Thread John Snow
Well, I tried. Maybe not very hard. Sorry! Signed-off-by: John Snow --- qapi/block-core.json | 6 +++--- qapi/block-export.json | 2 +- qapi/block.json| 2 +- qapi/control.json | 5 ++--- qapi/dump.json | 5 ++--- qapi/introspect.json | 6 +++--- qapi/job.json |

[PATCH v4 0/4] qapi: add auto-generated return docs

2025-06-12 Thread John Snow
This series adds the ability for the new QAPIDoc system to generate "Returns:" documentation based on the return type declared in the Schema even when no explicit documentation is found in the QAPI source. As a result and as an immediate cleanup, trivial return statements are removed and remaining

[PATCH v4 2/4] docs, qapi: generate undocumented return sections

2025-06-12 Thread John Snow
This patch changes the qapidoc transmogrifier to generate Return value documentation for any command that has a return value but hasn't explicitly documented that return value. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 14 -- scripts/qapi/parser.py | 15 +++ s

[PATCH v4 1/4] docs/qapi-domain: add return-nodesc

2025-06-12 Thread John Snow
This form is used to annotate a return type without an accompanying description, for when there is no "Returns:" information in the source doc, but we have a return type we want to generate a cross-reference to. The syntax is: :return-nodesc: TypeName It's primarily necessary because Sphinx alwa

[PATCH v4 3/4] qapi: remove trivial "Returns:" sections

2025-06-12 Thread John Snow
The new qapidoc.py can generate "Returns" statements with type information just fine, so we can remove it from the source where it doesn't add anything particularly novel or helpful and just repeats the type info. This patch is fairly "gentle" and doesn't aggressively touch other "Returns" lines t

Re: [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field

2025-06-12 Thread Alejandro Jimenez
On 6/6/25 9:42 AM, Igor Mammedov wrote: On Thu, 1 May 2025 23:04:56 +0200 Philippe Mathieu-Daudé wrote: @@ -1486,15 +1485,8 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn) AMDVI_INT_ADDR_FIRST,

Re: [PATCH 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-12 Thread Peter Xu
On Thu, Jun 12, 2025 at 05:58:14PM -0300, Fabiano Rosas wrote: > Fabiano Rosas writes: > > > Peter Xu writes: > > > >> On Mon, Jun 02, 2025 at 10:37:59PM -0300, Fabiano Rosas wrote: > >>> QAPI_CLONE_MEMBERS is a better option than copying parameters one by > >>> one because it operates on the en

Re: [PATCH 4/5] configure: Add dtc option

2025-06-12 Thread Bernhard Beschow
Am 12. Juni 2025 05:46:03 UTC schrieb Paolo Bonzini : >On 6/12/25 07:12, Paolo Bonzini wrote: >> I'll send a patch to the upstream dtc project and you can add it to QEMU via >> diff_files (see commit 64644bc4eab2f for an example). >This is the patch, backported to QEMU's version of the dtc subp

[PATCH v2 12/12] scripts/codeconverter: remove * imports

2025-06-12 Thread John Snow
Python static analysis tools generally don't like dealing with asterisk imports as it's tough to deduce what's actually getting used and from where. Replace these imports with explicit imports. This also helps eliminate deprecated imports from the typing module. These files have more style issues

[PATCH v2 11/12] scripts/codeconverter: remove unused code

2025-06-12 Thread John Snow
Remove (select) bits of unused code, as it is not typed correctly and appears to not be in use. The quickest solution is to remove it entirely. 'Match' is not defined, and neither is 'TypeInfoReference'. What these bits of code were meant to do is unclear. Signed-off-by: John Snow --- scripts/c

[PATCH v2 10/12] python: remove version restriction for mypy

2025-06-12 Thread John Snow
Removing this configuration line allows mypy to type check files from the context of whatever version of Python it happens to be running under, which is actually what we want here, so long as we do actually support running these scripts under multiple versions of Python, which we currently do. Sig

[PATCH v2 08/12] python: further 3.9+ syntax upgrades

2025-06-12 Thread John Snow
pyupgrade does not catch absolutely everything - there are still a few deprecated type aliases we need to shift away from using. Signed-off-by: John Snow --- docs/sphinx/compat.py | 8 ++-- docs/sphinx/qapi_domain.py| 6 +++--- python/qemu/machine/console_socket.p

[PATCH v2 09/12] python: update mkvenv to type-check under different python versions

2025-06-12 Thread John Snow
Currently, we instruct mypy to pretend it is type checking under a specific version of python. For our case, where our scripts may in fact actually be executing under a number of different environments in the build system, we want mypy to remove this restriction. This patch adjusts some of the imp

Re: [PATCH v3 0/7] amd_iommu: Fixes to align with AMDVi specification

2025-06-12 Thread Alejandro Jimenez
Hi Ethan, On 6/12/25 4:36 AM, Ethan MILON wrote: Hi, Is this series the right place to include the following minor fix? I would defer this change for two reasons: 1) This series has been reviewed and tested already. I was hoping it would be included on the Jun 1st pull but I sent v3 too la

[PATCH v2 07/12] fixup

2025-06-12 Thread John Snow
These are manual fixes that ought be merged into the prior patch, but are here separated for clarity to separate the automated portions of this patch from the non-automated portions. These fixes are only the necessary portions to allow python static checks (and checkpatch.pl) to pass again, and do

[PATCH v2 05/12] python: fix illegal escape sequences

2025-06-12 Thread John Snow
\{ is an illegal escape sequence, to get a literal backslash we need to use \\. This is being fixed because of an issue spotted when attempting to use the pyupgrade script. Signed-off-by: John Snow --- scripts/feature_to_c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s

Re: [PATCH 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-12 Thread Fabiano Rosas
Fabiano Rosas writes: > Peter Xu writes: > >> On Mon, Jun 02, 2025 at 10:37:59PM -0300, Fabiano Rosas wrote: >>> QAPI_CLONE_MEMBERS is a better option than copying parameters one by >>> one because it operates on the entire struct and follows pointers. It >>> also avoids the need to alter this f

[PATCH v2 04/12] python: update shebangs to standard, using /usr/bin/env

2025-06-12 Thread John Snow
This is the standard shebang we should always be using, as it plays nicely with virtual environments and our desire to always be using a specific python interpreter in our environments. (It also makes sure I can find all of the python scripts in our tree easily.) Signed-off-by: John Snow --- ro

[PATCH v2 03/12] python: sync changes from external qemu.qmp package

2025-06-12 Thread John Snow
Synchronize changes from the standalone python-qemu-qmp repository for the primary purpose of removing some pre-3.9 compatibility crud that we no longer need or want. My plan for this release cycle is to finally eliminate this duplication so this type of patch will no longer be necessary -- but fo

[PATCH v2 02/12] python: update pylint ignores

2025-06-12 Thread John Snow
The next patch will synchronize the qemu.qmp library with the external, standalone version. That synchronization will require an extra ignore for pylint, so do that now. Signed-off-by: John Snow --- python/setup.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/

[PATCH v2 01/12] python: convert packages to PEP517/pyproject.toml

2025-06-12 Thread John Snow
Newer versions of setuptools increasingly expect that packages are defined using the pyproject.toml/PEP517 packaging layout format. With 3.9 as our minimum, I believe it's finally appropriate to make the shift away from the legacy packaging format. Update documentation and dependencies that change

[PATCH v2 00/12] Python: Fix 'make check-dev' and modernize to 3.9+

2025-06-12 Thread John Snow
This series does a couple things that I'll probably end up splitting out into smaller series if history is any guide, but either way, here it goes: A) Convert qemu.git/python/ to a PEP517/pyproject.toml package. Ultimately this means deleting setup.py and fully migrating to newer python infrastruc

Re: [PATCH RESEND v3] meson: fix Windows build

2025-06-12 Thread Oleg Tolmatcev
Am Do., 12. Juni 2025 um 21:35 Uhr schrieb Stefan Hajnoczi : > > On Sat, Jun 7, 2025 at 5:47 AM oltolm wrote: > > > > Sorry, I forgot to cc the maintainers. > > > > The build failed when run on Windows. I replaced calls to Unix programs > > like ´cat´, ´sed´ and ´true´ with calls to ´python´. I wr

Re: [PATCH RESEND v3] meson: fix Windows build

2025-06-12 Thread Stefan Hajnoczi
On Sat, Jun 7, 2025 at 5:47 AM oltolm wrote: > > Sorry, I forgot to cc the maintainers. > > The build failed when run on Windows. I replaced calls to Unix programs > like ´cat´, ´sed´ and ´true´ with calls to ´python´. I wrapped calls to > ´os.path.relpath´ in try-except because it can fail when t

Re: [PATCH 4/4] iotests/244: Add test cases for keep_data_file

2025-06-12 Thread Eric Blake
On Fri, May 30, 2025 at 10:44:47AM +0200, Hanna Czenczek wrote: > Add various test cases around keep_data_file to the existing data_file > test suite 244. > > Signed-off-by: Hanna Czenczek > --- > tests/qemu-iotests/244 | 71 ++ > tests/qemu-iotests/244.ou

Re: [PATCH 3/4] iotests/common.filter: Sort keep_data_file

2025-06-12 Thread Eric Blake
On Fri, May 30, 2025 at 10:44:46AM +0200, Hanna Czenczek wrote: > Sort the new keep_data_file creation option together with data_file and > data_file_raw. > > Signed-off-by: Hanna Czenczek > --- > tests/qemu-iotests/common.filter | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-

Re: [PATCH 2/4] qcow2: Simplify size round-up in co_create_opts

2025-06-12 Thread Eric Blake
On Fri, May 30, 2025 at 10:44:45AM +0200, Hanna Czenczek wrote: > Use the now-existing qcow2_opts pointer to simplify the size rounding up > code. > > Signed-off-by: Hanna Czenczek > --- > block/qcow2.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric

Re: [PATCH v2 0/2] reject qcow2 creation with protocol in data_store

2025-06-12 Thread Eric Blake
On Tue, May 27, 2025 at 09:32:43AM -0500, Eric Blake wrote: > v1 was here: > https://lists.gnu.org/archive/html/qemu-devel/2025-05/msg05581.html > > Since then: > - split into two patches > - also tweak vmdk [Kevin] > - rewrite commit messages for better justification [Kevin] > > Eric Blake (2

Re: [PATCH 1/4] qcow2: Add keep_data_file command-line option

2025-06-12 Thread Eric Blake
On Fri, May 30, 2025 at 10:44:44AM +0200, Hanna Czenczek wrote: > Add a command-line-only option to prevent overwriting the file specified > as external data file. > > This option is only available on the qemu-img create command line, not > via blockdev-create, as it makes no sense there: That int

Re: [PATCH 1/2] hw/nvme: fix namespace attachment

2025-06-12 Thread Jesper Devantier
On Tue Jun 3, 2025 at 2:59 PM CEST, Klaus Jensen wrote: > From: Klaus Jensen > > Commit 6ccca4b6bb9f ("hw/nvme: rework csi handling") introduced a bug in > Namespace Attachment, causing it to > > a) not allow a controller to attach namespaces to other controllers > b) assert if a valid non-att

[PULL v2 0/1] Tracing patches

2025-06-12 Thread Stefan Hajnoczi
The following changes since commit d9ce74873a6a5a7c504379857461e4ae64fcf0cd: Merge tag 'pull-vfio-20250611' of https://github.com/legoater/qemu into staging (2025-06-11 11:39:53 -0400) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request fo

[PULL v2 1/1] meson: fix Windows build

2025-06-12 Thread Stefan Hajnoczi
From: oltolm The build fails on Windows. Replace calls to Unix programs like ´cat´, ´sed´ and ´true´ with calls to ´python´ and wrap calls to ´os.path.relpath´ in try-except because it can fail when the two paths are on different drives. Make sure to convert the Windows paths to Unix paths to pre

[PULL v2 11/31] hw/audio/marvell_88w8618: skip automatic zero-init of large array

2025-06-12 Thread Stefan Hajnoczi
From: Daniel P. Berrangé The 'mv88w8618_audio_callback' method has a 4k byte array used for copying data between the audio backend and device. Skip the automatic zero-init of this array to eliminate the performance overhead in the I/O hot path. The 'buf' array will be fully initialized when read

[PULL v2 00/31] Block patches

2025-06-12 Thread Stefan Hajnoczi
The following changes since commit d9ce74873a6a5a7c504379857461e4ae64fcf0cd: Merge tag 'pull-vfio-20250611' of https://github.com/legoater/qemu into staging (2025-06-11 11:39:53 -0400) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for

Re: [PATCH v15 0/4] arm/virt: CXL support via pxb_cxl

2025-06-12 Thread Jonathan Cameron via
On Thu, 12 Jun 2025 17:04:32 +0100 Peter Maydell wrote: > On Thu, 12 Jun 2025 at 14:43, Jonathan Cameron > wrote: > > > > v15: > > - Split the address map calculations and mmio setup into separate > > functions in patch 2, allowing v14 patch 3 to be dropped as not > > x86 and arm make

Re: [PATCH v5 1/7] vhost-user: Add VirtIO Shared Memory map request

2025-06-12 Thread Stefan Hajnoczi
On Mon, Jun 09, 2025 at 04:47:23PM +0200, Albert Esteve wrote: > Add SHMEM_MAP/UNMAP requests to vhost-user to > handle VIRTIO Shared Memory mappings. > > This request allows backends to dynamically map > fds into a VIRTIO Shared Memory Region indentified identified > by its `shmid`. The map is

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

2025-06-12 Thread Cornelia Huck
On Thu, Jun 12 2025, Peter Maydell wrote: > On Thu, 15 May 2025 at 16:40, Cornelia Huck wrote: >> >> Generated against Linux 6.14-rc1. >> >> Reviewed-by: Sebastian Ott >> Reviewed-by: Eric Auger >> Signed-off-by: Cornelia Huck >> --- > > Does it make sense to include all these extra registers

Re: live-migration performance regression when using pmem

2025-06-12 Thread Peter Xu
On Thu, Jun 12, 2025 at 03:34:35PM +, Chaney, Ben wrote: > On 5/14/25, 9:59 AM, "David Hildenbrand" > wrote: > > > > >Because we need to make sure the pmem kind memory data is synced > >after migration, we choose to call pmem_persist() when the migration > >finish.

Re: [PATCH v15 0/4] arm/virt: CXL support via pxb_cxl

2025-06-12 Thread Peter Maydell
On Thu, 12 Jun 2025 at 14:43, Jonathan Cameron wrote: > > v15: > - Split the address map calculations and mmio setup into separate > functions in patch 2, allowing v14 patch 3 to be dropped as not > x86 and arm make the same calls. Note I felt this was a sufficient > change to trigg

Re: [PATCH v1 04/15] intel_iommu: Introduce a new structure VTDHostIOMMUDevice

2025-06-12 Thread CLEMENT MATHIEU--DRIF
Hi, On 06/06/2025 12:04 pm, Zhenzhong Duan wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > Introduce a new structure VTDHostIOMMUDevice which replaces > HostIOMMUDevice to be stored i

[RFC PATCH v2 QEMU 4/4] plugins: cache: Add a hotness tracker for cache misses with socket connection to device emulation

2025-06-12 Thread Jonathan Cameron via
This adds simple hotness tracker instances suitable for pairing with the CXL HMU emulation with control and data transfer via a socket (port 4443) A typical command line is: -plugin ../qemu/bin/native/contrib/plugins/libcache.so,hotness=1,\ dcachesize=8192,dassoc=4,dblksize=64,icachesize=8192,iass

[RFC PATCH v2 QEMU 3/4] hw/cxl: Provide a means to get the interleave set position for an EP

2025-06-12 Thread Jonathan Cameron via
CXL interleave decoding is hieriarchical in a fashion that means the CXL memory devices only need to know the interleave granularity and interleave ways to figure out which address bits to drop from incoming translactions. Unfortunately to provide the right information to the hotness monitoring plu

[RFC PATCH v2 QEMU 2/4] hw/cxl: Add emulation of a CXL Hotness Monitoring Unit (CHMU)

2025-06-12 Thread Jonathan Cameron via
CXL r3.2 defines a CXL Hotness Monitoring Unit. This allows for a CXL device to do on device estimation of which 'granuals' of data are 'hot' - that is accessed a lot. For a typical application hot data on a CXL device both wastes potentially limited bandwidth and many have latency impacts. Access

[RFC PATCH v2 QEMU 1/4] hw/cxl: Switch to using an array for CXLRegisterLocator base addresses.

2025-06-12 Thread Jonathan Cameron via
Allows for easier looping over entries when adding CHMU and CPMU instances. Signed-off-by: Jonathan Cameron --- CHMU RFC v2: New patch to simplify a few code paths. --- include/hw/cxl/cxl_pci.h | 17 ++--- hw/cxl/switch-mailbox-cci.c| 4 ++-- hw/mem/cxl_type3.c

[RFC PATCH v2 QEMU 0/4] cxl/plugins: Hotness Monitoring Unit with 'real' data.

2025-06-12 Thread Jonathan Cameron via
RFC v2: Think of this as a WIP posting. It is useful for OS driver and use case work but not ready for upstream QEMU. - Integrated the previously separate CXL server with the plugin to avoid one hop. - Many more control features emulated - still a few to go such as transaction type filtering an

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

2025-06-12 Thread Cornelia Huck
On Thu, Jun 12 2025, Peter Maydell wrote: > On Thu, 12 Jun 2025 at 16:36, Cornelia Huck wrote: >> >> On Thu, Jun 12 2025, Peter Maydell wrote: >> >> > On Thu, 15 May 2025 at 16:40, Cornelia Huck wrote: >> >> >> >> From: Eric Auger >> >> >> >> Reviewed-by: Richard Henderson >> >> Reviewed-by:

Re: [PATCH v1 1/3] hw/net/can: CTU CAN FD IP core mapping to the platform bus

2025-06-12 Thread Peter Maydell
On Wed, 28 May 2025 at 12:50, Pavel Pisa wrote: > > The system/platform bus mapping alternative to PCI/PCIe mapping. > In this case, the platform bus is used to match FPGA design > for Xilinx Zynq MZ_APO education kit with four CTU CAN FD > cores on branch mz_apo-2x-xcan-4x-ctu of repo > > https

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

2025-06-12 Thread Cornelia Huck
On Thu, Jun 12 2025, Peter Maydell wrote: > On Thu, 15 May 2025 at 16:40, Cornelia Huck wrote: >> >> From: Eric Auger >> >> Introduce scripts that automate the generation of system register >> definitions from a given linux source tree arch/arm64/tools/sysreg. >> >> Invocation of >> ./update-aa

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

2025-06-12 Thread Peter Maydell
On Thu, 12 Jun 2025 at 16:34, Cornelia Huck wrote: > > On Thu, Jun 12 2025, Peter Maydell wrote: > > > On Thu, 15 May 2025 at 16:39, Cornelia Huck wrote: > >> > >> From: Eric Auger > >> > >> Also add kvm accessors for storing host features into idregs. > >> > >> Reviewed-by: Richard Henderson

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

2025-06-12 Thread Peter Maydell
On Thu, 12 Jun 2025 at 16:36, Cornelia Huck wrote: > > On Thu, Jun 12 2025, Peter Maydell wrote: > > > On Thu, 15 May 2025 at 16:40, Cornelia Huck wrote: > >> > >> From: Eric Auger > >> > >> Reviewed-by: Richard Henderson > >> Reviewed-by: Sebastian Ott > >> Signed-off-by: Eric Auger > >> Si

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

2025-06-12 Thread Peter Maydell
On Fri, 6 Jun 2025 at 10:53, Cornelia Huck wrote: > > Friendly ping... anything else that needs to happen here? Sorry I've neglected this for so long. I'm OK with the general idea, but I've commented in a couple of places about compile failures and other things. You'll also find it needs a rebase

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

2025-06-12 Thread Cornelia Huck
On Thu, Jun 12 2025, Peter Maydell wrote: > On Thu, 15 May 2025 at 16:40, Cornelia Huck wrote: >> >> From: Eric Auger >> >> Reviewed-by: Richard Henderson >> Reviewed-by: Sebastian Ott >> Signed-off-by: Eric Auger >> Signed-off-by: Cornelia Huck >> --- >> hw/intc/armv7m_nvic.c | 12 ++

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

2025-06-12 Thread Peter Maydell
On Thu, 15 May 2025 at 16:40, Cornelia Huck wrote: > > Generated against Linux 6.14-rc1. > > Reviewed-by: Sebastian Ott > Reviewed-by: Eric Auger > Signed-off-by: Cornelia Huck > --- Does it make sense to include all these extra registers? Some of them are not simple ID registers at all, for e

Re: live-migration performance regression when using pmem

2025-06-12 Thread Chaney, Ben
On 5/14/25, 9:59 AM, "David Hildenbrand" mailto:da...@redhat.com>> wrote: >Because we need to make sure the pmem kind memory data is synced >after migration, we choose to call pmem_persist() when the migration >finish. This will make sure the data of pmem is safe and will not >lose if power is o

  1   2   3   >