From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) 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 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) From: Laszlo Ersek To: edk2-devel-01 Cc: Brijesh Singh , Jordan Justen 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: [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: , X-List-Received-Date: Wed, 30 Aug 2017 15:53:18 -0000 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/OvmfPkg/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; + DEBUG (( + DEBUG_VERBOSE, + "%a:%a: Cr3Base=0x%Lx Physical=0x%Lx Length=0x%Lx Mode=%a CacheFlush=%u\n", + gEfiCallerBaseName, + __FUNCTION__, + Cr3BaseAddress, + PhysicalAddress, + (UINT64)Length, + (Mode == SetCBit) ? "Encrypt" : "Decrypt", + (UINT32)CacheFlush + )); + // // Check if we have a valid memory encryption mask // @@ -399,10 +411,6 @@ InternalMemEncryptSevSetMemoryDecrypted ( ) { - DEBUG ((DEBUG_VERBOSE, - "%a:%a Clear C-bit Cr3 %Lx Base %Lx Length %Lx flush %d\n", - gEfiCallerBaseName, __FUNCTION__, Cr3BaseAddress, PhysicalAddress, Length, - Flush)); return SetMemoryEncDec (Cr3BaseAddress, PhysicalAddress, Length, ClearCBit, Flush); } @@ -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, Length, - Flush)); return SetMemoryEncDec (Cr3BaseAddress, PhysicalAddress, Length, SetCBit, Flush); } -- 2.14.1.3.gb7cf6e02401b