[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 2/4] xen/x86: introduce self modifying code test
On Wed, Dec 20, 2023 at 10:12:15AM +0100, Jan Beulich wrote: > On 20.12.2023 10:08, Roger Pau Monné wrote: > > On Tue, Dec 19, 2023 at 08:31:29PM +0000, Andrew Cooper wrote: > >> On 15/12/2023 11:18 am, Roger Pau Monne wrote: > >>> --- /dev/null > >>> +++ b/xen/arch/x86/include/asm/test.h > >>> @@ -0,0 +1,30 @@ > >>> +#ifndef _ASM_X86_TEST_H_ > >>> +#define _ASM_X86_TEST_H_ > >>> + > >>> +#include <xen/types.h> > >>> + > >>> +int test_smoc(uint32_t selection, uint32_t *results); > >>> + > >>> +static inline void execute_selftests(void) > >> > >> IMO run_selftests() would be better, but this is already not all of our > >> selftests, and this particular function really doesn't warrant being > >> static inline. > >> > >> But I'm also not sure what this is liable to contain other than > >> test_smoc() so I'm not sure why we want it. > > > > This was requested by Jan, he was concerned that more of such tests > > would appear. It's new in v4 IIRC. > > If the two of you want it without such a wrapper, so be it. I will admit > I was a little puzzled to find it implemented as inline function, but I > didn't see a strong need to comment on that. It felt a bit misplaced to put such generic selftest function in a smoc.c file, and I didn't feel like introducing a new test.c file just for that. I don't have a strong opinion however, if you think it's better to go in smoc.c I'm happy with that. Thanks, Roger.
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |