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

XSA-472 Reference TSC page leak More...

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

Go to the source code of this file.

Macros

#define HV_X64_MSR_REFERENCE_TSC   0x40000021
 
#define MAX_ITER   100
 
#define NR_APS   2
 

Functions

static void ap_thread (void)
 
static bool launch_aps (void)
 
void test_main (void)
 To be implemented by each test, as its entry point. More...
 

Variables

const char test_title [] = "XSA-472-3 PoC"
 The title of the test. More...
 
static uint8_t tsc_page [PAGE_SIZE]
 
struct {
   unsigned int   ready1
 
   unsigned int   ready2
 
   bool   start1
 
   bool   start2
 
wait
 

Detailed Description

XSA-472 Reference TSC page leak

Definition in file main.c.

Macro Definition Documentation

◆ HV_X64_MSR_REFERENCE_TSC

#define HV_X64_MSR_REFERENCE_TSC   0x40000021

Definition at line 20 of file main.c.

◆ MAX_ITER

#define MAX_ITER   100

Definition at line 23 of file main.c.

◆ NR_APS

#define NR_APS   2

Definition at line 25 of file main.c.

Function Documentation

◆ ap_thread()

static void ap_thread ( void  )
static

Definition at line 40 of file main.c.

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

◆ launch_aps()

static bool launch_aps ( void  )
static

Definition at line 62 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.

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 115 of file main.c.

+ Here is the call graph for this function:

Variable Documentation

◆ test_title

const char test_title[] = "XSA-472-3 PoC"

The title of the test.

Definition at line 16 of file main.c.

◆ tsc_page

uint8_t tsc_page[PAGE_SIZE]
static

Definition at line 18 of file main.c.

◆ ready1

unsigned int ready1

Definition at line 34 of file main.c.

◆ ready2

unsigned int ready2

Definition at line 35 of file main.c.

◆ start1

bool start1

Definition at line 36 of file main.c.

◆ start2

bool start2

Definition at line 37 of file main.c.

◆ 

volatile struct { ... } wait