On Monday, March 24th, 2025 at 5:36 AM, Jan Beulich <jbeul...@suse.com> wrote:

> 
> 
> On 21.03.2025 00:05, dm...@proton.me wrote:
> 
> > Add new macro APIC_VECTOR_VALID() to validate the interrupt vector
> > range as per [1]. This macro replaces hardcoded checks against the
> > open-coded value 16 in LAPIC and virtual LAPIC code and simplifies
> > the code a bit.
> > 
> > [1] Intel SDM volume 3A
> > Chapter "ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER"
> > Section "Valid Interrupt Vectors"
> > 
> > Signed-off-by: Denis Mukhin dmuk...@ford.com
> 
> 
> Reviewed-by: Jan Beulich jbeul...@suse.com
> 
> with ...
> 
> > --- a/xen/arch/x86/include/asm/apicdef.h
> > +++ b/xen/arch/x86/include/asm/apicdef.h
> > @@ -78,6 +78,7 @@
> > #define APIC_DM_STARTUP 0x00600
> > #define APIC_DM_EXTINT 0x00700
> > #define APIC_VECTOR_MASK 0x000FF
> > +#define APIC_VECTOR_VALID(x) (((x) & APIC_VECTOR_MASK) >= 16)
> 
> 
> ... line length restrictions respected here. I'll see about taking care of
> this while committing, provided other x86 maintainers wouldn't prefer this
> to not go in in the first place (so I'll also give it another day or two).

Thanks!

> 
> Jan

Reply via email to