Page MenuHomeFreeBSD

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

Authored by markj on Oct 31 2025, 1:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 30, 7:05 PM
Unknown Object (File)
Fri, Mar 20, 4:45 PM
Unknown Object (File)
Thu, Mar 19, 11:10 PM
Unknown Object (File)
Thu, Mar 19, 7:30 PM
Unknown Object (File)
Tue, Mar 17, 9:59 PM
Unknown Object (File)
Sun, Mar 15, 8:34 PM
Unknown Object (File)
Sun, Mar 15, 9:58 AM
Unknown Object (File)
Sat, Mar 14, 1:21 PM
Subscribers

Details

Summary

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().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable