Re: [v2 10/13] qemu: don't reserve slot 1 if a PIIX3 USB controller is defined there

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

 



On Fri, Aug 26, 2011 at 01:44:26AM +0300, Marc-André Lureau wrote:
> Changes sinces v1:
> - apply only to piix3
> - check if piix3 controller is on correct address, or report error
> ---
>  src/qemu/qemu_command.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index aea5bcc..a9dc541 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -1099,6 +1099,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def, qemuDomainPCIAddressSetPtr addrs)
>  {
>      int i;
>      bool reservedIDE = false;
> +    bool reservedUSB = false;
>      bool reservedVGA = false;
>  
>      /* Host bridge */
> @@ -1129,13 +1130,20 @@ qemuAssignDevicePCISlots(virDomainDefPtr def, qemuDomainPCIAddressSetPtr addrs)
>                  def->controllers[i]->info.addr.pci.slot = 1;
>                  def->controllers[i]->info.addr.pci.function = 1;
>              }
> +        } else if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
> +                   def->controllers[i]->idx == 0 &&
> +                   def->controllers[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
> +                   def->controllers[i]->info.addr.pci.domain == 0 &&
> +                   def->controllers[i]->info.addr.pci.bus == 0 &&
> +                   def->controllers[i]->info.addr.pci.slot == 1) {
> +            reservedUSB = true;
>          }
>      }
>  
>      /* PIIX3 (ISA bridge, IDE controller, something else unknown, USB controller)
>       * hardcoded slot=1, multifunction device
>       */
> -    if (!reservedIDE &&
> +    if (!reservedIDE && !reservedUSB &&
>          qemuDomainPCIAddressReserveSlot(addrs, 1) < 0)
>          goto error;
>  

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]