From b20e37801fc4a94ba40737541710c29c923e1c48 Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Thu, 8 Mar 2018 06:48:44 -0600 Subject: kvm: add memory encryption context Split from a patch by Brijesh Singh (brijesh.singh@amd.com). Signed-off-by: Paolo Bonzini Signed-off-by: Brijesh Singh --- include/sysemu/kvm.h | 9 +++++++++ include/sysemu/sev.h | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 include/sysemu/sev.h (limited to 'include/sysemu') 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 + * + * 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 -- cgit v1.2.1