+Jim again On Wed, Oct 20, 2021, Paolo Bonzini wrote: > @@ -255,4 +255,16 @@ static inline void *get_idt_addr(idt_entry_t *entry) > return (void *)addr; > } > > +extern gdt_desc_entry_t *get_tss_descr(void); > + > +static inline unsigned long get_gdt_entry_base(gdt_desc_entry_t *entry) Bad naming again, base4 doesn't exist for segment descriptors. It's a bit wordy, but maybe this? static inline unsigned long get_system_desc_base(gdt_system_desc_entry_t *entry) > +{ > + unsigned long base; > + base = entry->base1 | ((u32)entry->base2 << 16) | ((u32)entry->base3 << 24); > +#ifdef __x86_64__ > + base |= (u64)entry->base4 << 32; > +#endif > + return base; > +} > + > #endif