From: Alex Williamson <alex.williamson@redhat.com>
To: "Zhang, Yulei" <yulei.zhang@intel.com>
Cc: "Cédric Le Goater" <clg@kaod.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Juan Quintela" <quintela@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Tian, Kevin" <kevin.tian@intel.com>,
"joonas.lahtinen@linux.intel.com"
<joonas.lahtinen@linux.intel.com>,
"zhenyuw@linux.intel.com" <zhenyuw@linux.intel.com>,
"kwankhede@nvidia.com" <kwankhede@nvidia.com>,
"Wang, Zhi A" <zhi.a.wang@intel.com>
Subject: Re: [Qemu-devel] [RFC PATCH] migration: discard RAMBlocks of type ram_device
Date: Thu, 12 Apr 2018 10:23:10 -0600 [thread overview]
Message-ID: <20180412102310.51725f49@w520.home> (raw)
In-Reply-To: <01FDBDDE256B79498DC57789713132D46A15ADFF@SHSMSX101.ccr.corp.intel.com>
On Thu, 12 Apr 2018 15:59:24 +0000
"Zhang, Yulei" <yulei.zhang@intel.com> wrote:
> > -----Original Message-----
> > From: Alex Williamson [mailto:alex.williamson@redhat.com]
> > Sent: Thursday, April 12, 2018 1:55 AM
> > To: Cédric Le Goater <clg@kaod.org>
> > Cc: qemu-devel@nongnu.org; Juan Quintela <quintela@redhat.com>; Dr .
> > David Alan Gilbert <dgilbert@redhat.com>; David Gibson
> > <david@gibson.dropbear.id.au>; Zhang, Yulei <yulei.zhang@intel.com>; Tian,
> > Kevin <kevin.tian@intel.com>; joonas.lahtinen@linux.intel.com;
> > zhenyuw@linux.intel.com; kwankhede@nvidia.com; Wang, Zhi A
> > <zhi.a.wang@intel.com>
> > Subject: Re: [Qemu-devel] [RFC PATCH] migration: discard RAMBlocks of type
> > ram_device
> >
> > [cc +folks working on vfio-mdev migration]
> >
> > On Wed, 11 Apr 2018 19:20:14 +0200
> > Cédric Le Goater <clg@kaod.org> wrote:
> >
> > > Here is some context for this strange change request.
> > >
> > > On the POWER9 processor, the XIVE interrupt controller can control
> > > interrupt sources using MMIO to trigger events, to EOI or to turn off
> > > the sources. Priority management and interrupt acknowledgment is also
> > > controlled by MMIO in the presenter subengine.
> > >
> > > These MMIO regions are exposed to guests in QEMU with a set of 'ram
> > > device' memory mappings, similarly to VFIO, and the VMAs are populated
> > > dynamically with the appropriate pages using a fault handler.
> > >
> > > But, these regions are an issue for migration. We need to discard the
> > > associated RAMBlocks from the RAM state on the source VM and let the
> > > destination VM rebuild the memory mappings on the new host in the
> > > post_load() operation just before resuming the system.
> > >
> > > This is the goal of the following proposal. Does it make sense ? It
> > > seems to be working enough to migrate a running guest but there might
> > > be a better, more subtle, approach.
> >
> > Yulei, is this something you've run into with GVT-g migration? I don't see
> > how we can read from or write to ram_device regions in a useful way during
> > migration anyway, so the change initially looks correct to me.
> > Thanks,
> >
> > Alex
> >
>
> Didn't meet such issue before. I think the change will be fine if the vendor driver
> handle the reconstruction well on the target side. And I agree with Dave's suggestion,
> how about vendor driver report a flag about the mapped region to indicate it can
> be registered as migratable memory block or not.
"migration" and "memory blocks" are not vfio concepts, you'd need to
come up with flags that actually conveys the device level property of
the region that you're trying to indicate. I don't see why we'd do
this though, the application of such a flag seems too narrow and it
tarnishes the concept that a vendor driver provides a region, through
which *all* device state is saved and restored. Thanks,
Alex
next prev parent reply other threads:[~2018-04-12 16:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 17:20 [Qemu-devel] [RFC PATCH] migration: discard RAMBlocks of type ram_device Cédric Le Goater
2018-04-11 17:55 ` Alex Williamson
2018-04-11 19:04 ` Kirti Wankhede
2018-04-12 15:59 ` Zhang, Yulei
2018-04-12 16:23 ` Alex Williamson [this message]
2018-04-13 6:00 ` Kirti Wankhede
2018-04-11 19:21 ` Dr. David Alan Gilbert
2018-04-12 7:02 ` Cédric Le Goater
2018-04-12 8:11 ` Dr. David Alan Gilbert
2018-04-12 9:03 ` Peter Maydell
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=20180412102310.51725f49@w520.home \
--to=alex.williamson@redhat.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=dgilbert@redhat.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kevin.tian@intel.com \
--cc=kwankhede@nvidia.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=yulei.zhang@intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.a.wang@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).