From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39935 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODAUo-0001Ap-Ex for qemu-devel@nongnu.org; Sat, 15 May 2010 02:05:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODAUm-0004Om-Vy for qemu-devel@nongnu.org; Sat, 15 May 2010 02:05:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11792) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODAUm-0004OW-NH for qemu-devel@nongnu.org; Sat, 15 May 2010 02:05:08 -0400 Message-ID: <4BEE398C.3070004@redhat.com> Date: Sat, 15 May 2010 09:05:00 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1271872408-22842-1-git-send-email-cam@cs.ualberta.ca> <1271872408-22842-2-git-send-email-cam@cs.ualberta.ca> <1271872408-22842-3-git-send-email-cam@cs.ualberta.ca> <1271872408-22842-4-git-send-email-cam@cs.ualberta.ca> <1271872408-22842-5-git-send-email-cam@cs.ualberta.ca> <4BE7F517.5010707@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v5 4/5] Inter-VM shared memory PCI device List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cam Macdonell Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 05/14/2010 12:10 AM, Cam Macdonell wrote: > On Mon, May 10, 2010 at 5:59 AM, Avi Kivity wrote: > >> On 04/21/2010 08:53 PM, Cam Macdonell wrote: >> > >>> + >>> + /* allocate/initialize space for interrupt handling */ >>> + s->eventfds = qemu_mallocz(s->nr_alloc_guests * sizeof(int *)); >>> + s->eventfd_table = qemu_mallocz(s->vectors * >>> sizeof(EventfdEntry)); >>> + s->eventfds_posn_count = qemu_mallocz(s->nr_alloc_guests * >>> sizeof(int)); >>> + >>> + pci_conf[PCI_INTERRUPT_PIN] = 1; /* we are going to support >>> interrupts */ >>> >>> >> This is done by the guest BIOS. >> >> >> > If I remove that line, my driver crashes when it falls back to > pin-based interrupts (when MSI is turned off). Is there something in > the device driver that I need to set in place of this? A number of > other devices (mostly network cards) set the interrupt pin this way, > so I'm a little confused. > Sorry, I confused this with PCI_INTERRUPT_LINE. Note there is a helper to set it, pci_config_set_interrupt_pin(). -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.