From: Jason Gunthorpe <jgg@nvidia.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Max Gurtovoy <mgurtovoy@nvidia.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"virtio-comment@lists.oasis-open.org"
<virtio-comment@lists.oasis-open.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"cohuck@redhat.com" <cohuck@redhat.com>,
Parav Pandit <parav@nvidia.com>,
Shahaf Shuler <shahafs@nvidia.com>, Ariel Adam <aadam@redhat.com>,
Amnon Ilan <ailan@redhat.com>, Bodong Wang <bodong@nvidia.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Eugenio Perez Martin <eperezma@redhat.com>,
Liran Liss <liranl@nvidia.com>, Oren Duer <oren@nvidia.com>
Subject: Re: [virtio-comment] Live Migration of Virtio Virtual Function
Date: Tue, 24 Aug 2021 10:10:07 -0300 [thread overview]
Message-ID: <20210824131007.GT1721383@nvidia.com> (raw)
In-Reply-To: <CACGkMEuT-VZC6vvqOYMEHP7hapSw4Qh-t7_9JercB79ezi-TWg@mail.gmail.com>
On Tue, Aug 24, 2021 at 10:41:54AM +0800, Jason Wang wrote:
> > migration exposed to the guest ? No.
>
> Can you explain why?
For the SRIOV case migration is a privileged operation of the
hypervisor. The guest must not be allowed to interact with it in any
way otherwise the hypervisor migration could be attacked from the
guest and this has definite security implications.
In practice this means that nothing related to migration can be
located on the MMIO pages/queues/etc of the VF. The reasons for this
are a bit complicated and has to do with the limitations of IO
isolation with VFIO - eg you can't reliably split a single PCI BDF
into hypervisor/guest security domains without PASID.
We recently revisited this concept again with a HNS vfio driver. IIRC
Intel messed it up in their mdev driver too.
> > >>> Let's open another thread for this if you wish, it has nothing related
> > >>> to the spec but how it is implemented in Linux. If you search the
> > >>> archive, something similar to "vfio_virtio_pci" has been proposed
> > >>> several years before by Intel. The idea has been rejected, and we have
> > >>> leveraged Linux vDPA bus for virtio-pci devices.
That was largely because Intel was proposing to use mdevs to create an
entire VDPA subsystem hidden inside VFIO.
We've invested in a pure VFIO solution which should be merged soon:
https://lore.kernel.org/kvm/20210819161914.7ad2e80e.alex.williamson@redhat.com/
It does not rely on mdevs. It is not trying to recreate VDPA. Instead
the HW provides a fully functional virto VF and the solution uses
normal SRIOV approaches.
You can contrast this with the two virtio-net solutions mlx5 will
support:
- One is the existing hypervisor assisted VDPA solution where the mlx5
driver does HW accelerated queue processing.
- The other one is a full PCI VF that provides a virtio-net function
without any hypervisor assistance. In this case we will have a VFIO
migration driver as above that to provide SRIOV VF live migration.
I see in this thread that these two things are becoming quite
confused. They are very different, have different security postures
and use different parts of the hypervisor stack, and intended for
quite different use cases.
> Your proposal works only for PCI with SR-IOV. And I want to leverage
> it to be useful for other platforms or transport. That's all my
> motivation.
I've read most of the emails here I still don't see what the use case
is for this beyond PCI SRIOV.
In a general sense it requires virtio to specify how PASID works. No
matter what we must create a split secure/guest world where DMAs from
each world are uniquely tagged. In the pure PCI world this means
either using PF/VF or VF/PASID.
In general PASID still has a long road to go before it is working in
Linux:
https://lore.kernel.org/kvm/BN9PR11MB5433B1E4AE5B0480369F97178C189@BN9PR11MB5433.namprd11.prod.outlook.com/
So, IMHO, it make sense to focus on the PF/VF definition for spec
purposes.
I agree it would be good spec design to have a general concept of a
secure and guest world and specific sections that defines how it works
for different scenarios, but that seems like a language remark and not
one about the design. For instance the admin queue Max is adding is
clearly part of the secure world and putting it on the PF is the only
option for the SRIOV mode.
Jason
next prev parent reply other threads:[~2021-08-24 13:10 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 12:08 Live Migration of Virtio Virtual Function Max Gurtovoy
2021-08-17 8:51 ` [virtio-comment] " Jason Wang
2021-08-17 9:11 ` Max Gurtovoy
2021-08-17 9:44 ` Jason Wang
2021-08-18 9:15 ` Max Gurtovoy
2021-08-18 10:46 ` Jason Wang
2021-08-18 11:45 ` Max Gurtovoy
2021-08-19 2:44 ` Jason Wang
2021-08-19 14:58 ` Michael S. Tsirkin
2021-08-20 2:17 ` Jason Wang
2021-08-20 7:03 ` Michael S. Tsirkin
2021-08-20 7:49 ` Jason Wang
2021-08-20 11:06 ` Michael S. Tsirkin
2021-08-23 3:20 ` Jason Wang
2021-08-23 12:08 ` Dr. David Alan Gilbert
2021-08-24 3:00 ` Jason Wang
2021-08-19 11:12 ` Dr. David Alan Gilbert
2021-08-19 14:16 ` Max Gurtovoy
2021-08-19 14:24 ` Dr. David Alan Gilbert
2021-08-19 15:20 ` Max Gurtovoy
2021-08-20 2:24 ` Jason Wang
2021-08-20 10:26 ` Max Gurtovoy
2021-08-20 11:16 ` Jason Wang
2021-08-22 10:05 ` Max Gurtovoy
2021-08-23 3:10 ` Jason Wang
2021-08-23 8:55 ` Max Gurtovoy
2021-08-24 2:41 ` Jason Wang
2021-08-24 13:10 ` Jason Gunthorpe [this message]
2021-08-25 4:58 ` Jason Wang
2021-08-25 18:13 ` Jason Gunthorpe
2021-08-26 3:15 ` Jason Wang
2021-08-26 12:27 ` Jason Gunthorpe
2021-08-23 12:18 ` Dr. David Alan Gilbert
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=20210824131007.GT1721383@nvidia.com \
--to=jgg@nvidia.com \
--cc=aadam@redhat.com \
--cc=ailan@redhat.com \
--cc=bodong@nvidia.com \
--cc=cohuck@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=liranl@nvidia.com \
--cc=mgurtovoy@nvidia.com \
--cc=mst@redhat.com \
--cc=oren@nvidia.com \
--cc=parav@nvidia.com \
--cc=shahafs@nvidia.com \
--cc=stefanha@redhat.com \
--cc=virtio-comment@lists.oasis-open.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.