diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-11 15:40:26 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-11 15:40:26 +0300 |
commit | b9ecb9a997333f90236cb6f3d52d83987a17addc (patch) | |
tree | 9d4c34b26ba67337923c8681daf32d1b162426c8 /arch/x86/include/asm/mem_encrypt.h | |
parent | debe436e77c72fcee804fb867f275e6d31aa999c (diff) | |
parent | 73f1b4fece216c2e72be74c4d0d0f71a0b944bec (diff) | |
download | linux-b9ecb9a997333f90236cb6f3d52d83987a17addc.tar.xz |
Merge branch 'kvm-guest-sev-migration' into kvm-master
Add guest api and guest kernel support for SEV live migration.
Introduces a new hypercall to notify the host of changes to the page
encryption status. If the page is encrypted then it must be migrated
through the SEV firmware or a helper VM sharing the key. If page is
not encrypted then it can be migrated normally by userspace. This new
hypercall is invoked using paravirt_ops.
Conflicts: sev_active() replaced by cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT).
Diffstat (limited to 'arch/x86/include/asm/mem_encrypt.h')
-rw-r--r-- | arch/x86/include/asm/mem_encrypt.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index 2d4f5c17d79c..e2c6f433ed10 100644 --- a/arch/x86/include/asm/mem_encrypt.h +++ b/arch/x86/include/asm/mem_encrypt.h @@ -44,6 +44,8 @@ void __init sme_enable(struct boot_params *bp); int __init early_set_memory_decrypted(unsigned long vaddr, unsigned long size); int __init early_set_memory_encrypted(unsigned long vaddr, unsigned long size); +void __init early_set_mem_enc_dec_hypercall(unsigned long vaddr, int npages, + bool enc); void __init mem_encrypt_free_decrypted_mem(void); @@ -78,6 +80,8 @@ static inline int __init early_set_memory_decrypted(unsigned long vaddr, unsigned long size) { return 0; } static inline int __init early_set_memory_encrypted(unsigned long vaddr, unsigned long size) { return 0; } +static inline void __init +early_set_mem_enc_dec_hypercall(unsigned long vaddr, int npages, bool enc) {} static inline void mem_encrypt_free_decrypted_mem(void) { } |