Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1365647 - libvirt: ppc64 CPU compatibility modes no longer work
Summary: libvirt: ppc64 CPU compatibility modes no longer work
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: ppc64le
OS: Linux
Target Milestone: ---
Assignee: Andrea Bolognani
QA Contact: Virtualization Bugs
Depends On: 1365643
TreeView+ depends on / blocked
Reported: 2016-08-09 18:03 UTC by Andrea Bolognani
Modified: 2016-08-17 12:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-08-17 12:50:22 UTC

Attachments (Terms of Use)

Description Andrea Bolognani 2016-08-09 18:03:15 UTC
Up until very recently, one could use

  <cpu mode='host-model'>

on a POWER8 host to get a POWER7 CPU in the guest; recent QEMU
versions however partially ignore the

  -cpu host,compat=power7

argument generated by libvirt, and as a result the guest ends
up having the same CPU model as the host.

According to [1]:

> Prior to QEMU-2.7, to start a guest with POWER7 CPU model on
> say a POWER8 host, it was sufficient to specify compat option
> like this:
> -cpu host,compat=power7
> However with QEMU-2.7, compat option will have to be
> specified using -global option so that the specified compat
> level is applied uniformly to boot CPUs as well as hotplugged
> CPUs.
> -cpu host \
> -global driver=host-powerpc64-cpu,property=compat,value=power7

This change doesn't break existing guests because the
pseries-rhel7.2.0 machine type still behaves the old way, but
new guests using the pseries-rhel7.3.0 machine type will get
a POWER8 CPU instead of the POWER7 CPU they expect.

A qemu-kvm-rhev bug has been filed as Bug 1365643.



    Search for "CPU compat option" for the relevant bits

Comment 3 Andrea Bolognani 2016-08-11 08:41:26 UTC
Moved upstream.


for discussion about the underlying QEMU changes.

Comment 4 Andrea Bolognani 2016-08-17 12:50:22 UTC
A fix for the underlying QEMU issue has been merged upstream:

  commit e703d2f71c0f3f721b66bd2955135524538d2c58
  Author: Greg Kurz <>
  Date:   Wed Aug 10 21:08:01 2016 +0200

      ppc: parse cpu features once

      Considering that features are converted to global properties and
      global properties are automatically applied to every new instance
      of created CPU (at object_new() time), there is no point in
      parsing cpu_model string every time a CPU created. So move
      parsing outside CPU creation loop and do it only once.

      Parsing also should be done before any CPU is created so that
      features would affect the first CPU a well.

      This patch does that for all PowerPC machine types.

      It is based on previous work from Bharata:

      Signed-off-by: Greg Kurz <>
      [clg: only kept the fix for the spapr platform. support for other
            platform will be added in 2.8 ]
      Signed-off-by: Cédric Le Goater <>
      Tested-by: Bharata B Rao <>
      Signed-off-by: David Gibson <>


Since no released version of QEMU will include the problematic
behaviour, libvirt will not be affected by it.

Closing as NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.