Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1155066lqo; Fri, 17 May 2024 12:24:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV1baT+ZN93tb0UNysPz/qYijLXB+F0MqNbOQHK9w+VrWp7WQnYdCcAOeJKU4jIk4JkSpMXCza85XR4++EmjXooOFD62G+UVMMIisLn9w== X-Google-Smtp-Source: AGHT+IEwIBeBSy3H4s2nx4Rm5VwhFjThsUjfYQPxeNH+1tW4AuuSn6ueIQhGVDDoyn8jpNNQR6ns X-Received: by 2002:a05:6830:2005:b0:6f1:143c:3c33 with SMTP id 46e09a7af769-6f1143c3debmr14530466a34.21.1715973863706; Fri, 17 May 2024 12:24:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715973863; cv=pass; d=google.com; s=arc-20160816; b=DL09Nb6pDfOkg9q40+EUWiagsyen5QvkXJQLx23fXJNinTxwMUbt1SAD7t7Po59r2s nRlygu0KSsmTosY2w1cSHLHWTRETcJdstcu/b9CQ8fJklrIf5locrr5BA8CfLJ1QDryP 7Da4QOUZXnFz2dQ60sz1dolygU+tc/MZBKiO9zl/UqXLqsfom0aF4qnAL3tt6y7CjTTv BWw4D/MuC5men1Pk5mcz1k80VvUpGAubF5CKmvKluoAi50SeNQGw78RpNNmVuQ5LC9tW ND0ravBnRme0/SSsopwuO9EFbgy3ACAck9tVDd1MDy5yel1gH5ej1H/z2NiITsHgXnA0 MC7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=J7Crj1QNIeK8QjGNMpKjSRCjOYd0KfF9nXq4uixkpfs=; fh=yOXSm0E/8tOfmRnhk0JfE6MKLQieMwDr2DHng9Fw+Y4=; b=sw7qkNEg0lzfT4o3iJjLuKA/vkLIVBqBYVPXuUVNL+vOS4ynlLw82NHKdNzKOsFiaO xz9TZfCBe+6E2GLuFYEJh/wRqX67pXir/AYFckm20Y1RV4d7BPwbwyyuOmQWtC+qwqZ0 MZ9Oq04vT4wvdHLz9UcbEsIycLzhGTNpUFDce3f4GqFJABHASA05ep0pghuOX6y7fIBX D0YbjlBi2UCyCoo80SWYBdFGMv8ECEO0bLnb7tusrJF/amtkrYFenOVVZ+2T/hc9CMKC 1suCSu5jEbF0ldx2cQY2vyfd4gPtk8DDiDsTeklrUzBDpvHhx7BzCeToXZgJ8jEboglu GqiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=Qt+77uYT; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-182564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf297257si1859343885a.166.2024.05.17.12.24.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 12:24:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=Qt+77uYT; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-182564-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182564-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6AF601C20F2C for ; Fri, 17 May 2024 19:24:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C60F140361; Fri, 17 May 2024 19:24:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="Qt+77uYT" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6C0E13FD8D for ; Fri, 17 May 2024 19:24:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715973849; cv=none; b=V3Zl27UddB8oYUINds7QQFjb4qY83Rz2iKVDbfRwASRM5K9XLapzo/NgRNPopUvQJel67GD40X1gDsCf/ZdVSDqBhF6L5GA40+fm/e0MrNQHownhopjN4eX6DzvEdqBAQUcgWwu04FJWF8Kj6CqeJrqRLkPdxfMgk6nMJLxoESI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715973849; c=relaxed/simple; bh=jqEKv9YQWGDI6y6rk0fH+p2w4mRzFWQV7kfY811W3+k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W9FrCjKFqFu4jMD/tOUWnV2j0orkkq0/TdMq8UaN9ZNrMo98T3Sal83//AgE8a1cVd175khQuA6zUDiXyqLggdoRPlyZ4/PbYnownrWCui36vkRmpFYeFNBtWPkXT1stlnAaOL3HjYLEh9+IzNK4OR9zi/xRjkg6nIWeex3+ApI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=Qt+77uYT; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 7863E40E02A7; Fri, 17 May 2024 19:24:05 +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 UwbL3muqleYo; Fri, 17 May 2024 19:24:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1715973842; bh=J7Crj1QNIeK8QjGNMpKjSRCjOYd0KfF9nXq4uixkpfs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qt+77uYTuH9Iju/AJGYrr2JQWEWTgnbtg+yQ6REinUitmOS9zxjWx1jcQ2ytOTS0e LNGVS7d3EEt4kLnAMkac4MY9ll6nyKsa0h08GUYpryhFxCdXQIWc2cce02E/waclyg DebsHPsfMCan4EbeLdPMQmf9lZa/ZpfmmBoka1gIjPcj7YP2/BmledV08TtOpchUtB 5VNtX/G3Mab8A1BVjNKq9VXPOox8KzFgWL2pxoPRL3yD1YUMRRwc49WbRdamQQCyDZ fVNNHbAvn5DMZoS4MskXg7kIXZ+Rm4WpCg0/+XpFfpVEUFe9NJq6nWxjPqwCEnZO5U Ac/96sF2Ms0zJFJyYuPqkmhvozYMKAhsFxNMDK8Vm5mXTXTxPGqSQ+drVjxmrVrPHw T0y/R85jwFogGURtSsskwuvklF1RVsD+/tg2snjm/6wXeW9fgMhB+VzFPwBQefmODS 6BtpiKmgSTy1YeWyy3lIOa1xzEN4eQL6cdbA18AX13yGA1hAh+OrQmXpDHpaZxUt7R v5MOGiscTRL9O09BPmq+QeWfwmPdU4vCmvtE73foxAXyP/9xy6IaFoLfVapOIpBvn3 ZX0ovKIWwFY+af9zxf6GLq/Sh9UspGQWqimMmKu8DZNOcXmGJVFcfq11IZ3CU7ASOC OASwOB+HfTsJJTQnOJ73fiuc= Received: from zn.tnic (p5de8ee85.dip0.t-ipconnect.de [93.232.238.133]) (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 1824840E025E; Fri, 17 May 2024 19:23:48 +0000 (UTC) Date: Fri, 17 May 2024 21:23:41 +0200 From: Borislav Petkov To: Tom Lendacky Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-coco@lists.linux.dev, svsm-devel@coconut-svsm.dev, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Dan Williams , Michael Roth , Ashish Kalra Subject: Re: [PATCH v4 05/15] x86/sev: Use kernel provided SVSM Calling Areas Message-ID: <20240517192341.GXZkeuvZmXug5gSbH7@fat_crate.local> References: <07266b47e749267ef9a9ccbc9e8e9df78ed54857.1713974291.git.thomas.lendacky@amd.com> <20240508080509.GWZjsyNS0xBXUzKPUG@fat_crate.local> <22dc9ceb-4b16-be68-ed8e-c6a222619032@amd.com> <20240508195842.GIZjvZcpRz0bdkiPWA@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Wed, May 08, 2024 at 03:09:02PM -0500, Tom Lendacky wrote: > If we're not running at VMPL0 (based on the RMPADJUST check) and if the SVSM > doesn't advertise a non-zero VMPL value, we will self-terminate. So those > values are only set if we are not running at VMPL0 and the SVSM has provided > a non-zero value to us. > > I'm going to turn the function into a bool function so that the call > becomes: > > if (!svsm_setup_caa(cc_info)) > return; Sure, I guess I'm misled by the if (bla) sev_es_terminate() which is a function call but I need to read its name to realize that after that point we're either terminated or we have all the stuff required to run on a SVSM. > I do. I think you're missing the RMPADJUST check that causes the function to > return early if we're running at VMPL0. Yap. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette