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
F162900713: D53496.id165573.diff
Sat, Jul 18, 3:35 AM
Unknown Object (File)
Wed, Jul 15, 10:49 AM
Unknown Object (File)
Wed, Jul 15, 8:46 AM
Unknown Object (File)
Wed, Jul 15, 6:52 AM
Unknown Object (File)
Wed, Jul 15, 6:52 AM
Unknown Object (File)
Jun 16 2026, 10:28 AM
Unknown Object (File)
Jun 15 2026, 7:19 AM
Unknown Object (File)
Jun 7 2026, 4:50 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 68305
Build 65188: arc lint + arc unit