]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
x86/traps: Drop incorrect BUILD_BUG_ON() and comment in load_system_tables()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 6 Jan 2025 10:59:19 +0000 (10:59 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 6 Jan 2025 14:19:10 +0000 (14:19 +0000)
It is only the hardware task switching mechanism which checks that a TSS is at
least 0x67 bytes long.  It is perfectly possible to load a shorter TSS.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/cpu/common.c

index 76346d539933ea888f734a0a4170eec859895acb..0bb754d4803f0f7494e07573e392f0b79b97474d 100644 (file)
@@ -897,8 +897,6 @@ void load_system_tables(void)
                wrmsrl(MSR_ISST, (unsigned long)ist_ssp);
        }
 
-       BUILD_BUG_ON(sizeof(*tss) <= 0x67); /* Mandated by the architecture. */
-
        _set_tssldt_desc(gdt + TSS_ENTRY, (unsigned long)tss,
                         sizeof(*tss) - 1, SYS_DESC_tss_avail);
        if ( IS_ENABLED(CONFIG_PV32) )