Skip to contentSkip to conversation

target-arm queue

GIT PULL Applied Peter Maydell 2 participants 24 messages Jan 23

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

Hi; here's a target-arm pullreq. Most of the patches in it are actually docs and similar tidyups, though...

thanks
-- PMM

The following changes since commit 2339d0a1cfac6ecc667e6e062a593865c1541c35:

Merge tag 'hw-misc-20260120' of https://github.com/philmd/qemu into staging (2026-01-21 07:39:57 +1100)

are available in the Git repository at:

https://gitlab.com/pm215/qemu.git tags/pull-target-arm-20260123

for you to fetch changes up to 62580edc02ae16ba520d220f6fd7556999504a84:

qemu-options.hx: Improve formatting in colo-compare docs (2026-01-23 14:08:57 +0000)

----------------------------------------------------------------
target-arm queue:
* hw/arm/imx8mp-evk: Provide some defaults matching real hardware
* hw/intc: endianness fixes
* various: Clean up includes
* kernel-doc.py: sync with upstream Kernel v6.19-rc4
* scripts/clean-includes: Minor improvements; exclude list update
* docs/system/arm/imx8mp-evk: Avoid suggesting redundant CLI parameters
* docs/system/arm/xlnx-zynq.rst: Improve docs rendering
* docs: Be consistent about capitalization of 'Arm' (again)
* docs: Avoid unintended mailto: hyperlinks
* qemu-options.hx: Drop uses of @var
* qemu-options.hx: Improve formatting in colo-compare docs

----------------------------------------------------------------
Alex Bennée (4):
hw/intc: declare NVIC regions as little endian hw/intc: declare GIC regions as little endian hw/intc: declare GICv3 regions as little endian hw/intc: avoid byte swap fiddling in gicv3 its path

Bernhard Beschow (2):
hw/arm/imx8mp-evk: Provide some defaults matching real hardware docs/system/arm/imx8mp-evk: Avoid suggesting redundant CLI parameters

Mauro Carvalho Chehab (1):
kernel-doc.py: sync with upstream Kernel v6.19-rc4

Peter Maydell (15):
docs: Be consistent about capitalization of 'Arm' (again) scripts/clean-includes: Allow directories on command line scripts/clean-includes: Remove outdated comment scripts/clean-includes: Make ignore-regexes one per line scripts/clean-includes: Do all our exclusions with REGEXFILE scripts/clean-includes: Give the args in git commit messages scripts/clean-includes: Update exclude list
mshv: Clean up includes
bsd-user: Clean up includes
misc: Clean up includes
all: Clean up includes docs/system/arm/xlnx-zynq.rst: Improve docs rendering
docs: avoid unintended mailto: hyperlinks qemu-options.hx: Drop uses of @var qemu-options.hx: Improve formatting in colo-compare docs

 accel/mshv/irq.c                      |   3 +-
 accel/mshv/mshv-all.c                 |   1 -
 bsd-user/bsd-mem.h                    |   3 -
 bsd-user/bsd-proc.c                   |   1 -
 bsd-user/freebsd/os-proc.h            |   2 -
 bsd-user/qemu-bsd.h                   |   1 -
 docs/devel/submitting-a-patch.rst     |   2 +-
 docs/devel/testing/qgraph.rst         |   8 +-
 docs/devel/vfio-iommufd.rst           |   2 +-
 docs/specs/fsi.rst                    |   2 +-
 docs/system/arm/aspeed.rst            |   6 +-
 docs/system/arm/b-l475e-iot01a.rst    |   2 +-
 docs/system/arm/imx8mp-evk.rst        |   4 +-
 docs/system/arm/nrf.rst               |   4 +-
 docs/system/arm/stm32.rst             |  12 +-
 docs/system/arm/xlnx-versal-virt.rst  |  16 +-
 docs/system/arm/xlnx-zynq.rst         |  51 +-
 docs/system/device-url-syntax.rst.inc |   4 +-
 docs/system/guest-loader.rst          |   2 +-
 docs/system/replay.rst                |   2 +-
 docs/system/vnc-security.rst          |   6 +-
 hw/arm/imx8mp-evk.c                   |   2 +
 hw/core/machine-qmp-cmds.c            |   1 -
 hw/intc/arm_gic.c                     |  12 +-
 hw/intc/arm_gicv3.c                   |   4 +-
 hw/intc/arm_gicv3_its.c               |   4 +-
 hw/intc/arm_gicv3_its_common.c        |   4 +-
 hw/intc/arm_gicv3_its_kvm.c           |   2 +-
 hw/intc/armv7m_nvic.c                 |   2 +-
 hw/scsi/lasi_ncr710.h                 |   1 -
 hw/scsi/ncr53c710.h                   |   1 -
 include/hw/core/loader.h              |   1 -
 include/hw/i386/tdvf.h                |   1 -
 include/hw/ppc/spapr_fadump.h         |   1 -
 include/hw/riscv/iommu.h              |   1 -
 include/system/accel-irq.h            |   1 -
 include/system/mshv.h                 |   1 -
 linux-user/alpha/target_proc.h        |   1 -
 qemu-options.hx                       |  51 +-
 qga/commands-windows-ssh.h            |   1 -
 qga/vss-win32/vss-debug.h             |   1 -
 scripts/clean-includes                | 103 ++--
 scripts/lib/kdoc/kdoc_files.py        |  11 +-
 scripts/lib/kdoc/kdoc_item.py         |   3 +-
 scripts/lib/kdoc/kdoc_output.py       |  93 +++-
 scripts/lib/kdoc/kdoc_parser.py       | 901 +++++++++++++++++-----------------
 scripts/lib/kdoc/kdoc_re.py           |  24 +-
 semihosting/arm-compat-semi-stub.c    |   1 -
 target/arm/cpu32-stubs.c              |   1 -
 target/i386/kvm/kvm.c                 |   1 -
 target/i386/kvm/vmsr_energy.h         |   2 -
 target/i386/mshv/mshv-cpu.c           |   1 -
 target/i386/mshv/x86.c                |   1 -
 target/loongarch/csr.c                |   1 -
 target/riscv/csr.c                    |   1 -
 tools/i386/qemu-vmsr-helper.c         |   1 -
 util/cpuinfo-aarch64.c                |   1 -
 57 files changed, 738 insertions(+), 635 deletions(-)
#1 lore raw

[PULL 04/22] docs: Be consistent about capitalization of 'Arm' (again)

The company 'Arm' went through a rebranding many years back involving a recapitalization from 'ARM' to 'Arm'. As a result our documentation is a bit inconsistent between the two forms. It's not worth trying to update everywhere in QEMU, but it's easy enough to make docs/ consistent.

We last did this in commit 6fe6d6c9a in 2020, but a few new uses of the wrong capitalization have crept back in since.

As before, "ARMv8" and similar architecture names, and older CPU names like "ARM926" still retain all-caps.

In a few places we make minor grammar fixups as we touch the sentences we're fixing.

Message-id: [email protected]

---
 docs/devel/testing/qgraph.rst        |  8 ++++----
 docs/devel/vfio-iommufd.rst          |  2 +-
 docs/specs/fsi.rst                   |  2 +-
 docs/system/arm/aspeed.rst           |  6 +++---
 docs/system/arm/b-l475e-iot01a.rst   |  2 +-
 docs/system/arm/nrf.rst              |  4 ++--
 docs/system/arm/stm32.rst            | 12 ++++++------
 docs/system/arm/xlnx-versal-virt.rst | 16 ++++++++--------
 docs/system/guest-loader.rst         |  2 +-
 docs/system/replay.rst               |  2 +-
 10 files changed, 28 insertions(+), 28 deletions(-)
docs/devel/testing/qgraph.rst +4 -4
index 43342d9d65..ca63d1ea98 100644
@@ -8,7 +8,7 @@ take care of booting QEMU with the right machine and devices.
 This makes each test "hardcoded" for a specific configuration, reducing
 the possible coverage that it can reach.
 
-For example, the sdhci device is supported on both x86_64 and ARM boards,
+For example, the sdhci device is supported on both x86_64 and Arm boards,
 therefore a generic sdhci test should test all machines and drivers that
 support that device.
 Using only libqos APIs, the test has to manually take care of
@@ -195,7 +195,7 @@ there.
 The ``arm/raspi2b`` machine node is listed as "UNAVAILABLE". Although it is
 reachable from the root via '' -> 'arm/raspi2b' the node is unavailable because
 the QEMU binary did not list it when queried by the framework. This is expected
-because we used the ``qemu-system-x86_64`` binary which does not support ARM
+because we used the ``qemu-system-x86_64`` binary which does not support Arm
 machine types.
 
 If a test is unexpectedly listed as "UNAVAILABLE", first check that the "ALL
@@ -214,9 +214,9 @@ Here we continue the ``sdhci`` use case, with the following scenario:
 
 - ``sdhci-test`` aims to test the ``read[q,w], writeq`` functions
   offered by the ``sdhci`` drivers.
-- The current ``sdhci`` device is supported by both ``x86_64/pc`` and ``ARM``
+- The current ``sdhci`` device is supported by both ``x86_64/pc`` and Arm
   (in this example we focus on the ``arm-raspi2b``) machines.
-- QEMU offers 2 types of drivers: ``QSDHCI_MemoryMapped`` for ``ARM`` and
+- QEMU offers 2 types of drivers: ``QSDHCI_MemoryMapped`` for Arm and
   ``QSDHCI_PCI`` for ``x86_64/pc``. Both implement the
   ``read[q,w], writeq`` functions.
 
docs/devel/vfio-iommufd.rst +1 -1
index 6928b47643..78bcdffac7 100644
@@ -122,7 +122,7 @@ container:
 Supported platform
 ==================
 
-Supports x86, ARM and s390x currently.
+Supports x86, Arm and s390x currently.
 
 Caveats
 =======
docs/specs/fsi.rst +1 -1
index af87822531..f7d86d3e37 100644
@@ -40,7 +40,7 @@ for the implementation are: (see the `FSI specification`_ for more details)
    MMIO-mapping of the CFAM address straight onto a sub-region of the OPB
    address space.
 
-5. An APB-to-OPB bridge enabling access to the OPB from the ARM core in the
+5. An APB-to-OPB bridge enabling access to the OPB from the Arm core in the
    AST2600. Hardware limitations prevent the OPB from being directly mapped
    into APB, so all accesses are indirect through the bridge.
 
docs/system/arm/aspeed.rst +3 -3
index 4fa1739cb5..97e14b7d33 100644
@@ -5,7 +5,7 @@ The QEMU Aspeed machines model BMCs of various OpenPOWER systems and
 Aspeed evaluation boards. They are based on different releases of the
 Aspeed SoC : the AST2400 integrating an ARM926EJ-S CPU (400MHz), the
 AST2500 with an ARM1176JZS CPU (800MHz), the AST2600
-with dual cores ARM Cortex-A7 CPUs (1.2GHz).
+with dual cores Arm Cortex-A7 CPUs (1.2GHz).
 
 The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C,
 etc.
@@ -279,7 +279,7 @@ Aspeed 2700 family boards (``ast2700-evb``, ``ast2700fc``)
 
 The QEMU Aspeed machines model BMCs of Aspeed evaluation boards.
 They are based on different releases of the Aspeed SoC :
-the AST2700 with quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz).
+the AST2700 with quad cores Arm Cortex-A35 64 bits CPUs (1.6GHz).
 
 The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C,
 etc.
