On Fri, 2013-06-21 at 17:10 -0600, Alex Williamson wrote: > MSI-X is rather ugly. As you suggest, we trap accesses to the MSI-X > table. We don't know how many vectors the guest is going to use, so we > incrementally add them by disabling and re-enabling with a new vector > count. The host decides what to put in the table, we don't care. All > interrupts bounce through the host and get to the guest via eventfd, > either through qemu or directly through KVM irqfd. > > If an in-use vector is modified, we write the new "MSI route" to KVM, > the host doesn't need to care. If a vector is masked, we free the host > irq handler w/o modifying the vector configuration. There's a comment > in hw/misc/vfio.c that we could also just bounce masked vectors through > qemu and let it drop it if we wanted to completely avoid toggling the > host. Linux currently does not have a usable interface for masking > vectors at the device. Thanks,
Right. It might also be handy to add what Willy's been talking about for a while now, which is an interface to enable/setup individual MSI-X at runtime. Cheers, Ben.