From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Hongyang Yang <yanghy@cn.fujitsu.com>, xen-devel@lists.xen.org
Cc: rshriram@cs.ubc.ca, Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com
Subject: Re: [RFC PATCH 3/3] remus: adjust x86 pv restore to support remus
Date: Thu, 10 Jul 2014 10:42:23 +0100 [thread overview]
Message-ID: <53BE5FFF.6030706@citrix.com> (raw)
In-Reply-To: <53BE5DC6.5040906@cn.fujitsu.com>
On 10/07/14 10:32, Hongyang Yang wrote:
>
>
> On 07/10/2014 05:25 PM, Andrew Cooper wrote:
>> On 10/07/14 04:30, Hongyang Yang wrote:
>>>
>>>
>>> On 07/09/2014 07:26 PM, Andrew Cooper wrote:
>>>> On 09/07/14 12:16, Andrew Cooper wrote:
>>>>> On 09/07/14 08:47, Yang Hongyang wrote:
>>>>>> cache vcpu context when restore, and set context when stream
>>>>>> complete.
>>>>> Can you explain why this is needed? I can't see why it should be
>>>>> required.
>>>>
>>>> Actually, as part of reviewing this I have worked out why this is
>>>> needed.
>>>>
>>>> It is a latent bug in the migration v2 series with all the x86 pv vcpu
>>>> state (not just the basic state), which is not triggered by a well
>>>> behaved sender.
>>>>
>>>> I shall fix it up in the base series.
>>>
>>> That's great, remember the bug I talked to you on IRC last time? This
>>> patch was targeted to avoid the bug, but I don't know why this bug
>>> happened, which I can tell is that if we don't cache the state,
>>> we will get mapping error when restore the CPU state next time,
>>> can you explain it in detail? Thanks in advance.
>>
>> Once you have loaded cr3 (and cr1 for 64bit guests) once, the pages
>> containing pagetable data turn into real pagetables, after which the
>> restorer can no longer map them RW and update their contents.
>
> That's the point, thank you for the explanation! I was wondering how
> you will fix it up? defer the load of the cr3 by cacheing the cpu state
> or something else? maybe pin/unpin pagetables will also help?
The pagetable pinning is already deferred until after the end record.
The vcpu basic records need deferring until the after the end record,
but the rest of the vcpu state should also be deferred (even if only to
avoid performing the hypercalls repeatedly).
~Andrew
next prev parent reply other threads:[~2014-07-10 9:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 7:47 [RFC PATCH 0/3] Remus: add remus support for migration v2 Yang Hongyang
2014-07-09 7:47 ` [RFC PATCH 1/3] remus: add a bool var to indicate checkpointed stream Yang Hongyang
2014-07-09 9:45 ` Andrew Cooper
2014-07-09 9:53 ` Hongyang Yang
2014-07-09 7:47 ` [RFC PATCH 2/3] remus: implement remus checkpoint in v2 save Yang Hongyang
2014-07-09 10:53 ` Andrew Cooper
2014-07-10 3:25 ` Hongyang Yang
2014-07-10 8:49 ` Ian Campbell
2014-07-10 9:24 ` Andrew Cooper
2014-07-16 15:22 ` Shriram Rajagopalan
2014-07-16 15:38 ` Andrew Cooper
2014-07-16 16:02 ` Shriram Rajagopalan
2014-07-16 16:33 ` Andrew Cooper
2014-07-09 7:47 ` [RFC PATCH 3/3] remus: adjust x86 pv restore to support remus Yang Hongyang
2014-07-09 11:16 ` Andrew Cooper
2014-07-09 11:26 ` Andrew Cooper
2014-07-10 3:30 ` Hongyang Yang
2014-07-10 9:25 ` Andrew Cooper
2014-07-10 9:32 ` Hongyang Yang
2014-07-10 9:42 ` Andrew Cooper [this message]
2014-07-10 9:47 ` Hongyang Yang
2014-07-09 8:53 ` [RFC PATCH 0/3] Remus: add remus support for migration v2 Ian Campbell
2014-07-09 9:56 ` Hongyang Yang
2014-07-09 9:42 ` Andrew Cooper
2014-07-09 10:06 ` Hongyang Yang
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=53BE5FFF.6030706@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=rshriram@cs.ubc.ca \
--cc=xen-devel@lists.xen.org \
--cc=yanghy@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).