lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] kvm: fast-path msi injection with irqfd
On 11/18/2010 03:03 PM, Michael S. Tsirkin wrote:
> > > int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level);
> > >+int kvm_set_msi(struct kvm_kernel_irq_routing_entry *irq_entry, struct kvm *kvm,
> > >+ int irq_source_id, int level);
> >
> > No point in the level argument for an msi specific function.
>
> This is an existing function I made non-static.
> We have per-gsi callbacks so level is required there to match.

Right.

> I could add a wrapper I guess:
>
> int kvm_set_msi(struct kvm_kernel_irq_routing_entry *irq_entry, struct kvm *kvm,
> int irq_source_id, int level)
> {
> if (!level)
> return -1;
> return kvm_send_msi(irq_entry, kvm, irq_source_id);
> }
>
> This results in less code for irqfd but more code for ioctl injection
> ... is it worth it?

IMO not.

> >
> > 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?

Yes. Either precompute, or compute on first use and cache. Precompute
is more realtime-friendly so I prefer it.

--
error compiling committee.c: too many arguments to function



\
 
 \ /
  Last update: 2010-11-18 14:11    [from the cache]
©2003-2011 Jasper Spaans