From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Date: Wed, 6 Jul 2016 10:35:18 +0800 Message-ID: <577C6E66.60601@linux.intel.com> References: <1467291711-3230-1-git-send-email-pbonzini@redhat.com> <20160705054147.GA27138@nvidia.com> <577C664E.3080802@linux.intel.com> <20160706021839.GA9064@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Kirti Wankhede , Andrea Arcangeli , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= To: Neo Jia Return-path: Received: from mga03.intel.com ([134.134.136.65]:19770 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbcGFCjG (ORCPT ); Tue, 5 Jul 2016 22:39:06 -0400 In-Reply-To: <20160706021839.GA9064@nvidia.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/06/2016 10:18 AM, Neo Jia wrote: > On Wed, Jul 06, 2016 at 10:00:46AM +0800, Xiao Guangrong wrote: >> >> >> On 07/05/2016 08:18 PM, Paolo Bonzini wrote: >>> >>> >>> On 05/07/2016 07:41, Neo Jia wrote: >>>> On Thu, Jun 30, 2016 at 03:01:49PM +0200, Paolo Bonzini wrote: >>>>> The vGPU folks would like to trap the first access to a BAR by se= tting >>>>> vm_ops on the VMAs produced by mmap-ing a VFIO device. The fault= handler >>>>> then can use remap_pfn_range to place some non-reserved pages in = the VMA. >>>>> >>>>> KVM lacks support for this kind of non-linear VM_PFNMAP mapping, = and these >>>>> patches should fix this. >>>> >>>> Hi Paolo, >>>> >>>> I have tested your patches with the mediated passthru patchset tha= t is being >>>> reviewed in KVM and QEMU mailing list. >>>> >>>> The fault handler gets called successfully and the previously mapp= ed memory gets >>>> unmmaped correctly via unmap_mapping_range. >>> >>> Great, then I'll include them in 4.8. >> >> Code is okay, but i still suspect if this implementation, fetch mmio= pages in fault >> handler, is needed. We'd better include these patches after the desi= gn of vfio >> framework is decided. > > Hi Guangrong, > > I disagree. The design of VFIO framework has been actively discussed = in the KVM > and QEMU mailing for a while and the fault handler is agreed upon to = provide the > flexibility for different driver vendors' implementation. With that s= aid, I am > still open to discuss with you and anybody else about this framework = as the goal > is to allow multiple vendor to plugin into this framework to support = their > mediated device virtualization scheme, such as Intel, IBM and us. The discussion is still going on. And current vfio patchset we reviewed= is still problematic. > > May I ask you what the exact issue you have with this interface for I= ntel to support > your own GPU virtualization? Intel's vGPU can work with this framework. We really appreciate your / = nvidia's contribution. i didn=E2=80=99t mean to offend you, i just want to make sure if this c= omplexity is really needed and inspect if this framework is safe enough and think it over i= f we have a better implementation.