[Devel,v1] KVM: x86: add a hv_stimer pending to the list of vcpu's awaking events

Submitted by Denis Plotnikov on Jan. 19, 2017, 12:48 p.m.

Details

Message ID 20170119124807.4382-1-dplotnikov@virtuozzo.com
State New
Series "KVM: x86: add a hv_stimer pending to the list of vcpu's awaking events"
Headers show

Commit Message

Denis Plotnikov Jan. 19, 2017, 12:48 p.m.
In RHEL 7.3 the infrastructure code responsible for checking the vcpu
runnable state has been reworked. RHEL 7.3 doesn't support hyper-v stimers,
thus the hv_stimer pending check didn't appear in the reworked code.
The hv_timer pending check hasn't been ported while moving from 7.2 to 7.3
kernel. This has led to hanging on of windows guests on during OS installation
and OS shutting down.
The patch fixes that by adding a missing piece of code to the vcpu runnable
check.

Fixes https://jira.sw.ru/browse/PSBM-58415

Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
---
 arch/x86/kvm/x86.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index e9c6b0c..798a3f2 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -8373,6 +8373,9 @@  static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
 	    kvm_cpu_has_interrupt(vcpu))
 		return true;
 
+	if (kvm_hv_has_stimer_pending(vcpu))
+		return true;
+
 	return false;
 }
 

Comments

Roman Kagan Jan. 19, 2017, 1:16 p.m.
On Thu, Jan 19, 2017 at 03:48:07PM +0300, Denis Plotnikov wrote:
> In RHEL 7.3 the infrastructure code responsible for checking the vcpu
> runnable state has been reworked. RHEL 7.3 doesn't support hyper-v stimers,
> thus the hv_stimer pending check didn't appear in the reworked code.
> The hv_timer pending check hasn't been ported while moving from 7.2 to 7.3
> kernel. This has led to hanging on of windows guests on during OS installation
> and OS shutting down.
> The patch fixes that by adding a missing piece of code to the vcpu runnable
> check.
> 
> Fixes https://jira.sw.ru/browse/PSBM-58415
> 
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>

Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>