From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Max Gurtovoy <mgurtovoy@nvidia.com>,
"virtio-comment@lists.oasis-open.org"
<virtio-comment@lists.oasis-open.org>,
"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>,
Jason Gunthorpe <jgg@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: Thu, 19 Aug 2021 10:58:58 -0400 [thread overview]
Message-ID: <20210819104216-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <5b4db3ac-0291-69ea-7e82-5b3f19049e61@redhat.com>
On Thu, Aug 19, 2021 at 10:44:46AM +0800, Jason Wang wrote:
> >
> > The PF device will have an option to quiesce/freeze the VF device.
>
>
> Is such design a must? If no, why not simply introduce those functions in
> the VF?
Many IOMMUs only support protections at the function level.
Thus we need ability to have one device (e.g. a PF)
to control migration of another (e.g. a VF).
This is because allowing VF to access hypervisor memory used for
migration is not a good idea.
For IOMMUs that support subfunctions, these "devices" could be
subfunctions.
The only alternative is to keep things in device memory which
does not need an IOMMU.
I guess we'd end up with something like a VQ in device memory which might
be tricky from multiple points of view, but yes, this could be
useful and people did ask for such a capability in the past.
> If yes, what's the reason for making virtio different (e.g VCPU live
> migration is not designed like that)?
I think the main difference is we need PF's help for memory
tracking for pre-copy migration anyway. Might as well integrate
the rest of state in the same channel.
Another answer is that CPUs trivially switch between
functions by switching the active page tables. For PCI DMA
it is all much trickier sine the page tables can be separate
from the device, and assumed to be mostly static.
So if you want to create something like the VMCS then
again you either need some help from another device or
put it in device memory.
--
MST
next prev parent reply other threads:[~2021-08-19 14:58 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 [this message]
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
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=20210819104216-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=aadam@redhat.com \
--cc=ailan@redhat.com \
--cc=bodong@nvidia.com \
--cc=cohuck@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=jgg@nvidia.com \
--cc=liranl@nvidia.com \
--cc=mgurtovoy@nvidia.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.