File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,10 @@ mod tests {
260
260
261
261
let device_fd = create_gic_device ( & vm, 0 ) ;
262
262
263
+ // GICv3 on arm/aarch64 requires an online vCPU prior to setting device attributes,
264
+ // see: https://www.kernel.org/doc/html/latest/virt/kvm/devices/arm-vgic-v3.html
265
+ vm. create_vcpu ( 0 ) . unwrap ( ) ;
266
+
263
267
// Following lines to re-construct device_fd are used to test
264
268
// DeviceFd::from_raw_fd() and DeviceFd::as_raw_fd().
265
269
let raw_fd = unsafe { libc:: dup ( device_fd. as_raw_fd ( ) ) } ;
Original file line number Diff line number Diff line change @@ -1556,6 +1556,10 @@ mod tests {
1556
1556
// Create the vGIC device.
1557
1557
let vgic_fd = create_gic_device ( & vm_fd, 0 ) ;
1558
1558
1559
+ // GICv3 on arm/aarch64 requires an online vCPU prior to setting device attributes,
1560
+ // see: https://www.kernel.org/doc/html/latest/virt/kvm/devices/arm-vgic-v3.html
1561
+ vm_fd. create_vcpu ( 0 ) . unwrap ( ) ;
1562
+
1559
1563
// Set supported number of IRQs.
1560
1564
set_supported_nr_irqs ( & vgic_fd, 128 ) ;
1561
1565
// Request the initialization of the vGIC.
You can’t perform that action at this time.
0 commit comments