From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] uio: add irq control support to uio_pci_generic Date: Thu, 16 Apr 2015 14:21:10 -0700 Message-ID: <20150416142110.2fc80b15@urahara> References: <20150415095934.09966367@urahara> <20150416094105-mutt-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "Hans J. Koch" , Greg Kroah-Hartman , kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mail-pd0-f176.google.com ([209.85.192.176]:34738 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbbDPVVH (ORCPT ); Thu, 16 Apr 2015 17:21:07 -0400 Received: by pdbqa5 with SMTP id qa5so105187162pdb.1 for ; Thu, 16 Apr 2015 14:21:06 -0700 (PDT) In-Reply-To: <20150416094105-mutt-send-email-mst@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 16 Apr 2015 09:43:24 +0200 "Michael S. Tsirkin" wrote: > On Wed, Apr 15, 2015 at 09:59:34AM -0700, Stephen Hemminger wrote: > > The driver already supported INTX interrupts but had no in kernel > > function to enable and disable them. > > > > It is possible for userspace to do this by accessing PCI config > > directly, but this racy > > How is it racy? We have userspace using this interface, > if there's a race I want to fix it. There is nothing to prevent two threads in user space doing read/modify write at the same time. The bigger issue is that DPDK needs to support multiple UIO interface types. And with current model there is no abstraction. The way to enable/disable IRQ is different depending on the UIO drivers.