[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd56eb8a-fbec-e81f-9c14-d1256a193b68@redhat.com>
Date: Fri, 20 Nov 2020 16:33:44 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Daniel Vetter <daniel.vetter@...ll.ch>,
DRI Development <dri-devel@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>
Cc: kvm@...r.kernel.org, linux-mm@...ck.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-media@...r.kernel.org,
Daniel Vetter <daniel.vetter@...el.com>,
Christoph Hellwig <hch@...radead.org>,
Jason Gunthorpe <jgg@...pe.ca>,
Kees Cook <keescook@...omium.org>,
Dan Williams <dan.j.williams@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
John Hubbard <jhubbard@...dia.com>,
Jérôme Glisse <jglisse@...hat.com>,
Jan Kara <jack@...e.cz>
Subject: Re: [PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn
callsites
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 rote work of doing that in the kvm subsystem. In
> most places this is solved by passing struct kvm * down the call
> stacks as an additional parameter, since that contains the
> mmu_notifier.
>
> Compile tested on all affected arch.
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.
But it's not a big deal, and the rationale at least makes sense. So,
Acked-by: Paolo Bonzini <pbonzini@...hat.com>
Paolo
Powered by blists - more mailing lists