Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp495575rwi; Wed, 26 Oct 2022 03:46:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7keAZ1SDic1ZTiJWe/x6OlkZCAjD2kPLw30hp+j0Hds7RGdLrXsPoeDOWv/LeK1ZprHSUJ X-Received: by 2002:a63:2b4b:0:b0:440:2963:5863 with SMTP id r72-20020a632b4b000000b0044029635863mr35938687pgr.28.1666781172361; Wed, 26 Oct 2022 03:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666781172; cv=none; d=google.com; s=arc-20160816; b=mQ71gIeO2mjFQwY8ReUUZG3GZhqCzuCErHZDi1Zd+uWyRoYbOf6lCz81CtIGNIc/4u sB/cBWd+ACwQ85Wi6jQLgkAlKO1fkiWjVYpFSfO0MQwSIEqzlzUNvmY5HNMO+kjM3hBK YGLEA0B6k5N5EeUfPv3Ko5wYflFudFcLgpv4NmYNlpeS3mfOWwU4dmDoyjLuUaX/3JlK XfU8XA5xieiWtsn+/BLbNzAUhOzvtWBjB7i6iwV8SedjtTDS0DoHEF4U3jM9BEq4LdU4 BGzoQHK1476gutI0W4gvi068DxPAOm+OgLvxi9B6WIhfGEEqw1WUM4NY56d2vE7POq8y mGCw== 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=ZX9dpgsglCG9/xfyhtzG1Jg1smDACPCZdOVzq6ZSD7A=; b=X4/tsViN8OSEjFgnc/yz+JXe074a2Q7L35tKWUhXhquGd6IKdbbMhAU0MkO/s8lrTe i01d/jx+Si4n9itaizcGTHSzUckoFqyF76Wa0kvlnCsvJHYm7vSmIITy50wkF1ANmo0H 8sWPMprYzofWD0QQj6KgzU6lc5Mp45z+sTCXD/cNPxTy3RABaG4RNVRuf0+g3ryeOzvC Tiyj4hxl1Gyavw0UliFteaZ/Xb/GzjqRHzjPz+Jm5lQpu+Va6FOximutQN0EKeGlfeHg eOT4RUCPiGk2xJyq44IRtd/2yo2A1V7t8ktZ1Wywx82EtkC8U0ay/NGdeaMmb5grZi6f vXPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=UVRzJi40; 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 r2-20020a056a00216200b0056353f0bd40si5904951pff.29.2022.10.26.03.45.35; Wed, 26 Oct 2022 03:46: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=UVRzJi40; 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 S233296AbiJZKiB (ORCPT + 99 others); Wed, 26 Oct 2022 06:38:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231877AbiJZKiA (ORCPT ); Wed, 26 Oct 2022 06:38:00 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89CC736DD7 for ; Wed, 26 Oct 2022 03:37:59 -0700 (PDT) Received: from zn.tnic (p200300ea9733e7b8329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7b8: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 225111EC032C; Wed, 26 Oct 2022 12:37:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1666780678; 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=ZX9dpgsglCG9/xfyhtzG1Jg1smDACPCZdOVzq6ZSD7A=; b=UVRzJi407zgiEMvg1MFExN6jybGK2KCFer+1pIO0GpYRp00V9RjhDuS/yGK9dcymEvQdd7 YAyadENKE6MHNcoNmVpCHwx9OVNxmK/J52kuoqo1Gv53YCzql2FzxDfP0RyR+1iYmhk7Cj VTMNcQsLD1ltMHUsD9Kw5LRxgsjx60M= Date: Wed, 26 Oct 2022 12:37:53 +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" Subject: Re: [PATCH v4 07/16] x86/mtrr: split generic_set_all() Message-ID: References: <20221004081023.32402-1-jgross@suse.com> <20221004081023.32402-8-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221004081023.32402-8-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, 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 Tue, Oct 04, 2022 at 10:10:14AM +0200, Juergen Gross wrote: > Split generic_set_all() into multiple parts, while moving the main > function body into cacheinfo.c. > > Prepare the support of PAT without needing MTRR support by > moving the main function body of generic_set_all() into cacheinfo.c > while renaming it to cache_cpu_init(). The MTRR specific parts are > moved into a dedicated small function called by cache_cpu_init() in > order to make cache_cpu_init() as MTRR agnostic as possible. > > The setting of smp_changes_mask is merged into the (new) function > mtrr_generic_set_state() used to call set_mtrr_state(). It was > probably split in ancient times, as atomic operations while running > uncached might be quite expensive, but OTOH only systems with a > broken BIOS should ever require to set any bit in smp_changes_mask, > so just hurting those devices with a penalty of a few microseconds > during boot shouldn't be a real issue. This still needs addressing "So the commit message should not say what you're doing - that should be visible from the diff itself. It should talk more about the *why* you're doing it." -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette