On 24.02.2025 17:05, Andrew Cooper wrote:
> --- a/xen/arch/x86/cpu/common.c
> +++ b/xen/arch/x86/cpu/common.c
> @@ -819,6 +819,7 @@ void load_system_tables(void)
>        * support using ARRAY_SIZE against per-cpu variables.
>        */
>       struct tss_page *tss_page = &this_cpu(tss_page);
> +        idt_entry_t *idt = this_cpu(idt);

Nit: Tab indentation here.

> @@ -830,7 +831,7 @@ void load_system_tables(void)
>               .limit = LAST_RESERVED_GDT_BYTE,
>       };
>       const struct desc_ptr idtr = {
> -             .base = (unsigned long)idt_tables[cpu],
> +             .base = (unsigned long)idt,
>               .limit = sizeof(bsp_idt) - 1,
>       };

Coming back to the comment on the earlier patch: Now that you touch all
of the idt_tables[] uses anyway, ...

> @@ -30,7 +31,7 @@ typedef union {
>  } idt_entry_t;
>  
>  extern idt_entry_t bsp_idt[X86_IDT_VECTORS];
> -extern idt_entry_t *idt_tables[];
> +DECLARE_PER_CPU(idt_entry_t *, idt);

... this probably really ought to become

DECLARE_PER_CPU(idt_entry_t (*)[X86_IDT_VECTORS], idt);

?

Jan

Reply via email to