[libvirt] [PATCH 05/13] qemu: Auto add pci-root for s390/s390x guests
Cornelia Huck
cohuck at redhat.com
Mon Jun 4 15:10:32 UTC 2018
On Mon, 4 Jun 2018 16:17:52 +0200
Ján Tomko <jtomko at redhat.com> wrote:
> On Mon, Jun 04, 2018 at 02:05:17PM +0800, Yi Min Zhao wrote:
> >
> >
> >在 2018/6/2 下午10:18, Ján Tomko 写道:
> >> On Thu, May 24, 2018 at 02:24:30PM +0200, Xiao Feng Ren wrote:
> >>> From: Yi Min Zhao <zyimin at linux.ibm.com>
> >>>
> >>> The pci-root depends on zpci capability. So autogenerate pci-root if
> >>> zpci exists.
> >>>
> >>> Signed-off-by: Yi Min Zhao <zyimin at linux.ibm.com>
> >>> Reviewed-by: Boris Fiuczynski <fiuczy at linux.vnet.ibm.com>
> >>> Reviewed-by: Stefan Zimmermann <stzi at linux.ibm.com>
> >>> Reviewed-by: Bjoern Walk <bwalk at linux.vnet.ibm.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 ee676a2789..05136540aa 100644
> >>> --- a/src/qemu/qemu_domain.c
> >>> +++ b/src/qemu/qemu_domain.c
> >>> @@ -3068,6 +3068,7 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr
> >>> def,
> >>> case VIR_ARCH_S390X:
> >>> addDefaultUSB = false;
> >>> addPanicDevice = true;
> >>> + addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI);
> >>
> >> So from a certain QEMU version all the S390 machine types have an
> >> implicit PCI root?
> >If zPCI exists, there must be pci root.
> >>
> >> Is migration a thing on S390?
> >I'm not clear with your said. Could you please explain more?
> >>
>
> Well from this code it seems from a certain version, QEMU added a new
> implicit device for all machine types, without letting libvirt have
> control over it, which is strange.
>
> So if we have a machine started by older libvirt on older QEMU,
> can we do a live migration to a newer libvirt+QEMU with the zPCI
> functionality? Or did live migration never work on S390?
[warning, perspective of a non-libvirt qemu developer ahead]
Sadly, zpci support in qemu took quite some time from "we've committed
a prototype that works for some of us with hacked-up setups" to "should
be usable".
- The s390 phb device has been created unconditionally since 2.3. We
tried to make it conditional later, but could not find a way to do so
without breaking migration.
- Compat machines for s390 only go back to 2.4, so this hopefully
should not hurt migration.
- The zpci device (which seems to be what the zpci capability refers
to, if I read patch 2 correctly) has only existed since 2.7, so any
qemu supporting the zpci device also has the s390 phb present, which
seems to be in line with what this patch does.
- You'll also need the zpci cpu feature bit set to have something that
is actually usable by a guest. That was added in 2.10.
More information about the libvir-list
mailing list