]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Generate cmd line for guestReset
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 7 Jul 2022 13:26:35 +0000 (15:26 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 13 Jul 2022 14:01:14 +0000 (16:01 +0200)
commit265d49896d3b2217a2dd79ac496257f92f66074f
tree46d26a159b5d1c144ac837060901848de94cc076
parent10a353c92ca069083289d389cc10c1cd978173cf
qemu: Generate cmd line for guestReset

QEMU offers two attributes for handling reset requests of an USB
host device: guest-reset and guest-resets-all. When combined they
act as follows:

1) guest-reset=false
   The guest is not allowed to reset the physical USB device.

2) guest-reset=true,guest-resets-all=false
   The guest is allowed to reset the device when it is not yet
   initialized (aka no USB bus address assigned). Usually this results
   in one guest reset being allowed. This is the default behavior.

3) guest-reset=true,guest-resets-all=true
   The guest is allowed to reset the device as it pleases.

Now, there's a clear 1:1 mapping with our representation of
guestReset, so generating cmd line is trivial.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/hostdev-usb-address.x86_64-latest.args