From: Sheng Yang <sheng@linux.intel.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 1/4] KVM: Using kfifo for irq recording
Date: Thu, 25 Dec 2008 19:27:38 +0800 [thread overview]
Message-ID: <200812251927.39118.sheng@linux.intel.com> (raw)
In-Reply-To: <4953696A.5070307@redhat.com>
On Thursday 25 December 2008 19:07:22 Avi Kivity wrote:
> Sheng Yang wrote:
> > For MSI-X, we have to deal with multiply IRQ with same IRQ handler, so
> > it's necessary to record the IRQ that trigger the IRQ handler.
>
> Does MSI-X disallowing coalescing two requests into one interrupt? Or
> can we still coalesce interrupts (perhaps by recording them as a (irq,
> cpu) pair?)
Disallow? Not quite understand. PCI spec said OS don't need to ensure the
sequence they handled is the same as they happened. This struct is used just
because we lost information of irq after schedule_work...
> > @@ -313,6 +314,9 @@ struct kvm_assigned_dev_kernel {
> > int host_irq;
> > bool host_irq_disabled;
> > int guest_irq;
> > +#define KVM_ASSIGNED_DEV_IRQ_FIFO_LEN 0x100
> > + struct kfifo *irq_fifo;
> > + spinlock_t irq_fifo_lock;
> > #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0)
>
> What if it runs out?
>
> What does real hardware do? I'm sure it doesn't have a 100-entry queue.
0x100 is just a simple number which I thought different interrupts of same
MSI-X device can happen at same period(indeed it's 0x100/sizeof(int)). Maybe
not that many. And it just used by work function later to find what guest
vector is, and then inject the correlated interrupt to the guest.
If hardware device driver also postpone the work, I think it also need
something like this.
--
regards
Yang, Sheng
next prev parent reply other threads:[~2008-12-25 11:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-23 8:12 [PATCH 0/4] MSI-X Enabling Sheng Yang
2008-12-23 8:12 ` [PATCH 1/4] KVM: Using kfifo for irq recording Sheng Yang
2008-12-25 11:07 ` Avi Kivity
2008-12-25 11:27 ` Sheng Yang [this message]
2008-12-25 13:26 ` Avi Kivity
2008-12-26 1:53 ` Sheng Yang
2008-12-23 8:12 ` [PATCH 2/4] KVM: Add intercepted MMIO for KVM Sheng Yang
2008-12-23 8:12 ` [PATCH 3/4] KVM: x86: displace MMIO handling part Sheng Yang
2008-12-23 8:12 ` [PATCH 4/4] KVM: Enable MSI-X for KVM assigned device Sheng Yang
2008-12-23 20:19 ` [PATCH 0/4] MSI-X Enabling Marcelo Tosatti
2008-12-24 3:00 ` Sheng Yang
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=200812251927.39118.sheng@linux.intel.com \
--to=sheng@linux.intel.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox