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

Invlpg Handling invlpg instruction handling More...

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

Go to the source code of this file.

Data Structures

struct  tlb_refill_fs_test
 

Macros

#define _ASM_MAYBE_XEN_FEP
 

Functions

static bool ex_fail (struct cpu_regs *regs, const struct extable_entry *ex)
 Custom extable handler, linked to all invlpg instruction which are expected not to fault. More...
 
static bool test_ad (uint64_t pte)
 Are both the Accessed and Dirty bits are set in a pagetable entry? More...
 
static unsigned int invlpg_refill (void)
 
static unsigned int invlpg_fs_refill (void)
 
static void run_tlb_refill_test (unsigned int(*fn)(void), unsigned int expect)
 
static void test_tlb_refill (void)
 
static void invlpg_checked (unsigned long linear)
 
static void invlpg_fs_checked (unsigned long linear)
 
static void test_no_fault (void)
 
void test_main (void)
 To be implemented by each test, as its entry point. More...
 

Variables

const char test_title [] = "Invlpg tests"
 The title of the test. More...
 
static const struct tlb_refill_fs_test tlb_refill_fs_tests []
 

Detailed Description

Invlpg Handling invlpg instruction handling

Definition in file main.c.

Macro Definition Documentation

◆ _ASM_MAYBE_XEN_FEP

#define _ASM_MAYBE_XEN_FEP

Definition at line 91 of file main.c.

Function Documentation

◆ ex_fail()

static bool ex_fail ( struct cpu_regs *  regs,
const struct extable_entry ex 
)
static

Custom extable handler, linked to all invlpg instruction which are expected not to fault.

Definition at line 98 of file main.c.

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

◆ test_ad()

static bool test_ad ( uint64_t  pte)
static

Are both the Accessed and Dirty bits are set in a pagetable entry?

Definition at line 109 of file main.c.

+ Here is the caller graph for this function:

◆ invlpg_refill()

static unsigned int invlpg_refill ( void  )
static

Definition at line 114 of file main.c.

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

◆ invlpg_fs_refill()

static unsigned int invlpg_fs_refill ( void  )
static

Definition at line 137 of file main.c.

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

◆ run_tlb_refill_test()

static void run_tlb_refill_test ( unsigned int(*)(void)  fn,
unsigned int  expect 
)
static

Definition at line 160 of file main.c.

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

◆ test_tlb_refill()

static void test_tlb_refill ( void  )
static

Definition at line 223 of file main.c.

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

◆ invlpg_checked()

static void invlpg_checked ( unsigned long  linear)
static

Definition at line 243 of file main.c.

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

◆ invlpg_fs_checked()

static void invlpg_fs_checked ( unsigned long  linear)
static

Definition at line 251 of file main.c.

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

◆ test_no_fault()

static void test_no_fault ( void  )
static

Definition at line 259 of file main.c.

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

◆ test_main()

void test_main ( void  )

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

Definition at line 294 of file main.c.

+ Here is the call graph for this function:

Variable Documentation

◆ test_title

const char test_title[] = "Invlpg tests"

The title of the test.

Definition at line 85 of file main.c.

◆ tlb_refill_fs_tests

const struct tlb_refill_fs_test tlb_refill_fs_tests[]
static
Initial value:
=
{
{ "(base 0x0)", 1,
INIT_GDTE_SYM(0, 0xfffff, P, S, G, A, DATA, DPL0, B, W),
},
{ "(base 0x0, limit 0x1)", 1,
INIT_GDTE_SYM(0, 1, P, S, A, DATA, DPL0, B, W),
},
{ "(base 0x1000)", 2,
INIT_GDTE_SYM(0x1000, 0xfffff, P, S, G, A, DATA, DPL0, B, W),
},
{ "(base 0x1000, limit 0x1001)", 2,
INIT_GDTE_SYM(0x1000, 0x1001, P, S, A, DATA, DPL0, B, W),
},
}
#define INIT_GDTE_SYM(base, limit,...)
Initialiser for an LDT/GDT entry using SEG_ATTR_ mnemonics.