From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Maydell Subject: Re: [PATCH v5 01/23] memattrs: add debug attribute Date: Wed, 6 Dec 2017 22:03:06 +0000 Message-ID: References: <20171206200346.116537-1-brijesh.singh@amd.com> <20171206200346.116537-2-brijesh.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: QEMU Developers , Alistair Francis , Christian Borntraeger , Cornelia Huck , "Daniel P . Berrange" , "Dr. David Alan Gilbert" , "Edgar E . Iglesias" , Eduardo Habkost , Eric Blake , kvm-devel , Marcel Apfelbaum , Markus Armbruster , "Michael S. Tsirkin" , Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Richard Henderson , Stefan Hajnoczi , To: Brijesh Singh Return-path: Received: from mail-oi0-f66.google.com ([209.85.218.66]:42499 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752132AbdLFWD1 (ORCPT ); Wed, 6 Dec 2017 17:03:27 -0500 Received: by mail-oi0-f66.google.com with SMTP id o64so3617579oia.9 for ; Wed, 06 Dec 2017 14:03:27 -0800 (PST) In-Reply-To: <20171206200346.116537-2-brijesh.singh@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 6 December 2017 at 20:03, Brijesh Singh wrote: > 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; Can we have some more detailed semantics for this please? For instance, if a device gets a debug=1 transaction should it refuse to do things like read-clears-bits semantics or other side-effects you wouldn't expect of debugger accesses? thanks -- PMM From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMhmr-0005la-DO for qemu-devel@nongnu.org; Wed, 06 Dec 2017 17:03:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMhmq-0000qN-Ea for qemu-devel@nongnu.org; Wed, 06 Dec 2017 17:03:29 -0500 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]:44163) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eMhmq-0000pa-7r for qemu-devel@nongnu.org; Wed, 06 Dec 2017 17:03:28 -0500 Received: by mail-oi0-x241.google.com with SMTP id l6so3603447oih.11 for ; Wed, 06 Dec 2017 14:03:28 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20171206200346.116537-2-brijesh.singh@amd.com> References: <20171206200346.116537-1-brijesh.singh@amd.com> <20171206200346.116537-2-brijesh.singh@amd.com> From: Peter Maydell Date: Wed, 6 Dec 2017 22:03:06 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH v5 01/23] memattrs: add debug attribute List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brijesh Singh Cc: QEMU Developers , Alistair Francis , Christian Borntraeger , Cornelia Huck , "Daniel P . Berrange" , "Dr. David Alan Gilbert" , "Edgar E . Iglesias" , Eduardo Habkost , Eric Blake , kvm-devel , Marcel Apfelbaum , Markus Armbruster , "Michael S. Tsirkin" , Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Richard Henderson , Stefan Hajnoczi , Thomas Lendacky , Borislav Petkov On 6 December 2017 at 20:03, Brijesh Singh wrote: > 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; Can we have some more detailed semantics for this please? For instance, if a device gets a debug=1 transaction should it refuse to do things like read-clears-bits semantics or other side-effects you wouldn't expect of debugger accesses? thanks -- PMM