RE: [PATCH] x86/trapnr: Add event type macros to <asm/trapnr.h>

From: Li, Xin3
Date: Thu Jul 06 2023 - 03:25:22 EST


> > +/*
> > + * Event type codes used by both Intel VT-x and FRED */
> > +/* Maskable external interrupt */
> > +#define EVENT_TYPE_HWINT 0
> > +#define EVENT_TYPE_RESERVED 1
> > +#define EVENT_TYPE_NMI 2
> > +/* Hardware exceptions (e.g., page fault) */
> > +#define EVENT_TYPE_HWFAULT 3
> > +/* Software interrupt (INT n) */
> > +#define EVENT_TYPE_SWINT 4
> > +/* INT1 (ICEBP) */
> > +#define EVENT_TYPE_PRIVSW 5
> > +/* Software exception (INT3 or INTO) */
> > +#define EVENT_TYPE_SWFAULT 6
> > +/* VT-x MTF or FRED SYSCALL/SYSENTER */
> > +#define EVENT_TYPE_OTHER 7
>
> So I know tglx hates on tail comments, but I find the below *MUCH* more readable
> than the above horror show.

Agree, sometimes a tail comment looks much better.

Maybe tglx could give more specific directions on when it's okay to use
tail comments.

Thanks!
Xin