On Tue, Jun 15, 2010 at 03:48:50PM +0200, Paolo Bonzini wrote: > On 06/15/2010 03:40 PM, Jes Sorensen wrote: >> On 06/15/10 15:31, Paolo Bonzini wrote: >>> On 06/15/2010 01:04 PM, jes.soren...@redhat.com wrote: >>>> From: Jes Sorensen<jes.soren...@redhat.com> >>>> >>>> Only call kvm_set_irqfd() if CONFIG_KVM is defined to avoid breaking >>>> the build for non x86. >>> >>> You can just add a stub to kvm-stub.c that returns -ENOSYS. >>> >>> Paolo >> >> It's more than that, the code also uses bits in the msix code that isn't >> globally available. > > I see now. BTW, my eventnotifier series conflicts with this part of > qemu-kvm, so it's probably better if I work that series out in qemu-kvm > first and then upstream. As I would touch this code anyway, I think > your patch is fine even if it were be only a stopgap measure. > > Maybe the right fix, which I could include in my series, is to change > kvm_set_irqfd's calling convention to be like this: > > int r = kvm_set_irqfd(&dev->msix_irq_entries[vector], > event_notifier_get_fd(notifier), > !masked); > > and extract the gsi in the function. Michael, does this make any sense? > > Paolo
I'm fine with this change.