acrn-hypervisor/hypervisor/include/arch/x86
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
..
guest exception: use func vcpu_queue_exception to inject exception 2018-05-30 13:51:49 +08:00
apicreg.h lapic: continuous LVT registers as an array 2018-05-30 13:52:11 +08:00
assign.h HV: treewide: give names to unnamed structs/unions 2018-05-29 14:12:15 +08:00
cpu.h exception: add vcpu_queue_exception function 2018-05-30 13:51:49 +08:00
cpufeatures.h hv: add hardware_detect_support to detect which hardware we support 2018-05-15 17:25:56 +08:00
cpuid.h HV: add cpu model name 2018-05-15 17:25:25 +08:00
gdt.h HV: treewide: give names to unnamed structs/unions 2018-05-29 14:12:15 +08:00
hv_arch.h hv: move structure(intr_ctx) to irq.h 2018-05-23 13:38:52 +08:00
idt.h HV: treewide: give names to unnamed structs/unions 2018-05-29 14:12:15 +08:00
io.h HV Cx: allow guest to access host idle port 2018-05-15 17:25:57 +08:00
ioapic.h ptdev: change remapping entry from virtual to physical based 2018-05-15 17:25:57 +08:00
irq.h exception: add vcpu_inject_pf support 2018-05-30 13:51:49 +08:00
lapic.h refine: remove redundant data type definition 2018-05-15 17:25:54 +08:00
mmu.h page walk during copy_from_vm/copy_to_vm 2018-05-24 13:42:19 +08:00
msr.h hv: vmx_capability: add cpu_has_vmx_ept/vpid_cap API 2018-05-15 17:25:55 +08:00
multiboot.h UEFI: change the efi_ctx passing method 2018-05-15 17:19:39 +08:00
reboot.h hv: Add reboot shell command 2018-05-18 16:38:40 +08:00
softirq.h initial import 2018-05-11 14:44:28 +08:00
timer.h hv: timer: make the timer list be ordered 2018-05-15 18:03:33 +08:00
trusty.h mmu:create temporary page tables for guest at run time 2018-05-15 17:25:26 +08:00
vmexit.h vmexit: refine vmexit loop 2018-05-24 13:42:19 +08:00
vmx.h hv: define 4 vcpu modes 2018-05-24 10:16:48 +08:00
vtd.h ept: change eptp to PA 2018-05-15 17:25:25 +08:00
zeropage.h vm load: fix bug in loading kernel 2018-05-15 17:19:37 +08:00