From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50087 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOXf4-0005LY-9s for qemu-devel@nongnu.org; Tue, 15 Jun 2010 11:02:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOXf2-0008JX-1A for qemu-devel@nongnu.org; Tue, 15 Jun 2010 11:02:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2741) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOXf1-0008JM-OO for qemu-devel@nongnu.org; Tue, 15 Jun 2010 11:02:43 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5FF2goG020776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Jun 2010 11:02:42 -0400 Date: Tue, 15 Jun 2010 17:58:08 +0300 From: "Michael S. Tsirkin" Message-ID: <20100615145808.GF3120@redhat.com> 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> <4C1784C2.2040604@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C1784C2.2040604@redhat.com> 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: Paolo Bonzini Cc: Jes Sorensen , qemu-devel 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.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 I'm fine with this change.