/linux-4.4.14/arch/x86/include/asm/ |
H A D | vm86.h | 5 #include <uapi/asm/vm86.h> 8 * This is the (kernel) stack-layout when we have done a "SAVE_ALL" from vm86 30 struct vm86 { struct 55 if (__t->vm86 != NULL) { \ 56 kfree(__t->vm86); \ 57 __t->vm86 = NULL; \
|
H A D | processor.h | 9 struct vm86; 231 * that we set it to zero in vm86 tasks to avoid corrupting the 232 * stack if we were to go through the sysenter path from vm86 405 struct vm86 *vm86; member in struct:thread_struct 465 /* sp0 on x86_32 is special in and around vm86 mode. */ current_top_of_stack()
|
H A D | thread_info.h | 19 * variable-length. Except for vm86 mode, struct pt_regs assumes a 30 * In vm86 mode, the hardware frame is much longer still, so add 16
|
H A D | ptrace.h | 103 * On x86_64, vm86 mode is mercifully nonexistent, and we don't need
|
/linux-4.4.14/arch/x86/kernel/ |
H A D | vm86_32.c | 4 * 29 dec 2001 - Fixed oopses caused by unchecked access to the vm86 55 #include <asm/vm86.h> 84 #define VFLAGS (*(unsigned short *)&(current->thread.vm86->veflags)) 85 #define VEFLAGS (current->thread.vm86->veflags) 98 struct vm86 *vm86 = current->thread.vm86; save_v86_state() local 108 if (!vm86 || !vm86->user_vm86) { save_v86_state() 112 set_flags(regs->pt.flags, VEFLAGS, X86_EFLAGS_VIF | vm86->veflags_mask); save_v86_state() 113 user = vm86->user_vm86; save_v86_state() 115 if (!access_ok(VERIFY_WRITE, user, vm86->vm86plus.is_vm86pus ? save_v86_state() 118 pr_alert("could not access userspace vm86 info\n"); save_v86_state() 140 put_user_ex(vm86->screen_bitmap, &user->screen_bitmap); save_v86_state() 143 pr_alert("could not access userspace vm86 info\n"); save_v86_state() 148 tsk->thread.sp0 = vm86->saved_sp0; save_v86_state() 151 vm86->saved_sp0 = 0; save_v86_state() 154 memcpy(®s->pt, &vm86->regs32, sizeof(struct pt_regs)); save_v86_state() 156 lazy_load_gs(vm86->regs32.gs); save_v86_state() 204 SYSCALL_DEFINE2(vm86, unsigned long, cmd, unsigned long, arg) SYSCALL_DEFINE2() 214 * NOTE: on old vm86 stuff this will return the error SYSCALL_DEFINE2() 231 struct vm86 *vm86 = tsk->thread.vm86; do_sys_vm86() local 239 * vm86 cannot virtualize the address space, so vm86 users do_sys_vm86() 241 * that BIOS places important data in the first page, vm86 do_sys_vm86() 243 * for example, won't even bother trying to use vm86 if it do_sys_vm86() 247 * disallow vm86(old) for users who cannot mmap at va 0. do_sys_vm86() 252 * behavior for vm86 as well, as it ensures that legacy do_sys_vm86() 256 pr_info_once("Denied a call to vm86(old) from %s[%d] (uid: %d). Set the vm.mmap_min_addr sysctl to 0 and/or adjust LSM mmap_min_addr policy to enable vm86 if you are using a vm86-based DOS emulator.\n", do_sys_vm86() 262 if (!vm86) { do_sys_vm86() 263 if (!(vm86 = kzalloc(sizeof(*vm86), GFP_KERNEL))) do_sys_vm86() 265 tsk->thread.vm86 = vm86; do_sys_vm86() 267 if (vm86->saved_sp0) do_sys_vm86() 297 get_user_ex(vm86->flags, &user_vm86->flags); do_sys_vm86() 298 get_user_ex(vm86->screen_bitmap, &user_vm86->screen_bitmap); do_sys_vm86() 299 get_user_ex(vm86->cpu_type, &user_vm86->cpu_type); do_sys_vm86() 304 if (copy_from_user(&vm86->int_revectored, do_sys_vm86() 308 if (copy_from_user(&vm86->int21_revectored, do_sys_vm86() 313 if (copy_from_user(&vm86->vm86plus, &user_vm86->vm86plus, do_sys_vm86() 316 vm86->vm86plus.is_vm86pus = 1; do_sys_vm86() 318 memset(&vm86->vm86plus, 0, do_sys_vm86() 321 memcpy(&vm86->regs32, regs, sizeof(struct pt_regs)); do_sys_vm86() 322 vm86->user_vm86 = user_vm86; do_sys_vm86() 336 switch (vm86->cpu_type) { do_sys_vm86() 338 vm86->veflags_mask = 0; do_sys_vm86() 341 vm86->veflags_mask = X86_EFLAGS_NT | X86_EFLAGS_IOPL; do_sys_vm86() 344 vm86->veflags_mask = X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL; do_sys_vm86() 347 vm86->veflags_mask = X86_EFLAGS_ID | X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL; do_sys_vm86() 354 vm86->saved_sp0 = tsk->thread.sp0; do_sys_vm86() 355 lazy_save_gs(vm86->regs32.gs); do_sys_vm86() 365 if (vm86->flags & VM86_SCREEN_BITMAP) do_sys_vm86() 407 set_flags(VEFLAGS, flags, current->thread.vm86->veflags_mask); set_vflags_long() 417 set_flags(VFLAGS, flags, current->thread.vm86->veflags_mask); set_vflags_short() 432 return flags | (VEFLAGS & current->thread.vm86->veflags_mask); get_vflags() 530 struct vm86 *vm86 = current->thread.vm86; do_int() local 534 if (is_revectored(i, &vm86->int_revectored)) do_int() 536 if (i == 0x21 && is_revectored(AH(regs), &vm86->int21_revectored)) do_int() 560 struct vm86 *vm86 = current->thread.vm86; handle_vm86_trap() local 562 if (vm86->vm86plus.is_vm86pus) { handle_vm86_trap() 585 struct vm86plus_info_struct *vmpi = ¤t->thread.vm86->vm86plus; handle_vm86_fault() 746 /* ---------------- vm86 special IRQ passing stuff ----------------- */
|
H A D | process.c | 33 #include <asm/vm86.h> 88 dst->thread.vm86 = NULL; arch_dup_task_struct()
|
H A D | process_32.c | 56 #include <asm/vm86.h>
|
H A D | traps.c | 65 #include <asm/vm86.h> 190 * Traps 0, 1, 3, 4, and 5 should be forwarded to vm86. do_trap_no_signal()
|
H A D | signal.c | 34 #include <asm/vm86.h>
|
/linux-4.4.14/tools/testing/selftests/x86/ |
H A D | entry_from_vm86.c | 2 * entry_from_vm86.c - tests kernel entries from vm86 mode 5 * This exercises a few paths that need to special-case vm86 mode. 26 #include <sys/vm86.h> 61 printf("[FAIL]\tSignal frame should not reflect vm86 mode\n"); sighandler() 115 printf("[RUN]\t%s from vm86 mode\n", text); do_test() 117 ret = vm86(VM86_ENTER, v86); do_test() 137 printf("[INFO]\tExited vm86 mode due to #%s\n", trapname); do_test() 139 printf("[INFO]\tExited vm86 mode due to unhandled GP fault\n"); do_test() 141 printf("[INFO]\tExited vm86 mode due to a trap (arg=%ld)\n", do_test() 144 printf("[INFO]\tExited vm86 mode due to a signal\n"); do_test() 146 printf("[INFO]\tExited vm86 mode due to STI\n"); do_test() 148 printf("[INFO]\tExited vm86 mode due to type %ld, arg %ld\n", do_test() 191 * the vm86 return value. This will avoid problems on non-SEP main() 201 * EFER.SCE, so it's #UD on all systems. But vm86 is main()
|
/linux-4.4.14/arch/x86/include/uapi/asm/ |
H A D | vm86.h | 6 * the Pentium uses them. Linux will return from vm86 mode when both 27 * Return values for the 'vm86()' system call 40 * Additional return values when invoking new vm86() 46 * function codes when invoking new vm86() 58 * done a translation of "SAVE_ALL" from vm86 mode. The real kernel layout 115 unsigned long is_vm86pus:1; /* for vm86 internal use */
|
H A D | processor-flags.h | 85 #define X86_CR4_VME_BIT 0 /* enable vm86 extensions */
|
/linux-4.4.14/arch/x86/mm/ |
H A D | fault.c | 23 #include <asm/vm86.h> /* struct vm86 */ 302 * Did it hit the DOS screen memory VA from vm86 mode? 311 if (!v8086_mode(regs) || !tsk->thread.vm86) check_v8086_mode() 316 tsk->thread.vm86->screen_bitmap |= 1 << bit; check_v8086_mode() 452 * No vm86 mode in 64-bit mode:
|
/linux-4.4.14/arch/x86/math-emu/ |
H A D | get_address.c | 23 #include <asm/vm86.h>
|
/linux-4.4.14/arch/sh/kernel/ |
H A D | syscalls_64.S | 189 .long sys_ni_syscall /* vm86 */
|
/linux-4.4.14/arch/arm/kernel/ |
H A D | calls.S | 178 CALL(sys_ni_syscall) /* vm86 */
|
/linux-4.4.14/arch/s390/kernel/ |
H A D | syscalls.S | 177 NI_SYSCALL /* for vm86 */
|
/linux-4.4.14/arch/x86/kernel/fpu/ |
H A D | core.c | 80 * Were we in user mode (or vm86 mode) when we were
|
/linux-4.4.14/arch/x86/kernel/cpu/ |
H A D | perf_event.h | 784 * vm86 mode using the known zero-based code segment and 'fix up' the registers
|
H A D | common.c | 1258 * On x86_32, vm86 modifies tss.sp0, so sp0 isn't a reliable way to find
|
/linux-4.4.14/arch/mn10300/kernel/ |
H A D | entry.S | 596 .long sys_ni_syscall /* vm86 */
|
/linux-4.4.14/arch/blackfin/mach-common/ |
H A D | entry.S | 1480 .long _sys_ni_syscall /* for vm86 */
|
/linux-4.4.14/arch/frv/kernel/ |
H A D | entry.S | 1346 .long sys_ni_syscall /* for vm86 */
|
/linux-4.4.14/drivers/video/fbdev/ |
H A D | uvesafb.c | 1099 * It turns out it's not the best idea to do panning via vm86, uvesafb_pan_display()
|
/linux-4.4.14/arch/x86/kernel/cpu/mcheck/ |
H A D | mce.c | 431 * the additional vm86 bit around everywhere. mce_gather_info()
|
/linux-4.4.14/drivers/scsi/ |
H A D | dpt_i2o.c | 1928 #include <uapi/asm/vm86.h>
|
/linux-4.4.14/arch/x86/kvm/ |
H A D | x86.c | 2568 * emulated via vm86 mode. Still, do not go to great lengths kvm_vm_ioctl_check_extension()
|