All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Replace current->mm by kvm->mm on powerpc/kvm
@ 2019-09-23 18:43 ` Leonardo Bras
  0 siblings, 0 replies; 14+ 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] 14+ messages in thread
* [PATCH 0/3] Replace current->mm by kvm->mm on powerpc/kvm
@ 2019-09-23 21:24 Leonardo Bras
  2019-09-23 21:24   ` Leonardo Bras
  0 siblings, 1 reply; 14+ messages in thread
From: Leonardo Bras @ 2019-09-23 21:24 UTC (permalink / raw)
  To: kvm, kvm-ppc
  Cc: Leonardo Bras, Paul Mackerras, Benjamin Herrenschmidt,
	Michael Ellerman

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] 14+ messages in thread

end of thread, other threads:[~2019-10-22 14:22 UTC | newest]

Thread overview: 14+ 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 ` 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   ` Leonardo Bras
2019-09-23 18:43 ` [PATCH 2/3] powerpc/kvm/book3e: " Leonardo Bras
2019-09-23 18:43   ` Leonardo Bras
2019-09-23 18:43 ` [PATCH 3/3] powerpc/kvm/e500: " Leonardo Bras
2019-09-23 18:43   ` Leonardo Bras
  -- strict thread matches above, loose matches on Subject: below --
2019-09-23 21:24 [PATCH 0/3] Replace current->mm by kvm->mm on powerpc/kvm Leonardo Bras
2019-09-23 21:24 ` [PATCH 2/3] powerpc/kvm/book3e: Replace current->mm by kvm->mm Leonardo Bras
2019-09-23 21:24   ` Leonardo Bras
2019-10-22  0:43   ` Paul Mackerras
2019-10-22  0:43     ` Paul Mackerras
2019-10-22 14:22     ` Leonardo Bras
2019-10-22 14:22       ` Leonardo Bras

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.