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

Ping: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen


  • To: Andrew Lutomirski <luto@xxxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 25 May 2022 10:55:34 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yTR9Yx/HbeSF5EVcNf6OID05W1togWox6q4GWfB34ks=; b=YHxXvqOxlA3/YSD3IMXG/nEAOX27ZGC5sPn/R6TsRUp9OWVUAeWobcill3xAOhqSOPZYJiFKY56BueaR4eUgaOdIOmmYZ2iEz/wGX7lb3LWlPznQc7L8YcDocLwhfLhkxG9wonnp6Wzcnneu+5D9HXalpECPTsF3PVAHBIvVaXJ2xtfxzIiY++IT5W8Wiss6c6F4wdvCa9k19Uie+wSxPKqi709h6mp+9tsstSmA3tQLlkfYOCO789qd+tZKHd24dl7Iy/84RKU9gZb+inhn9SNTI4WFf0GfNaRIsHdtOvjU+DNNnRNX8O/IA/Tb9BYqdplRGNyGh6vpCIQOGnnRkw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KbAUAAaK87wjQJSEh8TQ+PhDvqKgZGWOzZqeIdYNCm/y4IfzlJgY4iDlJAjlaoT1s1SYQKeDCV7pi/V/Bap3LPGVDPPfnZb+gx/Kq5V8nlnKK241TeJRuHG4PFMYvuKOPzFLmJvk0hsOM34bZIolUng2O9VTJPxZbiqY/Tj5upkUouVomFREZxU0XJXYEmuwkzy9wjV7caxNnNcOFS/Xlxr5Eas/CislUPdk9T4/miSndqW/Jhf9mWbwkriZZKHTuJ2kt/Lm993oMWuOM1Mcvybaqx1gkFj7w5Ybm4Gcx++/A+ea3OOco9v5xOs7H+OByMUxX7jcStkZYnHDLmMZqA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Thorsten Leemhuis <regressions@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 25 May 2022 08:55:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.04.2022 16:50, Jan Beulich wrote:
> The latest with commit bdd8b6c98239 ("drm/i915: replace X86_FEATURE_PAT
> with pat_enabled()") pat_enabled() returning false (because of PAT
> initialization being suppressed in the absence of MTRRs being announced
> to be available) has become a problem: The i915 driver now fails to
> initialize when running PV on Xen (i915_gem_object_pin_map() is where I
> located the induced failure), and its error handling is flaky enough to
> (at least sometimes) result in a hung system.
> 
> Yet even beyond that problem the keying of the use of WC mappings to
> pat_enabled() (see arch_can_pci_mmap_wc()) means that in particular
> graphics frame buffer accesses would have been quite a bit less
> performant than possible.
> 
> Arrange for the function to return true in such environments, without
> undermining the rest of PAT MSR management logic considering PAT to be
> disabled: Specifically, no writes to the PAT MSR should occur.
> 
> For the new boolean to live in .init.data, init_cache_modes() also needs
> moving to .init.text (where it could/should have lived already before).
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

The Linux kernel regression tracker is pestering me because things are
taking so long (effectively quoting him), and alternative proposals
made so far look to have more severe downsides.

Thanks, Jan




 


Rackspace

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