From: Kirti Wankhede Subject: Re: [PATCH v6 1/4] vfio: Mediated device Core driver Date: Fri, 5 Aug 2016 11:43:25 +0530 Message-ID: References: <1470251034-1555-1-git-send-email-kwankhede@nvidia.com> <1470251034-1555-2-git-send-email-kwankhede@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "Song, Jike" , "bjsdjshi@linux.vnet.ibm.com" To: "Tian, Kevin" , "alex.williamson@redhat.com" , "pbonzini@redhat.com" , "kraxel@redhat.com" , "cjia@nvidia.com" Return-path: Received: from hqemgate16.nvidia.com ([216.228.121.65]:16092 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965694AbcHEGNo (ORCPT ); Fri, 5 Aug 2016 02:13:44 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 8/4/2016 12:51 PM, Tian, Kevin wrote: >> From: Kirti Wankhede [mailto:kwankhede@nvidia.com] >> Sent: Thursday, August 04, 2016 3:04 AM >> >> >> 2. Physical device driver interface >> This interface provides vendor driver the set APIs to manage physical >> device related work in their own driver. APIs are : >> - supported_config: provide supported configuration list by the vendor >> driver >> - create: to allocate basic resources in vendor driver for a mediated >> device. >> - destroy: to free resources in vendor driver when mediated device is >> destroyed. >> - reset: to free and reallocate resources in vendor driver during reboot > > Currently I saw 'reset' callback only invoked from VFIO ioctl path. Do > you think whether it makes sense to expose a sysfs 'reset' node too, > similar to what people see under a PCI device node? > All vendor drivers might not support reset of mdev from sysfs. But those who want to support can expose 'reset' node using 'mdev_attr_groups' of 'struct parent_ops'. >> - start: to initiate mediated device initialization process from vendor >> driver >> - shutdown: to teardown mediated device resources during teardown. > > I think 'shutdown' should be 'stop' based on actual code. > Thanks for catching that, yes I missed to updated here. Thanks, Kirti > Thanks > Kevin >