Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151091970
D53496.id165570.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53496.id165570.diff
View Options
diff --git a/sys/riscv/vmm/vmm.c b/sys/riscv/vmm/vmm.c
--- a/sys/riscv/vmm/vmm.c
+++ b/sys/riscv/vmm/vmm.c
@@ -178,10 +178,6 @@
if (vcpuid < 0 || vcpuid >= vm_get_maxcpus(vm))
return (NULL);
- /* Some interrupt controllers may have a CPU limit */
- if (vcpuid >= aplic_max_cpu_count(vm->cookie))
- return (NULL);
-
vcpu = (struct vcpu *)
atomic_load_acq_ptr((uintptr_t *)&vm->vcpu[vcpuid]);
if (__predict_true(vcpu != NULL))
diff --git a/sys/riscv/vmm/vmm_aplic.h b/sys/riscv/vmm/vmm_aplic.h
--- a/sys/riscv/vmm/vmm_aplic.h
+++ b/sys/riscv/vmm/vmm_aplic.h
@@ -49,6 +49,5 @@
void aplic_cpucleanup(struct hypctx *hypctx);
void aplic_flush_hwstate(struct hypctx *hypctx);
void aplic_sync_hwstate(struct hypctx *hypctx);
-int aplic_max_cpu_count(struct hyp *hyp);
#endif /* !_VMM_APLIC_H_ */
diff --git a/sys/riscv/vmm/vmm_aplic.c b/sys/riscv/vmm/vmm_aplic.c
--- a/sys/riscv/vmm/vmm_aplic.c
+++ b/sys/riscv/vmm/vmm_aplic.c
@@ -579,13 +579,3 @@
{
}
-
-int
-aplic_max_cpu_count(struct hyp *hyp)
-{
- int16_t max_count;
-
- max_count = vm_get_maxcpus(hyp->vm);
-
- return (max_count);
-}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 11:32 PM (17 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31002218
Default Alt Text
D53496.id165570.diff (1 KB)
Attached To
Mode
D53496: riscv/vmm: Remove a redundant maxcpu check in vm_alloc_vcpu()
Attached
Detach File
Event Timeline
Log In to Comment