Re: [PATCH 1/4] KVM: Using kfifo for irq recording

Avi Kivity
2008-12-25T11:07:26Z

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

> @@ -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.

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