qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: "Lan, Tianyu" <tianyu.lan@intel.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Cc: Wei Yang <weiyang@linux.vnet.ibm.com>,
	"Tantilov, Emil S" <emil.s.tantilov@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"Rustad, Mark D" <mark.d.rustad@intel.com>,
	"Wyborny, Carolyn" <carolyn.wyborny@intel.com>,
	Eric Auger <eric.auger@linaro.org>,
	"Skidmore, Donald C" <donald.c.skidmore@intel.com>,
	"zajec5@gmail.com" <zajec5@gmail.com>,
	Alexander Graf <agraf@suse.de>,
	intel-wired-lan <intel-wired-lan@lists.osuosl.org>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	Or Gerlitz <gerlitz.or@gmail.com>,
	"Williams, Mitch A" <mitch.a.williams@intel.com>,
	"Jani, Nrupal" <nrupal.jani@intel.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"a.motakis@virtualopensystems.com"
	<a.motakis@virtualopensystems.com>,
	"b.reynal@virtualopensystems.com"
	<b.reynal@virtualopensystems.com>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
	"Nelson, Shannon" <shannon.nelson@intel.com>,
	"Dong, Eddie" <eddie.dong@intel.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ronciak, John" <john.ronciak@intel.com>,
	Netdev <netdev@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC
Date: Fri, 4 Dec 2015 09:07:57 -0800	[thread overview]
Message-ID: <5661C86D.3010904@gmail.com> (raw)
In-Reply-To: <5661C000.8070201@intel.com>

On 12/04/2015 08:32 AM, Lan, Tianyu wrote:
> Hi Michael & Alexander:
> Thanks a lot for your comments and suggestions.
>
> We still need to support Windows guest for migration and this is why our
> patches keep all changes in the driver since it's impossible to change
> Windows kernel.

That is a poor argument.  I highly doubt Microsoft is interested in 
having to modify all of the drivers that will support direct assignment 
in order to support migration.  They would likely request something 
similar to what I have in that they will want a way to do DMA tracking 
with minimal modification required to the drivers.

> Following is my idea to do DMA tracking.
>
> Inject event to VF driver after memory iterate stage
> and before stop VCPU and then VF driver marks dirty all
> using DMA memory. The new allocated pages also need to
> be marked dirty before stopping VCPU. All dirty memory
> in this time slot will be migrated until stop-and-copy
> stage. We also need to make sure to disable VF via clearing the
> bus master enable bit for VF before migrating these memory.

The ordering of your explanation here doesn't quite work.  What needs to 
happen is that you have to disable DMA and then mark the pages as dirty. 
  What the disabling of the BME does is signal to the hypervisor that 
the device is now stopped.  The ixgbevf_suspend call already supported 
by the driver is almost exactly what is needed to take care of something 
like this.

The question is how we would go about triggering it.  I really don't 
think the PCI configuration space approach is the right idea.  I wonder 
if we couldn't get away with some sort of ACPI event instead.  We 
already require ACPI support in order to shut down the system 
gracefully, I wonder if we couldn't get away with something similar in 
order to suspend/resume the direct assigned devices gracefully.

> The dma page allocated by VF driver also needs to reserve space
> to do dummy write.

No, this will not work.  If for example you have a VF driver allocating 
memory for a 9K receive how will that work?  It isn't as if you can poke 
a hole in the contiguous memory.

  reply	other threads:[~2015-12-04 17:08 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 13:38 [Qemu-devel] [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC Lan Tianyu
2015-11-24 13:38 ` [Qemu-devel] [RFC PATCH V2 1/3] VFIO: Add new ioctl cmd VFIO_GET_PCI_CAP_INFO Lan Tianyu
2015-11-24 13:38 ` [Qemu-devel] [RFC PATCH V2 2/3] PCI: Add macros for faked PCI migration capability Lan Tianyu
2015-11-24 13:38 ` [Qemu-devel] [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver Lan Tianyu
2015-11-24 21:20   ` Michael S. Tsirkin
2015-11-25  5:39     ` Alexander Duyck
2015-11-25  5:39     ` Lan Tianyu
2015-11-25 12:28       ` Michael S. Tsirkin
2015-11-25 16:02         ` Lan, Tianyu
2015-11-25 16:22           ` Michael S. Tsirkin
2015-11-25 16:24           ` Alexander Duyck
2015-11-25 16:39             ` Michael S. Tsirkin
2015-11-25 17:24               ` Alexander Duyck
2015-11-24 14:20 ` [Qemu-devel] [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC Alexander Duyck
2015-11-25  3:18   ` Lan Tianyu
2015-11-25  5:30     ` Alexander Duyck
2015-11-25  8:21       ` Lan Tianyu
2015-11-25 15:32         ` Alexander Duyck
2015-11-26  3:15           ` Dong, Eddie
2015-11-26  3:56             ` Alexander Duyck
2015-11-30  6:53               ` Lan, Tianyu
2015-11-30 16:07                 ` Alexander Duyck
2015-12-01 15:04                   ` Lan, Tianyu
2015-12-01 15:28                     ` Michael S. Tsirkin
2015-12-01 17:04                       ` Alexander Duyck
2015-12-01 17:37                         ` Michael S. Tsirkin
2015-12-01 18:36                           ` Alexander Duyck
2015-12-02 11:44                             ` Michael S. Tsirkin
2015-12-04 16:32                               ` Lan, Tianyu
2015-12-04 17:07                                 ` Alexander Duyck [this message]
2015-12-07 15:40                                   ` Lan, Tianyu
2015-12-07 17:12                                     ` Alexander Duyck
2015-12-07 17:39                                       ` Michael S. Tsirkin
2015-12-07 18:42                                         ` Alexander Duyck
2015-12-09  9:28                                       ` Lan, Tianyu
2015-12-09 16:36                                         ` Alexander Duyck
2015-12-09 10:37                                 ` Michael S. Tsirkin
2015-12-09 11:19                                   ` Lan, Tianyu
2015-12-09 11:28                                     ` Michael S. Tsirkin
2015-12-09 11:41                                       ` Lan, Tianyu

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=5661C86D.3010904@gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=a.motakis@virtualopensystems.com \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=b.reynal@virtualopensystems.com \
    --cc=bhelgaas@google.com \
    --cc=carolyn.wyborny@intel.com \
    --cc=donald.c.skidmore@intel.com \
    --cc=eddie.dong@intel.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=eric.auger@linaro.org \
    --cc=gerlitz.or@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.d.rustad@intel.com \
    --cc=mitch.a.williams@intel.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nrupal.jani@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.nelson@intel.com \
    --cc=tianyu.lan@intel.com \
    --cc=weiyang@linux.vnet.ibm.com \
    --cc=zajec5@gmail.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).