Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2316099rwd; Fri, 2 Jun 2023 07:52:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wv9zwFvVq0YEMzR1QqE1Trp3KJlEEoUXtqnygU+LZKMiW4rW6SHjWC0GrUmcw75gVifC5 X-Received: by 2002:a17:903:11c7:b0:1ac:b363:83a6 with SMTP id q7-20020a17090311c700b001acb36383a6mr210332plh.17.1685717521711; Fri, 02 Jun 2023 07:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685717521; cv=none; d=google.com; s=arc-20160816; b=lwaA/XVhhi4rHh57iREWIFbMU9xUBCHZNoZvWkqFizrgxUTDHSo5enMngPTCvsjcW3 4p9zxE6vitkF8trstkbdTBjVWf8fatGh9vHCMTfOWrJUuEhBNihM2PLWnrEmDRme4wQg Nklw0e3px41NHEDfN23PKPbVUXXENTEjOBzfuNzoKbZ9UfvFkF+g8ryh/SzCNqMh07z4 mdlLQ1eLX+9lTlLfItK5igTUY1oNvPhtB0Im4pgKOUZ9q3y1mtphS6VPGvGwjsNe7e/O 7Pbx/gL3zh6kPCv5uM1vVyVg19BJub2gYEx6MoXfR8HyR9hIVDsL8Ova8UhkqvRiZ+Er aNsA== 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=2AOFicJwTPgUdcHfcpeKSndwQkStqIz6/wMMCYd0H1E=; b=zsr4pYcGIzsyPiP3jM29+BFK4pqb0JunQGyt09zEWUIWO2xllYnKYyOYT0NiCy6kKq ig57cyup2gIupXoW/qSZ9Jv2HPR/eAaB1JzrcQdfMUoMEw5SFgiyRu/aNJvN1SYdWByn EHmBzF3gLYIz0Tcr3uwAGikZikdJeh0uN0UhpTgb1Z8JzNdCp23MDaLT/K9/G7K/lOfV i99aYRTCTlZmK1m7Gk6nPJWjHPsvc6JLYm5Z/6gP19jPo28kRI9JAciFfwuF4ju06KWL x+I9o1LbFjNOr338Q5adPoSI9wMIs8b9CEJMhQ54F3s5Fwzh8rhBl+48dTiAL6kgxS5O /euA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b=ogLDfwey; 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=fail (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 o7-20020a170902778700b001afbb27f554si952646pll.623.2023.06.02.07.51.47; Fri, 02 Jun 2023 07:52: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=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b=ogLDfwey; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235991AbjFBOoI (ORCPT + 99 others); Fri, 2 Jun 2023 10:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236109AbjFBOoH (ORCPT ); Fri, 2 Jun 2023 10:44:07 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40FD6E43 for ; Fri, 2 Jun 2023 07:44:03 -0700 (PDT) Received: from zn.tnic (pd9530d32.dip0.t-ipconnect.de [217.83.13.50]) (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 C2FAD1EC026E; Fri, 2 Jun 2023 16:44:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1685717041; 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=2AOFicJwTPgUdcHfcpeKSndwQkStqIz6/wMMCYd0H1E=; b=ogLDfweyKnYTGaSj85WYz31gQ/v2w7nHloTwxh2YY6RBQVWC/SaOuntubLbpuc9p0svdWH LalG3+Q/DaurBrLWBXgV7Jgz6a8URUEYtts6cQJKS03Bf3kndHAjMh5+AW/8AL2g9ccS1X 4UysctKv5AnrBwgPz7GnDYkdGF2kj/M= Date: Fri, 2 Jun 2023 16:43:57 +0200 From: Borislav Petkov To: Juergen Gross Cc: Janusz Krzysztofik , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , David Hildenbrand , Yu Zhao , linux-kernel@vger.kernel.org, Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= , Andi Shyti , drm-intel@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: Re: [RESUBMIT][PATCH] x86/mm: Fix PAT bit missing from page protection modify mask Message-ID: <20230602144357.GCZHoALQjO+xx3YxAz@fat_crate.local> References: <20230519183634.190364-1-janusz.krzysztofik@linux.intel.com> <20230531181412.GFZHeOdMHIGOXB2hwL@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_PASS,T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR, URIBL_BLOCKED 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 Thu, Jun 01, 2023 at 10:47:39AM +0200, Juergen Gross wrote: > As described in the commit message, this only works on bare metal due to the > PAT bit not being needed for WC mappings. > > Making this patch Xen specific would try to cure the symptoms without fixing > the underlying problem: _PAGE_PAT should be regarded the same way as the bits > for caching mode (_PAGE_CHG_MASK). So why isn't _PAGE_PAT part of _PAGE_CHG_MASK? It says above it "Set of bits not changed in pte_modify." And I don't see pte_modify() changing that bit either. Right now this "fix" looks like, "let's OR these two masks so that we can take care of _PAGE_PAT too". But it doesn't make a whole lotta sense to me... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette