This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1479195 - Guest couldn't be started when cpu's topology set threads more than 1
Guest couldn't be started when cpu's topology set threads more than 1
Status: CLOSED DUPLICATE of bug 1479178
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.4
ppc64le All
medium Severity medium
: rc
: 7.5
Assigned To: Andrea Bolognani
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-08 02:36 EDT by junli
Modified: 2017-08-11 01:06 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-10 20:35:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The debug log (146.18 KB, text/plain)
2017-08-08 02:36 EDT, junli
no flags Details

  None (edit)
Description junli 2017-08-08 02:36:51 EDT
Created attachment 1310453 [details]
The debug log

Description of problem:
Guest couldn't be started when cpu's topology set threads more than 1 and vcpu's current set as odd number

Version-Release number of selected component (if applicable):
libvirt version: 3.2.0, package: 14.virtcov.el7_4.2

How reproducible:
100%

Steps to Reproduce:
1.prepare a domain xml:

<domain type='kvm'>
  <name>avocado-vt-vm1</name>
  <uuid>6a25f65f-2e3a-4383-bb12-7cc8d3cb40bc</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static' current='1'>4</vcpu>        ==>>current is odd number
  <os>
    <type arch='ppc64le' machine='pseries-rhel7.4.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <cpu>
    <topology sockets='1' cores='2' threads='2'/>
  </cpu>
  <clock offset='utc'/>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/avocado/data/avocado-vt/images/jeos-25-64.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <interface type='bridge'>
      <mac address='52:54:00:d5:de:dd'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </interface>
    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
  </devices>
</domain>
2.define this xml
3.start the guest

Actual results:
error: Failed to start domain avocado-vt-vm1
error: internal error: process exited while connecting to monitor: 2017-08-08T06:07:06.405563Z qemu-kvm: smp_cpus (7) must be multiple of threads (2)


Expected results:
Domain avocado-vt-vm1 started

Additional info:
When the current is even number, guest will be started.
Comment 1 Peter Krempa 2017-08-08 02:51:40 EDT
The error message originates from qemu. Could you please add version information for the qemu package?
Comment 2 Peter Krempa 2017-08-08 02:54:28 EDT
Oh, right. This is on PPC64. It's an architecture limitation there. We should report an error ourselves.
Comment 3 junli 2017-08-08 04:21:10 EDT
(In reply to Peter Krempa from comment #1)
> The error message originates from qemu. Could you please add version
> information for the qemu package?

QEMU emulator version 2.9.0(qemu-kvm-rhev-2.9.0-16.el7_4.3)

Red Hat Enterprise Linux Server release 7.4 (Maipo)

3.10.0-693.el7.ppc64le

Sorry, I forgot to add version infomation
Comment 5 David Gibson 2017-08-10 20:35:28 EDT

*** This bug has been marked as a duplicate of bug 1479178 ***
Comment 6 junli 2017-08-10 20:53:00 EDT
(In reply to David Gibson from comment #5)
> 
> *** This bug has been marked as a duplicate of bug 1479178 ***

Sorry, this is on power8
Comment 7 David Gibson 2017-08-10 23:53:21 EDT
junli,

Sorry, I misread the details.

The problem here is that on POWER (strictly the PAPR or "pseries" platform), teh device tree information given to the guest can only encode whole CPU cores, not individual threads.

So, it's not possible to have a total number of threads that's not a multiple of the threads-per-core.  As you can see the error message from qemu says this explicitly.

This is sort of a regression, but only sort of.  Earlier qemu versions didn't verify this explicitly.  What happened in that case was that the guest saw the VM as having a number of threads rounded up to "fill" the last core, but it would get an error when it attempted to online those last threads.

However, having that technically incorrect information given to the guest caused other problems, and so qemu was changed to explicitly disallow this configuration.

As noted this is a platform limitation, so there's really nothing we can do about it.
Comment 8 junli 2017-08-11 01:06:40 EDT
(In reply to David Gibson from comment #7)
> junli,
> 
> Sorry, I misread the details.
> 
> The problem here is that on POWER (strictly the PAPR or "pseries" platform),
> teh device tree information given to the guest can only encode whole CPU
> cores, not individual threads.
> 
> So, it's not possible to have a total number of threads that's not a
> multiple of the threads-per-core.  As you can see the error message from
> qemu says this explicitly.
> 
> This is sort of a regression, but only sort of.  Earlier qemu versions
> didn't verify this explicitly.  What happened in that case was that the
> guest saw the VM as having a number of threads rounded up to "fill" the last
> core, but it would get an error when it attempted to online those last
> threads.
> 
> However, having that technically incorrect information given to the guest
> caused other problems, and so qemu was changed to explicitly disallow this
> configuration.
> 
> As noted this is a platform limitation, so there's really nothing we can do
> about it.

Can we report this err message instead of qemu?

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