WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Live migration with MMIO pages

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Live migration with MMIO pages
From: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
Date: Wed, 31 Oct 2007 12:19:59 +0000
Delivery-date: Wed, 31 Oct 2007 05:21:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I'm trying to track down some strange behaviour I see when doing live
migration.  Looking at the code that copies the pages across in xen-
unstable.hg/tools/libxc/xc_domain_save.c I see there's a test that
avoids doing anything with pages that are MMIO if it's an HVM domain:

                /* Skip PFNs that aren't really there */
                if ( hvm && ((n >= 0xa0 && n < 0xc0) /* VGA hole */
                             || (n >= (HVM_BELOW_4G_MMIO_START >> PAGE_SHIFT) 
                                 && n < (1ULL<<32) >> PAGE_SHIFT)) /* MMIO */ )
                    continue;

However there's no equivalent test for a non-HVM domain.  I think adding
such a test to just ignore any MMIO pages would help.  The MMIO pages
will be unmapped when the live migration finally suspends the domain
(and so the migration should be possible), but accessing them in the
mean time is probably not a good idea.  Non-live migration is fine
because the domain (and so all its devices) are suspended in advance,
and the MMIO pages are unmapped.

This code is running in dom0, and so I think will need some help from
the hypervisor to get the range of mfns that they hypervisor has
reserved for MMIO.  It could then compare the mfn to that range and
ignore it if there's a match.  Does this sound sensible?  Is there an
API to get this information already?  Any chance of a patch to fix this
making it into 3.2.0?

Kieran  


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel