Message ID | 20210806000946.2951441-2-sathyanarayanan.kuppuswamy@linux.intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Add TDX Guest Support (Attestation support) | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h index dd5459ece9aa..50693bd6f0dd 100644 --- a/arch/x86/include/asm/tdx.h +++ b/arch/x86/include/asm/tdx.h @@ -69,6 +69,8 @@ enum tdx_map_type { extern unsigned int tdg_disable_prot; +bool tdg_debug_enabled(void); + void __init tdx_early_init(void); bool tdx_prot_guest_has(unsigned long flag); diff --git a/arch/x86/kernel/tdx.c b/arch/x86/kernel/tdx.c index bfa168f3f09c..c71049cd2255 100644 --- a/arch/x86/kernel/tdx.c +++ b/arch/x86/kernel/tdx.c @@ -135,6 +135,11 @@ phys_addr_t tdg_shared_mask(void) return 1ULL << (td_info.gpa_width - 1); } +bool tdg_debug_enabled(void) +{ + return td_info.attributes & BIT(0); +} + static void tdg_get_info(void) { u64 ret;