misc: refine vuart connection

We have redesign the vuart and the UI for user, so the config tool
should change the schema and xform for the new xml, then change the
static_allocators to alloc irq and io_port for new connection.

This patch add a new vuart connection type and change the xforms to
adapter the new type.

Tracked-On: #6690
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
This commit is contained in:
Chenli Wei
2022-02-28 16:41:14 +08:00
committed by acrnsi-robot
parent c4c7835c12
commit 9450fcf3e1
6 changed files with 110 additions and 26 deletions

View File

@@ -37,20 +37,6 @@ def main(args):
user_vm_id = legacy_vuart.find('target_vm_id').text
legacy_vuartid = int(legacy_vuart.attrib["id"])
vuart_target_vmid[legacy_vuartid] = user_vm_id
vm_list = allocation_etree.xpath("//vm[load_order = 'SERVICE_VM']")
for vm in vm_list:
vuart_list = find_non_standard_uart(vm)
if len(vuart_list) != 0:
with open(args.out, "w+") as config_f:
for uart_start_num, vuart in enumerate(vuart_list, start=START_VUART_DEV_NAME_NO):
base = " port " + vuart.find('base').text
vuart_id = int(vuart.attrib["id"])
vm_id_note = "# User_VM_id: " + str(vuart_target_vmid[vuart_id]) + '\n'
config_f.write(vm_id_note)
conf = "/dev/ttyS" + str(uart_start_num) + base + UART_IRQ_BAUD + '\n'
config_f.write(conf)
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--allocation", help="the XML file summarizing resource allocated by config tool")