summaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2018-03-08 06:48:59 -0600
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-13 17:36:05 +0100
commit31dd67f684c862303cf3bb18dba10567bc35e0ab (patch)
tree7a78faa0bd01c62ca9cee04c33d4b43ed92a1c1b /qapi
parent1b6a034f293a8928b48765a496ce95bed0cdddc4 (diff)
downloadqemu-31dd67f684c862303cf3bb18dba10567bc35e0ab.tar.gz
sev/i386: qmp: add query-sev-capabilities command
The command can be used by libvirt to query the SEV capabilities. Cc: "Daniel P. Berrangé" <berrange@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/misc.json42
1 files changed, 42 insertions, 0 deletions
diff --git a/qapi/misc.json b/qapi/misc.json
index b8318f5d8b..6150b9a003 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -3322,3 +3322,45 @@
#
##
{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo' }
+
+##
+# @SevCapability:
+#
+# The struct describes capability for a Secure Encrypted Virtualization
+# feature.
+#
+# @pdh: Platform Diffie-Hellman key (base64 encoded)
+#
+# @cert-chain: PDH certificate chain (base64 encoded)
+#
+# @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'} }
+
+##
+# @query-sev-capabilities:
+#
+# This command is used to get the SEV capabilities, and is supported on AMD
+# X86 platforms only.
+#
+# Returns: SevCapability objects.
+#
+# Since: 2.12
+#
+# Example:
+#
+# -> { "execute": "query-sev-capabilities" }
+# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
+# "cbitpos": 47, "reduced-phys-bits": 5}}
+#
+##
+{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability' }