[libvirt] [PATCH 0/4] qemu: Use host-model CPU on s390 by default
jdenemar at redhat.com
Tue Nov 19 14:02:39 UTC 2019
On Mon, Nov 18, 2019 at 18:34:36 +0100, Boris Fiuczynski wrote:
> On 11/15/19 4:14 PM, Jiri Denemark wrote:
> > On Fri, Nov 15, 2019 at 15:55:04 +0100, Christian Borntraeger wrote:
> >> On 15.11.19 15:47, Jiri Denemark wrote:
> >>> On Fri, Nov 15, 2019 at 15:12:18 +0100, Boris Fiuczynski wrote:
> >>>> Just a heads up.
> >>>> After installing libvirt rpms of this branch all my existing kvm s390
> >>>> domains ended up with
> >>>> <cpu mode='custom' match='exact' check='none'>
> >>>> <model fallback='forbid'>qemu</model>
> >>>> </cpu>
> >>>> Newly defined domains without specified cpu do so as well.
> >>> Unless the domains are all TCG, it seems your QEMU is too old. You need
> >>> a fairly recent one which contains commit v4.1.0-1683-gde60a92ea7
> >>> (s390x/kvm: Set default cpu model for all machine classes)
> >>> I the domains all use KVM and you have new enough QEMU, there might be a
> >>> bug somewhere. Which should not happen :=)
> >> So shouldnt libvirt fence this rework (add default model) to qemu 4.2 and newer?
> > Libvirt does all this only if query-machines returns default-cpu-type,
> > which is introduced in 4.2. But since it was introduced earlier, anyone
> > using qemu from git between the two commits will see this behavior.
> > Somewhat similar thing will happen on ppc64, but even with the current
> > master. Everything should be OK once QEMU 4.2.0 final release is used,
> > though (since it will contain all required patches).
> > Jirka
> I tested with a newer version of qemu and it worked as you outlined.
> After that I also tested with qemu v4.1.0. I was a bit surprised at
> first that a default host-model cpu was generated since I though it
> would only be done when the qemu has the commit your specified above.
> After reading your patch 4 the generation is tied to the cpu-model
> support in qemu. Since this became available on s390 with qemu v2.8.0 I
> created an additional test patch just to ensure that we do not lose
> backwards compatibility.
Oh, are you saying QEMU on s390 returns default-cpu-type in
query-machines reply even with v4.1.0 and older? I don't see it in our
test replies from anything older then v4.2.0.
Anyway, libvirt should not set the default CPU with QEMU 4.1.0 and if it
does, I have a bug in my patches :-)
qemuDomainDefSetDefaultCPU should not be called at all on QEMU 4.1.0 or
older. The check for cpu-model support in this function is an additional
check and this support should not be sufficient for the default CPU to
be filled in.
More information about the libvir-list