linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Replace current->mm by kvm->mm on powerpc/kvm
@ 2019-09-23 18:43 Leonardo Bras
  2019-09-23 18:43 ` [PATCH 1/3] powerpc/kvm/book3s: Replace current->mm by kvm->mm Leonardo Bras
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Leonardo Bras @ 2019-09-23 18:43 UTC (permalink / raw)
  To: linuxppc-dev, linux-kernel; +Cc: Leonardo Bras

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.

Best regards,

Leonardo Bras (3):
  powerpc/kvm/book3s: Replace current->mm by kvm->mm
  powerpc/kvm/book3e: Replace current->mm by kvm->mm
  powerpc/kvm/e500: Replace current->mm by kvm->mm

 arch/powerpc/kvm/book3s_64_mmu_hv.c |  4 ++--
 arch/powerpc/kvm/book3s_64_vio.c    |  6 +++---
 arch/powerpc/kvm/book3s_hv.c        | 10 +++++-----
 arch/powerpc/kvm/booke.c            |  2 +-
 arch/powerpc/kvm/e500_mmu_host.c    |  6 +++---
 5 files changed, 14 insertions(+), 14 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-23 18:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-23 18:43 [PATCH 0/3] Replace current->mm by kvm->mm on powerpc/kvm Leonardo Bras
2019-09-23 18:43 ` [PATCH 1/3] powerpc/kvm/book3s: Replace current->mm by kvm->mm Leonardo Bras
2019-09-23 18:43 ` [PATCH 2/3] powerpc/kvm/book3e: " Leonardo Bras
2019-09-23 18:43 ` [PATCH 3/3] powerpc/kvm/e500: " Leonardo Bras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).