@@ -453,7 +453,7 @@ Aspeed MiniBMC and Platform Root of Trust processor family boards (``ast1030-evb
 
 The QEMU Aspeed machines model mini BMCs and Platform Root of Trust processors of various Aspeed
 evaluation boards. They are based on different releases of the Aspeed SoC : the AST1030 (MiniBMC)
-and AST1060 (Platform Root of Trust Processor), both integrating an ARM Cortex M4F CPU (200MHz).
+and AST1060 (Platform Root of Trust Processor), both integrating an Arm Cortex M4F CPU (200MHz).
 
 The SoC comes with SRAM, SPI, I2C, etc.
 
docs/system/arm/b-l475e-iot01a.rst +1 -1
index 2adcc4b4c1..31a40e3b3b 100644
@@ -2,7 +2,7 @@ B-L475E-IOT01A IoT Node (``b-l475e-iot01a``)
 ============================================
 
 The B-L475E-IOT01A IoT Node uses the STM32L475VG SoC which is based on
-ARM Cortex-M4F core. It is part of STMicroelectronics
+an Arm Cortex-M4F core. It is part of STMicroelectronics
 :doc:`STM32 boards </system/arm/stm32>` and more specifically the STM32L4
 ultra-low power series. The STM32L4x5 chip runs at up to 80 MHz and
 integrates 128 KiB of SRAM and up to 1MiB of Flash. The B-L475E-IOT01A board
docs/system/arm/nrf.rst +2 -2
index eda87bd760..e0ea6a8b7e 100644
@@ -1,7 +1,7 @@
 Nordic nRF boards (``microbit``)
 ================================
 
-The `Nordic nRF`_ chips are a family of ARM-based System-on-Chip that
+The `Nordic nRF`_ chips are a family of Arm-based System-on-Chip that
 are designed to be used for low-power and short-range wireless solutions.
 
 .. _Nordic nRF: https://www.nordicsemi.com/Products
@@ -18,7 +18,7 @@ supported by QEMU.
 Supported devices
 -----------------
 
- * ARM Cortex-M0 (ARMv6-M)
+ * Arm Cortex-M0 (ARMv6-M)
  * Serial ports (UART)
  * Clock controller
  * Timers
docs/system/arm/stm32.rst +6 -6
index 511e3eb9ac..23b03f9029 100644
@@ -1,24 +1,24 @@
 STMicroelectronics STM32 boards (``netduino2``, ``netduinoplus2``, ``olimex-stm32-h405``, ``stm32vldiscovery``)
 ===============================================================================================================
 
-The `STM32`_ chips are a family of 32-bit ARM-based microcontroller by
+The `STM32`_ chips are a family of 32-bit Arm-based microcontrollers by
 STMicroelectronics.
 
 .. _STM32: https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html
 
-The STM32F1 series is based on ARM Cortex-M3 core. The following machines are
+The STM32F1 series is based on an Arm Cortex-M3 core. The following machines are
 based on this chip :
 
 - ``stm32vldiscovery``  STM32VLDISCOVERY board with STM32F100RBT6 microcontroller
 
-The STM32F2 series is based on ARM Cortex-M3 core. The following machines are
+The STM32F2 series is based on an Arm Cortex-M3 core. The following machines are
 based on this chip :
 
 - ``netduino2``         Netduino 2 board with STM32F205RFT6 microcontroller
 
-The STM32F4 series is based on ARM Cortex-M4F core, as well as the STM32L4
+The STM32F4 series is based on an Arm Cortex-M4F core, as well as the STM32L4
 ultra-low-power series. The STM32F4 series is pin-to-pin compatible with STM32F2 series.
-The following machines are based on this ARM Cortex-M4F chip :
+The following machines are based on this Arm Cortex-M4F chip :
 
 - ``netduinoplus2``     Netduino Plus 2 board with STM32F405RGT6 microcontroller
 - ``olimex-stm32-h405`` Olimex STM32 H405 board with STM32F405RGT6 microcontroller
@@ -29,7 +29,7 @@ There are many other STM32 series that are currently not supported by QEMU.
 Supported devices
 -----------------
 
- * ARM Cortex-M3, Cortex M4F
+ * Arm Cortex-M3, Cortex-M4F
  * Analog to Digital Converter (ADC)
  * EXTI interrupt
  * Serial ports (USART)
docs/system/arm/xlnx-versal-virt.rst +8 -8
index 640cc07f80..8d31369f71 100644
@@ -27,12 +27,12 @@ Versal
 """"""
 Implemented CPU cores:
 
-- 2 ACPUs (ARM Cortex-A72) with their GICv3 and ITS
-- 2 RCPUs (ARM Cortex-R5F) with their GICv2
+- 2 ACPUs (Arm Cortex-A72) with their GICv3 and ITS
+- 2 RCPUs (Arm Cortex-R5F) with their GICv2
 
 Implemented devices:
 
-- 2 UARTs (ARM PL011)
+- 2 UARTs (Arm PL011)
 - An RTC (Versal built-in)
 - 2 GEMs (Cadence MACB Ethernet MACs)
 - 8 ADMA (Xilinx zDMA) channels
@@ -51,12 +51,12 @@ Versal Gen 2
 """"""""""""
 Implemented CPU cores:
 
-- 8 ACPUs (ARM Cortex-A78AE) with their GICv3 and ITS
-- 10 RCPUs (ARM Cortex-R52) with their GICv3 (one per cluster)
+- 8 ACPUs (Arm Cortex-A78AE) with their GICv3 and ITS
+- 10 RCPUs (Arm Cortex-R52) with their GICv3 (one per cluster)
 
 Implemented devices:
 
-- 2 UARTs (ARM PL011)
+- 2 UARTs (Arm PL011)
 - An RTC (Versal built-in)
 - 3 GEMs (Cadence MACB Ethernet MACs)
 - 8 ADMA (Xilinx zDMA) channels
@@ -134,7 +134,7 @@ Direct Linux boot of PetaLinux 2019.2:
       -device virtio-rng-device,bus=virtio-mmio-bus.0,rng=rng0 \
       -object rng-random,filename=/dev/urandom,id=rng0
 
-Boot PetaLinux 2019.2 via ARM Trusted Firmware (2018.3 because the 2019.2
+Boot PetaLinux 2019.2 via Arm Trusted Firmware (2018.3 because the 2019.2
 version of ATF tries to configure the CCI which we don't model) and U-boot:
 
 .. code-block:: bash
@@ -188,7 +188,7 @@ Run the following at the U-Boot prompt:
   fdt set /chosen/dom0 reg <0x00000000 0x40000000 0x0 0x03100000>
   booti 30000000 - 20000000
 
-Boot Linux as Dom0 on Xen via ARM Trusted Firmware and U-Boot:
+Boot Linux as Dom0 on Xen via Arm Trusted Firmware and U-Boot:
 
 .. code-block:: bash
 
docs/system/guest-loader.rst +1 -1
index 304ee5d531..12436cc791 100644
@@ -32,7 +32,7 @@ size. Additional information can be passed with by using additional
 arguments.
 
 Currently the only supported machines which use FDT data to boot are
-the ARM and RiscV ``virt`` machines.
+the Arm and RiscV ``virt`` machines.
 
 Arguments
 ^^^^^^^^^
docs/system/replay.rst +1 -1
index 28e5772a2b..fd78bd1f73 100644
@@ -23,7 +23,7 @@ Deterministic replay has the following features:
    the memory, state of the hardware devices, clocks, and screen of the VM.
  * Writes execution log into the file for later replaying for multiple times
    on different machines.
- * Supports i386, x86_64, ARM, AArch64, Risc-V, MIPS, MIPS64, S390X, Alpha,
+ * Supports i386, x86_64, Arm, AArch64, Risc-V, MIPS, MIPS64, S390X, Alpha,
    PowerPC, PowerPC64, M68000, Microblaze, OpenRISC, SPARC,
    and Xtensa hardware platforms.
  * Performs deterministic replay of all operations with keyboard and mouse
Signature · 1 line
2.47.3
#2 lore raw

[PULL 01/22] hw/arm/imx8mp-evk: Provide some defaults matching real hardware

In reply to Peter Maydell

From: Bernhard Beschow <[email protected]>

Having four CPUs and 6 GiB of RAM matches real hardware. Fix the machine defaults to make its use more ergonomic and less error-prone.

Message-id: [email protected]

---
 docs/system/arm/imx8mp-evk.rst | 2 +-
 hw/arm/imx8mp-evk.c            | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
docs/system/arm/imx8mp-evk.rst +1 -1
index 75c8fbd366..79600cf39a 100644
@@ -54,7 +54,7 @@ Now that everything is prepared the machine can be started as follows:
 
 .. code-block:: bash
 
-  $ qemu-system-aarch64 -M imx8mp-evk -smp 4 -m 3G \
+  $ qemu-system-aarch64 -M imx8mp-evk \
       -display none -serial null -serial stdio \
       -kernel Image \
       -dtb imx8mp-evk.dtb \
hw/arm/imx8mp-evk.c +2 -0
index 0af5aad583..b84ac91a17 100644
@@ -117,8 +117,10 @@ static void imx8mp_evk_machine_init(MachineClass *mc)
 {
     mc->desc = "NXP i.MX 8M Plus EVK Board";
     mc->init = imx8mp_evk_init;
+    mc->default_cpus = 4;
     mc->max_cpus = FSL_IMX8MP_NUM_CPUS;
     mc->default_ram_id = "imx8mp-evk.ram";
+    mc->default_ram_size = 6 * GiB;
     mc->get_default_cpu_type = imx8mp_evk_get_default_cpu_type;
 }
 
Signature · 1 line
2.47.3
#3 lore raw

[PULL 06/22] scripts/clean-includes: Remove outdated comment

In reply to Peter Maydell

Remove an old comment suggesting a manual shell line to use to find files to run the script on. The script's exclude-list and its support for directory names make this irrelevant.

Message-id: [email protected]

---
 scripts/clean-includes | 9 ---------
 1 file changed, 9 deletions(-)
scripts/clean-includes +0 -9
index 07c0fd44e4..568033ee9c 100755
@@ -39,15 +39,6 @@
 # removed.
 # Other files (including C++ and ObjectiveC) can't be handled by this script.
 
-# The following one-liner may be handy for finding files to run this on.
-# However some caution is required regarding files that might be part
-# of the guest agent or standalone tests.
-
-# for i in $(git ls-tree --name-only HEAD) ; do test -f $i && \
-#   grep -E '^# *include' $i | head -1 | grep 'osdep.h' ; test $? != 0 && \
-#   echo $i ; done
-
-
 GIT=no
 DUPHEAD=no
 
Signature · 1 line
2.47.3
#4 lore raw

[PULL 15/22] hw/intc: declare NVIC regions as little endian

In reply to Peter Maydell

From: Alex Bennée <[email protected]>

The NVIC should always be a little-endian device as big-endian behaviour is a function of the current CPU configuration not the system as a whole. Indeed the Armv8-M architecture reference manual declares:

All accesses to the Private Peripheral Bus (PPB) are always little-endian, which means that the PE assumes a little-endian arrangement of the PPB registers.

This should have no functional effect as the NVIC cannot be instantiated on a BE system but will help the single binary efforts.

Message-id: [email protected]

---
 hw/intc/armv7m_nvic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/armv7m_nvic.c +1 -1
index 3a31eb56f3..28b34e9944 100644
@@ -2467,7 +2467,7 @@ static MemTxResult nvic_sysreg_write(void *opaque, hwaddr addr,
 static const MemoryRegionOps nvic_sysreg_ops = {
     .read_with_attrs = nvic_sysreg_read,
     .write_with_attrs = nvic_sysreg_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static int nvic_post_load(void *opaque, int version_id)
Signature · 1 line
2.47.3
#5 lore raw

[PULL 07/22] scripts/clean-includes: Make ignore-regexes one per line

In reply to Peter Maydell

Currently we have a single extended regular expression defining files that clean-includes should ignore. This is now very long and awkward to read and edit.

Switch to having a list of newline-separated EREs that we write to a file for grep's -f option, so we can express them more legibly in the shell script. We allow for comments in the regex list, which lets us document why we have put the exclusions in.

Message-id: [email protected]

---
 scripts/clean-includes | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)
scripts/clean-includes +22 -6
index 568033ee9c..5ab3b07196 100755
@@ -42,8 +42,6 @@
 GIT=no
 DUPHEAD=no
 
-# Extended regular expression defining files to ignore when using --all
-XDIRREGEX='^(tests/tcg|tests/multiboot|tests/fp|tests/plugin|tests/uefi-test-tools|pc-bios|subprojects|contrib/plugins|tools/ebpf|ebpf/rss.bpf.skeleton.h|linux-user/(mips64|x86_64)/(cpu_loop|signal).c)'
 
 while true
 do
@@ -83,15 +81,33 @@ if [ "$1" = "--all" ]; then
     set -- '.'
 fi
 
-# We assume there are no files in the tree with spaces in their name
-set -- $(git ls-files "$@" | grep '\.[ch]$' | grep -E -v "$XDIRREGEX")
-
 # Annoyingly coccinelle won't read a scriptfile unless its
 # name ends '.cocci', so write it out to a tempfile with the
 # right kind of name.
 COCCIFILE="$(mktemp --suffix=.cocci)"
+REGEXFILE="$(mktemp --suffix=.regex)"
+
+trap 'rm -f -- "$COCCIFILE" "$REGEXFILE"' INT TERM HUP EXIT
+
+# List of extended regular expressions defining files to ignore
+# Comments starting with '#' are permitted
+grep -v '^#' >"$REGEXFILE" <<EOT
+# These tests are generally standalone binaries
+^tests/(tcg|multiboot|fp|plugin|uefi-test-tools)
+# BIOS sources and third-party subprojects don't follow our rules
+^pc-bios
+^subprojects
+# plugin binaries are standalone
+^contrib/plugins
+# the ebpf tool is standalone, and the skeleton header is autogenerated
+^tools/ebpf
+^ebpf/rss.bpf.skeleton.h
+# These files just include some other .c file and have no content themselves
+^linux-user/(mips64|x86_64)/(cpu_loop|signal).c
+EOT
 
-trap 'rm -f -- "$COCCIFILE"' INT TERM HUP EXIT
+# We assume there are no files in the tree with spaces in their name
+set -- $(git ls-files "$@" | grep '\.[ch]$' | grep -E -v -f "$REGEXFILE")
 
 cat >"$COCCIFILE" <<EOT
 @@
Signature · 1 line
2.47.3
#6 lore raw

[PULL 09/22] scripts/clean-includes: Give the args in git commit messages

In reply to Peter Maydell

If clean-includes is creating a git commit for its changes, currently it says only "created with scripts/clean-includes". Add the command line arguments the user passed us, as useful extra information.

Message-id: [email protected]

---
 scripts/clean-includes | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
scripts/clean-includes +22 -1
index a45421d2ff..064e532037 100755
@@ -42,6 +42,26 @@
 GIT=no
 DUPHEAD=no
 
+# Save the original arguments in case we want to put them in
+# a git commit message, quoted for the shell so that we handle
+# args with spaces/metacharacters correctly.
+# The quote_sh() function is the same one we use in configure.
+
+quote_sh() {
+    printf "%s" "$1" | sed "s,','\\\\'',g; s,.*,'&',"
+}
+
+quote_args() {
+    while [ $# -gt 0 ]; do
+        printf "%s" "$(quote_sh "$1")"
+        shift
+        if [ $# -gt 0 ]; then
+            printf " "
+        fi
+    done
+}
+
+QUOTEDARGS="$(quote_args "$@")"
 
 while true
 do
@@ -198,7 +218,8 @@ if [ "$GIT" = "yes" ]; then
     git commit --signoff -F - <<EOF
 $GITSUBJ: Clean up includes
 
-This commit was created with scripts/clean-includes.
+This commit was created with scripts/clean-includes:
+ ./scripts/clean-includes $QUOTEDARGS
 
 All .c should include qemu/osdep.h first.  The script performs three
 related cleanups:
Signature · 1 line
2.47.3
#7 lore raw

[PULL 14/22] all: Clean up includes

In reply to Peter Maydell

This commit was created with scripts/clean-includes:
./scripts/clean-includes '--git' 'all' '--all'

and manually edited to remove one change to hw/virtio/cbor-helpers.c. All these changes are header files that include osdep.h or some system header that osdep.h pulls in; they don't need to do this.

All .c should include qemu/osdep.h first. The script performs three related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too.

Message-id: [email protected]

---
 hw/scsi/lasi_ncr710.h          | 1 -
 hw/scsi/ncr53c710.h            | 1 -
 include/hw/core/loader.h       | 1 -
 include/hw/i386/tdvf.h         | 1 -
 include/hw/ppc/spapr_fadump.h  | 1 -
 include/hw/riscv/iommu.h       | 1 -
 include/system/accel-irq.h     | 1 -
 linux-user/alpha/target_proc.h | 1 -
 qga/commands-windows-ssh.h     | 1 -
 qga/vss-win32/vss-debug.h      | 1 -
 target/i386/kvm/vmsr_energy.h  | 2 --
 11 files changed, 12 deletions(-)
hw/scsi/lasi_ncr710.h +0 -1
index 99be001fc3..450fb7e1c3 100644
@@ -15,7 +15,6 @@
 #define HW_LASI_NCR710_H
 
 #include "hw/core/sysbus.h"
-#include "qemu/osdep.h"
 #include "exec/memattrs.h"
 #include "hw/scsi/scsi.h"
 #include "hw/scsi/ncr53c710.h"
hw/scsi/ncr53c710.h +0 -1
index a8dc92f4ef..00b6a01577 100644
@@ -15,7 +15,6 @@
 #ifndef HW_NCR53C710_H
 #define HW_NCR53C710_H
 
-#include "qemu/osdep.h"
 #include "hw/core/sysbus.h"
 #include "hw/scsi/scsi.h"
 #include "qemu/fifo8.h"
include/hw/core/loader.h +0 -1
index dd22cbb5e8..d9431e8a8d 100644
@@ -1,7 +1,6 @@
 #ifndef LOADER_H
 #define LOADER_H
 #include "hw/nvram/fw_cfg.h"
-#include "qemu/typedefs.h"
 
 /* loader.c */
 /**
include/hw/i386/tdvf.h +0 -1
index e75c8d1acc..4d7362ad65 100644
@@ -9,7 +9,6 @@
 #ifndef HW_I386_TDVF_H
 #define HW_I386_TDVF_H
 
-#include "qemu/osdep.h"
 
 #define TDVF_SECTION_TYPE_BFV               0
 #define TDVF_SECTION_TYPE_CFV               1
include/hw/ppc/spapr_fadump.h +0 -1
index fde2830e94..82681fb9a6 100644
@@ -6,7 +6,6 @@
 #ifndef PPC_SPAPR_FADUMP_H
 #define PPC_SPAPR_FADUMP_H
 
-#include "qemu/osdep.h"
 #include "cpu.h"
 
 /* Fadump commands */
include/hw/riscv/iommu.h +0 -1
index 25f1a8b159..999384fc89 100644
@@ -19,7 +19,6 @@
 #ifndef HW_RISCV_IOMMU_H
 #define HW_RISCV_IOMMU_H
 
-#include "qemu/osdep.h"
 #include "qom/object.h"
 
 #define TYPE_RISCV_IOMMU "riscv-iommu"
include/system/accel-irq.h +0 -1
index 671fb7dfdb..a2caa06f54 100644
@@ -12,7 +12,6 @@
 #ifndef SYSTEM_ACCEL_IRQ_H
 #define SYSTEM_ACCEL_IRQ_H
 #include "hw/pci/msi.h"
-#include "qemu/osdep.h"
 #include "system/kvm.h"
 #include "system/mshv.h"
 
linux-user/alpha/target_proc.h +0 -1
index 6b491ffa3a..71949d380d 100644
@@ -6,7 +6,6 @@
 #ifndef ALPHA_TARGET_PROC_H
 #define ALPHA_TARGET_PROC_H
 
-#include "qemu/osdep.h"
 #include "target/alpha/cpu.h"
 
 static uint8_t alpha_phys_addr_space_bits(CPUAlphaState *env)
qga/commands-windows-ssh.h +0 -1
index 40ac67c4d9..c35d945a89 100644
@@ -11,7 +11,6 @@
  */
 
 #include <glib/gstrfuncs.h>
-#include <stdbool.h>
 typedef struct WindowsUserInfo {
     char *sshDirectory;
     char *authorizedKeyFile;
qga/vss-win32/vss-debug.h +0 -1
index 7800457392..506cee6698 100644
@@ -10,7 +10,6 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include "qemu/osdep.h"
 #include <vss-handles.h>
 
 #ifndef VSS_DEBUG_H
target/i386/kvm/vmsr_energy.h +0 -2
index 151bcbd642..415d64f51c 100644
@@ -14,8 +14,6 @@
 #ifndef VMSR_ENERGY_H
 #define VMSR_ENERGY_H
 
-#include <stdint.h>
-#include "qemu/osdep.h"
 #include "io/channel-socket.h"
 #include "hw/i386/topology.h"
 
Signature · 1 line
2.47.3
#8 lore raw

[PULL 16/22] hw/intc: declare GIC regions as little endian

In reply to Peter Maydell

From: Alex Bennée <[email protected]>

The GIC should always be a little-endian device as big-endian behaviour is a function of the current CPU configuration not the system as a whole. This should have no functional effect as the GIC cannot be instantiated on a BE system but will help the single binary efforts.

Message-id: [email protected]

---
 hw/intc/arm_gic.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
hw/intc/arm_gic.c +6 -6
index 4d0cb125a6..4d4b79e6f3 100644
@@ -2062,38 +2062,38 @@ static const MemoryRegionOps gic_ops[2] = {
     {
         .read_with_attrs = gic_dist_read,
         .write_with_attrs = gic_dist_write,
-        .endianness = DEVICE_NATIVE_ENDIAN,
+        .endianness = DEVICE_LITTLE_ENDIAN,
     },
     {
         .read_with_attrs = gic_thiscpu_read,
         .write_with_attrs = gic_thiscpu_write,
-        .endianness = DEVICE_NATIVE_ENDIAN,
+        .endianness = DEVICE_LITTLE_ENDIAN,
     }
 };
 
 static const MemoryRegionOps gic_cpu_ops = {
     .read_with_attrs = gic_do_cpu_read,
     .write_with_attrs = gic_do_cpu_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static const MemoryRegionOps gic_virt_ops[2] = {
     {
         .read_with_attrs = gic_thiscpu_hyp_read,
         .write_with_attrs = gic_thiscpu_hyp_write,
-        .endianness = DEVICE_NATIVE_ENDIAN,
+        .endianness = DEVICE_LITTLE_ENDIAN,
     },
     {
         .read_with_attrs = gic_thisvcpu_read,
         .write_with_attrs = gic_thisvcpu_write,
-        .endianness = DEVICE_NATIVE_ENDIAN,
+        .endianness = DEVICE_LITTLE_ENDIAN,
     }
 };
 
 static const MemoryRegionOps gic_viface_ops = {
     .read_with_attrs = gic_do_hyp_read,
     .write_with_attrs = gic_do_hyp_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static void arm_gic_realize(DeviceState *dev, Error **errp)
Signature · 1 line
2.47.3
#9 lore raw

[PULL 02/22] docs/system/arm/imx8mp-evk: Avoid suggesting redundant CLI parameters

In reply to Peter Maydell

From: Bernhard Beschow <[email protected]>

Commit 094fd7d36f2a ("hw/arm/imx8mp-evk: Add KVM support") introduced KVM support for the imx8mp-evk machine. KVM only works with the "host" CPU type such that it has been made the default CPU type for KVM. No need to repeat that on the command line.

Fixes 094fd7d36f2a ("hw/arm/imx8mp-evk: Add KVM support")

Message-id: [email protected]

---
 docs/system/arm/imx8mp-evk.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/system/arm/imx8mp-evk.rst +1 -1
index 79600cf39a..e60a422824 100644
@@ -66,7 +66,7 @@ KVM Acceleration
 ----------------
 
 To enable hardware-assisted acceleration via KVM, append
-``-accel kvm -cpu host`` to the command line. While this speeds up performance
+``-accel kvm`` to the command line. While this speeds up performance
 significantly, be aware of the following limitations:
 
 * The ``imx8mp-evk`` machine is not included under the "virtualization use case"
Signature · 1 line
2.47.3
#10 lore raw

[PULL 05/22] scripts/clean-includes: Allow directories on command line

In reply to Peter Maydell

Currently clean-includes supports two ways of specifying files to check:
* --all to run on everything
* specific files
There's no way to say "check everything in target/arm".

Add support for handling directory names, by always running the arguments through git ls-files.

Message-id: [email protected]

---
 scripts/clean-includes | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
scripts/clean-includes +8 -4
index 25dbf16c02..07c0fd44e4 100755
@@ -14,7 +14,7 @@
 # the top-level directory.
 
 # Usage:
-#   clean-includes [--git subjectprefix] [--check-dup-head] file ...
+#   clean-includes [--git subjectprefix] [--check-dup-head] file-or-dir ...
 # or
 #   clean-includes [--git subjectprefix] [--check-dup-head] --all
 #
@@ -28,7 +28,8 @@
 #
 # Using --all will cause clean-includes to run on the whole source
 # tree (excluding certain directories which are known not to need
-# handling).
+# handling). This is equivalent to passing '.' as the directory to
+# scan.
 
 # This script requires Coccinelle to be installed.
 
@@ -86,11 +87,14 @@ if [ $# -eq 0 ]; then
     exit 1
 fi
 
+# --all means "scan everything starting from the current directory"
 if [ "$1" = "--all" ]; then
-    # We assume there are no files in the tree with spaces in their name
-    set -- $(git ls-files '*.[ch]' | grep -E -v "$XDIRREGEX")
+    set -- '.'
 fi
 
+# We assume there are no files in the tree with spaces in their name
+set -- $(git ls-files "$@" | grep '\.[ch]$' | grep -E -v "$XDIRREGEX")
+
 # Annoyingly coccinelle won't read a scriptfile unless its
 # name ends '.cocci', so write it out to a tempfile with the
 # right kind of name.
Signature · 1 line
2.47.3
#11 lore raw

[PULL 08/22] scripts/clean-includes: Do all our exclusions with REGEXFILE

In reply to Peter Maydell

We currently have two mechanisms for excluding files:
* the REGEXFILE which excludes by regex
* special cases in the "loop over each file" which make us skip the file

Roll all the "skip this" cases into REGEXFILE, so we use a single mechanism for identifying which files to exclude.

Message-id: [email protected]

---
 scripts/clean-includes | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)
scripts/clean-includes +9 -15
index 5ab3b07196..a45421d2ff 100755
@@ -104,6 +104,15 @@ grep -v '^#' >"$REGEXFILE" <<EOT
 ^ebpf/rss.bpf.skeleton.h
 # These files just include some other .c file and have no content themselves
 ^linux-user/(mips64|x86_64)/(cpu_loop|signal).c
+# These are autogenerated headers
+^include/standard-headers/
+# osdep.h itself and its friends are expected to include system headers
+^include/qemu/osdep.h
+^include/qemu/compiler.h
+^include/glib-compat.h
+^include/system/os-(posix|win32).h
+# This is for use by plugins, which are standalone binaries
+^include/qemu/qemu-plugin.h
 EOT
 
 # We assume there are no files in the tree with spaces in their name
@@ -137,21 +146,6 @@ for f in "$@"; do
     *.c)
       MODE=c
       ;;
-    *include/qemu/osdep.h | \
-    *include/qemu/compiler.h | \
-    *include/qemu/qemu-plugin.h | \
-    *include/glib-compat.h | \
-    *include/system/os-posix.h | \
-    *include/system/os-win32.h | \
-    *include/standard-headers/ )
-      # Removing include lines from osdep.h itself would be counterproductive.
-      echo "SKIPPING $f (special case header)"
-      continue
-      ;;
-    *include/standard-headers/*)
-      echo "SKIPPING $f (autogenerated header)"
-      continue
-      ;;
     *.h)
       MODE=h
       ;;
Signature · 1 line
2.47.3
#12 lore raw

[PULL 19/22] docs/system/arm/xlnx-zynq.rst: Improve docs rendering

In reply to Peter Maydell

Make some minor improvements to the rendering of the docs for the xlnx-zynq-a9 board:

* use a proper hyperlink rather than a bare URL for the link to the reference manual
* drop the hex address of the SMC SRAM: the bare '@' is rendered as bogus mailto: hyperlink, and the information is not very interesting to the user anyway
* expand out the abbreviations in the list of Cortex-A9 per-CPU devices
* correct the bullet-point list markup so it doesn't render with odd highlighted lines
* capitalize 'Arm' correctly

Message-id: [email protected]

---
 docs/system/arm/xlnx-zynq.rst | 51 ++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 24 deletions(-)
docs/system/arm/xlnx-zynq.rst +27 -24
index ade18a3fe1..aa37df2926 100644
@@ -4,32 +4,35 @@ The Zynq 7000 family is based on the AMD SoC architecture. These products
 integrate a feature-rich dual or single-core Arm Cortex-A9 MPCore based
 processing system (PS) and AMD programmable logic (PL) in a single device.
 
-More details here:
-https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Zynq-7000-SoC-Technical-Reference-Manual
-
-QEMU xilinx-zynq-a9 board supports following devices:
-    - A9 MPCORE
-        - cortex-a9
-        - GIC v1
-        - Generic timer
-        - wdt
-    - OCM 256KB
-    - SMC SRAM@0xe2000000 64MB
-    - Zynq SLCR
-    - SPI x2
-    - QSPI
-    - UART
-    - TTC x2
-    - Gigabit Ethernet Controller x2
-    - SD Controller x2
-    - XADC
-    - Arm PrimeCell DMA Controller
-    - DDR Memory
-    - USB 2.0 x2
+The SoC is documented in the
+`Zynq 7000 Technical Reference manual <https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Zynq-7000-SoC-Technical-Reference-Manual>`__.
+
+The QEMU xilinx-zynq-a9 board supports the following devices:
+
+- Arm Cortex-A9 MPCore CPU
+
+  - Cortex-A9 CPUs
+  - GIC v1 interrupt controller
+  - Generic timer
+  - Watchdog timer
+
+- OCM 256KB
+- SMC SRAM 64MB
+- Zynq SLCR
+- SPI x2
+- QSPI
+- UART
+- TTC x2
+- Gigabit Ethernet Controller x2
+- SD Controller x2
+- XADC
+- Arm PrimeCell DMA Controller
+- DDR Memory
+- USB 2.0 x2
 
 Running
 """""""
-Direct Linux boot of a generic ARM upstream Linux kernel:
+Direct Linux boot of a generic Arm upstream Linux kernel:
 
 .. code-block:: bash
 
@@ -44,4 +47,4 @@ For configuring the boot-mode provide the following on the command line:
 
    -machine boot-mode=qspi
 
-Supported values are jtag, sd, qspi, nor.
+Supported values are ``jtag``, ``sd``, ``qspi`` and ``nor``.
Signature · 1 line
2.47.3
#13 lore raw

[PULL 18/22] hw/intc: avoid byte swap fiddling in gicv3 its path

In reply to Peter Maydell

From: Alex Bennée <[email protected]>

This allows us to keep the MSI data in plain host order all the way from the MemoryRegionOps write method to the final KVM_SIGNAL_MSI ioctl. This fixes a theoretical bug on big-endian hosts because we were using different size byte swaps which would have truncated the data.

Message-id: [email protected]

---
 hw/intc/arm_gicv3_its_common.c | 2 +-
 hw/intc/arm_gicv3_its_kvm.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/intc/arm_gicv3_its_common.c +1 -1
index 9fc51ad1e0..60a5abd8d3 100644
@@ -81,7 +81,7 @@ static MemTxResult gicv3_its_trans_write(void *opaque, hwaddr offset,
     if (offset == 0x0040 && ((size == 2) || (size == 4))) {
         GICv3ITSState *s = ARM_GICV3_ITS_COMMON(opaque);
         GICv3ITSCommonClass *c = ARM_GICV3_ITS_COMMON_GET_CLASS(s);
-        int ret = c->send_msi(s, le64_to_cpu(value), attrs.requester_id);
+        int ret = c->send_msi(s, value, attrs.requester_id);
 
         if (ret <= 0) {
             qemu_log_mask(LOG_GUEST_ERROR,
hw/intc/arm_gicv3_its_kvm.c +1 -1
index ae12d41eee..a8d6d4fb54 100644
@@ -58,7 +58,7 @@ static int kvm_its_send_msi(GICv3ITSState *s, uint32_t value, uint16_t devid)
 
     msi.address_lo = extract64(s->gits_translater_gpa, 0, 32);
     msi.address_hi = extract64(s->gits_translater_gpa, 32, 32);
-    msi.data = le32_to_cpu(value);
+    msi.data = value;
     msi.flags = KVM_MSI_VALID_DEVID;
     msi.devid = devid;
     memset(msi.pad, 0, sizeof(msi.pad));
Signature · 1 line
2.47.3
#14 lore raw

[PULL 11/22] mshv: Clean up includes

In reply to Peter Maydell

This commit was created with scripts/clean-includes:
./scripts/clean-includes '--git' 'mshv' 'accel/mshv' 'target/i386/mshv' 'include/system/mshv.h'

All .c should include qemu/osdep.h first. The script performs three related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too.

Message-id: [email protected]

---
 accel/mshv/irq.c            | 3 +--
 accel/mshv/mshv-all.c       | 1 -
 include/system/mshv.h       | 1 -
 target/i386/mshv/mshv-cpu.c | 1 -
 target/i386/mshv/x86.c      | 1 -
 5 files changed, 1 insertion(+), 6 deletions(-)
accel/mshv/irq.c +1 -2
index adf8f337d9..3c238c33c3 100644
@@ -10,8 +10,8 @@
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#include "linux/mshv.h"
 #include "qemu/osdep.h"
+#include "linux/mshv.h"
 #include "qemu/error-report.h"
 #include "hw/hyperv/hvhdk_mini.h"
 #include "hw/hyperv/hvgdk_mini.h"
@@ -20,7 +20,6 @@
 #include "system/mshv.h"
 #include "system/mshv_int.h"
 #include "trace.h"
-#include <stdint.h>
 #include <sys/ioctl.h>
 
 #define MSHV_IRQFD_RESAMPLE_FLAG (1 << MSHV_IRQFD_BIT_RESAMPLE)
accel/mshv/mshv-all.c +0 -1
index 4675cb886f..bed0fa298e 100644
@@ -41,7 +41,6 @@
 #include "system/reset.h"
 #include "trace.h"
 #include <err.h>
-#include <stdint.h>
 #include <sys/ioctl.h>
 
 #define TYPE_MSHV_ACCEL ACCEL_CLASS_NAME("mshv")
include/system/mshv.h +0 -1
index 8b1fc20c80..75286baf16 100644
@@ -14,7 +14,6 @@
 #ifndef QEMU_MSHV_H
 #define QEMU_MSHV_H
 
-#include "qemu/osdep.h"
 #include "qemu/accel.h"
 #include "hw/hyperv/hyperv-proto.h"
 #include "hw/hyperv/hvhdk.h"
target/i386/mshv/mshv-cpu.c +0 -1
index 1c3db02188..586383b882 100644
@@ -13,7 +13,6 @@
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
 #include "qemu/memalign.h"
-#include "qemu/typedefs.h"
 
 #include "system/mshv.h"
 #include "system/mshv_int.h"
target/i386/mshv/x86.c +0 -1
index d574b3bc52..0700cc05ef 100644
@@ -13,7 +13,6 @@
 #include "cpu.h"
 #include "emulate/x86_decode.h"
 #include "emulate/x86_emu.h"
-#include "qemu/typedefs.h"
 #include "qemu/error-report.h"
 #include "system/mshv.h"
 
Signature · 1 line
2.47.3
#15 lore raw

[PULL 10/22] scripts/clean-includes: Update exclude list

In reply to Peter Maydell

Remove from the exclude list:
* tests/plugin, which is a non-existent directory. This was probably intended to exclude tests/tcg/plugins/, which is caught by the tests/tcg exclude pattern anyway
Add to the exclude list:
* rust/ -- the headers in here are purely for input to bindgen
* target/hexagon has some standalone tools used at build time
* linux-user/gen-vsdo.c -- another standalone tool
* linux-user/mips64/elfload.c just includes mips/elfload.c
* scripts/xen-detect.c is feature-detection code used by meson.build
* tests/tracetool/simple.c is autogenerated
* tests/unit/ has some "C file just includes another one" files
* include/system/os-wasm.h is like os-posix.h and os-win32.h and shouldn't be adjusted

Message-id: [email protected]

---
 scripts/clean-includes | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
scripts/clean-includes +17 -2
index 064e532037..874dfd0974 100755
@@ -113,10 +113,12 @@ trap 'rm -f -- "$COCCIFILE" "$REGEXFILE"' INT TERM HUP EXIT
 # Comments starting with '#' are permitted
 grep -v '^#' >"$REGEXFILE" <<EOT
 # These tests are generally standalone binaries
-^tests/(tcg|multiboot|fp|plugin|uefi-test-tools)
+^tests/(tcg|multiboot|fp|uefi-test-tools|qtest/migration/s390x)
 # BIOS sources and third-party subprojects don't follow our rules
 ^pc-bios
 ^subprojects
+# headers under rust are only used for input to bindgen
+^rust
 # plugin binaries are standalone
 ^contrib/plugins
 # the ebpf tool is standalone, and the skeleton header is autogenerated
@@ -124,15 +126,28 @@ grep -v '^#' >"$REGEXFILE" <<EOT
 ^ebpf/rss.bpf.skeleton.h
 # These files just include some other .c file and have no content themselves
 ^linux-user/(mips64|x86_64)/(cpu_loop|signal).c
+^linux-user/mips64/elfload.c
 # These are autogenerated headers
 ^include/standard-headers/
 # osdep.h itself and its friends are expected to include system headers
 ^include/qemu/osdep.h
 ^include/qemu/compiler.h
 ^include/glib-compat.h
-^include/system/os-(posix|win32).h
+^include/system/os-(posix|win32|wasm).h
 # This is for use by plugins, which are standalone binaries
 ^include/qemu/qemu-plugin.h
+# standalone tools used in building the hexagon target code
+^target/hexagon/(idef-parser|gen_semantics.c|gen_dectree_import.c)
+# standalone tool
+^target/s390x/gen-features.c
+# gen-vdso is a standalone tool
+^linux-user/gen-vdso.c
+# feature-detection code used by meson.bulid
+^scripts/xen-detect.c
+# autogenerated by tracetool
+^tests/tracetool/simple.c
+# these just include another C file
+^tests/unit/test-rcu-(simpleq|slist|tailq).c
 EOT
 
 # We assume there are no files in the tree with spaces in their name
Signature · 1 line
2.47.3
#16 lore raw

[PULL 03/22] kernel-doc.py: sync with upstream Kernel v6.19-rc4

In reply to Peter Maydell

From: Mauro Carvalho Chehab <[email protected]>

The changes here are aligned up to this Linux changeset:
f64c7e113dc9 ("scripts: docs: kdoc_files.py: don't consider symlinks as directories")

On other words, everything that it is there, except for the patch moving the library to tools/lib/python.

Message-id: 54dec248994abf37c4b5b9e48d5ab8f0f8df6f2d.1767716928.git.mchehab+huawei@kernel.org

---
 scripts/lib/kdoc/kdoc_files.py  |  11 +-
 scripts/lib/kdoc/kdoc_item.py   |   3 +-
 scripts/lib/kdoc/kdoc_output.py |  93 +++-
 scripts/lib/kdoc/kdoc_parser.py | 901 ++++++++++++++++----------------
 scripts/lib/kdoc/kdoc_re.py     |  24 +-
 5 files changed, 556 insertions(+), 476 deletions(-)
scripts/lib/kdoc/kdoc_files.py +7 -4
index 9e09b45b02..85365cc316 100644
@@ -49,7 +49,7 @@ def _parse_dir(self, dirname):
             for entry in obj:
                 name = os.path.join(dirname, entry.name)
 
-                if entry.is_dir():
+                if entry.is_dir(follow_symlinks=False):
                     yield from self._parse_dir(name)
 
                 if not entry.is_file():
@@ -64,7 +64,7 @@ def _parse_dir(self, dirname):
 
     def parse_files(self, file_list, file_not_found_cb):
         """
-        Define an interator to parse all source files from file_list,
+        Define an iterator to parse all source files from file_list,
         handling directories if any
         """
 
@@ -229,7 +229,7 @@ def out_msg(self, fname, name, arg):
         Return output messages from a file name using the output style
         filtering.
 
-        If output type was not handled by the syler, return None.
+        If output type was not handled by the styler, return None.
         """
 
         # NOTE: we can add rules here to filter out unwanted parts,
@@ -275,7 +275,10 @@ def msg(self, enable_lineno=False, export=False, internal=False,
                 self.config.log.warning("No kernel-doc for file %s", fname)
                 continue
 
-            for arg in self.results[fname]:
+            symbols = self.results[fname]
+            self.out_style.set_symbols(symbols)
+
+            for arg in symbols:
                 m = self.out_msg(fname, arg.name, arg)
 
                 if m is None:
scripts/lib/kdoc/kdoc_item.py +2 -1
index b3b2257645..19805301cb 100644
@@ -5,8 +5,9 @@
 #
 
 class KdocItem:
-    def __init__(self, name, type, start_line, **other_stuff):
+    def __init__(self, name, fname, type, start_line, **other_stuff):
         self.name = name
+        self.fname = fname
         self.type = type
         self.declaration_start_line = start_line
         self.sections = {}
scripts/lib/kdoc/kdoc_output.py +84 -9

167 lines not on this page · raw message

scripts/lib/kdoc/kdoc_parser.py +451 -450

1,200 lines not on this page · raw message

scripts/lib/kdoc/kdoc_re.py +12 -12
index 612223e1e7..2dfa1bf83d 100644
@@ -16,7 +16,7 @@
 
 class KernRe:
     """
-    Helper class to simplify regex declaration and usage,
+    Helper class to simplify regex declaration and usage.
 
     It calls re.compile for a given pattern. It also allows adding
     regular expressions and define sub at class init time.
@@ -27,7 +27,7 @@ class KernRe:
 
     def _add_regex(self, string, flags):
         """
-        Adds a new regex or re-use it from the cache.
+        Adds a new regex or reuses it from the cache.
         """
         self.regex = re_cache.get(string, None)
         if not self.regex:
@@ -114,7 +114,7 @@ class NestedMatch:
 
             '\\bSTRUCT_GROUP(\\(((?:(?>[^)(]+)|(?1))*)\\))[^;]*;'
 
-    which is used to properly match open/close parenthesis of the
+    which is used to properly match open/close parentheses of the
     string search STRUCT_GROUP(),
 
     Add a class that counts pairs of delimiters, using it to match and
@@ -136,13 +136,13 @@ class NestedMatch:
     #       \bSTRUCT_GROUP\(
     #
     # is similar to: STRUCT_GROUP\((.*)\)
-    # except that the content inside the match group is delimiter's aligned.
+    # except that the content inside the match group is delimiter-aligned.
     #
-    # The content inside parenthesis are converted into a single replace
+    # The content inside parentheses is converted into a single replace
     # group (e.g. r`\1').
     #
     # It would be nice to change such definition to support multiple
-    # match groups, allowing a regex equivalent to.
+    # match groups, allowing a regex equivalent to:
     #
     #   FOO\((.*), (.*), (.*)\)
     #
@@ -168,14 +168,14 @@ def _search(self, regex, line):
         but I ended using a different implementation to align all three types
         of delimiters and seek for an initial regular expression.
 
-        The algorithm seeks for open/close paired delimiters and place them
-        into a stack, yielding a start/stop position of each match  when the
+        The algorithm seeks for open/close paired delimiters and places them
+        into a stack, yielding a start/stop position of each match when the
         stack is zeroed.
 
-        The algorithm shoud work fine for properly paired lines, but will
-        silently ignore end delimiters that preceeds an start delimiter.
+        The algorithm should work fine for properly paired lines, but will
+        silently ignore end delimiters that precede a start delimiter.
         This should be OK for kernel-doc parser, as unaligned delimiters
-        would cause compilation errors. So, we don't need to rise exceptions
+        would cause compilation errors. So, we don't need to raise exceptions
         to cover such issues.
         """
 
@@ -203,7 +203,7 @@ def _search(self, regex, line):
                     stack.append(end)
                     continue
 
-                # Does the end delimiter match what it is expected?
+                # Does the end delimiter match what is expected?
                 if stack and d == stack[-1]:
                     stack.pop()
 
Signature · 1 line
2.47.3
#17 lore raw

[PULL 17/22] hw/intc: declare GICv3 regions as little endian

In reply to Peter Maydell

From: Alex Bennée <[email protected]>

The GIC should always be a little-endian device as big-endian behaviour is a function of the current CPU configuration not the system as a whole. This should have no functional effect as the GIC cannot be instantiated on a BE system but will help the single binary efforts.

Message-id: [email protected]

---
 hw/intc/arm_gicv3.c            | 4 ++--
 hw/intc/arm_gicv3_its.c        | 4 ++--
 hw/intc/arm_gicv3_its_common.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
hw/intc/arm_gicv3.c +2 -2
index 6059ce926a..542f81ea49 100644
@@ -417,7 +417,7 @@ static const MemoryRegionOps gic_ops[] = {
     {
         .read_with_attrs = gicv3_dist_read,
         .write_with_attrs = gicv3_dist_write,
-        .endianness = DEVICE_NATIVE_ENDIAN,
+        .endianness = DEVICE_LITTLE_ENDIAN,
         .valid.min_access_size = 1,
         .valid.max_access_size = 8,
         .impl.min_access_size = 1,
@@ -426,7 +426,7 @@ static const MemoryRegionOps gic_ops[] = {
     {
         .read_with_attrs = gicv3_redist_read,
         .write_with_attrs = gicv3_redist_write,
-        .endianness = DEVICE_NATIVE_ENDIAN,
+        .endianness = DEVICE_LITTLE_ENDIAN,
         .valid.min_access_size = 1,
         .valid.max_access_size = 8,
         .impl.min_access_size = 1,
hw/intc/arm_gicv3_its.c +2 -2
index cce3486d74..b639c03b67 100644
@@ -1906,7 +1906,7 @@ static const MemoryRegionOps gicv3_its_control_ops = {
     .valid.max_access_size = 8,
     .impl.min_access_size = 4,
     .impl.max_access_size = 8,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static const MemoryRegionOps gicv3_its_translation_ops = {
@@ -1916,7 +1916,7 @@ static const MemoryRegionOps gicv3_its_translation_ops = {
     .valid.max_access_size = 4,
     .impl.min_access_size = 2,
     .impl.max_access_size = 4,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static void gicv3_arm_its_realize(DeviceState *dev, Error **errp)
hw/intc/arm_gicv3_its_common.c +1 -1
index e946e3fb87..9fc51ad1e0 100644
@@ -97,7 +97,7 @@ static MemTxResult gicv3_its_trans_write(void *opaque, hwaddr offset,
 static const MemoryRegionOps gicv3_its_trans_ops = {
     .read_with_attrs = gicv3_its_trans_read,
     .write_with_attrs = gicv3_its_trans_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 void gicv3_its_init_mmio(GICv3ITSState *s, const MemoryRegionOps *ops,
Signature · 1 line
2.47.3
#18 lore raw

[PULL 22/22] qemu-options.hx: Improve formatting in colo-compare docs

In reply to Peter Maydell

The colo-compare option documentation has some formatting issues: it uses a "@var{...}" syntax which is not used elsewhere and which is rendered literally into the HTML documentation. The bare "@" sign also results in an unintended 'mailto:' hyperlink.

Rewrite this into the style we seem to use most in the rest of the command line options, where an option which takes an argument is written as "my-option=<thing>".

We take the opportunity to make the documentation a little clearer by splitting up the long paragraph and using preformatted-text markup for the names of the suboptions.

Message-id: [email protected]

---
 qemu-options.hx | 41 +++++++++++++++++++++++++----------------
 1 file changed, 25 insertions(+), 16 deletions(-)
qemu-options.hx +25 -16
index 862b6c7661..bd014a3244 100644
@@ -5972,22 +5972,31 @@ SRST
         stored. The file format is libpcap, so it can be analyzed with
         tools such as tcpdump or Wireshark.
 
-    ``-object colo-compare,id=id,primary_in=chardevid,secondary_in=chardevid,outdev=chardevid,iothread=id[,vnet_hdr_support][,notify_dev=id][,compare_timeout=@var{ms}][,expired_scan_cycle=@var{ms}][,max_queue_size=@var{size}]``
-        Colo-compare gets packet from primary\_in chardevid and
-        secondary\_in, then compare whether the payload of primary packet
-        and secondary packet are the same. If same, it will output
-        primary packet to out\_dev, else it will notify COLO-framework to do
-        checkpoint and send primary packet to out\_dev. In order to
-        improve efficiency, we need to put the task of comparison in
-        another iothread. If it has the vnet\_hdr\_support flag,
-        colo compare will send/recv packet with vnet\_hdr\_len.
-        The compare\_timeout=@var{ms} determines the maximum time of the
-        colo-compare hold the packet. The expired\_scan\_cycle=@var{ms}
-        is to set the period of scanning expired primary node network packets.
-        The max\_queue\_size=@var{size} is to set the max compare queue
-        size depend on user environment.
-        If user want to use Xen COLO, need to add the notify\_dev to
-        notify Xen colo-frame to do checkpoint.
+    ``-object colo-compare,id=<id>,primary_in=<chardevid>,secondary_in=<chardevid>,outdev=<chardevid>,iothread=<id>[,vnet_hdr_support][,notify_dev=<id>][,compare_timeout=<time_ms>][,expired_scan_cycle=<time_ms>][,max_queue_size=<maxsize>]``
+        Colo-compare gets packets from the chardev backends specified by
+        ``primary_in`` and ``secondary_in``, and compares whether the payloads
+        of the primary packet and the secondary packet are the same.
+        If they match, it will output the primary packet to the chardev
+        backend specified by ``outdev``; otherwise it will notify COLO-framework
+        to do a checkpoint and send the primary packet to ``outdev``.
+
+        In order to improve efficiency, we need to put the task of comparison in
+        another iothread; the ``iothread`` option specifies that iothread object
+        (which your commandline should create).
+
+        The ``vnet_hdr_support`` flag tells
+        colo compare to pass the vnet header length when it sends and receives packets.
+
+        The ``compare_timeout`` option sets the maximum time that
+        colo-compare will hold the packet for, in ms.
+
+        The ``expired_scan_cycle`` option sets the period of scanning expired
+        primary node network packets, in ms.
+
+        The ``max_queue_size`` option sets the max compare queue size.
+
+        If you want to use Xen COLO, you need to specify ``notify_dev`` to
+        tell colo-compare how to notify Xen colo-frame to do a checkpoint.
 
         COLO-compare must be used with the help of filter-mirror,
         filter-redirector and filter-rewriter.
Signature · 1 line
2.47.3
#19 lore raw

[PULL 12/22] bsd-user: Clean up includes

In reply to Peter Maydell

This commit was created with scripts/clean-includes:
./scripts/clean-includes '--git' 'bsd-user' 'bsd-user'

All .c should include qemu/osdep.h first. The script performs three related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too.

Message-id: [email protected]

---
 bsd-user/bsd-mem.h         | 3 ---
 bsd-user/bsd-proc.c        | 1 -
 bsd-user/freebsd/os-proc.h | 2 --
 bsd-user/qemu-bsd.h        | 1 -
 4 files changed, 7 deletions(-)
bsd-user/bsd-mem.h +0 -3
index 416d0f8c23..a118e57260 100644
@@ -49,11 +49,8 @@
 #ifndef BSD_USER_BSD_MEM_H
 #define BSD_USER_BSD_MEM_H
 
-#include <sys/types.h>
 #include <sys/ipc.h>
-#include <sys/mman.h>
 #include <sys/shm.h>
-#include <fcntl.h>
 
 #include "qemu-bsd.h"
 #include "exec/mmap-lock.h"
bsd-user/bsd-proc.c +0 -1
index ca3c1bf94f..8dcac9608d 100644
@@ -19,7 +19,6 @@
 #include "qemu/osdep.h"
 
 #include <sys/param.h>
-#include <sys/types.h>
 #include <sys/cpuset.h>
 #include <sys/resource.h>
 #include <sys/wait.h>
bsd-user/freebsd/os-proc.h +0 -2
index 3003c8cb63..cc53215138 100644
@@ -23,10 +23,8 @@
 #include <sys/param.h>
 #include <sys/procctl.h>
 #include <sys/signal.h>
-#include <sys/types.h>
 #include <sys/procdesc.h>
 #include <sys/wait.h>
-#include <unistd.h>
 
 #include "target_arch_cpu.h"
 
bsd-user/qemu-bsd.h +0 -1
index ffc64bb244..56affcd31d 100644
@@ -20,7 +20,6 @@
 #ifndef QEMU_BSD_H
 #define QEMU_BSD_H
 
-#include <sys/types.h>
 #include <sys/resource.h>
 #include <sys/ipc.h>
 #include <sys/msg.h>
Signature · 1 line
2.47.3
#20 lore raw

[PULL 13/22] misc: Clean up includes

In reply to Peter Maydell

This commit deals with various .c files that included system headers that are already pulled in by osdep.h, where the .c file includes osdep.h already itself.

This commit was created with scripts/clean-includes:
./scripts/clean-includes '--git' 'misc' 'hw/core' 'semihosting' 'target/arm' 'target/i386/kvm/kvm.c' 'target/loongarch' 'target/riscv' 'tools' 'util'

All .c should include qemu/osdep.h first. The script performs three related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too.

Message-id: [email protected]

---
 hw/core/machine-qmp-cmds.c         | 1 -
 semihosting/arm-compat-semi-stub.c | 1 -
 target/arm/cpu32-stubs.c           | 1 -
 target/i386/kvm/kvm.c              | 1 -
 target/loongarch/csr.c             | 1 -
 target/riscv/csr.c                 | 1 -
 tools/i386/qemu-vmsr-helper.c      | 1 -
 util/cpuinfo-aarch64.c             | 1 -
 8 files changed, 8 deletions(-)
hw/core/machine-qmp-cmds.c +0 -1
index 79cbcdd63e..e62cb4ec88 100644
@@ -30,7 +30,6 @@
 #include "system/runstate.h"
 #include "system/system.h"
 #include "hw/s390x/storage-keys.h"
-#include <sys/stat.h>
 
 /*
  * QMP query for enabled and present accelerators
semihosting/arm-compat-semi-stub.c +0 -1
index bfa3681e26..40199c9842 100644
@@ -6,7 +6,6 @@
 
 #include "qemu/osdep.h"
 #include "semihosting/semihost.h"
-#include <glib.h>
 
 bool semihosting_arm_compatible(void)
 {
target/arm/cpu32-stubs.c +0 -1
index f0ce159572..9e50bb1b0b 100644
@@ -3,7 +3,6 @@
 #include "qemu/osdep.h"
 #include "target/arm/cpu.h"
 #include "target/arm/internals.h"
-#include <glib.h>
 
 void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp)
 {
target/i386/kvm/kvm.c +0 -1
index 7b9b740a8e..0c940d4b64 100644
@@ -21,7 +21,6 @@
 #include <sys/utsname.h>
 #include <sys/syscall.h>
 #include <sys/resource.h>
-#include <sys/time.h>
 
 #include <linux/kvm.h>
 #include <linux/kvm_para.h>
target/loongarch/csr.c +0 -1
index 332a1396cc..fff2312f87 100644
@@ -2,7 +2,6 @@
 /*
  * Copyright (c) 2025 Loongson Technology Corporation Limited
  */
-#include <stddef.h>
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "csr.h"
target/riscv/csr.c +0 -1
index 05c7ec8352..5064483917 100644
@@ -31,7 +31,6 @@
 #include "qapi/error.h"
 #include "tcg/insn-start-words.h"
 #include "internals.h"
-#include <stdbool.h>
 
 /* CSR function table public API */
 void riscv_get_csr_ops(int csrno, riscv_csr_operations *ops)
tools/i386/qemu-vmsr-helper.c +0 -1
index 6c0f4fe870..f12fd3c3e8 100644
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include <getopt.h>
-#include <stdbool.h>
 #include <sys/ioctl.h>
 #ifdef CONFIG_LIBCAP_NG
 #include <cap-ng.h>
util/cpuinfo-aarch64.c +0 -1
index 57468890c3..288074c08f 100644
@@ -26,7 +26,6 @@
 #if defined(__OpenBSD__) && !defined(CONFIG_ELF_AUX_INFO)
 # include <machine/armreg.h>
 # include <machine/cpu.h>
-# include <sys/types.h>
 # include <sys/sysctl.h>
 #endif
 
Signature · 1 line
2.47.3
#21 lore raw

[PULL 20/22] docs: avoid unintended mailto: hyperlinks

In reply to Peter Maydell

In rST documents, an '@' character in normal text or a parsed-literal is assumed to be an email address and will result in a 'mailto:' hyperlink in the generated HTML. In several places we have mailto: hyperlinks that are unintended nonsense; correct these by either escaping the @ character or making the text use ``...`` preformatted rendering.

This commit covers only the simple cases which can be trivially fixed with escaping or ``..``; the remaining cases will be handled in separate commits.

Message-id: [email protected]

---
 docs/devel/submitting-a-patch.rst     | 2 +-
 docs/system/device-url-syntax.rst.inc | 4 ++--
 docs/system/vnc-security.rst          | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)
docs/devel/submitting-a-patch.rst +1 -1
index dd1cf32ad3..5ccd09a397 100644
@@ -18,7 +18,7 @@ one-shot fix, the bare minimum we ask is that:
 
    * - Check
      - Reason
-   * - Patches contain Signed-off-by: Your Name <author@email>
+   * - Patches contain ``Signed-off-by: Your Name <author@email>``
      - States you are legally able to contribute the code. See :ref:`patch_emails_must_include_a_signed_off_by_line`
    * - Sent as patch emails to ``[email protected]``
      - The project uses an email list based workflow. See :ref:`submitting_your_patches`
docs/system/device-url-syntax.rst.inc +2 -2
index 43b5c2596b..aae65d138c 100644
@@ -33,7 +33,7 @@ These are specified using a special URL syntax.
 
    .. parsed-literal::
 
-      |qemu_system| -drive file=iscsi://user%[email protected]/iqn.2001-04.com.example/1
+      |qemu_system| -drive file=iscsi://user%password\@192.0.2.1/iqn.2001-04.com.example/1
 
    Example (CHAP username/password via environment variables):
 
@@ -79,7 +79,7 @@ These are specified using a special URL syntax.
 
    .. parsed-literal::
 
-      |qemu_system| -drive file=ssh://user@host/path/to/disk.img
+      |qemu_system| -drive file=ssh://user\@host/path/to/disk.img
       |qemu_system| -drive file.driver=ssh,file.user=user,file.host=host,file.port=22,file.path=/path/to/disk.img
 
    Currently authentication must be done using ssh-agent. Other
docs/system/vnc-security.rst +3 -3
index 4c1769eeb8..97e94ff407 100644
@@ -182,9 +182,9 @@ When not using TLS the recommended configuration is
 This says to use the 'GSSAPI' mechanism with the Kerberos v5 protocol,
 with the server principal stored in /etc/qemu/krb5.tab. For this to work
 the administrator of your KDC must generate a Kerberos principal for the
-server, with a name of 'qemu/[email protected]' replacing
-'somehost.example.com' with the fully qualified host name of the machine
-running QEMU, and 'EXAMPLE.COM' with the Kerberos Realm.
+server, with a name of ``qemu/[email protected]`` replacing
+``somehost.example.com`` with the fully qualified host name of the machine
+running QEMU, and ``EXAMPLE.COM`` with the Kerberos Realm.
 
 When using TLS, if username+password authentication is desired, then a
 reasonable configuration is
Signature · 1 line
2.47.3
#22 lore raw

[PULL 21/22] qemu-options.hx: Drop uses of @var

In reply to Peter Maydell

A few entries in qemu-options.hx use the syntax "my-option=@var{name}" (or @var{} with no name specified) when documenting an option that takes an argument. This syntax isn't consistently used, and the documentation generation has no support for it: it just appears literally in the HTML output.

Switch these uses to the more common "my-option=<name>". This also doesn't have any particular support in the documentation generation and so appears literally in the output, but it is a little less odd looking to the end-user.

The other common pattern we have is "my-option=name" with no marking at all that the right hand side of the '=' is not literal text; using <> seems preferable to me, as it makes it more distinct from cases where the right hand side is documenting that only certain values are permitted, as in "my-option=on|off". This patch doesn't do anything about existing uses of this pattern (except in one case which was so confused as to use "my-option=@var{}" in the --help output and "my-option=" in the RST output, where we change both for consistency), but prefers not to add more of them.

We don't change the uses of @var in the colo-compare documentation, as that part deserves a slightly more wide-ranging overhaul that is better in its own commit.

Message-id: [email protected]

---
 qemu-options.hx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
qemu-options.hx +5 -5
index 455b8be890..862b6c7661 100644
@@ -36,7 +36,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
     "                dea-key-wrap=on|off controls support for DEA key wrapping (default=on)\n"
     "                suppress-vmdesc=on|off disables self-describing migration (default=off)\n"
     "                nvdimm=on|off controls NVDIMM support (default=off)\n"
-    "                memory-encryption=@var{} memory encryption object to use (default=none)\n"
+    "                memory-encryption=<id> memory encryption object to use (default=none)\n"
     "                hmat=on|off controls ACPI HMAT support (default=off)\n"
     "                spcr=on|off controls ACPI SPCR support (default=on)\n"
 #ifdef CONFIG_POSIX
@@ -100,7 +100,7 @@ SRST
     ``nvdimm=on|off``
         Enables or disables NVDIMM support. The default is off.
 
-    ``memory-encryption=``
+    ``memory-encryption=<id>``
         Memory encryption object to use. The default is none.
 
     ``hmat=on|off``
@@ -180,7 +180,7 @@ SRST
 
             -machine cxl-fmw.0.targets.0=cxl.0,cxl-fmw.0.targets.1=cxl.1,cxl-fmw.0.size=128G,cxl-fmw.0.interleave-granularity=512
 
-    ``sgx-epc.0.memdev=@var{memid},sgx-epc.0.node=@var{numaid}``
+    ``sgx-epc.0.memdev=<memid>,sgx-epc.0.node=<numaid>``
         Define an SGX EPC section.
 
     ``smp-cache.0.cache=cachename,smp-cache.0.topology=topologylevel``
@@ -4530,7 +4530,7 @@ DEF("compat", HAS_ARG, QEMU_OPTION_compat,
     "                Policy for handling unstable management interfaces\n",
     QEMU_ARCH_ALL)
 SRST
-``-compat [deprecated-input=@var{input-policy}][,deprecated-output=@var{output-policy}]``
+``-compat [deprecated-input=<input-policy>][,deprecated-output=<output-policy>]``
     Set policy for handling deprecated management interfaces (experimental):
 
     ``deprecated-input=accept`` (default)
@@ -4546,7 +4546,7 @@ SRST
 
     Limitation: covers only syntactic aspects of QMP.
 
-``-compat [unstable-input=@var{input-policy}][,unstable-output=@var{output-policy}]``
+``-compat [unstable-input=<input-policy>][,unstable-output=<output-policy>]``
     Set policy for handling unstable management interfaces (experimental):
 
     ``unstable-input=accept`` (default)
Signature · 1 line
2.47.3
#23 lore raw
In reply to Peter Maydell
Quoted 18 lines · Peter Maydell

Hi; here's a target-arm pullreq. Most of the patches in it are actually docs and similar tidyups, though...

thanks
-- PMM

The following changes since commit 2339d0a1cfac6ecc667e6e062a593865c1541c35:

   Merge tag 'hw-misc-20260120' ofhttps://github.com/philmd/qemu into staging (2026-01-21 07:39:57 +1100)

are available in the Git repository at:

   https://gitlab.com/pm215/qemu.git tags/pull-target-arm-20260123

for you to fetch changes up to 62580edc02ae16ba520d220f6fd7556999504a84:

   qemu-options.hx: Improve formatting in colo-compare docs (2026-01-23 14:08:57 +0000)
Quoted 13 lines

----------------------------------------------------------------
target-arm queue:
* hw/arm/imx8mp-evk: Provide some defaults matching real hardware
* hw/intc: endianness fixes
* various: Clean up includes
* kernel-doc.py: sync with upstream Kernel v6.19-rc4
* scripts/clean-includes: Minor improvements; exclude list update
* docs/system/arm/imx8mp-evk: Avoid suggesting redundant CLI parameters
* docs/system/arm/xlnx-zynq.rst: Improve docs rendering
* docs: Be consistent about capitalization of 'Arm' (again)
* docs: Avoid unintended mailto: hyperlinks
* qemu-options.hx: Drop uses of @var
* qemu-options.hx: Improve formatting in colo-compare docs

Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/11.0 as appropriate.

r~