Re: [PATCH] hw/arm/aspeed: fix connect_serial_hds_to_uarts

2024-12-12 Thread Cédric Le Goater
Hello Kenneth, On 12/12/24 14:31, Kenneth Jia(贾纪东_华硕上海) wrote: From 24d3badbbb9dcc0d220609a7dd30f8da5002cba7 Mon Sep 17 00:00:00 2001 From: Kenneth Jia Date: Thu, 12 Dec 2024 20:42:04 +0800 Subject: [PATCH]    hw/arm/aspeed: fix connect_serial_hds_to_uarts    In the loop, we need ignore t

[PATCH 5/7] memory: Register the RamDiscardManager instance upon guest_memfd creation

2024-12-12 Thread Chenyi Qiang
Introduce the realize()/unrealize() callbacks to initialize/uninitialize the new guest_memfd_manager object and register/unregister it in the target MemoryRegion. Guest_memfd was initially set to shared until the commit bd3bcf6962 ("kvm/memory: Make memory type private by default if it has guest m

[RFC PATCH 7/7] memory: Add a new argument to indicate the request attribute in RamDismcardManager helpers

2024-12-12 Thread Chenyi Qiang
For each ram_discard_manager helper, add a new argument 'is_private' to indicate the request attribute. If is_private is true, the operation targets the private range in the section. For example, replay_populate(true) will replay the populate operation on private part in the MemoryRegionSection, wh

[PATCH 6/7] RAMBlock: make guest_memfd require coordinate discard

2024-12-12 Thread Chenyi Qiang
As guest_memfd is now managed by guest_memfd_manager with RamDiscardManager, only block uncoordinated discard. Signed-off-by: Chenyi Qiang --- system/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/physmem.c b/system/physmem.c index 532182a6dd..585090b063 100

[PATCH 3/7] guest_memfd: Introduce a callback to notify the shared/private state change

2024-12-12 Thread Chenyi Qiang
Introduce a new state_change() callback in GuestMemfdManagerClass to efficiently notify all registered RamDiscardListeners, including VFIO listeners about the memory conversion events in guest_memfd. The existing VFIO listener can dynamically DMA map/unmap the shared pages based on conversion types

[PATCH 4/7] KVM: Notify the state change event during shared/private conversion

2024-12-12 Thread Chenyi Qiang
Introduce a helper to trigger the state_change() callback of the class. Once exit to userspace to convert the page from private to shared or vice versa at runtime, notify the event via the helper so that other registered subsystems like VFIO can be notified. Signed-off-by: Chenyi Qiang --- accel

[PATCH 0/7] Enable shared device assignment

2024-12-12 Thread Chenyi Qiang
Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") effectively disables device assignment when using guest_memfd. This poses a significant challenge as guest_memfd is essential for confidential guests, thereby blocking device assignment to these VMs. The initial rational

[PATCH 1/7] memory: Export a helper to get intersection of a MemoryRegionSection with a given range

2024-12-12 Thread Chenyi Qiang
Rename the helper to memory_region_section_intersect_range() to make it more generic. Signed-off-by: Chenyi Qiang --- hw/virtio/virtio-mem.c | 32 +--- include/exec/memory.h | 13 + system/memory.c| 17 + 3 files changed, 35 insert

[PATCH 2/7] guest_memfd: Introduce an object to manage the guest-memfd with RamDiscardManager

2024-12-12 Thread Chenyi Qiang
As the commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") highlighted, some subsystems like VFIO might disable ram block discard. However, guest_memfd relies on the discard operation to perform page conversion between private and shared memory. This can lead to stale IOM

Re: [PATCH] kvm: consistently return 0/-errno from kvm_convert_memory

2024-12-12 Thread Xiaoyao Li
On 12/12/2024 11:57 PM, Paolo Bonzini wrote: In case of incorrect parameters, kvm_convert_memory() was returning -1 instead of -EINVAL. The guest won't notice because it will move anyway to RUN_STATE_INTERNAL_ERROR, but fix this for consistency and clarity. I think we need add more clarificati

Re: [PATCH 3/8] pci/msix: Implement PBA writes

2024-12-12 Thread Akihiko Odaki
On 2024/12/12 17:34, Nicholas Piggin wrote: Implement MMIO PBA writes, 1 to trigger and 0 to clear. This functionality is used by some qtests, which keep the msix irq masked and test irq pending via the PBA bits, for simplicity. Some tests expect to be able to clear the irq with a store, so a si

[PULL 4/5] target/hexagon: Use argparse in all python scripts

2024-12-12 Thread Brian Cain
From: Anton Johansson QOL commit, all the various gen_* python scripts take a large set arguments where order is implicit. Using argparse we also get decent error messages if a field is missing or too many are added. Signed-off-by: Anton Johansson Reviewed-by: Brian Cain Signed-off-by: Brian

[PULL 5/5] target/hexagon: Make HVX vector args. restrict *

2024-12-12 Thread Brian Cain
From: Anton Johansson Adds restrict qualifier to HVX pointer arguments. This will allow the compiler to produce better optimized code, as input vectors are now assumed not to alias, and no runtime aliasing checks will be required. Signed-off-by: Anton Johansson Reviewed-by: Brian Cain Signed-o

[PULL 2/5] target/hexagon: rename HEX_EXCP_*=>HEX_CAUSE_*

2024-12-12 Thread Brian Cain
From: Brian Cain The values previously used for "HEX_EXCP_*" were the cause code definitions and not the event numbers. So in this commit, we update the names to reflect the cause codes. In HEX_EVENT_TRAP0's case, we add a new "HEX_EVENT_*" with the correct event number. Reviewed-by: Taylor Sim

[PULL 3/5] target/hexagon: add enums for event, cause

2024-12-12 Thread Brian Cain
From: Brian Cain Reviewed-by: Taylor Simpson Signed-off-by: Brian Cain --- target/hexagon/cpu_bits.h | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/target/hexagon/cpu_bits.h b/target/hexagon/cpu_bits.h index 2e60c0fafe..ff596e2a94 100644 --- a/targe

[PULL 0/5] hex queue

2024-12-12 Thread Brian Cain
The following changes since commit a5ba0a7e4e150d1350a041f0d0ef9ca6c8d7c307: Merge tag 'pull-aspeed-20241211' of https://github.com/legoater/qemu into staging (2024-12-11 15:16:47 +) are available in the Git repository at: https://github.com/quic/qemu tags/pull-hex-20241212

[PULL 1/5] Hexagon (target/hexagon) Remove HEX_DEBUG/HEX_DEBUG_LOG

2024-12-12 Thread Brian Cain
From: Taylor Simpson All Hexagon debugging is now done with QEMU mechanisms (e.g., -d in_asm) or with a connected debugger (lldb). Signed-off-by: Taylor Simpson Reviewed-by: Matheus Tavares Bernardino Reviewed-by: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/README | 9 ---

Re: [PATCH v6 00/20] intel_iommu: Enable stage-1 translation for emulated device

2024-12-12 Thread Jason Wang
On Thu, Dec 12, 2024 at 5:50 PM CLEMENT MATHIEU--DRIF wrote: > > Hi, > > Thanks for the new version, changes are ok for me! > > @Michael @LiuYi, @Jason, do you think we are ready to move forward? > I think so. (I've acked the series) Thanks

Re: [PATCH v6 18/20] intel_iommu: Introduce a property x-flts for stage-1 translation

2024-12-12 Thread Jason Wang
On Thu, Dec 12, 2024 at 4:42 PM Zhenzhong Duan wrote: > > Intel VT-d 3.0 introduces scalable mode, and it has a bunch of capabilities > related to scalable mode translation, thus there are multiple combinations. > > This vIOMMU implementation wants to simplify it with a new property "x-flts". > Wh

Re: [PATCH v6 17/20] tests/acpi: q35: Update host address width in DMAR

2024-12-12 Thread Jason Wang
On Thu, Dec 12, 2024 at 4:42 PM Zhenzhong Duan wrote: > > Differences: > > @@ -1,39 +1,39 @@ > /* > * Intel ACPI Component Architecture > * AML/ASL+ Disassembler version 20200925 (64-bit version) > * Copyright (c) 2000 - 2020 Intel Corporation > * > - * Disassembly of tests/data/acpi/x86/

Re: 0001-target-loongarch-fix-vldi-inst.patch

2024-12-12 Thread lixianglai
Hi hongyu: Thank you very much for submitting patch for loongarch, but can you submit patch according to qemu code contribution specification? You can refer to this document: https://www.qemu.org/docs/master/devel/submitting-a-patch.html It should also be pointed out that you need to use the git

RE: [RFC.PATCH v1 0/2] sd:sdhci Fix data transfer did not complete

2024-12-12 Thread Jamin Lin
Hi all, > Subject: [RFC.PATCH v1 0/2] sd:sdhci Fix data transfer did not complete > > v1: > 1. Fix boundary_count overflow > 2. Fix data transfer did not complete if data size is bigger then SDMA Buffer > Boundary > > Jamin Lin (2): > RFC:sd:sdhci: Fix boundary_count overflow in > sdhci_sd

[PATCH v2 1/2] hw/sd/sdhci: Fix boundary_count overflow in sdhci_sdma_transfer_multi_blocks

2024-12-12 Thread Jamin Lin via
How to reproduce it: 1. The value of "s->blksie" was 0x7200. The bits[14:12] was "111", so the buffer boundary was 0x8.(512Kbytes). This SDMA buffer boundary was the same as u-boot default value. The bit[11:0] was "0010", so the block size was 0x200.(512bytes) 2. The SDMA addre

[PATCH v2 2/2] hw/sd/sdhci: Fix data transfer did not complete if data size is bigger than SDMA Buffer Boundary

2024-12-12 Thread Jamin Lin via
According to the design of sdhci_sdma_transfer_multi_blocks, if the "s->blkcnt * 512" was bigger than the SDMA Buffer boundary, it break the while loop of data transfer and set SDHC_NISEN_DMA in the normal interrupt status to notify the firmware that this SDMA boundary buffer Transfer Complete and

[PATCH v2 0/2] sd:sdhci Fix data transfer did not complete

2024-12-12 Thread Jamin Lin via
v1: 1. Fix boundary_count overflow 2. Fix data transfer did not complete if data size is bigger then SDMA Buffer Boundary v2: 1. fix typo 2. update to none RFC patch 3. check the most upper byte of SDMA System Address Register (0x00) is written, then restarts SDMA data transfer. Jamin Lin (2)

Re: [QEMU PATCH v10] xen/passthrough: use gsi to map pirq when dom0 is PVH

2024-12-12 Thread Chen, Jiqian
On 2024/12/12 23:38, Anthony PERARD wrote: > On Tue, Dec 10, 2024 at 07:17:30AM +, Chen, Jiqian wrote: >> On 2024/11/19 00:05, Anthony PERARD wrote: >>> On Wed, Nov 06, 2024 at 02:14:18PM +0800, Jiqian Chen wrote: In PVH dom0, when passthrough a device to domU, QEMU code xen_pt_realiz

[PATCH 04/23] qapi: expand tags to all doc sections

2024-12-12 Thread John Snow
This patch adds an explicit section tag to all QAPIDoc sections. Members/Features are now explicitly tagged as such, with the name now being stored in a dedicated "name" field (which qapidoc.py was not actually using anyway.) WIP: Yeah, the difference between "tagged" and "untagged" sections is no

[PATCH 20/23] docs/qapidoc: add visit_sections() method

2024-12-12 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 | 23 +++ 1 file changed, 23 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py

[PATCH 11/23] docs/qapidoc: add preamble() method

2024-12-12 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 | 33 - 1 file changed, 32 insertions(+)

[PATCH 02/23] qapi/parser: adjust info location for doc body section

2024-12-12 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 15/23] docs/qapidoc: add add_field() and generate_field() helper methods

2024-12-12 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 19/23] docs/qapidoc: add visit_member() method

2024-12-12 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 23/23] docs/qapidoc: add transmogrifier test document

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- docs/index.rst | 1 + docs/qapi/index.rst | 53 + 2 files changed, 54 insertions(+) create mode 100644 docs/qapi/index.rst diff --git a/docs/index.rst b/docs/index.rst index 0b9ee9901d9..11c18c598a8 100644 --- a/docs

[PATCH 16/23] docs/qapidoc: add visit_feature() method

2024-12-12 Thread John Snow
The format_type() method is adjusted here to return None for features, because Features don't have documented types. This makes generate_field() safe to use for features. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/sphinx/

[PATCH 05/23] qapi/schema: add __repr__ to QAPIDoc.Section

2024-12-12 Thread John Snow
Makes debugging far more pleasant when you can just print(section) and get something reasonable to display. Signed-off-by: John Snow --- scripts/qapi/parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index fd841725527..3c88f9c7d38 10

[PATCH 12/23] docs/qapidoc: add visit_paragraph() method

2024-12-12 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 17/23] docs/qapidoc: record current documented entity in transmogrifier

2024-12-12 Thread John Snow
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! That part come

[PATCH 13/23] docs/qapidoc: add visit_errors() method

2024-12-12 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 00/23] docs: add basic sphinx-domain rST generator to qapidoc

2024-12-12 Thread John Snow
based-on: https://patchew.org/QEMU/20241213011307.2942030-1-js...@redhat.com/ Hi! This series is a very, very barebones implementation for the new QAPI doc generator. It does not have many features that I presented on at KVM Forum; the point of this patch set is instead to present a stripped down

[PATCH 09/23] qapi/source: allow multi-line QAPISourceInfo advancing

2024-12-12 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 d

[PATCH 21/23] docs/qapidoc: add visit_entity()

2024-12-12 Thread John Snow
Finally, the core entry method for a qapi entity. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index eda6aa0897b..9d3fcaa6559 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/s

[PATCH 03/23] docs/qapidoc: remove example section support

2024-12-12 Thread John Snow
Since 3c5f6114 we no longer actually generate Example sections, so this support in qapidoc is now dead code. Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 5a4d7

[PATCH 18/23] docs/qapidoc: add visit_returns() method

2024-12-12 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 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/sphinx/qapid

[PATCH 22/23] docs/qapidoc: implement transmogrify() method

2024-12-12 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 14/23] docs/qapidoc: add format_type() method

2024-12-12 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 06/23] docs/qapidoc: add transmogrifier stub

2024-12-12 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 10/23] docs/qapidoc: add visit_freeform() method

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- docs/sphinx/qapidoc.py | 47 ++ 1 file changed, 47 insertions(+) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 7d2f7bfb415..6f8f69077b1 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/qapidoc.py @@ -1

[PATCH 08/23] docs/qapidoc: add visit_module() method

2024-12-12 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 dee97e6f984.

[PATCH 07/23] docs/qapidoc: add transmogrifier class stub

2024-12-12 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 01/23] docs/qapidoc: support header-less freeform sections

2024-12-12 Thread John Snow
The code as written can't handle if a header isn't found, because `node` will be uninitialized. If we don't have a section title, create a generic block to insert text into instead. This patch removes a lingering pylint warning in the QAPIDoc implementation that prevents getting a clean baseline t

Re: [PATCH] kvm: consistently return 0/-errno from kvm_convert_memory

2024-12-12 Thread Zhao Liu
On Thu, Dec 12, 2024 at 04:57:19PM +0100, Paolo Bonzini wrote: > Date: Thu, 12 Dec 2024 16:57:19 +0100 > From: Paolo Bonzini > Subject: [PATCH] kvm: consistently return 0/-errno from kvm_convert_memory > X-Mailer: git-send-email 2.47.1 > > In case of incorrect parameters, kvm_convert_memory() was

Re: [PATCH] i386/kvm: Set return value after handling KVM_EXIT_HYPERCALL

2024-12-12 Thread Binbin Wu
On 12/13/2024 9:46 AM, Binbin Wu wrote: On 12/13/2024 5:28 AM, Paolo Bonzini wrote: On 12/12/24 20:13, Sean Christopherson wrote: On Thu, Dec 12, 2024, Paolo Bonzini wrote: On 12/12/24 09:07, Zhao Liu wrote: On Thu, Dec 12, 2024 at 11:26:28AM +0800, Binbin Wu wrote: Date: Thu, 12 Dec

Re: [PATCH] i386/kvm: Set return value after handling KVM_EXIT_HYPERCALL

2024-12-12 Thread Binbin Wu
On 12/13/2024 9:46 AM, Binbin Wu wrote: On 12/13/2024 5:28 AM, Paolo Bonzini wrote: On 12/12/24 20:13, Sean Christopherson wrote: On Thu, Dec 12, 2024, Paolo Bonzini wrote: On 12/12/24 09:07, Zhao Liu wrote: On Thu, Dec 12, 2024 at 11:26:28AM +0800, Binbin Wu wrote: Date: Thu, 12 Dec

Re: [PATCH] i386/kvm: Set return value after handling KVM_EXIT_HYPERCALL

2024-12-12 Thread Binbin Wu
On 12/13/2024 5:28 AM, Paolo Bonzini wrote: On 12/12/24 20:13, Sean Christopherson wrote: On Thu, Dec 12, 2024, Paolo Bonzini wrote: On 12/12/24 09:07, Zhao Liu wrote: On Thu, Dec 12, 2024 at 11:26:28AM +0800, Binbin Wu wrote: Date: Thu, 12 Dec 2024 11:26:28 +0800 From: Binbin Wu Subject

Re: [PULL 00/49] rust, QOM, kvm changes for 2024-12-11

2024-12-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: [PULL 00/72] target-arm queue

2024-12-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: [PULL 0/4] tcg patch queue

2024-12-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: [PULL 00/26] First s390x and functional testing patches for v10.0

2024-12-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: [PULL 00/22] QTest patches for 2024-12-12

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

[RFC PATCH v2 02/35] pylint touchups

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/pylintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index c028a1f9f51..c8f8cd22e92 100644 --- a/scripts/qapi/pylintrc +++ b/scripts/qapi/pylintrc @@ -15,6 +15,7 @@ disable=consider-using-f-string,

[RFC PATCH v2 14/35] docs/qapi-domain: add "Features:" field lists

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

[RFC PATCH v2 10/35] docs/qapi-domain: add compatibility node classes

2024-12-12 Thread John Snow
Sphinx prior to v4.0 uses different classes for rendering elements of documentation objects; add some compatibility classes to use the right node classes conditionally. Signed-off-by: John Snow --- docs/sphinx/compat.py | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff

[RFC PATCH v2 30/35] docs/qapi-domain: implement error context reporting fix

2024-12-12 Thread John Snow
Sphinx 5.3.0 to Sphinx 6.2.0 has a bug where nested content in an ObjectDescription content block has its error position reported incorrectly due to an oversight when they added nested section support to this directive. (This bug is present in Sphinx's own Python and C domains; test it yourself by

[RFC PATCH v2 28/35] docs/qapi-domain: add CSS styling

2024-12-12 Thread John Snow
From: Harmonie 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-sta

[RFC PATCH v2 35/35] WIP: 3.x css theming for missing xref

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- docs/sphinx-static/theme_overrides.css | 6 ++ 1 file changed, 6 insertions(+) diff --git a/docs/sphinx-static/theme_overrides.css b/docs/sphinx-static/theme_overrides.css index 2ba98d23bbd..0cab9bd8eb9 100644 --- a/docs/sphinx-static/theme_overrides.css +++ b/d

[RFC PATCH v2 29/35] docs/qapi-domain: warn when QAPI domain xrefs fail to resolve

2024-12-12 Thread John Snow
Ignore the built-in JSON doc types, but warn about anything else. This is primarily here to assert that the cross-referencing system is complete and accurate, and that any cross-references the transmogrifier generates are correctly marked as visible and rendered/indexed by the qapi-domain. Signed-

[RFC PATCH v2 08/35] docs/qapi-domain: add resolve_any_xref()

2024-12-12 Thread John Snow
Add the ability to resolve cross-references using the `any` cross-reference syntax. Adding QAPI-specific cross-reference roles will be added in a forthcoming commit, and will share the same find_obj() helper. (There's less code needed for the generic cross-reference resolver, so it comes first in

[RFC PATCH v2 31/35] docs/qapi-domain: collapsible branches

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- docs/conf.py | 1 + docs/sphinx-static/theme_overrides.css | 10 ++ docs/sphinx/collapse.py| 200 + docs/sphinx/qapi-domain.py | 157 +++ 4 files changed, 341 insertions(+

[RFC PATCH v2 06/35] docs/qapi-domain: add QAPI domain object registry

2024-12-12 Thread John Snow
This is the first step towards QAPI domain cross-references and a QAPI reference index. For now, just create the object registry and amend the qapi:module directive to use that registry. Update the merge_domaindata method now that we have actual data we may need to merge. Signed-off-by: John Snow

[RFC PATCH v2 33/35] WIP: 3.x ParserFix

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- docs/sphinx/compat.py | 33 + docs/sphinx/qapi-domain.py | 32 +++- 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/docs/sphinx/compat.py b/docs/sphinx/compat.py index 657c05a81a4..5126b

[RFC PATCH v2 34/35] WIP: 3.x ObjectDesc compat

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- docs/sphinx/compat.py | 7 +++ docs/sphinx/qapi-domain.py | 9 +++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/sphinx/compat.py b/docs/sphinx/compat.py index 5126b450a5f..b2d2d1be403 100644 --- a/docs/sphinx/compat.py +++ b/docs

[RFC PATCH v2 01/35] do-not-merge

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi-lint.sh | 55 1 file changed, 55 insertions(+) create mode 100755 scripts/qapi-lint.sh diff --git a/scripts/qapi-lint.sh b/scripts/qapi-lint.sh new file mode 100755 index 000..5a8c798001e --- /dev/nul

[RFC PATCH v2 19/35] docs/qapi-domain: add qapi:alternate directive

2024-12-12 Thread John Snow
Add the .. qapi:alternate:: directive, object, and qapi:alt:`name` cross-reference role. Add the "Choices:" field list for describing alternate choices. Like other field lists that reference QAPI types, a forthcoming commit will add cross-referencing support to this field. RFC: In the future, it

[RFC PATCH v2 11/35] docs/qapi-domain: add qapi:command directive

2024-12-12 Thread John Snow
This commit adds a generic QAPIObject class for use in documenting various QAPI entities in the Sphinx ecosystem. It also adds a stubbed version of QAPICommand that utilizes the QAPIObject class; along with the qapi:command directive, the :qapi:cmd: cross-reference role, and the "command" object t

[RFC PATCH v2 23/35] docs/qapi-domain: add :deprecated: directive option

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

[RFC PATCH v2 32/35] WIP: 3.x - XREF

2024-12-12 Thread John Snow
Signed-off-by: John Snow --- docs/sphinx/compat.py | 114 +++- docs/sphinx/qapi-domain.py | 207 - 2 files changed, 179 insertions(+), 142 deletions(-) diff --git a/docs/sphinx/compat.py b/docs/sphinx/compat.py index 28cb39161fe..657c05a81

[RFC PATCH v2 21/35] docs/qapi-domain: add qapi:struct directive

2024-12-12 Thread John Snow
Adds the .. qapi:struct:: directive, object, and :qapi:struct:`name` cross-referencing role. 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/sphinx/qapi-domain.py | 9 + 1 file changed, 9 in

[RFC PATCH v2 27/35] docs/qapi-domain: add type cross-refs to field lists

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

[RFC PATCH v2 16/35] docs/qapi-domain: add "Returns:" field lists

2024-12-12 Thread John Snow
Add "Returns:" field list syntax to QAPI Commands. Like "Arguments:" and "Errors:", the type name isn't currently processed for cross-referencing, but this will be addressed in a forthcoming commit. This patch adds "errors" as a GroupedField, which means that multiple return values can be annotat

[RFC PATCH v2 17/35] docs/qapi-domain: add returns-nodesc

2024-12-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. Signed-off-by: John Snow --- docs/sphinx/qapi-domain.py | 8 1 file changed

[RFC PATCH v2 07/35] docs/qapi-domain: add QAPI index

2024-12-12 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 alphabetically. The index can be linked from anywhere in the QEMU manual by using `qapi-index`. Signed-off-by: John Snow --- docs/sphinx/qapi-domain.py | 74

[RFC PATCH v2 12/35] docs/qapi-domain: add :since: directive option

2024-12-12 Thread John Snow
Add a little special markup for registering "Since:" information. Adding it as an option instead of generic content lets us hoist the information into the Signature bar, optionally put it in the index, etc. Signed-off-by: John Snow --- docs/sphinx/qapi-domain.py | 29 +++-

[RFC PATCH v2 05/35] docs/qapi-domain: add qapi:module directive

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

[RFC PATCH v2 13/35] docs/qapi-domain: add "Arguments:" field lists

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

[RFC PATCH v2 26/35] docs/qapi-domain: add warnings for malformed field lists

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

[RFC PATCH v2 25/35] docs/qapi-domain: add :ifcond: directive option

2024-12-12 Thread John Snow
Add a special :ifcond: option that allows us to annotate the definition-level conditionals. RFC: This patch renders IFCOND information in two places, because I'm undecided about how to style this information. One option is in the signature bar, and another option is in an eye-catch, like :deprecat

[RFC PATCH v2 20/35] docs/qapi-domain: add qapi:event directive

2024-12-12 Thread John Snow
Adds the .. qapi:event:: directive, object, and :qapi:event:`name` cross-referencing role. Adds the :memb type name: field list syntax for documenting event data members. As this syntax and phrasing will be shared with Structs and Unions as well, add the field list definition to a shared abstract

[RFC PATCH v2 22/35] docs/qapi-domain: add qapi:union and qapi:branch directives

2024-12-12 Thread John Snow
Adds the .. qapi:union:: directive, object, and :qapi:union:`name` cross-referencing role. In order to support discriminated branches of unions, a new qapi:branch directive is created whose only purpose is to create a dynamically named field list section based on the name of the branch key and val

[RFC PATCH v2 24/35] docs/qapi-domain: add :unstable: directive option

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

[RFC PATCH v2 15/35] docs/qapi-domain: add "Errors:" field lists

2024-12-12 Thread John Snow
``:error: descr`` can now be used to document error conditions, naming the type of error object and a description of when the error is surfaced. Like the previous Arguments patch, this patch does not apply any special QAPI syntax highlighting or cross-referencing for the types, but this can be adj

[RFC PATCH v2 18/35] docs/qapi-domain: add qapi:enum directive

2024-12-12 Thread John Snow
Add the .. qapi:enum:: directive, object, and :qapi:enum:`name` cross-reference role. Add the :value name: field list for documenting Enum values. Of note, also introduce a new "type" role that is intended to be used by other QAPI object directives to cross-reference arbitrary QAPI type names, bu

[RFC PATCH v2 04/35] docs/sphinx: add compat.py module and nested_parse helper

2024-12-12 Thread John Snow
Create a compat module that handles sphinx cross-version compatibility issues. For the inaugural function, add a nested_parse() helper that handles differences in line number tracking for nested directive body parsing. Spoilers: there are more cross-version hacks to come throughout the series. Si

[RFC PATCH v2 00/35] Add qapi-domain Sphinx extension

2024-12-12 Thread John Snow
This series is still a work in progress, but I am sending it to the list to serve as a pre-requisite for another series that we need to review next instead. Please just ignore this one for now! Thanks! Harmonie Snow (1): docs/qapi-domain: add CSS styling John Snow (34): do-not-merge pylint

[RFC PATCH v2 03/35] docs/sphinx: create QAPI domain extension stub

2024-12-12 Thread John Snow
It doesn't really do anything yet, we'll get to it brick-by-brick in the forthcoming commits to keep the series breezy and the git history informative. Signed-off-by: John Snow --- docs/conf.py | 9 ++- docs/sphinx/qapi-domain.py | 52 ++ 2

[RFC PATCH v2 09/35] docs/qapi-domain: add QAPI xref roles

2024-12-12 Thread John Snow
Add domain-specific cross-reference syntax. As of this commit, that means new :qapi:mod:`block-core` and :qapi:obj:`block-core` referencing syntax. :mod: will only find modules, but :obj: will find anything registered to the QAPI domain. (In forthcoming commits, this means commands, events, enums,

Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2024-12-12 Thread Nathan Chen
>with an error message indicating DMA mapping failed for the passthrough >devices. A correction - the message indicates UEFI failed to find a mapping for the boot partition ("map: no mapping found"), not that DMA mapping failed. But earlier EDK debug logs still show PCI host bridge resource

Re: [RFC PATCH 4/5] hw/arm/virt-acpi-build: Build IORT with multiple SMMU nodes

2024-12-12 Thread Nicolin Chen
On Wed, Dec 11, 2024 at 03:21:37PM +, Shameerali Kolothum Thodi wrote: > > Once a device reaches to the pci_device_set_iommu_device() call, > > it should be attached to an IDENTIY/bypass proxy s1_hwpt, so the > > smmu_find_add_as() will return the iommu as. > > Agree. The above situation you e

[PATCH] tests/qtest/sse-timer-test: Add watchdog reset to sse-timer test

2024-12-12 Thread Nabih Estefan
Recent CDMSK Watchdog changes (eff9dc5660fad3a610171c56a5ec3fada245e519) updated the CDMSK APB Watchdog to not free run out of reset. That led to this test failing since it never triggers the watchdog to start running. No watchdog running means that the timer and counter in the test cannot start, l

Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2024-12-12 Thread Nathan Chen
Hi Shameer, Could you share the branch/version of the boot firmware file "QEMU_EFI.fd" from your example, and where you retrieved it from? I've been encountering PCI host bridge resource conflicts whenever assigning more than one passthrough device to a multi-vSMMU VM, booting with the boot f

Re: [PATCH v3 08/24] migration: Add thread pool of optional load threads

2024-12-12 Thread Maciej S. Szmigiero
On 12.12.2024 17:55, Peter Xu wrote: On Wed, Dec 11, 2024 at 12:05:03AM +0100, Maciej S. Szmigiero wrote: On 4.12.2024 23:43, Peter Xu wrote: On Thu, Nov 28, 2024 at 01:11:53PM +0100, Maciej S. Szmigiero wrote: +static int qemu_loadvm_load_thread(void *thread_opaque) +{ +    struct LoadThreadD

  1   2   3   4   5   >