From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Tue, 24 Sep 2019 02:00:08 +0000 Subject: Re: [PATCH 0/3] Replace current->mm by kvm->mm on powerpc/kvm Message-Id: <20190924020008.GA4011@oak.ozlabs.ibm.com> List-Id: References: <20190923212409.7153-1-leonardo@linux.ibm.com> In-Reply-To: <20190923212409.7153-1-leonardo@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Leonardo Bras Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Benjamin Herrenschmidt , Michael Ellerman On Mon, Sep 23, 2019 at 06:24:06PM -0300, Leonardo Bras wrote: > By replacing, we would reduce the use of 'global' current on code, > relying more in the contents of kvm struct. > > On code, I found that in kvm_create_vm() there is: > kvm->mm = current->mm; > > And that on every kvm_*_ioctl we have tests like that: > if (kvm->mm != current->mm) > return -EIO; > > So this change would be safe. > > I split the changes in 3 patches, so it would be easier to read > and reject separated parts. If decided that squashing is better, > I see no problem doing that. The patch series looks fine. It has missed the 5.4 merge window, and it doesn't fix any bugs, so I will queue it up for the 5.5 merge window, meaning that I will put it into my kvm-ppc-next branch when I prepare it for the 5.5 merge window, probably in about a month from now. This remark also applies to your other patch "Reduce calls to get current->mm by storing the value locally". Thanks, Paul.