To deal with guest shared interrupt bug in in-kernel irqchip, we should:

1. Identify each level trig interrupt source.
2. Implement logical OR on the same IRQ line for each interrupt source.

Here I chose a simple method: the caller of kvm_set_irq() has responsiblity
to identify interrupt sources, and IOAPIC/PIC ensure logical OR on IRQ line.

The alternative method of identify can be: a process to
request/allocate/free device identity, then kvm_set_irq() has responsibility
to identify interrupt sources. But I think it's too complicate and
unnecessary, for the caller of set_irq() should aware of the IRQ state.

The patch treats all userspace devices as one source. This have been ensured
by QEmu, which would ensure logical OR on IRQ line if IRQ line is sharing in
userspace.

Comments are welcome! And patches are untested, due to our boxes are down
during the holiday(and my Linux Desktop in the company also down, have
to post patch with outlook)...

Thanks!
--
regards
Yang, Sheng
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to