From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [RFC PATCH v4 2/3] VFIO driver for mediated PCI device Date: Fri, 27 May 2016 09:13:18 -0600 Message-ID: <20160527091318.175000c2@t450s.home> References: <1464119897-10844-1-git-send-email-kwankhede@nvidia.com> <1464119897-10844-3-git-send-email-kwankhede@nvidia.com> <83a9d95a-a7a9-4e86-907f-5e42cf99de8e@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Kirti Wankhede , "pbonzini@redhat.com" , "kraxel@redhat.com" , "cjia@nvidia.com" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "Ruan, Shuai" , "Song, Jike" , "Lv, Zhiyuan" , "bjsdjshi@linux.vnet.ibm.com" To: "Tian, Kevin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44126 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754274AbcE0PNT (ORCPT ); Fri, 27 May 2016 11:13:19 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 27 May 2016 10:03:31 +0000 "Tian, Kevin" wrote: > > From: Kirti Wankhede > > Sent: Wednesday, May 25, 2016 9:05 PM > > > > > > >> +{ > > >> + int ret = -EINVAL; > > >> + struct phy_device *phy_dev = mdevice->phy_dev; > > >> + > > >> + if (dev_is_pci(phy_dev->dev) && phy_dev->ops->get_region_info) { > > >> + mutex_lock(&mdevice->ops_lock); > > >> + ret = phy_dev->ops->get_region_info(mdevice, index, > > >> + vfio_region_info); > > >> + mutex_unlock(&mdevice->ops_lock); > > >> + } > > >> + return ret; > > >> +} > > >> + > > >> +static int mdev_read_base(struct vfio_mdevice *vdev) > > > > > > similar as earlier comment - vdev or mdev? > > > > > > > Here vdev is of type 'vfio_mdevice', that's why vdev, mdev doesn't suit > > here. Changing it to 'vmdev' in next patch set. > > > > 'vmdev' looks more confusing... :-) > > Alex, can you give your thought here? I don't see any problem with vmdev personally, are you unhappy with it because it includes 'vm'? It seems like it has a valid rationale, so long as it's used consistently, I'm happy. Thanks, Alex From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6JRz-00046I-SR for qemu-devel@nongnu.org; Fri, 27 May 2016 11:13:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6JRv-0003Vq-ML for qemu-devel@nongnu.org; Fri, 27 May 2016 11:13:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6JRv-0003Vf-G9 for qemu-devel@nongnu.org; Fri, 27 May 2016 11:13:19 -0400 Date: Fri, 27 May 2016 09:13:18 -0600 From: Alex Williamson Message-ID: <20160527091318.175000c2@t450s.home> In-Reply-To: References: <1464119897-10844-1-git-send-email-kwankhede@nvidia.com> <1464119897-10844-3-git-send-email-kwankhede@nvidia.com> <83a9d95a-a7a9-4e86-907f-5e42cf99de8e@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v4 2/3] VFIO driver for mediated PCI device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Tian, Kevin" Cc: Kirti Wankhede , "pbonzini@redhat.com" , "kraxel@redhat.com" , "cjia@nvidia.com" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "Ruan, Shuai" , "Song, Jike" , "Lv, Zhiyuan" , "bjsdjshi@linux.vnet.ibm.com" On Fri, 27 May 2016 10:03:31 +0000 "Tian, Kevin" wrote: > > From: Kirti Wankhede > > Sent: Wednesday, May 25, 2016 9:05 PM > > > > > > >> +{ > > >> + int ret = -EINVAL; > > >> + struct phy_device *phy_dev = mdevice->phy_dev; > > >> + > > >> + if (dev_is_pci(phy_dev->dev) && phy_dev->ops->get_region_info) { > > >> + mutex_lock(&mdevice->ops_lock); > > >> + ret = phy_dev->ops->get_region_info(mdevice, index, > > >> + vfio_region_info); > > >> + mutex_unlock(&mdevice->ops_lock); > > >> + } > > >> + return ret; > > >> +} > > >> + > > >> +static int mdev_read_base(struct vfio_mdevice *vdev) > > > > > > similar as earlier comment - vdev or mdev? > > > > > > > Here vdev is of type 'vfio_mdevice', that's why vdev, mdev doesn't suit > > here. Changing it to 'vmdev' in next patch set. > > > > 'vmdev' looks more confusing... :-) > > Alex, can you give your thought here? I don't see any problem with vmdev personally, are you unhappy with it because it includes 'vm'? It seems like it has a valid rationale, so long as it's used consistently, I'm happy. Thanks, Alex