profiling: fix the profiling tool crash by page faults

Profiling tools are broken, which cause page faults during collection.
The issue happens by enabling SMAP recently. Therefore,
we use stac() and clac() to allow access to buffers allocated by guest.

Tacked-On: #2157
Signed-off-by: Min Lim <min.yeol.lim@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Min Lim
2018-12-26 22:29:49 -08:00
committed by wenlingz
parent a177d75ed3
commit 9c27ed1090
2 changed files with 15 additions and 9 deletions

View File

@@ -291,6 +291,7 @@ struct profiling_info_wrapper {
struct vm_switch_trace vm_switch_trace;
socwatch_state soc_state;
struct sw_msr_op_info sw_msr_op_info;
spinlock_t sw_lock;
} __aligned(8);
int32_t profiling_get_version_info(struct acrn_vm *vm, uint64_t addr);