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