From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9GHG-0004uU-Hj for qemu-devel@nongnu.org; Wed, 16 Dec 2015 12:54:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9GHD-000414-CQ for qemu-devel@nongnu.org; Wed, 16 Dec 2015 12:54:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9GHD-00040z-6H for qemu-devel@nongnu.org; Wed, 16 Dec 2015 12:54:11 -0500 References: <1450107185-31490-1-git-send-email-asmetanin@virtuozzo.com> <566EE9B4.4040104@redhat.com> <566EF5E3.7060000@virtuozzo.com> From: Paolo Bonzini Message-ID: <5671A53D.2070501@redhat.com> Date: Wed, 16 Dec 2015 18:54:05 +0100 MIME-Version: 1.0 In-Reply-To: <566EF5E3.7060000@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: asmetanin@virtuozzo.com, kvm@vger.kernel.org Cc: Gleb Natapov , "Denis V. Lunev" , Roman Kagan , qemu-devel@nongnu.org On 14/12/2015 18:01, Andrey Smetanin wrote: > host guest > start periodic stimer > start periodic timer > timer expires after 15ms > send expiration message into guest > restart periodic timer > ....doing something.... > timer expires again after 15 ms > msg slot is still not cleared so > setup ->msg_pending > restart periodic timer > ....doing something.... > process timer msg and clear slot > so ->msg_pending was set: > send EOM into host > received EOM > queued call of kvm_hv_process_stimers() > by KVM_REQ_HV_STIMER > > kvm_hv_process_stimers(): > ... > stimer_stop() > if (time_now >= stimer->exp_time) > stimer_expiration(stimer); > But time_now < stimer->exp_time, so stimer_expiration is not called > in this case and timer is not restarted. so guest lose timer. Great, this explains it. Paolo