]> git.baikalelectronics.ru Git - kernel.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)
commite1546a36ce3cb4b2ebf6988b779884fec9b67dd2
tree246ddf94bf8b00929b920c1b92417b61664d963f
parent89c0e7a20d5dff06d04350f4f6e656f21caf6c59
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