From: Eric Blake Subject: Re: [PATCH v7 26/26] qmp: add query-sev-launch-measure command Date: Wed, 7 Feb 2018 10:29:59 -0600 Message-ID: <14588677-a845-be1e-449f-901ade4a8fe6@redhat.com> References: <20180207160638.98872-1-brijesh.singh@amd.com> <20180207160638.98872-26-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]:57048 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754231AbeBGQaC (ORCPT ); Wed, 7 Feb 2018 11:30:02 -0500 In-Reply-To: <20180207160638.98872-26-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 command can be used by libvirt to retrieve the measurement of SEV guest. > This measurement is a signature of the memory contents that was encrypted > through the LAUNCH_UPDATE_DATA. > > Cc: "Daniel P. Berrangé" > Cc: "Dr. David Alan Gilbert" > Cc: Markus Armbruster > Signed-off-by: Brijesh Singh > --- > qapi-schema.json | 30 ++++++++++++++++++++++++++++++ > qmp.c | 14 ++++++++++++++ > 2 files changed, 44 insertions(+) > > diff --git a/qapi-schema.json b/qapi-schema.json > index 447ebb15266e..19331bff8883 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -3236,3 +3236,33 @@ > # > ## > { 'command': 'query-sev', 'returns': 'SevInfo' } > + > +## > +# @SevLaunchMeasureInfo: > +# > +# SEV Guest Launch measurement information > +# > +# @data: the measurement value encoded in base64 > +# > +# Since: 2.12 > +# > +# Notes: If measurement is not available then a null measurement is returned. Null measurement, as in empty string? Would it be better to have query-sev-launch-measure return an error instead of an SevLaunchMeasureInfo with a null measurement in that case? > +## > +{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'} } > + > +## > +# @query-sev-launch-measure: > +# > +# Query the SEV guest launch information. > +# > +# Returns: The @SevLaunchMeasureInfo for the guest > +# > +# Since: 2.12 > +# > +# Example: > +# > +# -> { "execute": "query-sev-launch-measure" } > +# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } } > +# -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org