6 #ifndef MSRIO_HPP_INCLUDE
7 #define MSRIO_HPP_INCLUDE
48 uint64_t write_mask) = 0;
60 virtual int add_read(
int cpu_idx, uint64_t offset) = 0;
68 virtual int add_read(
int cpu_idx, uint64_t offset,
int batch_ctx) = 0;
90 virtual int add_write(
int cpu_idx, uint64_t offset) = 0;
100 virtual int add_write(
int cpu_idx, uint64_t offset,
int batch_ctx) = 0;
106 uint64_t write_mask) = 0;
120 virtual uint64_t
sample(
int batch_idx)
const = 0;
127 virtual uint64_t
sample(
int batch_idx,
int batch_ctx)
const = 0;
136 static std::unique_ptr<MSRIO>
make_unique(
int driver_type);
virtual void read_batch(int batch_ctx)=0
Batch read a set of MSRs configured by a previous call to the batch_config() method....
virtual uint64_t read_msr(int cpu_idx, uint64_t offset)=0
Read from a single MSR on a CPU.
virtual uint64_t sample(int batch_idx) const =0
Read the full 64-bit value of the MSR that was previously added to the MSRIO with add_read()....
virtual uint64_t system_write_mask(uint64_t offset)=0
Return the system write mask for a given offset.
virtual int add_read(int cpu_idx, uint64_t offset, int batch_ctx)=0
Extend the set of MSRs for batch read with a single offset.
virtual int create_batch_context(void)=0
Add a new batch context to the set of managed contexts.
virtual int add_read(int cpu_idx, uint64_t offset)=0
Extend the set of MSRs for batch read with a single offset. Note: uses the default batch context.
virtual void write_msr(int cpu_idx, uint64_t offset, uint64_t raw_value, uint64_t write_mask)=0
Write to a single MSR on a CPU.
virtual uint64_t sample(int batch_idx, int batch_ctx) const =0
Read the full 64-bit value of the MSR that was previously added to the MSRIO with add_read()....
virtual int add_write(int cpu_idx, uint64_t offset)=0
Add another offset to the list of MSRs to be written in batch. Note: uses the default batch context.
static std::unique_ptr< MSRIO > make_unique(int driver_type)
Returns a unique_ptr to a concrete object constructed using the underlying implementation.
Definition: MSRIO.cpp:30
virtual void write_batch(void)=0
Write all adjusted values. Note: uses the default batch context.
virtual void read_batch(void)=0
Batch read a set of MSRs configured by a previous call to the batch_config() method....
virtual void write_batch(int batch_ctx)=0
Write all adjusted values.
virtual void adjust(int batch_idx, uint64_t value, uint64_t write_mask, int batch_ctx)=0
Adjust a value that was previously added with the add_write() method.
virtual int add_write(int cpu_idx, uint64_t offset, int batch_ctx)=0
Add another offset to the list of MSRs to be written in batch.
m_driver_e
Definition: MSRIO.hpp:18
@ M_DRIVER_MSR
Definition: MSRIO.hpp:20
@ M_NUM_DRIVER
Definition: MSRIO.hpp:21
@ M_DRIVER_MSRSAFE
Definition: MSRIO.hpp:19
virtual void adjust(int batch_idx, uint64_t value, uint64_t write_mask)=0
Adjust a value that was previously added with the add_write() method. Note: uses the default batch co...