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>
This commit is contained in:
Brijesh Singh 2018-03-08 06:48:44 -06:00 committed by Paolo Bonzini
parent 9b02f7bf85
commit b20e37801f
7 changed files with 83 additions and 2 deletions

View file

@ -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"

20
include/sysemu/sev.h Normal file
View file

@ -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