[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v9 11/29] qmp: populate SevInfo fields with SEV gues
From: |
Brijesh Singh |
Subject: |
[Qemu-devel] [PATCH v9 11/29] qmp: populate SevInfo fields with SEV guest information |
Date: |
Thu, 15 Feb 2018 09:39:37 -0600 |
query-sev command is used to get the SEV guest information, fill the
SevInfo fields with SEV guest information.
Cc: Eric Blake <address@hidden>
Cc: "Daniel P. Berrangé" <address@hidden>
Cc: "Dr. David Alan Gilbert" <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: Brijesh Singh <address@hidden>
---
qmp.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/qmp.c b/qmp.c
index baf0b96528ae..6860ae9ad6ea 100644
--- a/qmp.c
+++ b/qmp.c
@@ -723,5 +723,15 @@ MemoryInfo *qmp_query_memory_size_summary(Error **errp)
SevInfo *qmp_query_sev(Error **errp)
{
- return NULL;
+ SevInfo *info = g_malloc0(sizeof(*info));
+
+ info->enabled = sev_enabled();
+ if (info->enabled) {
+ sev_get_fw_version(&info->api_major,
+ &info->api_minor, &info->build_id);
+ sev_get_policy(&info->policy);
+ info->state = sev_get_current_state();
+ }
+
+ return info;
}
--
2.14.3
- [Qemu-devel] [PATCH v9 03/29] exec: add debug version of physical memory read and write API, (continued)
- [Qemu-devel] [PATCH v9 03/29] exec: add debug version of physical memory read and write API, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 04/29] monitor/i386: use debug APIs when accessing guest memory, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 06/29] kvm: update kvm.h to include memory encryption ioctls, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 02/29] exec: add ram_debug_ops support, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 08/29] target/i386: add Secure Encrypted Virtulization (SEV) object, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 07/29] docs: add AMD Secure Encrypted Virtualization (SEV), Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 09/29] qmp: add query-sev command, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 10/29] sev/i386: add command to initialize the memory encryption context, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 12/29] sev/i386: register the guest memory range which may contain encrypted data, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 11/29] qmp: populate SevInfo fields with SEV guest information,
Brijesh Singh <=
- [Qemu-devel] [PATCH v9 15/29] sev/i386: add command to create launch memory encryption context, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 14/29] hmp: add 'info sev' command, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 13/29] kvm: introduce memory encryption APIs, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 16/29] sev/i386: add command to encrypt guest memory region, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 18/29] sev/i386: add support to LAUNCH_MEASURE command, Brijesh Singh, 2018/02/15
- [Qemu-devel] [PATCH v9 20/29] hw/i386: set ram_debug_ops when memory encryption is enabled, Brijesh Singh, 2018/02/15