Skip to content

Commit 36d014d

Browse files
farosasmpe
authored andcommitted
KVM: PPC: Book3S HV: Stop returning internal values to userspace
Our kvm_arch_vcpu_ioctl_run currently returns the RESUME_HOST values to userspace, against the API of the KVM_RUN ioctl which returns 0 on success. Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220125215655.1026224-2-farosas@linux.ibm.com
1 parent 26291c5 commit 36d014d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

arch/powerpc/kvm/powerpc.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,14 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
18411841
#ifdef CONFIG_ALTIVEC
18421842
out:
18431843
#endif
1844+
1845+
/*
1846+
* We're already returning to userspace, don't pass the
1847+
* RESUME_HOST flags along.
1848+
*/
1849+
if (r > 0)
1850+
r = 0;
1851+
18441852
vcpu_put(vcpu);
18451853
return r;
18461854
}

0 commit comments

Comments
 (0)