From a36ef9f177876be7c0d917469b2def17aef02058 Mon Sep 17 00:00:00 2001 From: Du Yilong Date: Fri, 2 Sep 2022 09:00:44 +0800 Subject: [PATCH] sw64: kvm: turn off the clock timer of guest os Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNJ3 -------------------------------- During guest os reboot test, an error occurred by chance and the hypervisor reports guest unknown hardware error. The interrupt of guest os cannot be handled because the interrupt route table of guest is empty during reboot time if interrupt are enabled by mistake. The problem of guest os reboot failures are significantly reduced by turning off the clock timer. Signed-off-by: Du Yilong Signed-off-by: Gu Zitao --- arch/sw_64/kvm/kvm-sw64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sw_64/kvm/kvm-sw64.c b/arch/sw_64/kvm/kvm-sw64.c index 06e969caaaa6..825fe39f0494 100644 --- a/arch/sw_64/kvm/kvm-sw64.c +++ b/arch/sw_64/kvm/kvm-sw64.c @@ -411,6 +411,7 @@ int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu) { unsigned long addr = vcpu->kvm->arch.host_phys_addr; + hrtimer_cancel(&vcpu->arch.hrt); vcpu->arch.vcb.whami = vcpu->vcpu_id; vcpu->arch.vcb.vcpu_irq_disabled = 1; vcpu->arch.pcpu_id = -1; /* force flush tlb for the first time */ -- GitLab