Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp346350rdb; Tue, 5 Dec 2023 07:07:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGuDvhJDX0uCqo6BpwPl0P9tUaV1IwfjW8qQQh2Z5NoW/VE/kATk5t27r3LIZ3LaBUiynE X-Received: by 2002:a05:6a21:1c84:b0:18f:97c:8258 with SMTP id sf4-20020a056a211c8400b0018f097c8258mr2569884pzb.98.1701788843748; Tue, 05 Dec 2023 07:07:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701788843; cv=none; d=google.com; s=arc-20160816; b=r6IzDQlsRLjiNTpuPhkXMieYRf+l5AoPoDcCIYnVMRu/2tUc8Y6uIWELn40SQEU8MD /NS+6F2WGfNQ4lvmh3uKw5T7Xj4MOLd6nXE1R/6awZdJy8gmaSTIHWI6c1YvsmcLoKUU aP7qzqcys+rrZFdbW4tiqNqXCff4Bx6iq3DW0mjJqmYko0h5OcY2ihb9uA5VkiD/tCBa t+u1OyJc0XXoMYXw2Jp5Q8j+nN2oPKjJydPn9//DMvhRTPS8/8l+7wTOMLtfPddzIxvF i6dfZ7nXOM7OZJFgkGbEZnbIBT1UjpH+j6gtn6OMeqyHLVa8BhF/BcgGDkK4hrLI7JQM mOXQ== 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=SxyqOCYtJ0Jgo4rmEhzoNB1yXpfANdgicu3F4wlIel8=; fh=j/FlFT3AFBrfyd4b6/GF0zOfkjD/Y07yr8XvngdfZeM=; b=ung1eYCywt333kklfhGkjUDBbtbNRpfh0aMrZL212tAmwSrVjGl37uldbGQmOm9Zn0 SMitQLNxInnjedDjb0p5/WeM0pqvsk63n8xJP7ttqvyYwgblQ55HIy/bh0AtQA0EqTkK zIykHtpR9FcEubTb6qXIWbzYl0yP0/CPss3e2lwfPvjecX7GdY1i0wZUFgaOLa1luT3v OhhEFYVjlK+htKdricX1ULofa8uM7pK4+82g0C+3vxNvt1bk3MtvnkL1CsHdfS/f9qBe A6BpcFsnRYXb6ouihmBHUmpOnbWtYC9VGoWivRaNQgx6vonUyQAtPHJNsJeUpW1+WBE2 T9Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=L5gkoKXD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id j35-20020a632323000000b005b8ebaa2937si9484589pgj.47.2023.12.05.07.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 07:07:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=L5gkoKXD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2B9E38043EDC; Tue, 5 Dec 2023 07:07:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345825AbjLEPHB (ORCPT + 99 others); Tue, 5 Dec 2023 10:07:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345813AbjLEPHA (ORCPT ); Tue, 5 Dec 2023 10:07:00 -0500 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49C99A9 for ; Tue, 5 Dec 2023 07:07:06 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 27BD340E01AD; Tue, 5 Dec 2023 15:07:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0YSLOHYtqL_t; Tue, 5 Dec 2023 15:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1701788822; bh=SxyqOCYtJ0Jgo4rmEhzoNB1yXpfANdgicu3F4wlIel8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L5gkoKXD7jmHN85/Z7vuHn8ouhDbVEbLES0u6GoHalQz33UxUm3kZCRd3gFmCvVAt g7ESLaIq00QWcaknOs/1TPwXWSxWaRMhn252kRLUYYp6Zy8KuyMfH9VUwzT9i0xZTQ 4x22L1/Aar9dD+wZVJKgqw+FOMnBetwjRKgIRgWzL+RLxGh/tivYD8X/weGDxBrRHG vPQm5xDdQ6XVj10X0II0ThiJrf2U5guOEcz0Yg9KCvEHivqASFMmOsOQvQnsXBJEaP NERtsTqvo3DLZ8PKg/LFjLIR59MZMYKDfiLIeqKidDAx9B4BImONeqd/h3vq3RTyyX Vj4EgWkarldHckRl9I3Bo2+pJNSREK3y/yJJIq5ZbNGRKP0iv6YcIp74Pb478opu0u iGpDQaGxOmQ4iQb2OUZuQdTKbLEUXMm4xWERCQXBIvklHlm6yWfKoJ5ZB2/dk9gjI8 9a8OSXntqmVEbx92x2HLFlQ4crx58cl3ld+CDTu0Wfl6VowDDZhnFANhgWtWraosAH irdNBshe49cnqeMVzJmJjm3vEes58VV+Oe8shhMQgEpXOpnzqrA45vjy4FCbp/j/LU 4KyN5IxR9hSBWxTQSqLW7SJhsapaB+Ey2l1zrgkCS5i+1e3hm7NprOiyOr3Gey5YAS cUmCq5Z+JTplMXcoI8cv6TO0= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 3C7C540E014B; Tue, 5 Dec 2023 15:06:53 +0000 (UTC) Date: Tue, 5 Dec 2023 16:06:48 +0100 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: Tom Lendacky , Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/coco, x86/sev: Use cpu_feature_enabled() to detect SEV guest flavor Message-ID: <20231205150648.GDZW88iAjBzYoIJ0+o@fat_crate.local> References: <20231205143738.2875-1-kirill.shutemov@linux.intel.com> <20231205144619.GCZW83uzAomKmupn7j@fat_crate.local> <20231205150012.6lma2wzcellr7pz7@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231205150012.6lma2wzcellr7pz7@box.shutemov.name> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 07:07:20 -0800 (PST) On Tue, Dec 05, 2023 at 06:00:12PM +0300, Kirill A. Shutemov wrote: > I don't think cc_platform_has() is the right check. On TDX side we use > X86_FEATURE_TDX_GUEST for this and it works better than stretching > CC_ATTRs beyond their meaning. You don't think it is the right check because you do something else on Intel? I can't follow that argument. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette