author int64 658 755k | date stringlengths 19 19 | timezone int64 -46,800 43.2k | hash stringlengths 40 40 | message stringlengths 5 490 | mods list | language stringclasses 20
values | license stringclasses 3
values | repo stringlengths 5 68 | original_message stringlengths 12 491 |
|---|---|---|---|---|---|---|---|---|---|
528,706 | 29.11.2018 08:12:32 | -28,800 | f71370ad817b373401bd1d6a4454a9123c2369d6 | dm: storage: rename delete to discard
To keep consistent with kernal code, change delete to discard.
Acked-by: Yu Wang | [
{
"change_type": "MODIFY",
"old_path": "devicemodel/hw/block_if.c",
"new_path": "devicemodel/hw/block_if.c",
"diff": "@@ -75,7 +75,7 @@ enum blockop {\nBOP_READ,\nBOP_WRITE,\nBOP_FLUSH,\n- BOP_DELETE\n+ BOP_DISCARD\n};\nenum blockstat {\n@@ -99,7 +99,7 @@ struct blockif_ctxt {\nint magic;\nint fd;\n... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | dm: storage: rename delete to discard
To keep consistent with kernal code, change delete to discard.
Tracked-On: #2011
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com> |
528,652 | 14.12.2018 19:11:09 | 28,800 | 3515ca1e654e39fdbe7b0024e767905ed087f837 | hv: vpci: fix "Procedure has more than one exit point"
IEC 61508,ISO 26262 standards highly recommend single-exit rule.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/dm/vpci/msi.c",
"new_path": "hypervisor/dm/vpci/msi.c",
"diff": "@@ -118,6 +118,7 @@ static int32_t vmsi_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t by\nbool message_changed = false;\nbool enable;\nuint32_t msgctrl;\n+ int32_t ret = -E... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vpci: fix "Procedure has more than one exit point"
IEC 61508,ISO 26262 standards highly recommend single-exit rule.
Tracked-On: #861
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,654 | 17.12.2018 22:21:58 | -28,800 | 78e9a84f397b8393f2d6f52c073508ae54fffd1d | hv: add fast string enhanced rep movsb/stosb check on initial
The ACRN suppose the CPU support fast string enhanced rep. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu.c",
"new_path": "hypervisor/arch/x86/cpu.c",
"diff": "@@ -78,6 +78,24 @@ static inline bool get_monitor_cap(void)\nreturn false;\n}\n+static inline bool is_fast_string_erms_supported_and_enabled(void)\n+{\n+ bool ret = false;\n+ uint32_... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: add fast string enhanced rep movsb/stosb check on initial
The ACRN suppose the CPU support fast string enhanced rep.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,654 | 17.12.2018 21:52:52 | -28,800 | f9897c6f4ec8f43b40be96a1352bb0c0d370e508 | hv: refine memset
Use enhanced rep fast-string operation to refine memset. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/lib/memory.c",
"new_path": "hypervisor/lib/memory.c",
"diff": "@@ -367,33 +367,22 @@ void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen_arg)\nreturn d;\n}\n-void *memset(void *base, uint8_t v, size_t n)\n+static inline void memset_erms(... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: refine memset
Use enhanced rep fast-string operation to refine memset.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,654 | 17.12.2018 22:55:09 | -28,800 | 235ad0ff5dee271011bf75579cef7ff726705bf9 | hv: refine memcpy_s
Use enhanced rep fast-string operation to refine memcpy_s.
And assume that the destination and the source would not overlap. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/include/lib/rtl.h",
"new_path": "hypervisor/include/lib/rtl.h",
"diff": "@@ -28,7 +28,7 @@ char *strncpy_s(char *d_arg, size_t dmax, const char *s_arg, size_t slen_arg);\nchar *strchr(char *s_arg, char ch);\nsize_t strnlen_s(const char *str_arg, siz... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: refine memcpy_s
Use enhanced rep fast-string operation to refine memcpy_s.
And assume that the destination and the source would not overlap.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,783 | 18.12.2018 13:56:51 | -28,800 | 65a7be8f52783d4470b15cad6dad47c891d6016c | hv:refine alloc_vm_id api
Fix violation "procedure has more than one exit point"
for this api.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vm.c",
"new_path": "hypervisor/arch/x86/guest/vm.c",
"diff": "@@ -16,19 +16,19 @@ static struct acrn_vm vm_array[CONFIG_MAX_VM_NUM] __aligned(PAGE_SIZE);\nstatic uint64_t vmid_bitmap;\n-/* used for vmid allocation. And this means the ... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:refine alloc_vm_id api
Fix violation "procedure has more than one exit point"
for this api.
Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,676 | 18.12.2018 15:28:33 | -28,800 | 6aa4227277ac0fdc2aac617ab93304811124d501 | fix "Procedure has more than one exit point."
Misra C requires Function must have only 1 return entry.
Fixed it by use "if ... else ..." format.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/common/hypercall.c",
"new_path": "hypervisor/common/hypercall.c",
"diff": "@@ -945,27 +945,28 @@ int32_t hcall_get_cpu_pm_state(struct acrn_vm *vm, uint64_t cmd, uint64_t param)\n{\nuint16_t target_vm_id;\nstruct acrn_vm *target_vm;\n+ int32_t ret;\... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | fix "Procedure has more than one exit point."
Misra C requires Function must have only 1 return entry.
Fixed it by use "if ... else ..." format.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,768 | 18.12.2018 21:27:36 | -28,800 | b8ffac8bac8d92aa711331c31a7c7c4639366a55 | hv:fix possible buffer overflow in 'ptirq_get_intr_data()'
- 'buffer'with size of 'buffer_cnt', will overflow in
next loop if 'index == buffer_cnt - 1'.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/common/ptdev.c",
"new_path": "hypervisor/common/ptdev.c",
"diff": "@@ -229,7 +229,7 @@ uint32_t ptirq_get_intr_data(const struct acrn_vm *target_vm, uint64_t *buffer,\nbuffer[index + 1U] = entry->intr_count;\nindex += 2U;\n- if (index >= buffer_cnt)... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:fix possible buffer overflow in 'ptirq_get_intr_data()'
- 'buffer'with size of 'buffer_cnt', will overflow in
next loop if 'index == buffer_cnt - 1'.
Tracked-On: #1252
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,675 | 10.12.2018 14:55:33 | -28,800 | 6830619d08b54e47ecd975a875974c020be5e84f | modulization: combine vmx_caps into cpu_caps
in cpu_caps.c, the vmx_caps & cpu_caps can be combined.
Changes to be committed:
modified: arch/x86/cpu_caps.c
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu_caps.c",
"new_path": "hypervisor/arch/x86/cpu_caps.c",
"diff": "#define VAPIC_FEATURE_POST_INTR (1U << 4U)\n#define VAPIC_FEATURE_VX2APIC_MODE (1U << 5U)\n-static struct vmx_capability {\n- uint32_t ept;\n- uint32_t vpid;\n-} vmx_caps;\... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | modulization: combine vmx_caps into cpu_caps
in cpu_caps.c, the vmx_caps & cpu_caps can be combined.
Changes to be committed:
modified: arch/x86/cpu_caps.c
Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,675 | 10.12.2018 14:58:28 | -28,800 | 63773db4374c14c54c31bab09e721efffc590ed9 | change get_monitor_cap to has_monitor_cap
has_monitor_cap is more suitable name
v2:
rename to has_monitor_cap
Changes to be committed:
modified: arch/x86/cpu.c
modified: arch/x86/cpu_caps.c
modified: include/arch/x86/cpu_caps.h
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu.c",
"new_path": "hypervisor/arch/x86/cpu.c",
"diff": "@@ -367,7 +367,7 @@ static void print_hv_banner(void)\n/* wait until *sync == wake_sync */\nvoid wait_sync_change(uint64_t *sync, uint64_t wake_sync)\n{\n- if (get_monitor_cap()) {\n... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | change get_monitor_cap to has_monitor_cap
has_monitor_cap is more suitable name
v2:
- rename to has_monitor_cap
Changes to be committed:
modified: arch/x86/cpu.c
modified: arch/x86/cpu_caps.c
modified: include/arch/x86/cpu_caps.h
Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acke... |
528,675 | 14.12.2018 13:21:11 | -28,800 | 7c8b767192057fa0a134f4ec783dee2ec2c47915 | refine in cpu_caps.c
we should not use print function before tsc setup
is_ept_supported is internal API
add is_apicv_supported to check apicv feature
rename some functions to verb+obj format or better name
Changes to be committed:
modified: arch/x86/cpu.c
modified: arch/x86/cpu_caps.c
modified: include/arch/x86/c... | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu.c",
"new_path": "hypervisor/arch/x86/cpu.c",
"diff": "@@ -102,9 +102,9 @@ void init_cpu_pre(uint16_t pcpu_id)\n/* Get CPU capabilities thru CPUID, including the physical address bit\n* limit which is required for initializing paging.\n*... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | refine in cpu_caps.c
- we should not use print function before tsc setup
- is_ept_supported is internal API
- add is_apicv_supported to check apicv feature
- rename some functions to verb+obj format or better name
Changes to be committed:
modified: arch/x86/cpu.c
modified: arch/x86/cpu_caps.c
modified: inclu... |
528,675 | 17.12.2018 16:51:25 | -28,800 | e22217fd8f8fb40307468ec3afec03dea18c1a3d | refine apicv capability check
deinfe rule like below:
must support TPR shadow and apicv access
based on above, check apicv register support
based on above, check virtual interrupt delivery and post
interrupt support
Changes to be committed:
modified: arch/x86/cpu_caps.c | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu_caps.c",
"new_path": "hypervisor/arch/x86/cpu_caps.c",
"diff": "@@ -218,27 +218,32 @@ static void detect_ept_cap(void)\nstatic void detect_apicv_cap(void)\n{\n- uint8_t features;\n+ uint8_t features = 0U;\nuint64_t msr_val;\nmsr_val = m... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | refine apicv capability check
deinfe rule like below:
- must support TPR shadow and apicv access
- based on above, check apicv register support
- based on above, check virtual interrupt delivery and post
interrupt support
Changes to be committed:
modified: arch/x86/cpu_caps.c
Tracked-On: #1842
Signed-off-by: Ja... |
528,675 | 18.12.2018 09:12:23 | -28,800 | 0ad6da998cac27c95149928ab835656084bff602 | make detect_cpu_cap as internal function
call detect_cpu_cap in init_cpu_capabilities | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu.c",
"new_path": "hypervisor/arch/x86/cpu.c",
"diff": "@@ -116,8 +116,6 @@ void init_cpu_pre(uint16_t pcpu_id)\npanic(\"x2APIC is not present!\");\n}\n- detect_cpu_cap();\n-\nearly_init_lapic();\ninit_percpu_lapic_id();\n"
},
{
"... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | make detect_cpu_cap as internal function
call detect_cpu_cap in init_cpu_capabilities
Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> |
528,675 | 18.12.2018 09:55:48 | -28,800 | 689c1c28c5c8e97748daf24c8ececc9467663d76 | function name change in init.c
bsp_boot_init to init_primary_cpu
bsp_boot_post to init_primary_cpu_post | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/boot/cpu_primary.S",
"new_path": "hypervisor/arch/x86/boot/cpu_primary.S",
"diff": "@@ -162,7 +162,7 @@ after:\nmov %eax,%gs // Was 32bit POC CLS\n/* continue with chipset level initialization */\n- call bsp_boot_init\n+ call init_primary_c... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | function name change in init.c
- bsp_boot_init to init_primary_cpu
- bsp_boot_post to init_primary_cpu_post
Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> |
528,675 | 18.12.2018 14:18:38 | -28,800 | 97132acccf8aca40f424f633437fdfb22b06a6e6 | Make ibrs_type as internal variable
add get_ibrs_type API to get ibrs type.
this patch fix Misra C violation:
filename:/hypervisor/arch/x86/security.c function:None offset:19:
reason:Variable should be declared static. : ibrs_type | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vcpu.c",
"new_path": "hypervisor/arch/x86/guest/vcpu.c",
"diff": "@@ -407,6 +407,7 @@ int32_t run_vcpu(struct acrn_vcpu *vcpu)\nstruct run_context *ctx =\n&vcpu->arch.contexts[vcpu->arch.cur_context].run_ctx;\nint64_t status = 0;\n+ i... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | Make ibrs_type as internal variable
add get_ibrs_type API to get ibrs type.
this patch fix Misra C violation:
filename:/hypervisor/arch/x86/security.c function:None offset:19:
reason:Variable should be declared static. : ibrs_type
Tracked-On: #861
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> |
528,654 | 17.12.2018 23:32:57 | -28,800 | 5b467269bed56823f44ebeb1fe0ec2a782e8b05e | hv: lib: remove memchr
No one uses it and it's some duplicated with strchr.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/include/lib/rtl.h",
"new_path": "hypervisor/include/lib/rtl.h",
"diff": "@@ -21,7 +21,6 @@ union u_qword {\n/* Function prototypes */\nvoid udelay(uint32_t us);\n-void *memchr(const void *void_s, int32_t c, size_t n);\nint32_t strcmp(const char *s1_... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: lib: remove memchr
No one uses it and it's some duplicated with strchr.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,654 | 18.12.2018 00:15:10 | -28,800 | b5e0efca82278b9da552377c345d1e4345fceaa9 | hv: coding style: refine memory.c
1) Variable names shall start with a lower-case letter.
2) Multiplication and division come before addition and subtraction.
Everything else should be in parentheses.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/lib/memory.c",
"new_path": "hypervisor/lib/memory.c",
"diff": "#include <hypervisor.h>\n-/************************************************************************/\n-/* Memory pool declaration (block size = CONFIG_MALLOC_ALIGN) */\n-/***************... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine memory.c
1) Variable names shall start with a lower-case letter.
2) Multiplication and division come before addition and subtraction.
Everything else should be in parentheses.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,783 | 18.12.2018 15:44:17 | -28,800 | 64a463000f9cb89768027ecc7986013bb3a110c8 | hv:refine prepare_vm0 api
fix MISRA-C violation "procedure has more than one exit point"
for this api
change start_vm to void type since it is always return 0
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vm.c",
"new_path": "hypervisor/arch/x86/guest/vm.c",
"diff": "@@ -242,7 +242,7 @@ int32_t shutdown_vm(struct acrn_vm *vm)\n/**\n* * @pre vm != NULL\n*/\n-int32_t start_vm(struct acrn_vm *vm)\n+void start_vm(struct acrn_vm *vm)\n{\nstr... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:refine prepare_vm0 api
-- fix MISRA-C violation "procedure has more than one exit point"
for this api
-- change start_vm to void type since it is always return 0
Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,652 | 14.12.2018 20:04:41 | 28,800 | 4c28e98dc4fc88875dbba71e0bb6aa4ae5d04ca7 | hv: refine a few functions to only one exit point
IEC 61508,ISO 26262 standards highly recommend single-exit rule.
7C: Procedure has more than one exit point.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vmtrr.c",
"new_path": "hypervisor/arch/x86/guest/vmtrr.c",
"diff": "@@ -44,10 +44,11 @@ static uint32_t get_index_of_fixed_mtrr(uint32_t msr)\nfor (i = 0U; i < FIXED_RANGE_MTRR_NUM; i++) {\nif (fixed_mtrr_map[i].msr == msr) {\n- retur... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: refine a few functions to only one exit point
IEC 61508,ISO 26262 standards highly recommend single-exit rule.
7C: Procedure has more than one exit point.
Tracked-On: #861
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,768 | 17.12.2018 21:10:24 | -28,800 | 03262a96cf8acd85fdc6e6d8fa6072fe818273da | hv: refine coding style for ucode.c
- reduce exit points for 'acrn_update_ucode()' function.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/ucode.c",
"new_path": "hypervisor/arch/x86/guest/ucode.c",
"diff": "@@ -34,7 +34,7 @@ static inline size_t get_ucode_data_size(const struct ucode_header *uhdr)\nvoid acrn_update_ucode(struct acrn_vcpu *vcpu, uint64_t v)\n{\n- uint64_t... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: refine coding style for ucode.c
- reduce exit points for 'acrn_update_ucode()' function.
Tracked-On: #2095
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,804 | 14.12.2018 16:33:14 | -28,800 | f81fb21a583f3a137fefeba2b07713fdb3f13725 | HV: modularization to refine pm related code.
1. move out vm related code from arch/pm.
2. remove unnecssary global variables.
3. keep the global variables as static, not used
by other modules directlly.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/pm.c",
"new_path": "hypervisor/arch/x86/guest/pm.c",
"diff": "@@ -106,7 +106,7 @@ void vm_setup_cpu_state(struct acrn_vm *vm)\nint32_t vm_load_pm_s_state(struct acrn_vm *vm)\n{\n#ifdef ACPI_INFO_VALIDATED\n- vm->pm.sx_state_data = (st... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | HV: modularization to refine pm related code.
1. move out vm related code from arch/pm.
2. remove unnecssary global variables.
3. keep the global variables as static, not used
by other modules directlly.
Tracked-On: #1842
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com... |
528,652 | 14.12.2018 11:55:06 | 28,800 | d133f95d977fbad90007a3b7e7d5c538e94cdd4e | hv: fix MISRA-C violations "Pointer param should be declared pointer to const."
MIRSA-C requires the const qualifier should be applied to pointer parameters
that address data not subject to change in rule 120D.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vmsr.c",
"new_path": "hypervisor/arch/x86/guest/vmsr.c",
"diff": "@@ -547,7 +547,7 @@ int32_t wrmsr_vmexit_handler(struct acrn_vcpu *vcpu)\nreturn err;\n}\n-void update_msr_bitmap_x2apic_apicv(struct acrn_vcpu *vcpu)\n+void update_msr... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: fix MISRA-C violations "Pointer param should be declared pointer to const."
MIRSA-C requires the const qualifier should be applied to pointer parameters
that address data not subject to change in rule 120D.
Tracked-On #861
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,801 | 18.12.2018 15:00:59 | -28,800 | 9a051e7ab293f41ab2274c6b86e7da564ae6118e | hv: vmcs: fix MISRA-C violations related to style
This patch fixes the MISRA-C violations in arch/x86/vmcs.c.
* add the missing space before or after binary operator
* add the required brackets for logical conjunctions
* remove the redefined MACROs
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vmcs.c",
"new_path": "hypervisor/arch/x86/vmcs.c",
"diff": "#include <hypervisor.h>\n#include <cpu.h>\n-#define DR7_INIT_VALUE (0x400UL)\n-\nstatic uint64_t cr0_host_mask;\nstatic uint64_t cr0_always_on_mask;\nstatic uint64_t cr0_always_off... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vmcs: fix MISRA-C violations related to style
This patch fixes the MISRA-C violations in arch/x86/vmcs.c.
* add the missing space before or after binary operator
* add the required brackets for logical conjunctions
* remove the redefined MACROs
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com... |
528,801 | 18.12.2018 15:15:45 | -28,800 | 4618a6b17d0417acff607cacd2a952171efe5b35 | hv: vmcs: fix MISRA-C violations related to pointer
This patch fixes the MISRA-C violations in arch/x86/vmcs.c
and arch/x86/vmx.c.
* add the required 'const' for pointer param if the object
pointed by the pointer is not modified
* remove the unnecessary cast on pointer
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vmcs.c",
"new_path": "hypervisor/arch/x86/vmcs.c",
"diff": "@@ -814,7 +814,7 @@ static void init_entry_ctrl(const struct acrn_vcpu *vcpu)\nexec_vmwrite32(VMX_ENTRY_INSTR_LENGTH, 0U);\n}\n-static void init_exit_ctrl(struct acrn_vcpu *vcpu)\n... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vmcs: fix MISRA-C violations related to pointer
This patch fixes the MISRA-C violations in arch/x86/vmcs.c
and arch/x86/vmx.c.
* add the required 'const' for pointer param if the object
pointed by the pointer is not modified
* remove the unnecessary cast on pointer
Tracked-On: #861
Signed-off-by: Shiqing Ga... |
528,801 | 18.12.2018 15:55:35 | -28,800 | e283e77424633259d3405244dc4b9ef6e3dcbdd9 | hv: vmcs: fix MISRA-C violations related to multiple exits
This patch fixes the MISRA-C violations in arch/x86/vmcs.c.
* make the function have only one exit point
v1 -> v2:
* update 'is_cr0_write_valid' and 'is_cr4_write_valid'
use `if ... else` rather than check 'ret' value
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vmcs.c",
"new_path": "hypervisor/arch/x86/vmcs.c",
"diff": "@@ -17,6 +17,7 @@ static uint64_t cr4_always_off_mask;\nbool is_vmx_disabled(void)\n{\nuint64_t msr_val;\n+ bool ret = false;\n/* Read Feature ControL MSR */\nmsr_val = msr_read(MS... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vmcs: fix MISRA-C violations related to multiple exits
This patch fixes the MISRA-C violations in arch/x86/vmcs.c.
* make the function have only one exit point
v1 -> v2:
* update 'is_cr0_write_valid' and 'is_cr4_write_valid'
use `if ... else` rather than check 'ret' value
Tracked-On: #861
Signed-off-by: Shi... |
528,665 | 18.12.2018 11:01:36 | 0 | eff945911071c9e582d2b2ab0dc43787eb49943a | HV: x86: fix "Procedure has more than one exit point"
IEC 61508, ISO 26262 standards highly recommand single-exit rule.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/ioapic.c",
"new_path": "hypervisor/arch/x86/ioapic.c",
"diff": "@@ -262,13 +262,15 @@ uint8_t irq_to_pin(uint32_t irq)\nuint32_t pin_to_irq(uint8_t pin)\n{\nuint32_t i;\n+ uint32_t irq = IRQ_INVALID;\nfor (i = 0U; i < nr_gsi; i++) {\nif (gs... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | HV: x86: fix "Procedure has more than one exit point"
IEC 61508, ISO 26262 standards highly recommand single-exit rule.
Tracked-On: #861
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,665 | 18.12.2018 13:14:58 | 0 | 2fefff34a7fa37505f46bac61f4ef6d50ab0274b | HV: x86: fix "Global variable should be declared const"
Gloabal variable should be declared constant wherever possible to avoid unintentional
modification.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/ioapic.c",
"new_path": "hypervisor/arch/x86/ioapic.c",
"diff": "@@ -57,7 +57,7 @@ static uint64_t legacy_irq_trigger_mode[NR_LEGACY_IRQ] = {\nIOAPIC_RTE_TRGREDG, /* IRQ15*/\n};\n-uint8_t pic_ioapic_pin_map[NR_LEGACY_PIN] = {\n+const uint8_t... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | HV: x86: fix "Global variable should be declared const"
Gloabal variable should be declared constant wherever possible to avoid unintentional
modification.
Tracked-On: #861
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,654 | 19.12.2018 06:15:56 | -28,800 | 38c117841f83edc94c6e0f6c387830adcc729ef9 | hv: coding style: refine mmu.c
1) Separate ASM and C code inserts as pure procedures with a defined interface.
2) Fix procedure has more than one exit point. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu_caps.c",
"new_path": "hypervisor/arch/x86/cpu_caps.c",
"diff": "@@ -329,24 +329,22 @@ static inline bool cpu_has_vmx_unrestricted_guest_cap(void)\nstatic int32_t check_vmx_mmu_cap(void)\n{\n+ int32_t ret = 0;\n+\nif (!cpu_has_vmx_ept_ca... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine mmu.c
1) Separate ASM and C code inserts as pure procedures with a defined interface.
2) Fix procedure has more than one exit point.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,731 | 18.12.2018 10:11:13 | -28,800 | ccda4595bc75d3ca76cd2d2ca81fc29b6c4199a7 | dm: passthru: add error handling if msix table init failed
Release the resource reqeusted during msix table init if error occurs.
Change the type of the second arg of deinit_msix_table from pci_vdev to ptdev,
to align with init_msix_table. | [
{
"change_type": "MODIFY",
"old_path": "devicemodel/hw/pci/passthrough.c",
"new_path": "devicemodel/hw/pci/passthrough.c",
"diff": "@@ -102,6 +102,7 @@ struct passthru_dev {\nint table_size; /* page aligned size */\nvoid *table_pages;\nint table_offset; /* page aligned */\n+ bool ptirq_allocated;\n}... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | dm: passthru: add error handling if msix table init failed
Release the resource reqeusted during msix table init if error occurs.
Change the type of the second arg of deinit_msix_table from pci_vdev to ptdev,
to align with init_msix_table.
Tracked-On: #1782
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: ... |
528,731 | 18.12.2018 22:22:10 | -28,800 | 83ebd4323925fe72439328eb1f4f3f93f58aba33 | hv: ptdev: fix MISRAC violations
This patch fixs MISRAC violations in common/ptdev.c and include/common/ptdev.h
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/common/ptdev.c",
"new_path": "hypervisor/common/ptdev.c",
"diff": "@@ -24,12 +24,12 @@ static inline uint16_t ptirq_alloc_entry_id(void)\nwhile (id < CONFIG_MAX_PT_IRQ_ENTRIES) {\nif (!bitmap_test_and_set_lock((id & 0x3FU), &ptirq_entry_bitmaps[id >... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: ptdev: fix MISRAC violations
This patch fixs MISRAC violations in common/ptdev.c and include/common/ptdev.h
Tracked-On: #861
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,647 | 18.12.2018 17:02:24 | -28,800 | 08cf8f648c2879c69b79589412dcc97b5514f5de | hv: lapic: fix MISRA-C violation of potential numeric overflow
This patch fixes the MISRA-C violations in arch/x86/lapic.c, change local variable from
uint32_t to uint64_t to avoid potential numeric overflow.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/lapic.c",
"new_path": "hypervisor/arch/x86/lapic.c",
"diff": "@@ -154,15 +154,15 @@ static void restore_lapic(const struct lapic_regs *regs)\nvoid suspend_lapic(void)\n{\n- uint32_t val;\n+ uint64_t val;\nsaved_lapic_base_msr.value = msr_re... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: lapic: fix MISRA-C violation of potential numeric overflow
This patch fixes the MISRA-C violations in arch/x86/lapic.c, change local variable from
uint32_t to uint64_t to avoid potential numeric overflow.
Tracked-On: #861
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,647 | 18.12.2018 21:59:41 | -28,800 | 530388db30b4cd489475387bc8544a07691fb848 | hv: irq: fix MISRA-C violations in irq.c and idt.h
This commit fixed following violations:
Procedure has more than one exit point: free_irq_vector/request_irq/dispatch_interrupt
goto detected: dispatch_interrupt
Pointer param should be declared pointer to const: fixup_idt
basic type declaration used: fixup_idt
Acked-by... | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/irq.c",
"new_path": "hypervisor/arch/x86/irq.c",
"diff": "@@ -136,16 +136,11 @@ static void free_irq_vector(uint32_t irq)\nuint32_t vr;\nuint64_t rflags;\n- if (irq >= NR_IRQS) {\n- return;\n- }\n-\n+ if (irq < NR_IRQS) {\ndesc = &irq_desc_... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: irq: fix MISRA-C violations in irq.c and idt.h
This commit fixed following violations:
- Procedure has more than one exit point: free_irq_vector/request_irq/dispatch_interrupt
- goto detected: dispatch_interrupt
- Pointer param should be declared pointer to const: fixup_idt
- basic type declaration used: fixup_idt... |
528,676 | 19.12.2018 11:30:09 | -28,800 | 1caf58f2218e3e3b582477785528b2607d2fdcfe | hv:clean io_request.c misra violations
Clean the io_request.c's violations reported by the misra tools.
V1->V2:
remove violations which checked with NULL.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/common/io_request.c",
"new_path": "hypervisor/common/io_request.c",
"diff": "@@ -73,7 +73,7 @@ void reset_vm_ioreqs(struct acrn_vm *vm)\n}\n}\n-static inline bool has_complete_ioreq(struct acrn_vcpu *vcpu)\n+static inline bool has_complete_ioreq(con... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:clean io_request.c misra violations
Clean the io_request.c's violations reported by the misra tools.
V1->V2:
remove violations which checked with NULL.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,804 | 12.12.2018 22:09:53 | -28,800 | 23c2166aa9d37a44315d8dbb51c5da1e6217af10 | HV: change serial PCI cfg to bus:dev.func format
before PCI_BDF uses its hex value like "0xC2" for "0:18.2" to
configure, now use "0:18.2" directly to make it more readable
and easier to configure.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/Kconfig",
"new_path": "hypervisor/arch/x86/Kconfig",
"diff": "@@ -159,14 +159,12 @@ choice\nIf this is not selected, the serial port is disabled. This is the\ndefault.\n-\nconfig SERIAL_PCI\nbool \"PCI\"\nhelp\nSelect this if the serial por... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | HV: change serial PCI cfg to bus:dev.func format
before PCI_BDF uses its hex value like "0xC2" for "0:18.2" to
configure, now use "0:18.2" directly to make it more readable
and easier to configure.
Tracked-On: #2031
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,804 | 07.12.2018 19:39:59 | -28,800 | b319e654c1b5b1f4a0887ebad63c0cf92cb751d8 | HV: fix bug adapt uart mmio to bdf for HV cmdline
now PCI uart changed from MMIO configure to BDF configure,
it need change this interface too; this interface is used
to dynamically configure debug uart by HV command line.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/bsp/uefi/cmdline.c",
"new_path": "hypervisor/bsp/uefi/cmdline.c",
"diff": "static const char * const cmd_list[] = {\n\"uart=disabled\", /* to disable uart */\n\"uart=port@\", /* like uart=port@0x3F8 */\n- \"uart=mmio@\", /*like: uart=mmio@0xFC000000... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | HV: fix bug adapt uart mmio to bdf for HV cmdline
now PCI uart changed from MMIO configure to BDF configure,
it need change this interface too; this interface is used
to dynamically configure debug uart by HV command line.
Tracked-On: #2031
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Anthony Xu <anth... |
528,801 | 20.12.2018 08:46:14 | -28,800 | 2c6c383e549420a7781da573a93c24de98f961d0 | hv: string: fix MISRA-C violations related to break
This patch fixes the MISRA-C violations in lib/string.c
* make the while loop have only one `break`
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/lib/string.c",
"new_path": "hypervisor/lib/string.c",
"diff": "@@ -228,33 +228,39 @@ char *strncpy_s(char *d_arg, size_t dmax, const char *s_arg, size_t slen_arg)\ndest_avail = dmax;\nwhile (dest_avail > 0U) {\n+ bool complete = false;\n+\nif (overl... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: string: fix MISRA-C violations related to break
This patch fixes the MISRA-C violations in lib/string.c
* make the while loop have only one `break`
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,801 | 20.12.2018 09:43:40 | -28,800 | 32d6aa97f97a64b09388a7aa553d80402910324d | hv: string: fix MISRA-C violations related to style
This patch fixes the MISRA-C violations in lib/string.c
* add the required brackets for logical conjunctions
* replace the basic type `long` with defined type `int64_t`
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/include/lib/rtl.h",
"new_path": "hypervisor/include/lib/rtl.h",
"diff": "@@ -29,7 +29,7 @@ size_t strnlen_s(const char *str_arg, size_t maxlen_arg);\nvoid *memset(void *base, uint8_t v, size_t n);\nvoid *memcpy_s(void *d, size_t dmax, const void *s,... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: string: fix MISRA-C violations related to style
This patch fixes the MISRA-C violations in lib/string.c
* add the required brackets for logical conjunctions
* replace the basic type `long` with defined type `int64_t`
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Anthony Xu <antho... |
528,801 | 20.12.2018 11:08:27 | -28,800 | 714814f97e6c078073a81dd819fb1c0d02800641 | hv: move `atoi` and `strtol_dec` to debug directory
This patch moves `atoi` and `strtol_dec` to debug directory
since they are only used by code under debug directory.
Acked-by: Anthony Xu | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "hypervisor/debug/string.c",
"diff": "+/*\n+ * Copyright (C) 2018 Intel Corporation. All rights reserved.\n+ *\n+ * SPDX-License-Identifier: BSD-3-Clause\n+ */\n+\n+#include <hypervisor.h>\n+\n+/*\n+ * Convert a string to a long integer - decimal... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: move `atoi` and `strtol_dec` to debug directory
This patch moves `atoi` and `strtol_dec` to debug directory
since they are only used by code under debug directory.
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,731 | 18.12.2018 20:50:23 | -28,800 | e19dcf5735bf8008ba6eaf66891ac9a2cf814621 | hv: assign: fix MISRA-C violations on implicit type conversion
This patch fixes the MISRA-C violations in arch/x86/assign.c
on implicit type conversion.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/assign.c",
"new_path": "hypervisor/arch/x86/assign.c",
"diff": "@@ -132,7 +132,7 @@ ptirq_build_physical_rte(struct acrn_vm *vm, struct ptirq_remapping_info *entry)\nunion ioapic_rte virt_rte;\nbool phys;\n- vioapic_get_rte(vm, virt_sid->in... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: assign: fix MISRA-C violations on implicit type conversion
This patch fixes the MISRA-C violations in arch/x86/assign.c
on implicit type conversion.
Tracked-On: #861
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,731 | 18.12.2018 21:08:19 | -28,800 | e8b3e44fc0162b0cd9402ab8b05770e2e8f693b1 | hv: assign: fix MISRA-C violations on potential null pointer deference
This patch fix the MISRA-C violations in arch/x86/assign.c
on potential null pointer deference.
Also add a break in case statement.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/assign.c",
"new_path": "hypervisor/arch/x86/assign.c",
"diff": "@@ -470,22 +470,20 @@ void ptirq_softirq(uint16_t pcpu_id)\nif (entry->intr_type == PTDEV_INTR_INTX) {\nptirq_handle_intx(vm, entry);\n} else {\n+ if (msi != NULL) {\n/* TODO: ... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: assign: fix MISRA-C violations on potential null pointer deference
This patch fix the MISRA-C violations in arch/x86/assign.c
on potential null pointer deference.
Also add a break in case statement.
Tracked-On: #861
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,731 | 18.12.2018 20:26:01 | -28,800 | d48dc38780449c447fa78e70fd491b28d27ae0a9 | hv: assign: fix MISRA-C violations on multiple exits
This patch fixs the MISRA-C violations in arch/x86/assign.c
on multiple exits.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/assign.c",
"new_path": "hypervisor/arch/x86/assign.c",
"diff": "@@ -21,6 +21,7 @@ ptirq_lookup_entry_by_sid(uint32_t intr_type,\n{\nuint16_t idx;\nstruct ptirq_remapping_info *entry;\n+ struct ptirq_remapping_info *entry_found = NULL;\nfor ... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: assign: fix MISRA-C violations on multiple exits
This patch fixs the MISRA-C violations in arch/x86/assign.c
on multiple exits.
Tracked-On: #861
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,731 | 19.12.2018 11:25:45 | -28,800 | d5865632ec73e71246d07b4c31e9e02e78e18bf5 | hv: assign: remove added ptirq entries if fails to add all
When adding ptirq entries, either successes with all number of entries added or
fails with none entries addes.
So remove added ptirq entries if error occurs during the process.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/assign.c",
"new_path": "hypervisor/arch/x86/assign.c",
"diff": "@@ -755,6 +755,10 @@ int32_t ptirq_add_msix_remapping(struct acrn_vm *vm, uint16_t virt_bdf,\nvector_added++;\n}\n+ if (vector_added != vector_count) {\n+ ptirq_remove_msix_rem... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: assign: remove added ptirq entries if fails to add all
When adding ptirq entries, either successes with all number of entries added or
fails with none entries addes.
So remove added ptirq entries if error occurs during the process.
Tracked-On: #861
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Do... |
528,676 | 20.12.2018 10:15:54 | -28,800 | 7c2198c42290c0c30ec75e905b6e0386ca6bfe19 | hv: config.h fix "Nested comment found."
The config.h generated by kconfiglib,the header contain "https://"
which will cause the static scan tool report "Nested comment found."
Remove it.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "scripts/kconfig/generate_header.py",
"new_path": "scripts/kconfig/generate_header.py",
"diff": "@@ -76,6 +76,7 @@ def main():\nusage()\nsys.exit(1)\n+ header = \"/* Generated by Kconfiglib */\\n\"\nkconfig_path = sys.argv[1]\nif not os.path.isfile(kconfig_path... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: config.h fix "Nested comment found."
The config.h generated by kconfiglib,the header contain "https://"
which will cause the static scan tool report "Nested comment found."
Remove it.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,654 | 19.12.2018 22:20:08 | -28,800 | f27aa70fb55e39112f4ec0ae12d6db7cbe04249e | hv: coding style: refine page related
1) Fix procedure has more than one exit point.
2) Add some brackets to make logical conjunctions more readable.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/pagetable.c",
"new_path": "hypervisor/arch/x86/pagetable.c",
"diff": "@@ -125,7 +125,7 @@ static void modify_or_del_pde(const uint64_t *pdpte, uint64_t vaddr_start, uint6\npanic(\"invalid op, pde not present\");\n}\nif (pde_large(*pde) != 0... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine page related
1) Fix procedure has more than one exit point.
2) Add some brackets to make logical conjunctions more readable.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,801 | 19.12.2018 14:01:27 | -28,800 | c03bad1fefe7785a4147c8293b0bc656a4b45d8c | hv: io: fix MISRA-C violations related to style
This patch fixes the MISRA-C violations in arch/x86/io.c.
* add the required brackets for logical conjunctions
* add the required 'else' for 'if ... else if' case
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/io.c",
"new_path": "hypervisor/arch/x86/io.c",
"diff": "@@ -378,6 +378,8 @@ int32_t pio_instr_vmexit_handler(struct acrn_vcpu *vcpu)\nemulate_pio_post(vcpu, io_req);\n} else if (status == IOREQ_PENDING) {\nstatus = 0;\n+ } else {\n+ /* do n... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: io: fix MISRA-C violations related to style
This patch fixes the MISRA-C violations in arch/x86/io.c.
* add the required brackets for logical conjunctions
* add the required 'else' for 'if ... else if' case
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@inte... |
528,801 | 19.12.2018 15:04:26 | -28,800 | 56af4332e32b43009bb9bfd1c566bb3b6bc73be2 | hv: io: fix MISRA-C violations related to multiple exits
This patch fixes the MISRA-C violations in arch/x86/io.c.
* make the function have only one exit point
v1 -> v2:
* replace `ASSERT` with `pr_err`
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/io.c",
"new_path": "hypervisor/arch/x86/io.c",
"diff": "@@ -136,20 +136,14 @@ static void io_instr_dest_handler(struct io_request *io_req)\n*/\nvoid emulate_io_post(struct acrn_vcpu *vcpu)\n{\n- if (get_vhm_req_state(vcpu->vm, vcpu->vcpu_id... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: io: fix MISRA-C violations related to multiple exits
This patch fixes the MISRA-C violations in arch/x86/io.c.
* make the function have only one exit point
v1 -> v2:
* replace `ASSERT` with `pr_err`
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,783 | 19.12.2018 16:39:31 | -28,800 | 81a9de6067e627e0a77b7ecd37aaf466e222492d | hv:fix MISRA-C violations in create_vm
fix "more than one exit point" and "goto detected" violations
change prepare_vm0_memmap to void type
Add free_vm_id when create vm failed
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/guest.c",
"new_path": "hypervisor/arch/x86/guest/guest.c",
"diff": "@@ -463,7 +463,7 @@ int32_t copy_to_gva(struct acrn_vcpu *vcpu, void *h_ptr, uint64_t gva,\n* @pre vm != NULL\n* @pre is_vm0(vm) == true\n*/\n-int32_t prepare_vm0_mem... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:fix MISRA-C violations in create_vm
-- fix "more than one exit point" and "goto detected" violations
-- change prepare_vm0_memmap to void type
-- Add free_vm_id when create vm failed
Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,665 | 06.12.2018 16:13:35 | 0 | 1e3358fd924de481b7ff289580a32dde4a528879 | Debug: Add one hypercall to quary hardware info
acrntrace/log kernel modules will use this hypercall to fetch
pcpu num of hardware platform. Then, initialize driver accordingly. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/debug/hypercall.c",
"new_path": "hypervisor/debug/hypercall.c",
"diff": "@@ -122,6 +122,34 @@ static int32_t hcall_setup_hv_npk_log(struct acrn_vm *vm, uint64_t param)\nreturn 0;\n}\n+/**\n+ * @brief Get hardware related info\n+ *\n+ * @param vm Poi... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | Debug: Add one hypercall to quary hardware info
acrntrace/log kernel modules will use this hypercall to fetch
pcpu num of hardware platform. Then, initialize driver accordingly.
Tracked-On: #1775;#1776
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com> |
528,654 | 20.12.2018 18:59:58 | -28,800 | 5f0c093e57f0e25dead03038c501d7302f89f6a0 | hv: coding style: remove no real declaration for external variable
There is no no real declaration for these external variables. So just
remove them. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/include/arch/x86/gdt.h",
"new_path": "hypervisor/include/arch/x86/gdt.h",
"diff": "@@ -137,8 +137,6 @@ struct host_gdt_descriptor {\nstruct host_gdt *gdt;\n} __packed;\n-extern struct host_gdt HOST_GDT;\n-extern struct host_gdt_descriptor HOST_GDTR;... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: remove no real declaration for external variable
There is no no real declaration for these external variables. So just
remove them.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,654 | 19.12.2018 23:37:32 | -28,800 | 8a55f038231725409b71649eb20dc5ea10efdd02 | hv: coding style: refine hcall_initialize_trusty to one exit
Fix procedure has more than one exit point. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/common/trusty_hypercall.c",
"new_path": "hypervisor/common/trusty_hypercall.c",
"diff": "@@ -66,32 +66,26 @@ int32_t hcall_world_switch(struct acrn_vcpu *vcpu)\n*/\nint32_t hcall_initialize_trusty(struct acrn_vcpu *vcpu, uint64_t param)\n{\n- if (vc... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine hcall_initialize_trusty to one exit
Fix procedure has more than one exit point.
Tracked-On: #2120
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,654 | 19.12.2018 23:41:29 | -28,800 | 1dca17cd29fa9e1fc1c2628319d98c4e740c2639 | hv: coding style: refine initialize_trusty to one exit
1) Move data copy out of initialize_trusty
2) Fix procedure has more than one exit point | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/trusty.c",
"new_path": "hypervisor/arch/x86/trusty.c",
"diff": "@@ -443,44 +443,35 @@ static bool init_secure_world_env(struct acrn_vcpu *vcpu,\nreturn setup_trusty_info(vcpu, size, base_hpa);\n}\n-bool initialize_trusty(struct acrn_vcpu *v... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine initialize_trusty to one exit
1) Move data copy out of initialize_trusty
2) Fix procedure has more than one exit point
Tracked-On: #2120
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,654 | 19.12.2018 23:45:53 | -28,800 | 1c99a975ea132e15de03f0d40e3547a2f554b07d | hv: coding style: refine trusty
Refine the reminding part: fix procedure has more than one exit point. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/trusty.c",
"new_path": "hypervisor/arch/x86/trusty.c",
"diff": "@@ -63,12 +63,6 @@ static void create_secure_world_ept(struct acrn_vm *vm, uint64_t gpa_orig,\nvoid *sub_table_addr, *pml4_base;\nuint16_t i;\n- if ((vm->sworld_control.flag.su... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine trusty
Refine the reminding part: fix procedure has more than one exit point.
Tracked-On: #2120
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,804 | 19.12.2018 15:48:01 | -28,800 | 58d2a418d5adae83cbf1a8037141a4274e8a4092 | HV: fix pm code for multi-exits & unsigned const
1. change multi "return" to one exit.
2. add "U" to unsigned const as postfix.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/pm.c",
"new_path": "hypervisor/arch/x86/guest/pm.c",
"diff": "int32_t validate_pstate(const struct acrn_vm *vm, uint64_t perf_ctl)\n{\n- const struct cpu_px_data *px_data;\n- uint8_t i, px_cnt;\n+ int32_t ret = -1;\nif (is_vm0(vm)) {\... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | HV: fix pm code for multi-exits & unsigned const
1. change multi "return" to one exit.
2. add "U" to unsigned const as postfix.
Tracked-On: #861
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,654 | 20.12.2018 17:55:35 | -28,800 | a56abee9ff4523a3fa9904ff6f6dba5f29b7204f | hv: coding style: refine find_vcpuid_entry
1) add local_find_vcpuid_entry to find whether a cpuid leaf exist
in vcpuid cache entries.
2) find_vcpuid_entry will return the found entry if local_find_vcpuid_entry
return is not null. Otherwise, call local_find_vcpuid_entry again
when necessary.
In this case, there could el... | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vcpuid.c",
"new_path": "hypervisor/arch/x86/guest/vcpuid.c",
"diff": "#include <hypervisor.h>\n-static inline struct vcpuid_entry *find_vcpuid_entry(const struct acrn_vcpu *vcpu,\n- uint32_t leaf_arg, uint32_t subleaf)\n+static inline... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine find_vcpuid_entry
1) add local_find_vcpuid_entry to find whether a cpuid leaf exist
in vcpuid cache entries.
2) find_vcpuid_entry will return the found entry if local_find_vcpuid_entry
return is not null. Otherwise, call local_find_vcpuid_entry again
when necessary.
In this case, there could e... |
528,654 | 20.12.2018 18:35:35 | -28,800 | 0a713e6fbcb8a49f0db9ae1e4950b2816d9392bb | hv: coding style: refine set_vcpuid_entries to one exit
Fix procedure has more than one exit point. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vcpuid.c",
"new_path": "hypervisor/arch/x86/guest/vcpuid.c",
"diff": "@@ -200,9 +200,7 @@ int32_t set_vcpuid_entries(struct acrn_vm *vm)\nentry.eax = 0x16U;\n}\nresult = set_vcpuid_entry(vm, &entry);\n- if (result != 0) {\n- return re... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine set_vcpuid_entries to one exit
Fix procedure has more than one exit point.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,801 | 20.12.2018 14:22:33 | -28,800 | 50f5b0f6bb5bdd397d0eda64b5a3dd9aa83bb19b | hv: vmexit: fix MISRA-C violations related to multiple exits
This patch fixes the MISRA-C violations in arch/x86/vmexit.c
* make the function have only one exit point
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vmexit.c",
"new_path": "hypervisor/arch/x86/vmexit.c",
"diff": "@@ -160,12 +160,10 @@ int32_t vmexit_handler(struct acrn_vcpu *vcpu)\nif (get_cpu_id() != vcpu->pcpu_id) {\npr_fatal(\"vcpu is not running on its pcpu!\");\n- return -EINVAL;\n... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vmexit: fix MISRA-C violations related to multiple exits
This patch fixes the MISRA-C violations in arch/x86/vmexit.c
* make the function have only one exit point
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,804 | 07.12.2018 21:08:44 | -28,800 | 61f03dae81308ec2f1ac24e4e385051cddf600bb | DOC: change PCI uart description from mmio to bdf
HV code changed to configure PCI uart mmio@ to bdf@,
so change its description to match it. | [
{
"change_type": "MODIFY",
"old_path": "doc/getting-started/apl-nuc.rst",
"new_path": "doc/getting-started/apl-nuc.rst",
"diff": "@@ -177,7 +177,8 @@ partition. Follow these steps:\nwhether it should be disabled. There are three forms for this parameter:\n#. ``uart=disabled``: this disables the seri... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | DOC: change PCI uart description from mmio to bdf
HV code changed to configure PCI uart mmio@ to bdf@,
so change its description to match it.
Tracked-On: #2031
Signed-off-by: Minggui Cao <minggui.cao@intel.com> |
528,747 | 20.12.2018 12:02:34 | 28,800 | af9b747629076156a1e255829064e37c2a98841b | doc: fix formatting in NUC GSG
A stray empty code block is removed, along with trailing spaces | [
{
"change_type": "MODIFY",
"old_path": "doc/getting-started/apl-nuc.rst",
"new_path": "doc/getting-started/apl-nuc.rst",
"diff": "@@ -228,9 +228,6 @@ partition. Follow these steps:\n.. note::\nIt is also possible to use the device name directly, e.g. ``root=/dev/sda3``\n- .. code-block:: none\n-\n-\... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | doc: fix formatting in NUC GSG
A stray empty code block is removed, along with trailing spaces
Signed-off-by: David B. Kinder <david.b.kinder@intel.com> |
528,671 | 20.12.2018 09:34:36 | -28,800 | 5282fa899dd8a716ddf74f2251927d695ec00b1b | hv:vtd: fix MISRA-C violations on scope of variable could be reduced
This patch fix the MISRA-C violations in arch/x86/vtd.c
on scope of variable could be reduced.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vtd.c",
"new_path": "hypervisor/arch/x86/vtd.c",
"diff": "@@ -129,16 +129,15 @@ struct context_table {\nstruct page buses[CONFIG_IOMMU_BUS_NUM];\n};\n-static struct page root_tables[CONFIG_MAX_IOMMU_NUM] __aligned(PAGE_SIZE);\n-static struc... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:vtd: fix MISRA-C violations on scope of variable could be reduced
This patch fix the MISRA-C violations in arch/x86/vtd.c
on scope of variable could be reduced.
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,671 | 20.12.2018 09:38:34 | -28,800 | 80b392a8542d6e1fc5e93eafb90eb4724f394dc4 | hv:vtd: fix MISRA-C violations on pointer param should be declared pointer to const
This patch fix MISRA-C violations in arch/x86/vtd.c
on pointer param should be declared pointer to const.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vtd.c",
"new_path": "hypervisor/arch/x86/vtd.c",
"diff": "@@ -141,7 +141,7 @@ static inline uint8_t* get_ctx_table(uint32_t dmar_index, uint8_t bus_no)\nreturn ctx_tables[dmar_index].buses[bus_no].contents;\n}\n-bool iommu_snoop_supported(s... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:vtd: fix MISRA-C violations on pointer param should be declared pointer to const
This patch fix MISRA-C violations in arch/x86/vtd.c
on pointer param should be declared pointer to const.
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,671 | 20.12.2018 09:42:45 | -28,800 | 897ffa273979b459f44da1442e5d9f7e0aab2026 | hv:vtd: fix MISRA-C violations on logical conjunctions need brackets
This patch fix MISRA-C violations in arch/x86/vtd.c
on logical conjunctions need brackets.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vtd.c",
"new_path": "hypervisor/arch/x86/vtd.c",
"diff": "@@ -145,7 +145,7 @@ bool iommu_snoop_supported(const struct acrn_vm *vm)\n{\nbool ret;\n- if (vm->iommu == NULL || vm->iommu->iommu_snoop) {\n+ if ((vm->iommu == NULL) || (vm->iommu-... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:vtd: fix MISRA-C violations on logical conjunctions need brackets
This patch fix MISRA-C violations in arch/x86/vtd.c
on logical conjunctions need brackets.
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,671 | 20.12.2018 09:47:01 | -28,800 | 725e1921e55ac78b37c1675044151049ded3fcea | hv:vtd: fix MISRA-C violations on comment possibly contains code
This patch fix MISRA-C violations in arch/x86/vtd.c
on Comment possibly contains code.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vtd.c",
"new_path": "hypervisor/arch/x86/vtd.c",
"diff": "@@ -977,11 +977,8 @@ static int32_t remove_iommu_device(const struct iommu_domain *domain, uint16_t s\ncontext_entry->upper = 0UL;\niommu_flush_cache(dmar_unit, context_entry, sizeof... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:vtd: fix MISRA-C violations on comment possibly contains code
This patch fix MISRA-C violations in arch/x86/vtd.c
on Comment possibly contains code.
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,671 | 20.12.2018 09:48:57 | -28,800 | a98a1a690c426aaa8e1c136dee031cea0326d1e5 | hv:vtd: fix MISRA-C violations on pointer not checked for null before use
This patch fix MISRA-C violations in arch/x86/vtd.c
on Pointer not checked for null before use.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vtd.c",
"new_path": "hypervisor/arch/x86/vtd.c",
"diff": "@@ -992,6 +992,9 @@ static void do_action_for_iommus(void (*action)(struct dmar_drhd_rt *))\nstruct dmar_drhd_rt *dmar_unit;\nuint32_t i;\n+ if (info == NULL) {\n+ pr_fatal(\"%s: can... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:vtd: fix MISRA-C violations on pointer not checked for null before use
This patch fix MISRA-C violations in arch/x86/vtd.c
on Pointer not checked for null before use.
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,671 | 20.12.2018 09:50:30 | -28,800 | 60f78e1e7084e833ad1444dbcc2d3f551d911e10 | hv:vtd: fix MISRA-C violations on procedure has more than one exit point
This patch fix MISRA-C violations in arch/x86/vtd.c
on Procedure has more than one exit point.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vtd.c",
"new_path": "hypervisor/arch/x86/vtd.c",
"diff": "@@ -177,15 +177,12 @@ static int32_t register_hrhd_units(void)\nif ((info == NULL) || (info->drhd_count == 0U)) {\npr_fatal(\"%s: can't find dmar info\\n\", __func__);\n- return -ENO... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:vtd: fix MISRA-C violations on procedure has more than one exit point
This patch fix MISRA-C violations in arch/x86/vtd.c
on Procedure has more than one exit point.
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,676 | 20.12.2018 09:52:17 | -28,800 | 93e588bc7eb68860ce46d83142d7713be75f320e | hv: fix e820.c violations
fix e820.c violations related misra c. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/e820.c",
"new_path": "hypervisor/arch/x86/e820.c",
"diff": "@@ -121,6 +121,7 @@ uint64_t e820_alloc_low_memory(uint32_t size_arg)\n{\nuint32_t i;\nuint32_t size = size_arg;\n+ uint64_t ret = ACRN_INVALID_HPA;\nstruct e820_entry *entry, *new... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: fix e820.c violations
fix e820.c violations related misra c.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> |
528,675 | 20.12.2018 12:15:25 | -28,800 | 6d673648818aa97b50e48c03ecc426167e69c075 | scheduler: refine runqueue related functions
add struct sched_object, and use it as input param instead of vcpu for
below functions:
add_to_cpu_runqueue renamed from add_vcpu_to_runqueue
remove_from_cpu_runqueue renamed from remove_vcpu_from_runqueue
get_next_sched_obj added to get next sched object
Acked-by: Eddie Don... | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vcpu.c",
"new_path": "hypervisor/arch/x86/guest/vcpu.c",
"diff": "@@ -572,7 +572,7 @@ void pause_vcpu(struct acrn_vcpu *vcpu, enum vcpu_state new_state)\nvcpu->state = new_state;\nif (atomic_load32(&vcpu->running) == 1U) {\n- remove_v... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | scheduler: refine runqueue related functions
add struct sched_object, and use it as input param instead of vcpu for
below functions:
- add_to_cpu_runqueue renamed from add_vcpu_to_runqueue
- remove_from_cpu_runqueue renamed from remove_vcpu_from_runqueue
- get_next_sched_obj added to get next sched object
Tracked-On:... |
528,675 | 20.12.2018 13:09:58 | -28,800 | 8aae0dff87f0d97dc1cfd7788a6d22c0af62716a | scheduler: refine make_reschedule_request
just use pcpu_id for make_reschedule_request is enough
Acked-by: Anthony Xu
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vcpu.c",
"new_path": "hypervisor/arch/x86/guest/vcpu.c",
"diff": "@@ -573,7 +573,7 @@ void pause_vcpu(struct acrn_vcpu *vcpu, enum vcpu_state new_state)\nif (atomic_load32(&vcpu->running) == 1U) {\nremove_from_cpu_runqueue(&vcpu->sche... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | scheduler: refine make_reschedule_request
just use pcpu_id for make_reschedule_request is enough
Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <edide.dong@intel.com> |
528,675 | 20.12.2018 15:27:08 | -28,800 | 9672538c85b914b02368ae4ac069d3060bde4510 | init: move init_scheduler into cpu.c
now init_scheduler should belong to and move to hwmgmt module
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu.c",
"new_path": "hypervisor/arch/x86/cpu.c",
"diff": "@@ -160,6 +160,8 @@ void init_cpu_post(uint16_t pcpu_id)\npr_fatal(\"Please apply the latest CPU uCode patch!\");\n}\n+ init_scheduler();\n+\n/* Initialize interrupts */\ninterrupt_i... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | init: move init_scheduler into cpu.c
now init_scheduler should belong to and move to hwmgmt module
Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <edide.dong@intel.com> |
528,654 | 20.12.2018 23:29:02 | -28,800 | 738f2536feb92a7346c38f491bb8ea4079cd8eaf | hv: coding style: refine cpu related function to one exit
2) Fix procedure has more than one exit point. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu.c",
"new_path": "hypervisor/arch/x86/cpu.c",
"diff": "@@ -31,7 +31,7 @@ static uint64_t start_tsc __attribute__((__section__(\".bss_noinit\")));\nstatic void init_percpu_lapic_id(void)\n{\nuint16_t i;\n- uint16_t pcpu_num = 0U;\n+ uint1... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine cpu related function to one exit
2) Fix procedure has more than one exit point.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,801 | 21.12.2018 14:08:22 | -28,800 | eb77e25ff9258d52ec3ba53f12d49e5c2e0b94b8 | hv: ept: fix MISRA-C violations
This patch fixes the MISRA-C violations in arch/x86/ept.c
* add local variable if the input parameter passed by value
is changed in function definition
* remove the duplicated semi colon
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/ept.c",
"new_path": "hypervisor/arch/x86/ept.c",
"diff": "@@ -125,7 +125,7 @@ int32_t ept_violation_vmexit_handler(struct acrn_vcpu *vcpu)\nif (mmio_req->direction == REQUEST_WRITE) {\nstatus = emulate_instruction(vcpu);\nif (status != 0) {... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: ept: fix MISRA-C violations
This patch fixes the MISRA-C violations in arch/x86/ept.c
* add local variable if the input parameter passed by value
is changed in function definition
* remove the duplicated semi colon
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.d... |
528,801 | 21.12.2018 09:58:21 | -28,800 | ddd07b955b258bc3dc3ae1407541fcda97ec45c0 | hv: cpu_state_tbl: fix multiple exits
This patch fixes the MISRA-C violations in arch/x86/cpu_state_tbl.c
* make the function have only one exit point
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu_state_tbl.c",
"new_path": "hypervisor/arch/x86/cpu_state_tbl.c",
"diff": "@@ -106,19 +106,18 @@ static int32_t get_state_tbl_idx(const char *cpuname)\n{\nint32_t i;\nint32_t count = ARRAY_SIZE(cpu_state_tbl);\n+ int32_t ret = -1;\n- if ... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: cpu_state_tbl: fix multiple exits
This patch fixes the MISRA-C violations in arch/x86/cpu_state_tbl.c
* make the function have only one exit point
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,654 | 21.12.2018 19:02:31 | -28,800 | 36dcb0f60508d241b33c4aaa665f64225aef376e | hv: lib: refine inline assembly use in bitmap operation
Try to minimize the C code in inline assembly function. Now only
construct data structure and return a value is permitted. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/mmu.c",
"new_path": "hypervisor/arch/x86/mmu.c",
"diff": "@@ -46,12 +46,12 @@ static uint16_t vmx_vpid_nr = VMX_MIN_NR_VPID;\n#define INVEPT_TYPE_ALL_CONTEXTS 2UL\n#define VMFAIL_INVALID_EPT_VPID \\\n\" jnc 1f\\n\" \\\n- \" movl $1, (%0)\\n... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: lib: refine inline assembly use in bitmap operation
Try to minimize the C code in inline assembly function. Now only
construct data structure and return a value is permitted.
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,654 | 21.12.2018 20:09:52 | -28,800 | cf47f6cff869dd5686e8b1092fd946f73c7ab1e5 | hv: coding style: refine the remaining functions to one exit point
Refine the remaining functions in the head file to one exit point | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/include/arch/x86/guest/vm.h",
"new_path": "hypervisor/include/arch/x86/guest/vm.h",
"diff": "@@ -216,29 +216,31 @@ static inline struct acrn_vcpu *vcpu_from_vid(struct acrn_vm *vm, uint16_t vcpu_\nstatic inline struct acrn_vcpu *vcpu_from_pid(struct... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: coding style: refine the remaining functions to one exit point
Refine the remaining functions in the head file to one exit point
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,654 | 21.12.2018 22:00:52 | -28,800 | 9fe282f0805f2c49c1d8db61c344e329e81a649f | hv: Makefile: remove unused MACRO
Remove unused MACRO in version.h | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/Makefile",
"new_path": "hypervisor/Makefile",
"diff": "@@ -344,9 +344,6 @@ $(VERSION):\necho \"\" >> $(VERSION); \\\necho \"#ifndef VERSION_H\" >> $(VERSION); \\\necho \"#define VERSION_H\" >> $(VERSION); \\\n- echo \"#define HV_MAJOR_VERSION $(MAJO... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: Makefile: remove unused MACRO
Remove unused MACRO in version.h
Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com> |
528,706 | 22.12.2018 08:25:47 | -28,800 | 44bee5168ec18d39aadcf888ed9fa1ef9b7c934e | dm: virtio: fix compile issue on ubuntu
As VIRTIO_CONFIG_S_NEEDS_RESET is not defined in standard virtio header
file on ubuntu, there will be compile issue. so add
VIRTIO_CONFIG_S_NEEDS_RESET to fix it.
Acked-by: Yin Fengwei | [
{
"change_type": "MODIFY",
"old_path": "devicemodel/include/virtio.h",
"new_path": "devicemodel/include/virtio.h",
"diff": "@@ -229,6 +229,14 @@ enum {\n#define VIRTIO_DEV_HDCP 0x8607\n#define VIRTIO_DEV_COREU 0x8608\n+/*\n+ * VIRTIO_CONFIG_S_NEEDS_RESET is not defined\n+ * in some environments's vi... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | dm: virtio: fix compile issue on ubuntu
As VIRTIO_CONFIG_S_NEEDS_RESET is not defined in standard virtio header
file on ubuntu, there will be compile issue. so add
VIRTIO_CONFIG_S_NEEDS_RESET to fix it.
Tracked-On: #2145
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@in... |
528,731 | 21.12.2018 15:17:56 | -28,800 | 83f32c93f03c8ef6b89e93c1dad0adafb1652f0f | hv: vcpuid: leaf 02h has no subleaf, delete un-needed code.
According to SDM Vol. 2A 3-191 & Vol. 2A 3-213, leaf 02h has no subleaf.
This patch removes the un-needed code.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vcpuid.c",
"new_path": "hypervisor/arch/x86/guest/vcpuid.c",
"diff": "@@ -211,26 +211,6 @@ int32_t set_vcpuid_entries(struct acrn_vm *vm)\n}\nswitch (i) {\n- case 0x02U:\n- {\n- uint32_t times;\n-\n- init_vcpuid_entry(i, 0U, CPUID_CHE... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vcpuid: leaf 02h has no subleaf, delete un-needed code.
According to SDM Vol. 2A 3-191 & Vol. 2A 3-213, leaf 02h has no subleaf.
This patch removes the un-needed code.
Tracked-On: #861
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,731 | 21.12.2018 17:09:19 | -28,800 | c3250030aa85c005c3fa6c777e93f35ca4daa515 | hv: vcpuid: remove unnecessary check code
The removed check code is not necessary.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vcpuid.c",
"new_path": "hypervisor/arch/x86/guest/vcpuid.c",
"diff": "@@ -253,10 +253,6 @@ int32_t set_vcpuid_entries(struct acrn_vm *vm)\ndefault:\ninit_vcpuid_entry(i, 0U, 0U, &entry);\nresult = set_vcpuid_entry(vm, &entry);\n- if (... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vcpuid: remove unnecessary check code
The removed check code is not necessary.
Tracked-On: #861
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,747 | 12.12.2018 11:31:09 | 28,800 | c358d29c894f823d726577416eab5e694988c8a1 | doc: fix vhm_request doxygen comment
Table contents weren't rendered correctly in
developer-guides/hld/hv-io-emulation.html, so
fix the doxygen comments. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/include/public/acrn_common.h",
"new_path": "hypervisor/include/public/acrn_common.h",
"diff": "@@ -196,46 +196,46 @@ union vhm_io_request {\n* +-----------------------+-------------------------+----------------------+\n* | SOS vCPU 0 | SOS vCPU x | ... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | doc: fix vhm_request doxygen comment
Table contents weren't rendered correctly in
developer-guides/hld/hv-io-emulation.html, so
fix the doxygen comments.
Tracked-on: #1684
Signed-off-by: David B. Kinder <david.b.kinder@intel.com> |
528,728 | 21.12.2018 17:00:13 | -3,600 | 9c97f6bec5352d58775a3a6635b7ccf198a691e8 | Documentation: split the build instructions into its own guide
Split the build instructions, and the hypervisor configuration instructions
into its own separate document. | [
{
"change_type": "MODIFY",
"old_path": "doc/getting-started/apl-nuc.rst",
"new_path": "doc/getting-started/apl-nuc.rst",
"diff": "@@ -353,249 +353,3 @@ Set up Reference UOS\n:align: center\n:name: gsg-successful-boot\n-\n-Build ACRN from Source\n-**********************\n-\n-If you would like to buil... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | Documentation: split the build instructions into its own guide
Split the build instructions, and the hypervisor configuration instructions
into its own separate document.
Tracked-On: #2154
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> |
528,772 | 19.12.2018 23:30:50 | -28,800 | 3bfa695565b4f944e1ad913e62fe6ae0a1f464f7 | hv: virq: refine vcpu_inject_vlapic_int() has more than one exit point
The MISRA-C Standards suggests procedures to be single exit.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/virq.c",
"new_path": "hypervisor/arch/x86/virq.c",
"diff": "@@ -119,33 +119,32 @@ static int32_t vcpu_inject_vlapic_int(struct acrn_vcpu *vcpu)\n* through vmcs.\n*/\nif (is_apicv_intr_delivery_supported()) {\n- return -1;\n- }\n-\n+ ret = -... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: virq: refine vcpu_inject_vlapic_int() has more than one exit point
The MISRA-C Standards suggests procedures to be single exit.
Tracked-On: #861
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com> |
528,772 | 19.12.2018 23:46:21 | -28,800 | 88a7d8b2ccd39251dfe66cdce3de95fc38455c06 | hv: virq: refine vcpu_inject_hi_exception()
The MISRA-C Standards suggests use brackets to clarify the precedence
order of logical conjunctions.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/virq.c",
"new_path": "hypervisor/arch/x86/virq.c",
"diff": "@@ -253,7 +253,7 @@ static int32_t vcpu_inject_hi_exception(struct acrn_vcpu *vcpu)\nuint32_t vector = vcpu->arch.exception_info.exception;\nint32_t ret;\n- if (vector == IDT_MC ||... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: virq: refine vcpu_inject_hi_exception()
The MISRA-C Standards suggests use brackets to clarify the precedence
order of logical conjunctions.
Tracked-On: #861
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com> |
528,676 | 20.12.2018 10:05:32 | -28,800 | 1b37ed50d87a24cc12818642ad9573d83d25231a | hv: vmcall: fix "goto detected" violations
Remove the goto by split the function into two,
dispatch_hypercall and vmcall_vmexit_handler.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vmcall.c",
"new_path": "hypervisor/arch/x86/guest/vmcall.c",
"diff": "@@ -11,14 +11,9 @@ static spinlock_t vmm_hypercall_lock = {\n.head = 0U,\n.tail = 0U,\n};\n-/*\n- * Pass return value to SOS by register rax.\n- * This function sho... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vmcall: fix "goto detected" violations
Remove the goto by split the function into two,
dispatch_hypercall and vmcall_vmexit_handler.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,801 | 24.12.2018 10:51:42 | -28,800 | a5113d922d5a0fc7f6a90c0f75c51c79bba78d88 | hv: remove duplicated `is_vmx_disabled`
This patch fixes the duplicated functions introduced by cpu caps
modularization.
In cpu caps modularization, function `is_vmx_disabled` was supposed
to be moved from `arch/x86/vmcs.c` to`arch/x86/cpu_caps.c`,
but the original one was not removed.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/cpu_caps.c",
"new_path": "hypervisor/arch/x86/cpu_caps.c",
"diff": "@@ -305,6 +305,7 @@ void init_cpu_model_name(void)\nstatic inline bool is_vmx_disabled(void)\n{\nuint64_t msr_val;\n+ bool ret = false;\n/* Read Feature ControL MSR */\nmsr... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: remove duplicated `is_vmx_disabled`
This patch fixes the duplicated functions introduced by cpu caps
modularization.
In cpu caps modularization, function `is_vmx_disabled` was supposed
to be moved from `arch/x86/vmcs.c` to`arch/x86/cpu_caps.c`,
but the original one was not removed.
Tracked-On: #861
Signed-off-by... |
528,677 | 19.12.2018 13:06:37 | 0 | 31487e829c2f0af08cc3d6fa8ca8938adee69c0d | Makefile: keep files used for debug target
1. keep symbols files for debug usage
2. they are saved when build for rootfs.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "efi-stub/Makefile",
"new_path": "efi-stub/Makefile",
"diff": "@@ -89,6 +89,10 @@ all: $(EFIBIN)\ninstall: $(EFIBIN) install-conf\ninstall -D $(EFIBIN) $(DESTDIR)/usr/lib/acrn/$(HV_FILE).efi\n+install-debug: $(HV_OBJDIR)/$(HV_FILE).map $(HV_OBJDIR)/$(HV_FILE).o... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | Makefile: keep files used for debug target
1. keep symbols files for debug usage
2. they are saved when build for rootfs.
Tracked-On: #2168
Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,806 | 09.10.2018 11:41:58 | 18,000 | b4de4d1b0fad0468f8e707706ddefa7bbeabaacd | Makefile: add RELEASE variable to make command
1. use RELEASE to control ./tools install target.
Acked-by: Anthony Xu | [
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -93,4 +93,4 @@ devicemodel-install:\nmake -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) install\ntools-install:\n- make -C $(T)/tools OUT_DIR=$(TOOLS_OUT) install\n+ make -C $(T)/tools OUT_DIR=$(TOOLS_OUT) RELEASE=$(REL... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | Makefile: add RELEASE variable to make command
1. use RELEASE to control ./tools install target.
Tracked-On: #2168
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com> |
528,772 | 22.12.2018 18:20:08 | 0 | e692d4c721ad149bebc8ed7d0af87c2a3f06e21c | hv: virq: refine acrn_handle_pending_request() use goto instruction
The MISRA-C Standards suggests not to use 'goto' instruction.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/virq.c",
"new_path": "hypervisor/arch/x86/virq.c",
"diff": "@@ -379,6 +379,8 @@ int32_t external_interrupt_vmexit_handler(struct acrn_vcpu *vcpu)\nreturn ret;\n}\n+static inline int32_t acrn_inject_pending_vector(struct acrn_vcpu *vcpu, uin... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: virq: refine acrn_handle_pending_request() use goto instruction
The MISRA-C Standards suggests not to use 'goto' instruction.
Tracked-On: #861
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com> |
528,772 | 25.12.2018 00:38:30 | 0 | b89b12280c795d58e8e717842b6ce1c9cd19d8b0 | hv: virq: refine acrn_handle_pending_request() has more than one exit point
The MISRA-C Standards suggests procedures to be single exit
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/virq.c",
"new_path": "hypervisor/arch/x86/virq.c",
"diff": "@@ -394,31 +394,25 @@ int32_t acrn_handle_pending_request(struct acrn_vcpu *vcpu)\nif (bitmap_test_and_clear_lock(ACRN_REQUEST_TRP_FAULT,\npending_req_bits)) {\npr_fatal(\"Triple f... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: virq: refine acrn_handle_pending_request() has more than one exit point
The MISRA-C Standards suggests procedures to be single exit
Tracked-On: #861
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com> |
528,768 | 18.12.2018 18:55:46 | -28,800 | ea672c5b0775651516e74ed4140e3180a52b8c8e | hv: update coding style for tampoline.c
- add API get trampoline_start16_paddr() instead
of exporting this global variable.
- other minor update.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/pm.c",
"new_path": "hypervisor/arch/x86/pm.c",
"diff": "@@ -131,7 +131,7 @@ void host_enter_s3(struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, u\nstac();\n/* set ACRN wakeup vec instead */\n- *(sstate_data->wake_vector_32) = (ui... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: update coding style for tampoline.c
- add API get trampoline_start16_paddr() instead
of exporting this global variable.
- other minor update.
Tracked-On: #2095
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,731 | 25.12.2018 13:22:11 | -28,800 | 68643b619f4fdd4308f802f8dd0e879d71cd8a04 | hv: vcpuid: leaf 0dh is percpu related
cpuid leaf 0dh is percpu related, no need to init in vcpuid_entries for vm.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/guest/vcpuid.c",
"new_path": "hypervisor/arch/x86/guest/vcpuid.c",
"diff": "@@ -206,7 +206,7 @@ int32_t set_vcpuid_entries(struct acrn_vm *vm)\nfor (i = 1U; i <= limit; i++) {\n/* cpuid 1/0xb is percpu related */\n- if ((i == 1U) || (i == 0... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: vcpuid: leaf 0dh is percpu related
cpuid leaf 0dh is percpu related, no need to init in vcpuid_entries for vm.
Tracked-On: #861
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,801 | 25.12.2018 10:46:23 | -28,800 | 7016244c22a73218a49d483bd0154dc6a42df3d1 | hv: io: fix MISRA-C violations related to break
This patch fixes the MISRA-C violations in arch/x86/io.c
* make the for loop have only one `break`
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/io.c",
"new_path": "hypervisor/arch/x86/io.c",
"diff": "@@ -247,6 +247,7 @@ hv_emulate_mmio(struct acrn_vcpu *vcpu, struct io_request *io_req)\nfor (idx = 0U; idx < vcpu->vm->emul_mmio_regions; idx++) {\nuint64_t base, end;\n+ bool emulatio... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: io: fix MISRA-C violations related to break
This patch fixes the MISRA-C violations in arch/x86/io.c
* make the for loop have only one `break`
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,676 | 25.12.2018 11:27:08 | -28,800 | 277c7ec8baaf5cfa925a770f50e2d1ba8a68209e | hv: hypercall: fix "Procedure has more than one exit point"
Misra C requires Function must have only 1 return entry.
Fixed it by use "if ... else ..." format.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/common/hypercall.c",
"new_path": "hypervisor/common/hypercall.c",
"diff": "@@ -43,6 +43,7 @@ int32_t hcall_sos_offline_cpu(struct acrn_vm *vm, uint64_t lapicid)\n{\nstruct acrn_vcpu *vcpu;\nuint16_t i;\n+ int32_t ret = 0;\npr_info(\"sos offline cpu ... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: hypercall: fix "Procedure has more than one exit point"
Misra C requires Function must have only 1 return entry.
Fixed it by use "if ... else ..." format.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,676 | 25.12.2018 11:38:32 | -28,800 | 20d0e666ff2d233c5a1bfede628c40b1a848d9b6 | hv: fix sprintf and hypercall violations
Fix the violations list below:
1.Procedure has more than one exit point.
2.Use of sizeof on an array parameter.
3.Expression needs brackets.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/common/hypercall.c",
"new_path": "hypervisor/common/hypercall.c",
"diff": "@@ -889,18 +889,13 @@ hcall_reset_ptdev_intr_info(struct acrn_vm *vm, uint16_t vmid, uint64_t param)\nstruct hc_ptdev_irq irq;\nstruct acrn_vm *target_vm = get_vm_from_vmid(v... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: fix sprintf and hypercall violations
Fix the violations list below:
1.Procedure has more than one exit point.
2.Use of sizeof on an array parameter.
3.Expression needs brackets.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
528,667 | 20.12.2018 11:00:31 | -28,800 | 3e0b06cfd624f6747154fcb4ab3b53799f2c4d70 | dm: Fix some issues from string operations
The patch fix some string operations issues and also improve readability
of several snippet. | [
{
"change_type": "MODIFY",
"old_path": "devicemodel/core/main.c",
"new_path": "devicemodel/core/main.c",
"diff": "@@ -185,8 +185,10 @@ static int\npincpu_parse(const char *opt)\n{\nint vcpu, pcpu;\n+ char *cp;\n- if (sscanf(opt, \"%d:%d\", &vcpu, &pcpu) != 2) {\n+ if (dm_strtoi(opt, &cp, 10, &vcpu) ... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | dm: Fix some issues from string operations
The patch fix some string operations issues and also improve readability
of several snippet.
Tracked-On: #2133
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
528,667 | 25.12.2018 10:33:36 | -28,800 | b3ad44d4c1d3a265470a70da984cc3ceea7e0f5d | dm: use strnlen to replace strlen | [
{
"change_type": "MODIFY",
"old_path": "devicemodel/core/hugetlb.c",
"new_path": "devicemodel/core/hugetlb.c",
"diff": "@@ -157,7 +157,7 @@ static int open_hugetlbfs(struct vmctx *ctx, int level)\nUUID[12], UUID[13], UUID[14], UUID[15]);\n*(path + len) = '\\0';\n- strncat(path, uuid_str, strlen(uuid... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | dm: use strnlen to replace strlen
Tracked-On: #2133
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
528,667 | 25.12.2018 11:03:51 | -28,800 | 4b3ebf69c7a1739b86b6dd0ff9132706ca534e73 | dm: use strncpy to replace strcpy | [
{
"change_type": "MODIFY",
"old_path": "devicemodel/core/sw_load_bzimage.c",
"new_path": "devicemodel/core/sw_load_bzimage.c",
"diff": "@@ -318,7 +318,7 @@ acrn_sw_load_bzimage(struct vmctx *ctx)\nctx->bsp_regs.vcpu_id = 0;\nif (with_bootargs) {\n- strcpy(ctx->baseaddr + BOOTARGS_LOAD_OFF(ctx), get_... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | dm: use strncpy to replace strcpy
Tracked-On: #2133
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
528,667 | 25.12.2018 11:45:09 | -28,800 | 59c6140347f6937d1cf57ccd92fda9dfa62a352b | dm: use snprintf to replace sprintf
Also remove the '\n' from the hugetlb's file name. | [
{
"change_type": "MODIFY",
"old_path": "devicemodel/core/hugetlb.c",
"new_path": "devicemodel/core/hugetlb.c",
"diff": "@@ -149,8 +149,9 @@ static int open_hugetlbfs(struct vmctx *ctx, int level)\n}\nuuid_copy(UUID, ctx->vm_uuid);\n- sprintf(uuid_str, \"%02X%02X%02X%02X%02X%02X%02X%02X\"\n- \"%02X%0... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | dm: use snprintf to replace sprintf
Also remove the '\n' from the hugetlb's file name.
Tracked-On: #2133
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
528,671 | 25.12.2018 10:51:11 | -28,800 | 1dee629e752dcd48f67aaf1a704bff02115fd415 | hv:vtd: fix additional violations in vtd.c
this patch fix following violations:
Use of single line comment(s).
Logical conjunctions need brackets.
More than one break or goto statement in loop. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/vtd.c",
"new_path": "hypervisor/arch/x86/vtd.c",
"diff": "@@ -471,13 +471,8 @@ static struct dmar_drhd_rt *device_to_dmaru(uint16_t segment, uint8_t bus, uint8\n}\n}\n- /* find exact one */\n- if (i != dmar_unit->drhd->dev_cnt) {\n- break;\... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv:vtd: fix additional violations in vtd.c
this patch fix following violations:
- Use of single line comment(s).
- Logical conjunctions need brackets.
- More than one break or goto statement in loop.
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com> |
528,801 | 25.12.2018 11:54:53 | -28,800 | b3c199d04319bcb8cfa47df714d3ecd5d6d416f9 | hv: mmio_read: add `const` qualifier
This patch fixes the MISRA-C violations related to mmio_read**
* add `const` qualifier in implementation of mmio_read**
`const` qualifier shall be added | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/include/arch/x86/io.h",
"new_path": "hypervisor/include/arch/x86/io.h",
"diff": "@@ -144,7 +144,7 @@ static inline void mmio_write8(uint8_t value, void *addr)\n*/\nstatic inline uint64_t mmio_read64(const void *addr)\n{\n- return *((volatile uint64_... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | hv: mmio_read: add `const` qualifier
This patch fixes the MISRA-C violations related to mmio_read**
* add `const` qualifier in implementation of mmio_read**
`const` qualifier shall be added
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-... |
528,665 | 26.12.2018 09:08:14 | 0 | 1274fca0087af19f68b25adc3e62b43e4faf16de | HV: x86: Fix "Variable should be declared static"
This patch mainly do the following:
- Make pic_ioapic_pin_map static const by MISRA-C's requirement.
- Make legacy_irq_to_pin and legacy_irq_trigger_mode static const as we will never change it. | [
{
"change_type": "MODIFY",
"old_path": "hypervisor/arch/x86/ioapic.c",
"new_path": "hypervisor/arch/x86/ioapic.c",
"diff": "@@ -27,7 +27,7 @@ static union ioapic_rte saved_rte[NR_IOAPICS][IOAPIC_MAX_PIN];\n* the irq to ioapic pin mapping should extract from ACPI MADT table\n* hardcoded here\n*/\n-st... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | HV: x86: Fix "Variable should be declared static"
This patch mainly do the following:
- Make pic_ioapic_pin_map static const by MISRA-C's requirement.
- Make legacy_irq_to_pin and legacy_irq_trigger_mode static const as we will never change it.
Tracked-On: #861
Signed-off-by: Kaige Fu <kaige.fu@intel.com> |
528,667 | 15.10.2018 10:24:44 | -28,800 | 2d1ddd8876419d885fa020d0747cec67b2bd4e8b | dm: Add vm_clear_ioreq to clear ioreq status
VHM will provide a ioctl to clear all IO requests' status. This is
useful to handle ioreqs in VM normal reboot and emergency reboot.
Acked-by: Eddie Dong | [
{
"change_type": "MODIFY",
"old_path": "devicemodel/core/main.c",
"new_path": "devicemodel/core/main.c",
"diff": "@@ -550,13 +550,11 @@ vm_reset_vdevs(struct vmctx *ctx)\nstatic void\nvm_system_reset(struct vmctx *ctx)\n{\n- int vcpu_id = 0;\n-\n/*\n* If we get system reset request, we don't want to... | C | BSD 3-Clause New or Revised License | projectacrn/acrn-hypervisor | dm: Add vm_clear_ioreq to clear ioreq status
VHM will provide a ioctl to clear all IO requests' status. This is
useful to handle ioreqs in VM normal reboot and emergency reboot.
Tracked-On: #1821
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.