30 "mov $" STR(__USER_DS)
", %edx;"
36 "jmp .Ltss_ret_point;"
66#define LDT_SEL ((LDTE << 3) | X86_SEL_LDT | 3)
69 ldt[
LDTE] =
gdt[__USER_DS >> 3];
73 asm volatile (
"1: mov %[sel], %%fs; 2:"
109 asm volatile (
"mov %%esp, %%dr0;"
110 "jmp $%c[vm86_tss_sel], $0;"
128 xtf_error(
"Error: Unexpected fault %08x\n", fault);
bool ex_record_fault_eax(struct cpu_regs *regs, const struct extable_entry *ex)
Record the current fault in %eax.
static void lldt(unsigned int sel)
uint8_t boot_stack[3 *PAGE_SIZE]
void test_main(void)
To be implemented by each test, as its entry point.
const char test_title[]
The title of the test.
static void pack_tss_desc(user_desc *d, const env_tss *t)
user_desc gdt[NR_GDT_ENTRIES]
static void pack_ldt_desc(user_desc *d, const user_desc *ldt, unsigned int limit)
#define EXINFO_SYM(exc, ec)
unsigned int exinfo_t
Packed exception and error code information.
int xtf_set_idte(unsigned int vector, const struct xtf_idte *idte)
Set up an IDT Entry, in a guest agnostic way.
#define X86_VEC_AVAIL
Available for test use.
#define _ASM_EXTABLE_HANDLER(fault, fixup, handler)
Create an exception table entry with custom handler.
static unsigned long exec_user(unsigned long(*fn)(void))
#define STR(x)
Stringise an expression, expanding preprocessor tokens.
#define _p(v)
Express an abitrary integer v as void *.
#define _u(v)
Express an arbitrary value v as unsigned long.
void xtf_failure(const char *fmt,...)
Report a test failure.
void xtf_error(const char *fmt,...)
Report a test error.
void xtf_success(const char *fmt,...)
Report test success.
A guest agnostic represention of IDT information.
char zeroptr[]
An array which the linker resolves to 0.
#define X86_TSS_INVALID_IO_BITMAP
unsigned long user_ldt_use(void)
static const struct xtf_idte idte