All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang Haoyu" <zhanghy@sangfor.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"kvm" <kvm@vger.kernel.org>, "Jason Wang" <jasowang@redhat.com>,
	"Jan Kiszka" <jan.kiszka@siemens.com>,
	"Michael S.Tsirkin" <mst@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"qemu-devel" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] kvm: ioapic: conditionally delay irq delivery during eoi broadcast
Date: Thu, 11 Sep 2014 20:56:32 +0800	[thread overview]
Message-ID: <201409112056298025699@sangfor.com> (raw)
In-Reply-To: 33183CC9F5247A488A2544077AF1902086DC96FD@SZXEMA503-MBS.china.huawei.com

>> Subject: [Qemu-devel] [PATCH] kvm: ioapic: conditionally delay irq delivery
>> duringeoi broadcast
>> 
>> Currently, we call ioapic_service() immediately when we find the irq is still
>> active during eoi broadcast. But for real hardware, there's some dealy between
>> the EOI writing and irq delivery (system bus latency?). So we need to emulate
>> this behavior. Otherwise, for a guest who haven't register a proper irq handler
>> , it would stay in the interrupt routine as this irq would be re-injected
>> immediately after guest enables interrupt. This would lead guest can't move
>> forward and may miss the possibility to get proper irq handler registered (one
>> example is windows guest resuming from hibernation).
>> 
>> As there's no way to differ the unhandled irq from new raised ones, this patch
>> solve this problems by scheduling a delayed work when the count of irq injected
>> during eoi broadcast exceeds a threshold value. After this patch, the guest can
>> move a little forward when there's no suitable irq handler in case it may
>> register one very soon and for guest who has a bad irq detection routine ( such
>> as note_interrupt() in linux ), this bad irq would be recognized soon as in the
>> past.
>> 
>> Cc: Michael S. Tsirkin <mst@redhat.com>
>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>> Signed-off-by: Zhang Haoyu <zhanghy@sangfor.com>
>> ---
>>  include/trace/events/kvm.h | 20 +++++++++++++++++++
>>  virt/kvm/ioapic.c          | 50
>> ++++++++++++++++++++++++++++++++++++++++++++--
>>  virt/kvm/ioapic.h          |  6 ++++++
>>  3 files changed, 74 insertions(+), 2 deletions(-)
>> 
>If this is a new version, please add a v2/v3 suffix and describe the changes at
>those different versions .
>
>You can get more information from:
>http://wiki.qemu.org/Contribute/SubmitAPatch
>
Okay, thanks.

>Best regards,
>-Gonglei


  reply	other threads:[~2014-09-11 12:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  8:47 [PATCH] kvm: ioapic: conditionally delay irq delivery duringeoi broadcast Zhang Haoyu
2014-09-11  8:47 ` [Qemu-devel] " Zhang Haoyu
2014-09-11  9:29 ` Gonglei (Arei)
2014-09-11  9:29   ` Gonglei (Arei)
2014-09-11 12:56   ` Zhang Haoyu [this message]
2014-09-12 16:01 ` Paolo Bonzini
2014-09-12 16:01   ` [Qemu-devel] " Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2014-09-11  5:06 [Qemu-devel] [PATCH] kvm: ioapic: conditionally delay irq delivery during eoi broadcast Zhang Haoyu
2014-09-11  6:01 ` Jan Kiszka
2014-09-10 12:32 Zhang Haoyu
2014-09-10 12:52 ` Zhang Haoyu

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=201409112056298025699@sangfor.com \
    --to=zhanghy@sangfor.com \
    --cc=arei.gonglei@huawei.com \
    --cc=jan.kiszka@siemens.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.