From nobody Fri Dec 27 02:17:44 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1504108407790909.8858329022687; Wed, 30 Aug 2017 08:53:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AC5ED21E70D23; Wed, 30 Aug 2017 08:53:21 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 99C8E21E47D74 for ; Wed, 30 Aug 2017 08:53:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 122CF7EA93; Wed, 30 Aug 2017 15:53:22 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-136.rdu2.redhat.com [10.10.120.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21F878F367; Wed, 30 Aug 2017 15:53:20 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 122CF7EA93 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com From: Laszlo Ersek To: edk2-devel-01 Date: Wed, 30 Aug 2017 17:53:07 +0200 Message-Id: <20170830155317.30917-2-lersek@redhat.com> In-Reply-To: <20170830155317.30917-1-lersek@redhat.com> References: <20170830155317.30917-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 30 Aug 2017 15:53:22 +0000 (UTC) Subject: [edk2] [PATCH 01/11] OvmfPkg/BaseMemEncryptSevLib: unify encrypt/decrypt DEBUG messages X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Unify the debug messages between InternalMemEncryptSevSetMemoryEncrypted() and InternalMemEncryptSevSetMemoryDecrypted(). Cc: Brijesh Singh Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c | 20 ++++++++++++= -------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c b/Ovm= fPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c index 7cbbf915f443..dbaad7766dbe 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c @@ -239,6 +239,18 @@ SetMemoryEncDec ( UINT64 PgTableMask; UINT64 AddressEncMask; =20 + DEBUG (( + DEBUG_VERBOSE, + "%a:%a: Cr3Base=3D0x%Lx Physical=3D0x%Lx Length=3D0x%Lx Mode=3D%a Cach= eFlush=3D%u\n", + gEfiCallerBaseName, + __FUNCTION__, + Cr3BaseAddress, + PhysicalAddress, + (UINT64)Length, + (Mode =3D=3D SetCBit) ? "Encrypt" : "Decrypt", + (UINT32)CacheFlush + )); + // // Check if we have a valid memory encryption mask // @@ -399,10 +411,6 @@ InternalMemEncryptSevSetMemoryDecrypted ( ) { =20 - DEBUG ((DEBUG_VERBOSE, - "%a:%a Clear C-bit Cr3 %Lx Base %Lx Length %Lx flush %d\n", - gEfiCallerBaseName, __FUNCTION__, Cr3BaseAddress, PhysicalAddress, Len= gth, - Flush)); return SetMemoryEncDec (Cr3BaseAddress, PhysicalAddress, Length, ClearCB= it, Flush); } =20 @@ -431,9 +439,5 @@ InternalMemEncryptSevSetMemoryEncrypted ( IN BOOLEAN Flush ) { - DEBUG ((DEBUG_VERBOSE, - "%a:%a Set C-bit Cr3 %Lx Base %Lx Length %Lx flush %d\n", - gEfiCallerBaseName, __FUNCTION__, Cr3BaseAddress, PhysicalAddress, Len= gth, - Flush)); return SetMemoryEncDec (Cr3BaseAddress, PhysicalAddress, Length, SetCBit= , Flush); } --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel