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

Re: [PATCH][4.15] x86/shadow: suppress "fast fault path" optimization without reserved bits


  • To: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 1 Mar 2021 17:34:15 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SwQ2z7c558Ji6M3CPWbw5WzYaOJmV2STZbVt+okV4FY=; b=dQyk+E+13DJ97b2wdkiFwGqc4Wbbucx0HEwfpw38sGt9pUMExBbiIJhnLxs2iQBQzCvPie4VgZAuBxZf3w5rAdiUgrkwUKf2MIPABQChlEh86mYUAJ/WXVPJeYzqOHcJtrqSnWAJLphgdpHR3YVoRbQ4Pd/4TBeXApfKE9Z3V8GyzQcghCnfUAzfbyHpoVSyQRaX/3F/LBaaVIasF/hVQECXhxRnSG6DAzfGU9gLRWBDUAKAOso4lu0bUqm7qrmj9OYp66zk5AjKpl2tKrHisRYfFyOQV5uW0iO3bRvnaNdCB4M6kEHTqwRXgIh1ZENKY6huN3kF/1OUPxJWgTAzGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q5O4z6U9EjluUpk9o9e4HHPsY+aWFrxeIZjSm8SwnIYc282RxVx0AMj4rfWD0REM03849HEvhzq9k5qa21ZBpzUzmyGGTwpDmiIboYVF9EeFGgvy5y76ZN5KUFqYtT2yBY2WfnCG7Gk6NP9c9Xr3FJ6piIOVSL1PCFZLLvje/6HDYPD2hVlK7MT66Rvwnd6u6ZIDn++GJHCTdP9G1DB6SPi65TERweoowZD+sQ4lyc70u+EfCEQFjuGvzU6lmrsk/rkYt+UkBBVENmCzV2QjjmZlzUK5OfAdg0XOid3qkyK32TLebg6g5VnyVJ79uPt++5FG1st1C2KQrSqPXqY5nw==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Tim Deegan <tim@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 01 Mar 2021 17:34:30 +0000
  • Ironport-sdr: acOxFDHKlY+t2BvIEz25gkiFzPtLxVJWMFqNwWgLSH0lDCeamDh8v7OFRziwEwsqzO9QAp8rSR mjPsUEMEsj4d2+VVzTY3XJAkPSO9g7BzdVp9/2sxip426yBio/gJ2koRWTHDkIov9mNx6bc7Cx NjZ8MLNIQQVh6fKHeUCfOWyiv+2G9het3c55/3fXd/0l5jI+fjqwBzCwe5zPHbH5E91dL/dOSV Xf4kCPIwmiuPxRVMorTc+SJnJhng05YiUAaDO+IL1baleoeiP1YGIB4lJVnR6P01rg2wcZUO7E Voc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

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.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.