clear-pkgs-linux-iot-lts2018/0993-SEP-Bug-Fix-for-VMM-sy...

72 lines
2.9 KiB
Diff
Raw Permalink Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Manisha <manisha.chinthapally@intel.com>
Date: Tue, 19 Feb 2019 20:26:50 +0000
Subject: [PATCH] SEP Bug Fix for VMM symbol resolution
VMM symbol is not loading correctly in Vtune.
This patch fix symbol loading issue and
changed the macro name from OS_ID_ACORN to OS_ID_ACRN
Tracked-on: PKT-1745
Signed-off-by: Lim, Min Yeol <min.yeol.lim@intel.com>
Signed-off-by: Manisha <manisha.chinthapally@intel.com>
---
drivers/platform/x86/sepdk/include/lwpmudrv_defines.h | 2 +-
drivers/platform/x86/sepdk/sep/linuxos.c | 6 ++++--
drivers/platform/x86/sepdk/sep/lwpmudrv.c | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/sepdk/include/lwpmudrv_defines.h b/drivers/platform/x86/sepdk/include/lwpmudrv_defines.h
2020-10-27 02:14:06 +08:00
index 8346ea72d587..0120aeea9631 100644
--- a/drivers/platform/x86/sepdk/include/lwpmudrv_defines.h
+++ b/drivers/platform/x86/sepdk/include/lwpmudrv_defines.h
@@ -511,7 +511,7 @@ extern "C" {
#define OS_ID_MODEM 1
#define OS_ID_ANDROID 2
#define OS_ID_SECVM 3
-#define OS_ID_ACORN 0xFFFF
+#define OS_ID_ACRN 0xFFFF
#define PERF_HW_VER4 (5)
#if defined(__cplusplus)
diff --git a/drivers/platform/x86/sepdk/sep/linuxos.c b/drivers/platform/x86/sepdk/sep/linuxos.c
2020-10-27 02:14:06 +08:00
index 1f877e6e4bc8..3ef35ac66b49 100755
--- a/drivers/platform/x86/sepdk/sep/linuxos.c
+++ b/drivers/platform/x86/sepdk/sep/linuxos.c
@@ -161,7 +161,9 @@ static S32 linuxos_Load_Image_Notify_Routine(char *name, U64 base, U32 size,
MODULE_RECORD_parent_pid(mra) = parent_pid;
MODULE_RECORD_osid(mra) = osid;
MODULE_RECORD_pid_rec_index(mra) = pid;
-
+ if (osid == OS_ID_ACRN) {
+ MODULE_RECORD_unknown_load_address(mra) = 1;
+ }
if (kernel_modules) {
MODULE_RECORD_tsc(mra) = 0;
MR_unloadTscSet(mra, (U64)(0xffffffffffffffffLL));
@@ -328,7 +330,7 @@ static S32 linuxos_Map_Kernel_Modules(void)
linuxos_Load_Image_Notify_Routine(
"VMM", 0x0, (U32)0xffffffffffffffffLL, 0, 0, 0,
LOPTS_1ST_MODREC | LOPTS_GLOBAL_MODULE | LOPTS_EXE, exec_mode,
- -1, MR_SEG_NUM, 1, OS_ID_ACORN);
+ -1, MR_SEG_NUM, 1, OS_ID_ACRN);
#endif
for (modules = (struct list_head *)(THIS_MODULE->list.prev);
diff --git a/drivers/platform/x86/sepdk/sep/lwpmudrv.c b/drivers/platform/x86/sepdk/sep/lwpmudrv.c
2020-10-27 02:14:06 +08:00
index 799c61cde378..130081d5346b 100644
--- a/drivers/platform/x86/sepdk/sep/lwpmudrv.c
+++ b/drivers/platform/x86/sepdk/sep/lwpmudrv.c
@@ -5993,7 +5993,7 @@ static OS_STATUS lwpmudrv_Get_Sample_Drop_Info(IOCTL_ARGS args)
&& size < MAX_SAMPLE_DROP_NODES; i++) {
if (stats[i].samples_logged || stats[i].samples_dropped) {
SAMPLE_DROP_INFO_drop_info(
- &req_sample_drop_info, size).os_id = OS_ID_ACORN;
+ &req_sample_drop_info, size).os_id = OS_ID_ACRN;
SAMPLE_DROP_INFO_drop_info(
&req_sample_drop_info, size).cpu_id = i;
SAMPLE_DROP_INFO_drop_info(
--
https://clearlinux.org