On 11/09/2010 08:36 PM, Alex Williamson wrote:
>
> Note: all this kvm_set_irq(..., [01]) is incorrect as it doesn't account
> for polarity. Currently the qemu-emulated chipset uses level high pci
> interrupts, but that's not a given from kvm's point of view.
>
> I think vfio fixes this by only routing msi interrupts via the kernel,
> and routing level interrupts through userspace, which can adjust
> polarity. Alex/Michael?
The latest patches will route legacy interrupts via irqfd if available
too. We do have the issue that KVM pulses interrupts injected this way,
but it seems to work nonetheless.
That doesn't sound too good.
I was thinking about proposing a
level flag for set_irqfd to only set it, allowing the ack notifier to
deassert it. Perhaps we also need a flag to toggle the polarity.
Or maybe irqfd is not up to this task.
I'd rather stick with the ordinary ioctls for this until proven they're
too slow. By proven, I mean a userspace irq forwarding implementation
that doesn't suck like we it does now (can be just a prototype).
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html