From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752901AbcGFC5z (ORCPT ); Tue, 5 Jul 2016 22:57:55 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:17140 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbcGFC5w convert rfc822-to-8bit (ORCPT ); Tue, 5 Jul 2016 22:57:52 -0400 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Tue, 05 Jul 2016 19:56:24 -0700 Date: Tue, 5 Jul 2016 19:57:50 -0700 From: Neo Jia To: Xiao Guangrong CC: Paolo Bonzini , , , Kirti Wankhede , Andrea Arcangeli , Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Message-ID: <20160706025750.GA9457@nvidia.com> References: <1467291711-3230-1-git-send-email-pbonzini@redhat.com> <20160705054147.GA27138@nvidia.com> <577C664E.3080802@linux.intel.com> <20160706021839.GA9064@nvidia.com> <577C6E66.60601@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <577C6E66.60601@linux.intel.com> X-NVConfidentiality: public User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL108.nvidia.com (172.18.146.13) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 06, 2016 at 10:35:18AM +0800, Xiao Guangrong wrote: > > > 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 setting > >>>>>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 that is being > >>>>reviewed in KVM and QEMU mailing list. > >>>> > >>>>The fault handler gets called successfully and the previously mapped 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 design 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 said, 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. My point is the fault handler part has been discussed already, with that said I am always open to any constructive suggestions to make things better and maintainable. (Appreciate your code review on the VFIO thread, I think we still own you another response, will do that.) > > > > >May I ask you what the exact issue you have with this interface for Intel to support > >your own GPU virtualization? > > Intel's vGPU can work with this framework. We really appreciate your / nvidia's > contribution. Then, I don't think we should embargo Paolo's patch. > > i didn’t mean to offend you, i just want to make sure if this complexity is really > needed and inspect if this framework is safe enough and think it over if we have > a better implementation. Not at all. :-) Suggestions are always welcome, I just want to know the exact issues you have with the code so I can have a better response to address that with proper information. Thanks, Neo