cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/include/asm/vm86.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_VM86_H

#define _ASM_X86_VM86_H

#include <asm/ptrace.h>
#include <uapi/asm/vm86.h>

/*
 * This is the (kernel) stack-layout when we have done a "SAVE_ALL" from vm86
 * mode - the main change is that the old segment descriptors aren't
 * useful any more and are forced to be zero by the kernel (and the
 * hardware when a trap occurs), and the real segment descriptors are
 * at the end of the structure. Look at ptrace.h to see the "normal"
 * setup. For user space layout see 'struct vm86_regs' above.
 */


struct kernel_vm86_regs {
/*
 * normal regs, with special meaning for the segment descriptors..
 */
	
struct pt_regs pt;
/*
 * these are specific to v86 mode:
 */
	

unsigned short es, __esh;
	

unsigned short ds, __dsh;
	

unsigned short fs, __fsh;
	

unsigned short gs, __gsh;
};


struct vm86 {
	
struct vm86plus_struct __user *user_vm86;
	
struct pt_regs regs32;
	
unsigned long veflags;
	
unsigned long veflags_mask;
	
unsigned long saved_sp0;

	
unsigned long flags;
	
unsigned long screen_bitmap;
	
unsigned long cpu_type;
	
struct revectored_struct int_revectored;
	
struct revectored_struct int21_revectored;
	
struct vm86plus_info_struct vm86plus;
};

#ifdef CONFIG_VM86

void handle_vm86_fault(struct kernel_vm86_regs *, long);
int handle_vm86_trap(struct kernel_vm86_regs *, long, int);
void save_v86_state(struct kernel_vm86_regs *, int);

struct task_struct;


#define free_vm86(t) do {                            \
        struct thread_struct *__t = (t);                \
        if (__t->vm86 != NULL) {                        \
                kfree(__t->vm86);                       \
                __t->vm86 = NULL;                       \
        }                                               \
} while (0)

/*
 * Support for VM86 programs to request interrupts for
 * real mode hardware drivers:
 */

#define FIRST_VM86_IRQ		 3

#define LAST_VM86_IRQ		15


static inline int invalid_vm86_irq(int irq) { return irq < FIRST_VM86_IRQ || irq > LAST_VM86_IRQ; }

Contributors

PersonTokensPropCommitsCommitProp
Ingo Molnar19100.00%1100.00%
Total19100.00%1100.00%

void release_vm86_irqs(struct task_struct *); #else #define handle_vm86_fault(a, b) #define release_vm86_irqs(a)
static inline int handle_vm86_trap(struct kernel_vm86_regs *a, long b, int c) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Matt Mackall21100.00%1100.00%
Total21100.00%1100.00%


static inline void save_v86_state(struct kernel_vm86_regs *a, int b) { }

Contributors

PersonTokensPropCommitsCommitProp
Brian Gerst14100.00%1100.00%
Total14100.00%1100.00%

#define free_vm86(t) do { } while(0) #endif /* CONFIG_VM86 */ #endif /* _ASM_X86_VM86_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Brian Gerst8233.47%631.58%
Linus Torvalds (pre-git)6024.49%421.05%
Matt Mackall4618.78%15.26%
Ingo Molnar3614.69%15.26%
Harvey Harrison72.86%15.26%
Jeremy Fitzhardinge52.04%15.26%
H. Peter Anvin31.22%15.26%
David Howells20.82%15.26%
Cyrill V. Gorcunov20.82%15.26%
Greg Kroah-Hartman10.41%15.26%
Vegard Nossum10.41%15.26%
Total245100.00%19100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.