Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1434540 > unrolled thread

[PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed

Started byPaolo Bonzini <pbonzini@redhat.com>
First post2016-06-30 15:10 +0200
Last post2016-07-06 18:00 +0200
Articles 3 on this page of 43 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Paolo Bonzini <pbonzini@redhat.com> - 2016-06-30 15:10 +0200
    [PATCH 1/2] KVM: MMU: prepare to support mapping of VM_IO and VM_PFNMAP frames Paolo Bonzini <pbonzini@redhat.com> - 2016-06-30 15:10 +0200
    Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-01 00:10 +0200
    Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 08:50 +0200
      Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-04 09:10 +0200
        Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 09:50 +0200
          Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Paolo Bonzini <pbonzini@redhat.com> - 2016-07-04 09:50 +0200
            Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 10:10 +0200
              Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Paolo Bonzini <pbonzini@redhat.com> - 2016-07-04 10:20 +0200
                Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 10:30 +0200
                  Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Paolo Bonzini <pbonzini@redhat.com> - 2016-07-04 10:50 +0200
          Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-04 10:00 +0200
            Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-04 17:40 +0200
              Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-05 03:30 +0200
                Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-05 03:40 +0200
                  Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-05 06:10 +0200
                    Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-05 07:20 +0200
                      Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-05 08:40 +0200
                        Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-05 09:40 +0200
                          Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-05 11:10 +0200
                            Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-05 17:10 +0200
                              Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-06 04:30 +0200
                                Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-06 06:10 +0200
            Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 10:30 +0200
              Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 12:30 +0200
              Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-04 10:50 +0200
                Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 10:50 +0200
                  Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 11:00 +0200
                  Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-04 11:20 +0200
      Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Paolo Bonzini <pbonzini@redhat.com> - 2016-07-04 09:40 +0200
        Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-04 09:50 +0200
    Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-05 07:50 +0200
      Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Paolo Bonzini <pbonzini@redhat.com> - 2016-07-05 14:20 +0200
        Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-05 16:10 +0200
        Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-06 04:10 +0200
          Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-06 04:20 +0200
            Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-06 04:40 +0200
              Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Neo Jia <cjia@nvidia.com> - 2016-07-06 05:00 +0200
                Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-06 06:10 +0200
                  Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Paolo Bonzini <pbonzini@redhat.com> - 2016-07-06 13:50 +0200
                    Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-07-07 04:50 +0200
          Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Paolo Bonzini <pbonzini@redhat.com> - 2016-07-06 08:10 +0200
            Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Alex Williamson <alex.williamson@redhat.com> - 2016-07-06 18:00 +0200

Page 3 of 3 — ← Prev page 1 2 [3]


#1438133

FromXiao Guangrong <guangrong.xiao@linux.intel.com>
Date2016-07-07 04:50 +0200
Message-ID<rS7y2-QZ-7@gated-at.bofh.it>
In reply to#1437659

On 07/06/2016 07:48 PM, Paolo Bonzini wrote:
>
>
> On 06/07/2016 06:02, Xiao Guangrong wrote:
>>>>
>>>>>
>>>>> 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.
>>
>> This patchset is specific for the framework design, i.e, mapping memory when
>> fault happens rather than mmap(), and this design is exact what we are
>> discussing for nearly two days.
>
> I disagree, this patch fixes a bug because what Neo is doing is legal.
> It may not be the design that will be committed, but the bug they found
> in KVM is real.
>

I just worried if we really need fault-on-demand for device memory, i.e,
if device memory overcommit is safe enough.

It lacks a graceful way to recover the workload if the resource is really
overloaded. Unlike with normal memory, host kernel and guest kernel can not
do anything except killing the VM under this case. So the VM get crashed
due to device emulation, that is not safe as the device can be accessed in
userspace even with unprivileged user, it is vulnerable in data center.

[toc] | [prev] | [next] | [standalone]


#1437442

FromPaolo Bonzini <pbonzini@redhat.com>
Date2016-07-06 08:10 +0200
Message-ID<rROc1-5vh-21@gated-at.bofh.it>
In reply to#1437364

On 06/07/2016 04:00, 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.

I think that this fixes a bug anyway, the previous handling of VM_PFNMAP
is too simplistic.

Paolo

[toc] | [prev] | [next] | [standalone]


#1437809

FromAlex Williamson <alex.williamson@redhat.com>
Date2016-07-06 18:00 +0200
Message-ID<rRXp0-2E2-5@gated-at.bofh.it>
In reply to#1437442
On Wed, 6 Jul 2016 08:05:15 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 06/07/2016 04:00, 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.  
> 
> I think that this fixes a bug anyway, the previous handling of VM_PFNMAP
> is too simplistic.


Agreed, no reason to hold off on this, it's a valid interaction that
needs to be fixed regardless of how or if the vfio mediated driver
makes use of it.  Thanks,

Alex

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | linux.kernel


csiph-web