From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75B63C433F5 for ; Thu, 16 Sep 2021 19:07:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 55022610E9 for ; Thu, 16 Sep 2021 19:07:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347191AbhIPTI5 (ORCPT ); Thu, 16 Sep 2021 15:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347476AbhIPTIv (ORCPT ); Thu, 16 Sep 2021 15:08:51 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 408A6C0613A8 for ; Thu, 16 Sep 2021 12:06:59 -0700 (PDT) Received: from zn.tnic (p200300ec2f11c600a255bc81368aa6d8.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:c600:a255:bc81:368a:a6d8]) (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 C1F741EC02DD; Thu, 16 Sep 2021 21:06:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1631819213; 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=yQsb5zTzN7+q1JBlshNJrgHZ+s2ohsiGBIs1h0SMgGM=; b=j7w6alr5afrOdWYg58+CHrtTsR58uWYjRXMn9Meyovca295E5b1Jkj9sEmZ89K5/tpA4/T zNFGdF6fVmnkaSuQnF+UmesYXdEqBJP9SCGsqB0g2pfH+IK7bIeyvwqvBRkuqcSHa9gxrW cITaaF8zNevtAxdoW7EPx1f9vyfSX+8= Date: Thu, 16 Sep 2021 21:06:52 +0200 From: Borislav Petkov To: Dave Hansen Cc: Kuppuswamy Sathyanarayanan , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Paolo Bonzini , Juergen Gross , Deep Shah , VMware Inc , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Peter H Anvin , Tony Luck , Dan Williams , Andi Kleen , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 01/12] x86/tdx: Add Intel ARCH support to cc_platform_has() Message-ID: References: <20210916183550.15349-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210916183550.15349-2-sathyanarayanan.kuppuswamy@linux.intel.com> <645f6e73-1211-5ee2-07f7-cf4023358706@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <645f6e73-1211-5ee2-07f7-cf4023358706@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 11:44:48AM -0700, Dave Hansen wrote: > How did this end up out of line? This means that if you compile-time > enable support for even *one* "cc" platform, you can't optimize the > calls away. This ends up being at *LEAST* two calls, just to get an > unconditional "false". That just seems silly. > > I know this is a comment more about the cc_platform_has() series that > this one, but this compounds the problem. Posting here too for the wider audience - follow this thread pls: https://lkml.kernel.org/r/9d4fc3f8ea7b325aaa1879beab1286876f45d450.1631141919.git.thomas.lendacky@amd.com -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette