[libvirt] [PATCH v3 05/12] qemu: Auto add pci-root for s390/s390x guests

Yi Min Zhao posted 12 patches 7 years, 6 months ago
There is a newer version of this series
[libvirt] [PATCH v3 05/12] qemu: Auto add pci-root for s390/s390x guests
Posted by Yi Min Zhao 7 years, 6 months ago
The pci-root depends on zpci capability. So autogenerate pci-root if
zpci exists.

Signed-off-by: Yi Min Zhao <zyimin@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
 src/qemu/qemu_domain.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index de056272e8..a84e5f06b2 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3227,6 +3227,7 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
     case VIR_ARCH_S390X:
         addDefaultUSB = false;
         addPanicDevice = true;
+        addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI);
         break;
 
     case VIR_ARCH_SPARC:
-- 
Yi Min

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 05/12] qemu: Auto add pci-root for s390/s390x guests
Posted by Andrea Bolognani 7 years, 5 months ago
On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote:
> The pci-root depends on zpci capability. So autogenerate pci-root if
> zpci exists.
> 
> Signed-off-by: Yi Min Zhao <zyimin@linux.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
> Reviewed-by: Stefan Zimmermann <stzi@linux.ibm.com>
> Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
> Reviewed-by: Ján Tomko <jtomko@redhat.com>
> ---
>  src/qemu/qemu_domain.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index de056272e8..a84e5f06b2 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -3227,6 +3227,7 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
>      case VIR_ARCH_S390X:
>          addDefaultUSB = false;
>          addPanicDevice = true;
> +        addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI);
>          break;

I wonder if you might want to do this, and other stuff, only if
qemuDomainIsS390CCW()... It seems like that function is not used
a lot, which might mean that someone is going to have to perform
some serious cleaning up if there is ever another machine type
on s390, or perhaps that it just doesn't quite apply here.

If the latter,

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

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 05/12] qemu: Auto add pci-root for s390/s390x guests
Posted by Cornelia Huck 7 years, 5 months ago
On Thu, 16 Aug 2018 16:52:18 +0200
Andrea Bolognani <abologna@redhat.com> wrote:

> On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote:
> > The pci-root depends on zpci capability. So autogenerate pci-root if
> > zpci exists.
> > 
> > Signed-off-by: Yi Min Zhao <zyimin@linux.ibm.com>
> > Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
> > Reviewed-by: Stefan Zimmermann <stzi@linux.ibm.com>
> > Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
> > Reviewed-by: Ján Tomko <jtomko@redhat.com>
> > ---
> >  src/qemu/qemu_domain.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> > index de056272e8..a84e5f06b2 100644
> > --- a/src/qemu/qemu_domain.c
> > +++ b/src/qemu/qemu_domain.c
> > @@ -3227,6 +3227,7 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
> >      case VIR_ARCH_S390X:
> >          addDefaultUSB = false;
> >          addPanicDevice = true;
> > +        addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI);
> >          break;  
> 
> I wonder if you might want to do this, and other stuff, only if
> qemuDomainIsS390CCW()... It seems like that function is not used
> a lot, which might mean that someone is going to have to perform
> some serious cleaning up if there is ever another machine type
> on s390, or perhaps that it just doesn't quite apply here.

Not a libvirt person, but that other QEMU s390 machine type is long
gone (and was never supported in libvirt AFAIK anyway), and I don't see
any reason to add an additional s390 machine type to QEMU from where we
stand now.

> 
> If the latter,
> 
>   Reviewed-by: Andrea Bolognani <abologna@redhat.com>
> 


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 05/12] qemu: Auto add pci-root for s390/s390x guests
Posted by Andrea Bolognani 7 years, 5 months ago
On Thu, 2018-08-16 at 17:01 +0200, Cornelia Huck wrote:
> On Thu, 16 Aug 2018 16:52:18 +0200 Andrea Bolognani <abologna@redhat.com> wrote:
> > On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote:
> > > @@ -3227,6 +3227,7 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
> > >      case VIR_ARCH_S390X:
> > >          addDefaultUSB = false;
> > >          addPanicDevice = true;
> > > +        addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI);
> > >          break;  
> > 
> > I wonder if you might want to do this, and other stuff, only if
> > qemuDomainIsS390CCW()... It seems like that function is not used
> > a lot, which might mean that someone is going to have to perform
> > some serious cleaning up if there is ever another machine type
> > on s390, or perhaps that it just doesn't quite apply here.
> 
> Not a libvirt person, but that other QEMU s390 machine type is long
> gone (and was never supported in libvirt AFAIK anyway), and I don't see
> any reason to add an additional s390 machine type to QEMU from where we
> stand now.

New machine types happen when you least expect them :)

But given that the current code would need an overhaul anyway if a
new machine type was introduced, I'm okay with merging this as-is.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 05/12] qemu: Auto add pci-root for s390/s390x guests
Posted by Yi Min Zhao 7 years, 5 months ago

在 2018/8/16 下午10:52, Andrea Bolognani 写道:
> On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote:
>> The pci-root depends on zpci capability. So autogenerate pci-root if
>> zpci exists.
>>
>> Signed-off-by: Yi Min Zhao <zyimin@linux.ibm.com>
>> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
>> Reviewed-by: Stefan Zimmermann <stzi@linux.ibm.com>
>> Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
>> Reviewed-by: Ján Tomko <jtomko@redhat.com>
>> ---
>>   src/qemu/qemu_domain.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>> index de056272e8..a84e5f06b2 100644
>> --- a/src/qemu/qemu_domain.c
>> +++ b/src/qemu/qemu_domain.c
>> @@ -3227,6 +3227,7 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
>>       case VIR_ARCH_S390X:
>>           addDefaultUSB = false;
>>           addPanicDevice = true;
>> +        addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI);
>>           break;
> I wonder if you might want to do this, and other stuff, only if
> qemuDomainIsS390CCW()... It seems like that function is not used
> a lot, which might mean that someone is going to have to perform
> some serious cleaning up if there is ever another machine type
> on s390, or perhaps that it just doesn't quite apply here.
>
> If the latter,
>
>    Reviewed-by: Andrea Bolognani <abologna@redhat.com>
>
Thanks!

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