The "piix3-usb-uhci" QEMU device emulates a USB1 controller. Not only does
USB1 feature amazingly low transfer speeds -- which QEMU appears to
emulate faithfully --, USB1 (and USB2 too) are distinctly
virtualization-unfriendly, as the emulated controllers require constant
polling.

This is visible in two symptoms: (a) the "run-virt-p2v-in-a-vm" and
"run-virt-p2v-in-an-nvme-vm" targets load data (such as the root
filesystem) from the "virt-p2v.img" file very slowly, while the host CPU
utilization of QEMU never exceeds ~30%, (b) once the virt-p2v application
launches in the guest, and the cursor is blinking in the "Conversion
server" text field, the host CPU utilization does not sink under ~12%
(while "top" in the guest XTerm reports 99+% idleness).

Fix this problem by using the qemu-xhci USB3 controller. USB3 both enables
much higher transfer speeds and is event-driven, requiring no polling.

Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f25de74b8690..f2fe0e3efc99 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -270,7 +270,7 @@ run-virt-p2v-in-a-vm: virt-p2v.img $(PHYSICAL_MACHINE)
          -cpu host \
          -m 2048 \
          -drive id=hd0,file=$(PHYSICAL_MACHINE),format=raw,if=ide \
-         -device piix3-usb-uhci \
+         -device qemu-xhci \
          -drive id=usb0,file=$<,format=raw,snapshot=on,if=none \
          -device usb-storage,bootindex=1,drive=usb0 \
          -boot menu=on \
@@ -294,7 +294,7 @@ run-virt-p2v-in-an-nvme-vm: virt-p2v.img 
$(PHYSICAL_MACHINE) $(BLANK_DISK)
          -device nvme,drive=phys,serial=01234567 \
          \
          -drive id=usb0,if=none,format=raw,file=$<,snapshot=on \
-         -device piix3-usb-uhci,id=usb-bus \
+         -device qemu-xhci,id=usb-bus \
          -device usb-storage,drive=usb0,bootindex=1,bus=usb-bus.0 \
          \
          -drive id=blank1,if=none,format=raw,file=$(BLANK_DISK),snapshot=on \
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to