[PATCH] qemuAppendLoadparmMachineParm: add loadparm from hostdev

Michal Prívozník mprivozn at redhat.com
Fri Mar 10 07:54:32 UTC 2023


On 3/10/23 03:38, Eric Farman wrote:
> 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 at linux.ibm.com>
> ---
>  src/qemu/qemu_command.c                       | 24 ++++++++++++++
>  ...machine-loadparm-hostdev.s390x-latest.args | 33 +++++++++++++++++++
>  .../machine-loadparm-hostdev.xml              | 23 +++++++++++++
>  tests/qemuxml2argvtest.c                      |  1 +
>  .../machine-loadparm-hostdev.s390x-latest.xml | 33 +++++++++++++++++++
>  tests/qemuxml2xmltest.c                       |  1 +
>  6 files changed, 115 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/machine-loadparm-hostdev.s390x-latest.args
>  create mode 100644 tests/qemuxml2argvdata/machine-loadparm-hostdev.xml
>  create mode 100644 tests/qemuxml2xmloutdata/machine-loadparm-hostdev.s390x-latest.xml

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

and pushed.

Michal



More information about the libvir-list mailing list