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 14:34:00 +0300 Message-ID: <560D1A28.1010205@scylladb.com> References: <20151001113828-mutt-send-email-mst@redhat.com> <560CF44A.60102@scylladb.com> <20151001120027-mutt-send-email-mst@redhat.com> <560CFB66.5050904@scylladb.com> <20151001124211-mutt-send-email-mst@redhat.com> <560D0413.5080401@scylladb.com> <20151001131754-mutt-send-email-mst@redhat.com> <560D0FE2.7010905@scylladb.com> <20151001135054-mutt-send-email-mst@redhat.com> <560D1705.30300@scylladb.com> <20151001142843-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 F27B58E5A for ; Thu, 1 Oct 2015 13:34:02 +0200 (CEST) Received: by wiclk2 with SMTP id lk2so28637611wic.0 for ; Thu, 01 Oct 2015 04:34:02 -0700 (PDT) In-Reply-To: <20151001142843-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 02:31 PM, Michael S. Tsirkin wrote: > On Thu, Oct 01, 2015 at 02:20:37PM +0300, Avi Kivity wrote: >> >> On 10/01/2015 02:09 PM, Michael S. Tsirkin wrote: >>> On Thu, Oct 01, 2015 at 01:50:10PM +0300, Avi Kivity wrote: >>>>>> It's not just the lack of system calls, of course, the architecture is >>>>>> completely different. >>>>> Absolutely - I'm not saying move all of DPDK into kernel. >>>>> We just need to protect the RX rings so hardware does >>>>> not corrupt kernel memory. >>>>> >>>>> >>>>> Thinking about it some more, many devices >>>>> have separate rings for DMA: TX (device reads memory) >>>>> and RX (device writes memory). >>>>> With such devices, a mode where userspace can write TX ring >>>>> but not RX ring might make sense. >>>> I'm sure you can cause havoc just by reading, if you read from I/O memory. >>> Not talking about I/O memory here. These are device rings in RAM. >> Right. But you program them with DMA addresses, so the device can read >> another device's memory. > It can't if host has limited it to only DMA into guest RAM, which is > pretty common. > Ok. So yes, the tx ring can be mapped R/W.