Commit Graph

14 Commits

Author SHA1 Message Date
Geoffroy Van Cutsem 79892f911d misc: adjust code for gcc-10
The latest gcc 10.x changes the default to '-fno-common'. This causes a couple
of build failures in ACRN. This patch changes the default behaviour to
'-fcommon' for the 'acrnprobe' tool and fixes the 'hv_prebuild' codebase.

More details on that change can be found here:
https://gcc.gnu.org/gcc-10/porting_to.html

Tracked-On: #5553
Tracked-On: #5549
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-11-30 14:45:27 +08:00
David B. Kinder dd0fe54141 doc: Spelling and grammar tweaks
Did a partial run of ACRN documents through Acrolinx to catch additional
spelling and grammar fixes missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-09-26 08:50:49 -07:00
Naveen Saini b919122c34 use variables for installation directories.
Don't hardcode install paths. Instead of hardcoding where binaries are
installed, add variables that installer can override.

Tracked-On: #4864

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2020-06-05 15:25:12 +08:00
Yin Fengwei 345cb77376 crashlog: fix build issue under latest clearlinux
gcc in latest clearlinux enabled the pointer-sign warning as
default. This breaks the acrn-crashlog build.

Make acrn-crashlog build issue fixed by convert to correct
pointer type.

Tracked-On: #4636
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2020-04-20 14:54:33 +08:00
Naveen Saini fc5292e354 acrnprobe: avoid race condition
main.c is compiled while version.h being generated. This will
result following error:

| main.c: In function 'main':
| main.c:95:5: error: 'AP_MAJOR_VERSION' undeclared (first use in this function)
|    95 |     AP_MAJOR_VERSION, AP_MINOR_VERSION,
|       |     ^~~~~~~~~~~~~~~~
| main.c:95:5: note: each undeclared identifier is reported only once for each function it appears in
| main.c:95:23: error: 'AP_MINOR_VERSION' undeclared (first use in this function)
|    95 |     AP_MAJOR_VERSION, AP_MINOR_VERSION,
|       |                       ^~~~~~~~~~~~~~~~
| main.c:96:5: error: 'AP_BUILD_VERSION' undeclared (first use in this function)
|    96 |     AP_BUILD_VERSION, AP_BUILD_USER,
|       |     ^~~~~~~~~~~~~~~~
| main.c:96:23: error: 'AP_BUILD_USER' undeclared (first use in this function)
|    96 |     AP_BUILD_VERSION, AP_BUILD_USER,
|       |                       ^~~~~~~~~~~~~
| main.c:97:5: error: 'AP_BUILD_TIME' undeclared (first use in this function)
|    97 |     AP_BUILD_TIME);
|       |     ^~~~~~~~~~~~~

Similar issues observed with usercrash too.

To fix this, add version.h header as dependency, to make sure
it is generated successfully.

Tracked-On: #4590

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2020-04-16 21:49:18 +08:00
Deb Taylor ba5099e69f Doc: Content edits to the acrntrace README file.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-12-16 16:25:15 -05:00
Kaige Fu 0bf03b411e acrntrace: Set FLAG_CLEAR_BUF by default
Normally, we care more about the current trace data than
buffered old data. So, this patch set FLAG_CLEAR_BUF by
default and adds one new option '-r' to unset the FLAG_CLEAR_BUF
if we want to capture the buffered old data.

---
  v1 -> v2:
  Add 'deprecated' mark to '-c' option

Tracked-On: #4175
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-12-10 15:11:12 +08:00
Kaige Fu 9e9e1f61ad acrntrace: Add opt to specify the cpus where we should capture the data
This patch adds one new option '-a' to specify the cpus where we should
capture the trace data. If the this option is not set or set with wrong
optarg, we will capture the trace data of all possible cpus.

The set of the cpus can be specified as A,B,C, or A-C, or A,D-F, and so on.

Tracked-On: #4175
Acked-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-12-10 15:11:12 +08:00
Kaige Fu 366f4be454 acrntrace: Use correct format for total run time
It is better to output it using float instead of int. Otherwise, we will
get '0 sec' for total run time if it is less than one second.

Tracked-On: #4175
Acked-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-12-10 15:11:12 +08:00
Kaige Fu 1e192f05d7 acrntrace: break when finding the matching key
The key in the list is unique. So, it is better to break the loop
when find the matching key instead of traversing the whole list.

Tracked-On: #4175
Acked-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-12-10 15:11:12 +08:00
Kaige Fu 9655b9de15 acrntrace: Fix the incorrect total vmexit cnt issue
Originally, we assume that the vmenter will sit at the first line
of the trace file. But if the vmexit comes earlier than vmenter.
The total vmexit cnt will be set as 0 by the first vmenter.

This patch fixes the issue by:
   - Search the trace file to find the first vmexit entry and start to analyze here
     and mark the TSC_BEGIN as the tsc of this vmexit.
   - Inc the total vmexit cnt by 1 when meet the vmexit entry.
   - Calc the vmexit duration when meet the vmenter in pair with the last vmexit.

Tracked-On: #4175
Acked-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-12-10 15:11:12 +08:00
Kaige Fu aedd2c70e7 acrntrace: parse leaf and subleaf of cpuid
We have changed the cpuid trace-entry in HV to trace
the leaf and subleaf of cpuid. This patch modifies the
format accordingly.

Tracked-On: #4175
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-12-03 16:34:14 +08:00
xiaojin2 780a53a175 tools: acrn-crashlog: refine crash complete code
This patch is to remove unused info in server.c

Tracked-On: #3787
Signed-off-by: xiaojin2 <xiaojing.liu@intel.com>
Reviewed-by: Liu, Xinwu <xinwu.liu@intel.com>
Acked-by: CHEN Gang <gang.c.chen@intel.com>
2019-10-16 10:41:46 +08:00
Terry Zou a9c38a5cfb HV:Acrn-hypvervisor Root Directory Clean-up and create misc/ folder for Acrn daemons, services and tools.
This patch is to clean-up acrn-hypervisor root directory, targt only 5 folders under acrn-hypervisor:1.hypervisor,2.devicemodel,3.misc,4.doc,5.build

Tracked-On: #3482
Signed-off-by: Terry Zou <terry.zou@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-07-29 22:58:24 +08:00