From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elHtI-0005c7-FD for qemu-devel@nongnu.org; Mon, 12 Feb 2018 12:27:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elHtE-00075U-7d for qemu-devel@nongnu.org; Mon, 12 Feb 2018 12:27:44 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57070 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1elHtE-00075E-3k for qemu-devel@nongnu.org; Mon, 12 Feb 2018 12:27:40 -0500 References: <20180212153715.87555-1-brijesh.singh@amd.com> <20180212153715.87555-14-brijesh.singh@amd.com> From: Eric Blake Message-ID: Date: Mon, 12 Feb 2018 11:27:22 -0600 MIME-Version: 1.0 In-Reply-To: <20180212153715.87555-14-brijesh.singh@amd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8 13/28] qmp: add query-sev command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brijesh Singh , qemu-devel@nongnu.org Cc: Alistair Francis , Christian Borntraeger , Cornelia Huck , "Daniel P . Berrange" , "Dr. David Alan Gilbert" , "Michael S. Tsirkin" , "Edgar E. Iglesias" , Eduardo Habkost , kvm@vger.kernel.org, Marcel Apfelbaum , Markus Armbruster , Paolo Bonzini , Peter Crosthwaite , Peter Maydell , Richard Henderson , Stefan Hajnoczi , Thomas Lendacky , Borislav Petkov , Alexander Graf , Bruce Rogers On 02/12/2018 09:37 AM, Brijesh Singh wrote: > The QMP query command can used to retrieve the SEV information when > memory encryption is enabled on AMD platform. >=20 > Cc: "Daniel P. Berrang=C3=A9" > Cc: "Dr. David Alan Gilbert" > Cc: Markus Armbruster > Signed-off-by: Brijesh Singh > --- > +# @SevInfo: > +# > +# Information about Secure Encrypted Virtualization (SEV) support > +# > +# @enabled: true if SEV is active > +# > +# @api-major: SEV API major version > +# > +# @api-minor: SEV API minor version > +# > +# @build-id: SEV FW build id > +# > +# @policy: SEV policy value > +# > +# @state: SEV guest state Is there a finite list of guest states? > +# > +# Since: 2.12 > +## > +{ 'struct': 'SevInfo', > + 'data': { 'enabled': 'bool', > + 'api-major': 'uint8', > + 'api-minor' : 'uint8', > + 'build-id' : 'uint8', > + 'policy' : 'uint32', > + 'state' : 'str' If so, this should be an enum type listing those possible states, rather=20 than an open-coded 'str' that can hold anything. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org