From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance Date: Thu, 1 Oct 2015 13:23:52 +0300 Message-ID: <560D09B8.2050407@scylladb.com> References: <560BF782.4070308@scylladb.com> <20150930175848-mutt-send-email-mst@redhat.com> <560C0171.7080507@scylladb.com> <20150930204016.GA29975@redhat.com> <20151001113828-mutt-send-email-mst@redhat.com> <560CF44A.60102@scylladb.com> <20151001120027-mutt-send-email-mst@redhat.com> <560CFB66.5050904@scylladb.com> <560CFFFF.4000601@6wind.com> <560D0059.5050003@scylladb.com> <20151001130844-mutt-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Michael S. Tsirkin" Return-path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id 1EBA95A86 for ; Thu, 1 Oct 2015 12:23:56 +0200 (CEST) Received: by wicfx3 with SMTP id fx3so21371250wic.0 for ; Thu, 01 Oct 2015 03:23:56 -0700 (PDT) In-Reply-To: <20151001130844-mutt-send-email-mst@redhat.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/01/2015 01:14 PM, Michael S. Tsirkin wrote: > On Thu, Oct 01, 2015 at 12:43:53PM +0300, Avi Kivity wrote: >>> There were some tentative to get it for other (older) drivers, named >>> 'bifurcated drivers', but it is stalled. >> IIRC they still exposed the ring to userspace. > How much would a ring write syscall cost? 1-2 microseconds, isn't it? > Measureable, but it's not the end of the world. Plus a page table walk per packet fragment (dpdk has the physical address prepared in the mbuf IIRC). The 10Mpps+ users of dpdk should comment on whether the performance hit is acceptable (my use case is much more modest). > ring read might be safe to allow. > Should buy us enough time until hypervisors support IOMMU. All the relevant drivers need to be converted to support ring translation, and exposing the ring to userspace in the new API. It shouldn't take more than 3-4 years. Meanwhile, users of virtualized systems that need interrupt support cannot use their machines, while non-virtualized users are free to DMA wherever they like, in the name of security. btw, an API like you describe already exists -- vhost. Of course the virtio protocol is nowhere near fast enough, but at least it's an example.