Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp1701022rwj; Sun, 30 Oct 2022 05:13:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6IqdEbEtsKrp/SfmCGNIcaduInrWzzGHmILE8MQB6qm/vIRucE3g9cvyw1aZ/4y1vupGRd X-Received: by 2002:a05:6402:22c7:b0:463:cc1:42a2 with SMTP id dm7-20020a05640222c700b004630cc142a2mr5903022edb.217.1667131980808; Sun, 30 Oct 2022 05:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667131980; cv=none; d=google.com; s=arc-20160816; b=K9pKheTiwFCa5R2i1BN9AoO/vUr9ss80gae5ioSvDm4XwjOyh0+XSbwX0ZLcibVGOl De2TDTmh6ofjUyG5nRtyhAvwbs7cFzPK2pwrw97y+sGzfKjYKv+Yp8tcylgFcnOUAgHi yAvJokKDKi2cUDsdFm3bLHLhKBB1duAXVjeu7XrPFW4Ntd3uLq634+dyXXKQ+Julzymk mn/fmX2k6jK3ccXpV0HCO0WQTdqfGZ4ufpl7qiHqH1MwjOVr1uTkAzRbsbrC2yAjwTjr pk+J+bNYVigV0FC/DcLDZdjZAMxKrRaRUmrV8S2fNJMOdGPtwpF908px/+jWXnSflrLF jL6w== 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=trVgsU5xGWa9047h2Krrm2VFiv5wm8flZDsryMDlfPU=; b=xpoJ6qPROZAD8AIhxjVfs9UhPCNc6G0RfruJ0/8AaZCKB5IiqefZQTyreYq75Ig3A3 LCefmem/UAI7/UCsIVFyuvzTrqrOpI2Nmg4ygTr+L6IoTJZrVw1dQvDxq9EcWnZKwAQz ZTuvAoHaRHqCdStVQLnOhf3pVNwCU+wsNiG+dITaNbQpyzZAntTgRb3PlQC2/96xCIta 6wFYHF5re6mkV9sOk+QOPkQ4SWcgmd50h/Q5wWfZDD6B8AwVuDBKr9F5owM7Wa2QSaRA DNE/ZWiipTh26cDCS9BM7fvZCbNmZNrGtCB78yEKU0eUPdNS/NGHCYcgdGQXHERuUupO 4RKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=PhSHFWi4; 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 r5-20020a17090638c500b007ad8bd5a3b2si3559487ejd.263.2022.10.30.05.12.35; Sun, 30 Oct 2022 05:13:00 -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=PhSHFWi4; 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 S229670AbiJ3MHL (ORCPT + 99 others); Sun, 30 Oct 2022 08:07:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiJ3MHJ (ORCPT ); Sun, 30 Oct 2022 08:07:09 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5635C762 for ; Sun, 30 Oct 2022 05:07:07 -0700 (PDT) Received: from zn.tnic (p200300ea9733e745329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e745: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 08B461EC05DE; Sun, 30 Oct 2022 13:07:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1667131625; 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=trVgsU5xGWa9047h2Krrm2VFiv5wm8flZDsryMDlfPU=; b=PhSHFWi4cCDhipZIgVt+ynIXlr2k8UK7V4GcQRHZpEse8BucoAVyYkfZog/kOvpdFk1sSJ nRyz9nU+2UAIN8CDNDbCJFiDFeHvL1Mupn8LcovlO1U0/pp8ZYjqX+JraW2jM0GXdishJw SweuCoB236fbM4Vjze0Yluthv6pO/4w= Date: Sun, 30 Oct 2022 13:06:58 +0100 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 16/16] x86/mtrr: simplify mtrr_ops initialization Message-ID: References: <20221004081023.32402-1-jgross@suse.com> <20221004081023.32402-17-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221004081023.32402-17-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 Tue, Oct 04, 2022 at 10:10:23AM +0200, Juergen Gross wrote: > +#ifdef CONFIG_X86_64 > +#define vendor_mtrr_ops(x) NULL > +#else > +#define vendor_mtrr_ops(x) &(x) > +#endif The idea is good but this is just as hacky. Just assign the correct one in each branch without this funky ifdeffery. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette