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

Re: [Xen-devel] Invalid types between save and restore, Xen 3.1.4


  • To: Jean-Yves Migeon <jeanyves.migeon@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • Date: Thu, 04 Dec 2008 18:12:14 +0000
  • Cc:
  • Delivery-date: Thu, 04 Dec 2008 10:12:40 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AclWO9Vl2YZVwz0djUWqq9Jw0WqP2w==
  • Thread-topic: [Xen-devel] Invalid types between save and restore, Xen 3.1.4

On 04/12/2008 17:26, "Jean-Yves Migeon" <jeanyves.migeon@xxxxxxx> wrote:

> What I would like to know is the kind of operations that could result on
> such a situation. Considering that the xentools should have an accurate
> view of the pfn_types through the p2m table, how could it become
> possible that between save and restore, hypervisor refuses to validate
> pages, as mappings should not change after the call to HYPERVISOR_suspend()?
> 
> For example, why is Xen expecting a writable mapping while the page is
> validated as L1?

My guess is that Xen's existing save/restore code is not compatible with
your 'alternative' recursive PDs. For such a recursive PD to be detected,
the PD being mapped must *already* be validated as a PD. Otherwise (let's
assume 2-level pagetables for a moment, with levels called PD and PT) if the
mapped PD is not yet validated, it will by default get validated as a PT!

This explains what you see: the pages mapped by the PD are not interpreted
as PTs but as data pages (because Xen has erroneously decided that the PD is
a PT). Then it will try to validate them as writable data pages and get
confused because some of them are already validated as pagetable pages!

How to fix this... Well:
 (a) Hack xc_domain_save.c and xc_domain_restore.c a bunch. Not fun.
 (b) In the NetBSD kernel, zap alternative recursive PDs before suspending
yourself. If this is possible it will save you a headache. Perhaps you can
flush them somehow, or otherwise zap _PAGE_PRESENT and then reinstate it
yourself during resume?

If you have to go down route (a)... I'd have to think a bit about how best
to fix the issue.

Oh, I'll add that this whole issue will definitely not exist for *self*
recursive PDs. Those will work no problem.

 -- Keir



_______________________________________________
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®.