From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjwhf-0007W1-CG for qemu-devel@nongnu.org; Tue, 13 Sep 2016 19:01:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjwha-0004SJ-Fk for qemu-devel@nongnu.org; Tue, 13 Sep 2016 19:01:22 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjwha-0004SA-9f for qemu-devel@nongnu.org; Tue, 13 Sep 2016 19:01:18 -0400 Received: by mail-wm0-f67.google.com with SMTP id c131so572318wmh.2 for ; Tue, 13 Sep 2016 16:01:18 -0700 (PDT) Sender: Paolo Bonzini References: <147377800565.11859.4411044563640180545.stgit@brijesh-build-machine> <147377804367.11859.17420890454321327137.stgit@brijesh-build-machine> From: Paolo Bonzini Message-ID: Date: Wed, 14 Sep 2016 01:00:14 +0200 MIME-Version: 1.0 In-Reply-To: <147377804367.11859.17420890454321327137.stgit@brijesh-build-machine> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v1 04/22] memattrs: add SEV debug attrs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brijesh Singh , ehabkost@redhat.com, crosthwaite.peter@gmail.com, armbru@redhat.com, mst@redhat.com, p.fedin@samsung.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, rth@twiddle.net On 13/09/2016 16:47, Brijesh Singh wrote: > The patch adds sev_debug_mode attribute in MemTxAttrs. This attribute > will be set when debug version of memory read/write API's are used in > SEV-enabled guest. > > 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 e601061..5aa22b5 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 for debug purposes */ > + unsigned int sev_debug:1; > } MemTxAttrs; > > /* Bus masters which don't specify any attributes will get this, > @@ -46,4 +48,6 @@ typedef struct MemTxAttrs { > */ > #define MEMTXATTRS_UNSPECIFIED ((MemTxAttrs) { .unspecified = 1 }) > > +/* Access the guest memory for debug purposes */ > +#define MEMTXATTRS_SEV_DEBUG ((MemTxAttrs) { .sev_debug = 1 }) > #endif Just make it "debug" and MEMTXATTRS_DEBUG. Paolo