From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v4] Shared memory uio_pci driver Date: Mon, 12 Apr 2010 23:57:56 +0300 Message-ID: <4BC38954.2000507@redhat.com> References: <1270680720-8457-2-git-send-email-cam@cs.ualberta.ca> <1270681258-9042-1-git-send-email-cam@cs.ualberta.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org To: Cam Macdonell Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33509 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754010Ab0DLU6B (ORCPT ); Mon, 12 Apr 2010 16:58:01 -0400 In-Reply-To: <1270681258-9042-1-git-send-email-cam@cs.ualberta.ca> Sender: kvm-owner@vger.kernel.org List-ID: On 04/08/2010 02:00 AM, Cam Macdonell wrote: > This patch adds a driver for my shared memory PCI device using the uio_pci > interface. The driver has three memory regions. The first memory region is for > device registers for sending interrupts. The second BAR is for receiving MSI-X > interrupts and the third memory region maps the shared memory. The device only > exports the first and third memory regions to userspace. > > This driver supports MSI-X and regular pin interrupts. Currently, the number > of MSI vectors is set to 2 (one for new connections and the other for > interrupts) but it could easily be increased. If MSI is not available, then > regular interrupts will be used. > > This version added formatting and style corrections as well as better > error-checking and cleanup when errors occur. > > There is work now to bring msi to the generic pci 2.3 driver, perhaps we can use that instead. From a quick look it looks fine. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1Qhs-0008EE-48 for qemu-devel@nongnu.org; Mon, 12 Apr 2010 16:58:08 -0400 Received: from [140.186.70.92] (port=48847 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1Qhq-0008BA-61 for qemu-devel@nongnu.org; Mon, 12 Apr 2010 16:58:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1Qhl-00053q-Bu for qemu-devel@nongnu.org; Mon, 12 Apr 2010 16:58:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33346) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1Qhl-00053U-4O for qemu-devel@nongnu.org; Mon, 12 Apr 2010 16:58:01 -0400 Message-ID: <4BC38954.2000507@redhat.com> Date: Mon, 12 Apr 2010 23:57:56 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1270680720-8457-2-git-send-email-cam@cs.ualberta.ca> <1270681258-9042-1-git-send-email-cam@cs.ualberta.ca> In-Reply-To: <1270681258-9042-1-git-send-email-cam@cs.ualberta.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v4] Shared memory uio_pci driver 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 04/08/2010 02:00 AM, Cam Macdonell wrote: > This patch adds a driver for my shared memory PCI device using the uio_pci > interface. The driver has three memory regions. The first memory region is for > device registers for sending interrupts. The second BAR is for receiving MSI-X > interrupts and the third memory region maps the shared memory. The device only > exports the first and third memory regions to userspace. > > This driver supports MSI-X and regular pin interrupts. Currently, the number > of MSI vectors is set to 2 (one for new connections and the other for > interrupts) but it could easily be increased. If MSI is not available, then > regular interrupts will be used. > > This version added formatting and style corrections as well as better > error-checking and cleanup when errors occur. > > There is work now to bring msi to the generic pci 2.3 driver, perhaps we can use that instead. From a quick look it looks fine. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.