From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web10.6618.1604420578682845214 for ; Tue, 03 Nov 2020 08:22:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AujprwxC; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604420577; 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=tyQMIMGVDVnhIR1dIm5vU7oQlXqJJZC71iTGQ8nzvF0=; b=AujprwxCNIVRMq2jahqsb0zPYLplOl68n0hZTzv4WEHdnE6b+WrCgwWmZJ3H7bW8HX2YBp DwA7f7ucPrMIkEIwaGg1VSz1KI12cYv4TRsN7EDPH/NXsSOh4OpCGQs+ATrMhdNrQHbUMI A28LMZPZkyGKfqNtesWwHWPiWHltFpU= 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-261-h7hgN1VgOFSaoV9h-sOAHA-1; Tue, 03 Nov 2020 11:22:53 -0500 X-MC-Unique: h7hgN1VgOFSaoV9h-sOAHA-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 13ABB186DD28; Tue, 3 Nov 2020 16:22:52 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-129.ams2.redhat.com [10.36.112.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C4FC75129; Tue, 3 Nov 2020 16:22:50 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v3 02/11] UefiCpuPkg/VmgExitLib: Add interfaces to set/read GHCB ValidBitmap bits To: devel@edk2.groups.io, thomas.lendacky@amd.com Cc: Brijesh Singh , Eric Dong , Ray Ni , Rahul Kumar References: <360a3882884716ebb60276220c18e33e127a83f9.1603981082.git.thomas.lendacky@amd.com> From: "Laszlo Ersek" Message-ID: <55763445-d81f-c223-9ac8-7957f8df2a58@redhat.com> Date: Tue, 3 Nov 2020 17:22:49 +0100 MIME-Version: 1.0 In-Reply-To: <360a3882884716ebb60276220c18e33e127a83f9.1603981082.git.thomas.lendacky@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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/29/20 15:17, Lendacky, Thomas wrote: > From: Tom Lendacky > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3008 > > In upcoming patches, the setting of the bits in the GHCB ValidBitmap will > be performed in multiple places. In order to reduce code duplication, add > an interface, VmgSetOffsetValid(), to VmgExitLib library to perform this > function. Also, to keep management of the ValidBitmap within the library, > add an inteface, VmgIsOffsetValid(), to return whether the bit in the > ValidBitmap is set for a specified offset. > > The new VmgSetOffsetValid() function is a VOID function and will be an > empty function in the VmgExitLibNull implementation of the VmgExitLib > library. > > The new VmgIsOffsetValid() function returns a BOOLEAN to indicate if the > offset is valid. This will always return FALSE in the VmgExitLibNull > implementation of the VmgExitLib library. > > Cc: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek > Cc: Rahul Kumar > Reviewed-by: Laszlo Ersek > Signed-off-by: Tom Lendacky > --- > UefiCpuPkg/Include/Library/VmgExitLib.h | 37 +++++++++++++++++ > UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.c | 42 ++++++++++++++++++++ > 2 files changed, 79 insertions(+) Thanks for the updates. Laszlo