Xen Test Framework
Data Structures | Enumerations | Functions | Variables
main.c File Reference

PV IOPL Emulation - PV IOPL Emulation More...

#include <xtf.h>
+ Include dependency graph for main.c:

Go to the source code of this file.

Data Structures

struct  insn
 
struct  test
 

Enumerations

enum  mode { KERN , USER , KERN , USER }
 

Functions

static unsigned long stub_cli (void)
 
static unsigned long stub_user_cli (void)
 
static unsigned long stub_outb (void)
 
static unsigned long stub_user_outb (void)
 
static void run_test (const struct test *t)
 
static void hypercall_set_iopl (unsigned int iopl)
 
static bool hypercall_should_fault (enum mode mode, unsigned int iopl)
 
static void nop (void)
 
static void vmassist_set_iopl (unsigned int iopl)
 
static bool vmassist_should_fault (enum mode mode, unsigned int iopl)
 
void test_main (void)
 To be implemented by each test, as its entry point. More...
 

Variables

const char test_title [] = "PV IOPL emulation"
 The title of the test. More...
 
static const struct insn insns []
 
static const struct test hypercall
 
static const struct test vmassist
 

Detailed Description

PV IOPL Emulation - PV IOPL Emulation

Definition in file main.c.

Enumeration Type Documentation

◆ mode

enum mode
Enumerator
KERN 
USER 
KERN 
USER 

Definition at line 102 of file main.c.

Function Documentation

◆ stub_cli()

static unsigned long stub_cli ( void  )
static

Definition at line 45 of file main.c.

+ Here is the call graph for this function:

◆ stub_user_cli()

static unsigned long stub_user_cli ( void  )
static

Definition at line 57 of file main.c.

+ Here is the call graph for this function:

◆ stub_outb()

static unsigned long stub_outb ( void  )
static

Definition at line 69 of file main.c.

+ Here is the call graph for this function:

◆ stub_user_outb()

static unsigned long stub_user_outb ( void  )
static

Definition at line 81 of file main.c.

+ Here is the call graph for this function:

◆ run_test()

static void run_test ( const struct test t)
static

Definition at line 108 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hypercall_set_iopl()

static void hypercall_set_iopl ( unsigned int  iopl)
static

Definition at line 143 of file main.c.

+ Here is the call graph for this function:

◆ hypercall_should_fault()

static bool hypercall_should_fault ( enum mode  mode,
unsigned int  iopl 
)
static

Definition at line 148 of file main.c.

+ Here is the call graph for this function:

◆ nop()

static void nop ( void  )
static

Definition at line 178 of file main.c.

+ Here is the caller graph for this function:

◆ vmassist_set_iopl()

static void vmassist_set_iopl ( unsigned int  iopl)
static

Definition at line 179 of file main.c.

+ Here is the call graph for this function:

◆ vmassist_should_fault()

static bool vmassist_should_fault ( enum mode  mode,
unsigned int  iopl 
)
static

Definition at line 190 of file main.c.

◆ test_main()

void test_main ( void  )

To be implemented by each test, as its entry point.

Todo:
Implement better command line infrastructure, but this will do for now.

Definition at line 209 of file main.c.

+ Here is the call graph for this function:

Variable Documentation

◆ test_title

const char test_title[] = "PV IOPL emulation"

The title of the test.

Definition at line 43 of file main.c.

◆ insns

const struct insn insns[]
static
Initial value:
= {
{ "cli", stub_cli, stub_user_cli, },
{ "outb", stub_outb, stub_user_outb, },
}
static unsigned long stub_outb(void)
Definition: main.c:69
static unsigned long stub_user_outb(void)
Definition: main.c:81
static unsigned long stub_cli(void)
Definition: main.c:45
static unsigned long stub_user_cli(void)
Definition: main.c:57

◆ hypercall

const struct test hypercall
static
Initial value:
= {
.set_iopl = hypercall_set_iopl,
.should_fault = hypercall_should_fault,
}
static bool hypercall_should_fault(enum mode mode, unsigned int iopl)
Definition: main.c:148
static void hypercall_set_iopl(unsigned int iopl)
Definition: main.c:143

Definition at line 173 of file main.c.

◆ vmassist

const struct test vmassist
static
Initial value:
= {
.set_iopl = vmassist_set_iopl,
.should_fault = vmassist_should_fault,
}
static bool vmassist_should_fault(enum mode mode, unsigned int iopl)
Definition: main.c:190
static void vmassist_set_iopl(unsigned int iopl)
Definition: main.c:179

Definition at line 204 of file main.c.