Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3211518imw; Mon, 11 Jul 2022 04:24:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uGXyLSsvi0J7utikKL8SQt3fnJ6pQhzc6cFiILhc8381TyOK/tDrLRT7klMzMJByLtI3G4 X-Received: by 2002:a05:6a00:21c2:b0:4fa:914c:2c2b with SMTP id t2-20020a056a0021c200b004fa914c2c2bmr18418617pfj.56.1657538641178; Mon, 11 Jul 2022 04:24:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657538641; cv=none; d=google.com; s=arc-20160816; b=XSrOAf2YoRKyyY+46fm/IIpLWpz7M+0nVAYxe/q5jS5Wp0LPplUyXsIQ2brQKuP8lK xRuCTnhd4MmPr4an6iF6mdF7prf3QdHQt3y7XElgU5hZErLoZbQNl61L3dLgitP5Z80t Gi10GWOESR1AFOusYhovTOpgGO6HVWnckuooXp+5tzEYsVIA7QsKN4DEVUgQ7AdYv3ak 16RjNbKqkK17dv8lUvBHaR8ut6qjDuELoemApqdz4NXKWGFUeDIXLSG0N1kSLgQDIgq8 XAiJ70YJidByD7MAFmdsdUyXNDfvhrwt9Tb3Yxp1veWSjU5zn9zYxwzpAStUzfEE7+oX zmjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DQveIvP21h/SanKF+N0Kr1ZyhDAmgYuWOYIW71suvFg=; b=I89lJsWKP4z5Z1+cZd6POC3LtDIjrN9PQI+SzdIVEcLhC40W1+2/75vNBvPcoWgu6O TUw72Q2CWyaTbPHQezuB64PxaKS2Hd2OQOF6QAGGa5g13YK6TWp7rpmpThLGGim4UqQ9 +DX+hnCep1JsL6BA5AVateqeDr/GYZZEHOD6PvFAhZQ82sAXqOy4Bu69CEsCA8M8soNb K0ORgd94Tzqxdyy+nmCdrc4y8rG43OnEbAttJ0gOAjAz/krkwULW1zABRGmPnGUDn9+0 +TBWAkdlQjN6POllEftNJTfV75YfH9FR3UEArlGRB4OSAE9WFDJ2flfclLmy28Peqwqv EvWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=CnP+YTdQ; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902c40c00b0016bec53a672si12731806plk.477.2022.07.11.04.23.49; Mon, 11 Jul 2022 04:24:01 -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=@alien8.de header.s=dkim header.b=CnP+YTdQ; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229789AbiGKLSe (ORCPT + 99 others); Mon, 11 Jul 2022 07:18:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231179AbiGKLSP (ORCPT ); Mon, 11 Jul 2022 07:18:15 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CD69747A3 for ; Mon, 11 Jul 2022 03:40:32 -0700 (PDT) Received: from zn.tnic (p200300ea970ff601329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:970f:f601:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 964B31EC0518; Mon, 11 Jul 2022 12:40:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1657536026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=DQveIvP21h/SanKF+N0Kr1ZyhDAmgYuWOYIW71suvFg=; b=CnP+YTdQFXXeMz4yz7lRKZrtDOotgh/qmneigxkyjFPzRx22eIHesEikobYkfzhA0eFGHx bgWLcABXTonqdCSQS/VeaNriU3qJ60lGziMlFEFviVrJ4ncqEsKyuMs/HXtUf2QXs9ucao boRyB8MdlK+myKDMfvTxFNaK5ZPE7Hk= Date: Mon, 11 Jul 2022 12:40:26 +0200 From: Borislav Petkov To: Jan Beulich Cc: Andrew Lutomirski , "dave.hansen@linux.intel.com" , Peter Zijlstra , lkml , "xen-devel@lists.xenproject.org" Subject: Re: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen Message-ID: References: <9385fa60-fa5d-f559-a137-6608408f88b0@suse.com> <016d281b-7e40-f1bd-66ee-c19c3cc56efe@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, Jul 07, 2022 at 08:38:44AM +0200, Jan Beulich wrote: > Well, right now the pvops hook for Xen swallows #GP anyway (wrongly > so imo, but any of my earlier pointing out of that has been left > unheard, despite even the code comments there saying "It may be worth > changing that"). Oh great. ;-\ > The point is therefore that after writing PAT, it would need reading > back. In which case it feels (slightly) more clean to me to avoid the > write attempt in the first place, when we know it's not going to work. X86_FEATURE_XENPV check then. > If I may ask - doesn't this mean this patch, in its current shape, is > already a (small) step in that direction? In any event what you say > doesn't sound to me like a viable (backportable) route to addressing > the regression at hand. Backportable to where? To whatever tree has bdd8b6c98239 ("drm/i915: replace X86_FEATURE_PAT with pat_enabled()") ? If it is that, then 5.17 and newer. Anyway, I don't mind it as long as you put the proper splitting out ontop and it all goes as a single patchset, with the minimal fix CC:stable and queued first. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette