From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id 4241A93A0 for ; Wed, 27 Jan 2016 03:24:30 +0100 (CET) Received: by mail-pf0-f176.google.com with SMTP id q63so111849019pfb.1 for ; Tue, 26 Jan 2016 18:24:30 -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; bh=/FQQV+Rs571h22wWfIBaRN+zyP25H0JviMTRySR+irI=; b=Nu56XgzR8y1lNuTVHZ6vLxYc1/KkzNIDy+AXCi36xWFV+WRjNPjWrdyjUwK+sMhQVs +8PI9BhCjEo3PEq+HBnTR4jnRMV8f4AIWrFWVEyEfmTtM3i/pIo+oXzTahgXxhX8SrLp HI1rKPzChSZTRlJ+P8IsJaq2ElGuz35d+ZG54zr71ae2I7gIP9i6nPq02dJzqzI4RERJ jB2Zyn+Ju3fg8WoZ3g7xMF9ef2muXLsT5pdbY1PsX4Kh82upfYq8yv0HI6FHg1rLMFmd jD3m7yWEHCU3GtR2TBQciMHSOJoiNzcADj7mCSh5yVZATw4hbrVlbuLVpgOdBZCkSOPE jQQA== 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; bh=/FQQV+Rs571h22wWfIBaRN+zyP25H0JviMTRySR+irI=; b=XpxKGvfZGoaoGHuvng1SIiTETjKQtL6Xbz5dI19RNudubEAMeXNexxVjOH8ca8i95t PPLZh0MsmLO1hWopjh9yu/4j9o09jAsULmwoBSM6trejSwOv/FIcwiqPIGyErPc/Ii5F IWg8JuEpxdOhaDvpamnaUl2inQUW8m7ptGgsFlToM0pWyEaaOZFC2tisGdM5i6JFpo63 3BjxCTSnS58BPhgeu4+jXI9XjaeSEF0izgTfHkLr0LMx+IC70eOz1LjkK5bJE+UUvMmU /RRoDkUEZC4oxycBCTUkJmwjA3qTqrwAIc9LWuQ+4wsz/Rz4U2+0WeBCLyNQ3LFB00Lr p/Lw== X-Gm-Message-State: AG10YORqPi0nc2YMTvcGCLwyUBAQEwThIGFdc6hMP+6SvL/L2Y8UTjNygaExgT69w5JK6V5ZSp+G8fsN4R67oVc8 MIME-Version: 1.0 X-Received: by 10.98.42.81 with SMTP id q78mr38547436pfq.142.1453861469675; Tue, 26 Jan 2016 18:24:29 -0800 (PST) Received: by 10.66.196.81 with HTTP; Tue, 26 Jan 2016 18:24:29 -0800 (PST) Received: by 10.66.196.81 with HTTP; Tue, 26 Jan 2016 18:24:29 -0800 (PST) In-Reply-To: <1453203972-24855-4-git-send-email-sshukla@mvista.com> References: <1453203972-24855-1-git-send-email-sshukla@mvista.com> <1453203972-24855-4-git-send-email-sshukla@mvista.com> Date: Wed, 27 Jan 2016 07:54:29 +0530 Message-ID: From: Santosh Shukla To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v5 03/11] linuxapp/vfio: ignore mapping for ioport region 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: Wed, 27 Jan 2016 02:24:30 -0000 Ping. On Jan 19, 2016 5:16 PM, "Santosh Shukla" wrote: > vfio_pci_mmap() try to map all pci bars. ioport region are not mapped in > vfio/kernel so ignore mmaping for ioport. > > Signed-off-by: Santosh Shukla > --- > lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > index 74f91ba..abde779 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > @@ -573,6 +573,7 @@ pci_vfio_map_resource(struct rte_pci_device *dev) > struct pci_map *maps; > uint32_t msix_table_offset = 0; > uint32_t msix_table_size = 0; > + uint32_t ioport_bar; > > dev->intr_handle.fd = -1; > dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; > @@ -760,6 +761,25 @@ pci_vfio_map_resource(struct rte_pci_device *dev) > return -1; > } > > + /* chk for io port region */ > + ret = pread64(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar), > + > VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) > + + PCI_BASE_ADDRESS_0 + i*4); > + > + if (ret != sizeof(ioport_bar)) { > + RTE_LOG(ERR, EAL, > + "Cannot read command (%x) from config > space!\n", > + PCI_BASE_ADDRESS_0 + i*4); > + return -1; > + } > + > + if (ioport_bar & PCI_BASE_ADDRESS_SPACE_IO) { > + RTE_LOG(INFO, EAL, > + "Ignore mapping IO port bar(%d) addr: > %x\n", > + i, ioport_bar); > + continue; > + } > + > /* skip non-mmapable BARs */ > if ((reg.flags & VFIO_REGION_INFO_FLAG_MMAP) == 0) > continue; > -- > 1.7.9.5 > >