From: Ján Tomko Date: Tue, 5 Jan 2021 18:03:03 +0000 (+0100) Subject: qemu: format bootindex for vhost-user-fs X-Git-Tag: v7.1.0-rc1~398 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e7907c10a89fcee289145090b52baea57a1c657;p=thirdparty%2Flibvirt.git qemu: format bootindex for vhost-user-fs Wire up the QEMU command line for this option. Signed-off-by: Ján Tomko Tested-by: Laszlo Ersek Reviewed-by: Michal Privoznik --- 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