Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3208272iob; Fri, 6 May 2022 22:34:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxDFfH+k97mNxlmmhsmST83XwfhyxywcXfdIOgpjLCyT2ZjiUGgsAsmzIxYOvVZuO//Yqx X-Received: by 2002:a9d:64cb:0:b0:605:dfe1:ad3f with SMTP id n11-20020a9d64cb000000b00605dfe1ad3fmr2372474otl.339.1651901673315; Fri, 06 May 2022 22:34:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651901673; cv=pass; d=google.com; s=arc-20160816; b=0Lt7rkp6EwnrNmxccC4ukof1j63BWfZzNU0zshWdKb64Pc5OK3XTcGLc53vSI41IxL cCjLKFlbuB7PAPQWnl0bdtS+a7ilYii0OZrLleojNwc7gzJSvm2+geaP4SSsWKd37ZEJ 1D4qRYCVY6IEDCUVEfJw85ZKQw0Yk05sQCORJH71SIeNcQD0IvqroR70xsXQ3ArTHFx5 2ynz/T5REhQ0UUcKQAnRK34PeSQEu6AYn5kbSCIqNLuHTe4/5ytQn+b4azZ5kYubIobe eivcfQLpPVjAgOYHjtXaKmqnzPSXzRq/I9eW2ec5PGlGiUkRTSGj9qZIA4O0qPE4as9l VXkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=RIBCT1rrFfVzuyRXT43onKwesiX0CW33peF0U3S9TdE=; b=D5JZCBXfG5pBYKLoUexHYVm49XAmr/HcJ9dbglsYD8qq018tUwZezbpMBzcV0cFHVZ cm+a2fSUVpTdHERKH4x/hQTWoRDAtPisq8JrH0I3tmBDnUYCMMqoj97FRy9MNJuPc/4G aOUimP3uukZhAmRpsqKqI1UE73pDIWhKeRP0lJ5HrZMzJDoUJTePQDSWtbLkABO5/b12 YRxoiiVmkbxVZlvPpeQtN93AZ8f5VB8+gJ+PHvWom9Jo9CQxwxd0C4uBntHdtJoZXwoP 3W4LUfA/CjrQLmFUD8a2Ow3ANY/q4BSyDwdcXEv7TyWwk1fSVWlkMbIXoeixvFPpxFnp j+lQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=kIw80h4u; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m4-20020a9d7e84000000b006062f79bd6esi4123841otp.342.2022.05.06.22.34.18; Fri, 06 May 2022 22:34:33 -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=@suse.com header.s=mimecast20200619 header.b=kIw80h4u; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345898AbiEDJzH (ORCPT + 99 others); Wed, 4 May 2022 05:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245260AbiEDJzD (ORCPT ); Wed, 4 May 2022 05:55:03 -0400 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCB69275D1 for ; Wed, 4 May 2022 02:51:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1651657885; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RIBCT1rrFfVzuyRXT43onKwesiX0CW33peF0U3S9TdE=; b=kIw80h4u3qFERXjSYMeLwRV6+ftpjRiUC/CJeYqfT/Gf0PAsx32Xz+dIm7ffV/CPZ6V9PO ydJ6ihr7i1T8iXQDcD7Bzj2aNNmPrs4t/O6GFsHij1wWty1NEnQEli85nbVYEwUb/aPXG4 2LfNi8nJeF9MA3UD/iSxtuU/kdBrchc= Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2052.outbound.protection.outlook.com [104.47.0.52]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-37-2Oz4Z3rXMNy1DgS7CTeIrw-1; Wed, 04 May 2022 11:51:23 +0200 X-MC-Unique: 2Oz4Z3rXMNy1DgS7CTeIrw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KsrawYlaewBsYP4yBOBKoyCJhL+SMYv6oM+Y/gsbskaCY2gyxrLV++OFoJmxwTWkZZtrwCU7A3OgN4+WA8xmCrh2r9uI/GEWSQNNtuxfjGUDyOMrCoxG8dDgHfVgrwZz6xQuf7KYE89DTf5cTbCCCnR7srrAxK+yNULc9eIAa1P/ZYBHSIZmY+t8g5ESVUqL4XqbU3HLkX1nzEw9XnG5820WEC1GzJuRbrTB91uwPBtZJdWxoMufNtsE9CO+DLhXr+eAq4eOS3FYLv5+KhE/islw7BQ0jqYZVJcMqS3fV0A8xBSHdYHdLrWz1y0XgjN4V8y68hBGd52BrjNg+wmURg== 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=RIBCT1rrFfVzuyRXT43onKwesiX0CW33peF0U3S9TdE=; b=mTtSetnNUZk86stYQTLHlgHZuVj5k5/V8hjYmgXMu2pxtyp8S+yGkNYxPyQL/h8F2Ace0h/O3UlS4CBRvChv/LVVOzd7pvrKVuQCjrJZZRPlShL6k1jLhRSJZpkyhfWav3eR9yYIXJk4dqDbKk4+t6o37854Do2Mpj2zTHpvT+cfgewrZ6txYMn1UCYqxNebp4FHnQjqN7a1mgfMvwGjHl6YItWWXOhyEnlK/NiAuD+VmpMsv4Cw9qwgfMcpYuxPjKukbxkT/iQBRvpo3wKFCx713JUFZGyiHE0MIfTR1Q2lC+Ej1tTNubRTOS1QSKMoPLlwa4NENyxyWkHz3UKkeQ== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by DBBPR04MB8043.eurprd04.prod.outlook.com (2603:10a6:10:1e7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.25; Wed, 4 May 2022 09:51:20 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::5cb0:5195:4203:7c2f]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::5cb0:5195:4203:7c2f%8]) with mapi id 15.20.5206.013; Wed, 4 May 2022 09:51:20 +0000 Message-ID: Date: Wed, 4 May 2022 11:51:17 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 2/2] x86/pat: add functions to query specific cache mode availability Content-Language: en-US To: Juergen Gross Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: <20220503132207.17234-1-jgross@suse.com> <20220503132207.17234-3-jgross@suse.com> <1d86d8ff-6878-5488-e8c4-cbe8a5e8f624@suse.com> <0dcb05d0-108f-6252-e768-f75b393a7f5c@suse.com> From: Jan Beulich In-Reply-To: <0dcb05d0-108f-6252-e768-f75b393a7f5c@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AS9P194CA0024.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::29) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6498b1c5-090c-4e8d-8a46-08da2db3a430 X-MS-TrafficTypeDiagnostic: DBBPR04MB8043:EE_ X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5wlZPykJ5hK/C67K1e3o37RvqG3sQR/uouJKzeCR6DICD1pet22o3YotQvRBH1/HGVnvDUn7nqZSSzpHfJu3qblZ9cSIvh6l8HppT000ysH7XQTaRiHHyQ/cbA5M5BwoVPyV3GCQbZlxv2WL4J6hOD8g5QuVO/6YgXEnqsQysfoU8EksuLjYbrblbzellvLSPe2727UBEt80grRSSTg86xioc1k6taF1DlheZ+Ot3VJQS91xIdo5i+5+/wegjiGa4uKI/Nv3VnRwm/V9MAfiqH6yK7WxffTEQFfgPD/2qBw80Q6rY4XgoNw3ikLZx1PzhR2tbWIv9QMrVLBojpP3FYFVo1AHxIH+/Njd649ZYZinghT9kJcBVZuAYkQv+CgxvrVFjNGt86XIz0KGBl6q1JtOkYfMOVyGEoyET1bbnURmd294JxBeLKvKjWnqvGfsL0Ca7vTjAwVmQym78s5wJkIK5gMdJir0xhAOsa86QeKkGUrqzSrv17lm+AM3cIOOm0p7pyo1rSn1U0WIEjnPdXhNktTkEWunU3vcTla5mhpTi/rfiWaQTeOwh7DS8ofgObSoZPJUgjeSuXhK0D5b/i1ymCgfipGjjow4R7CRGmZ7b2dfm5Mnei3XS6fBXHSxg115/fP6w8oLM/D+H1OzDrnKT2jzdaixETPPqqbUe0ChHBFhAolK6nqkhwXv7kCeN9FYH723yPjPzdqcpkNm3YZ5VTS4bEEdhcEjHYa1Lgc4c+VXJXLREzrMAaJv0GKf X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(6486002)(508600001)(5660300002)(186003)(8936002)(26005)(316002)(6666004)(7416002)(38100700002)(6506007)(86362001)(53546011)(31696002)(66556008)(66476007)(4326008)(6862004)(83380400001)(36756003)(8676002)(2616005)(66946007)(2906002)(54906003)(31686004)(37006003)(6636002)(6512007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TVNQMVhDNENaT2UzY0xSUkI5S2hvM1MxcGhWbmhrNFRGSlZjYnF5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NjhCeXAxL0s3R1J4ekFJQmljTk9TL2JsazMzR0NXbGtLN1lxRDVBaVJO?= =?utf-8?B?dXUvY3Z4ekxIaXdZb2VsdEVsKzh2Q2lMSHVUU0NxRGU2QVhVMnU3aklRM3NE?= =?utf-8?B?dGxxQVhjNTdIQXBHTk4rTDRTT2RUY1VzSVNUblB2L1EvWGo4VVJmbVp1V1ZY?= =?utf-8?B?QlIvcmNSMDBTS1lsVVB6M3c0dTAzeTM3cWVZNW5zU2xrRVhKc2xGSmxqd1lN?= =?utf-8?B?QStvYmJrUHYybEFta3YxZE8xQ1lYQmJiM2ZSNGUrczMzLzE4QWJmWTlJa3Bq?= =?utf-8?B?cEdVZUZVTHBLYndhcS9XRkhsK1pqbEg1RFg5K2ZJSHVjSkR3UHNhb3N6T2JU?= =?utf-8?B?TVN4R0RLWmpxRUJzL2ZSMFBlbHZDVTdVRGFwNm5wL2dua01vUU1NeXVqUXhG?= =?utf-8?B?eFJYMDRCaXZuQzFPSVNsWUVXeXBMVWlNYmNXbnlJT29jT1dVUlZiY2txS3hN?= =?utf-8?B?TGdXNS96ZkJWemVQTXp4TlFEWmI3MXhYN1c4ZUxlbDBYTEs0bVNtQT09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6498b1c5-090c-4e8d-8a46-08da2db3a430 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2022 09:51:20.4324 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x18Q+h6dqK4TJ6XqYgwEsWrAjakGvYPTmq6w0o4XhpedTHIzVkbHqjeHKAcS43UmADypyJ6586HslpIWsanLHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB8043 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, 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 04.05.2022 11:14, Juergen Gross wrote: > On 04.05.22 10:31, Jan Beulich wrote: >> On 03.05.2022 15:22, Juergen Gross wrote: >>> Some drivers are using pat_enabled() in order to test availability of >>> special caching modes (WC and UC-). This will lead to false negatives >>> in case the system was booted e.g. with the "nopat" variant and the >>> BIOS did setup the PAT MSR supporting the queried mode, or if the >>> system is running as a Xen PV guest. >> >> While, as per my earlier patch, I agree with the Xen PV case, I'm not >> convinced "nopat" is supposed to honor firmware-provided settings. In >> fact in my patch I did arrange for "nopat" to also take effect under >> Xen PV. > > Depends on what the wanted semantics for "nopat" are. > > Right now "nopat" will result in the PAT MSR left unchanged and the > cache mode translation tables be initialized accordingly. > > So does "nopat" mean that the PAT MSR shouldn't be changed, or that > PAGE_BIT_PAT will never be set? According to the documentation for the option ("Disable PAT (page attribute table extension of pagetables) support") I'd say the latter. Jan