Re: [PATCH] qemu: fix i6300esb watchdog hotplug on Q35

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 1/17/19 4:37 PM, Laine Stump wrote:
> When commit 361c8dc17 added support for hotplugging the i6300esb
> watchdog device (first in libvirt-3.9.0), it accidentally contstructed
> the commandline for the device_add command before allocating a PCI
> address for the device. With no PCI address specified in the command,
> the watchdog would simply be placed at the lowest unused PCI slot.
> 
> On a 440fx guest, this doesn't cause a problem, because libvirt's PCI
> address allocation algorithm would most likely give the same address
> anyway (usually a slot on pci-root), so nobody noticed the omission of
> address from the command.
> 
> But on a Q35 guest, the lowest unused PCI slot is on pcie-root, which
> doesn't support hotplug; libvirt knows enough to assign a PCI address
> that is on a pcie-to-pci-bridge (because its slots *do* support
> hotplug), but qemu doesn't, so if there is no PCI address in the
> command, qemu just tries to plug the new device into pcie-root, and
> fails because it doesn't support hotplug, e.g.:
> 
>   error: Failed to attach device from watchdog.xml
>   error: internal error: unable to execute QEMU command 'device_add':
>   Bus 'pcie.0' does not support hotplugging
> 
> The solution is simply to build the command string after assigning a
> PCI address, not before.
> 
> Resolves: https://bugzilla.redhat.com/1666559
> Signed-off-by: Laine Stump <laine@xxxxxxxxx>
> ---
>  src/qemu/qemu_hotplug.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux