From 0e7907c10a89fcee289145090b52baea57a1c657 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Tue, 5 Jan 2021 19:03:03 +0100 Subject: [PATCH] qemu: format bootindex for vhost-user-fs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Wire up the QEMU command line for this option. Signed-off-by: Ján Tomko Tested-by: Laszlo Ersek Reviewed-by: Michal Privoznik --- src/qemu/qemu_command.c | 3 +++ .../vhost-user-fs-hugepages.x86_64-latest.args | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 4986ca8b08..f613aa0201 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2194,6 +2194,9 @@ qemuBuildVHostUserFsCommandLine(virCommandPtr cmd, virQEMUBuildBufferEscapeComma(&opt, fs->dst); qemuBuildVirtioOptionsStr(&opt, fs->virtio); + if (fs->info.bootIndex) + virBufferAsprintf(&opt, ",bootindex=%u", fs->info.bootIndex); + if (qemuBuildDeviceAddressStr(&opt, def, &fs->info, priv->qemuCaps) < 0) return -1; diff --git a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args index e4f5db7a63..24cafed400 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args +++ b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args @@ -42,7 +42,8 @@ addr=0x1 \ -device virtio-blk-pci,bus=pci.4,addr=0x0,drive=libvirt-1-format,\ id=virtio-disk0,bootindex=1 \ -chardev socket,id=chr-vu-fs0,path=/tmp/lib/domain--1-guest/fs0.vhost-fs.sock \ --device vhost-user-fs-pci,chardev=chr-vu-fs0,tag=mount_tag,bus=pci.1,addr=0x0 \ +-device vhost-user-fs-pci,chardev=chr-vu-fs0,tag=mount_tag,bootindex=2,\ +bus=pci.1,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on -- 2.47.2