From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
Gregory Haskins <ghaskins@novell.com>,
Chris Lalancette <clalance@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] kvm: fast-path msi injection with irqfd
Date: Thu, 18 Nov 2010 16:39:45 +0200 [thread overview]
Message-ID: <20101118143945.GR7948@redhat.com> (raw)
In-Reply-To: <20101118134843.GC8247@redhat.com>
On Thu, Nov 18, 2010 at 03:48:43PM +0200, Michael S. Tsirkin wrote:
> On Thu, Nov 18, 2010 at 03:35:01PM +0200, Gleb Natapov wrote:
> > On Thu, Nov 18, 2010 at 03:20:27PM +0200, Michael S. Tsirkin wrote:
> > > On Thu, Nov 18, 2010 at 03:14:53PM +0200, Gleb Natapov wrote:
> > > > On Thu, Nov 18, 2010 at 03:03:37PM +0200, Michael S. Tsirkin wrote:
> > > > > > >+static inline void kvm_irq_routing_update(struct kvm *kvm,
> > > > > > >+ struct kvm_irq_routing_table *irq_rt)
> > > > > > >+{
> > > > > > >+ rcu_assign_pointer(kvm->irq_routing, irq_rt);
> > > > > > >+}
> > > > > > >+
> > > > > > > static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
> > > > > > > {
> > > > > > > return -ENOSYS;
> > > > > >
> > > > > > Apart from these minor issues, looks good.
> > > > >
> > > > >
> > > > > Something we should consider improving is the loop over all VCPUs that
> > > > > kvm_irq_delivery_to_apic invokes. I think that (for non-broadcast
> > > > > interrupts) it should be possible to precompute an store the CPU
> > > > > in question as part of the routing entry.
> > > > >
> > > > > Something for a separate patch ... comments?
> > > > >
> > > > I do not think this info should be part of routing entry. Routing entry
> > > > is more about describing wires on the board.
> > >
> > > Not for msi. kvm_kernel_irq_routing_entry seems to just keep an
> > > address/data pair in that case. So
> > >
> > Yeah. Using routing_entry for MSI was miss design. We discussed that too :)
> >
> > > union {
> > > struct {
> > > unsigned irqchip;
> > > unsigned pin;
> > > } irqchip;
> > > struct msi_msg msi;
> > > };
> > >
> > > would become
> > >
> > > union {
> > > struct {
> > > unsigned irqchip;
> > > unsigned pin;
> > > } irqchip;
> > > struct {
> > > struct msi_msg msi;
> > > struct kvm_vpcu *dest;
> > > } msi;
> > > };
> > >
> > > or something like this.
> > Ah so you want to do it only for MSI? For MSI it makes sense. Remember
> > though that sometimes destination depend on message itself (specifically
> > on delivery mode).
>
> Of course. We'll take message/data and precompute destination.
> Set to NULL for e.g. broadcast and recompute at injection time
> in that case. BTW SELF doesn't work for MSI at the moment, not sure
> whether it's relevant or when is it used.
>
Yes, only lowest prio is defined for MSI. Self or all but self has
not meaning for MSI.
--
Gleb.
prev parent reply other threads:[~2010-11-18 14:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 22:12 [PATCH RFC] kvm: fast-path msi injection with irqfd Michael S. Tsirkin
2010-11-18 9:05 ` Gleb Natapov
2010-11-18 9:16 ` Michael S. Tsirkin
2010-11-18 9:20 ` Gleb Natapov
2010-11-18 9:34 ` Michael S. Tsirkin
2010-11-18 10:04 ` Gleb Natapov
2010-11-18 9:55 ` Avi Kivity
2010-11-18 10:57 ` Michael S. Tsirkin
2010-11-18 11:03 ` Avi Kivity
2010-11-18 11:10 ` Michael S. Tsirkin
2010-11-18 12:29 ` Avi Kivity
2010-11-18 13:03 ` Michael S. Tsirkin
2010-11-18 13:09 ` Avi Kivity
2010-11-18 13:14 ` Gleb Natapov
2010-11-18 13:18 ` Avi Kivity
2010-11-18 13:20 ` Michael S. Tsirkin
2010-11-18 13:35 ` Gleb Natapov
2010-11-18 13:39 ` Avi Kivity
2010-11-18 13:49 ` Michael S. Tsirkin
2010-11-18 13:48 ` Michael S. Tsirkin
2010-11-18 14:39 ` Gleb Natapov [this message]
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=20101118143945.GR7948@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=clalance@redhat.com \
--cc=ghaskins@novell.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=xiaoguangrong@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox