acrn-hypervisor/hypervisor/include
Kaige Fu 24c2c0ecc0 HV: Use NMI to kick lapic-pt vCPU's thread
ACRN hypervisor needs to kick vCPU off VMX non-root mode to do some
operations in hypervisor, such as interrupt/exception injection, EPT
flush etc. For non lapic-pt vCPUs, we can use IPI to do so. But, it
doesn't work for lapic-pt vCPUs as the IPI will be injected to VMs
directly without vmexit.

Without the way to kick the vCPU off VMX non-root mode to handle pending
request on time, there may be fatal errors triggered.
1). Certain operation may not be carried out on time which may further
    lead to fatal errors. Taking the EPT flush request as an example, once we
    don't flush the EPT on time and the guest access the out-of-date EPT,
    fatal error happens.
2). ACRN now will send an IPI with vector 0xF0 to target vCPU to kick the vCPU
    off VMX non-root mode if it wants to do some operations on target vCPU.
    However, this way doesn't work for lapic-pt vCPUs. The IPI will be delivered
    to the guest directly without vmexit and the guest will receive a unexpected
    interrupt. Consequently, if the guest can't handle this interrupt properly,
    fatal error may happen.

The NMI can be used as the notification signal to kick the vCPU off VMX
non-root mode for lapic-pt vCPUs. So, this patch uses NMI as notification signal
to address the above issues for lapic-pt vCPUs.

Tracked-On: #3886
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-12-16 16:54:30 +08:00
..
arch/x86 hv: add lock for ept add/modify/del 2019-12-16 14:41:21 +08:00
common HV: Use NMI to kick lapic-pt vCPU's thread 2019-12-16 16:54:30 +08:00
debug HV: Kconfig: remove MAX_VCPUS_PER_VM in Kconfig 2019-12-12 13:49:28 +08:00
dm HV: rename CONFIG_MAX_PCPU_NUM to MAX_PCPU_NUM 2019-12-12 13:49:28 +08:00
hw HV: parse default pci mmcfg base 2019-12-02 16:20:24 +08:00
lib hv: support xsave in context switch 2019-12-02 09:31:12 +08:00
public hv: make hypercall HC_CREATE_VCPU empty 2019-09-24 11:58:45 +08:00