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: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Date: Wed, 31 Oct 2007 17:31:26 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 31 Oct 2007 10:32:01 -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: <1193848479.4094.47.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C34E615E.17BA5%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
At 16:44 +0000 on 31 Oct (1193849054), Keir Fraser wrote:
> On 31/10/07 16:34, "Kieran Mansley" <kmansley@xxxxxxxxxxxxxx> wrote:

> >     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;
> >     }
 
> 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.

Hmm.

The p2m_is_valid() check is OK because that always passes for PV guests.
The check for mfn_valid() is failing because MMIO frames aren't "valid".

For HVM guests we let that pass if the GFN is known to be acceptable
MMIO (by its p2m type).  There needs to be an equivalent get-out here
for PV guests -- iomem_access_permitted(d, mfn_x(gmfn), mfn_x(gmfn))
should do.

You'll need to add the same test in _sh_propagate(), where it checks again
that the target MFN is sane:

    if ( !mfn_valid(target_mfn) && (p2mt != p2m_mmio_direct) )
    {
        ASSERT((ft == ft_prefetch));
        *sp = shadow_l1e_empty();
        goto done;
    }

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Principal Software Engineer, Citrix Systems.
[Company #5334508: XenSource UK Ltd, c/o EC2Y 5EB, UK.]

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