diff options
author | Brijesh Singh <brijesh.singh@amd.com> | 2018-03-08 06:48:46 -0600 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-03-13 12:04:03 +0100 |
commit | 54e89539670e904b0d4f0993abeb92f641c60436 (patch) | |
tree | a698d1deef86da325b1023a77dc3cfd2ac8d4a48 /include/sysemu/kvm.h | |
parent | b20e37801fc4a94ba40737541710c29c923e1c48 (diff) |
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>
Diffstat (limited to 'include/sysemu/kvm.h')
-rw-r--r-- | include/sysemu/kvm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 84017a0dcf..23669c4d5a 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -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" |