1 /* 2 * AMD SEV support in kvm-unit-tests 3 * 4 * Copyright (c) 2021, Google Inc 5 * 6 * Authors: 7 * Zixuan Wang <zixuanwang@google.com> 8 * 9 * SPDX-License-Identifier: LGPL-2.0-or-later 10 */ 11 12 #ifndef _X86_AMD_SEV_H_ 13 #define _X86_AMD_SEV_H_ 14 15 #ifdef CONFIG_EFI 16 17 #include "libcflat.h" 18 #include "desc.h" 19 #include "asm/page.h" 20 #include "efi.h" 21 22 bool amd_sev_enabled(void); 23 efi_status_t setup_amd_sev(void); 24 25 bool amd_sev_es_enabled(void); 26 efi_status_t setup_amd_sev_es(void); 27 void setup_ghcb_pte(pgd_t *page_table); 28 29 unsigned long long get_amd_sev_c_bit_mask(void); 30 unsigned long long get_amd_sev_addr_upperbound(void); 31 32 #endif /* CONFIG_EFI */ 33 34 #endif /* _X86_AMD_SEV_H_ */ 35