Skip to content

Commit

Permalink
Fixup case naming error in tdx-compliance test
Browse files Browse the repository at this point in the history
and modify list test order.

Signed-off-by: DCyan_Elite <[email protected]>
  • Loading branch information
CrescentLove authored and ysun committed Aug 25, 2023
1 parent d6c6f46 commit 1e98a72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tdx-compliance/tdx-compliance-cpuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,39 @@
struct test_cpuid *t; \
int bnr = _bit_nr; \
t = kzalloc(sizeof(struct test_cpuid), GFP_KERNEL); \
t->name = "CPUID(" #_leaf "," #_subleaf ")." #_reg "[" #_bit_nr "]_";\
t->name = "CPUID(" #_leaf "," #_subleaf ")." #_reg "[" #_bit_nr "]";\
t->version = _vsn; \
t->leaf = _leaf; \
t->subleaf = _subleaf; \
t->regs._reg.mask = BIT(bnr); \
t->regs._reg.expect = BIT(bnr) * (_val); \
list_add(&t->list, &cpuid_list); \
list_add_tail(&t->list, &cpuid_list); \
} while (0)

#define EXP_CPUID_BYTE(_leaf, _subleaf, _reg, _val, _vsn) do { \
struct test_cpuid *t; \
t = kzalloc(sizeof(struct test_cpuid), GFP_KERNEL); \
t->name = "CPUID(" #_leaf "," #_subleaf ")." #_reg "_"; \
t->name = "CPUID(" #_leaf "," #_subleaf ")." #_reg; \
t->version = _vsn; \
t->leaf = _leaf; \
t->subleaf = _subleaf; \
t->regs._reg.mask = 0xffffffff; \
t->regs._reg.expect = (_val); \
list_add(&t->list, &cpuid_list); \
list_add_tail(&t->list, &cpuid_list); \
} while (0)

#define EXP_CPUID_RES_BITS(_leaf, _subleaf, _reg, _bit_s, _bit_e, _vsn) do { \
int i = 0; \
struct test_cpuid *t; \
t = kzalloc(sizeof(struct test_cpuid), GFP_KERNEL); \
t->name = "CPUID(" #_leaf "," #_subleaf ")." #_reg "[" #_bit_e ":" #_bit_s "]_";\
t->name = "CPUID(" #_leaf "," #_subleaf ")." #_reg "[" #_bit_e ":" #_bit_s "]";\
t->version = _vsn; \
t->leaf = _leaf; \
t->subleaf = _subleaf; \
for (i = _bit_s; i <= (_bit_e); i++) { \
t->regs._reg.mask |= BIT(i); \
} \
list_add(&t->list, &cpuid_list); \
list_add_tail(&t->list, &cpuid_list); \
} while (0)

void initial_cpuid(void)
Expand Down
2 changes: 1 addition & 1 deletion tdx-compliance/tdx-compliance-msr.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define DEF_MSR(_name, _msr_num, _rw, _excp, _precond, _size, _vsn) \
{ \
.name = _name "_" #_rw "_", \
.name = _name "_" #_rw, \
.version = _vsn, \
.msr.msr_num = _msr_num, \
.run_msr_rw = _rw##_msr##_native, \
Expand Down

0 comments on commit 1e98a72

Please sign in to comment.