From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [v3 0/5] plumb kvm/vfio to allow getting kvm from vfio_group Date: Mon, 31 Oct 2016 15:35:01 +0800 Message-ID: <107a7936-c2ad-87e5-4fae-1bcf7535d685@linux.intel.com> References: <1477895706-22824-1-git-send-email-jike.song@intel.com> <5816F1AC.7030200@intel.com> <27a83d98-22b8-a4c6-9697-6bc0f0877924@linux.intel.com> <5816F32B.5030708@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: pbonzini@redhat.com, alex.williamson@redhat.com, kwankhede@nvidia.com, cjia@nvidia.com, kevin.tian@intel.com, kvm@vger.kernel.org To: Jike Song Return-path: Received: from mga09.intel.com ([134.134.136.24]:45375 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761614AbcJaHm3 (ORCPT ); Mon, 31 Oct 2016 03:42:29 -0400 In-Reply-To: <5816F32B.5030708@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/31/2016 03:30 PM, Jike Song wrote: > On 10/31/2016 03:24 PM, Xiao Guangrong wrote: >> On 10/31/2016 03:24 PM, Jike Song wrote: >>> On 10/31/2016 03:06 PM, Xiao Guangrong wrote: >>>> >>>> >>>> On 10/31/2016 02:35 PM, Jike Song wrote: >>>>> So far KVM and VFIO are mostly transparent to each other. >>>>> However, there are users who would rely on them both. For >>>>> example, KVMGT relies on VFIO to mediate device operations, >>>>> and it also relies on KVM for features such as guest page >>>>> tracking. To do that, it needs to know which KVM instance >>>>> a vfio_group is attached to. >>>>> >>>>> There is already a kvm_vfio device serving for similar purpose, >>>>> this patchset extend it to allow external usrs like KVMGT to >>>>> get KVM instance from the vfio_group. >>>>> >>>>> >>>>> I picked one of Kirti's patchset from: >>>>> >>>>> https://lkml.org/lkml/2016/10/26/1119 >>>>> >>>>> for the function to get the vfio_group from a given device. >>>>> >>>>> >>>>> Changes v3: >>>>> - don't touch kvm_put_kvm, vfio won't need it >>>> >>>> Do not understand. vfio does not use it indeed, however, the >>>> user of udata, i.e, KVMGT, should put kvm after vfio_group_get_kvm(). >>> >>> Yes, but I guess KVMGT can has symbol-level dependency on KVM :-) >> >> Anyway, kvm_put_kvm() should be exported? > > Yes, current KVM already exported it, so no need to change :-) Ah, sorry, i just briefly followed the changelog without check the code, then it makes sense.