From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web09.5728.1603141065496383888 for ; Mon, 19 Oct 2020 13:57:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WEJvQARa; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603141064; 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=JwJUpegpCgf327I6iA5G5fs1fviFwCUybNjjgPuYRQg=; b=WEJvQARaiuFsKlmxvULdUtPHvVa7Ri9ltvlTLo43v4mJ1Rlq3YCbPvVBBaZ4/5KbkJBmZi H1ZLD1u5yPMKZl9J+rXpFYk6O8MBkzOM6ty+rObn3nxPuKvp+usoO9Ud7nEjqeWxgLH+8G A1xvZb/whxlRiQAm/WnPXU1+Vk+tx18= 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-450-ASsklur5Pxeqj0-S21H3sw-1; Mon, 19 Oct 2020 16:57:43 -0400 X-MC-Unique: ASsklur5Pxeqj0-S21H3sw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE95A8030B4; Mon, 19 Oct 2020 20:57:41 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-137.ams2.redhat.com [10.36.113.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92F366EF59; Mon, 19 Oct 2020 20:57:40 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 08/11] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Set the SwScratch valid bit To: devel@edk2.groups.io, thomas.lendacky@amd.com Cc: Brijesh Singh , Jordan Justen , Ard Biesheuvel References: <77a031eb3e5a47c2d384f37707ad9e36358ea327.1602864557.git.thomas.lendacky@amd.com> From: "Laszlo Ersek" Message-ID: Date: Mon, 19 Oct 2020 22:57:39 +0200 MIME-Version: 1.0 In-Reply-To: <77a031eb3e5a47c2d384f37707ad9e36358ea327.1602864557.git.thomas.lendacky@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/16/20 18:09, Lendacky, Thomas wrote: > From: Tom Lendacky > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3008 > > All fields that are set in the GHCB should have their associated bit in > the GHCB ValidBitmap field set. Add support to set the bit for the scratch > area field (SwScratch). > > Fixes: 437eb3f7a8db7681afe0e6064d3a8edb12abb766 > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Signed-off-by: Tom Lendacky > --- > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c > index 565383ee26d2..f9b21b54137d 100644 > --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c > +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c > @@ -66,6 +66,7 @@ QemuFlashPtrWrite ( > VmgInit (Ghcb); > Ghcb->SharedBuffer[0] = Value; > Ghcb->SaveArea.SwScratch = (UINT64) (UINTN) Ghcb->SharedBuffer; > + VmgSetOffsetValid (Ghcb, GhcbSwScratch); > VmgExit (Ghcb, SVM_EXIT_MMIO_WRITE, (UINT64) (UINTN) Ptr, 1); > VmgDone (Ghcb); > } else { > Reviewed-by: Laszlo Ersek