From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by dpdk.org (Postfix) with ESMTP id 0312E594B for ; Tue, 29 Dec 2015 13:23:26 +0100 (CET) Received: by mail-pf0-f174.google.com with SMTP id 65so82359706pff.3 for ; Tue, 29 Dec 2015 04:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=tQcC1SEiDLDOWEqdi/pF6A40+XgWerPe67m2ectl+4w=; b=0Un2n6Lt3ERJ6lI/rUF4FNmu14JtyBYJA2q2Vq6eWrE62s7JYVSamgUrmc1V8Zd/eP yeV7HgFb5T4lCs3dZXGGJGF6jvYRcfz9OBeHw0caTIl0+yLZJQmiY74ljLdjxjUbFVI2 qaGjul+7H0RLXU0NqHUltcUuvQEzi7De7LJU7XIeW7ib5SZhmEt7+i9R4u9M/Gn2tKcP AVT5lnP60B1DVNdus0Hh+cQ3f8J+QNsR4rAnt3BQF+VndKSpr9I4dRprTuM9G/9ZH2ba Vpp/zfId3mRbyA6VBd3j7bQpTc9OzfSfcRwaWR4R5PGWAMaSlcDc62sll6tsvuOmDl/l HaiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=tQcC1SEiDLDOWEqdi/pF6A40+XgWerPe67m2ectl+4w=; b=DnsItSL16HLwp75hAURrs258Aa300sF7PxRSCzaBgF3p+oAVFF+LZMB1g1E2ZaSLAB hw/NE1HO0wKWFw7U7zCUrKb0L29NG/nuPlK5fqHyuIBfTpqtZA5wQdhhDL8e3aFfO/Gc p9zqTRW8zaNqJdYR0bgbcY4OOhTRKRVRKiJ4TIUQbaqSwe96wtnSBph2nOA6s6mJ8M+2 w+E1DOesHaBkPr3bK3TqjmEqz33ZiFYvtvKAHQgRVuOqP0kpwTmxpVsHR7mtlLUchvJK zBcSOIfsidPZQ5jPAp9l6OKt5EildGf8+x777uWE/HqhLe/lx66ageDoesO7ezLfvIj/ j5oQ== X-Gm-Message-State: ALoCoQkq7O2RqrQzos3nE/b1+Qio8xhQz9z0InxmXXryvA5+YAivVG8O+JP9NOZibJ1B1YfOhWE+1EWnoLvwq4gAzozp497TaZOoFSiLnJd5yhDiblWDDA8= MIME-Version: 1.0 X-Received: by 10.98.16.80 with SMTP id y77mr71106333pfi.155.1451391805296; Tue, 29 Dec 2015 04:23:25 -0800 (PST) Received: by 10.66.196.81 with HTTP; Tue, 29 Dec 2015 04:23:25 -0800 (PST) In-Reply-To: References: <2241331.HNmyzf8foi@xps13> <2979402.yeVYlcCDUH@xps13> <20151218053053.GL29571@yliu-dev.sh.intel.com> <20151218082139.GC18863@yliu-dev.sh.intel.com> Date: Tue, 29 Dec 2015 17:53:25 +0530 Message-ID: From: Santosh Shukla To: "Burakov, Anatoly" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "alex.williamson@redhat.com" Subject: Re: [dpdk-dev] [PATCH] eal: map io resources for non x86 architectures X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2015 12:23:26 -0000 On Tue, Dec 29, 2015 at 4:36 PM, Burakov, Anatoly wrote: > Hi Santosh, > >> Look at kernel/resource.c, it exports two symbol ioport_resource and >> iomem_resource and sets appropriate flag type i.e.. IORESOURCE_IO and >> IORESOURCE_MEM. In virtio-net case; it creates both pci region i.e.. >> _io bar and _mem bar. dpdk virtio pmd driver (<=3D 0.95 virtio spec) use= s pci >> _io bar region for device initialization as virtio headers are locate at= pci _io bar >> region. Since it uses pci _iobar region so likely it update >> pci_resource.[index].flag =3D IORESOURCE_IO. and vfio mmap function won= t >> handle ioresource_io (i guess). And that is why I asked same to lkml thr= ead. > > Yes, I can see that this is what I was misunderstanding (that IORESOURCE_= IO isn't a BAR but rather a flag). Technically, if you also set IORESOURCE_= MEM along with IORESOURCE_IO, then the BAR would be mapped by VFIO, but thi= s sounds like a dangerous hack :) other than that, yes, I'm afraid it's up = to kernel guys to add support for it. Once done, provided IO BARs are meant= to be worked with the same way as MEM BARs, there's a good chance it would= work out of the box with DPDK. > I guess so, I'll give it a try; although before that I need to port / use your vfio/noiommu patch for virtio pmd driver and perhaps do dependant changes, I will post my test feedback. Thanks > Thanks, > Anatoly