Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F134802170
D53580.id165841.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
789 B
Referenced Files
None
Subscribers
None
D53580.id165841.diff
View Options
diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c
--- a/sys/arm64/vmm/vmm.c
+++ b/sys/arm64/vmm/vmm.c
@@ -373,10 +373,6 @@
if (vcpuid < 0 || vcpuid >= vm_get_maxcpus(vm))
return (NULL);
- /* Some interrupt controllers may have a CPU limit */
- if (vcpuid >= vgic_max_cpu_count(vm->cookie))
- return (NULL);
-
vcpu = (struct vcpu *)
atomic_load_acq_ptr((uintptr_t *)&vm->vcpu[vcpuid]);
if (__predict_true(vcpu != NULL))
@@ -385,6 +381,12 @@
sx_xlock(&vm->vcpus_init_lock);
vcpu = vm->vcpu[vcpuid];
if (vcpu == NULL && !vm->dying) {
+ /* Some interrupt controllers may have a CPU limit */
+ if (vcpuid >= vgic_max_cpu_count(vm->cookie)) {
+ sx_xunlock(&vm->vcpus_init_lock);
+ return (NULL);
+ }
+
vcpu = vcpu_alloc(vm, vcpuid);
vcpu_init(vcpu);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 5, 5:08 PM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24844379
Default Alt Text
D53580.id165841.diff (789 B)
Attached To
Mode
D53580: arm64/vmm: Move the vgic_max_cpu_count() check
Attached
Detach File
Event Timeline
Log In to Comment