Skip to content

KVM: Reject vCPU IDs above 2^32

Mathias Krause kvm 3 versions – Applied

Status from this message: Applied to kvm-x86 generic, with a few tweaks (emails incoming). Thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 5 repliesApplied
  2. v24 patches 4 repliesSuperseded
  3. v12 patches 7 repliesSuperseded

Changes in v3 from the cover letter

- test max_vcpu_ids on bsp_vcpu_id limit check if already set (Sean)
- add patch to check max_vcpu_ids to not exclude bsp_vcpu_id (Sean)
- reorder series to have selftests at the end
- minor commit log cosmetics

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5KVM: Reject overly excessive IDs in KVM_CREATE_VCPUvirt/kvm/kvm_main.c+9 -11 reply
2/5KVM: x86: Limit check IDs for KVM_SET_BOOT_CPU_IDarch/x86/kvm/x86.c+3 -00 replies
3/5KVM: x86: Prevent excluding the BSP on setting max_vcpu_idsarch/x86/kvm/x86.c+3 -10 replies
4/5KVM: selftests: Test max vCPU IDs corner casestools/testing/selftests/kvm/x86_64/max_vcpuid_cap_test.c+20 -21 reply
5/5KVM: selftests: Test vCPU boot IDs above 2^32tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c+11 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/5] KVM: Reject vCPU IDs above 2^32

This small series evolved from a single vCPU ID limit check to multiple ones, including sanity checks among them and enhanced selftests.

Please apply!

Thanks,
Mathias

v2: https://lore.kernel.org/kvm/[email protected]/

changes v2->v3:
- test max_vcpu_ids on bsp_vcpu_id limit check if already set (Sean)
- add patch to check max_vcpu_ids to not exclude bsp_vcpu_id (Sean)
- reorder series to have selftests at the end
- minor commit log cosmetics

changes v1->v2:
- add comment and build bug to make truncation check more obvious (Sean)
- handle KVM_SET_BOOT_CPU_ID similar

Mathias Krause (4):
KVM: Reject overly excessive IDs in KVM_CREATE_VCPU
KVM: x86: Limit check IDs for KVM_SET_BOOT_CPU_ID
KVM: selftests: Test max vCPU IDs corner cases
KVM: selftests: Test vCPU boot IDs above 2^32

Sean Christopherson (1):
KVM: x86: Prevent excluding the BSP on setting max_vcpu_ids

 arch/x86/kvm/x86.c                            |  7 +++++-
 .../kvm/x86_64/max_vcpuid_cap_test.c          | 22 +++++++++++++++++--
 .../selftests/kvm/x86_64/set_boot_cpu_id.c    | 11 ++++++++++
 virt/kvm/kvm_main.c                           | 10 ++++++++-
 4 files changed, 46 insertions(+), 4 deletions(-)
Signature · 1 line
2.30.2