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 1317977 - qemu-kvm-rhev supports a lot of CPU models
Summary: qemu-kvm-rhev supports a lot of CPU models
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: ppc64le
OS: Linux
unspecified
low
Target Milestone: rc
: 7.3
Assignee: David Gibson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: RHV4.1PPC
TreeView+ depends on / blocked
 
Reported: 2016-03-15 16:32 UTC by Andrea Bolognani
Modified: 2016-11-07 21:00 UTC (History)
19 users (show)

Fixed In Version: qemu-kvm-rhev-2.6.0-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 21:00:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2673 0 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2016-11-08 01:06:13 UTC

Description Andrea Bolognani 2016-03-15 16:32:05 UTC
The qemu-kvm binary on ppc64le RHEL advertises support for a
huge number of CPU models:

  $ /usr/libexec/qemu-kvm -cpu ? 2>&1 | wc -l
  432

For comparison, libvirt only advertises support for a fraction
of those[1]:

  $ sudo virsh cpu-models ppc64le
  POWERPC_e6500
  POWERPC_e5500
  POWER8
  POWER7
  POWER6

Please consider patching qemu-kvm-rhev to get rid of the extra
entries.


[1] Interestingly, the only CPU models that are listed by both
    are POWER7 and POWER8, so libvirt probably needs some
    cleaning up as well.

Comment 2 Thomas Huth 2016-04-05 07:20:41 UTC
When I look through the output of QEMU's cpu list, I can see a "e5500", a "POWER7" and a "POWER8", but nothing that matches e6500 or POWER6. Out of curiosity: What is libvirt doing when you specify one of those two CPUs? Should they be removed from libvirt, or should they rather be added to QEMU instead?

Comment 3 Andrea Bolognani 2016-04-06 13:24:15 UTC
(In reply to Thomas Huth from comment #2)
> When I look through the output of QEMU's cpu list, I can see a "e5500", a
> "POWER7" and a "POWER8", but nothing that matches e6500 or POWER6. Out of
> curiosity: What is libvirt doing when you specify one of those two CPUs?
> Should they be removed from libvirt, or should they rather be added to QEMU
> instead?

I was planning to discuss this with Jirka, so I've added him to
the CC List for the bug.

If you specify any of the models you mentioned for a guest,
libvirt will not complain but you're going to get an error from
QEMU, just as you'd expect.

The problem here is that the CPU models libvirt knows about are
used both for the guest and for the host, so even if QEMU
doesn't know about POWER6 and can't use it for a guest we still
want to keep that information around so libvirt can correctly
identify a POWER6 host.

Anyway, this is just an aside from downstream QEMU's point of
view, which unless I'm mistaken only really needs to advertise
POWER8.

Comment 4 Thomas Huth 2016-04-11 11:31:15 UTC
To keep the changes in downstream simple, I'd suggest to simply disable the embedded and 32-bit PowerPC CPUs like this:

diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c
--- a/target-ppc/cpu-models.c
+++ b/target-ppc/cpu-models.c
@@ -70,6 +70,7 @@
 #define POWERPC_DEF(_name, _pvr, _type, _desc)                              \
     POWERPC_DEF_SVR(_name, _desc, _pvr, POWERPC_SVR_NONE, _type)
 
+#if 0
     /* Embedded PowerPC                                                      */
     /* PowerPC 401 family                                                    */
     POWERPC_DEF("401",           CPU_POWERPC_401,                    401,
@@ -1101,6 +1102,7 @@
                 "PowerPC 7447A v1.2 (G4)")
     POWERPC_DEF("7457A_v1.2",    CPU_POWERPC_74x7A_v12,              7455,
                 "PowerPC 7457A v1.2 (G4)")
+#endif
     /* 64 bits PowerPC                                                       */
 #if defined (TARGET_PPC64)
 #if defined(TODO)
@@ -1226,6 +1228,7 @@
 /* PowerPC CPU aliases                                                     */
 
 PowerPCCPUAlias ppc_cpu_aliases[] = {
+#if 0
     { "403", "403GC" },
     { "405", "405D4" },
     { "405CR", "405CRc" },
@@ -1381,6 +1384,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
     { "7447A", "7447A_v1.2" },
     { "7457A", "7457A_v1.2" },
     { "Apollo7PM", "7457A_v1.0" },
+#endif
 #if defined(TARGET_PPC64)
     { "Trident", "620" },
     { "POWER3", "630" },

POWER7 and some other 64-bit CPUs are still enabled that way, but I think that does not hurt that much anymore and might even be useful for some regression testing with kvm-pr. If that sounds reasonable, let me know, then I can post this as a proper patch.

Comment 6 Andrea Bolognani 2016-04-11 12:12:59 UTC
(In reply to Thomas Huth from comment #4)
> POWER7 and some other 64-bit CPUs are still enabled that way, but I think
> that does not hurt that much anymore and might even be useful for some
> regression testing with kvm-pr. If that sounds reasonable, let me know, then
> I can post this as a proper patch.

I'll leave coming up with a good balance between not
overwhelming the user who might run that command and not
disabiling some potentially useful stuff to you guys.

It's mostly a cosmetic issue anyway, so it's probably only
worth it as long as it doesn't cause too much extra work
for the maintainers.

Comment 7 Miroslav Rezanina 2016-05-25 08:45:48 UTC
Fix included in qemu-kvm-rhev-2.6.0-4.el7

Comment 9 Xujun Ma 2016-06-03 06:52:43 UTC
Reproduced the issue on old version:

Version-Release number of selected component (if applicable):
qemu-kvm-rhev:qemu-kvm-rhev-2.3.0-31.el7_2.8.ppc64le
Host kernel:3.10.0-418.el7.ppc64le


Steps to Reproduce:
1.run command on the host:
/usr/libexec/qemu-kvm -cpu ? 2>&1 | wc -l
432


result:list 432 cpus


Verified the issue on the latest build:
Version-Release number of selected component (if applicable):
qemu-kvm-rhev:qemu-kvm-rhev-2.6.0-4.el7.ppc64le
Host kernel:3.10.0-418.el7.ppc64le


Steps to Verify:
1.run command on the host:
/usr/libexec/qemu-kvm -cpu ? 2>&1 | wc -l
12
/usr/libexec/qemu-kvm -cpu ?
PowerPC POWER7_v2.3      PVR 003f0203
PowerPC POWER7           (alias for POWER7_v2.3)
PowerPC POWER7+_v2.1     PVR 004a0201
PowerPC POWER7+          (alias for POWER7+_v2.1)
PowerPC POWER8E_v2.1     PVR 004b0201
PowerPC POWER8E          (alias for POWER8E_v2.1)
PowerPC POWER8NVL_v1.0   PVR 004c0100
PowerPC POWER8NVL        (alias for POWER8NVL_v1.0)
PowerPC POWER8_v2.0      PVR 004d0200
PowerPC POWER8           (alias for POWER8_v2.0)

PowerPC host 


result:deleted other unsupported cpus
so the bug seems to be fixed

Comment 11 errata-xmlrpc 2016-11-07 21:00:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2673.html


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