diff options
author | Brijesh Singh <brijesh.singh@amd.com> | 2018-03-08 06:48:56 -0600 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-03-13 17:36:05 +0100 |
commit | 1b6a034f293a8928b48765a496ce95bed0cdddc4 (patch) | |
tree | c869fb2cda1e614b3425c17c598f86b139b87d96 /target | |
parent | 630363146765dd9379893d5b78ae9356ef6c766d (diff) | |
download | qemu-1b6a034f293a8928b48765a496ce95bed0cdddc4.zip qemu-1b6a034f293a8928b48765a496ce95bed0cdddc4.tar.gz qemu-1b6a034f293a8928b48765a496ce95bed0cdddc4.tar.bz2 |
sev/i386: qmp: add query-sev-launch-measure command
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é" <berrange@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/monitor.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 64b5e6e..f8a0e4b 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -697,3 +697,20 @@ void hmp_info_sev(Monitor *mon, const QDict *qdict) monitor_printf(mon, "SEV is not enabled\n"); } } + +SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp) +{ + char *data; + SevLaunchMeasureInfo *info; + + data = sev_get_launch_measurement(); + if (!data) { + error_setg(errp, "Measurement is not available"); + return NULL; + } + + info = g_malloc0(sizeof(*info)); + info->data = data; + + return info; +} |