From 315ba509b59958dd84884570158b8a12fb2b37b9 Mon Sep 17 00:00:00 2001 From: Hu Shuai Date: Fri, 22 Sep 2023 14:08:46 +0800 Subject: [PATCH] chardev_pcie: Create USB controller manually for aarch64 For now, arm can not create USB controller automatically. Signed-off-by: Hu Shuai --- libvirt/tests/src/virtio/virtio_page_per_vq.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libvirt/tests/src/virtio/virtio_page_per_vq.py b/libvirt/tests/src/virtio/virtio_page_per_vq.py index 270fbed5e4..45fa5ae8ab 100644 --- a/libvirt/tests/src/virtio/virtio_page_per_vq.py +++ b/libvirt/tests/src/virtio/virtio_page_per_vq.py @@ -1,4 +1,6 @@ import os +import platform + from virttest import libvirt_version from virttest import utils_net from virttest import virsh @@ -28,6 +30,12 @@ def prepare_test(vmxml): :params vmxml: the vm xml """ vmxml.remove_all_device_by_type(device_type) + # For now, arm can not create USB controller automatically. + if device_type == "controller" and platform.machine() == 'aarch64': + usb_controller = Controller("controller") + usb_controller.type = "usb" + usb_controller.model = 'qemu-xhci' + vmxml.add_device(usb_controller) vmxml.sync() # Need to use shared memory for filesystem device if device_type == "filesystem":