Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp55676lqe; Tue, 9 Apr 2024 14:22:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSpn9Fs5x0eUHJJtkqw9lIWhuDCQ26F2d10vRwD7f9gA8QVw5pKA/3RAhSE0TPAWKS3YFNlkFh7laW4/v6zOcYIwwL7XlwhyWo3KCgeg== X-Google-Smtp-Source: AGHT+IGv3822RxJ7yjgvYwIgi9a9EgPNZvvuwJqtuMQZPm9LpWvv6MfBVB1w50E1C0rEbleqntRy X-Received: by 2002:a05:6a20:dca8:b0:1a7:1cb:3e20 with SMTP id ky40-20020a056a20dca800b001a701cb3e20mr1090807pzb.54.1712697762071; Tue, 09 Apr 2024 14:22:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712697762; cv=pass; d=google.com; s=arc-20160816; b=LeUgUMk3DdVciLoTf+MXcksM1SIuDosdaRsmbqQeZFVGil5mANB+HwgEw24QKQsDGG zgsoDdyEaT8TTvzqlXxgpCyySXnGt+bTIN+JWIoFxOzDhRwrseODl7RyoLgJUCqVBf7K PHbO6NZait9rnwICEo01+zlF5I7B9W5oAxsxs3+WNqDOKFvJ/yv+sf9ROH+AiIhnhfK5 tGVaMwwcPkOzdxGySp28/7IAgSVCY8+8jSNvo1EBA9UoamagbvdoGl77Vq0rEnDqWCfQ 9J25vU/jzrD/CZiyrHg+v+BV5L6XMOen0Enjr/ILkKTlymbeclNNURVYBVkbVXuvQKML Qg1A== 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; bh=v7F6f4zB9IU1PUaW1QDLEiOBHQMAngJxTegj7SspJr4=; fh=eZR9H02Sb3Fyxfyws1Td7uYPzrCp3Fh+EjFj6MCUPJU=; b=oVKkZDOKX+6/MLlS0QaXde2bh4ZlZ9v9YJsGOJdquF8SS0SNFpTiyGNwVqF++U5M9e Pbr06UFKRCT3TBQxnWOKvr2VsYVBdheu+n7C7t9VEyAbL45UyB+Twi2DIq/h44Lhy83y d+L/8Bk6jVY/5uLqHBxCTqy1q/uOyf5IxmjaixeTnBk1yaDBqpy8f7dQqT8v/0CwG2iN lPXOyOf98hxwu9XYkyk5zJ9X/H54yWwmIuHERz3r5WpRJzinEzBzn48vdUY4z/vs//HR p1bw4bGv8+yMeGMU0I+cOWT55+ot0lRXawoeUw5CHp/Yr3ZQIixcFPU2ZuqRMEgcQaRK dYcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-137637-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j1-20020a056a00130100b006ed008652b5si9266442pfu.103.2024.04.09.14.22.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 14:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137637-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-137637-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 56410283E04 for ; Tue, 9 Apr 2024 21:22:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA0D5158A08; Tue, 9 Apr 2024 21:22:36 +0000 (UTC) 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 6A9A015746C for ; Tue, 9 Apr 2024 21:22:33 +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=1712697756; cv=none; b=OQHz+0cBZ5D2D8jh0tYxXvhwmShpWADjmaw2oli8nbQTZ1hasrsoxZBxDQZY+QnVXqL5o1FpdoOXMz+OAC3PeMZhdi+eIQin3kWsRVp4CL7QooiIfFevmIScG9P4ZYPNS1ltUOLjkmmO+p+9UCcnWn3Eu4nmKZz/vGyScrZc8c4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712697756; c=relaxed/simple; bh=yHbf2Av6vbnjP4V9YlfMBezal1Uau1LRG1ANx8tkxzQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Tk3EE+ptgTfZHcD3vYsGWHtIFEud5VywH9/qKwB881qq9fRpS8mJijU0pkddT97ao8Ikc0WmILukv/sxVXRt1HQlKw9HN1dasnuDjguhcbrRnS95q9wkBNzac49CfKKNSdgJBwIztrwfzBcyqNANx117JuJyAg8/iBvfjjaySfk= 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; 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 D254C40E00B2; Tue, 9 Apr 2024 21:22:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.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 gjc4wQ84Wzh0; Tue, 9 Apr 2024 21:22:26 +0000 (UTC) Received: from zn.tnic (p5de8ecf7.dip0.t-ipconnect.de [93.232.236.247]) (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 D3E6340E0177; Tue, 9 Apr 2024 21:21:58 +0000 (UTC) Date: Tue, 9 Apr 2024 23:21:52 +0200 From: Borislav Petkov To: Ashish Kalra Cc: tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, rafael@kernel.org, peterz@infradead.org, adrian.hunter@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, jun.nakajima@intel.com, rick.p.edgecombe@intel.com, thomas.lendacky@amd.com, michael.roth@amd.com, seanjc@google.com, kai.huang@intel.com, bhe@redhat.com, kirill.shutemov@linux.intel.com, bdas@redhat.com, vkuznets@redhat.com, dionnaglaze@google.com, anisinha@redhat.com, jroedel@suse.de, ardb@kernel.org, kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/4] x86/sev: add sev_es_enabled() function. Message-ID: <20240409212152.GFZhWxcIjiEsObqecf@fat_crate.local> References: <20240409113010.465412-1-kirill.shutemov@linux.intel.com> <906e037ecd7592eba859448606b028a68a5d48f8.1712694667.git.ashish.kalra@amd.com> 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: <906e037ecd7592eba859448606b028a68a5d48f8.1712694667.git.ashish.kalra@amd.com> On Tue, Apr 09, 2024 at 08:42:38PM +0000, Ashish Kalra wrote: > From: Ashish Kalra > > Add sev_es_enabled() function to detect if SEV-ES > support is enabled. And use it exactly once? Nah, use sev_status directly. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette