Skip to content

Commit 1818dfd

Browse files
Wei Liuwenlingz
authored andcommitted
acrn-config: refine interrupt_storm function
interrupt_storm should be enabled while passthrough device was set. Tracked-On: #3854 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
1 parent 958830f commit 1818dfd

File tree

1 file changed

+7
-6
lines changed
  • misc/acrn-config/launch_config

1 file changed

+7
-6
lines changed

misc/acrn-config/launch_config/com.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,11 @@ def boot_image_type(args, vmid, config):
211211
print("", file=config)
212212

213213

214-
def interrupt_storm(names, vmid, config):
215-
uos_type = names['uos_types'][vmid]
216-
217-
if uos_type not in ("CLEARLINUX", "ANDROID", "ALIOS") or is_nuc_whl_clr(names, vmid):
214+
def interrupt_storm(pt_sel, config):
215+
if not pt_sel:
218216
return
219217

218+
# TODO: --intr_monitor should be configurable by user
220219
print("#interrupt storm monitor for pass-through devices, params order:", file=config)
221220
print("#threshold/s,probe-period(s),intr-inject-delay-time(ms),delay-duration(ms)", file=config)
222221
print('intr_storm_monitor="--intr_monitor 10000,10,1,100"', file=config)
@@ -517,9 +516,11 @@ def dm_arg_set(names, sel, dm, vmid, config):
517516
print(" -i /run/acrn/ioc_$vm_name,0x20 \\", file=config)
518517
print(" -l com2,/run/acrn/ioc_$vm_name \\", file=config)
519518

519+
if sel:
520+
print(" $intr_storm_monitor \\", file=config)
521+
520522
if not is_nuc_whl_clr(names, vmid):
521523
print(" -s {},wdt-i6300esb \\".format(launch_cfg_lib.virtual_dev_slot("wdt-i6300esb")), file=config)
522-
print(" $intr_storm_monitor \\", file=config)
523524
print(" -s {},xhci,1-1:1-2:1-3:2-1:2-2:2-3:cap=apl \\".format(launch_cfg_lib.virtual_dev_slot("xhci")), file=config)
524525

525526
if uos_type != "PREEMPT-RT LINUX":
@@ -553,7 +554,7 @@ def gen(names, pt_sel, dm, vmid, config):
553554
wa_usage(uos_type, config)
554555
delay_use_usb_storage(uos_type, config)
555556
mem_size_set(names, dm, vmid, config)
556-
interrupt_storm(names, vmid, config)
557+
interrupt_storm(pt_sel, config)
557558
log_level_set(uos_type, config)
558559

559560
# gen acrn-dm args

0 commit comments

Comments
 (0)