qemu/docs/system/s390x/pcidevices.rst
Sebastian Mitterle e59a59a457 docs/s390x/pcidevices: document pci devices on s390x
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>
2023-01-30 13:43:53 +01:00

42 lines
1.4 KiB
ReStructuredText

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
...