All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Ian Jackson <iwj@xenproject.org>
Cc: "Tim Deegan" <tim@xen.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>
Subject: Re: [PATCH][4.15] x86/shadow: suppress "fast fault path" optimization without reserved bits
Date: Tue, 2 Mar 2021 11:22:17 +0100	[thread overview]
Message-ID: <fb542bda-d25e-b286-400f-dfb54bfe55d4@suse.com> (raw)
In-Reply-To: <24637.10160.977640.808417@mariner.uk.xensource.com>

On 01.03.2021 18:43, Ian Jackson wrote:
> Andrew Cooper writes ("Re: [PATCH][4.15] x86/shadow: suppress "fast fault path" optimization without reserved bits"):
>> On 01/03/2021 17:30, Ian Jackson wrote:
>>> Jan Beulich writes ("Re: [PATCH][4.15] x86/shadow: suppress "fast fault path" optimization without reserved bits"):
>>>> On 26.02.2021 18:07, Tim Deegan wrote:
>>>>> Yes, I think it could be reduced to use just one reserved address bit.
>>>>> IIRC we just used such a large mask so the magic entries would be
>>>>> really obvious in debugging, and there was no need to support arbitrary
>>>>> address widths for emulated devices.
>>>> Will cook a patch, albeit I guess I'll keep as many of the bits set
>>>> as possible, while still being able to encode a full-40-bit GFN.
>>>>
>>>> Ian - I don't suppose you'd consider this a reasonable thing to do
>>>> for 4.15? It would allow limiting the negative (performance) effect
>>>> the change here has.
>>> I'm afraid I don't follow enough of the background here to have an
>>> opinion right now.  Can someone explain to me the risks (and,
>>> correspondingly, upsides) of the options ?  Sorry to be dim, I don't
>>> seem to be firing on all cylinders today.

I guess the risk from that patch is no different than that from the
patch here. It would merely improve performance for guests using
very large GFNs for memory areas needing emulation by qemu, which I
suppose originally wasn't expected to be happening in the first place.
In fact if I would have been certain there are no side effects of the
too narrow GFN representation used so far, I would probably have
submitted the patches in reverse order, or even folded them.

>> Intel IceLake CPUs (imminently coming out) have no reserved bits in
>> pagetable entries, so these "optimisations" malfunction.  It is
>> definitely an issue for HVM Shadow guests, and possibly migration of PV
>> guests (I can never remember whether we use the GNP fastpath on PV or not).
>>
>> It is arguably wrong that we ever depended on reserved behaviour.
>>
>> I've got a (not-yet-upsteamed) XTF test which can comprehensively test
>> this.  I'll find some time to give them a spin and give a T-by.
>>
>> Without this fix, some combinations of "normal" VM settings will
>> malfunction.
> 
> Thanks for that explanation.
> 
> I don't quite follow how that relates to Jan's comment
> 
>  >> Will cook a patch, albeit I guess I'll keep as many of the bits set
>  >> as possible, while still being able to encode a full-40-bit GFN.
>  >>
>  >> Ian - I don't suppose you'd consider this a reasonable thing to do
>  >> for 4.15? It would allow limiting the negative (performance) effect
>  >> the change here has.
> 
> I already gave a release-ack for the original patch.  I think Jan is
> asking for a release-ack for a different way of fixing the problem.

Well, I was trying to negotiate whether I should submit that patch
for 4.15, or only later for 4.16.

Jan


  reply	other threads:[~2021-03-02 10:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 13:03 [PATCH][4.15] x86/shadow: suppress "fast fault path" optimization without reserved bits Jan Beulich
2021-02-25 13:11 ` Jan Beulich
2021-02-25 13:20   ` Ian Jackson
2021-02-25 13:25     ` Jan Beulich
2021-02-25 13:17 ` Ian Jackson
2021-02-25 13:30   ` Jan Beulich
2021-02-26 17:07 ` Tim Deegan
2021-03-01  8:10   ` Jan Beulich
2021-03-01 17:30     ` Ian Jackson
2021-03-01 17:34       ` Andrew Cooper
2021-03-01 17:43         ` Ian Jackson
2021-03-02 10:22           ` Jan Beulich [this message]
2021-03-02 12:32             ` Ian Jackson
2021-03-02 13:17               ` Jan Beulich
2021-03-02 10:12         ` 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=fb542bda-d25e-b286-400f-dfb54bfe55d4@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=roger.pau@citrix.com \
    --cc=tim@xen.org \
    --cc=wl@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 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.