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()
274 vm86->flags = v.flags; in do_sys_vm86()
275 vm86->cpu_type = v.cpu_type; in do_sys_vm86()
277 if (copy_from_user(&vm86->int_revectored, in do_sys_vm86()
281 if (copy_from_user(&vm86->int21_revectored, in do_sys_vm86()
286 if (copy_from_user(&vm86->vm86plus, &user_vm86->vm86plus, in do_sys_vm86()
289 vm86->vm86plus.is_vm86pus = 1; in do_sys_vm86()
291 memset(&vm86->vm86plus, 0, in do_sys_vm86()
294 memcpy(&vm86->regs32, regs, sizeof(struct pt_regs)); in do_sys_vm86()
295 vm86->user_vm86 = user_vm86; in do_sys_vm86()
309 switch (vm86->cpu_type) { in do_sys_vm86()
311 vm86->veflags_mask = 0; in do_sys_vm86()
314 vm86->veflags_mask = X86_EFLAGS_NT | X86_EFLAGS_IOPL; in do_sys_vm86()
317 vm86->veflags_mask = X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL; in do_sys_vm86()
320 vm86->veflags_mask = X86_EFLAGS_ID | X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL; in do_sys_vm86()
327 vm86->saved_sp0 = tsk->thread.sp0; in do_sys_vm86()
328 savesegment(gs, vm86->regs32.gs); in do_sys_vm86()
380 set_flags(VEFLAGS, flags, current->thread.vm86->veflags_mask); in set_vflags_long()
390 set_flags(VFLAGS, flags, current->thread.vm86->veflags_mask); in set_vflags_short()
405 return flags | (VEFLAGS & current->thread.vm86->veflags_mask); in get_vflags()
500 struct vm86 *vm86 = current->thread.vm86; in do_int() local
504 if (is_revectored(i, &vm86->int_revectored)) in do_int()
506 if (i == 0x21 && is_revectored(AH(regs), &vm86->int21_revectored)) in do_int()
530 struct vm86 *vm86 = current->thread.vm86; in handle_vm86_trap() local
532 if (vm86->vm86plus.is_vm86pus) { in handle_vm86_trap()
555 struct vm86plus_info_struct *vmpi = &current->thread.vm86->vm86plus; in handle_vm86_fault()