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

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 5 Mar 2021 15:47:00 +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=cBvmCpWeivhct2l3cWCJCAq+equeVvw0k7lCfio0RFo=; b=TUjjdwJb+N4Zx4eC35j2/93J/yAvDVCFyU1J0AWxBlA5OvrlwzprSWZf9dW58yRttlIRdGEZtFoVlzAdWVP62/rUXzKVLfQkUM2G9fmKck571Ly4h+RSugoS4/zqdByjjLS1tEm8pB8UK2So4J/cbQrmyl0sGGUMv5Em4anIjzxnzkJQek4NEOMWkTDASJBpmC58Z2yUJ0SXy1BvyodqhQbNVPv95vBaco1FwWXR7ixCDULn2VoLIRap29NK8GQvDh4Lk0mvA2utiPDAw0Ra4igFqaz8VIvcb6IQpbbMyaODzm4Dm3ij3cc/zd4173/eHiuV6IcNmQTAK3AtSMXs0A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c7cPw6nhmrEx+/2SGcs2B6dAEGq4uXzX+gah/zJD5Mc4k4hu1vQCQJdLdoaqsZ7ozaOKMIOXPrY2bmOpYS7ua6JUTQf8LfZFQG0rioWAfJAJPPkOw7DX+eiuhmDLXGfY8NlUCBOw34rz6/twlUyf5jqOkKfD2castnFurVmXQi+hUD5tMFAtqQJNA12f7ImRgh7WgHTRXF5dGfCaU+xbwiEDLelMirtJLHYMxQS0JeNOcOcfD9moBl/R5h0ooBZPe9EAXEhHtXunv+QaeGZlcxGmcywKNF2Xyr6oYGpO42t0015xk6wEJ7edCde+me+kpcyF67Jh3Tb5CPLVvfPGVg==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Tim Deegan <tim@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Fri, 05 Mar 2021 15:47:29 +0000
  • Ironport-sdr: eoluYMCfTLpbChRQx9AB3M27GVRXl6vrUfWtX/AmCXKBvwAy3OHyQy5BnJIDUg20VIPeizooyA iAC1zrJHeRGxLUqmRwOUXbTL75caeVihBrDCmX2mnXM5gyHoS8iZpuloxGZmEX/0dAeIACJoyw z8OrroT1r4rHoau7+7krLgD3xG8ddEWHaeAAR8Awa50pCkJq09mS8QhWXpdON1V5miQMm/c/nt 4C8gWsKC4zoppJ/WrDzzX85r2JGI1Bcw+kYgE3iA4dwp1ICrdojdmakMbHWHNnhBI/z7bBA/Ue FaU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05/03/2021 15:37, Jan Beulich wrote:
> We can't make correctness of our own behavior dependent upon a
> hypervisor underneath us correctly telling us the true physical address
> with hardware uses. Without knowing this, we can't be certain reserved
> bit faults can actually be observed. Therefore, besides evaluating the
> number of address bits when deciding whether to use the optimization,
> also check whether we're running virtualized ourselves.

I think it would be helpful to point out why we can't even probe at boot
- the behaviour may genuinely change as we migrate, and if we ever end
up on an IceLake system levelled down for compatibility with older CPUs,
the "paddr_bits < PADDR_BITS" check will malfunction in an unsafe way.

>
> Requested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

This wants backporting to stable releases, so I would recommend for 4.15
even at this point.

~Andrew




 


Rackspace

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