HV: Added Initial support for SEP/SOCWATCH profiling

This patch adds support to sep/socwatch profiling
     Adds 2 new files include/arch/x86/profiling.h and arch/x86/profiling.c
     which contains most of the implementation for profiling,most of the functions
     in profiling.c have dummy implementation and will be implemented in next patches

     a. cpu.c, Initial profiling setup is done as part of bsp_boot_post
  and cpu_secondary_post flow
     b. vmcall.c, New ioctl is added for performing profiling related
  operations in vmcall_vmexit_handler
	ioctl - HC_PROFILING_OPS
        function - hcall_profiling_ops()
     c. common/hypercall.c, hcall_profiling_ops() implementation.
     d. hv_main.c, In vcpu_thread calling profiling related functions
  to save vm context
     e. acrn_hv_defs.h, list all the profiling command types

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:
Chinthapally, Manisha
2018-10-22 12:29:21 -07:00
committed by wenlingz
parent 3010718d4a
commit 8ba333d275
14 changed files with 388 additions and 6 deletions

View File

@@ -72,6 +72,7 @@
#define HC_ID_DBG_BASE 0x60UL
#define HC_SETUP_SBUF BASE_HC_ID(HC_ID, HC_ID_DBG_BASE + 0x00UL)
#define HC_SETUP_HV_NPK_LOG BASE_HC_ID(HC_ID, HC_ID_DBG_BASE + 0x01UL)
#define HC_PROFILING_OPS BASE_HC_ID(HC_ID, HC_ID_DBG_BASE + 0x02UL)
/* Trusty */
#define HC_ID_TRUSTY_BASE 0x70UL
@@ -317,4 +318,15 @@ struct trusty_boot_param {
* @}
*/
enum profiling_cmd_type {
PROFILING_MSR_OPS = 0U,
PROFILING_GET_VMINFO,
PROFILING_GET_VERSION,
PROFILING_GET_CONTROL_SWITCH,
PROFILING_SET_CONTROL_SWITCH,
PROFILING_CONFIG_PMI,
PROFILING_CONFIG_VMSWITCH,
PROFILING_GET_PCPUID
};
#endif /* ACRN_HV_DEFS_H */