[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/27] docs/s390x/pcidevices: document pci devices on s390x
From: |
Thomas Huth |
Subject: |
[PULL 22/27] docs/s390x/pcidevices: document pci devices on s390x |
Date: |
Tue, 31 Jan 2023 11:12:00 +0100 |
From: Sebastian Mitterle <smitterl@redhat.com>
Add some documentation about the zpci device and how
to use it with pci devices on s390x.
Used source: Cornelia Huck's blog post
https://people.redhat.com/~cohuck/2018/02/19/notes-on-pci-on-s390x.html
Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Message-Id: <20230127123349.55294-1-smitterl@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
docs/system/s390x/pcidevices.rst | 41 ++++++++++++++++++++++++++++++++
docs/system/target-s390x.rst | 1 +
2 files changed, 42 insertions(+)
create mode 100644 docs/system/s390x/pcidevices.rst
diff --git a/docs/system/s390x/pcidevices.rst b/docs/system/s390x/pcidevices.rst
new file mode 100644
index 0000000000..628effa2f4
--- /dev/null
+++ b/docs/system/s390x/pcidevices.rst
@@ -0,0 +1,41 @@
+PCI devices on s390x
+====================
+
+PCI devices on s390x work differently than on other architectures and need to
+be configured in a slightly different way.
+
+Every PCI device is linked with an additional ``zpci`` device.
+While the ``zpci`` device will be autogenerated if not specified, it is
+recommended to specify it explicitly so that you can pass s390-specific
+PCI configuration.
+
+For example, in order to pass a PCI device ``0000:00:00.0`` through to the
+guest, you would specify::
+
+ qemu-system-s390x ... \
+ -device zpci,uid=1,fid=0,target=hostdev0,id=zpci1 \
+ -device vfio-pci,host=0000:00:00.0,id=hostdev0
+
+Here, the zpci device is joined with the PCI device via the ``target``
property.
+
+Note that we don't set bus, slot or function here for the guest as is common in
+other PCI implementations. Topology information is not available on s390x, and
+the guest will not see any of the bus, slot or function information specified
+on the command line.
+
+Instead, ``uid`` and ``fid`` determine how the device is presented to the guest
+operating system.
+
+In case of Linux, ``uid`` will be used in the ``domain`` part of the PCI
+identifier, and ``fid`` identifies the physical slot, i.e.::
+
+ qemu-system-s390x ... \
+ -device zpci,uid=7,fid=8,target=hostdev0,id=zpci1 \
+ ...
+
+will be presented in the guest as::
+
+ # lspci -v
+ 0007:00:00.0 ...
+ Physical Slot: 00000008
+ ...
diff --git a/docs/system/target-s390x.rst b/docs/system/target-s390x.rst
index c636f64113..f6f11433c7 100644
--- a/docs/system/target-s390x.rst
+++ b/docs/system/target-s390x.rst
@@ -26,6 +26,7 @@ or vfio-ap is also available.
s390x/css
s390x/3270
s390x/vfio-ccw
+ s390x/pcidevices
Architectural features
======================
--
2.31.1
- [PULL 20/27] tests/qtest/vnc-display-test: Disable on Darwin, (continued)
- [PULL 20/27] tests/qtest/vnc-display-test: Disable on Darwin, Thomas Huth, 2023/01/31
- [PULL 11/27] qemu/bswap: Remove <byteswap.h> dependency, Thomas Huth, 2023/01/31
- [PULL 14/27] qemu/bswap: Use compiler __builtin_bswap() on NetBSD, Thomas Huth, 2023/01/31
- [PULL 10/27] qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap(), Thomas Huth, 2023/01/31
- [PULL 16/27] docs/about/deprecated: Mark HAXM in QEMU as deprecated, Thomas Huth, 2023/01/31
- [PULL 19/27] tests/qtest/vnc-display-test: Use the 'none' machine, Thomas Huth, 2023/01/31
- [PULL 21/27] tests/qtest/boot-serial-test: Constify tests[] array, Thomas Huth, 2023/01/31
- [PULL 12/27] qemu/bswap: Use compiler __builtin_bswap() on Haiku, Thomas Huth, 2023/01/31
- [PULL 07/27] travis.yml: Remove the generic addons section, Thomas Huth, 2023/01/31
- [PULL 18/27] tests/qtest/vnc-display-test: Suppress build warnings on Windows, Thomas Huth, 2023/01/31
- [PULL 22/27] docs/s390x/pcidevices: document pci devices on s390x,
Thomas Huth <=
- [PULL 23/27] qapi, audio: add query-audiodev command, Thomas Huth, 2023/01/31
- [PULL 04/27] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none', Thomas Huth, 2023/01/31
- [PULL 24/27] qapi, audio: Make introspection reflect build configuration more closely, Thomas Huth, 2023/01/31
- [PULL 26/27] tests/qtest/display-vga-test: Add proper checks if a device is available, Thomas Huth, 2023/01/31
- [PULL 27/27] gitlab-ci.d/buildtest: Merge the --without-default-* jobs, Thomas Huth, 2023/01/31
- [PULL 25/27] gitlab-ci.d/buildtest: Remove ppc-softmmu from the clang-system job, Thomas Huth, 2023/01/31