diff options
author | Leonardo Bras <leonardo@linux.ibm.com> | 2019-11-27 01:36:31 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2020-01-17 07:08:28 +0300 |
commit | e1bd0a7e248c3ce59b0509e47f035c0759fc68a3 (patch) | |
tree | 73ad1b1031b51fde68223cde76f287fc773acca6 /arch/powerpc/kvm/booke.c | |
parent | 8a9c8925149f195d0bbd6b42aa3130ced0a075fb (diff) | |
download | linux-e1bd0a7e248c3ce59b0509e47f035c0759fc68a3.tar.xz |
KVM: PPC: Book3E: Replace current->mm by kvm->mm
Given that in kvm_create_vm() there is:
kvm->mm = current->mm;
And that on every kvm_*_ioctl we have:
if (kvm->mm != current->mm)
return -EIO;
I see no reason to keep using current->mm instead of kvm->mm.
By doing so, we would reduce the use of 'global' variables on code, relying
more in the contents of kvm struct.
Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r-- | arch/powerpc/kvm/booke.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index be9a45874194..fd7bdb4f8f87 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -775,7 +775,7 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) debug = current->thread.debug; current->thread.debug = vcpu->arch.dbg_reg; - vcpu->arch.pgdir = current->mm->pgd; + vcpu->arch.pgdir = vcpu->kvm->mm->pgd; kvmppc_fix_ee_before_entry(); ret = __kvmppc_vcpu_run(kvm_run, vcpu); |