From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: [PATCH v6 01/23] memattrs: add debug attribute Date: Mon, 29 Jan 2018 11:41:10 -0600 Message-ID: <20180129174132.108925-2-brijesh.singh@amd.com> References: <20180129174132.108925-1-brijesh.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain Cc: kvm@vger.kernel.org, Paolo Bonzini , Tom Lendacky , Peter Maydell , Richard Henderson , "Edgar E. Iglesias" , "Dr. David Alan Gilbert" , Eduardo Habkost , Stefan Hajnoczi , Eric Blake , "Michael S. Tsirkin" , "Daniel P . Berrange" , Brijesh Singh , Alistair Francis To: qemu-devel@nongnu.org Return-path: Received: from mail-dm3nam03on0041.outbound.protection.outlook.com ([104.47.41.41]:24617 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751357AbeA2Rlu (ORCPT ); Mon, 29 Jan 2018 12:41:50 -0500 In-Reply-To: <20180129174132.108925-1-brijesh.singh@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: Extend the MemTxAttrs to include 'debug' flag. The flag can be used as general indicator that operation was triggered by the debugger. Later in the patch series we set the debug=1 when issuing a memory access from the gdbstub or HMP commands. This patch is prerequisite to support debugging the encrypted guest. If we see request with debug=1 then we will need to use encryption APIs to access the guest memory. 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h index d4a16420984b..08099e4f7e72 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; + /* Memory access request from the debugger */ + unsigned int debug:1; } MemTxAttrs; /* Bus masters which don't specify any attributes will get this, -- 2.9.5