summaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2018-03-08 06:48:44 -0600
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-13 12:04:03 +0100
commitb20e37801fc4a94ba40737541710c29c923e1c48 (patch)
tree73b9eef1e98a0c135097088ffca638645e0b454f /include/sysemu
parent9b02f7bf8515961624ba0454209f39748dae4d88 (diff)
downloadqemu-b20e37801fc4a94ba40737541710c29c923e1c48.tar.gz
kvm: add memory encryption context
Split from a patch by Brijesh Singh (brijesh.singh@amd.com). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/kvm.h9
-rw-r--r--include/sysemu/sev.h20
2 files changed, 29 insertions, 0 deletions
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 85002ac49a..84017a0dcf 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -231,6 +231,15 @@ int kvm_destroy_vcpu(CPUState *cpu);
*/
bool kvm_arm_supports_user_irq(void);
+/**
+ * kvm_memcrypt_enabled - return boolean indicating whether memory encryption
+ * is enabled
+ * Returns: 1 memory encryption is enabled
+ * 0 memory encryption is disabled
+ */
+bool kvm_memcrypt_enabled(void);
+
+
#ifdef NEED_CPU_H
#include "cpu.h"
diff --git a/include/sysemu/sev.h b/include/sysemu/sev.h
new file mode 100644
index 0000000000..f7a6057d49
--- /dev/null
+++ b/include/sysemu/sev.h
@@ -0,0 +1,20 @@
+/*
+ * QEMU Secure Encrypted Virutualization (SEV) support
+ *
+ * Copyright: Advanced Micro Devices, 2016-2018
+ *
+ * Authors:
+ * Brijesh Singh <brijesh.singh@amd.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef QEMU_SEV_H
+#define QEMU_SEV_H
+
+#include "sysemu/kvm.h"
+
+void *sev_guest_init(const char *id);
+#endif