Xen Test Framework
|
Model Specific Register mnemonics and bit definitions. More...
#include <xtf/extable.h>
#include <xtf/types.h>
#include <xen/arch-x86/xen.h>
#include <arch/msr-index.h>
Go to the source code of this file.
Data Structures | |
union | msr_feature_control |
union | msr_vmx_basic |
struct | xtf_msr_consistency_test_data |
struct | xtf_msr_consistency_test_data::xtf_msr_consistency_test_vals |
Typedefs | |
typedef union msr_feature_control | msr_feature_control_t |
typedef union msr_vmx_basic | msr_vmx_basic_t |
Functions | |
static uint64_t | rdmsr (uint32_t idx) |
Thin wrapper around an rdmsr instruction. More... | |
static bool | rdmsr_safe (uint32_t idx, uint64_t *val) |
Wrapper around rdmsr which safely catches #GP[0]. More... | |
static void | wrmsr (uint32_t idx, uint64_t val) |
Thin wrapper around an wrmsr instruction. More... | |
static bool | wrmsr_safe (uint32_t idx, uint64_t val) |
Wrapper around wrmsr which safely catches #GP[0]. More... | |
void | xtf_msr_consistency_test (const struct xtf_msr_consistency_test_data *t) |
Run consistency tests as described by t . More... | |
Model Specific Register mnemonics and bit definitions.
Misc C-level infrastructure for MSRs.
Definition in file msr.h.
typedef union msr_feature_control msr_feature_control_t |
typedef union msr_vmx_basic msr_vmx_basic_t |
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.