Xen Test Framework
Functions
msr.c File Reference

Library logic for MSRs. More...

#include <xtf/report.h>
#include <xtf/test.h>
#include <arch/msr.h>
+ Include dependency graph for msr.c:

Go to the source code of this file.

Functions

static uint64_t force_rdmsr (uint32_t idx)
 
static void force_wrmsr (uint32_t idx, uint64_t val)
 
void xtf_msr_consistency_test (const struct xtf_msr_consistency_test_data *t)
 Run consistency tests as described by t. More...
 

Detailed Description

Library logic for MSRs.

Definition in file msr.c.

Function Documentation

◆ force_rdmsr()

static uint64_t force_rdmsr ( uint32_t  idx)
static

Definition at line 11 of file msr.c.

+ Here is the caller graph for this function:

◆ force_wrmsr()

static void force_wrmsr ( uint32_t  idx,
uint64_t  val 
)
static

Definition at line 22 of file msr.c.

+ Here is the caller graph for this function:

◆ xtf_msr_consistency_test()

void xtf_msr_consistency_test ( const struct xtf_msr_consistency_test_data t)

Run consistency tests as described by t.

Some MSRs may be passed directly through to guests for performance reasons. This introduces an extra level of complexity for context switching an emulation purposes.

To check that synchronisation is working properly, t describes an MSR and an array of predicated values. For each value where the predicate is true, mix regular and forced reads and writes to check that values written via one mechanism become visible via the other.

This logic is only applicable to read/write MSRs which expect to retain their written values on subsequent reads, and for values which will succeed when written.

Definition at line 29 of file msr.c.

+ Here is the call graph for this function: