Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp679247rwb; Tue, 27 Sep 2022 03:12:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5gkXkI6B1KT6oQXrOV1P7JcSLz2Mt3RpoF7DI+6qnYSV5eY3JeBIqdGiqiPYz3JU9s345p X-Received: by 2002:a17:90b:4c0b:b0:203:6d81:bb53 with SMTP id na11-20020a17090b4c0b00b002036d81bb53mr3707482pjb.3.1664273547186; Tue, 27 Sep 2022 03:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664273547; cv=none; d=google.com; s=arc-20160816; b=KY/URr3KTEmh+qGXwyl/EBg69y8dF0BVC3/ixpfqf+BcAHwwbLwGYWSnlvEszPpMVo cCYNsss25BTV2401PaCBpd5ycrixKVBwz/jhfI/atHjv/WlkfWsbfAzbyqOdJ9L9U1Ib Y91Q+DpqUgRBImXGKhAciutpSCG34xqXCcVHqwMUMS0Pk9WuiENZ8oa/9ko4IT8TgYC9 vcfGwbynyPWIUjJK7jQT9Zyuvou9TfQkMKfnUmtk1icX6M+GfShRnYv3C9b7ZKbfdk5h GdssmZYY+pPedFqo0t50p5PcWQx7Y2G9bPbMXRpkLPME5YXtu2oMJYlbzAmDO7U2i9Nz AgAw== 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=/v55aZP64ds0qEf5pSfgJzfEvm/TVqPTvdeXcoCxATk=; b=FwP9NVtkPzJKnxn8flfO5v6KVN3yFtxM+xUYN3vTgwdoR/PKtJaaTRt4xPE/Zk5OTo cP3hyFrh6vZRNbyni9ZxOV7eWeRc4OAPXiD3v6X/T3wM5rdv/fOGafTgoCRwiEyWfF20 0vCcyzK+JoqYilcyvFiG1mCN5c02BHDrY65yZ5h9cZrhS5LKvN5tg0QelGYnaIJhA7tA iF0MAZFPIDMBiiEOcmY/onGHwgZa6+xN0UbvE4Qqwm5DKeuHqpx5s1VeRGQks9z637D5 Z3rpF+2hGVt88on4p3FmxIX7vdI9RN3OKsoMrEBH6KLFWuweaA6T3PjTJbwqDhRNwcu6 j39A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qu2RiuVP; 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 y5-20020a056a00190500b00542c772d478si1676194pfi.247.2022.09.27.03.12.14; Tue, 27 Sep 2022 03:12:27 -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=qu2RiuVP; 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 S231652AbiI0KLW (ORCPT + 99 others); Tue, 27 Sep 2022 06:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231921AbiI0KLF (ORCPT ); Tue, 27 Sep 2022 06:11:05 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0951BA4071 for ; Tue, 27 Sep 2022 03:11:00 -0700 (PDT) Received: from zn.tnic (p200300ea9733e757329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e757: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 1D02F1EC058A; Tue, 27 Sep 2022 12:10:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1664273455; 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=/v55aZP64ds0qEf5pSfgJzfEvm/TVqPTvdeXcoCxATk=; b=qu2RiuVPERrby2mkgKedt4K0HJeWBVi/JHFjJNAc5f+jUrlxgvuAiF6WYpcagYOuPbVCMF yiIBLQZBX+B6DyPwmygD2M5WJVllVwddXLfF7Dz96FohO12c8NyLokHpoJ/UfW5B2+DrC+ +4LvUK6UoVRNkuc1YZU1iTArutJgUa8= Date: Tue, 27 Sep 2022 12:10:50 +0200 From: Borislav Petkov To: Juergen Gross Cc: xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH v3 08/10] x86/mtrr: let cache_aps_delayed_init replace mtrr_aps_delayed_init Message-ID: References: <20220908084914.21703-1-jgross@suse.com> <20220908084914.21703-9-jgross@suse.com> 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 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, Sep 27, 2022 at 10:57:37AM +0200, Juergen Gross wrote: > TBH I don't see the point of having an accessor which is just setting a > variable to "true". But if you like it better, I can keep it. Accessors are always better, no matter how silly. :) But, in trying to grok your next patch - you really should split those more complex ones because they're a pain to review - I'm starting to wonder whether we could even remove mtrr_aps_delayed_init and make the delayed init the default. Because, AFAICT, set_mtrr_aps_delayed_init() is called by default by native_smp_prepare_cpus(). Which is called by hyperv and arch/x86/xen/smp_hvm.c. The only one that's not calling it is arch/x86/xen/smp_pv.c but that thing doesn't support MTRRs in the first place, right? Which means, it doesn't need delayed MTRR init anyway. Which would then mean that this would simplify this ugly logic even more. Or am I missing an angle? It is possible in this nuts code. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette