Re: [PATCH] tests/functional: fix race in virtio balloon test

2025-03-04 Thread Thomas Huth
On 04/03/2025 19.33, Daniel P. Berrangé wrote: There are two race conditions in the recently added virtio balloon test * The /dev/vda device node is not ready * The virtio-balloon driver has not issued the first stats refresh To fix the former, monitor dmesg for a line about 'vda'. To fix

[PATCH 27/57] docs/qapi-domain: add XREF compatibility goop for Sphinx < 4.1

2025-03-04 Thread John Snow
Sphinx < 4.1 handles cross-references ... differently. Factor out and isolate the compatibility goop we need to make cross references work properly in old versions of Sphinx. Yes, it's ugly. Yes, it works. No, I don't want to talk about it. Understand that this patch exists because of the overflo

Re: [PATCH v2] microvm: do not use the lastest cpu version

2025-03-04 Thread Ani Sinha
On Sat, Mar 1, 2025 at 9:04 PM Ani Sinha wrote: > > On Thu, Feb 20, 2025 at 12:36 PM Zhao Liu wrote: > > > > On Thu, Feb 20, 2025 at 12:23:26PM +0530, Ani Sinha wrote: > > > Date: Thu, 20 Feb 2025 12:23:26 +0530 > > > From: Ani Sinha > > > Subject: [PATCH v2] microvm: do not use the lastest cpu

[PULL 0/3] Some refactoring/cleanups for cpu versions on microvms

2025-03-04 Thread Ani Sinha
The following changes since commit 661c2e1ab29cd9c4d268ae3f44712e8d421c0e56: scripts/checkpatch: Fix a typo (2025-03-04 09:30:26 +0800) are available in the Git repository at: g...@gitlab.com:anisinha/qemu.git tags/pull-master-20250305 for you to fetch changes up to 22550e8eaba43233f68a344b

[PULL 1/3] hw/i386: introduce x86_firmware_reconfigure api

2025-03-04 Thread Ani Sinha
Normally, there is no need to perform firmware reconfiguration once the virtual machine has started. Hence, currently ovmf firmware parsing happens only once. However, if the firmware changes betweeen boots then reconfiguration needs to happen again. Firmware can change if for example the guest bri

Re: [PATCH v6 20/36] vfio/migration: Add vfio_add_bytes_transferred()

2025-03-04 Thread Cédric Le Goater
On 3/4/25 23:03, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This way bytes_transferred can also be incremented in other translation units than migration.c. Signed-off-by: Maciej S. Szmigiero Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/migration.c | 7

[PATCH] tests/functional: Increase the timeout of the mips64el_replay test

2025-03-04 Thread Thomas Huth
We run the gitlab-CI with the untrusted tests enabled, and the test_replay_mips64el_malta_5KEc_cpio subtest is rather slow, so this already hit the standard 90 seconds timeout in the CI. Increase the timeout for more headroom. Reported-by: Stefan Hajnoczi Signed-off-by: Thomas Huth --- tests/fu

Re: [PATCH v7 0/5] Allow to enable multifd and postcopy migration together

2025-03-04 Thread Prasad Pandit
Hi, On Tue, 4 Mar 2025 at 20:12, Peter Xu wrote: > IIUC Fabiano is not asking you to drop them, but split them. Split still > "requires" them to be present, as long as before the enablement patch. * Yes, same here; Even I am not suggesting to drop anything. Fabiano mentioned the following about

Re: [PATCH v2 10/10] target/i386/kvm: don't stop Intel PMU counters

2025-03-04 Thread Mi, Dapeng
On 3/3/2025 6:00 AM, Dongli Zhang wrote: > The kvm_put_msrs() sets the MSRs using KVM_SET_MSRS. The x86 KVM processes > these MSRs one by one in a loop, only saving the config and triggering the > KVM_REQ_PMU request. This approach does not immediately stop the event > before updating PMC. > > In

Re: [PATCH 5/6] hw/ppc: Pass device tree properties for Fadump

2025-03-04 Thread Harsh Prateek Bora
On 2/27/25 08:58, Nicholas Piggin wrote: On Mon Feb 17, 2025 at 5:17 PM AEST, Aditya Gupta wrote: Platform (ie. QEMU) is expected to pass few device tree properties for details for fadump: * "ibm,configure-kernel-dump": RTAS call for fadump * "ibm,configure-kernel-dump-sizes": Space re

