From: Alex Williamson <alex.williamson@redhat.com>
To: Xu Yilun <yilun.xu@intel.com>
Cc: mdf@kernel.org, kwankhede@nvidia.com, linux-fpga@vger.kernel.org,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
trix@redhat.com, lgoncalv@redhat.com,
Matthew Gerlach <matthew.gerlach@linux.intel.com>,
"Raj, Ashok" <ashok.raj@intel.com>
Subject: Re: [PATCH 3/3] Documentation: fpga: dfl: Add description for VFIO Mdev support
Date: Tue, 8 Sep 2020 15:10:02 -0600 [thread overview]
Message-ID: <20200908151002.553ed7ae@w520.home> (raw)
In-Reply-To: <1599549212-24253-4-git-send-email-yilun.xu@intel.com>
On Tue, 8 Sep 2020 15:13:32 +0800
Xu Yilun <yilun.xu@intel.com> wrote:
> This patch adds description for VFIO Mdev support for dfl devices on
> dfl bus.
>
> Signed-off-by: Xu Yilun <yilun.xu@intel.com>
> Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
> ---
> Documentation/fpga/dfl.rst | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/Documentation/fpga/dfl.rst b/Documentation/fpga/dfl.rst
> index 0404fe6..f077754 100644
> --- a/Documentation/fpga/dfl.rst
> +++ b/Documentation/fpga/dfl.rst
> @@ -502,6 +502,26 @@ FME Partial Reconfiguration Sub Feature driver (see drivers/fpga/dfl-fme-pr.c)
> could be a reference.
>
>
> +VFIO Mdev support for DFL devices
> +=================================
> +As we introduced a dfl bus for private features, they could be added to dfl bus
> +as independent dfl devices. There is a requirement to handle these devices
> +either by kernel drivers or by direct access from userspace. Usually we bind
> +the kernel drivers to devices which provide board management functions, and
> +gives user direct access to devices which cooperate closely with user
> +controlled Accelerated Function Unit (AFU). We realize this with a VFIO Mdev
> +implementation. When we bind the vfio-mdev-dfl driver to a dfl device, it
> +realizes a group of callbacks and registers to the Mdev framework as a
> +parent (physical) device. It could then create one (available_instances == 1)
> +mdev device.
> +Since dfl devices are sub devices of FPGA DFL physical devices (e.g. PCIE
> +device), which provide no DMA isolation for each sub device, this may leads to
> +DMA isolation problem if a private feature is designed to be capable of DMA.
> +The AFU user could potentially access the whole device addressing space and
> +impact the private feature. So now the general HW design rule is, no DMA
> +capability for private features. It eliminates the DMA isolation problem.
What's the advantage of entangling mdev/vfio in this approach versus
simply exposing the MMIO region of the device via sysfs (similar to a
resource file in pci-sysfs)? This implementation doesn't support
interrupts, it doesn't support multiplexing of a device, it doesn't
perform any degree of mediation, it seems to simply say "please don't
do DMA". I don't think that's acceptable for an mdev driver. If you
want to play loose with isolation, do it somewhere else. Thanks,
Alex
next prev parent reply other threads:[~2020-09-08 21:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 7:13 [PATCH 0/3] add VFIO mdev support for DFL devices Xu Yilun
2020-09-08 7:13 ` [PATCH 1/3] fpga: dfl: add driver_override support Xu Yilun
2020-09-08 7:13 ` [PATCH 2/3] fpga: dfl: VFIO mdev support for DFL devices Xu Yilun
2020-09-08 7:13 ` [PATCH 3/3] Documentation: fpga: dfl: Add description for VFIO Mdev support Xu Yilun
2020-09-08 21:10 ` Alex Williamson [this message]
2020-09-10 8:32 ` Xu Yilun
2020-09-10 15:49 ` Alex Williamson
2020-09-11 6:32 ` Xu Yilun
2020-09-09 21:13 ` [PATCH 0/3] add VFIO mdev support for DFL devices Tom Rix
2020-09-10 9:08 ` Xu Yilun
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=20200908151002.553ed7ae@w520.home \
--to=alex.williamson@redhat.com \
--cc=ashok.raj@intel.com \
--cc=kvm@vger.kernel.org \
--cc=kwankhede@nvidia.com \
--cc=lgoncalv@redhat.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.gerlach@linux.intel.com \
--cc=mdf@kernel.org \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.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).