Files
acrn-hypervisor/hypervisor/arch/x86
Kaige Fu c22f899a5e HV: Fix poweroff issue of hard RTVM
We should use INIT signal to notify the vcpu threads when
powering off the hard RTVM. To achive this, we should set
the vcpu->thread_obj.notify_mode as SCHED_NOTIFY_INIT.

Patch (27163df9 hv: sched: add sleep/wake for thread object)
tries to set the notify_mode according `is_lapic_pt_enabled(vcpu)`
in function prepare_vcpu. But at this point, the is_lapic_pt_enabled(vcpu)
will always return false. Consequently, it will set notify_mode
as SCHED_NOTIFY_IPI. Then leads to the failure of powering off
hard RTVM.

This patch fixes it by:
  - Initialize the notify_mode as SCHED_NOTIFY_IPI in prepare_vcpu.
  - Set notify_mode as SCHED_NOTIFY_INIT after guest is trying to
    enable x2apic mode of passthru lapic.

Tracked-On: #3975
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-11-04 10:28:16 +08:00
..
2019-11-04 10:28:16 +08:00
2019-06-14 14:22:51 +08:00
2019-10-31 09:02:59 +08:00
2019-02-22 13:14:36 +08:00
2019-10-22 10:09:16 +08:00
2019-09-05 16:32:30 +08:00
2019-09-25 13:45:39 +08:00
2019-09-11 17:30:24 +08:00