mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
HV:Added support to perform MSR operation on all cpus
MSR operations are directly done based on physical cpu's profiling_handle_msrops: Per cpu function, performs the MSR operations (Read, Read clear,Write) For SOCWATCH/ power tool, generates MSR samples. profiling_msr_ops_all_cpus : Receives required information for MSR operations from guest, SMP calls profiling_handle_msrops, Copies the information collected to guest Tracked-On: projectacrn#1409 Acked-by: Eddie Dong <eddie.dong@intel.com> Signed-off-by: Chinthapally, Manisha <manisha.chinthapally@intel.com>
This commit is contained in:
committed by
wenlingz
parent
1786f6222a
commit
fc8f9d792c
@@ -18,6 +18,13 @@
|
||||
#define COLLECT_PROFILE_DATA 0
|
||||
#define COLLECT_POWER_DATA 1
|
||||
|
||||
#define SOCWATCH_MSR_OP 100U
|
||||
|
||||
enum MSR_CMD_STATUS {
|
||||
MSR_OP_READY = 0,
|
||||
MSR_OP_REQUESTED,
|
||||
MSR_OP_HANDLED
|
||||
};
|
||||
enum MSR_CMD_TYPE {
|
||||
MSR_OP_NONE = 0,
|
||||
MSR_OP_READ,
|
||||
@@ -105,6 +112,13 @@ struct profiling_vm_info_list {
|
||||
struct profiling_vm_info vm_list[MAX_NR_VMS];
|
||||
};
|
||||
|
||||
struct sw_msr_op_info {
|
||||
uint64_t core_msr[MAX_MSR_LIST_NUM];
|
||||
uint32_t cpu_id;
|
||||
uint32_t valid_entries;
|
||||
uint16_t sample_id;
|
||||
};
|
||||
|
||||
struct profiling_msr_op {
|
||||
/* value to write or location to write into */
|
||||
uint64_t value;
|
||||
@@ -116,6 +130,12 @@ struct profiling_msr_op {
|
||||
uint8_t reg_type;
|
||||
};
|
||||
|
||||
struct profiling_msr_ops_list {
|
||||
int32_t collector_id;
|
||||
uint32_t num_entries;
|
||||
int32_t msr_op_state;
|
||||
struct profiling_msr_op entries[MAX_MSR_LIST_NUM];
|
||||
};
|
||||
struct profiling_pmi_config {
|
||||
uint32_t num_groups;
|
||||
uint32_t trigger_count;
|
||||
@@ -185,9 +205,11 @@ struct sep_state {
|
||||
* Wrapper containing SEP sampling/profiling related data structures
|
||||
*/
|
||||
struct profiling_info_wrapper {
|
||||
struct profiling_msr_ops_list *msr_node;
|
||||
struct sep_state sep_state;
|
||||
ipi_commands ipi_cmd;
|
||||
socwatch_state soc_state;
|
||||
struct sw_msr_op_info sw_msr_op_info;
|
||||
} __aligned(8);
|
||||
|
||||
int32_t profiling_get_version_info(struct vm *vm, uint64_t addr);
|
||||
|
||||
Reference in New Issue
Block a user