Skip to contentSkip to conversation

vhost-user-test: speed up a lot

PATCH New Paolo Bonzini 1 participant 1 message Feb 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost-user-test: speed up a lot

The mechanism to get the option ROM for virtio-net does not block the PCI ROM from being loaded. For out of tree builds, the PCI ROM being loaded might actually be the system one. If the system PCI ROM has a timeout for the "Press Ctrl-B" banner, the guest takes 3-4 seconds more to initialize the virtqueues and the test sometimes fails with a timeout in wait_for_fds.

Fix this by using the romfile property instead of -option-rom.

---
 tests/vhost-user-test.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
tests/vhost-user-test.c +2 -3
index 95f35af..6778cc1 100644
@@ -35,11 +35,10 @@
                         "mem-path=%s,share=on -numa node,memdev=mem"
 #define QEMU_CMD_CHR    " -chardev socket,id=%s,path=%s"
 #define QEMU_CMD_NETDEV " -netdev vhost-user,id=net0,chardev=%s,vhostforce"
-#define QEMU_CMD_NET    " -device virtio-net-pci,netdev=net0 "
-#define QEMU_CMD_ROM    " -option-rom ../pc-bios/pxe-virtio.rom"
+#define QEMU_CMD_NET    " -device virtio-net-pci,netdev=net0,romfile=../pc-bios/pxe-virtio.rom"
 
 #define QEMU_CMD        QEMU_CMD_ACCEL QEMU_CMD_MEM QEMU_CMD_CHR \
-                        QEMU_CMD_NETDEV QEMU_CMD_NET QEMU_CMD_ROM
+                        QEMU_CMD_NETDEV QEMU_CMD_NET
 
 #define HUGETLBFS_MAGIC       0x958458f6
 
Signature · 1 line
2.5.0