NMI Taskswitch with increasing privilege
More...
#include <xtf.h>
Go to the source code of this file.
|
void | entry_NMI_task (void) |
|
| asm ("exit_NMI_task:" "iretl;" "entry_NMI_task:;" "push $0;" "push $" STR(X86_EXC_NMI) ";" "push %es;" "push %ds;" "push %edi;" "push %esi;" "push %edx;" "push %ecx;" "push %eax;" "push %ebx;" "push %ebp;" "mov %esp, %eax;" "call do_exception;" "pop %ebp;" "pop %ebx;" "pop %eax;" "pop %ecx;" "pop %edx;" "pop %esi;" "pop %edi;" "pop %ds;" "pop %es;" "add $2*4, %esp;" "jmp exit_NMI_task;") |
|
bool | do_unhandled_exception (struct cpu_regs *regs) |
| May be implemented by a guest to provide custom exception handling. More...
|
|
static void | user_inject_nmi (void) |
|
void | test_main (void) |
| To be implemented by each test, as its entry point. More...
|
|
◆ entry_NMI_task()
void entry_NMI_task |
( |
void |
| ) |
|
◆ asm()
asm |
( |
"exit_NMI_task:" "iretl;" "entry_NMI_task:;" "push $0;" "push $" STR(X86_EXC_NMI) ";" "push %es;" "push %ds;" "push %edi;" "push %esi;" "push %edx;" "push %ecx;" "push %eax;" "push %ebx;" "push %ebp;" "mov % |
esp, |
|
|
%eax;" "call do_exception;" "pop %ebp;" "pop %ebx;" "pop %eax;" "pop %ecx;" "pop %edx;" "pop %esi;" "pop %edi;" "pop %ds;" "pop %es;" "add $2 * |
4, |
|
|
%esp;" "jmp exit_NMI_task;" |
|
|
) |
| |
◆ do_unhandled_exception()
bool do_unhandled_exception |
( |
struct cpu_regs * |
regs | ) |
|
May be implemented by a guest to provide custom exception handling.
Definition at line 93 of file main.c.
◆ user_inject_nmi()
static void user_inject_nmi |
( |
void |
| ) |
|
|
static |
◆ test_main()
To be implemented by each test, as its entry point.
Definition at line 117 of file main.c.
◆ test_title
const char test_title[] = "Test nmi-taskswitch-priv" |
The title of the test.
Definition at line 34 of file main.c.
◆ nmi_stack
◆ nmi_tss
Initial value:=
{
.cs = __KERN_CS,
.ss = __KERN_DS,
.ds = __USER_DS,
.es = __USER_DS,
.fs = __USER_DS,
.gs = __USER_DS,
}
static uint8_t nmi_stack[PAGE_SIZE]
void entry_NMI_task(void)
#define _u(v)
Express an arbitrary value v as unsigned long.
#define X86_TSS_INVALID_IO_BITMAP
Definition at line 76 of file main.c.