Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1692944pxb; Wed, 2 Feb 2022 10:20:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzH3czDJdEaEvYfgqrvuVtjTQC9wSgp0snaXNNqnhHJDGMXhptUcG7f3210X33qQ6Ix1bJ0 X-Received: by 2002:a17:90a:17c4:: with SMTP id q62mr9445160pja.145.1643826031832; Wed, 02 Feb 2022 10:20:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643826031; cv=none; d=google.com; s=arc-20160816; b=FRHLxwQBhVDIGuQkrW6HxkWsu/NRLT5FikZeKfw7JISGf4bu6eMvWRCW3lOi3IJAdY XfobrmA0Q9rVQfcX7riy00KXzjY1DuL/9aMqBWzo13G/KCrhdHzrJsH8l79pmrn7T2px hL9gRZst6tUeAQPd1w2AlM4snXP1re5I7VXPsYjJkbHBjMu7NqJW6E/mvRCZ3p2xgDWG CRxs8E48VBdEXKYfSJXhFjI606so+j8nezkr7frbhHJ57iZp0v5V0E3bn5eLe58x+hbX ud1YbaQapqCZ/KcG7g+fg+JmMoRXl7X886399i3NV2TcgTXCNqTRyr2Zu+Sto5bKeenL qU6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=7Y/ekKx7CJbzOSRaYt7+hWzCBFyjxOeNdwQMqGnqAqE=; b=A9jxULEB/skQcMxUAPThVJ2p0tP3zYRuEscaYPzUfg+NN09b4HTsWC7uCRf6ckfGCB mYym5dRs9JFn2mLtjhFVHHF+fcE0Yh2vD1MqS1dWRu+OVpCCLAGlm9gYUzbU1v4JeSdP eb1AFg+fjPOhBGDUBp0vNJdSfKhyo5RcxKHdrEOYXYmxoSNriColaigzsm3TEqv+khzJ cpHkPgRVFk4BqM10+yb2nTLgy5ACwNFz9Fiw4NL9nYzYzMT71no9YYFTY5OYDDlPz+Lp AjgnrPsy/oiuKO4WJxAy45rAz2TYLXHOySxnSojQfFswvFMu4H+C3B+5K6RMo2sPT4uO HCXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=IhM3+XjY; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10si22320547plf.196.2022.02.02.10.20.19; Wed, 02 Feb 2022 10:20:31 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=IhM3+XjY; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236265AbiBATbS (ORCPT + 99 others); Tue, 1 Feb 2022 14:31:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbiBATbR (ORCPT ); Tue, 1 Feb 2022 14:31:17 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92591C061714 for ; Tue, 1 Feb 2022 11:31:17 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643743876; 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: in-reply-to:in-reply-to:references:references; bh=7Y/ekKx7CJbzOSRaYt7+hWzCBFyjxOeNdwQMqGnqAqE=; b=IhM3+XjYX1kJQfOubKofcK0GxCzGx4aWPQAXyv2tyTlJQ0y5BU/AKPQGFwMWTXXNBef3pK FIukCel09gTeDg1B3NUBrtopVzmONfJU7lW3YcuodaPATodDDYoe1qodLSlgdAPel/Cr9Y 5Wg4jE0uwzNpmc49q42SMOQe9gT+2xXw4IDiRoLZBF7JKyGGI97Kz+dx3vjOuRhXopOCCk AC2tczeteIk8GA5CDcQ2fM8KzdD8l/1cLmLw9SmwA6H3lN/WmO7QVAUzE6ToBOnTqIrMXI 9dIo7ZEjV0CKzBD123lG41RgCxn5kQDNJqdMsS5QElnWTy7vki1fe+EgJQxj0w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643743876; 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: in-reply-to:in-reply-to:references:references; bh=7Y/ekKx7CJbzOSRaYt7+hWzCBFyjxOeNdwQMqGnqAqE=; b=CpLkh25j1CyRbED6oZx21axuSTv3ecUvO0rCf5uPyk5QeKSEP4X4LNgLp0yjb/kDQteyW1 N1ymqpUjJw6MR9Dg== To: "Kirill A. Shutemov" , mingo@redhat.com, bp@alien8.de, dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org Cc: sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, hpa@zytor.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, jpoimboe@redhat.com, knsathya@kernel.org, pbonzini@redhat.com, sdeep@vmware.com, seanjc@google.com, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, x86@kernel.org, linux-kernel@vger.kernel.org, "Kirill A . Shutemov" Subject: Re: [PATCHv2 02/29] x86/tdx: Extend the cc_platform_has() API to support TDX guests In-Reply-To: <20220124150215.36893-3-kirill.shutemov@linux.intel.com> References: <20220124150215.36893-1-kirill.shutemov@linux.intel.com> <20220124150215.36893-3-kirill.shutemov@linux.intel.com> Date: Tue, 01 Feb 2022 20:31:15 +0100 Message-ID: <87czk6z8n0.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24 2022 at 18:01, Kirill A. Shutemov wrote: > Since is_tdx_guest() function (through cc_platform_has() API) is used in > the early boot code, disable the instrumentation flags and function > tracer. This is similar to AMD SEV and cc_platform.c. > > Since intel_cc_platform_has() function only gets called when > is_tdx_guest() is true (valid CONFIG_INTEL_TDX_GUEST case), remove the > redundant #ifdef in intel_cc_platform_has(). > > Signed-off-by: Kuppuswamy Sathyanarayanan > Signed-off-by: Kirill A. Shutemov Reviewed-by: Thomas Gleixner