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

Re: [libvirt] [PATCH] Fix PCI address assignment if no IDE controller is present



On Wed, Jul 21, 2010 at 12:41:28PM +0100, Daniel P. Berrange wrote:
> The PCI slot 1 must be reserved at all times, since PIIX3 is
> always present, even if no IDE device is in use for guest disks
> 
> * src/qemu/qemu_conf.c: Always reserve slot 1 for PIIX3
> ---
>  src/qemu/qemu_conf.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 23e418b..6ce9c9e 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -2284,6 +2284,10 @@ qemuAssignDevicePCISlots(virDomainDefPtr def, qemuDomainPCIAddressSetPtr addrs)
>      /* PIIX3 (ISA bridge, IDE controller, something else unknown, USB controller)
>       * hardcoded slot=1, multifunction device
>       */
> +    if (qemuDomainPCIAddressReserveSlot(addrs, 1) < 0)
> +        goto error;
> +
> +    /* Verify that first IDE controller (if any) is on the PIIX3, fn 1 */
>      for (i = 0; i < def->ncontrollers ; i++) {
>          /* First IDE controller lives on the PIIX3 at slot=1, function=1 */
>          if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE &&
> @@ -2303,8 +2307,6 @@ qemuAssignDevicePCISlots(virDomainDefPtr def, qemuDomainPCIAddressSetPtr addrs)
>                  def->controllers[i]->info.addr.pci.bus = 0;
>                  def->controllers[i]->info.addr.pci.slot = 1;
>                  def->controllers[i]->info.addr.pci.function = 1;
> -                if (qemuDomainPCIAddressReserveSlot(addrs, 1) < 0)
> -                    goto error;
>              }
>          }
>      }

  ACK,

Are we documenting the statically allocated slots ? Maybe this should
go somewhere in http://libvirt.org/drvqemu.html , since this shows up to
the user in the end (well if they look) and we ought to garantee those.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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