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

XSA-296 More...

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

Go to the source code of this file.

Macros

#define COND(_32, _64)   _64
 
#define __TEST_CS64   (GDTE_AVAIL0 << 3)
 

Functions

void do_evtchn (struct cpu_regs *regs)
 May be implemented by a guest to handle Event Channel upcalls. More...
 
void test_main (void)
 To be implemented by each test, as its entry point. More...
 

Variables

const char test_title [] = "XSA-296 PoC"
 The title of the test. More...
 
static intpte_t t1 [L1_PT_ENTRIES]
 
static intpte_t t2 [L1_PT_ENTRIES]
 
static xen_vcpu_guest_context_t vcpu1_ctx
 

Detailed Description

XSA-296

Definition in file main.c.

Macro Definition Documentation

◆ COND

#define COND (   _32,
  _64 
)    _64

Definition at line 36 of file main.c.

◆ __TEST_CS64

#define __TEST_CS64   (GDTE_AVAIL0 << 3)

Definition at line 40 of file main.c.

Function Documentation

◆ do_evtchn()

void do_evtchn ( struct cpu_regs *  regs)

May be implemented by a guest to handle Event Channel upcalls.

Definition at line 48 of file main.c.

+ Here is the call graph for this function:

◆ 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.

At the time of writing, Xen doesn't correctly handle invlpg while running in shadow mode on AMD Gen1 hardware lacking decode assistance. For this test, we simply care that Xen doesn't crash.

Definition at line 65 of file main.c.

+ Here is the call graph for this function:

Variable Documentation

◆ test_title

const char test_title[] = "XSA-296 PoC"

The title of the test.

Definition at line 30 of file main.c.

◆ t1

intpte_t t1[L1_PT_ENTRIES]
static

Definition at line 42 of file main.c.

◆ t2

intpte_t t2[L1_PT_ENTRIES]
static

Definition at line 43 of file main.c.

◆ vcpu1_ctx

xen_vcpu_guest_context_t vcpu1_ctx
static
Initial value:
= {
.flags = VGCF_IN_KERNEL,
}
#define VGCF_IN_KERNEL
Definition: xen.h:47

Definition at line 44 of file main.c.