HomeFreeBSD

riscv/vmm: Remove a redundant maxcpu check in vm_alloc_vcpu()

Description

riscv/vmm: Remove a redundant maxcpu check in vm_alloc_vcpu()

aplic_max_cpu_count() just returns the VM's max vCPU count, and
vm_alloc_vcpu() already checks that. Just remove this check so that
it's easier to merge vm_alloc_vcpu() into MI code.

If the APLIC really does require us to lower the limit, we should
instead adjust vm->maxcpu in vm_create().

No functional change intended.

Reviewed by: br
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53496

Details

Provenance
markjAuthored on Oct 31 2025, 2:08 PM
Reviewer
br
Differential Revision
D53496: riscv/vmm: Remove a redundant maxcpu check in vm_alloc_vcpu()
Parents
rG44ad7d4844b7: tcp: remove unused define
Branches
Unknown
Tags
Unknown