acrn-hypervisor/hypervisor/arch/x86
Junjie Mao a1069a5117 HV: ioapic: unify the access pattern to RTEs
There are two different ways the current implementation adopts to access ioapic
RTEs:

    1. As two 32-bit registers (typically named ''low'' and ''high''), or

    2. As one 64-bit register (typically named ''rte'').

Two issues arise due to the mixed use of these two patterns.

    1. Additional conversions are introduced. As an example, ioapic_get_rte()
       merges two RTE fragments into a uint64_t, while some callers break it
       back to ''low'' and ''high'' again.

    2. It is tricky to choose the proper width of IOAPIC_RTE_xxx constants. SOS
       boot failure is seen when they are 32-bit due to the following code:

           /* reg is uint64_t */
           vioapic->rtbl[pin].reg &= ~IOAPIC_RTE_REM_IRR;

       while making them 64-bit leads to implicit narrowing when the RTEs are accessed
       in the low & high pattern.

This patch defines a union ''ioapic_rte'' and unifies the access pattern
to IOAPIC and vIOAPIC RTEs.

v1 -> v2:

    * Instead of two 32-bit ''low'' and ''high'', define a union that allows
      either 32-bit or 64-bit accesses to RTEs.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-17 15:37:45 +08:00
..
configs HV: config: add Kconfig and defconfigs for sbl & uefi 2018-06-08 17:21:13 +08:00
debug HV: prototyping non-static function 2018-07-16 10:35:54 +08:00
guest HV: ioapic: unify the access pattern to RTEs 2018-07-17 15:37:45 +08:00
assign.c HV: ioapic: unify the access pattern to RTEs 2018-07-17 15:37:45 +08:00
cpu_primary.S HV:treewide:Add 16-bit atomic operations and update vpid type 2018-07-11 21:27:08 +08:00
cpu_state_tbl.c HV:CPU: Add 'U/UL' for unsigned const value 2018-07-09 10:27:21 +08:00
cpu.c HV: handle integral issue report by MISRA-C 2018-07-16 16:24:29 +08:00
cpuid.c HV: Fix missing brackets for MISRA C Violations 2018-07-13 09:09:12 +08:00
ept.c HV: prototyping non-static function 2018-07-16 10:35:54 +08:00
gdt.c HV:misc:add suffix U to the numeric constant 2018-07-05 11:29:46 +08:00
idt.S license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00
io.c HV: coding style cleanup for TRACE_2L & TRACE_4I usage 2018-07-16 10:32:14 +08:00
ioapic.c HV: ioapic: unify the access pattern to RTEs 2018-07-17 15:37:45 +08:00
irq.c HV: handle integral issue report by MISRA-C 2018-07-16 16:24:29 +08:00
Kconfig HV: build: make relocation-related code configurable 2018-07-11 19:18:26 +08:00
lapic.c HV: handle integral issue report by MISRA-C 2018-07-16 16:24:29 +08:00
mmu.c HV: Fix new MISRAC violations for brackets 2018-07-16 11:02:38 +08:00
mtrr.c HV:Treewide:Update the type of vcpu id as uint16_t 2018-07-04 14:28:52 +08:00
notify.c HV: Fix new MISRAC violations for brackets 2018-07-16 11:02:38 +08:00
pm.c HV: pm: cleanup for misra integral type violations 2018-07-12 17:31:11 +08:00
retpoline-thunk.S license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00
softirq.c HV: handle integral issue report by MISRA-C 2018-07-16 16:24:29 +08:00
timer.c HV: coding style cleanup for TRACE_2L & TRACE_4I usage 2018-07-16 10:32:14 +08:00
trampoline.S HV:treewide:Add 16-bit atomic operations and update vpid type 2018-07-11 21:27:08 +08:00
trusty2.c [REVERT-ME]:handle discontinuous hpa for trusty 2018-07-11 11:11:24 +08:00
trusty.c HV:transfer vmid's type to uint16_t 2018-07-13 14:13:38 +08:00
virq.c HV: handle integral issue report by MISRA-C 2018-07-16 16:24:29 +08:00
vmexit.c HV: Fix new MISRAC violations for brackets 2018-07-16 11:02:38 +08:00
vmx_asm.S HV:CPU:Constant values replace with CPU MACRO 2018-07-09 09:24:56 +08:00
vmx.c HV: Fix new MISRAC violations for brackets 2018-07-16 11:02:38 +08:00
vtd.c HV:misc:fix "signed/unsigned conversion with cast" 2018-07-16 15:45:40 +08:00
wakeup.S HV:CPU:Fix a mistake introduced by MARCO replacing patch 2018-07-13 11:27:56 +08:00