Skip to content

Commit d762bf9

Browse files
committed
Merge tag 'pull-target-arm-20231102' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
target-arm queue: * linux-user/elfload: Add missing arm64 hwcap values * stellaris-gamepad: Convert to qdev * docs/specs: Convert various txt docs to rST * MAINTAINERS: Make sure that gicv3_internal.h is covered, too * hw/arm/pxa2xx_gpio: Pass CPU using QOM link property * hw/watchdog/wdt_imx2: Trace MMIO access and timer activity * hw/misc/imx7_snvs: Trace MMIO access * hw/misc/imx6_ccm: Convert DPRINTF to trace events * hw/i2c/pm_smbus: Convert DPRINTF to trace events * target/arm: Enable FEAT_MOPS insns in user-mode emulation * linux-user: Report AArch64 hwcap2 fields above bit 31 * target/arm: Make FEAT_MOPS SET* insns handle Xs == XZR correctly * target/arm: Fix SVE STR increment * hw/char/stm32f2xx_usart: implement TX interrupts * target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk * xlnx-versal-virt: Add AMD/Xilinx TRNG device * tag 'pull-target-arm-20231102' of https://git.linaro.org/people/pmaydell/qemu-arm: (33 commits) tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device hw/misc: Introduce AMD/Xilix Versal TRNG device target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk hw/char/stm32f2xx_usart: Add more definitions for CR1 register hw/char/stm32f2xx_usart: Update IRQ when DR is written hw/char/stm32f2xx_usart: Extract common IRQ update code to update_irq() target/arm: Fix SVE STR increment target/arm: Make FEAT_MOPS SET* insns handle Xs == XZR correctly linux-user: Report AArch64 hwcap2 fields above bit 31 target/arm: Enable FEAT_MOPS insns in user-mode emulation hw/i2c/pm_smbus: Convert DPRINTF to trace events hw/misc/imx6_ccm: Convert DPRINTF to trace events hw/misc/imx7_snvs: Trace MMIO access hw/watchdog/wdt_imx2: Trace timer activity hw/watchdog/wdt_imx2: Trace MMIO access hw/arm/pxa2xx_gpio: Pass CPU using QOM link property MAINTAINERS: Make sure that gicv3_internal.h is covered, too docs/specs/vmgenid: Convert to rST docs/specs/vmcoreinfo: Convert to rST ... Conflicts: hw/input/stellaris_input.c The qdev conversion in this pull request ("stellaris-gamepad: Convert to qdev") eliminates the vmstate_register() call that was converted to vmstate_register_any() in the conflicting migration pull request. vmstate_register_any() is no longer necessary now that this device has been converted to qdev, so take this pull request's version of stellaris_gamepad.c over the previous pull request's stellaris_input.c (the file was renamed). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2 parents 75b7b25 + 1c98a82 commit d762bf9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2305
-779
lines changed

MAINTAINERS

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ M: Peter Maydell <peter.maydell@linaro.org>
687687
L: qemu-arm@nongnu.org
688688
S: Maintained
689689
F: hw/intc/arm*
690-
F: hw/intc/gic_internal.h
690+
F: hw/intc/gic*_internal.h
691691
F: hw/misc/a9scu.c
692692
F: hw/misc/arm11scu.c
693693
F: hw/misc/arm_l2x0.c
@@ -1283,6 +1283,7 @@ F: include/hw/char/goldfish_tty.h
12831283
F: include/hw/intc/goldfish_pic.h
12841284
F: include/hw/intc/m68k_irqc.h
12851285
F: include/hw/misc/virt_ctrl.h
1286+
F: docs/specs/virt-ctlr.rst
12861287

12871288
MicroBlaze Machines
12881289
-------------------
@@ -1882,6 +1883,7 @@ EDU
18821883
M: Jiri Slaby <jslaby@suse.cz>
18831884
S: Maintained
18841885
F: hw/misc/edu.c
1886+
F: docs/specs/edu.rst
18851887

