All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: asmetanin@virtuozzo.com, kvm@vger.kernel.org
Cc: Gleb Natapov <gleb@kernel.org>,
	Roman Kagan <rkagan@virtuozzo.com>,
	"Denis V. Lunev" <den@openvz.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping
Date: Wed, 16 Dec 2015 18:54:05 +0100	[thread overview]
Message-ID: <5671A53D.2070501@redhat.com> (raw)
In-Reply-To: <566EF5E3.7060000@virtuozzo.com>



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

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: asmetanin@virtuozzo.com, kvm@vger.kernel.org
Cc: Gleb Natapov <gleb@kernel.org>, "Denis V. Lunev" <den@openvz.org>,
	Roman Kagan <rkagan@virtuozzo.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping
Date: Wed, 16 Dec 2015 18:54:05 +0100	[thread overview]
Message-ID: <5671A53D.2070501@redhat.com> (raw)
In-Reply-To: <566EF5E3.7060000@virtuozzo.com>



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

  reply	other threads:[~2015-12-16 17:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 15:33 [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping Andrey Smetanin
2015-12-14 15:33 ` [Qemu-devel] " Andrey Smetanin
2015-12-14 16:09 ` Paolo Bonzini
2015-12-14 16:09   ` [Qemu-devel] " Paolo Bonzini
2015-12-14 16:48   ` Andrey Smetanin
2015-12-14 16:48     ` [Qemu-devel] " Andrey Smetanin
2015-12-14 17:01   ` Andrey Smetanin
2015-12-14 17:01     ` [Qemu-devel] " Andrey Smetanin
2015-12-16 17:54     ` Paolo Bonzini [this message]
2015-12-16 17:54       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5671A53D.2070501@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=asmetanin@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rkagan@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.