All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: Tim Deegan <Tim.Deegan@xensource.com>
Cc: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
	xen-devel@lists.xensource.com, "Zhai,
	Edwin" <edwin.zhai@intel.com>
Subject: Re: [PATCH 7/8] HVM save restore: shadow fix
Date: Fri, 19 Jan 2007 13:05:50 +0800	[thread overview]
Message-ID: <20070119050550.GQ10106@edwin-srv.sh.intel.com> (raw)
In-Reply-To: <20070118163113.GI18763@york.uk.xensource.com>

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@intel.com>
> > 
> > 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

      reply	other threads:[~2007-01-19  5:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-11 14:12 [PATCH 7/8] HVM save restore: shadow fix Zhai, Edwin
2007-01-18 16:31 ` Tim Deegan
2007-01-19  5:05   ` Zhai, Edwin [this message]

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=20070119050550.GQ10106@edwin-srv.sh.intel.com \
    --to=edwin.zhai@intel.com \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Tim.Deegan@xensource.com \
    --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.