Files
acrn-hypervisor/hypervisor/arch/x86
Shiqing Gao 6744a179fc hv: treewide: fix 'Shifting value too far'
MISRA-C requires that shift operation cannot exceed the word length.

What this patch does:
- Add the pre condition for 'init_lapic' regarding to 'pcpu_id'
  Currently, max 8 physical cpus are supported.
  Re-design will be required if we would like to support more physical
   cpus.
  So, add the pre condition here to avoid the unintentional shift
   operation mistakes.

- Replace the id type with uint8_t in 'vlapic_build_id'
  - For VM0, it uses 'lapic_id' as its id, which is uint8_t.
  - For non VM0, it uses 'vcpu_id' as its id, which is uint16_t.
    Cast this id to uint8_t to make sure there is no loss of data after
     left shifting 24U.

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-08-14 13:05:44 +08:00
..
2018-07-25 15:29:34 +08:00
2018-08-14 09:53:32 +08:00
2018-08-14 09:53:32 +08:00
2018-08-14 09:53:32 +08:00
2018-08-14 09:53:32 +08:00
2018-08-06 12:27:53 +08:00
2018-08-07 09:55:13 +08:00
2018-08-10 10:17:09 +08:00
2018-08-13 14:07:30 +08:00
2018-08-14 09:53:32 +08:00