Re: [PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn callsites

2020-11-20 Thread Paolo Bonzini
On 20/11/20 16:44, Daniel Vetter wrote: It's a bit of a pity, it's making an API more complex (the point of gfn_to_pfn_memslot vs gfn_to_pfn is exactly that you don't need a "struct kvm*" and it's clear that you've already done the lookup into that struct kvm. Yeah I noticed that, I think

Re: [PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn callsites

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 4:33 PM Paolo Bonzini wrote: > > On 19/11/20 15:41, Daniel Vetter wrote: > > Both Christoph Hellwig and Jason Gunthorpe suggested that usage of > > follow_pfn by modules should be locked down more. To do so callers > > need to be able to pass the mmu_notifier subscription

Re: [PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn callsites

2020-11-20 Thread Paolo Bonzini
On 19/11/20 15:41, Daniel Vetter wrote: Both Christoph Hellwig and Jason Gunthorpe suggested that usage of follow_pfn by modules should be locked down more. To do so callers need to be able to pass the mmu_notifier subscription corresponding to the mm_struct to follow_pfn(). This patch does the

[PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn callsites

2020-11-19 Thread Daniel Vetter
Both Christoph Hellwig and Jason Gunthorpe suggested that usage of follow_pfn by modules should be locked down more. To do so callers need to be able to pass the mmu_notifier subscription corresponding to the mm_struct to follow_pfn(). This patch does the rote work of doing that in the kvm