[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] x86/traps: Drop incorrect BUILD_BUG_ON() and comment in load_system_tables()



commit 0630cde32fe5e0e2557410f201da8c35e5487c52
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Jan 6 10:59:19 2025 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Aug 14 21:49:27 2025 +0100

    x86/traps: Drop incorrect BUILD_BUG_ON() and comment in load_system_tables()
    
    This was added erroneously by me.
    
    Hardware task switching does demand a TSS of at least 0x67 bytes, but that's
    not relevant in 64bit, and not relevant for Xen since commit
    5d1181a5ea5e ("xen: Remove x86_32 build target.") in 2012.
    
    We already load a 0-length TSS in early_traps_init() demonstrating that it's
    possible.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/cpu/common.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index f6ec5c9df5..cdc41248d4 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -936,8 +936,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) )
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.