18861888
IDE
18871889
M: John Snow <jsnow@redhat.com>
@@ -2350,6 +2352,7 @@ S: Maintained
23502352
F: hw/net/vmxnet*
23512353
F: hw/scsi/vmw_pvscsi*
23522354
F: tests/qtest/vmxnet3-test.c
2355+
F: docs/specs/vwm_pvscsi-spec.rst
23532356

23542357
Rocker
23552358
M: Jiri Pirko <jiri@resnulli.us>
@@ -2434,7 +2437,7 @@ S: Orphan
24342437
R: Ani Sinha <ani@anisinha.ca>
24352438
F: hw/acpi/vmgenid.c
24362439
F: include/hw/acpi/vmgenid.h
2437-
F: docs/specs/vmgenid.txt
2440+
F: docs/specs/vmgenid.rst
24382441
F: tests/qtest/vmgenid-test.c
24392442

24402443
LED
@@ -2466,6 +2469,7 @@ F: hw/display/vga*
24662469
F: hw/display/bochs-display.c
24672470
F: include/hw/display/vga.h
24682471
F: include/hw/display/bochs-vbe.h
2472+
F: docs/specs/standard-vga.rst
24692473

24702474
ramfb
24712475
M: Gerd Hoffmann <kraxel@redhat.com>
@@ -2880,6 +2884,7 @@ F: include/sysemu/dump.h
28802884
F: qapi/dump.json
28812885
F: scripts/dump-guest-memory.py
28822886
F: stubs/dump.c
2887+
F: docs/specs/vmcoreinfo.rst
28832888

28842889
Error reporting
28852890
M: Markus Armbruster <armbru@redhat.com>
Lines changed: 53 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
EDU device
33
==========
44

5-
Copyright (c) 2014-2015 Jiri Slaby
5+
..
6+
Copyright (c) 2014-2015 Jiri Slaby
67
7-
This document is licensed under the GPLv2 (or later).
8+
This document is licensed under the GPLv2 (or later).
89

910
This is an educational device for writing (kernel) drivers. Its original
1011
intention was to support the Linux kernel lectures taught at the Masaryk
@@ -15,18 +16,20 @@ The devices behaves very similar to the PCI bridge present in the COMBO6 cards
1516
developed under the Liberouter wings. Both PCI device ID and PCI space is
1617
inherited from that device.
1718

18-
Command line switches:
19-
-device edu[,dma_mask=mask]
19+
Command line switches
20+
---------------------
2021

21-
dma_mask makes the virtual device work with DMA addresses with the given
22+
``-device edu[,dma_mask=mask]``
23+
``dma_mask`` makes the virtual device work with DMA addresses with the given
2224
mask. For educational purposes, the device supports only 28 bits (256 MiB)
2325
by default. Students shall set dma_mask for the device in the OS driver
2426
properly.
2527

2628
PCI specs
2729
---------
2830

29-
PCI ID: 1234:11e8
31+
PCI ID:
32+
``1234:11e8``
3033

3134
PCI Region 0:
3235
I/O memory, 1 MB in size. Users are supposed to communicate with the card
@@ -35,24 +38,29 @@ PCI Region 0:
3538
MMIO area spec
3639
--------------
3740

38-
Only size == 4 accesses are allowed for addresses < 0x80. size == 4 or
39-
size == 8 for the rest.
41+
Only ``size == 4`` accesses are allowed for addresses ``< 0x80``.
42+
``size == 4`` or ``size == 8`` for the rest.
4043

41-
0x00 (RO) : identification (0xRRrr00edu)
42-
RR -- major version
43-
rr -- minor version
44+
0x00 (RO) : identification
45+
Value is in the form ``0xRRrr00edu`` where:
46+
- ``RR`` -- major version
47+
- ``rr`` -- minor version
4448

4549
0x04 (RW) : card liveness check
46-
It is a simple value inversion (~ C operator).
50+
It is a simple value inversion (``~`` C operator).
4751

4852
0x08 (RW) : factorial computation
4953
The stored value is taken and factorial of it is put back here.
5054
This happens only after factorial bit in the status register (0x20
5155
below) is cleared.
5256

