From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 53619567C for ; Mon, 18 Jan 2016 07:09:27 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 17 Jan 2016 22:09:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,311,1449561600"; d="scan'208";a="635323166" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by FMSMGA003.fm.intel.com with ESMTP; 17 Jan 2016 22:09:25 -0800 Date: Mon, 18 Jan 2016 14:11:25 +0800 From: Yuanhan Liu To: Santosh Shukla Message-ID: <20160118061125.GW19531@yliu-dev.sh.intel.com> References: <1452778117-30178-1-git-send-email-sshukla@mvista.com> <1452778117-30178-9-git-send-email-sshukla@mvista.com> <20160115062726.GS19531@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v4 08/14] virtio: pci: extend virtio pci rw api for vfio interface 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: Mon, 18 Jan 2016 06:09:28 -0000 On Fri, Jan 15, 2016 at 07:12:04PM +0530, Santosh Shukla wrote: > On Fri, Jan 15, 2016 at 6:13 PM, Santosh Shukla wrote: > > On Fri, Jan 15, 2016 at 11:57 AM, Yuanhan Liu > > wrote: > >> On Thu, Jan 14, 2016 at 06:58:31PM +0530, Santosh Shukla wrote: > >>> So far virtio handle rw access for uio / ioport interface, This patch to extend > >>> the support for vfio interface. For that introducing private struct > >>> virtio_vfio_dev{ > >>> - is_vfio > >>> - pci_dev > >>> }; > >>> Signed-off-by: Santosh Shukla > >> ... > >>> +/* For vfio only */ > >>> +struct virtio_vfio_dev { > >>> + bool is_vfio; /* True: vfio i/f, > >>> + * False: not a vfio i/f > >> > >> Well, this is weird; you are adding a flag to tell whether it's a > >> vfio device __inside__ a vfio struct. > >> > >> Back to the topic, this flag is not necessary to me: you can > >> check the pci_dev->kdrv flag. > >> > > > > yes, I'll replace is_vfio with pci_dev->kdrv. > > > >>> + */ > >>> + struct rte_pci_device *pci_dev; /* vfio dev */ > >> > >> Note that I have already added this field into virtio_hw struct > >> at my latest virtio 1.0 pmd patchset. > >> > >> While I told you before that you should not develop patches based > >> on my patcheset, I guess you can do that now. Since it should be > >> in good shape and close to be merged. > > > > Okay, Before rebasing my v5 patch on your 1.0 virtio patch, I like to > > understand which qemu version support virtio 1.0 spec? > > Ignore, I figured out in other thread, > qemu version >2.4, such as 2.4.1 or 2.5.0. It will not matter. You can continue using the old legacy virtio, which is the default case: my patchset keeps the backward compatibility. What's worty noting is that virtio 1.0 uses memory mmaped bar space for configuration, instead of ioport reading/writing. Therefore, I'd suggest you to keep testing with legacy virtio, to make sure the VFIO stuff works. And off course, virtio 1.0 testing is also welcome, to make sure it works on ARM as well. --yliu