kvm: introduce memory encryption APIs

Inorder to integerate the Secure Encryption Virtualization (SEV) support
add few high-level memory encryption APIs which can be used for encrypting
the guest memory region.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Brijesh Singh 2018-03-08 06:48:46 -06:00 committed by Paolo Bonzini
parent b20e37801f
commit 54e8953967
5 changed files with 33 additions and 0 deletions

View file

@ -239,6 +239,14 @@ bool kvm_arm_supports_user_irq(void);
*/
bool kvm_memcrypt_enabled(void);
/**
* kvm_memcrypt_encrypt_data: encrypt the memory range
*
* Return: 1 failed to encrypt the range
* 0 succesfully encrypted memory region
*/
int kvm_memcrypt_encrypt_data(uint8_t *ptr, uint64_t len);
#ifdef NEED_CPU_H
#include "cpu.h"