Right, this is how it should work. All the gunk in userspace.
One thing I thought of trying to get this generic is to use file
descriptors as irq handles. So:
- userspace exposes a PCI device (same as today)
- guest configures its PCI IRQ (using MSI if it supports it)
- userspace handles this by calling KVM_IRQ_FD which converts the irq to
a file descriptor
- userspace passes this fd to the kernel, or another userspace process
- end user triggers guest irqs by writing to this fd
We could do the same with hypercalls:
- guest and host userspace negotiate hypercall use through PCI config space
- userspace passes an fd to the kernel
- whenever the guest issues an hypercall, the kernel writes the
arguments to the fd
- other end (in kernel or userspace) processes the hypercall
It seems to me this already exists, it's the qemu device model.
The host kernel doesn't need any knowledge of how the devices are
connected, even if it does implement some of them.
I'd agree with all this if I actually saw a constraint in PCI. But I don't.
Don't. Though I thing you do, even multiple interrupts per device.
Don't use them.
So use hypercalls.
Given that we have PCI, why would we do an alternative?
It works, it works with Windows, the nasty stuff is in userspace. Why
expend effort on an alternative? Instead make it go faster.
The kernel need know nothing about PCI, so I don't see how you work this
out.
You've stated it, but failed to provide arguments for it.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html