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 1236440 - Guest can not start with eoi attribute ('on' or 'off') in apic element
Summary: Guest can not start with eoi attribute ('on' or 'off') in apic element
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: ppc64le
OS: Linux
low
low
Target Milestone: rc
: 8.3
Assignee: Daniel Henrique Barboza (IBM)
QA Contact: Dan Zheng
URL:
Whiteboard:
Depends On:
Blocks: 1829729
TreeView+ depends on / blocked
 
Reported: 2015-06-29 02:36 UTC by Dan Zheng
Modified: 2020-12-03 11:01 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1817955 1829729 (view as bug list)
Environment:
Last Closed: 2020-12-03 11:01:08 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dan Zheng 2015-06-29 02:36:20 UTC
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:
1. Edit XML with eoi='on':
<domain type='kvm' id='7'>
......
<features>
  <acpi/>
  <apic eoi='on'/>
  <pae/>
</features>
<cpu mode='host-model'>
  <model fallback='allow'/>
  <topology sockets='1' cores='5' threads='1'/>
</cpu>

......
</domain>

2. Start guest
[root@ibm-p8-kvm-02-qe var]# virsh start dzhengvm1
error: Failed to start domain dzhengvm1
error: internal error: process exited while connecting to monitor: 2015-06-29T02:28:33.954643Z qemu-kvm: Expected key=value format, found +kvm_pv_eoi.
Unable to find PowerPC CPU definition

3. Edit XML with eoi='off'
<domain type='kvm' id='7'>
......
<features>
  <acpi/>
  <apic eoi='off'/>
  <pae/>
</features>
<cpu mode='host-model'>
  <model fallback='allow'/>
  <topology sockets='1' cores='5' threads='1'/>
</cpu>
......
</domain>

4. Start guest
[root@ibm-p8-kvm-02-qe var]# virsh start dzhengvm1
error: Failed to start domain dzhengvm1
error: internal error: process exited while connecting to monitor: 2015-06-29T02:29:03.297787Z qemu-kvm: Expected key=value format, found -kvm_pv_eoi.
Unable to find PowerPC CPU definition




Actual result:
Guest can not start.

Expected result:
Guest should start correctly.

Additional information:
-- 
No error info in libvirt log and guest log.

Comment 3 Dan Zheng 2015-07-01 10:24:30 UTC
This should be related to bug 1235511.
https://bugzilla.redhat.com/show_bug.cgi?id=1235511

With setting 'power8' in cpu model as below, the guest can start correctly.

 <model fallback='allow'>power8</model>

Comment 5 David Gibson 2015-11-05 03:50:10 UTC
Setting APIC options makes no sense for a Power system, since the APIC is x86 specific.


So, I think all that needs to happen here is a more helpful error message from libvirt.

Comment 6 Andrea Bolognani 2016-08-04 12:27:01 UTC
(In reply to David Gibson from comment #5)
> Setting APIC options makes no sense for a Power system, since the APIC is
> x86 specific.
> 
> So, I think all that needs to happen here is a more helpful error message
> from libvirt.

Seems like QEMU's behavior has changed with respect to
these flags, eg.

  /usr/libexec/qemu-kvm \
    -nographic -no-user-config -nodefaults \
    -M pseries,accel=kvm \
    -cpu POWER8E,+kvm_pv_eoi

used to fail with the message reported above, but now it
seems like unrecognized features are simply being ignored,
even with something like

  /usr/libexec/qemu-kvm \
    -nographic -no-user-config -nodefaults \
    -M pseries,accel=kvm \
    -cpu POWER8E,-some,completely=random,+crap

Was this changed on purpose?

It would of course be better to catch such configuration
errors at the libvirt level rather than letting users
create a configuration that results in a nonsensical QEMU
command line, but I'm wondering whether it's a good idea
for QEMU to be so relaxed when it comes to CPU flags...

Comment 7 David Gibson 2016-09-06 00:43:10 UTC
No, it wasn't changed deliberately.  That must have been a side effect of something else, though I'm not immediately sure what.

I'll try to bisect and find out what changed this.

Comment 8 David Gibson 2017-01-06 00:32:30 UTC
I finally got around to investingating this more deeply.

I can't actually find any upstream versions exhibiting the problem, nor did the most recent 2.6 based downstream version when built from source.  Can we retry with the latest release qemu-kvm-rhev and see if this still has the problem.

Comment 9 Dan Zheng 2017-01-12 08:35:43 UTC
Retest with packages:

qemu-kvm-rhev-2.8.0-1.el7.ppc64le
kernel-3.10.0-537.el7.ppc64le
libvirt-2.5.0-1.el7.ppc64le

OS tree: RHEL-7.4-20170106.n.1

1. Guest uses below XML
<features>
  <acpi/>
  <apic eoi='on'/>
  <pae/>
</features>

# virsh start test
error: Failed to start domain test
error: internal error: process exited while connecting to monitor: 2017-01-12T08:08:27.696881Z qemu-kvm: Expected key=value format, found +kvm_pv_eoi.

2. Guest uses below XML
<features>
  <acpi/>
  <apic eoi='off'/>
  <pae/>
</features>
# virsh start test
error: Failed to start domain test
error: internal error: process exited while connecting to monitor: 2017-01-12T08:13:34.026009Z qemu-kvm: Expected key=value format, found -kvm_pv_eoi.

===> The error message is not accurate.

3. Guest uses below XML
<features>
  <acpi/>
  <pae/>
</features>

or 
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>

# virsh start test
Domain test started

qemu     46132     1 99 03:29 ?        00:00:10 /usr/libexec/qemu-kvm -name guest=test,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-9-test/master-key.aes -machine pseries-rhel7.3.0,accel=kvm,usb=off,dump-guest-core=off -cpu host -m 1024 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -u

===> With both XMLs above, the guest can be started, and 'apic' is ignored in case of the second XML.

Comment 12 Daniel Henrique Barboza (IBM) 2020-03-19 21:46:23 UTC
Patch was sent to the mailing list:

https://www.redhat.com/archives/libvir-list/2020-March/msg00717.html


The approach is the one from comment #5: refuse to launch the guest and provide
a more helpful error message for the user.

Comment 16 Daniel Henrique Barboza (IBM) 2020-03-30 21:27:24 UTC
Fix merged upstream:


commit dbda73ff27cf185fb5db498cc4db281b2d76778d
Author: Daniel Henrique Barboza <danielhb413>
Date:   Tue Mar 24 14:33:21 2020 -0300

    qemu: avoid launching non-x86 guests with APIC-EOI setting

v6.1.0-276-gdbda73ff27

Comment 21 Dan Zheng 2020-07-13 08:36:27 UTC
Package:
libvirt-6.0.0-25.module+el8.3.0+7176+57f10f42.ppc64le

1.Define a guest with eoi:
Add below in xml and define a guest, then an error is raised as below. - PASS
<features>
  <acpi/>
  <apic eoi='on'/>
  <pae/>
</features>
# virsh define dz.xml 
error: Failed to define domain from dz.xml
error: unsupported configuration: The 'eoi' attribute of the 'apic' feature is not supported for architecture 'ppc64le' or machine type 'pseries-rhel8.2.0'


2. Edit a guest with eoi
Add below into a guest xml, then an error is raised as below. - PASS
<features>
  <acpi/>
  <apic eoi='off'/>
  <pae/>
</features>
# virsh edit dz1
error: unsupported configuration: The 'eoi' attribute of the 'apic' feature is not supported for architecture 'ppc64le' or machine type 'pseries-rhel8.2.0'

So I mark it verified.


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