Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2108395rwr; Fri, 21 Apr 2023 04:36:35 -0700 (PDT) X-Google-Smtp-Source: AKy350YawPmddaVGi/+iRlic1xU7YLm9hNZk4pJ++AsP1Eq9E2zh+Afq779moy5QzrPY0b5n1iwo X-Received: by 2002:a05:6a00:430b:b0:637:434a:75df with SMTP id cb11-20020a056a00430b00b00637434a75dfmr5291140pfb.0.1682076994968; Fri, 21 Apr 2023 04:36:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682076994; cv=none; d=google.com; s=arc-20160816; b=vJJsnSw6qrCmHaQalg3CInW62vABfHFvTH9kDJqSu0N0mgZ1HNleycpZEN6h7Mbu+H GjTeRc3VH6z1xA1b67KktcxAzX7OBlwgpzgypWmr39Xx9iTY86EBQ0mhsIJVxIFWcnBs aD4aEdVZi5r4TlZVAJTmBpu2Y/VP70DzKduG3hsdveBj5P0hhUm7IT/c3kE9dQmkpCXm h8d4K3pu1k5TZrQtKpMDYTB3/SCC7NJQt8a6cPbW2Txq+KUkXMaGlAaEhjRUgcX52VR/ 1xBSYNnwXUE08viRqvJtyreIzMYERhwB8+mhUEtOLcZPqcJbJGB9rBfPtM/AqQYxD4/G Bumg== 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=a87N52p5sMDjBSXQShCgpPp16fh6M2DXFX0u0FSwgJo=; b=OlZC43u6ZaQY8v8f0g2++LL5Mynt0zlHRPkuRq7VerYo3KTxrD+uFLuiL1uFtnrqAG 451fICoh/LfOfpG/PvhCwnCoimD0Vd8YDEe7Qts/Ts04XM1L6FO80pavImhpIETkud0a DXBZTiqPBol/oNHTjvyjgX2uKQ8/Ax5stqP8gYkgBYD+FatXsAyUZzXC94IJ18lg2o4I sxkyWSgzaBQrjOilymcfdV2lR+MIdEiqjv/PiPcwAxXEjgpczKxt54RGdAMnU+WEvm2w fLA04kNfGzNe4s5UR3csrq9b5MUtZioqKxruQ72YuohFXdxEhWTqU60+F5+Xq8qMzjZS /qaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Qk44wo9e; 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 bv188-20020a632ec5000000b005030a59a80bsi4218235pgb.178.2023.04.21.04.36.00; Fri, 21 Apr 2023 04:36:34 -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=Qk44wo9e; 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 S230148AbjDULYH (ORCPT + 99 others); Fri, 21 Apr 2023 07:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjDULYF (ORCPT ); Fri, 21 Apr 2023 07:24:05 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 843D844A2 for ; Fri, 21 Apr 2023 04:24:04 -0700 (PDT) Received: from zn.tnic (p5de8e687.dip0.t-ipconnect.de [93.232.230.135]) (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 207ED1EC049C; Fri, 21 Apr 2023 13:24:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1682076243; 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=a87N52p5sMDjBSXQShCgpPp16fh6M2DXFX0u0FSwgJo=; b=Qk44wo9eSzByOhRGpZ70+42SvVcdUZTQk1T3UcAKDQZHhurNFK7yI6rc2ycrYBQBS8K610 k229UH9ldd6fm6lR+0yOCyUAeqaHKYdDwhA0owRbS9ZW1KLKl+hN8d42K5oo/VETWkuqa0 gtER9XWW1ptfeiCsDpyEzoFo3VukFUw= Date: Fri, 21 Apr 2023 13:23:55 +0200 From: Borislav Petkov To: Juergen Gross Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Michael Kelley Subject: Re: [PATCH v5 11/15] x86/mtrr: construct a memory map with cache modes Message-ID: <20230421112355.GAZEJyS+w84odQ9s2i@fat_crate.local> References: <20230401063652.23522-1-jgross@suse.com> <20230401063652.23522-12-jgross@suse.com> <20230420121551.GMZEEs9wkUrvX05nQr@fat_crate.local> <20230420130113.GCZEE3mfOTxcDn6e3/@fat_crate.local> <681c5d8e-0e42-07e1-f91c-7696a2360f1c@suse.com> <20230420145451.GFZEFSO6VmvXdK/qi9@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=-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,URIBL_BLOCKED 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, Apr 20, 2023 at 05:10:03PM +0200, Juergen Gross wrote: > I think this will need another final loop over the MTRRs to check against the > constructed map if a MTRR is completely useless. Yeah, I slept on it: so I think there should be a patch ontop which does add debug output - disabled by default and controllable by adding "mtrr=debug" on the cmdline or so - which dumps the cache map operations (add/remove) and the final table. The reason being, when this cache_map thing hits upstream, we would need a way to debug any potential issues which people might report so asking them to do a "mtrr=debug" boot would be a good help. And pls make the prints pr_info() and not pr_debug() because people should not have to recompile in order to enable that. > Another question: in case we detect such a hidden MTRR, should it be disabled > in order to have more MTRRs available for run-time adding? Let's not do anything for now and address this if really needed. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette