Re: [PATCH 3/8] KVM: Handle device assignment to guests

Ben-Ami Yassour
2008-07-17T18:02:52Z

On Thu, 2008-07-17 at 11:31 +0300, Avi Kivity wrote:
> Ben-Ami Yassour wrote:
> >>>>> +
> >>>>> +/* FIXME: Implement the OR logic needed to make shared interrupts
> >>>>> on + * this line behave properly + */
> >>>>>
> >>>>>
> >>>>>
> >>>> Isn't this a showstopper? There is no easy way for a user to avoid
> >>>> sharing, especially as we have only three pci irqs at present.
> >>>>
> > What do you mean by only 3 (for passthrough we use whatever interrupt
> > the host is using for that device)?
> >
> >
>
> There are two issue:
> - shared host interrupts
> - shared guest interrupts
>
> For shared host interrupts, I don't think there's a cost-effective
> solution, especially as hosts are transitioning to MSI. But the problem
> the comment describes is shared guest interrupts, where the assigned
> device's interrupt is shared with another device (assigned or virtual).
>
> And currently we only have three shareable interrupts: 5, 10, and 11.
>
> See qemu's pci_set_irq() for the logic used to share interrupts.

I think we'll leave this issue until we fix the more basic comments. In
any case, how can we make qemu configure the assigned device to share an
interrupt with another device (assigned or virtual)?

Thanks,
Ben