Lines Matching refs:vm86

87 #define VFLAGS	(*(unsigned short *)&(current->thread.vm86->veflags))
88 #define VEFLAGS (current->thread.vm86->veflags)
100 struct vm86 *vm86 = current->thread.vm86; in save_v86_state() local
109 BUG_ON(!vm86); in save_v86_state()
111 set_flags(regs->pt.flags, VEFLAGS, X86_EFLAGS_VIF | vm86->veflags_mask); in save_v86_state()
112 user = vm86->user_vm86; in save_v86_state()
114 if (!user_access_begin(user, vm86->vm86plus.is_vm86pus ? in save_v86_state()
145 tsk->thread.sp0 = vm86->saved_sp0; in save_v86_state()
149 vm86->saved_sp0 = 0; in save_v86_state()
152 memcpy(&regs->pt, &vm86->regs32, sizeof(struct pt_regs)); in save_v86_state()
154 loadsegment(gs, vm86->regs32.gs); in save_v86_state()
176 SYSCALL_DEFINE2(vm86, unsigned long, cmd, unsigned long, arg) in SYSCALL_DEFINE2() argument
202 struct vm86 *vm86 = tsk->thread.vm86; in do_sys_vm86() local
234 if (!vm86) { in do_sys_vm86()
235 if (!(vm86 = kzalloc(sizeof(*vm86), GFP_KERNEL))) in do_sys_vm86()
237 tsk->thread.vm86 = vm86; in do_sys_vm86()
239 if (vm86->saved_sp0) in do_sys_vm86()
273 vm86->flags = v.flags; in do_sys_vm86()
274 vm86->cpu_type = v.cpu_type; in do_sys_vm86()
276 if (copy_from_user(&vm86->int_revectored, in do_sys_vm86()
280 if (copy_from_user(&vm86->int21_revectored, in do_sys_vm86()
285 if (copy_from_user(&vm86->vm86plus, &user_vm86->vm86plus, in do_sys_vm86()
288 vm86->vm86plus.is_vm86pus = 1; in do_sys_vm86()
290 memset(&vm86->vm86plus, 0, in do_sys_vm86()
293 memcpy(&vm86->regs32, regs, sizeof(struct pt_regs)); in do_sys_vm86()
294 vm86->user_vm86 = user_vm86; in do_sys_vm86()
308 switch (vm86->cpu_type) { in do_sys_vm86()
310 vm86->veflags_mask = 0; in do_sys_vm86()
313 vm86->veflags_mask = X86_EFLAGS_NT | X86_EFLAGS_IOPL; in do_sys_vm86()
316 vm86->veflags_mask = X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL; in do_sys_vm86()
319 vm86->veflags_mask = X86_EFLAGS_ID | X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL; in do_sys_vm86()
326 vm86->saved_sp0 = tsk->thread.sp0; in do_sys_vm86()
327 savesegment(gs, vm86->regs32.gs); in do_sys_vm86()
379 set_flags(VEFLAGS, flags, current->thread.vm86->veflags_mask); in set_vflags_long()
389 set_flags(VFLAGS, flags, current->thread.vm86->veflags_mask); in set_vflags_short()
404 return flags | (VEFLAGS & current->thread.vm86->veflags_mask); in get_vflags()
499 struct vm86 *vm86 = current->thread.vm86; in do_int() local
503 if (is_revectored(i, &vm86->int_revectored)) in do_int()
505 if (i == 0x21 && is_revectored(AH(regs), &vm86->int21_revectored)) in do_int()
529 struct vm86 *vm86 = current->thread.vm86; in handle_vm86_trap() local
531 if (vm86->vm86plus.is_vm86pus) { in handle_vm86_trap()
554 struct vm86plus_info_struct *vmpi = &current->thread.vm86->vm86plus; in handle_vm86_fault()