From: Keir Fraser Subject: Re: Live migration with MMIO pages Date: Wed, 31 Oct 2007 16:44:14 +0000 Message-ID: References: <1193848479.4094.47.camel@moonstone.uk.level5networks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1193848479.4094.47.camel@moonstone.uk.level5networks.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kieran Mansley , xen-devel@lists.xensource.com Cc: Tim Deegan List-Id: xen-devel@lists.xenproject.org On 31/10/07 16:34, "Kieran Mansley" 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. -- Keir