53-
0x20 (RW) : status register, bitwise OR
54-
0x01 -- computing factorial (RO)
55-
0x80 -- raise interrupt after finishing factorial computation
57+
0x20 (RW) : status register
58+
Bitwise OR of:
59+
60+
0x01
61+
computing factorial (RO)
62+
0x80
63+
raise interrupt after finishing factorial computation
5664

5765
0x24 (RO) : interrupt status register
5866
It contains values which raised the interrupt (see interrupt raise
@@ -76,13 +84,19 @@ size == 8 for the rest.
7684
0x90 (RW) : DMA transfer count
7785
The size of the area to perform the DMA on.
7886

79-
0x98 (RW) : DMA command register, bitwise OR
80-
0x01 -- start transfer
81-
0x02 -- direction (0: from RAM to EDU, 1: from EDU to RAM)
82-
0x04 -- raise interrupt 0x100 after finishing the DMA
87+
0x98 (RW) : DMA command register
88+
Bitwise OR of:
89+
90+
0x01
91+
start transfer
92+
0x02
93+
direction (0: from RAM to EDU, 1: from EDU to RAM)
94+
0x04
95+
raise interrupt 0x100 after finishing the DMA
8396

8497
IRQ controller
8598
--------------
99+
86100
An IRQ is generated when written to the interrupt raise register. The value
87101
appears in interrupt status register when the interrupt is raised and has to
88102
be written to the interrupt acknowledge register to lower it.
@@ -94,22 +108,28 @@ routine.
94108

95109
DMA controller
96110
--------------
111+
97112
One has to specify, source, destination, size, and start the transfer. One
98113
4096 bytes long buffer at offset 0x40000 is available in the EDU device. I.e.
99114
one can perform DMA to/from this space when programmed properly.
100115

101116
Example of transferring a 100 byte block to and from the buffer using a given
102-
PCI address 'addr':
103-
addr -> DMA source address
104-
0x40000 -> DMA destination address
105-
100 -> DMA transfer count
106-
1 -> DMA command register
107-
while (DMA command register & 1)
108-
;
109-
110-
0x40000 -> DMA source address
111-
addr+100 -> DMA destination address
112-
100 -> DMA transfer count
113-
3 -> DMA command register
114-
while (DMA command register & 1)
115-
;
117+
PCI address ``addr``:
118+
119+
::
120+
121+
addr -> DMA source address
122+
0x40000 -> DMA destination address
123+
100 -> DMA transfer count
124+
1 -> DMA command register
125+
while (DMA command register & 1)
126+
;
127+
128+
::
129+
130+
0x40000 -> DMA source address
131+
addr+100 -> DMA destination address
132+
100 -> DMA transfer count
133+
3 -> DMA command register
134+
while (DMA command register & 1)
135+
;

docs/specs/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ guest hardware that is specific to QEMU.
2424
acpi_erst
2525
sev-guest-firmware
2626
fw_cfg
27+
vmw_pvscsi-spec
28+
edu
29+
ivshmem-spec
30+
pvpanic
31+
standard-vga
32+
virt-ctlr
33+
vmcoreinfo
34+
vmgenid
Lines changed: 23 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
= Device Specification for Inter-VM shared memory device =
1+
======================================================
2+
Device Specification for Inter-VM shared memory device
3+
======================================================
24

35
The Inter-VM shared memory device (ivshmem) is designed to share a
46
memory region between multiple QEMU processes running different guests
@@ -12,42 +14,17 @@ can obtain one from an ivshmem server.
1214
In the latter case, the device can additionally interrupt its peers, and
1315
get interrupted by its peers.
1416

17+
For information on configuring the ivshmem device on the QEMU
18+
command line, see :doc:`../system/devices/ivshmem`.
1519

16-
== Configuring the ivshmem PCI device ==
17-
18-
There are two basic configurations:
19-
20-
- Just shared memory:
21-
22-
-device ivshmem-plain,memdev=HMB,...
23-
24-
This uses host memory backend HMB. It should have option "share"
25-
set.
26-
27-
- Shared memory plus interrupts:
28-
29-
-device ivshmem-doorbell,chardev=CHR,vectors=N,...
30-
31-
An ivshmem server must already be running on the host. The device
32-
connects to the server's UNIX domain socket via character device
33-
CHR.
34-
35-
Each peer gets assigned a unique ID by the server. IDs must be
36-
between 0 and 65535.
37-
38-
Interrupts are message-signaled (MSI-X). vectors=N configures the
39-
number of vectors to use.
40-
41-
For more details on ivshmem device properties, see the QEMU Emulator
42-
user documentation.
43-
44-
45-
== The ivshmem PCI device's guest interface ==
20+
The ivshmem PCI device's guest interface
21+
========================================
4622

4723
The device has vendor ID 1af4, device ID 1110, revision 1. Before
4824
QEMU 2.6.0, it had revision 0.
4925

50-
=== PCI BARs ===
26+
PCI BARs
27+
--------
5128

5229
The ivshmem PCI device has two or three BARs:
5330

@@ -59,8 +36,7 @@ There are two ways to use this device:
5936

6037
- If you only need the shared memory part, BAR2 suffices. This way,
6138
you have access to the shared memory in the guest and can use it as
62-
you see fit. Memnic, for example, uses ivshmem this way from guest
63-
user space (see http://dpdk.org/browse/memnic).
39+
you see fit.
6440

6541
- If you additionally need the capability for peers to interrupt each
6642
other, you need BAR0 and BAR1. You will most likely want to write a
@@ -77,10 +53,13 @@ accessing BAR2.
7753
Revision 0 of the device is not capable to tell guest software whether
7854
it is configured for interrupts.
7955

80-
=== PCI device registers ===
56+
PCI device registers
57+
--------------------
8158

8259
BAR 0 contains the following registers:
8360

61+
::
62+
8463
Offset Size Access On reset Function
8564
0 4 read/write 0 Interrupt Mask
8665
bit 0: peer interrupt (rev 0)
@@ -145,18 +124,20 @@ With multiple MSI-X vectors, different vectors can be used to indicate
145124
different events have occurred. The semantics of interrupt vectors
146125
are left to the application.
147126

148-
149-
== Interrupt infrastructure ==
127+
Interrupt infrastructure
128+
========================
150129

151130
When configured for interrupts, the peers share eventfd objects in
152131
addition to shared memory. The shared resources are managed by an
153132
ivshmem server.
154133

155-
=== The ivshmem server ===
134+
The ivshmem server
135+
------------------
156136

157137
The server listens on a UNIX domain socket.
158138

159139
For each new client that connects to the server, the server
140+
160141
- picks an ID,
161142
- creates eventfd file descriptors for the interrupt vectors,
162143
- sends the ID and the file descriptor for the shared memory to the
@@ -189,7 +170,8 @@ vectors.
189170
A standalone client is in contrib/ivshmem-client/. It can be useful
190171
for debugging.
191172

192-
=== The ivshmem Client-Server Protocol ===
173+
The ivshmem Client-Server Protocol
174+
----------------------------------
193175

194176
An ivshmem device configured for interrupts connects to an ivshmem
195177
server. This section details the protocol between the two.
@@ -245,7 +227,8 @@ Known bugs:
245227

246228
* The protocol is poorly designed.
247229

248-
=== The ivshmem Client-Client Protocol ===
230+
The ivshmem Client-Client Protocol
231+
----------------------------------
249232

250233
An ivshmem device configured for interrupts receives eventfd file
251234
descriptors for interrupting peers and getting interrupted by peers

docs/specs/pci-ids.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ maintained as part of the virtio specification.
5050
by QEMU.
5151

5252
1af4:1110
53-
ivshmem device (shared memory, ``docs/specs/ivshmem-spec.txt``)
53+
ivshmem device (:doc:`ivshmem-spec`)
5454

5555
All other device IDs are reserved.
5656

0 commit comments

Comments
 (0)