mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
acrn-config: refinement acrn-dm arguments for "Soft RT/Hard RT" VMs
Assign the right acrn-dm arguments for "Soft RT/Hard RT" VMs by 'uos_type' in webUI item tag. Tracked-On: #4799 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
6d2b213b00
commit
5d8fabf123
@ -541,41 +541,27 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
|
|||||||
sos_vmid = launch_cfg_lib.get_sos_vmid()
|
sos_vmid = launch_cfg_lib.get_sos_vmid()
|
||||||
|
|
||||||
# clearlinux/android/alios
|
# clearlinux/android/alios
|
||||||
dm_str = 'acrn-dm -A -m $mem_size -s 0:0,hostbridge -U {}'.format(scenario_uuid)
|
print('acrn-dm -A -m $mem_size -s 0:0,hostbridge -U {} \\'.format(scenario_uuid), file=config)
|
||||||
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
|
|
||||||
if uos_type == "CLEARLINUX":
|
|
||||||
print("{} \\".format(dm_str), file=config)
|
|
||||||
else:
|
|
||||||
print('{} $npk_virt \\'.format(dm_str), file=config)
|
|
||||||
|
|
||||||
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
|
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
|
||||||
if uos_type in ("ANDROID", "ALIOS"):
|
if uos_type in ("ANDROID", "ALIOS"):
|
||||||
|
print(' $npk_virt \\', file=config)
|
||||||
print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config)
|
print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config)
|
||||||
|
print(" --enable_trusty \\", file=config)
|
||||||
# mac_seed
|
# mac_seed
|
||||||
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
|
|
||||||
print(" --mac_seed $mac_seed \\", file=config)
|
print(" --mac_seed $mac_seed \\", file=config)
|
||||||
|
|
||||||
# hard rt os
|
if dm['rtos_type'][vmid] != "no":
|
||||||
if uos_type == "PREEMPT-RT LINUX":
|
if virt_io:
|
||||||
print("{} \\".format(dm_str), file=config)
|
print(" --virtio_poll 1000000 \\", file=config)
|
||||||
print(" --lapic_pt \\", file=config)
|
|
||||||
print(" --rtvm \\", file=config)
|
|
||||||
print(" --virtio_poll 1000000 \\", file=config)
|
|
||||||
|
|
||||||
# vxworks
|
if dm['rtos_type'][vmid] == "Soft RT":
|
||||||
if uos_type == "VXWORKS":
|
print(" --rtvm \\", file=config)
|
||||||
print("{} \\".format(dm_str), file=config)
|
|
||||||
print(" --virtio_poll 1000000 \\", file=config)
|
|
||||||
print(" --lapic_pt \\", file=config)
|
|
||||||
|
|
||||||
# zephyr
|
if dm['rtos_type'][vmid] == "Hard RT":
|
||||||
if uos_type == "ZEPHYR":
|
print(" --lapic_pt \\", file=config)
|
||||||
print("{} \\".format(dm_str), file=config)
|
|
||||||
|
|
||||||
# windows
|
# windows
|
||||||
if uos_type == "WINDOWS":
|
if uos_type == "WINDOWS":
|
||||||
print("{} \\".format(dm_str), file=config)
|
|
||||||
print(" --windows \\", file=config)
|
print(" --windows \\", file=config)
|
||||||
|
|
||||||
# pm_channel set
|
# pm_channel set
|
||||||
@ -607,6 +593,11 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
|
|||||||
# pcpu-list args set
|
# pcpu-list args set
|
||||||
pcpu_arg_set(dm, vmid, config)
|
pcpu_arg_set(dm, vmid, config)
|
||||||
|
|
||||||
|
for value in sel.bdf.values():
|
||||||
|
if value[vmid]:
|
||||||
|
print(" $intr_storm_monitor \\", file=config)
|
||||||
|
break
|
||||||
|
|
||||||
# redirect console
|
# redirect console
|
||||||
if dm['vuart0'][vmid] == "Enable":
|
if dm['vuart0'][vmid] == "Enable":
|
||||||
print(" -s 1:0,lpc \\", file=config)
|
print(" -s 1:0,lpc \\", file=config)
|
||||||
@ -618,15 +609,9 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
|
|||||||
print(" -i /run/acrn/ioc_$vm_name,0x20 \\", file=config)
|
print(" -i /run/acrn/ioc_$vm_name,0x20 \\", file=config)
|
||||||
print(" -l com2,/run/acrn/ioc_$vm_name \\", file=config)
|
print(" -l com2,/run/acrn/ioc_$vm_name \\", file=config)
|
||||||
|
|
||||||
if sel:
|
|
||||||
print(" $intr_storm_monitor \\", file=config)
|
|
||||||
|
|
||||||
if not is_nuc_whl_clr(names, vmid):
|
if not is_nuc_whl_clr(names, vmid):
|
||||||
print(" -s {},wdt-i6300esb \\".format(launch_cfg_lib.virtual_dev_slot("wdt-i6300esb")), file=config)
|
print(" -s {},wdt-i6300esb \\".format(launch_cfg_lib.virtual_dev_slot("wdt-i6300esb")), file=config)
|
||||||
|
|
||||||
if uos_type in ("ANDROID", "ALIOS"):
|
|
||||||
print(" --enable_trusty \\", file=config)
|
|
||||||
|
|
||||||
set_dm_pt(names, sel, vmid, config)
|
set_dm_pt(names, sel, vmid, config)
|
||||||
print(" $vm_name", file=config)
|
print(" $vm_name", file=config)
|
||||||
print("}", file=config)
|
print("}", file=config)
|
||||||
|
Loading…
Reference in New Issue
Block a user