Lines Matching defs:v86
114 static bool do_test(struct vm86plus_struct *v86, unsigned long eip,
121 v86->regs.eip = eip;
122 ret = vm86(VM86_ENTER, v86);
161 printf("[FAIL]\tIncorrect return reason (started at eip = 0x%lx, ended at eip = 0x%lx)\n", eip, v86->regs.eip);
232 struct vm86plus_struct v86;
243 memset(&v86, 0, sizeof(v86));
245 v86.regs.cs = load_addr / 16;
246 v86.regs.ss = load_addr / 16;
247 v86.regs.ds = load_addr / 16;
248 v86.regs.es = load_addr / 16;
251 v86.regs.esp = 4096;
253 assert((v86.regs.cs & 3) == 0); /* Looks like RPL = 0 */
256 do_test(&v86, vmcode_bound - vmcode, VM86_INTx, 5, "#BR");
265 do_test(&v86, vmcode_sysenter - vmcode, -1, 0, "SYSENTER");
276 do_test(&v86, vmcode_syscall - vmcode, VM86_SIGNAL, 0, "SYSCALL");
280 v86.regs.eflags |= X86_EFLAGS_VIP;
281 v86.regs.eflags &= ~X86_EFLAGS_IF;
282 do_test(&v86, vmcode_sti - vmcode, VM86_STI, 0, "STI with VIP set");
285 v86.regs.eflags = X86_EFLAGS_VIP;
286 v86.regs.eax = 0;
287 do_test(&v86, vmcode_popf_hlt - vmcode, VM86_UNKNOWN, 0, "POPF with VIP set and IF clear");
290 v86.regs.eflags = X86_EFLAGS_VIP;
291 v86.regs.eax = X86_EFLAGS_IF;
292 do_test(&v86, vmcode_popf_hlt - vmcode, VM86_STI, 0, "POPF with VIP and IF set");
295 v86.regs.eflags = 0;
296 v86.regs.eax = X86_EFLAGS_IF;
297 do_test(&v86, vmcode_popf_hlt - vmcode, VM86_UNKNOWN, 0, "POPF with VIP clear and IF set");
299 v86.regs.eflags = 0;
302 do_test(&v86, vmcode_int3 - vmcode, VM86_TRAP, 3, "INT3");
305 v86.regs.eax = (unsigned int)-1;
306 do_test(&v86, vmcode_int80 - vmcode, VM86_INTx, 0x80, "int80");
309 do_umip_tests(&v86, addr);
312 v86.regs.cs = 0;
313 v86.regs.ss = 0;
316 if (do_test(&v86, 0, VM86_SIGNAL, 0, "Execute null pointer") &&