xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86/PV: fix unintended dependency of m2p-strict mode on migration-v2
Date: Mon, 1 Feb 2016 17:31:45 +0000	[thread overview]
Message-ID: <56AF9681.9070206@citrix.com> (raw)
In-Reply-To: <56AF9B2A02000078000CD22D@prv-mh.provo.novell.com>

On 01/02/16 16:51, Jan Beulich wrote:
>>>> On 01.02.16 at 17:34, <andrew.cooper3@citrix.com> wrote:
>> On 01/02/16 16:28, Jan Beulich wrote:
>>>>>> On 01.02.16 at 15:07, <andrew.cooper3@citrix.com> wrote:
>>>> On 01/02/16 13:20, Jan Beulich wrote:
>>>>> Ping? (I'd really like to get this resolved, so we don't need to
>>>>> indefinitely run with non-upstream behavior in our distros.)
>>>> My remaining issue is whether this loop gets executed by default.
>>>>
>>>> I realise that there is a difference between legacy and v2 migration,
>>>> and that v2 migration by default worked.  If that means we managed to
>>>> skip this loop in its entirety for v2, then I am far less concerned
>>>> about the overhead.
>>> But had been there before: Of course we could skip the loop if
>>> the bit in d->vm_assist doesn't change. But as expressed before,
>>> with you having already indicated that perhaps it would be better
>>> to have v2 migration do the relevant operations in the other (v1)
>>> order, the moment that was actually done the benefit of avoiding
>>> the loop would be gone.
>>>
>>> To be clear - if rendering the code dead (which is what you ask
>>> for) until v2 migration happens to get changed is the only way to
>>> get this code in, I will submit a v2 with that extra conditional.
>> Migration v2 currently loads vcpu context before pinning the pagetables,
>> which means that the vm_assist should get set up properly, before L4
>> tables are processed.
>>
>> It was my understanding that this is the correct way around, and
>> m2p-strict mode only broke when you backported it to migration v1 systems?
> Yes, but when we discussed this you said "in hindsight, it would have
> been more sensible to swap pin and vCPU context, but I guess that
> would break m2p-strict in the same way", and whether one is more
> "correct" than the other is pretty questionable.

Right, but as it currently stands, migration v2 gets things the correct
way around?

Does that mean that, at the moment, this loop ends up getting skipped?

If it does, then the patch is fine.

The suggestion to swap the actions around was only to work around the
apparent error caused by continutions while loading vcpu0's state,
caused by auditing and pinning all the pagetables hanging off %cr3/%cr1.

If however there is a legitimate reason, such as this, to keep the
current order of operations, then it would be counterproductive to make
any changes to migration v2.

~Andrew

  reply	other threads:[~2016-02-01 17:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 10:08 [PATCH] x86/PV: fix unintended dependency of m2p-strict mode on migration-v2 Jan Beulich
2016-01-12 11:55 ` Andrew Cooper
2016-01-12 15:19   ` Jan Beulich
2016-01-13 15:25     ` Andrew Cooper
2016-01-13 15:36       ` Jan Beulich
2016-01-13 16:00         ` Andrew Cooper
2016-01-13 16:15           ` Jan Beulich
2016-02-01 13:20             ` Jan Beulich
2016-02-01 14:07               ` Andrew Cooper
2016-02-01 16:28                 ` Jan Beulich
2016-02-01 16:34                   ` Andrew Cooper
2016-02-01 16:51                     ` Jan Beulich
2016-02-01 17:31                       ` Andrew Cooper [this message]
2016-02-02 10:21                         ` Jan Beulich
2016-02-02 14:08                         ` Jan Beulich

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=56AF9681.9070206@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).