Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp249476rwi; Wed, 2 Nov 2022 11:27:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6qzbM0J9EnfS1e/csc7YAo0Y2R9fHaFjh8jwev9LdB3rO1yrkpj54uRTC9NPRIGoHLNKbJ X-Received: by 2002:a17:907:2c72:b0:7a4:a4b4:9fcb with SMTP id ib18-20020a1709072c7200b007a4a4b49fcbmr25131656ejc.403.1667413632474; Wed, 02 Nov 2022 11:27:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667413632; cv=none; d=google.com; s=arc-20160816; b=G5nFpU5vRHtQPSd/UNw3m2ofAaHr8ukKUTkX4szOVNFibaNzvMyrln092N9/6AFUGH 4CqExHQ5ksaDEXR6eXcG39SaWn8x3ycCD4YqcB/kXU/aCJXLfZxMLtHMU7/uFME2WGPi JNJLa8kyNVXhMXVubyyfmBvLj5tuTbv1mmU5bciu5vBQxLSEN6WK3ptDXdqr02PZURKQ pTiAbjnFuoQpTCDomI+x6UZzI/obiS7J39vVvWv6bvtC95UVw7zqWW4/Ag4cAa19IiEa WhZsgESvPfPYnxFffDNj1BlQ7kvhV1S5zvkIGCvmES4d2YWO0CixQ25f+3EXvrQ8RFBi 4TCA== 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=Ep4poWzvh4BEAYAVPV+8HNyluMMUvJCMlgTBWwttbq0=; b=OT/J67razgrhJ544dy9aa10Fpqo9I32kvz6Qrtqg3bjwQcMVFY2890og4SrrhXyYhn dAYrCyXEKDLkYqzHQ14sT3w/6NR9/oAQXFdc4RW3faeZpd6CrYkpnhyTzeUGIUvWP5mW hFUHNNljBpcQTB2jcQa5I70HKFyfCyBC+OXJAS5AOxau4J3M5N49Dm2RpbV6SG/9YkOQ Hy3XINaJ0csesf2jkaFkGGzripiSVe7xfsJBB9NEjZJqT1clSnsClvzEyayxJr9pvFke rCKlnpuB6DwOevj0MP+u5TiKYC0uBxDJej+W8eWRwhr3LQoh9XVEltMod/XoBcHiCNVg rUuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="E7zQs/NL"; 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 c6-20020a50f606000000b00461b0b4f1afsi15640166edn.288.2022.11.02.11.26.19; Wed, 02 Nov 2022 11:27:12 -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="E7zQs/NL"; 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 S230085AbiKBSFH (ORCPT + 98 others); Wed, 2 Nov 2022 14:05:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbiKBSFE (ORCPT ); Wed, 2 Nov 2022 14:05:04 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E80152F003; Wed, 2 Nov 2022 11:05:02 -0700 (PDT) Received: from zn.tnic (p200300ea9733e741329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e741: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 4DC3C1EC0430; Wed, 2 Nov 2022 19:05:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1667412301; 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=Ep4poWzvh4BEAYAVPV+8HNyluMMUvJCMlgTBWwttbq0=; b=E7zQs/NLK4edogyboQinsYMbiq0yAOWPRwhBwjaS6EBtShq9AEdpxQAXzpjC7wAPDRri/v os5dLBrfulfFNGLIEBtiV380bLKXXMyMBMcaiAQIeV/cMy8kacpfhCExGiQL83e584TlbM PnOtnsh2KH1ZCKTOplCG+qmgfO5IvJQ= Date: Wed, 2 Nov 2022 19:04:56 +0100 From: Borislav Petkov To: Juergen Gross Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-pm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , "Rafael J. Wysocki" , Pavel Machek , Andy Lutomirski , Peter Zijlstra Subject: Re: [PATCH v5 00/16] x86: make PAT and MTRR independent from each other Message-ID: References: <20221102074713.21493-1-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221102074713.21493-1-jgross@suse.com> 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 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 Wed, Nov 02, 2022 at 08:46:57AM +0100, Juergen Gross wrote: > Today PAT can't be used without MTRR being available, unless MTRR is at > least configured via CONFIG_MTRR and the system is running as Xen PV > guest. In this case PAT is automatically available via the hypervisor, > but the PAT MSR can't be modified by the kernel and MTRR is disabled. > > The same applies to a kernel built with no MTRR support: it won't > allow to use the PAT MSR, even if there is no technical reason for > that, other than setting up PAT on all CPUs the same way (which is a > requirement of the processor's cache management) is relying on some > MTRR specific code. > > Fix all of that by: One of the AMD test boxes here says with this: ... [ 0.863466] PCI: not using MMCONFIG [ 0.863475] PCI: Using configuration type 1 for base access [ 0.863478] PCI: Using configuration type 1 for extended access [ 0.866733] mtrr: your CPUs had inconsistent MTRRdefType settings [ 0.866737] mtrr: probably your BIOS does not setup all CPUs. [ 0.866740] mtrr: corrected configuration. [ 0.869350] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible. ... Previous logs don't have it: PCI: not using MMCONFIG PCI: Using configuration type 1 for base access PCI: Using configuration type 1 for extended access kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette