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

Re: [Xen-devel] Live migration with MMIO pages

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Live migration with MMIO pages
From: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
Date: Wed, 31 Oct 2007 17:14:17 +0000
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 31 Oct 2007 10:15:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C34E615E.17BA5%Keir.Fraser@xxxxxxxxxxxx>
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>
References: <C34E615E.17BA5%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2007-10-31 at 16:44 +0000, Keir Fraser wrote:
> On 31/10/07 16:34, "Kieran Mansley" <kmansley@xxxxxxxxxxxxxx> wrote:
> 
> > Yes.  The reason it's failing is that sh_page_fault() in
> > xen/arch/x86/mm/shadow/multi.c thinks it's a bad gfn:
> > 
> >     if ( !p2m_is_valid(p2mt) || (!(p2m_is_mmio(p2mt) || mfn_valid
> > (gmfn))) )
> >     {
> >         perfc_incr(shadow_fault_bail_bad_gfn);
> >         SHADOW_PRINTK("BAD gfn=%"SH_PRI_gfn" gmfn=%"PRI_mfn"\n",
> >                       gfn_x(gfn), mfn_x(gmfn));
> >         goto not_a_shadow_fault;
> >     }
> > 
> > I think the problem is that set_mmio_p2m_entry() isn't getting called
> > when the IO mapping is established.  There are three places where
> > iomem_permit_access() is called:
> 
> No, basically that pagefault-handler check is nonsense for a PV guest. We
> don't have a p2m table in Xen for PV guests because they are not 'translated
> mode'. So there is nowhere for us to store the 'mmio' p2m type.
> 
> Perhaps Tim has a good idea what to do here. Adding a
> !shadow_mode_translate() condition to the if statement would probably work
> but I'm not sure it's the neatest answer.

Avoiding that if statement isn't sufficient to fix the problem - it
still doesn't seem to correctly re-enable writing to the page, even
though xenperf tells me that "calls to shadow fault" == "shadow_fault
fixed fault" (i.e. the code now thinks it's successfully done what it
should).

Kieran


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