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
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Andrea Bolognani
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1365643
Blocks:
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:
Environment:
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'>
    <model>power7</model>
  </cpu>

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.

Packages:

  kernel-3.10.0-485.el7.ppc64le
  qemu-kvm-rhev-2.6.0-19.el7.ppc64le
  libvirt-daemon-2.0.0-4.el7.ppc64le


[1] https://raobharata.wordpress.com/2016/08/09/cpu-hotplug-support-in-powerkvm/
    Search for "CPU compat option" for the relevant bits

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

See

  http://lists.nongnu.org/archive/html/qemu-devel/2016-08/msg02027.html

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 <groug@kaod.org>
  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:

      https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg07564.html

      Signed-off-by: Greg Kurz <groug@kaod.org>
      [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 <clg@kaod.org>
      Tested-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
      Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

  v2.7.0-rc2-44-ge703d2f

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.