From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B9A1C4338F for ; Sat, 31 Jul 2021 07:19:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62AD66101C for ; Sat, 31 Jul 2021 07:19:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231841AbhGaHTJ (ORCPT ); Sat, 31 Jul 2021 03:19:09 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:45656 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbhGaHS5 (ORCPT ); Sat, 31 Jul 2021 03:18:57 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C982C221EC; Sat, 31 Jul 2021 07:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1627715930; h=from:from:reply-to: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=WYXKdOA0fBvv3pT9/gbt1KAOZlZXQo7vqAE3CEoQmhc=; b=SIZqtvPzmOG/Ra46XoIlPdRUWTuUFNuTDrzOMC50MSV4nxIMkY5X4fyufS4wSZ25YIqksq KyNFHPZL6TJLku52OIdWlXz7sly68sLZKaWjTRandjx8g52RO0N39dvaz7FAIO7aMWMavo qmJJ/cdDK69bA4jpapVwzUKN0oEkU74= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1627715930; h=from:from:reply-to: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=WYXKdOA0fBvv3pT9/gbt1KAOZlZXQo7vqAE3CEoQmhc=; b=W5JnI93AVF4zlV18NHpo6fRUwu6MQgLRiKthCmKHv0li9fxNDaTCx2VrYtLlIcSEbgagVh 1LnIRyxI9ZxFaTAA== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 0524B1368F; Sat, 31 Jul 2021 07:18:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id eWMiO1n5BGG4OQAAGKfGzw (envelope-from ); Sat, 31 Jul 2021 07:18:49 +0000 Date: Sat, 31 Jul 2021 09:18:48 +0200 From: Joerg Roedel To: Tom Lendacky Cc: Joerg Roedel , x86@kernel.org, Eric Biederman , kexec@lists.infradead.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , Arvind Sankar , linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH 04/12] x86/sev: Do not hardcode GHCB protocol version Message-ID: References: <20210721142015.1401-1-joro@8bytes.org> <20210721142015.1401-5-joro@8bytes.org> <1eef6235-a8d0-1012-969e-ef6f0804d054@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1eef6235-a8d0-1012-969e-ef6f0804d054@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tom, On Wed, Jul 21, 2021 at 04:17:38PM -0500, Tom Lendacky wrote: > On 7/21/21 9:20 AM, Joerg Roedel wrote: > > /* Fill in protocol and format specifiers */ > > - ghcb->protocol_version = GHCB_PROTOCOL_MAX; > > + ghcb->protocol_version = sev_get_ghcb_proto_ver(); > > So this probably needs better clarification in the spec, but the GHCB > version field is for the GHCB structure layout. So if you don't plan to > use the XSS field that was added for version 2 of the layout, then you > should report the GHCB structure version as 1. Yeah, this makes sense, exept for the struct field-name ;) But anyway, I keep the version field at 1 for now. Regards, Joerg