]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuAppendLoadparmMachineParm: add loadparm from hostdev
authorEric Farman <farman@linux.ibm.com>
Fri, 10 Mar 2023 02:38:09 +0000 (03:38 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 10 Mar 2023 07:54:05 +0000 (08:54 +0100)
commit97dddef48c4451c7256be895d7679627edbbdbba
tree4351d5903d3a8f4a58a020265cfd71658d04e67c
parentcc21979fae736768db92d0c060ea732ed857327e
qemuAppendLoadparmMachineParm: add loadparm from hostdev

Commit 54fa1b44afc ("conf: Add loadparm boot option for a boot device")
added the ability to specify a loadparm parameter on a <boot/> tag, while
commit 29ba41c2d40 ("qemu: Add loadparm to qemu command line string")
added that value to the QEMU "-machine" command line parameters.

Unfortunately, the latter commit only looked at disks and network
devices for boot information, even though anything with
VIR_DOMAIN_DEF_FORMAT_ALLOW_BOOT could potentially have this tag.
In practice, a <hostdev> tag pointing to a passthrough (SCSI or DASD)
disk device can be used in this way, which means the loadparm is
accepted, but not given to QEMU.

Correct this, and add some XML/argv tests.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/machine-loadparm-hostdev.s390x-latest.args [new file with mode: 0644]
tests/qemuxml2argvdata/machine-loadparm-hostdev.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/machine-loadparm-hostdev.s390x-latest.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c