v86 134 tools/testing/selftests/x86/entry_from_vm86.c static bool do_test(struct vm86plus_struct *v86, unsigned long eip, v86 141 tools/testing/selftests/x86/entry_from_vm86.c v86->regs.eip = eip; v86 142 tools/testing/selftests/x86/entry_from_vm86.c ret = vm86(VM86_ENTER, v86); v86 181 tools/testing/selftests/x86/entry_from_vm86.c printf("[FAIL]\tIncorrect return reason (started at eip = 0x%lx, ended at eip = 0x%lx)\n", eip, v86->regs.eip); v86 252 tools/testing/selftests/x86/entry_from_vm86.c struct vm86plus_struct v86; v86 263 tools/testing/selftests/x86/entry_from_vm86.c memset(&v86, 0, sizeof(v86)); v86 265 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.cs = load_addr / 16; v86 266 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.ss = load_addr / 16; v86 267 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.ds = load_addr / 16; v86 268 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.es = load_addr / 16; v86 271 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.esp = 4096; v86 273 tools/testing/selftests/x86/entry_from_vm86.c assert((v86.regs.cs & 3) == 0); /* Looks like RPL = 0 */ v86 276 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_bound - vmcode, VM86_INTx, 5, "#BR"); v86 285 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_sysenter - vmcode, -1, 0, "SYSENTER"); v86 296 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_syscall - vmcode, VM86_SIGNAL, 0, "SYSCALL"); v86 300 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eflags |= X86_EFLAGS_VIP; v86 301 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eflags &= ~X86_EFLAGS_IF; v86 302 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_sti - vmcode, VM86_STI, 0, "STI with VIP set"); v86 305 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eflags = X86_EFLAGS_VIP; v86 306 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eax = 0; v86 307 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_popf_hlt - vmcode, VM86_UNKNOWN, 0, "POPF with VIP set and IF clear"); v86 310 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eflags = X86_EFLAGS_VIP; v86 311 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eax = X86_EFLAGS_IF; v86 312 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_popf_hlt - vmcode, VM86_STI, 0, "POPF with VIP and IF set"); v86 315 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eflags = 0; v86 316 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eax = X86_EFLAGS_IF; v86 317 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_popf_hlt - vmcode, VM86_UNKNOWN, 0, "POPF with VIP clear and IF set"); v86 319 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eflags = 0; v86 322 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_int3 - vmcode, VM86_TRAP, 3, "INT3"); v86 325 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.eax = (unsigned int)-1; v86 326 tools/testing/selftests/x86/entry_from_vm86.c do_test(&v86, vmcode_int80 - vmcode, VM86_INTx, 0x80, "int80"); v86 329 tools/testing/selftests/x86/entry_from_vm86.c do_umip_tests(&v86, addr); v86 332 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.cs = 0; v86 333 tools/testing/selftests/x86/entry_from_vm86.c v86.regs.ss = 0; v86 336 tools/testing/selftests/x86/entry_from_vm86.c if (do_test(&v86, 0, VM86_SIGNAL, 0, "Execute null pointer") &&