acrn-hypervisor/hypervisor/arch/x86/guest
Conghui Chen ac6c5dce81 HV: Clean vpic and vioapic logic when lapic is pt
When the lapic is passthru, vpic and vioapic cannot be used anymore. In
current code, user can still inject vpic interrupt to Guest OS, this is
not allowed.
This patch remove the vpic and vioapic initiate functions during
creating VM with lapic passthru. But the APIs in vpic and vioapic are
called in many places, for these APIs, follow the below principles:

1. For the APIs which will access uninitiated variables, and may case
hypervisor hang, add @pre to make sure user should call them after vpic or
vioapic is initiated.

2. For the APIs which only return some static value, do noting with them.

3. For the APIs which user will called to inject interrupt, such as
vioapic_set_irqline_lock or vpic_set_irqline, add condition in these
APIs to make sure it only inject interrupt when vpic or vioapic is
initiated. This change is to make sure the vuart or hypercall need not
to care whether lapic is passthru or the vpic and vioapic is initiated
or not.

Tracked-On: #3227
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
2019-06-12 14:29:50 +08:00
..
assign.c hv: fix possible null pointer dereference 2019-06-11 16:03:04 +08:00
ept.c hv:remove accessing shared log buffer cases between stac/clac 2019-05-05 10:00:32 +08:00
guest_memory.c HV: remove unused function copy_to_gva 2019-05-22 16:36:03 +08:00
instr_emul.c hv: instr_emul: fix movzx return memory opsize wrong 2019-05-13 11:53:51 +08:00
pm.c HV: validate pstate by checking px ctl range 2019-05-24 11:36:54 +08:00
trusty.c HV: use term of UUID 2019-04-12 13:45:32 +08:00
ucode.c hv:cleanup header file for guest folder 2019-02-21 10:38:30 +08:00
vcpu.c hv: distinguish between LAPIC_PASSTHROUGH configured vs enabled 2019-05-23 11:15:31 +08:00
vcpuid.c HV: return virtual lapic id in vcpuid 0b leaf 2019-06-06 15:22:10 +08:00
virq.c HV: remove unused function vcpu_inject_ac 2019-05-22 16:36:03 +08:00
virtual_cr.c hv: vmcs: don't trap when setting reserved bit in cr0/cr4 2019-05-30 11:33:01 +08:00
vlapic_priv.h hv: vlapic: add apic register offset check API 2019-04-23 15:16:56 +08:00
vlapic.c HV: return -1 with invalid vcpuid in pt icr access 2019-06-06 15:22:10 +08:00
vm_reset.c hv: initial host reset implementation 2019-05-23 18:24:17 +08:00
vm.c HV: Clean vpic and vioapic logic when lapic is pt 2019-06-12 14:29:50 +08:00
vmcall.c HV: introduce relative vm id for hcall api 2019-06-12 11:00:40 +08:00
vmcs.c hv: distinguish between LAPIC_PASSTHROUGH configured vs enabled 2019-05-23 11:15:31 +08:00
vmexit.c xsave: inject GP when guest tries to write 1 to XCR0 reserved bit 2019-06-12 08:28:53 +08:00
vmsr.c hv: vmsr: present sgx related msr to guest 2019-05-29 11:24:13 +08:00
vmtrr.c hv: vmtrr: hide mtrr if hide_mtrr is true 2019-03-16 17:14:12 +08:00
vmx_asm.S hv:remove some unnecessary includes 2019-05-07 09:10:13 +08:00
vmx_io.c HV: rename 'type' in struct io_request 2019-05-06 18:25:20 +08:00