From: Matthew Rosato <mjrosato@linux.ibm.com>
To: Niklas Schnelle <schnelle@linux.ibm.com>,
alex.williamson@redhat.com, cohuck@redhat.com
Cc: pmorel@linux.ibm.com, borntraeger@de.ibm.com, hca@linux.ibm.com,
gor@linux.ibm.com, gerald.schaefer@linux.ibm.com,
linux-s390@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] vfio-pci/zdev: Introduce the zPCI I/O vfio region
Date: Thu, 21 Jan 2021 10:57:12 -0500 [thread overview]
Message-ID: <594f94fd-d725-bc3f-31d1-2d7333234682@linux.ibm.com> (raw)
In-Reply-To: <5d048eb9-72e5-e713-5c1a-56a1c3d957c4@linux.ibm.com>
On 1/21/21 5:01 AM, Niklas Schnelle wrote:
>
>
> On 1/19/21 9:02 PM, Matthew Rosato wrote:
>> Some s390 PCI devices (e.g. ISM) perform I/O operations that have very
>> specific requirements in terms of alignment as well as the patterns in
>> which the data is read/written. Allowing these to proceed through the
>> typical vfio_pci_bar_rw path will cause them to be broken in up in such a
>> way that these requirements can't be guaranteed. In addition, ISM devices
>> do not support the MIO codepaths that might be triggered on vfio I/O coming
>> from userspace; we must be able to ensure that these devices use the
>> non-MIO instructions. To facilitate this, provide a new vfio region by
>> which non-MIO instructions can be passed directly to the host kernel s390
>> PCI layer, to be reliably issued as non-MIO instructions.
>>
>> This patch introduces the new vfio VFIO_REGION_SUBTYPE_IBM_ZPCI_IO region
>> and implements the ability to pass PCISTB and PCILG instructions over it,
>> as these are what is required for ISM devices.
>>
>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>> ---
>> drivers/vfio/pci/vfio_pci.c | 8 ++
>> drivers/vfio/pci/vfio_pci_private.h | 6 ++
>> drivers/vfio/pci/vfio_pci_zdev.c | 158 ++++++++++++++++++++++++++++++++++++
>> include/uapi/linux/vfio.h | 4 +
>> include/uapi/linux/vfio_zdev.h | 33 ++++++++
>> 5 files changed, 209 insertions(+)
>
> Related to the discussion on the QEMU side, if we have a check
> to make sure this is only used for ISM, then this patch should
> make that clear in its wording and also in the paths
> (drivers/vfio/pci/vfio_pci_ism.c instead of vfio_pci_zdev.c.)
> This also has precedent with the region for IGD in
> drivers/vfio/pci/vfio_pci_igd.c.
>
This is a fair point, but just to tie up threads here -- the QEMU
discussion has since moved towards making the use-case less restrictive
rather than ISM-only (though getting ISM working is still the motivating
factor here). So as such I think I'd prefer to keep this in
vfio_pci_zdev.c as other hardware could use the region if they meet the
necessary criteria.
next prev parent reply other threads:[~2021-01-21 16:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 20:02 [PATCH 0/4] vfio-pci/zdev: Fixing s390 vfio-pci ISM support Matthew Rosato
2021-01-19 20:02 ` [PATCH 1/4] s390/pci: track alignment/length strictness for zpci_dev Matthew Rosato
2021-01-19 20:02 ` [PATCH 2/4] vfio-pci/zdev: Pass the relaxed alignment flag Matthew Rosato
2021-01-19 20:02 ` [PATCH 3/4] s390/pci: Get hardware-reported max store block length Matthew Rosato
2021-01-19 20:02 ` [PATCH 4/4] vfio-pci/zdev: Introduce the zPCI I/O vfio region Matthew Rosato
2021-01-20 13:21 ` Niklas Schnelle
2021-01-20 17:10 ` Matthew Rosato
2021-01-20 17:28 ` Niklas Schnelle
2021-01-20 17:40 ` Matthew Rosato
2021-01-21 20:50 ` Alex Williamson
2021-01-21 10:01 ` Niklas Schnelle
2021-01-21 15:57 ` Matthew Rosato [this message]
2021-01-22 23:48 ` Alex Williamson
2021-01-25 14:40 ` Matthew Rosato
2021-01-25 15:42 ` Cornelia Huck
2021-01-25 15:52 ` Matthew Rosato
2021-01-26 23:18 ` Alex Williamson
2021-01-27 14:23 ` Matthew Rosato
2021-01-27 15:53 ` Alex Williamson
2021-01-27 17:45 ` Cornelia Huck
2021-01-27 18:27 ` Matthew Rosato
2021-01-19 20:50 ` [PATCH 0/4] vfio-pci/zdev: Fixing s390 vfio-pci ISM support Matthew Rosato
2021-01-20 9:02 ` Pierre Morel
2021-01-20 14:02 ` Matthew Rosato
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=594f94fd-d725-bc3f-31d1-2d7333234682@linux.ibm.com \
--to=mjrosato@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pmorel@linux.ibm.com \
--cc=schnelle@linux.ibm.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).