acrn-hypervisor/hypervisor/arch/x86
Xiangyang Wu 4dc39fdb8e HV:treewide:Add 16-bit atomic operations and update vpid type
There are some integer type conversions reported by static
analysis tool for vcpu id, number of created vcpus, and
vpid, to reduce these type conversions, redesign vcpu id,
number of created vcpus, and vpid type as uint16_t as per
their usage, related 16-bit atomic operations shall be
added in HV.
MISRA C requires that all unsigned constants should have the suffix 'U'
(e.g. 0xffU), but the assembler may not accept such C-style constants.

Add 16-bit atomic add/dec/store operations;
Update temporary variables type and parameters type of
related caller;
Update vpid type as uint16_t;
Replace Macro with constant value for CPU_PAGE_SIZE.

Note: According to SDM A.10, there are some bits defined
in the IA32_VMX_EPT_VPID_CAP MSR to support the INVVPID
instruction, these bits don't mean actual VPID, so
the vpid field in the data struct vmx_capability doesn't
be updated.

V1--V2:
	update comments for assembly code as per coding style;

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
2018-07-11 21:27:08 +08:00
..
configs HV: config: add Kconfig and defconfigs for sbl & uefi 2018-06-08 17:21:13 +08:00
debug HV: further cleanup of header inclusions 2018-05-25 10:45:56 +08:00
guest HV:treewide:Add 16-bit atomic operations and update vpid type 2018-07-11 21:27:08 +08:00
assign.c hv:fix "missing for discarded return value" for memcpy_s and strcpy_s 2018-07-09 09:22:37 +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: cleanup cpu.c and cpu.h 2018-07-11 10:25:16 +08:00
cpuid.c HV: Assignment should not mix with operator 2018-07-10 11:56:36 +08:00
ept.c HV:MM:add 'U/UL' suffix for unsigned contant value 2018-07-11 09:23:03 +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:fix "missing for discarded return value" for memset 2018-07-05 14:14:48 +08:00
ioapic.c HV: ioapic: clean up remaining integral-related violations 2018-07-10 10:28:03 +08:00
irq.c HV: Rename 'CPU_BOOT_ID' to 'BOOT_CPU_ID' 2018-07-10 11:51:12 +08:00
Kconfig HV: build: make relocation-related code configurable 2018-07-11 19:18:26 +08:00
lapic.c HV:treewide:Clean up field names of struct cpuinfo_x86 2018-07-10 13:24:55 +08:00
mmu.c HV:treewide:Add 16-bit atomic operations and update vpid type 2018-07-11 21:27:08 +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:misc:add suffix U to the numeric constant 2018-07-05 11:29:46 +08:00
pm.c hv: fixup addresses in the c code for relocation 2018-07-11 10:25:16 +08:00
retpoline-thunk.S license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00
softirq.c HV:misc:add suffix U to the numeric constant 2018-07-05 11:29:46 +08:00
timer.c HV: Moving operators out from conditions 2018-07-09 13:10:34 +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 [REVERT-ME]:handle discontinuous hpa for trusty 2018-07-11 11:11:24 +08:00
virq.c hv:fix return value violation in vmexit handler 2018-07-10 16:35:20 +08:00
vmexit.c hv:fix return value violation in vmexit handler 2018-07-10 16:35:20 +08:00
vmx_asm.S HV:CPU:Constant values replace with CPU MACRO 2018-07-09 09:24:56 +08:00
vmx.c HV:treewide:Add 16-bit atomic operations and update vpid type 2018-07-11 21:27:08 +08:00
vtd.c HV: Moving operators out from conditions 2018-07-09 13:10:34 +08:00
wakeup.S HV:CPU:Constant values replace with CPU MACRO 2018-07-09 09:24:56 +08:00