From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48890 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOWVf-0000D8-6E for qemu-devel@nongnu.org; Tue, 15 Jun 2010 09:49:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOWVa-0001hf-On for qemu-devel@nongnu.org; Tue, 15 Jun 2010 09:48:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41591) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOWVa-0001hU-IG for qemu-devel@nongnu.org; Tue, 15 Jun 2010 09:48:54 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5FDmqNC010259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Jun 2010 09:48:52 -0400 Message-ID: <4C1784C2.2040604@redhat.com> Date: Tue, 15 Jun 2010 15:48:50 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1276599879-22749-1-git-send-email-Jes.Sorensen@redhat.com> <1276599879-22749-2-git-send-email-Jes.Sorensen@redhat.com> <4C1780B1.30705@redhat.com> <4C1782CE.5050105@redhat.com> In-Reply-To: <4C1782CE.5050105@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/7] Only call kvm_set_irqfd() if CONFIG_KVM is defined List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen , "Michael S. Tsirkin" , qemu-devel 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.Sorensen@redhat.com wrote: >>> From: Jes Sorensen >>> >>> 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