Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp3478915lkm; Tue, 21 Sep 2021 17:09:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaudxo17UUeF5INvgbv60cfPtR6EShtbc5PlGKxoGk3jHNs0CAWGiDH8i4jyhikUrlfwYt X-Received: by 2002:a17:906:b80b:: with SMTP id dv11mr30200065ejb.156.1632269352172; Tue, 21 Sep 2021 17:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632269352; cv=none; d=google.com; s=arc-20160816; b=FSPDONwpVUlSq+ad+Bh6aYIvBvhOTAT1GD8uMLtU0A97CwTm00R2+uaETEvsvRT0zJ 02Utmc0hxYlxNmZtoZu8SpyKo3YCTRXq3eIHX5vMgbyirvzrLsWpDB0byROas8SiPLGJ w/efjNTrxcZVXO/C1mr6IpqhA339w9qky5kSS/78mIbF79yTMLCDtgs2qHFL1KhDeAJH V3Emz/xqpOR7JGsX3fairS+zn1cuOY3SNPbrDuuqXeDvAJKml6dl5c/vIiBowpDNGR2n 6VrSQVfTsyFYTp/V4PVwfGZOsqfgLLUe73oo6qkTX6/rLQ1pPvFWqKSFl0KBqIC64svX QtBg== 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=3LA4/O2mCyOef4VI1WFdoR8n1dGVVw7qzM7cBS6DVhU=; b=Ickk2sffiWWHdB+GyzDI7C2uqdUxJqgybhGNxDM5tOBpA5usN6Dsf8tldPz/kfZlii s5BKNuODLbqrxKFZAefW0bGv9X4q3jfh5Hd24yK9yaoKz3OrLMZoJliWHxfGo8H/3aOJ y+Nz9nvjUCRUMdDCaBfKEfwsDWmctT0iS1BW5Elsei9FcfKFpGSVa5DjaTtYTD4Dj7en 1uUtzrx97/5uAWRYmGIHg5C8YSjwRu/Gj4D0foCXiMqY1V/s3J1MnhTR7axk4L8FF+AT c7CfAQWNa8b68yAQOoLHl32uk8KTHhYPfhE0u0h4xFjC7d3zsJTU/LRpbNnc3TkELUFZ JpRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b="uz74/2S9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 17si631727ejx.425.2021.09.21.17.08.44; Tue, 21 Sep 2021 17:09:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b="uz74/2S9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235675AbhIUWAG (ORCPT + 99 others); Tue, 21 Sep 2021 18:00:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235742AbhIUWAA (ORCPT ); Tue, 21 Sep 2021 18:00:00 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B8D0C061757 for ; Tue, 21 Sep 2021 14:58:31 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id e15so3206428lfr.10 for ; Tue, 21 Sep 2021 14:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3LA4/O2mCyOef4VI1WFdoR8n1dGVVw7qzM7cBS6DVhU=; b=uz74/2S9fGGuaG1ODTSPcqBPXWYPIeYWZ5doyMS2bRw5AX5Q0Ua+uMdim4ZuJxyrxA jJZQO4P96OqxH5cKvegadiVeIhPzNJbdYGDNOj6HudiXM/SjkCNrO1WvHS6o1vufFzsX 2aSN3AaXAf4xQbbvR+FPssTEArjutFFJ66GH7RUNHyFCNozOqySWjjTExvVocPFb39xr 6cGXTnJkbxFWnWohqMtGSjOnjJQnu/xNRG5R8l2FsElk/Lpvl66TfQOcwUYfJ1TTZ5xS XHIL9Tea6doFMlP16r8MNgBnWMAMa0JaH2OsWma5jit+qxznz4qqyPPj9R612HR9czFp 8TyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3LA4/O2mCyOef4VI1WFdoR8n1dGVVw7qzM7cBS6DVhU=; b=jyrjCEVT7QP+6+Ony4jFmiwNYE0ZxFA/+0cT0t18jHldNjMvpHZWyMhshjFP+4JTj5 alimVCXhElkceOtVdjHvdwHvL+3tAlX/nqfVewPaRPIXw7eytJCZF1q/BdY6npiMixsJ 3pYINbVWd9GsqfyqtTcJfutscSEb7GGIzsFM8HI9C6JU4E2qJrh3VIF/xaEyE60pKjul z8p8AxcYQB0LwMEe5dr9HBFxpBQnxd3krWimZjJBuy1Nht0xiQ/sjQO1RfXhH92a24gR K4g8vK4iosPDe6oAFMeBOvb2uwKliOEdiK9vL2RQpOZhurKdfHrW5mAKo6W9o1mvMc1S nrQg== X-Gm-Message-State: AOAM531BVncIbSKTkti84atCKFXW1+5AOA5lrjLKw9QQd6mftK4c0iwq 8Ca3+0ErhFRVl571RgumYPkzsQ== X-Received: by 2002:a2e:86ce:: with SMTP id n14mr11214294ljj.211.1632261509754; Tue, 21 Sep 2021 14:58:29 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id q7sm16555ljg.137.2021.09.21.14.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 14:58:29 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 5DF1710305C; Wed, 22 Sep 2021 00:58:30 +0300 (+03) Date: Wed, 22 Sep 2021 00:58:30 +0300 From: "Kirill A. Shutemov" To: Tom Lendacky Cc: Borislav Petkov , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, iommu@lists.linux-foundation.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-graphics-maintainer@vmware.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, Brijesh Singh , Joerg Roedel , Andi Kleen , Sathyanarayanan Kuppuswamy , Tianyu Lan , Christoph Hellwig , Thomas Gleixner , Ingo Molnar , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Will Deacon Subject: Re: [PATCH v3 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has() Message-ID: <20210921215830.vqxd75r4eyau6cxy@box.shutemov.name> References: <367624d43d35d61d5c97a8b289d9ddae223636e9.1631141919.git.thomas.lendacky@amd.com> <20210920192341.maue7db4lcbdn46x@box.shutemov.name> <77df37e1-0496-aed5-fd1d-302180f1edeb@amd.com> <20210921212059.wwlytlmxoft4cdth@box.shutemov.name> <20210921213401.i2pzaotgjvn4efgg@box.shutemov.name> <00f52bf8-cbc6-3721-f40e-2f51744751b0@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00f52bf8-cbc6-3721-f40e-2f51744751b0@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021 at 04:43:59PM -0500, Tom Lendacky wrote: > On 9/21/21 4:34 PM, Kirill A. Shutemov wrote: > > On Tue, Sep 21, 2021 at 11:27:17PM +0200, Borislav Petkov wrote: > > > On Wed, Sep 22, 2021 at 12:20:59AM +0300, Kirill A. Shutemov wrote: > > > > I still believe calling cc_platform_has() from __startup_64() is totally > > > > broken as it lacks proper wrapping while accessing global variables. > > > > > > Well, one of the issues on the AMD side was using boot_cpu_data too > > > early and the Intel side uses it too. Can you replace those checks with > > > is_tdx_guest() or whatever was the helper's name which would check > > > whether the the kernel is running as a TDX guest, and see if that helps? > > > > There's no need in Intel check this early. Only AMD need it. Maybe just > > opencode them? > > Any way you can put a gzipped/bzipped copy of your vmlinux file somewhere I > can grab it from and take a look at it? You can find broken vmlinux and bzImage here: https://drive.google.com/drive/folders/1n74vUQHOGebnF70Im32qLFY8iS3wvjIs?usp=sharing Let me know when I can remove it. -- Kirill A. Shutemov