From: Tim Deegan <Tim.Deegan@eu.citrix.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: Live migration with MMIO pages
Date: Wed, 31 Oct 2007 17:31:26 +0000 [thread overview]
Message-ID: <20071031173126.GA15566@york.uk.xensource.com> (raw)
In-Reply-To: <C34E615E.17BA5%Keir.Fraser@cl.cam.ac.uk>
At 16:44 +0000 on 31 Oct (1193849054), Keir Fraser wrote:
> On 31/10/07 16:34, "Kieran Mansley" <kmansley@solarflare.com> 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@eu.citrix.com>
Principal Software Engineer, Citrix Systems.
[Company #5334508: XenSource UK Ltd, c/o EC2Y 5EB, UK.]
next prev parent reply other threads:[~2007-10-31 17:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 12:19 Live migration with MMIO pages Kieran Mansley
2007-10-31 13:32 ` Keir Fraser
2007-10-31 14:03 ` Kieran Mansley
2007-10-31 14:08 ` Keir Fraser
2007-10-31 16:34 ` Kieran Mansley
2007-10-31 16:44 ` Keir Fraser
2007-10-31 17:14 ` Kieran Mansley
2007-10-31 17:31 ` Tim Deegan [this message]
2007-10-31 18:23 ` Keir Fraser
2007-11-01 11:18 ` Kieran Mansley
2007-11-01 11:34 ` Tim Deegan
2007-11-01 16:36 ` Kieran Mansley
2007-11-01 16:43 ` Tim Deegan
2007-11-02 9:31 ` Kieran Mansley
2007-11-02 10:42 ` Keir Fraser
2007-11-02 10:51 ` Keir Fraser
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=20071031173126.GA15566@york.uk.xensource.com \
--to=tim.deegan@eu.citrix.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.