File tree 1 file changed +10
-2
lines changed 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 28
28
'config' : 'debug' ,
29
29
# Disables some tests which don't work in our CI setup
30
30
'ci' : False ,
31
+ # KVM is a Linux kernel module which allows QEMU to use
32
+ # hardware-accelerated virtualization.
33
+ 'disable_kvm' : False ,
31
34
# QEMU executable to use
32
35
# Indexed by the `arch` setting
33
36
'qemu_binary' : {
@@ -247,8 +250,9 @@ def run_qemu():
247
250
'-m' , '256M' ,
248
251
])
249
252
if not SETTINGS ['ci' ]:
250
- # Enable acceleration if possible.
251
- qemu_flags .append ('--enable-kvm' )
253
+ # Enable hardware-accelerated virtualization if possible.
254
+ if not SETTINGS ['disable_kvm' ]:
255
+ qemu_flags .append ('--enable-kvm' )
252
256
else :
253
257
# Exit instead of rebooting
254
258
qemu_flags .append ('-no-reboot' )
@@ -407,6 +411,9 @@ def main():
407
411
parser .add_argument ('--ci' , help = 'disables some tests which currently break CI' ,
408
412
action = 'store_true' )
409
413
414
+ parser .add_argument ('--disable-kvm' , help = 'disables hardware accelerated virtualization support in QEMU' ,
415
+ action = 'store_true' )
416
+
410
417
opts = parser .parse_args ()
411
418
412
419
SETTINGS ['arch' ] = opts .target
@@ -415,6 +422,7 @@ def main():
415
422
SETTINGS ['headless' ] = opts .headless
416
423
SETTINGS ['config' ] = 'release' if opts .release else 'debug'
417
424
SETTINGS ['ci' ] = opts .ci
425
+ SETTINGS ['disable_kvm' ] = opts .disable_kvm
418
426
419
427
verb = opts .verb
420
428
You can’t perform that action at this time.
0 commit comments