]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: selftests: Test vCPU boot IDs above 2^32 and MAX_VCPU_ID
authorMathias Krause <minipli@grsecurity.net>
Fri, 14 Jun 2024 20:28:59 +0000 (22:28 +0200)
committerSean Christopherson <seanjc@google.com>
Tue, 18 Jun 2024 16:12:08 +0000 (09:12 -0700)
commit438a496b9041402736e164c8ebf1368599903958
tree2772956ef8d13aa998e11e3153f4937e0ba79ac8
parent4b451a57809cacec00978c36c97b1c9b53cde664
KVM: selftests: Test vCPU boot IDs above 2^32 and MAX_VCPU_ID

The KVM_SET_BOOT_CPU_ID ioctl missed to reject invalid vCPU IDs. Verify
this no longer works and gets rejected with an appropriate error code.

Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Link: https://lore.kernel.org/r/20240614202859.3597745-6-minipli@grsecurity.net
[sean: add test for MAX_VCPU_ID+1, always do negative test]
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c