From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: [PATCH v5 01/23] memattrs: add debug attribute Date: Wed, 6 Dec 2017 14:03:24 -0600 Message-ID: <20171206200346.116537-2-brijesh.singh@amd.com> References: <20171206200346.116537-1-brijesh.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Alistair Francis , Christian Borntraeger , Cornelia Huck , "Daniel P . Berrange" , "Dr. David Alan Gilbert" , "Edgar E . Iglesias " , Eduardo Habkost , Eric Blake , kvm@vger.kernel.org, Marcel Apfelbaum , Markus Armbruster , "Michael S. Tsirkin" , Paolo Bonzini , Peter Crosthwaite , Peter Maydell , Richard Henderson , Richard Henderson , Stefan Hajnoczi , Thomas Lendacky < To: qemu-devel@nongnu.org Return-path: Received: from mail-sn1nam01on0086.outbound.protection.outlook.com ([104.47.32.86]:55360 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752018AbdLFUEP (ORCPT ); Wed, 6 Dec 2017 15:04:15 -0500 In-Reply-To: <20171206200346.116537-1-brijesh.singh@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: The debug attribute will be set when qemu attempts to access the guest memory for debug (e.g memory access from gdbstub, memory dump commands etc). When guest memory is encrypted, the debug access will need to go through the memory encryption APIs. Cc: Alistair Francis Cc: Peter Maydell Cc: Edgar E. Iglesias" Cc: Richard Henderson Cc: Paolo Bonzini Signed-off-by: Brijesh Singh --- include/exec/memattrs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h index d4a16420984b..721362e06292 100644 --- a/include/exec/memattrs.h +++ b/include/exec/memattrs.h @@ -37,6 +37,8 @@ typedef struct MemTxAttrs { unsigned int user:1; /* Requester ID (for MSI for example) */ unsigned int requester_id:16; + /* Debug memory access for encrypted guest */ + unsigned int debug:1; } MemTxAttrs; /* Bus masters which don't specify any attributes will get this, @@ -56,4 +58,6 @@ typedef struct MemTxAttrs { #define MEMTX_DECODE_ERROR (1U << 1) /* nothing at that address */ typedef uint32_t MemTxResult; +/* Access the guest memory for debug purposes */ +#define MEMTXATTRS_DEBUG ((MemTxAttrs) { .debug = 1 }) #endif -- 2.9.5 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMfvX-0005fj-EZ for qemu-devel@nongnu.org; Wed, 06 Dec 2017 15:04:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMfvU-0002Lz-81 for qemu-devel@nongnu.org; Wed, 06 Dec 2017 15:04:19 -0500 Received: from mail-sn1nam01on0071.outbound.protection.outlook.com ([104.47.32.71]:52950 helo=NAM01-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eMfvU-0002Lp-0c for qemu-devel@nongnu.org; Wed, 06 Dec 2017 15:04:16 -0500 From: Brijesh Singh Date: Wed, 6 Dec 2017 14:03:24 -0600 Message-Id: <20171206200346.116537-2-brijesh.singh@amd.com> In-Reply-To: <20171206200346.116537-1-brijesh.singh@amd.com> References: <20171206200346.116537-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v5 01/23] memattrs: add debug attribute List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alistair Francis , Christian Borntraeger , Cornelia Huck , "Daniel P . Berrange" , "Dr. David Alan Gilbert" , "Edgar E . Iglesias " , Eduardo Habkost , Eric Blake , kvm@vger.kernel.org, Marcel Apfelbaum , Markus Armbruster , "Michael S. Tsirkin" , Paolo Bonzini , Peter Crosthwaite , Peter Maydell , Richard Henderson , Richard Henderson , Stefan Hajnoczi , Thomas Lendacky , Borislav Petkov , Brijesh Singh The debug attribute will be set when qemu attempts to access the guest memory for debug (e.g memory access from gdbstub, memory dump commands etc). When guest memory is encrypted, the debug access will need to go through the memory encryption APIs. Cc: Alistair Francis Cc: Peter Maydell Cc: Edgar E. Iglesias" Cc: Richard Henderson Cc: Paolo Bonzini Signed-off-by: Brijesh Singh --- include/exec/memattrs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h index d4a16420984b..721362e06292 100644 --- a/include/exec/memattrs.h +++ b/include/exec/memattrs.h @@ -37,6 +37,8 @@ typedef struct MemTxAttrs { unsigned int user:1; /* Requester ID (for MSI for example) */ unsigned int requester_id:16; + /* Debug memory access for encrypted guest */ + unsigned int debug:1; } MemTxAttrs; /* Bus masters which don't specify any attributes will get this, @@ -56,4 +58,6 @@ typedef struct MemTxAttrs { #define MEMTX_DECODE_ERROR (1U << 1) /* nothing at that address */ typedef uint32_t MemTxResult; +/* Access the guest memory for debug purposes */ +#define MEMTXATTRS_DEBUG ((MemTxAttrs) { .debug = 1 }) #endif -- 2.9.5