mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-06 06:02:20 +00:00
acrn-config: add usb xhci mediator support for
launch config Add USB xHCI mediator support to parse and get 'usb_xhci' item value from launch config files, these values are editable by user. Tracked-On: #4164 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
420b65a61e
commit
91330eaa72
@ -406,24 +406,11 @@ def vboot_arg_set(dm, vmid, config):
|
||||
print(" $boot_image_option \\",file=config)
|
||||
|
||||
|
||||
def xhci_args_set(names, vmid, config):
|
||||
board_name = names['board_name']
|
||||
uos_type = names['uos_types'][vmid]
|
||||
|
||||
# Get locate of vmid
|
||||
idx = 0
|
||||
#if board_name not in ("whl-ipc-i5", "whl-ipc-i7"):
|
||||
if uos_type in ("CLEARLINUX", "WINDOWS") and board_name in ("whl-ipc-i5", "whl-ipc-i7", "nuc7i7dnb"):
|
||||
for num in names['uos_types'].keys():
|
||||
idx += 1
|
||||
if num == vmid:
|
||||
break
|
||||
|
||||
# if the vmid is first vm
|
||||
if idx == 1:
|
||||
print(" -s {},xhci,1-2:2-2 \\".format(launch_cfg_lib.virtual_dev_slot("xhci")), file=config)
|
||||
elif idx > 1:
|
||||
print(" -s {},xhci,1-2:2-4 \\".format(launch_cfg_lib.virtual_dev_slot("xhci")), file=config)
|
||||
def xhci_args_set(dm, vmid, config):
|
||||
# usb_xhci set, the value is string
|
||||
if dm['xhci'][vmid]:
|
||||
print(" -s {},xhci,{} \\".format(
|
||||
launch_cfg_lib.virtual_dev_slot("xhci"), dm['xhci'][vmid]), file=config)
|
||||
|
||||
|
||||
def vritio_args_set(virt_io, vmid, config):
|
||||
@ -505,7 +492,7 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
|
||||
print(" --windows \\", file=config)
|
||||
|
||||
# WA: XHCI args set
|
||||
xhci_args_set(names, vmid, config)
|
||||
xhci_args_set(dm, vmid, config)
|
||||
|
||||
# VIRTIO args set
|
||||
vritio_args_set(virt_io, vmid, config)
|
||||
|
@ -23,6 +23,7 @@ class AcrnDmArgs:
|
||||
self.args["vbootloader"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vbootloader")
|
||||
self.args["console_type"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "console_type")
|
||||
self.args["off_pcpus"] = launch_cfg_lib.get_leaf_tag_map(self.scenario_info, "vcpu_affinity", "pcpu_id")
|
||||
self.args["xhci"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "usb_xhci")
|
||||
|
||||
def check_item(self):
|
||||
rootfs = launch_cfg_lib.get_rootdev_info(self.board_info)
|
||||
|
Loading…
Reference in New Issue
Block a user