On Wed, Jun 03, 2015 at 11:38:21AM +0200, Paolo Bonzini wrote: > However, why is the roundtrip to userspace necessary? Could you pass > the extint index directly as an argument to KVM_INTERRUPT? It's > backwards-compatible, because KVM_INTERRUPT so far could not be used > together with an in-kernel LAPIC. If you could do that, you could also > avoid the new userspace_extint_available field. This is possible, and definitely simpler, but not accurate to the spec. In general, the PIC fires an INT, which leads to the CPU responding with and INTA, and fetching the interrupt vector. It might not be strictly necessary for this handshake to occur, but it is how the hardware did it originally. In certain cases, having the interface modelled after the hardware is convenient. For example, devices can send external interrupt MSIs, which require an Interrupt Ack to fetch the vector. They're a bit weird, and I have absolutely no idea why someone would want these, but they are a definitely a thing. Looking back at KVM though, it doesn't look like KVM even supports these, so this may not be a real issue. Eliding the roundtrip might be acceptable. It's certainly simpler. > Userspace can figure out who's the BSP. The rendez-vous between the > irqchip and the BSP's VCPU thread is still needed, but it can be done > entirely in userspace. Good point. I'll push this up into userspace. -- 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