[libvirt] [PATCH] qemu: Exempt video model 'none' from getting a PCI address on Q35

Erik Skultety posted 1 patch 5 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/e9024b0cec3a66ac11784034bb62abe8ec7b46a1.1533015900.git.eskultet@redhat.com
Test syntax-check passed
src/qemu/qemu_domain_address.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[libvirt] [PATCH] qemu: Exempt video model 'none' from getting a PCI address on Q35
Posted by Erik Skultety 5 years, 8 months ago
Commit d48813e8 made sure we wouldn't get one for i440fx, but not for Q35
machine type. If the primary video didn't get the assumed 0:0:1.0 PCI
address, the evaluation then failed with: "Cannot automatically add a
new PCI bus for a device with connect flags 00"

https://bugzilla.redhat.com/show_bug.cgi?id=1609087
Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
 src/qemu/qemu_domain_address.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 1210d4acdd..0d27e6ce9c 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -1701,10 +1701,11 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
            goto cleanup;
     }
 
-    if (def->nvideos > 0) {
+    if (def->nvideos > 0 &&
+        def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_NONE) {
         /* NB: unlike the pc machinetypes, on q35 machinetypes the
          * integrated devices are at slot 0x1f, so when qemu looks for
-         * the first free lot for the first VGA, it will always be at
+         * the first free slot for the first VGA, it will always be at
          * slot 1 (which was used up by the integrated PIIX3 devices
          * on pc machinetypes).
          */
-- 
2.14.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Exempt video model 'none' from getting a PCI address on Q35
Posted by Andrea Bolognani 5 years, 8 months ago
On Tue, 2018-07-31 at 07:45 +0200, Erik Skultety wrote:
> Commit d48813e8 made sure we wouldn't get one for i440fx, but not for Q35
> machine type. If the primary video didn't get the assumed 0:0:1.0 PCI
> address, the evaluation then failed with: "Cannot automatically add a
> new PCI bus for a device with connect flags 00"
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1609087
> Signed-off-by: Erik Skultety <eskultet@redhat.com>
> ---
>  src/qemu/qemu_domain_address.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
> index 1210d4acdd..0d27e6ce9c 100644
> --- a/src/qemu/qemu_domain_address.c
> +++ b/src/qemu/qemu_domain_address.c
> @@ -1701,10 +1701,11 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
>             goto cleanup;
>      }
>  
> -    if (def->nvideos > 0) {
> +    if (def->nvideos > 0 &&
> +        def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_NONE) {
>          /* NB: unlike the pc machinetypes, on q35 machinetypes the
>           * integrated devices are at slot 0x1f, so when qemu looks for
> -         * the first free lot for the first VGA, it will always be at
> +         * the first free slot for the first VGA, it will always be at
>           * slot 1 (which was used up by the integrated PIIX3 devices
>           * on pc machinetypes).
>           */

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

and safe for freeze.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Exempt video model 'none' from getting a PCI address on Q35
Posted by Erik Skultety 5 years, 8 months ago
On Tue, Jul 31, 2018 at 10:17:56AM +0200, Andrea Bolognani wrote:
> On Tue, 2018-07-31 at 07:45 +0200, Erik Skultety wrote:
> > Commit d48813e8 made sure we wouldn't get one for i440fx, but not for Q35
> > machine type. If the primary video didn't get the assumed 0:0:1.0 PCI
> > address, the evaluation then failed with: "Cannot automatically add a
> > new PCI bus for a device with connect flags 00"
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=1609087
> > Signed-off-by: Erik Skultety <eskultet@redhat.com>
> > ---
> >  src/qemu/qemu_domain_address.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
> > index 1210d4acdd..0d27e6ce9c 100644
> > --- a/src/qemu/qemu_domain_address.c
> > +++ b/src/qemu/qemu_domain_address.c
> > @@ -1701,10 +1701,11 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
> >             goto cleanup;
> >      }
> >
> > -    if (def->nvideos > 0) {
> > +    if (def->nvideos > 0 &&
> > +        def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_NONE) {
> >          /* NB: unlike the pc machinetypes, on q35 machinetypes the
> >           * integrated devices are at slot 0x1f, so when qemu looks for
> > -         * the first free lot for the first VGA, it will always be at
> > +         * the first free slot for the first VGA, it will always be at
> >           * slot 1 (which was used up by the integrated PIIX3 devices
> >           * on pc machinetypes).
> >           */
>
>   Reviewed-by: Andrea Bolognani <abologna@redhat.com>
>
> and safe for freeze.

Pushed, thanks.
Erik

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