[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.