From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web12.50883.1590501527216799064 for ; Tue, 26 May 2020 06:58:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Sc8DVc36; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590501526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2rlDRg4T15Y1aBTzZHjs1VTu7kE5lfF8FHGlgSvXlbw=; b=Sc8DVc36+FvvEnCeQC7neQXXz9TkDpZirpjlS+LiVwcI+qy98jG2mlbwwtw5xv7bwcEUGr HK0JOBAFzVadJQ9QlDJX7MqGJXQqEsB9h0xxWzj3zNM5R7Xvly0sJ+fSdbig6CsJAZ/Fwq XxY4TGdusewus5QMLFpEQtDO0vzt4lI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-199-YNO0VxnMN5qYk9evlIGI9g-1; Tue, 26 May 2020 09:58:40 -0400 X-MC-Unique: YNO0VxnMN5qYk9evlIGI9g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2195C108BD0A; Tue, 26 May 2020 13:58:39 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-136.ams2.redhat.com [10.36.114.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 082196EDAA; Tue, 26 May 2020 13:58:36 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v8 37/46] OvmfPkg/Sec: Add #VC exception handling for Sec phase To: devel@edk2.groups.io, thomas.lendacky@amd.com Cc: Jordan Justen , Ard Biesheuvel , Michael D Kinney , Liming Gao , Eric Dong , Ray Ni , Brijesh Singh References: From: "Laszlo Ersek" Message-ID: Date: Tue, 26 May 2020 15:58:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 05/19/20 23:51, Lendacky, Thomas wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 > > An SEV-ES guest will generate a #VC exception when it encounters a > non-automatic exit (NAE) event. It is expected that the #VC exception > handler will communicate with the hypervisor using the GHCB to handle > the NAE event. > > NAE events can occur during the Sec phase, so initialize exception > handling early in the OVMF Sec support. > > Before establishing the exception handling, validate that the supported > version of the SEV-ES protocol in OVMF is supported by the hypervisor. > > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Reviewed-by: Laszlo Ersek > Signed-off-by: Tom Lendacky > --- > OvmfPkg/Sec/SecMain.inf | 4 + > OvmfPkg/Sec/SecMain.c | 181 +++++++++++++++++++++++++++++++++++++--- > 2 files changed, 172 insertions(+), 13 deletions(-) Nice comments relative to v6, my R-b stands. Thanks, Laszlo