[RFC PATCH v3 0/6] Enable PAUSE-Loop exiting and HLT emulation in hypervisor


Shuo A Liu
 

When multiple vcpus running on same pcpu, it's good for performance
if vcpu can yield pcpu proactively. When vcpus are idle, they should release
pcpu and let scheduler pickup other vcpus to run.

To avoid sleep-after-wakeup race issue, HLT emulation introduces a block_flags
and a per-vcpu lock(vcpu_lock).

v3:
1) concept: completion -> event
2) Drop vcpu layer abstraction of event. Just use wait_event/signal_event provided
by scheduling.

v2:
Drop block_flags&vcpu_lock approach, and introduce a event completion mechanism
in scheduling and vcpu layer.


Shuo A Liu (6):
hv: PAUSE-loop exiting support in hypervisor
hv: sched: simple event implemention
hv: vcpu: wait and signal vcpu event support
hv: Add vlapic_has_pending_intr of apicv to check pending interrupts
hv: HLT emulation in hypervisor
hv: Use HLT as the default idle action of service OS

hypervisor/arch/x86/guest/vcpu.c | 5 ++-
hypervisor/arch/x86/guest/vlapic.c | 31 ++++++++++++++++
hypervisor/arch/x86/guest/vmcs.c | 9 ++++-
hypervisor/arch/x86/guest/vmexit.c | 20 +++++++++-
hypervisor/common/hv_main.c | 1 +
hypervisor/common/hypercall.c | 8 ++--
hypervisor/common/schedule.c | 45 +++++++++++++++++++++++
hypervisor/dm/io_req.c | 15 ++------
hypervisor/include/arch/x86/guest/vcpu.h | 7 ++++
hypervisor/include/arch/x86/guest/vlapic.h | 2 +
hypervisor/include/common/schedule.h | 11 ++++++
hypervisor/scenarios/industry/vm_configurations.h | 2 +-
hypervisor/scenarios/sdc/vm_configurations.h | 2 +-
hypervisor/scenarios/sdc2/vm_configurations.h | 2 +-
14 files changed, 136 insertions(+), 24 deletions(-)

--
2.8.3

Join acrn-dev@lists.projectacrn.org to automatically receive all group messages.