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

Re: [Xen-devel] [PATCH 7/8] HVM save restore: shadow fix



On Thu, Jan 18, 2007 at 04:31:13PM +0000, Tim Deegan wrote:
> At 22:12 +0800 on 11 Jan (1168553551), Zhai, Edwin wrote:
> > [PATCH 7/8] HVM save restore: shadow fix
> > 
> > Signed-off-by: Zhai Edwin <edwin.zhai@xxxxxxxxx>
> > 
> > fix 2 shadow issues:
> > * restored guest's mem type_info are not correct
> 
> In what way?  And why are you fixing that in the shadow
> pagetable-promotion path rather than the restore path?  
> If the pagetable pages are wrong, are other pages wrong too?
> 

my comments are not accurate. long time ago i have fixed this bug that happen 
when restore. pls. correct me if something wrong. 

sh_make_shadow=>shadow_promote=>sh_remove_write_access would promote a shadow 
page and crash domain if type_info has no PGT_writable_page set. 

comments as: /* If this isn't a "normal" writeable page, the domain is trying 
to 
* put pagetables in special memory of some kind.  We can't allow that. */

at that time, HVM restore always reach this bug point, while creation is okay.
it's reasonable since created guest would access the page before promotion, but 
restored guest always start with "untouched" page.

now, this bug seems disappeared, maybe fixed by new shadow changes:)
we can revisit it in future.

> > +    {
> > +        struct page_info *page = mfn_to_page(gmfn);
> > +        /* XXX: add it to emulate a touched page */
> > +        if ((page->u.inuse.type_info & PGT_type_mask) == PGT_none){
> > +            page->u.inuse.type_info |= (PGT_writable_page | PGT_validated);
> > +        }
> > +    }
> > +
> 
> Should this be gated to only happen to HVM guests?
> 
> Cheers,
> 
> Tim.
> 

-- 
best rgds,
edwin

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