Re: [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers during VM reset

2025-03-04 Thread Mi, Dapeng
On 3/3/2025 6:00 AM, Dongli Zhang wrote: > QEMU uses the kvm_get_msrs() function to save Intel PMU registers from KVM > and kvm_put_msrs() to restore them to KVM. However, there is no support for > AMD PMU registers. Currently, has_pmu_version and num_pmu_gp_counters are > initialized based on cp

[PATCH v2] tests/avocado: Remove the boot_linux.py tests

2025-03-04 Thread Thomas Huth
These tests are based on the cloudinit functions from Avocado. The cloudinit is very, very slow compared to our other tests, so a lot of these Avocado tests have either been disabled by default with a decorator, or have been marked to only run with KVM. We won't include this sluggish cloudinit stu

Re: [PATCH 4/6] hw/ppc: Implement saving CPU state in Fadump

2025-03-04 Thread Harsh Prateek Bora
On 2/17/25 12:47, Aditya Gupta wrote: Kernel expects CPU states/register states in the format mentioned in "Register Save Area" in PAPR. The platform (in our case, QEMU) saves each CPU register in the form of an array of "register entries", the start and end of this array is signified by "CPU

[PULL 5/6] ui/console-vc: implement DCH (delete) and ICH (insert) commands

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev This patch implements DCH (delete character) and ICH (insert character) commands. DCH - Delete Character: "As characters are deleted, the remaining characters between the cursor and right margin move to the left. Character attributes move with the characters. The t

Re: [PATCH v2 06/10] target/i386/kvm: rename architectural PMU variables

2025-03-04 Thread Mi, Dapeng
On 3/3/2025 6:00 AM, Dongli Zhang wrote: > AMD does not have what is commonly referred to as an architectural PMU. > Therefore, we need to rename the following variables to be applicable for > both Intel and AMD: > > - has_architectural_pmu_version > - num_architectural_pmu_gp_counters > - num_ar

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

2025-03-04 Thread Li Zhijian via
control_save_page() is for RDMA only, unfold it to make the code more clear. In addition: - Similar to other branches style in ram_save_target_page(), involve RDMA only if the condition 'migrate_rdma()' is true. - Further simplify the code by removing the RAM_SAVE_CONTROL_NOT_SUPP. Reviewed-b

Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-04 Thread Michael S. Tsirkin
On Tue, Mar 04, 2025 at 06:37:47PM +, Suravee Suthikulpanit wrote: > The QEMU-emulated AMD IOMMU PCI device is implemented based on the AMD I/O > Virtualization Technology (IOMMU) Specification [1]. The PCI id for this > device is platform-specific. > > Currently, the QEMU-emulated AMD IOMMU d

Re: [PATCH v2 21/32] plugins/loader: populate target_name with target_name()

2025-03-04 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 4/3/25 23:24, Alex Bennée wrote: >> We have a function we can call for this, lets not rely on macros that >> stop us building once. >> Reviewed-by: Richard Henderson >> Reviewed-by: Philippe Mathieu-Daudé >> Signed-off-by: Alex Bennée >> Message-Id: <2025022

Re: [PATCH] nbd: Defer trace init until after daemonization

2025-03-04 Thread Thomas Huth
On 27/02/2025 23.06, Eric Blake wrote: 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 con

[PATCH v7 2/2] target/loongarch: check tlb_ps

2025-03-04 Thread Song Gao
For LoongArch th min tlb_ps is 12(4KB), for TLB code, the tlb_ps may be 0,this may case UndefinedBehavior Add a check-tlb_ps fuction to check tlb_ps, to make sure the tlb_ps is avalablie. we check tlb_ps when get the tlb_ps from tlb->misc or CSR bits. 1. cpu reset set CSR_PWCL.PTBASE and CSR_STL

[PATCH v7 1/2] target/loongarch: fix 'make check-functional' failed

2025-03-04 Thread Song Gao
some tlb instructions get the tlb_ps from tlb->misc but the value may has been initialized to 0,just check the tlb_ps skip the function and write a log. Signed-off-by: Song Gao Reviewed-by: Bibo Mao --- target/loongarch/tcg/tlb_helper.c | 12 1 file changed, 12 insertions(+) d

[PATCH v5 0/2] target/loongarch: fix 'make check-functional' failed

2025-03-04 Thread Song Gao
Some tlb instructions get the tlb_ps from tlb->misc but the value may has been initialized to 0,just check the tlb_e skip the function and check_tlb_ps write a log. For LoongArch th min tlb_ps is 12(4KB), for TLB code, the tlb_ps may be 0,this may case UndefinedBehavior Add a check-tlb_ps fucti

[PATCH v5 4/6] migration/rdma: Remove redundant migration_in_postcopy checks

2025-03-04 Thread Li Zhijian via
Since we have disabled RDMA + postcopy, it's safe to remove the migration_in_postcopy() that follows the migrate_rdma(). Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: reorder: 7th->4th --- migration/rdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mig

Re: [PATCH 10/12] rust: memory: wrap MemoryRegion with Opaque<>

2025-03-04 Thread Zhao Liu
Sorry, when I revisit this patch, I have more thoughts.. > -/// A safe wrapper around [`bindings::MemoryRegion`]. Compared to the > -/// underlying C struct it is marked as pinned because the QOM tree > -/// contains a pointer to it. > -pub struct MemoryRegion { > -inner: bindings::MemoryRegi

Re: [PATCH] tests/avocado: Remove the boot_linux.py and replay_linux.py tests

2025-03-04 Thread Thomas Huth
On 27/02/2025 13.18, Alex Bennée wrote: Thomas Huth writes: These tests are based on the cloudinit functions from Avocado. The cloudinit is very, very slow compared to our other tests, so most of these Avocado tests have either been disabled by default with a decorator, or have been marked to

Re: [PATCH 02/57] qapi: shush pylint up

2025-03-04 Thread Markus Armbruster
John Snow writes: > Sh! > > This patch is RFC quality, I wasn't in the mood to actually solve > problems so much as I was in the mood to continue working on the Sphinx > rework. Plus, I don't think the code I am patching has hit origin/master > yet ... > > Signed-off-by: John Snow > --- > s

Re: [RFC PATCH] target/ppc: Do not set HPTE R/C bits on !guest_visible xlate

2025-03-04 Thread Nicholas Piggin
On Mon Mar 3, 2025 at 8:58 PM AEST, BALATON Zoltan wrote: > On Mon, 3 Mar 2025, Nicholas Piggin wrote: >> Perform !guest_visible memory accesses without modifying R/C bits. >> >> It's arguable whether !guest_visible memory accesses should modify >> R/C bits. i386 seems to set accessed/dirty bit upd

[PULL 6/6] chardev: use remoteAddr if the chardev is client

2025-03-04 Thread marcandre . lureau
From: Haoqian He If the chardev is client, the socket file path in localAddr may be NULL. This is because the socket path comes from getsockname(), according to man page, getsockname() returns the current address bound by the socket sockfd. If the chardev is client, it's socket is unbound sockfd.

[PULL 4/6] ui/console-vc: add support for cursor DECSC and DECRC commands

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev There are aliases for save and restore cursor commands: * save cursor `ESC 7` (DEC Save Cursor [1], older VT100) `ESC [ s` (CSI Save Cursor, standard ANSI) * load cursor `ESC 8` (DEC Restore Cursor [2], older VT100) `ESC [ u` (CSI Restore Cursor,

[PULL 3/6] ui/console-vc: report cursor position in the screen not in the scroll buffer

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev The format of the CSI cursor position report is `ESC[row;columnR`, where `row` is a row of a cursor in the screen, not in the scrollback buffer. What's the difference? Let's say the terminal screen has 24 lines, no matter how long the scrollback buffer may be, the last line is

[PULL 1/6] ui/console-vc: introduce parsing of the 'ESC ( ' sequence

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev This change introduces parsing of the 'ESC ( ' sequence, which is supposed to change character set [1]. In the QEMU case, the introduced parsing logic does not actually change the character set, but simply parses the sequence and does not let output of a tool to be corrupted w

[PULL 2/6] ui/console-vc: report to the application instead of screen rendering

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev Terminal Device Status Report (DSR) [1] should be sent to an application, not rendered to the screen. This patch fixes rendering of terminal report, which appear only on the graphical screen of the terminal (console "vc") and can be reproduced by the following command: e

[PULL 0/6] Ui patches

2025-03-04 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 661c2e1ab29cd9c4d268ae3f44712e8d421c0e56: scripts/checkpatch: Fix a typo (2025-03-04 09:30:26 +0800) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request for you to fetch change

[PULL 07/15] hw/intc/loongarch_extioi: Use cpu plug notification

2025-03-04 Thread Bibo Mao
Use hotplug_handler_plug() to nofity extioi object when cold-plug cpu is created, so that extioi can set and configure irq routing to new cpu. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/loongarch/virt.c b/h

Re: [PATCH 3/6] hw/ppc: Preserve memory regions registered for fadump

2025-03-04 Thread Harsh Prateek Bora
On 2/17/25 12:47, Aditya Gupta wrote: While the first kernel boots, it registers memory regions for fadump such as: * CPU state data (has to be populated by the platform) * HPTE state data (has to be populated by the platform) * Real Mode Regions (platform should copy it to req

[PATCH v5 0/2] target/loongarch: fix 'make check-functional' failed

2025-03-04 Thread Song Gao
Some tlb instructions get the tlb_ps from tlb->misc but the value may has been initialized to 0,just check the tlb_e skip the function and check_tlb_ps write a log. For LoongArch th min tlb_ps is 12(4KB), for TLB code, the tlb_ps may be 0,this may case UndefinedBehavior Add a check-tlb_ps fucti

Re: [PATCH 1/2] vfio: Make vfio-pci available on 64-bit host platforms only

2025-03-04 Thread Thomas Huth
On 03/03/2025 18.32, Philippe Mathieu-Daudé wrote: On 3/3/25 17:57, Peter Maydell wrote: On Mon, 3 Mar 2025 at 15:49, Cédric Le Goater wrote: Why are we keeping qemu-system-ppc and qemu-system-i386, and arm, since qemu-system-ppc64 and qemu-system-x86_64 should be able to run the same machines

[PATCH v5 1/6] migration: Prioritize RDMA in ram_save_target_page()

2025-03-04 Thread Li Zhijian via
Address an error in RDMA-based migration by ensuring RDMA is prioritized when saving pages in `ram_save_target_page()`. Previously, the RDMA protocol's page-saving step was placed after other protocols due to a refactoring in commit bc38dc2f5f3. This led to migration failures characterized by unkn

[PATCH v5 3/6] migration: disable RDMA + postcopy-ram

2025-03-04 Thread Li Zhijian via
It's believed that RDMA + postcopy-ram has been broken for a while. Rather than spending time re-enabling it, let's simply disable it as a trade-off. Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: - collect Reviewed tag - reoder: 6th -> 3th --- migration/options.c | 4 1 file

[PATCH v5 6/6] migration: Add qtest for migration over RDMA

2025-03-04 Thread Li Zhijian via
This qtest requires there is a RDMA(RoCE) link in the host. In order to make the test work smoothly, introduce a scripts/rdma-migration-helper.sh to - setup a new Soft-RoCE(aka RXE) if it's root - detect existing RoCE link Test will be skipped if there is no available RoCE link. # Start of rdma t

[PATCH v5 0/6] migration/rdma: fixes, refactor and cleanup

2025-03-04 Thread Li Zhijian via
- It fix the RDMA migration broken issue - disable RDMA + postcopy - some cleanups - Add a qtest for RDMA at last Changes since V4: - collect Reviewed-tags - Address comments in patch "migration: Add qtest for migration over RDMA" from Fabiano Rosas Changes since V3: - check RDMA and capabili

[PATCH v5 2/6] migration: check RDMA and capabilities are compatible on both sides

2025-03-04 Thread Li Zhijian via
Depending on the order of starting RDMA and setting capability, they can be categorized into the following scenarios: Source: S1: [set capabilities] -> [Start RDMA outgoing] Destination: D1: [set capabilities] -> [Start RDMA incoming] D2: [Start RDMA incoming] -> [set capabilities] Previously,

[PULL 06/15] hw/intc/loongarch_extioi: Implment cpu hotplug interface

2025-03-04 Thread Bibo Mao
When cpu is added, connect extioi gpio irq to CPU irq pin. Signed-off-by: Bibo Mao --- hw/intc/loongarch_extioi_common.c | 45 +++ 1 file changed, 45 insertions(+) diff --git a/hw/intc/loongarch_extioi_common.c b/hw/intc/loongarch_extioi_common.c index 19e19a9f73..f

[PULL 01/15] hw/intc/loongarch_ipi: Add basic hotplug framework

2025-03-04 Thread Bibo Mao
LoongArch ipi can send interrupt to multiple CPUs, interrupt routing to CPU comes from destination physical cpu id. Here hotplug interface is added for IPI object, so that parent irq line can be connected, and routing table can be added for new created cpu. Here only basic hotplug framework is add

[PATCH 47/57] docs/qapidoc: prepare to record entity being transmogrified

2025-03-04 Thread John Snow
Prepare to keep a record of which entity we're working on documenting for the purposes of being able to change certain generative features conditionally and create stronger assertions. If you find yourself asking: "Wait, but where does the current entity actually get recorded?!", you're right! Tha

[PULL 04/15] hw/intc/loongarch_extioi: Move gpio irq initial to common code

2025-03-04 Thread Bibo Mao
When cpu is added, it will connect gpio irq line to cpu irq. And cpu hot-add is put in common code, move gpio irq initial part into common code. Signed-off-by: Bibo Mao --- hw/intc/loongarch_extioi.c| 8 +--- hw/intc/loongarch_extioi_common.c | 6 +- 2 files changed, 6 insertions

[PULL 03/15] hw/intc/loongarch_ipi: Notify ipi object when cpu is plugged

2025-03-04 Thread Bibo Mao
Use hotplug_handler_plug() to nofity ipi object when cold-plug cpu is created, so that ipi can set and configure irq routing to new cpu. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/vir

[PULL 12/15] hw/loongarch/virt: Implement cpu plug interface

2025-03-04 Thread Bibo Mao
Implement cpu plug interface, and cold-plug cpu uses plug interface when cpu object is created. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- hw/loongarch/virt.c| 88 -- target/loongarch/cpu.c | 1 + 2 files changed, 78 insertions(+), 11 d

[PULL 10/15] hw/loongarch/virt: Add basic cpu plug interface framework

2025-03-04 Thread Bibo Mao
Add basic cpu hotplug interface framework, cpu hotplug interface is stub function and only framework is added here. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- hw/loongarch/virt.c| 29 + target/loongarch/cpu.c | 13 + target/loongarch/cpu

[PULL 09/15] hw/loongarch/virt: Add topo properties on CPU object

2025-03-04 Thread Bibo Mao
Add some properties such as socket_id, core_id, thread_id and node_id on LoongArch CPU object. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- target/loongarch/cpu.c | 9 + target/loongarch/cpu.h | 4 2 files changed, 13 insertions(+) diff --git a/target/loongarch/cpu.c b

[PULL 00/15] loongarch-to-apply queue

2025-03-04 Thread Bibo Mao
The following changes since commit 661c2e1ab29cd9c4d268ae3f44712e8d421c0e56: scripts/checkpatch: Fix a typo (2025-03-04 09:30:26 +0800) are available in the Git repository at: https://gitlab.com/bibo-mao/qemu.git tags/pull-loongarch-20250305 for you to fetch changes up to 0a629c827300d514cc

[PULL 13/15] hw/loongarch/virt: Update the ACPI table for hotplug cpu

2025-03-04 Thread Bibo Mao
On LoongArch virt machine, ACPI GED hardware is used for CPU hotplug handler, here CPU hotplug support feature is added based on GED handler, also CPU scan and reject method is added about CPU device in DSDT table. Co-developed-by: Xianglai Li Signed-off-by: Bibo Mao --- hw/loongarch/Kconfig

Re: [PATCH] docs/cxl: Add serial number for persistent-memdev

2025-03-04 Thread Jonathan Cameron via
On Tue, 4 Mar 2025 14:22:48 +0800 Yuquan Wang wrote: > > > > On Thu, Feb 20, 2025 at 04:12:13PM +, Jonathan Cameron wrote: > > > On Mon, 17 Feb 2025 19:20:39 +0800 > > > Yuquan Wang wrote: > > > > > > > Add serial number parameter in the cxl persistent examples. > > > > > > > > Signed

[PULL 02/15] hw/intc/loongarch_ipi: Implment cpu hotplug interface

2025-03-04 Thread Bibo Mao
Add logic cpu allocation and cpu mapping with cpu hotplug interface. When cpu is added, connect ipi gpio irq to CPU IRQ_IPI irq pin. Signed-off-by: Bibo Mao --- hw/intc/loongarch_ipi.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/hw/intc/loongarch_

[PULL 08/15] hw/loongarch/virt: Add CPU topology support

2025-03-04 Thread Bibo Mao
Add topological relationships for Loongarch VCPU and initialize topology member variables. On LoongArch system there is socket/core/thread topo information, physical CPU id is calculated from CPU topo, every topo sub-field is aligned by power of 2. So it is different from logical cpu index. Co-de

[PULL 05/15] hw/intc/loongarch_extioi: Add basic hotplug framework

2025-03-04 Thread Bibo Mao
LoongArch extioi interrupt controller routes peripheral interrupt to multiple CPUs, physical cpu id is used in interrupt routing table. Here hotplug interface is added for extioi object, so that parent irq line can be connected, and routing table can be added for new created cpu. Here only basic h

RE: [PATCH v4 12/23] hw/intc/aspeed: Introduce AspeedINTCIRQ structure to save the irq index and register address

2025-03-04 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v4 12/23] hw/intc/aspeed: Introduce AspeedINTCIRQ > structure to save the irq index and register address > > On 3/3/25 10:54, Jamin Lin wrote: > > The INTC controller supports GICINT128 to GICINT136, mapping 1:1 to > > input and output IRQs 0 to 8. Previously, th

Re: [PATCH 0/2] hw/ufs: Add temperature event support and test cases

2025-03-04 Thread Philippe Mathieu-Daudé
On 25/2/25 07:40, Keoseong Park wrote: Keoseong Park (2): hw/ufs: Add temperature event notification support tests/qtest/ufs-test: Add test code for the temperature feature Series queued, thanks!

Re: [PATCH v6] hw/i386/cpu: remove default_cpu_version and simplify

2025-03-04 Thread Ani Sinha
On Wed, Mar 5, 2025 at 3:53 AM Ani Sinha wrote: > > On Fri, Jan 31, 2025 at 3:24 PM Igor Mammedov wrote: > > > > On Tue, 28 Jan 2025 09:25:26 +0530 > > Ani Sinha wrote: > > > > > commit 0788a56bd1ae3 ("i386: Make unversioned CPU models be aliases") > > > introduced 'default_cpu_version' for PCMa

[PULL 42/59] hw/riscv/riscv-iommu: add riscv_iommu_hpm_incr_ctr()

2025-03-04 Thread Alistair Francis
From: Tomasz Jeznach This function will increment a specific counter, generating an interrupt when an overflow occurs. Some extra changes in riscv-iommu.c were required to add this new helper in riscv-iommu-hpm.c: - RISCVIOMMUContext was moved to riscv-iommu.h, making it visible in riscv-iom

[PATCH] trace/control-target: cleanup headers and make compilation unit common

2025-03-04 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- trace/control-target.c | 2 -- trace/meson.build | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/trace/control-target.c b/trace/control-target.c index d58e84f6dd8..57ceac21084 100644 --- a/trace/control-target.c +++ b/trace/control-

[PATCH 24/57] docs/qapi-domain: add warnings for malformed field lists

2025-03-04 Thread John Snow
Normally, Sphinx will silently fall back to its standard field list processing if it doesn't match one of your defined fields. A lot of the time, that's not what we want - we want to be warned if we goof something up. For instance, the canonical argument field list form is: :arg type name: descr

[PATCH 56/57] docs/qapidoc: add intermediate output debugger

2025-03-04 Thread John Snow
Add debugging output for the qapidoc transmogrifier - setting DEBUG=1 will produce .ir files (one for each qapidoc directive) that write the generated rst file to disk to allow for easy debugging and verification of the generated document. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 41

[PATCH 51/57] docs/qapidoc: add visit_entity()

2025-03-04 Thread John Snow
Finally, the core entry method for a qapi entity. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 21 + 1 file changed, 21 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 7308fa0a767..fb2ad7492ae 100644 --- a/docs/sphinx/qapidoc.py +++

RE: [PATCH v4 03/23] hw/intc/aspeed: Reduce regs array size by adding a register sub-region

2025-03-04 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v4 03/23] hw/intc/aspeed: Reduce regs array size by > adding a register sub-region > > On 3/3/25 10:54, Jamin Lin wrote: > > Currently, the size of the "regs" array is 0x2000, which is too large. > > So far, it only uses "GICINT128 to `GICINT134", and the offsets

[PATCH 36/57] do-not-merge

2025-03-04 Thread John Snow
Add strict typing to qapidoc.py for the remainder of this series. Signed-off-by: John Snow --- scripts/qapi-lint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi-lint.sh b/scripts/qapi-lint.sh index 0e3ff002b69..dd3e6eb84c5 100755 --- a/scripts/qapi-lint.sh +++

[PATCH 06/57] docs/qapi-domain: add QAPI domain object registry

2025-03-04 Thread John Snow
This is the first step towards QAPI domain cross-references and a QAPI reference index. This patch just creates the object registry and amends the qapi:module directive to use that registry. Update the merge_domaindata stub method now that we have actual data we may need to merge. This patch also

[PATCH 35/57] docs/qapidoc: Fix static typing on qapidoc.py

2025-03-04 Thread John Snow
Now that the legacy code is factored out, fix up the typing on the remaining code in qapidoc.py. Add a type ignore to qapi_legacy.py to prevent the errors there from bleeding out into qapidoc.py. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py| 40 ++-

[PATCH 01/57] do-not-merge

2025-03-04 Thread John Snow
Ad-hoc linting scripts to scrub down the new docs/sphinx files. Should work with a reasonably modern mypy/pylint/etc, and Sphinx 8.2.0. Older versions of Sphinx ought to still work at runtime, but may not type check correctly. Signed-off-by: John Snow --- scripts/qapi-lint.sh | 55 ++

[PATCH 20/57] docs/qapi-domain: add qapi:object directive

2025-03-04 Thread John Snow
Adds the .. qapi:object:: directive, object, and :qapi:obj:`name` cross-referencing role. This directive is meant to document both structs and unions. As per usual, QAPI cross-referencing for types in the member field list will be added in a forthcoming commit. Signed-off-by: John Snow --- docs

[PATCH 13/57] docs/qapi-domain: add "Arguments:" field lists

2025-03-04 Thread John Snow
This adds special rendering for Sphinx's typed field lists. This patch does not add any QAPI-aware markup, rendering, or cross-referencing for the type names, yet. That feature requires a subclass to TypedField which will happen in its own commit quite a bit later in this series; after all the bas

[PATCH 21/57] docs/qapi-domain: add :deprecated: directive option

2025-03-04 Thread John Snow
Although "deprecated" is a feature (and *will* appear in the features list), add a special :deprecated: option to generate an eye-catch that makes this information very hard to miss. (The intent is to modify qapidoc.py to add this option whenever it detects that the features list attached to a def

[PATCH 52/57] docs/qapidoc: implement transmogrify() method

2025-03-04 Thread John Snow
This is the true top-level processor for the new transmogrifier; responsible both for generating the intermediate rST and then running the nested parse on that generated document to produce the final docutils tree that is then - very finally - postprocessed by sphinx for final rendering to HTML &c.

[PATCH 40/57] docs/qapidoc: add visit_freeform() method

2025-03-04 Thread John Snow
Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 50 ++ 1 file changed, 50 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 6de8c900543..cf5dbb0133d 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/qapidoc.py @@ -2

[PATCH 49/57] docs/qapidoc: add visit_member() method

2025-03-04 Thread John Snow
This method is used for generating the "members" of a wide variety of things, including structs, unions, enums, alternates, etc. The field name it uses to do so is dependent on the type of entity the "member" belongs to. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 27 ++

[PATCH 53/57] docs: disambiguate cross-references

2025-03-04 Thread John Snow
The next patch will engage the qapidoc transmogrifier, which creates a lot of cross-reference targets. Some of the existing targets ("migration", "qom", "replay") will become ambiguous as a result. Nail them down more explicitly to prevent ambiguous cross-reference warnings. Signed-off-by: John Sn

[PATCH 44/57] docs/qapidoc: add format_type() method

2025-03-04 Thread John Snow
This method is responsible for generating a type name for a given member with the correct annotations for the QAPI domain. Features and enums do not *have* types, so they return None. Everything else returns the type name with a "?" suffix if that type is optional, and ensconced in [brackets] if it

[PATCH 42/57] docs/qapidoc: add visit_paragraph() method

2025-03-04 Thread John Snow
This transforms "formerly known as untagged sections" into our pure intermediate rST format. These sections are already pure rST, so this method doesn't do a whole lot except ensure appropriate newlines. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 9 + 1 file changed, 9 inserti

[PATCH 34/57] docs/qapidoc: split old implementation into qapidoc_legacy.py

2025-03-04 Thread John Snow
This is being done primarily to be able to type check and delint the new implementation without needing to worry about fixing up the old implementation. I'm adding the new implementation into the existing file instead of into a new file so that when the dust settles, qapidoc.py will contain the fu

[PATCH 33/57] docs/qapidoc: add transmogrifier stub

2025-03-04 Thread John Snow
This commit adds a stubbed option to the qapi-doc directive that opts-in to the new rST generator; the implementation of which will follow in subsequent commits. Once all QAPI documents have been converted, this option and the old qapidoc implementation can be dropped. Note that moving code outsi

[PATCH 48/57] docs/qapidoc: add visit_returns() method

2025-03-04 Thread John Snow
Generates :returns: fields for explicit returns statements. Note that this does not presently handle undocumented returns, which is handled in a later commit. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/docs/sphinx/qapi

[PATCH 45/57] docs/qapidoc: add add_field() and generate_field() helper methods

2025-03-04 Thread John Snow
These are simple rST generation methods that assist in getting the types and formatting correct for a field list entry. add_field() is a more raw, direct call while generate_field() is intended to be used for generating the correct field from a member object. Signed-off-by: John Snow --- docs/sp

[PATCH 05/57] docs/qapi-domain: add qapi:module directive

2025-03-04 Thread John Snow
This adds a qapi:module directive, which just notes the current module being documented and performs a nested parse of the content block, if present. This code is based pretty heavily on Sphinx's PyModule directive, but with unnecessary features excised. For example: .. qapi:module:: block-core

[PATCH 30/57] qapi/parser: adjust info location for doc body section

2025-03-04 Thread John Snow
Instead of using the info object for the doc block as a whole (which always points to the very first line of the block), update the info pointer for each call to ensure_untagged_section when the existing section is otherwise empty. This way, Sphinx error information will match precisely to where th

[PATCH 57/57] docs/qapidoc: Add "the members of" pointers

2025-03-04 Thread John Snow
Add "the members of ..." pointers to Members and Arguments lists where appropriate, with clickable cross-references - so it's a slight improvement over the old system :) This patch is meant to be a temporary solution until we can review and merge the inliner. The implementation of this patch is a

[PATCH 50/57] docs/qapidoc: add visit_sections() method

2025-03-04 Thread John Snow
Implement the actual main dispatch method that processes and handles the list of doc sections for a given QAPI entity. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 25 + 1 file changed, 25 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.p

[PATCH 37/57] docs/qapidoc: add transmogrifier class stub

2025-03-04 Thread John Snow
Add the beginnings of the Transmogrifier class by adding the rST conversion helpers that will be used to build the virtual rST document. This version of the class does not actually "do anything" yet; each individual feature is added one-at-a-time in the forthcoming commits. Signed-off-by: John Sn

[PATCH 41/57] docs/qapidoc: add preamble() method

2025-03-04 Thread John Snow
This method adds the options/preamble to each definition block. Notably, :since: and :ifcond: are added, as are any "special features" such as :deprecated: and :unstable:. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 41 ++--- 1 file changed, 38 inser

[PATCH 38/57] docs/qapidoc: add visit_module() method

2025-03-04 Thread John Snow
This method annotates the start of a new module, crediting the source location to the first line of the module file. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index c243bb6faaa.

[PATCH 43/57] docs/qapidoc: add visit_errors() method

2025-03-04 Thread John Snow
Notably, this method does not currently address the formatting issues present with the "errors" section in QAPIDoc and just vomits the text verbatim into the rST doc, with somewhat inconsistent results. To be addressed in a future revision. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py |

[PATCH 28/57] docs/qapi-domain: warn when QAPI domain xrefs fail to resolve

2025-03-04 Thread John Snow
This patch adds a warning (which is a build failure under our current build settings) whenever a QAPI cross-reference fails to resolve. This applies to any cross-references of the form :qapi:{role}:`foo`, which covers all of the automatically generated references by the qapi domain, and any such r

[PATCH 25/57] docs/qapi-domain: add type cross-refs to field lists

2025-03-04 Thread John Snow
This commit, finally, adds cross-referencing support to various field lists; modeled tightly after Sphinx's own Python domain code. Cross-referencing support is added to type names provided to :arg:, :memb:, :returns: and :choice:. :feat:, :error: and :value:, which do not take type names, do not

[PATCH 55/57] docs/qapidoc: process @foo into ``foo``

2025-03-04 Thread John Snow
Add support for the special QAPI doc syntax to process @references as ``preformatted text``. At the moment, there are no actual cross-references for individual members, so there is nothing to link against. For now, process it identically to how we did in the old qapidoc system. Signed-off-by: John

[PATCH 46/57] docs/qapidoc: add visit_feature() method

2025-03-04 Thread John Snow
This adds a simple ":feat name: lorem ipsum ..." line to the generated rST document, so at the moment it's only for "top level" features. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.

[PATCH 54/57] docs/qapidoc: add transmogrifier test document

2025-03-04 Thread John Snow
This is just a test document that demonstrates the new qapi-domain doc generator. Note that this test document uses a nesting depth of 2 for the TOC unlike the existing QMP's reference nesting depth of 3. It's arbitrary and can be changed to suit taste, it has nothing to do with the new domain itse

[PATCH 07/57] docs/qapi-domain: add QAPI index

2025-03-04 Thread John Snow
Use the QAPI object registry to generate a special index just for QAPI definitions. The index can show entries both by definition type and all together, alphabetically. The index can be linked from anywhere in the QEMU manual by using the reference `qapi-index`. Signed-off-by: John Snow --- doc

[PATCH 22/57] docs/qapi-domain: add :unstable: directive option

2025-03-04 Thread John Snow
Although "unstable" is a feature (and *will* appear in the features list), add a special :unstable: option to generate an eye-catch that makes this information very hard to miss. (The intent is to modify qapidoc.py to add this option whenever it detects that the features list attached to a definit

[PATCH 14/57] docs/qapi-domain: add "Features:" field lists

2025-03-04 Thread John Snow
Add support for Features field lists. There is no QAPI-specific functionality here, but this could be changed if desired (if we wanted the feature names to link somewhere, for instance.) This feature list doesn't have any restrictions, so it can be used to document object-wide features or per-memb

[PATCH 39/57] qapi/source: allow multi-line QAPISourceInfo advancing

2025-03-04 Thread John Snow
This is for the sake of the new rST generator (the "transmogrifier") so we can advance multiple lines on occasion while keeping the generated<-->source mappings accurate. next_line now simply takes an optional n parameter which chooses the number of lines to advance. RFC: Here's the exorbitant de

[PATCH 26/57] docs/qapi-domain: add CSS styling

2025-03-04 Thread John Snow
Improve the general look and feel of generated QAPI docs. Attempt to limit line lengths to offer a more comfortable measure on maximized windows, and improve some margin and spacing for field lists. Signed-off-by: Harmonie Snow Signed-off-by: John Snow --- docs/sphinx-static/theme_overrides.cs

  1   2   3   4   5   >