[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/31] docs/specs: Convert pci-testdev.txt to rst
From: |
Michael S. Tsirkin |
Subject: |
[PULL 29/31] docs/specs: Convert pci-testdev.txt to rst |
Date: |
Tue, 25 Apr 2023 03:46:33 -0400 |
From: Peter Maydell <peter.maydell@linaro.org>
Convert pci-testdev.txt to reStructuredText. Includes
some minor wordsmithing.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230420160334.1048224-4-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
docs/specs/pci-testdev.txt | 31 ------------------------------
docs/specs/index.rst | 1 +
docs/specs/pci-ids.rst | 2 +-
docs/specs/pci-testdev.rst | 39 ++++++++++++++++++++++++++++++++++++++
4 files changed, 41 insertions(+), 32 deletions(-)
delete mode 100644 docs/specs/pci-testdev.txt
create mode 100644 docs/specs/pci-testdev.rst
diff --git a/docs/specs/pci-testdev.txt b/docs/specs/pci-testdev.txt
deleted file mode 100644
index 4280a1e73c..0000000000
--- a/docs/specs/pci-testdev.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-pci-test is a device used for testing low level IO
-
-device implements up to three BARs: BAR0, BAR1 and BAR2.
-Each of BAR 0+1 can be memory or IO. Guests must detect
-BAR types and act accordingly.
-
-BAR 0+1 size is up to 4K bytes each.
-BAR 0+1 starts with the following header:
-
-typedef struct PCITestDevHdr {
- uint8_t test; <- write-only, starts a given test number
- uint8_t width_type; <- read-only, type and width of access for a given
test.
- 1,2,4 for byte,word or long write.
- any other value if test not supported on this BAR
- uint8_t pad0[2];
- uint32_t offset; <- read-only, offset in this BAR for a given test
- uint32_t data; <- read-only, data to use for a given test
- uint32_t count; <- for debugging. number of writes detected.
- uint8_t name[]; <- for debugging. 0-terminated ASCII string.
-} PCITestDevHdr;
-
-All registers are little endian.
-
-device is expected to always implement tests 0 to N on each BAR, and to add new
-tests with higher numbers. In this way a guest can scan test numbers until it
-detects an access type that it does not support on this BAR, then stop.
-
-BAR2 is a 64bit memory bar, without backing storage. It is disabled
-by default and can be enabled using the membar=<size> property. This
-can be used to test whether guests handle pci bars of a specific
-(possibly quite large) size correctly.
diff --git a/docs/specs/index.rst b/docs/specs/index.rst
index dfa136073c..e58be38c41 100644
--- a/docs/specs/index.rst
+++ b/docs/specs/index.rst
@@ -10,6 +10,7 @@ guest hardware that is specific to QEMU.
pci-ids
pci-serial
+ pci-testdev
ppc-xive
ppc-spapr-xive
ppc-spapr-numa
diff --git a/docs/specs/pci-ids.rst b/docs/specs/pci-ids.rst
index 7bc7168fb6..e302bea484 100644
--- a/docs/specs/pci-ids.rst
+++ b/docs/specs/pci-ids.rst
@@ -69,7 +69,7 @@ PCI devices (other than virtio):
1b36:0004
PCI Quad-port 16550A adapter (:doc:`pci-serial`)
1b36:0005
- PCI test device (``docs/specs/pci-testdev.txt``)
+ PCI test device (:doc:`pci-testdev`)
1b36:0006
PCI Rocker Ethernet switch device
1b36:0007
diff --git a/docs/specs/pci-testdev.rst b/docs/specs/pci-testdev.rst
new file mode 100644
index 0000000000..4b6d36543b
--- /dev/null
+++ b/docs/specs/pci-testdev.rst
@@ -0,0 +1,39 @@
+====================
+QEMU PCI test device
+====================
+
+``pci-testdev`` is a device used for testing low level IO.
+
+The device implements up to three BARs: BAR0, BAR1 and BAR2.
+Each of BAR 0+1 can be memory or IO. Guests must detect
+BAR types and act accordingly.
+
+BAR 0+1 size is up to 4K bytes each.
+BAR 0+1 starts with the following header:
+
+.. code-block:: c
+
+ typedef struct PCITestDevHdr {
+ uint8_t test; /* write-only, starts a given test number */
+ uint8_t width_type; /*
+ * read-only, type and width of access for a given
test.
+ * 1,2,4 for byte,word or long write.
+ * any other value if test not supported on this BAR
+ */
+ uint8_t pad0[2];
+ uint32_t offset; /* read-only, offset in this BAR for a given test */
+ uint32_t data; /* read-only, data to use for a given test */
+ uint32_t count; /* for debugging. number of writes detected. */
+ uint8_t name[]; /* for debugging. 0-terminated ASCII string. */
+ } PCITestDevHdr;
+
+All registers are little endian.
+
+The device is expected to always implement tests 0 to N on each BAR, and to
add new
+tests with higher numbers. In this way a guest can scan test numbers until it
+detects an access type that it does not support on this BAR, then stop.
+
+BAR2 is a 64bit memory BAR, without backing storage. It is disabled
+by default and can be enabled using the ``membar=<size>`` property. This
+can be used to test whether guests handle PCI BARs of a specific
+(possibly quite large) size correctly.
--
MST
- [PULL 15/31] hw: Add compat machines for 8.1, (continued)
- [PULL 15/31] hw: Add compat machines for 8.1, Michael S. Tsirkin, 2023/04/25
- [PULL 16/31] pci: avoid accessing slot_reserved_mask directly outside of pci.c, Michael S. Tsirkin, 2023/04/25
- [PULL 17/31] vhost-user-blk-server: notify client about disk resize, Michael S. Tsirkin, 2023/04/25
- [PULL 18/31] Add my old and new work email mapping and use work email to support acpi, Michael S. Tsirkin, 2023/04/25
- [PULL 20/31] tests: bios-tables-test: replace memset with initializer, Michael S. Tsirkin, 2023/04/25
- [PULL 19/31] hw/acpi: limit warning on acpi table size to pc machines older than version 2.3, Michael S. Tsirkin, 2023/04/25
- [PULL 23/31] intel_iommu: refine iotlb hash calculation, Michael S. Tsirkin, 2023/04/25
- [PULL 25/31] virtio: i2c: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX, Michael S. Tsirkin, 2023/04/25
- [PULL 21/31] MAINTAINERS: Add Eugenio Pérez as vhost-shadow-virtqueue reviewer, Michael S. Tsirkin, 2023/04/25
- [PULL 29/31] docs/specs: Convert pci-testdev.txt to rst,
Michael S. Tsirkin <=
- [PULL 28/31] docs/specs: Convert pci-serial.txt to rst, Michael S. Tsirkin, 2023/04/25
- [PULL 31/31] hw/pci-bridge: Make PCIe and CXL PXB Devices inherit from TYPE_PXB_DEV, Michael S. Tsirkin, 2023/04/25
- [PULL 27/31] docs/specs/pci-ids: Convert from txt to rST, Michael S. Tsirkin, 2023/04/25
- [PULL 26/31] acpi: pcihp: allow repeating hot-unplug requests, Michael S. Tsirkin, 2023/04/25
- [PULL 22/31] docs/cxl: Fix sentence, Michael S. Tsirkin, 2023/04/25
- [PULL 30/31] hw/pci-bridge: pci_expander_bridge fix type in pxb_cxl_dev_reset(), Michael S. Tsirkin, 2023/04/25
- [PULL 24/31] docs: Remove obsolete descriptions of SR-IOV support, Michael S. Tsirkin, 2023/04/25
- Re: [PULL 00/31] virtio,pc,pci: fixes, features, cleanups, Richard Henderson, 2023/04/25