aboutsummaryrefslogtreecommitdiff
path: root/target/i386/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/i386/monitor.c')
-rw-r--r--target/i386/monitor.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 64b5e6e6b8..f8a0e4b268 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;
+}