From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: Re: [PATCH v12 26/28] qmp: add query-sev-capabilities command Date: Thu, 8 Mar 2018 16:52:03 -0600 Message-ID: <9a4886a9-b84e-ac52-76f0-7abcb75fd835@amd.com> References: <20180308124901.83533-1-brijesh.singh@amd.com> <20180308124901.83533-27-brijesh.singh@amd.com> <20180308170524.GK4718@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Peter Maydell , brijesh.singh@amd.com, kvm@vger.kernel.org, "Michael S. Tsirkin" , Stefan Hajnoczi , qemu-devel@nongnu.org, Alexander Graf , "Edgar E. Iglesias" , Markus Armbruster , Bruce Rogers , Christian Borntraeger , Marcel Apfelbaum , Borislav Petkov , Thomas Lendacky , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Alistair Francis , Cornelia Huck , Peter Crosthwaite , Paolo Bonzini To: =?UTF-8?Q?Daniel_P._Berrang=c3=a9?= Return-path: In-Reply-To: <20180308170524.GK4718@redhat.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On 3/8/18 11:05 AM, Daniel P. Berrang=C3=A9 wrote: > On Thu, Mar 08, 2018 at 06:48:59AM -0600, Brijesh Singh wrote: >> The command can be used by libvirt to query the SEV capabilities. >> >> Cc: "Daniel P. Berrang=C3=A9" >> Cc: "Dr. David Alan Gilbert" >> Cc: Markus Armbruster >> Signed-off-by: Brijesh Singh >> --- >> monitor.c | 7 +++++++ >> qapi/misc.json | 42 ++++++++++++++++++++++++++++++++++++++++++ >> target/i386/monitor.c | 6 ++++++ >> 3 files changed, 55 insertions(+) >> >> diff --git a/monitor.c b/monitor.c >> index d53ecc5ddab3..29ce695a80d5 100644 >> --- a/monitor.c >> +++ b/monitor.c >> @@ -985,6 +985,7 @@ static void qmp_unregister_commands_hack(void) >> qmp_unregister_command(&qmp_commands, "rtc-reset-reinjection"); >> qmp_unregister_command(&qmp_commands, "query-sev"); >> qmp_unregister_command(&qmp_commands, "query-sev-launch-measure"); >> + qmp_unregister_command(&qmp_commands, "query-sev-capabilities"); >> #endif >> #ifndef TARGET_S390X >> qmp_unregister_command(&qmp_commands, "dump-skeys"); >> @@ -4117,6 +4118,12 @@ SevLaunchMeasureInfo *qmp_query_sev_launch_measur= e(Error **errp) >> error_setg(errp, QERR_FEATURE_DISABLED, "query-sev-launch-measure")= ; >> return NULL; >> } >> + >> +SevCapability *qmp_query_sev_capabilities(Error **errp) >> +{ >> + error_setg(errp, QERR_FEATURE_DISABLED, "query-sev-capabilities"); >> + return NULL; >> +} >> #endif >> =20 >> #ifndef TARGET_S390X >> diff --git a/qapi/misc.json b/qapi/misc.json >> index a39c43aa64b1..37c89663d8f4 100644 >> --- a/qapi/misc.json >> +++ b/qapi/misc.json >> @@ -3306,3 +3306,45 @@ >> # >> ## >> { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureIn= fo' } >> + >> +## >> +# @SevCapability: >> +# >> +# The struct describes capability for a Secure Encrypted Virtualization >> +# feature. >> +# >> +# @pdh: Platform Diffie-Hellman key >> +# >> +# @cert-chain: PDH certificate chain > Are either of these base64 encoded ? If so nice to document that. Yep, they are base64 encoded, I will update the doc. > >> +# >> +# @cbitpos: C-bit location in page table entry >> +# >> +# @reduced-phys-bits: Number of physical Address bit reduction when SEV= is >> +# enabled >> +# >> +# Since: 2.12 >> +## >> +{ 'struct': 'SevCapability', >> + 'data': { 'pdh': 'str', >> + 'cert-chain': 'str', >> + 'cbitpos': 'int', >> + 'reduced-phys-bits': 'int'} } > Regardless of answer to above Q,=20 > > Reviewed-by: Daniel P. Berrang=C3=A9 > > > Regards, > Daniel