Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp768109imw; Thu, 14 Jul 2022 10:23:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1szRYsXbeJRMQ4aDb8U8fJxUBdM3sH+5M4rRPzGXe5g5WTN2vmfxfcIboZIPkWYifBGpSie X-Received: by 2002:a65:41ca:0:b0:408:aa25:5026 with SMTP id b10-20020a6541ca000000b00408aa255026mr8914816pgq.96.1657819397618; Thu, 14 Jul 2022 10:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657819397; cv=none; d=google.com; s=arc-20160816; b=iiqWdbZHF3+t+yfDqyJUqMVlZNLgi2N2X989AhZ6agM5xJ0xqositdWjHxVfmiNC20 KPGm7xeUlWtn206J/qCVtkey81a5KkpbLtwX9yJVFYRemPnYYBInxqcFp8QYaRyDxXEX sTSdlsy6v0Nj4BuWDVG7PZP+fVjqSkNqU9YHRDP/jrjcA1wNF7vtE2Oza/TQzjZs254m MeFp/exIqQjFp9kbQTQJHy700JQxDL+FNstnzdju1qD98jE3/uvBiHlCgeBiaZj5kDcq Fu1IZaLhrK47lMjKZmGj79ffUAnalmyC/uiD7j+B1ehaAxd/Jw9nNHH/YxWyUYAlSlxu iVHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=K6joDuzaz6ReyBN1azQqrz7eoLesddIL/DW3l7lThp0=; b=howZHgUc0OX0FGxGEr3Vo8m0JcCPM+8rL/G/s2aweNfwdutoIJFScXFYngmdhKfKTK 16eZbYhrr7a+FNXHf+mBP84c48YguQB9JZYeRE2O8ujGbAHMpyugJ4bQuFScc9ZIb7bx ymj9VC66p7TP5iQCeJTLXjFSQd9BE2dVVOV089x9foqgTxp/Le9tIc3ixzrkQ4tl1sg9 1Dei8BlniYazcqKIycRJmCEfRuAXp6TdA4c7TfQTZi/slnvN8D5vvYnohkXPBLClBFGH eSKftwXKrE/WkJUomyGA8HQcfZMXL7oCTSQxvoql0nt9yGAMo91LV6EL86AIjnVxewmO L0Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netscape.net header.s=a2048 header.b=M9awDOAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=netscape.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a63d70a000000b00403fbc9167bsi2351699pgg.623.2022.07.14.10.23.01; Thu, 14 Jul 2022 10:23:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@netscape.net header.s=a2048 header.b=M9awDOAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=netscape.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238859AbiGNRSG (ORCPT + 99 others); Thu, 14 Jul 2022 13:18:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230012AbiGNRSF (ORCPT ); Thu, 14 Jul 2022 13:18:05 -0400 Received: from sonic310-21.consmr.mail.gq1.yahoo.com (sonic310-21.consmr.mail.gq1.yahoo.com [98.137.69.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C36548CB6 for ; Thu, 14 Jul 2022 10:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netscape.net; s=a2048; t=1657819082; bh=K6joDuzaz6ReyBN1azQqrz7eoLesddIL/DW3l7lThp0=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From:Subject:Reply-To; b=M9awDOAzPh3Fw17O4JgpEjPn9mjHJ7usy0wGo+t1B7h5gSKRHlXk09+YYJNOmCQev4heN9bp1zRakNptwTWQ2UkwWQnTul777CPYQdrqZSh6uRifbNoUO02fg2kg5UknGqw0wcaYPxUns6Bd+glWpl0iYwiRb8kWaRSKT767APrn04VY9HtROnGES40Uqc/Iz3wN1XB+G24k9ZWGilZ0QEY6gDntHRXL3ON6ikCUpJPh2sz4QJYyUFEAyMBpeMRjth9WM9SSkDaZq9bSvW6xSQOzrZ2kAEvU/wYQGKp79kb4hMsv9dw1pjM9pxH1VSLNQI7lO4HQ3gSDO5tvX2Z8Qg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657819082; bh=xIGE8RBQDUpUkF4cyoBG8GZz5Q2LafG9TdX2VJtrVS4=; h=X-Sonic-MF:Date:From:Subject:To:From:Subject; b=knCxCA00GJeVPCjt3+nTqNd4TO7ZzSXoX849CBPd6pAYvOEFPHeSibRa1eouvP9tn5Gu6fZwoOS20jkWiuYBBNX5wsAbKsNb30cXlxYK2mq8zYmGLw04M5k2L5N3WpmONTVbl2XgX0oqYk8auMwwIjD1MYWM37CPy1z5lKQdiTNCOn5Hu2TSelh2klvuCp+hK/8pOqh1HcJKg8njPK0DfwtwAT+TF2SXRk0+e1T8jom5Ut2r9S5X9HKQfv3Gdf+24NVxNzZ2DASEzITsFpAHaYOY9Gp8gF/wxvsn13M44igaQ4Za6e6MYwaDGSjBdcZnQFlqruZV77fimkCDcBcY9Q== X-YMail-OSG: _G3Z_fUVM1mmgdigp1QpLXL0sKHIi8.3W1ckI4YZkbMlI7ljSvNIqCVUpe7tT8v GIu_y4vEnuYkUh_CcSsHGTJidjxFYuXfB66rZspz56_qx84XD0bhk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VSvT.ow.bVphpSVoxTLmd2QYyy2.uC8iFSeHMY5h0VrouMQwTl_Wn jjYcN55VtVsr1wqqHOK_Ns5zOElFJOEpB X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Thu, 14 Jul 2022 17:18:02 +0000 Received: by hermes--production-ne1-7864dcfd54-dxcrc (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 78c9938f79c6bfaa1dd44261bd92c198; Thu, 14 Jul 2022 17:17:56 +0000 (UTC) Message-ID: Date: Thu, 14 Jul 2022 13:17:56 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 From: Chuck Zmudzinski Subject: Re: Ping: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen To: Thorsten Leemhuis , Jan Beulich Cc: lkml , "xen-devel@lists.xenproject.org" , Andrew Lutomirski , "dave.hansen@linux.intel.com" , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , the arch/x86 maintainers , Juergen Gross References: <9385fa60-fa5d-f559-a137-6608408f88b0@suse.com> <8756355c-b586-3d1b-531c-72a04a8c047a@leemhuis.info> <05b5e672-0a1b-2d00-a879-b5127a94973f@suse.com> <4c8c9d4c-1c6b-8e9f-fa47-918a64898a28@leemhuis.info> Content-Language: en-US In-Reply-To: <4c8c9d4c-1c6b-8e9f-fa47-918a64898a28@leemhuis.info> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.20432 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/5/22 6:57 AM, Thorsten Leemhuis wrote: > [CCing tglx, mingo, Boris and Juergen] > > On 04.07.22 14:26, Jan Beulich wrote: > > On 04.07.2022 13:58, Thorsten Leemhuis wrote: > >> On 25.05.22 10:55, Jan Beulich wrote: > >>> 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 > >>> > >>> 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. > >> > >> Has any progress been made with this patch? It afaics is meant to fix > >> this regression, which ideally should have been fixed weeks ago (btw: > >> adding a "Link:" tag pointing to it would be good): > >> https://lore.kernel.org/regressions/YnHK1Z3o99eMXsVK@mail-itl/ > >> > >> According to Juergen it's still needed: > >> https://lore.kernel.org/lkml/c5515533-29a9-9e91-5a36-45f00f25b37b@suse.com/ > >> > >> Or was a different solution found to fix that regression? > > > > No progress and no alternatives I'm aware of. > > Getting closer to the point where I need to bring this to Linus > attention. I hope this mail can help avoiding this. > > Jan, I didn't follow this closely, but do you have any idea why Dave, > Luto, and Peter are ignoring this? Is reverting bdd8b6c98239 a option to > get the regression fixed? Would a repost maybe help getting this rolling > again? Hi, Thorsten, Here is a link to the hardware probe of my system which exhibits a system hang before fully booting with bdd8b6c98239. Without bdd8b6c98239, the problem is gone: https://linux-hardware.org/?probe=32e615b538 Keep in mind this problem is not seen with bdd8b6c98239 on the bare metal, but only when running as a traditional Dom0 PV type guest on Xen. I don't know see the problem on Xen HVM DomU, and I have not tested it on Xen PVH DomU, Xen PV DomU, or the experimental Xen PVH Dom0. You can probably verify yourself that reverting bdd8b6c98239 fixes the regression if you try to reproduce the regression with any Linux version that has bdd8b6c98239 or its equivalent on the stable branches with a hardware profile similar to the link to the profile of my machine which exhibits the problem. Mine is a Haswell core-i5 4590S CPU and ASRock B85M-Pro4 motherboard. Also, other notes: 1. Yes, AFAICT, Marek at Qubes OS is the first to report the problem. 2. Juergen Gross' work to try to fix this has been helpful, but none of his posted patches has fixed the regression on my system. 3. Jan's patch fixes it also, and so do the two patches I posted to lkml earlier this week to the appropriate maintainers. 4. On the pkg-xen-devel mailing list, which is public, this issue was briefly discussed where I first reported it. Someone there said they did not see the issue with Broadwell Xeons. Mine is a Haswell core i5, which is one generation older than Broadwell, so you are most likely to be able to reproduce the problem with a Haswell core i5 desktop system like my ASRock system, which was my own private build which has been working fine for eight years until Linux 5.17.y. Hope this helps. Chuck > BTW, for anyone new to this, Jan's patch afaics is supposed to fix the > regression reported here: > https://lore.kernel.org/all/YnHK1Z3o99eMXsVK@mail-itl/ > > Side note: Juergen Gross recently posted related patches in this code > area to fix some other problems (regressions?), but his efforts look > stalled, too: > https://lore.kernel.org/all/ddb0cc0d-cefc-4f33-23f8-3a94c7c51a49@suse.com/ > > And he recently stated this Jan's patch is still needed, even if his > changes make it in. > https://lore.kernel.org/all/c5515533-29a9-9e91-5a36-45f00f25b37b@suse.com/ > > This from my point all looks a bit... unsatisfying. :-/ > > Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) > > P.S.: As the Linux kernel's regression tracker I deal with a lot of > reports and sometimes miss something important when writing mails like > this. If that's the case here, don't hesitate to tell me in a public > reply, it's in everyone's interest to set the public record straight.