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)
Tue, Jun 16, 10:28 AM
Unknown Object (File)
Mon, Jun 15, 7:19 AM
Unknown Object (File)
Sun, Jun 7, 4:50 PM
Unknown Object (File)
May 17 2026, 1:40 PM
Unknown Object (File)
May 16 2026, 10:05 AM
Unknown Object (File)
May 16 2026, 10:05 AM
Unknown Object (File)
May 16 2026, 1:06 AM
Unknown Object (File)
May 15 2026, 2:44 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