From: Eric Blake Subject: Re: [PATCH v7 13/26] qmp: add query-sev command Date: Wed, 7 Feb 2018 10:22:14 -0600 Message-ID: <6a28048e-fed5-c197-05df-c1f14d6e2b5f@redhat.com> References: <20180207160638.98872-1-brijesh.singh@amd.com> <20180207160638.98872-13-brijesh.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 To: Brijesh Singh , qemu-devel@nongnu.org Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44490 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754138AbeBGQWR (ORCPT ); Wed, 7 Feb 2018 11:22:17 -0500 In-Reply-To: <20180207160638.98872-13-brijesh.singh@amd.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 02/07/2018 10:06 AM, Brijesh Singh wrote: > The QMP query command can used to retrieve the SEV information when > memory encryption is enabled on AMD platform. > > Cc: "Daniel P. Berrangé" > Cc: "Dr. David Alan Gilbert" > Cc: Markus Armbruster > Signed-off-by: Brijesh Singh > --- > +## > +# @SevInfo: > +# > +# Information about SEV support > +# > +# @enabled: true if SEV is active > +# > +# @api_major: SEV API major version New QMP structures should prefer '-' over '_'; this should be 'api-major'. > +# > +# @api_minor: SEV API minor version > +# > +# @build_id: SEV FW build id and so on. > +# > +# @policy: SEV policy value > +# > +# @state: SEV guest state > +# > +# Since: 2.12 > +## > +{ 'struct': 'SevInfo', > + 'data': { 'enabled': 'bool', > + 'api_major': 'uint8', > + 'api_minor' : 'uint8', > + 'build_id' : 'uint8', > + 'policy' : 'uint32', > + 'state' : 'str' > + } > +} > + > +## > +# @query-sev: > +# > +# Returns information about SEV It would be worth expanding the acronym here, for someone that is reading the documentation but not familiar with the term. > +# > +# Returns: @SevInfo > +# > +# Since: 2.12 > +# > +# Example: > +# > +# -> { "execute": "query-sev" } > +# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0, > +# "build-id" : 0, "policy" : 0, "state" : "running" } } This example does not match the spelling you used in the struct above, but DOES match what the spelling should be. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org