#include <linux/errno.h>#include <linux/sched.h>#include <linux/kernel.h>#include <linux/signal.h>#include <linux/string.h>#include <linux/ptrace.h>#include <linux/mm.h>#include <linux/smp.h>#include <linux/smp_lock.h>#include <asm/uaccess.h>#include <asm/pgtable.h>#include <asm/io.h>Include dependency graph for i386/kernel/vm86.c:

Go to the source code of this file.
Defines | |
| #define | KVM86 ((struct kernel_vm86_struct *)regs) |
| #define | VMPI KVM86->vm86plus |
| #define | AL(regs) (((unsigned char *)&((regs)->eax))[0]) |
| #define | AH(regs) (((unsigned char *)&((regs)->eax))[1]) |
| #define | IP(regs) (*(unsigned short *)&((regs)->eip)) |
| #define | SP(regs) (*(unsigned short *)&((regs)->esp)) |
| #define | VFLAGS (*(unsigned short *)&(current->tss.v86flags)) |
| #define | VEFLAGS (current->tss.v86flags) |
| #define | set_flags(X, new, mask) ((X) = ((X) & ~(mask)) | ((new) & (mask))) |
| #define | SAFE_MASK (0xDD5) |
| #define | RETURN_MASK (0xDFF) |
| #define | VM86_REGS_PART2 orig_eax |
| #define | VM86_REGS_SIZE1 ( (unsigned)( & (((struct kernel_vm86_regs *)0)->VM86_REGS_PART2) ) ) |
| #define | VM86_REGS_SIZE2 (sizeof(struct kernel_vm86_regs) - VM86_REGS_SIZE1) |
| #define | pushb(base, ptr, val, regs) |
| #define | pushw(base, ptr, val, regs) |
| #define | pushl(base, ptr, val, regs) |
| #define | popb(base, ptr, regs) |
| #define | popw(base, ptr, regs) |
| #define | popl(base, ptr, regs) |
| #define | CHECK_IF_IN_TRAP |
| #define | VM86_FAULT_RETURN |
| #define | VM86_IRQNAME "vm86irq" |
| #define | ALLOWED_SIGS |
Functions | |
| asmlinkage struct pt_regs * | FASTCALL (save_v86_state(struct kernel_vm86_regs *regs)) |
| pt_regs * | save_v86_state (struct kernel_vm86_regs *regs) |
| static void | mark_screen_rdonly (struct task_struct *tsk) |
| static int | do_vm86_irq_handling (int subfunction, int irqnumber) |
| static void | do_sys_vm86 (struct kernel_vm86_struct *info, struct task_struct *tsk) |
| asmlinkage int | sys_vm86old (struct vm86_struct *v86) |
| asmlinkage int | sys_vm86 (unsigned long subfunction, struct vm86plus_struct *v86) |
| static void | return_to_32bit (struct kernel_vm86_regs *regs16, int retval) |
| static void | set_IF (struct kernel_vm86_regs *regs) |
| static void | clear_IF (struct kernel_vm86_regs *regs) |
| static void | clear_TF (struct kernel_vm86_regs *regs) |
| static void | set_vflags_long (unsigned long eflags, struct kernel_vm86_regs *regs) |
| static void | set_vflags_short (unsigned short flags, struct kernel_vm86_regs *regs) |
| static unsigned long | get_vflags (struct kernel_vm86_regs *regs) |
| static int | is_revectored (int nr, struct revectored_struct *bitmap) |
| static void | do_int (struct kernel_vm86_regs *regs, int i, unsigned char *ssp, unsigned long sp) |
| int | handle_vm86_trap (struct kernel_vm86_regs *regs, long error_code, int trapno) |
| void | handle_vm86_fault (struct kernel_vm86_regs *regs, long error_code) |
| static void | irq_handler (int intno, void *dev_id, struct pt_regs *regs) |
| static void | free_vm86_irq (int irqnumber) |
| static int | task_valid (struct task_struct *tsk) |
| void | release_x86_irqs (struct task_struct *task) |
| static void | handle_irq_zombies (void) |
| static int | get_and_reset_irq (int irqnumber) |
Variables | |
| static struct vm86_irqs | vm86_irqs [16] |
| static int | irqbits = 0 |
|
|
Definition at line 44 of file i386/kernel/vm86.c. Referenced by do_int(). |
|
|
Definition at line 43 of file i386/kernel/vm86.c. |
|
|
Value: ( 1 /* 0 = don't send a signal */ \ | (1 << SIGUSR1) | (1 << SIGUSR2) | (1 << SIGIO) | (1 << SIGURG) \ | (1 << SIGUNUSED) ) Definition at line 679 of file i386/kernel/vm86.c. Referenced by do_vm86_irq_handling(), and nfsd(). |
|
|
Value: if (VMPI.vm86dbg_active && VMPI.vm86dbg_TFpendig) \ pushw(ssp,sp,popw(ssp,sp, regs) | TF_MASK, regs); Referenced by handle_vm86_fault(). |
|
|
Definition at line 45 of file i386/kernel/vm86.c. Referenced by do_int(), emu10k1_voice_start(), emu10k1_voice_stop(), event_intr(), handle_vm86_fault(), and hw_init(). |
|
|
Definition at line 36 of file i386/kernel/vm86.c. Referenced by do_int(), and save_v86_state(). |
|
|
Value: ({ \
unsigned long __res; \
unsigned int err; \
__asm__ __volatile__( \
"1:movb 0(%1,%0),%b2\n\t" \
"incw %w0\n\t" \
"xor %3,%3\n\t" \
"2:\n" \
".section .fixup,\"ax\"\n\t" \
"3: movl $1,%1\n\t" \
" jmp 2b\n\t" \
".previous\n" \
".section __ex_table,\"a\"\n" \
" .align 4\n" \
" .long 1b,3b\n" \
".previous" \
: "=r" (ptr), "=r" (base), "=q" (__res), \
"=r" (err) \
: "0" (ptr), "1" (base), "2" (0)); \
if (err) \
return_to_32bit(regs, VM86_UNKNOWN); \
__res; \
})
Definition at line 415 of file i386/kernel/vm86.c. Referenced by handle_vm86_fault(). |
|
|
Definition at line 468 of file i386/kernel/vm86.c. Referenced by handle_vm86_fault(). |
|
|
Value: ({ \
unsigned long __res; \
unsigned int err; \
__asm__ __volatile__( \
"1:movb 0(%1,%0),%b2\n\t" \
"incw %w0\n\t" \
"2:movb 0(%1,%0),%h2\n\t" \
"incw %w0\n\t" \
"xor %3,%3\n\t" \
"3:\n" \
".section .fixup,\"ax\"\n\t" \
"4: movl $1,%1\n\t" \
" jmp 3b\n\t" \
".previous\n" \
".section __ex_table,\"a\"\n" \
" .align 4\n" \
" .long 1b,4b\n" \
" .long 2b,4b\n" \
".previous" \
: "=r" (ptr), "=r" (base), "=q" (__res), \
"=r" (err) \
: "0" (ptr), "1" (base), "2" (0)); \
if (err) \
return_to_32bit(regs, VM86_UNKNOWN); \
__res; \
})
Definition at line 440 of file i386/kernel/vm86.c. Referenced by handle_vm86_fault(). |
|
|
Value: do { \ int err; \ __asm__ __volatile__( \ "decw %w0\n\t" \ "1: movb %3,0(%2,%0)\n\t" \ "xor %1,%1\n\t" \ "2:\n" \ ".section .fixup,\"ax\"\n\t" \ "3: movl $1,%1\n\t" \ " jmp 2b\n\t" \ ".previous\n" \ ".section __ex_table,\"a\"\n" \ " .align 4\n" \ " .long 1b,3b\n" \ ".previous" \ : "=r" (ptr), "=r" (err) \ : "r" (base), "q" (val), "0" (ptr)); \ if (err) \ return_to_32bit(regs, VM86_UNKNOWN); \ } while(0) Definition at line 335 of file i386/kernel/vm86.c. |
|
|
Definition at line 382 of file i386/kernel/vm86.c. Referenced by handle_vm86_fault(). |
|
|
Value: do { \ int err; \ __asm__ __volatile__( \ "decw %w0\n\t" \ "1: movb %h3,0(%2,%0)\n\t" \ "decw %w0\n\t" \ "2: movb %b3,0(%2,%0)\n\t" \ "xor %1,%1\n\t" \ "3:\n" \ ".section .fixup,\"ax\"\n\t" \ "4: movl $1,%1\n\t" \ " jmp 3b\n\t" \ ".previous\n" \ ".section __ex_table,\"a\"\n" \ " .align 4\n" \ " .long 1b,4b\n" \ " .long 2b,4b\n" \ ".previous" \ : "=r" (ptr), "=r" (err) \ : "r" (base), "q" (val), "0" (ptr)); \ if (err) \ return_to_32bit(regs, VM86_UNKNOWN); \ } while(0) Definition at line 357 of file i386/kernel/vm86.c. Referenced by do_int(), and handle_vm86_fault(). |
|
|
Definition at line 58 of file i386/kernel/vm86.c. Referenced by get_vflags(). |
|
|
Definition at line 57 of file i386/kernel/vm86.c. Referenced by do_sys_vm86(), set_vflags_long(), and set_vflags_short(). |
|
|
Definition at line 54 of file i386/kernel/vm86.c. Referenced by save_v86_state(), set_vflags_long(), and set_vflags_short(). |
|
|
Definition at line 46 of file i386/kernel/vm86.c. Referenced by do_int(), handle_exception(), handle_vm86_fault(), handle_vm86_trap(), imsttfbcon_bmove(), and imsttfbcon_revc(). |
|
|
Definition at line 52 of file i386/kernel/vm86.c. Referenced by clear_IF(), do_sys_vm86(), get_vflags(), save_v86_state(), set_IF(), and set_vflags_long(). |
|
|
Definition at line 51 of file i386/kernel/vm86.c. Referenced by set_vflags_short(). |
|
|
Value: if (VMPI.force_return_for_pic && (VEFLAGS & IF_MASK)) \ return_to_32bit(regs, VM86_PICRETURN); \ return; Referenced by handle_vm86_fault(). |
|
|
Definition at line 671 of file i386/kernel/vm86.c. Referenced by do_vm86_irq_handling(). |
|
|
Definition at line 60 of file i386/kernel/vm86.c. |
|
|
Definition at line 61 of file i386/kernel/vm86.c. Referenced by save_v86_state(), sys_vm86(), and sys_vm86old(). |
|
|
Definition at line 63 of file i386/kernel/vm86.c. Referenced by save_v86_state(). |
|
|
Definition at line 37 of file i386/kernel/vm86.c. Referenced by handle_vm86_fault(), and handle_vm86_trap(). |
|
|
Definition at line 286 of file i386/kernel/vm86.c. References VEFLAGS, and VIF_MASK. Referenced by do_int(), and handle_vm86_fault(). |
|
|
Definition at line 291 of file i386/kernel/vm86.c. References TF_MASK. Referenced by do_debug(), and do_int(). |
|
||||||||||||||||||||
|
Definition at line 504 of file i386/kernel/vm86.c. References AH, BIOSSEG, clear_IF(), clear_TF(), get_user, get_vflags(), IP, is_revectored(), KVM86, pushw, return_to_32bit(), SP, and VM86_INTx. Referenced by bottom_half_interrupt(), handle_vm86_fault(), and handle_vm86_trap(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 210 of file i386/kernel/vm86.c. References __asm__(), AC_MASK, CPU_286, CPU_386, CPU_486, ID_MASK, IOPL_MASK, long, mark_screen_rdonly(), NT_MASK, SAFE_MASK, unlock_kernel, VEFLAGS, VM86_SCREEN_BITMAP, and VM_MASK. Referenced by sys_vm86(), and sys_vm86old(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 760 of file i386/kernel/vm86.c. References ALLOWED_SIGS, CAP_SYS_ADMIN, capable, current, EINVAL, EPERM, free_vm86_irq(), get_and_reset_irq(), handle_irq_zombies(), irq, request_irq(), ret, VM86_FREE_IRQ, VM86_GET_AND_RESET_IRQ, VM86_GET_IRQ_BITS, VM86_IRQNAME, and VM86_REQUEST_IRQ. Referenced by sys_vm86(). Here is the call graph for this function: ![]() |
|
|
|
|
|
Definition at line 702 of file i386/kernel/vm86.c. References free_irq(). Referenced by do_vm86_irq_handling(), handle_irq_zombies(), and release_x86_irqs(). Here is the call graph for this function: ![]() |
|
|
Definition at line 744 of file i386/kernel/vm86.c. References bit, cli, current, restore_flags, and save_flags. Referenced by do_vm86_irq_handling(). |
|
|
Definition at line 312 of file i386/kernel/vm86.c. References current, IF_MASK, RETURN_MASK, VEFLAGS, and VIF_MASK. Referenced by do_int(), and handle_vm86_fault(). |
|
|
Definition at line 733 of file i386/kernel/vm86.c. References free_vm86_irq(), i, and task_valid(). Referenced by do_vm86_irq_handling(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 558 of file i386/kernel/vm86.c. References CHECK_IF_IN_TRAP, clear_IF(), do_int(), get_vflags(), IP, ip, popb, popl, popw, pushl, pushw, return_to_32bit(), set_IF(), set_vflags_long(), set_vflags_short(), SP, sp, VM86_FAULT_RETURN, VM86_INTx, VM86_UNKNOWN, and VMPI. Referenced by cache_flush_denied(), and do_general_protection(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 534 of file i386/kernel/vm86.c. References current, do_int(), PT_PTRACED, return_to_32bit(), send_sig(), SIGTRAP, SP, spin_lock_irqsave, spin_unlock_irqrestore, VM86_TRAP, and VMPI. Referenced by do_debug(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 683 of file i386/kernel/vm86.c. References cli, lock_kernel, out, restore_flags, save_flags, send_sig(), and unlock_kernel. Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 321 of file i386/kernel/vm86.c. References __asm__(). Referenced by do_int(). Here is the call graph for this function: ![]() |
|
|
Definition at line 92 of file i386/kernel/vm86.c. References flush_tlb, i, pgd_bad, pgd_clear, pgd_none, pgd_offset, pmd_bad, pmd_clear, pmd_none, pmd_offset, printk, pte_offset, pte_present, pte_wrprotect, and set_pte. Referenced by do_sys_vm86(). |
|
|
Definition at line 725 of file i386/kernel/vm86.c. References free_vm86_irq(), and i. Referenced by release_thread(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 267 of file i386/kernel/vm86.c. References __asm__(), current, pt_regs::eax, save_v86_state(), and unlock_kernel. Referenced by do_int(), handle_vm86_fault(), handle_vm86_trap(), and set_IF(). Here is the call graph for this function: ![]() |
|
|
Definition at line 66 of file i386/kernel/vm86.c. References copy_to_user, current, do_exit(), KVM86, lock_kernel, printk, put_user, ret, set_flags, SIGSEGV, tmp, unlock_kernel, VEFLAGS, VIF_MASK, VM86_REGS_SIZE1, and VM86_REGS_SIZE2. Referenced by return_to_32bit(). Here is the call graph for this function: ![]() |
|
|
Definition at line 279 of file i386/kernel/vm86.c. References return_to_32bit(), VEFLAGS, VIF_MASK, VIP_MASK, and VM86_STI. Referenced by handle_vm86_fault(), set_vflags_long(), and set_vflags_short(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 296 of file i386/kernel/vm86.c. References current, IF_MASK, SAFE_MASK, set_flags, set_IF(), and VEFLAGS. Referenced by handle_vm86_fault(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 304 of file i386/kernel/vm86.c. References current, IF_MASK, SAFE_MASK, set_flags, set_IF(), and VFLAGS. Referenced by handle_vm86_fault(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 160 of file i386/kernel/vm86.c. References copy_from_user, current, do_sys_vm86(), do_vm86_irq_handling(), EFAULT, EPERM, lock_kernel, out, vm86plus_struct::regs, ret, tmp, unlock_kernel, VM86_FREE_IRQ, VM86_GET_AND_RESET_IRQ, VM86_GET_IRQ_BITS, VM86_PLUS_INSTALL_CHECK, VM86_REGS_SIZE1, and VM86_REQUEST_IRQ. Here is the call graph for this function: ![]() |
|
|
Definition at line 129 of file i386/kernel/vm86.c. References copy_from_user, current, do_sys_vm86(), EFAULT, EPERM, lock_kernel, memset, out, vm86_struct::regs, ret, tmp, unlock_kernel, and VM86_REGS_SIZE1. Here is the call graph for this function: ![]() |
|
|
Definition at line 709 of file i386/kernel/vm86.c. References p, read_lock, read_unlock, ret, and tasklist_lock. Referenced by handle_irq_zombies(). |
|
|
Definition at line 677 of file i386/kernel/vm86.c. Referenced by mxser_interrupt(). |
|
|
|