From: Cornelia Huck <cohuck@redhat.com>
To: Sebastian Mitterle <smitterl@redhat.com>, qemu-devel@nongnu.org
Cc: thuth@redhat.com, clegoate@redhat.com, qemu-trivial@nongnu.org,
qemu-s390x@nongnu.org
Subject: Re: [PATCH v2] docs/s390x/pcidevices: document pci devices on s390x
Date: Fri, 27 Jan 2023 11:30:13 +0100 [thread overview]
Message-ID: <87h6wcuv62.fsf@redhat.com> (raw)
In-Reply-To: <20230127084604.53175-1-smitterl@redhat.com>
On Fri, Jan 27 2023, Sebastian Mitterle <smitterl@redhat.com> wrote:
> 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>
> ---
> v2: move section below 'Device support'
> ---
> docs/system/s390x/pcidevices.rst | 34 ++++++++++++++++++++++++++++++++
> docs/system/target-s390x.rst | 1 +
> 2 files changed, 35 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..fec905d6e6
> --- /dev/null
> +++ b/docs/system/s390x/pcidevices.rst
> @@ -0,0 +1,34 @@
> +PCI devices on s390x
> +====================
> +
> +PCI devices on s390x work differently than on other architectures.
add "and need to be configured in a slightly different way." ?
> +
> +To start with, using a PCI device requires the additional ``zpci`` device. For example,
I think the "zpci" device is not technically "required" (ISTR that we
autogenerate it, if needed); however, you need it if you actually want
to specify uid/fid/... what about:
"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."
?
> +in order to pass a PCI device ``0000:00:00.0`` through you'd 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. Instead, ``uid``
"Topology information is not available on s390x, and the guest will not
see any of the bus/slot/function information specified on the command
line."
?
> +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
> + ...
> +
> +Finally, note that you might have to enable the ``zpci`` feature in the cpu model in oder to use
> +it.
I'm wondering what the current state of that feature is -- is it present
by default in the newer named models? (My original blog entry was
written nearly five years ago ;)
next prev parent reply other threads:[~2023-01-27 10:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 8:46 [PATCH v2] docs/s390x/pcidevices: document pci devices on s390x Sebastian Mitterle
2023-01-27 9:24 ` Thomas Huth
2023-01-27 12:08 ` Sebastian Mitterle
2023-01-27 9:24 ` Cédric Le Goater
2023-01-27 10:30 ` Cornelia Huck [this message]
2023-01-27 12:17 ` Sebastian Mitterle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6wcuv62.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=clegoate@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=smitterl@redhat.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).