Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp494127iob; Wed, 18 May 2022 06:45:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkUlfGtYaraDNgalp0eEHsYB1C38EVsh7EYhhyE7rY/XNqA5361P1tm00q/UaEtw4f1F4E X-Received: by 2002:a17:902:da90:b0:15e:bcf0:cf25 with SMTP id j16-20020a170902da9000b0015ebcf0cf25mr26764934plx.40.1652881535483; Wed, 18 May 2022 06:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652881535; cv=none; d=google.com; s=arc-20160816; b=pIJhNTPj6aIwY4lzRL+KkrGPG++DMGG0kjg33YCKTezw0NuaKDn5wGSiKP8ihp9XJk PYy80tmL3fWNWUOkS6P3c4dZfB3CeT6vuh80aUNJA3BGboNxuiJk3Qc21nGHjeFuRbVE XyxGDuBAYHQJ1YvHYSF6khngNFXJvy5lBrtZxVbG1k4T5KsallfAyfLqM12musv2S7ur dsrA+NbUte+EDRPML6XahW+ilCyNtGfp7KuCvlz+O5134HS8q92R2pZEe2zK90rSxOXQ +i5WvlXC5iWfelIqumfoL4ysRgzQLldvnBuTVUsW2Kz2MSUE5bFtfdlzZ1ChXVIuaW8j oU0A== 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=zHCFhRbJ5KoBP25J/EVA30nZjwejxa0UyBXdd6YAaF4=; b=XTmDCmum+//kKrVJ8ivBVI9G0NCdq/BIvxxnoaJ/aTmGG6409YmxOQrgFSdLwSq5Sm epej4h51KrD4Qrbw5NdRGoeNY5z4Zjx1elo4VhCRJAs6S80CKA+NksjHR5aaNzqYJ2WB KXLWmR0mlm97sliwZQCvbDGc13WRN6rLpdqxDLKUJOlsn3FIltes7UoGVc13wGixnSQo CWfGfptwkvdcUsp5yeAauEWe8OgydVZyipKK2chMh2kvymROkfAfhU7DMxhxKsckzxjW MflspgwDCTYWxHKJ4b0TrsBffVwR4gZn+0/DPaUNyFE7onvHyGqvxZAWNBQG5opihNwp uUUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OfkWNCZW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k10-20020aa788ca000000b00512c652ed71si3766391pff.210.2022.05.18.06.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 06:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OfkWNCZW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BA66D1BE97D; Wed, 18 May 2022 06:45:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238141AbiERNpX (ORCPT + 99 others); Wed, 18 May 2022 09:45:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238104AbiERNpS (ORCPT ); Wed, 18 May 2022 09:45:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FD7919CEE4 for ; Wed, 18 May 2022 06:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zHCFhRbJ5KoBP25J/EVA30nZjwejxa0UyBXdd6YAaF4=; b=OfkWNCZWsoLrWqd56zXTPhczAR Xu6/rWTNKrHA5cVITymYCU7C4/BuduKoFrwDVkllDtDmTwQwvpwjUrpdfRvTvtZo8yvfgrRuSRptz dGZzY66n3hdKJFC0dVStt35QHnrIiK2a4cQzs1nuLJ6CLQydPerstjr5JbjRj7wd7gXMeR4XR6Fyl lTd2H2/zzj/WYjDnSh3AMB/sqU3wUqKqGTptHwfo0ecsQnNijGsQ3L3sW4OrscH+mwB3FG0Q48r3G KNYWIuEvYvH1LmuYE5O//C/SHYngGuQagyk3HMLrbcTMYU/L6AP1FKnFK27sU4snqP8olMxHVwBBt SSqd4aWA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrJzC-002LqV-JH; Wed, 18 May 2022 13:45:10 +0000 Date: Wed, 18 May 2022 06:45:10 -0700 From: Christoph Hellwig To: Juergen Gross Cc: xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, jbeulich@suse.com, 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 Subject: Re: [PATCH 2/2] x86/pat: add functions to query specific cache mode availability Message-ID: References: <20220503132207.17234-1-jgross@suse.com> <20220503132207.17234-3-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220503132207.17234-3-jgross@suse.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 Tue, May 03, 2022 at 03:22:07PM +0200, 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. > > Add test functions for those caching modes instead and use them at the > appropriate places. > > For symmetry reasons export the already existing x86_has_pat_wp() for > modules, too. No, we never export unused functionality.