acrn-hypervisor/hypervisor/include
Junjie Mao 2266e133fb lapic: continuous LVT registers as an array
Pointer arithmetic is currently used to calculate the address of a specific
Local Vector Table (LVT) register (except LVT_CMCI) in lapic, since the
registers are continuously placed with fixed padding in between. However each of
these registers are declared as a single uint32_t in struct lapic, resulting
pointer arithmetic on a non-array pointer which violates MISRA C requirements.

This patch refactors struct lapic by converting the LVT registers fields (again
except LVT_CMCI) to an array named lvt. The LVT indices are reordered to reflect
the order of the LVT registers on hardware, and reused to index this lvt array.

The code before and after the changes is semantically equivalent.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
2018-05-30 13:52:11 +08:00
..
arch/x86 lapic: continuous LVT registers as an array 2018-05-30 13:52:11 +08:00
common page walk during copy_from_vm/copy_to_vm 2018-05-24 13:42:19 +08:00
debug HV: debug: stop using ## __VA_ARGS__ 2018-05-29 14:13:44 +08:00
lib add triple fault request support 2018-05-30 13:51:49 +08:00
public treewide: remove unnecessary unnamed structs/unions 2018-05-29 14:12:15 +08:00
hv_debug.h initial import 2018-05-11 14:44:28 +08:00
hv_lib.h hv: lib: split atomic operation to atomic.h 2018-05-18 10:52:31 +08:00
hypervisor.h HV: further cleanup of header inclusions 2018-05-25 10:45:56 +08:00