From d61405e34c3a029d77e04f64de9d4b8f8b163cd2 Mon Sep 17 00:00:00 2001 From: yichongt Date: Wed, 17 Jul 2024 19:13:03 +0800 Subject: [PATCH] vUART: change vUART connection allocated IRQ Both Service VM and post launched VM should allocate native valid IRQ to vuart connection to avoid IRQ conflict between virtual device and passthrough ACPI device. Tracked-On: #8635 Signed-off-by: Yichong Tang Reviewed-by: Junjie Mao --- misc/config_tools/static_allocators/intx.py | 23 +++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/misc/config_tools/static_allocators/intx.py b/misc/config_tools/static_allocators/intx.py index c49e0e260..ce982e1b2 100644 --- a/misc/config_tools/static_allocators/intx.py +++ b/misc/config_tools/static_allocators/intx.py @@ -67,16 +67,21 @@ def alloc_vuart_connection_irqs(board_etree, scenario_etree, allocation_etree): for vm_node in vm_node_list: load_order = get_node("./load_order/text()", vm_node) - irq_list = get_native_valid_irq() if load_order == "SERVICE_VM" else [f"{d}" for d in list(range(5,15))] + """ + For both Service VM and post-launched VM, IRQs allocated to vuart connection + should avoid IRQ of existing physical device as it may conflict with legacy + INTX of ptdev. + """ + irq_list = get_native_valid_irq() - if load_order == "SERVICE_VM": - if 3 in irq_list: - remove_irq(irq_list, 3) - if 4 in irq_list: - remove_irq(irq_list, 4) - else: - if 14 in irq_list: - remove_irq(irq_list, 14) + """ + Remove IRQ 3 and 4 from valid irq list as it is allocated to vuart with + standard COM port. + """ + if 3 in irq_list: + remove_irq(irq_list, 3) + if 4 in irq_list: + remove_irq(irq_list, 4) vuart_id = 1 legacy_vuart_irq = "0" vmname = get_node("./name/text()", vm_node)