Skip to content

Commit 90e8cfc

Browse files
calmisigregkh
authored andcommitted
x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE
[ Upstream commit 3aecb2e ] The TD scoped TDCS attributes are defined by bit positions. In the guest side of the TDX code, the 'tdx_attributes' string array holds pretty print names for these attributes, which are generated via macros and defines. Today these pretty print names are only used to print the attribute names to dmesg. Unfortunately there is a typo in the define for the migratable bit. Change the defines TDX_ATTR_MIGRTABLE* to TDX_ATTR_MIGRATABLE*. Update the sole user, the tdx_attributes array, to use the fixed name. Since these defines control the string printed to dmesg, the change is user visible. But the risk of breakage is almost zero since it is not exposed in any interface expected to be consumed programmatically. Fixes: 564ea84 ("x86/tdx: Dump attributes and TD_CTLS on boot") Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Acked-by: Sean Christopherson <seanjc@google.com> Link: https://patch.msgid.link/20260303030335.766779-2-xiaoyao.li@intel.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2783ed2 commit 90e8cfc

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

arch/x86/coco/tdx/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static __initdata const char *tdx_attributes[] = {
1717
DEF_TDX_ATTR_NAME(ICSSD),
1818
DEF_TDX_ATTR_NAME(LASS),
1919
DEF_TDX_ATTR_NAME(SEPT_VE_DISABLE),
20-
DEF_TDX_ATTR_NAME(MIGRTABLE),
20+
DEF_TDX_ATTR_NAME(MIGRATABLE),
2121
DEF_TDX_ATTR_NAME(PKS),
2222
DEF_TDX_ATTR_NAME(KL),
2323
DEF_TDX_ATTR_NAME(TPA),

arch/x86/include/asm/shared/tdx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#define TDX_ATTR_LASS BIT_ULL(TDX_ATTR_LASS_BIT)
3636
#define TDX_ATTR_SEPT_VE_DISABLE_BIT 28
3737
#define TDX_ATTR_SEPT_VE_DISABLE BIT_ULL(TDX_ATTR_SEPT_VE_DISABLE_BIT)
38-
#define TDX_ATTR_MIGRTABLE_BIT 29
39-
#define TDX_ATTR_MIGRTABLE BIT_ULL(TDX_ATTR_MIGRTABLE_BIT)
38+
#define TDX_ATTR_MIGRATABLE_BIT 29
39+
#define TDX_ATTR_MIGRATABLE BIT_ULL(TDX_ATTR_MIGRATABLE_BIT)
4040
#define TDX_ATTR_PKS_BIT 30
4141
#define TDX_ATTR_PKS BIT_ULL(TDX_ATTR_PKS_BIT)
4242
#define TDX_ATTR_KL_BIT 31

0 commit comments

Comments
 (0)