[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 01/22] x86/include/asm/intel-txt.h: constants and accessors for TXT registers and heap
On 14.05.2025 16:55, Andrew Cooper wrote: > On 13/05/2025 6:05 pm, Sergii Dmytruk wrote: >> +/* >> + * Always use private space as some of registers are either read-only or not >> + * present in public space. >> + */ >> +static inline uint64_t read_txt_reg(int reg_no) > > unsigned int reg > > I'd be tempted to name it simply txt_read(). I don't think the extra > "_reg" is a helpful suffix, and it makes the APIs consistent with > txt_reset(). But I expect others may have opinions here. +1 >> +static inline void txt_reset(uint32_t error) >> +{ >> + write_txt_reg(TXTCR_ERRORCODE, error); >> + write_txt_reg(TXTCR_CMD_NO_SECRETS, 1); >> + write_txt_reg(TXTCR_CMD_UNLOCK_MEM_CONFIG, 1); >> + write_txt_reg(TXTCR_CMD_RESET, 1); >> + while (1); > > for ( ;; ) > cpu_relax(); > > please. With (style nit) another blank between the semicolons. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |