]> git.ipfire.org Git - people/ms/linux.git/commit
KVM: x86: check validity of argument to KVM_SET_MP_STATE
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Aug 2022 16:41:25 +0000 (12:41 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 1 Sep 2022 23:20:59 +0000 (19:20 -0400)
commit22c6a0ef6b2631cda406a9c0c26774b0b3463b7b
tree246ddf94bf8b00929b920c1b92417b61664d963f
parent87693645ae89d9f9779e0bc53606bf228ec36411
KVM: x86: check validity of argument to KVM_SET_MP_STATE

An invalid argument to KVM_SET_MP_STATE has no effect other than making the
vCPU fail to run at the next KVM_RUN.  Since it is extremely unlikely that
any userspace is relying on it, fail with -EINVAL just like for other
architectures.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c