aboutsummaryrefslogtreecommitdiff
path: root/target/i386/monitor.c
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2018-03-08 06:49:00 -0600
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-13 17:36:06 +0100
commit9f750794985d7386f088da941c76b73880b2b6c4 (patch)
tree926f1af83161267bf631bddd7ef7114956e900f0 /target/i386/monitor.c
parent31dd67f684c862303cf3bb18dba10567bc35e0ab (diff)
sev/i386: add sev_get_capabilities()
The function can be used to get the current SEV capabilities. The capabilities include platform diffie-hellman key (pdh) and certificate chain. The key can be provided to the external entities which wants to establish a trusted channel between SEV firmware and guest owner. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/monitor.c')
-rw-r--r--target/i386/monitor.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 8a786fb79a..011419eba2 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -717,6 +717,13 @@ SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp)
SevCapability *qmp_query_sev_capabilities(Error **errp)
{
- error_setg(errp, "SEV feature is not available");
- return NULL;
+ SevCapability *data;
+
+ data = sev_get_capabilities();
+ if (!data) {
+ error_setg(errp, "SEV feature is not available");
+ return NULL;
+ }
+
+ return data;
}