RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1237025 - Guest can not start with different combinations of <cpu> mode and <model>
Summary: Guest can not start with different combinations of <cpu> mode and <model>
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: ppc64le
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Andrea Bolognani
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-30 08:40 UTC by Dan Zheng
Modified: 2015-08-31 09:17 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-31 09:17:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dan Zheng 2015-06-30 08:40:32 UTC
Description of problem:
Guest can not start with three combinations of cpu mode and model as below.

Scenarios tested and results:

Scenario a: host-model + power8, pass
Scenario b: custom + power8, fail
Scenario c: host-model + power8e, fail
Scenario d: custom + power8e, fail

Version-Release number of selected component (if applicable):
libvirt-1.2.16-1.el7.ppc64le
qemu-kvm-rhev-2.3.0-5.el7.ppc64le
kernel-3.10.0-282.el7.ppc64le

How reproducible:
100%

Steps to Reproduce:
Scenario a: host-model + power8, Pass

1. Start guest with below setting, and guest can be started successfully.

# virsh dumpxml dzhengvm1
<cpu mode='host-model'>
<model fallback='allow'>power8</model>
</cpu>


2. Check qemu process, -cpu host,compat=power8 is included in qemu command line.
root@ibm-p8-kvm-02-qe ~]# ps -ef|grep dzheng
qemu 93149 1 93 04:00 ? 00:00:03 /usr/libexec/qemu-kvm -name dzhengvm1 -S -machine pseries-rhel7.2.0,accel=kvm,usb=off -cpu host,compat=power8 -m 4000 -realtime mlock=off -smp

3. Check in guest, POWER8 is displayed as cpu model.
[root@localhost ~]# cat /proc/cpuinfo
processor : 0
cpu : POWER8 (architected), altivec supported
clock : 3425.000000MHz
revision : 2.1 (pvr 004b 0201)

processor : 1
cpu : POWER8 (architected), altivec supported
clock : 3425.000000MHz
revision : 2.1 (pvr 004b 0201)
...


********************************************************
Scenario b: custom + power8, Fail
1. Change cpu mode to custom, keep left things as it is.
<cpu mode='custom'>
<model fallback='allow'>power8</model>
</cpu>

2. Start guest and failed.
# virsh start dzhengvm1
error: Failed to start domain dzhengvm1
error: unsupported configuration: CPU model power8 is not supported by hypervisor

Actual result:
Guest can not start when custom mode and power8 model are set.

Expected result:
Guest should be able to start with custom mode and power8 model.


******************************************************
Scenario c: host-model + power8e , Fail
1. Edit guest with power8e model as below:
# virsh dumpxml dzhengvm1
<cpu mode='host-model'>
  <model fallback='allow'>power8e</model>
</cpu>
 
2. Start guest and fail.
# virsh start dzhengvm1
error: Failed to start domain dzhengvm1
error: internal error: process exited while connecting to monitor: 2015-06-30T06:16:12.138660Z qemu-kvm: Invalid compatibility mode "power8e"
Unable to find PowerPC CPU definition

Note: same error with POWER8E .

3. Check cpu_map.xml # cat /usr/share/libvirt/cpu_map.xml, power8/power8e is defined.
<arch name='ppc64'>
<!-- vendor definitions -->
<vendor name='IBM'/>
<vendor name='Freescale'/>
     ...
<model name='power8e'>
<vendor name='IBM'/>
<compat isa='2.07'/>
<pvr value='0x004b0000'/>
</model>

<model name='power8'>
<vendor name='IBM'/>
<compat isa='2.07'/>
<pvr value='0x004d0000'/>
</model>
...

4. Check qemu-kvm -cpu help
...
PowerPC POWER8E_v1.0     PVR 004b0100
PowerPC POWER8E          (alias for POWER8E_v1.0)
PowerPC POWER8_v1.0      PVR 004d0100
PowerPC POWER8           (alias for POWER8_v1.0)
...

Actual result:
Guest can not start when host-model and power8e are set.

Expected result:
Guest should be able to start correctly.

Additional information:
1.Start guest using setting and guest can be started successfully.
<cpu mode='host-model'>
<model fallback='allow'/>
</cpu>

2. Check qemu process, -cpu host is used.
qemu     156148      1 90 23:25 ?        00:00:05 /usr/libexec/qemu-kvm -name dzhengvm1 -S -machine pseries-rhel7.2.0,accel=kvm,usb=off -cpu host -m 4000 -realtime mlock=off -smp

3. Check capabilities XML, power8e is used as cpu model on host.
# virsh capabilities
<capabilities>

  <host>
    <uuid>a1f3ea1d-8893-4317-a152-e6bc0ee6caab</uuid>
    <cpu>
      <arch>ppc64le</arch>
      <model>power8e</model>
      <vendor>IBM</vendor>
      <topology sockets='1' cores='160' threads='1'/>
      <pages unit='KiB' size='64'/>
      <pages unit='KiB' size='16384'/>
      <pages unit='KiB' size='16777216'/>
    </cpu>
4. Check within guest
# cat /proc/cpuinfo
processor        : 0
cpu                : POWER8E (raw), altivec supported
clock                : 3425.000000MHz
revision        : 2.1 (pvr 004b 0201)
...
timebase        : 512000000
platform        : pSeries
model                : IBM pSeries (emulated by qemu)
machine                : CHRP IBM pSeries (emulated by qemu)



*******************************************************************
Scenario d: custom + power8e, Fail
1. Change mode from host-model to custom, guest fails to start, either.
<cpu mode='custom'>
<model fallback='allow'>power8e</model>
</cpu>

2.# virsh start dzhengvm1
error: Failed to start domain dzhengvm1
error: unsupported configuration: CPU model power8e is not supported by hypervisor

Actual result:
Guest fails to start when mode=custom and model=power8e

Expected result:
Guest should be started successfully when mode=custom and model=power8e because power8e is supported on host (in capabilities XML) and guest can run with power8e (see inside of guest)

Comment 2 Andrea Bolognani 2015-08-31 09:17:31 UTC
The failing cases where not supposed to be working in the
first place. Moreover, any confusion caused by listing
compatibility modes along with CPU models and reporting
the host CPU model as 'power8e' should have been removed
as part of

  https://bugzilla.redhat.com/show_bug.cgi?id=1250977

Closing this as NOTABUG.


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