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 1361443 - ppc64le: Introduce stable cpu_index for cpu hotplugging
Summary: ppc64le: Introduce stable cpu_index for cpu hotplugging
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
urgent
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-07-29 05:55 UTC by David Gibson
Modified: 2016-11-15 10:08 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-rhev-2.6.0-19.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 21:27:10 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
IBM Linux Technology Center 148716 None None None 2016-11-15 10:06:34 UTC
Red Hat Product Errata RHBA-2016:2673 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2016-11-08 01:06:13 UTC

Description David Gibson 2016-07-29 05:55:04 UTC
Description of problem:

Although we've merged downstream the qemu patches to add support for vcpu hotplug on Power, we're missing the follow up patches which fix problems with cpu_index allocation.  Depending on exact version that either means it's not possible to plug cpu cores "out of order" or that if you do, migration will fail. 

Version-Release number of selected component (if applicable):

qemu-kvm-rhev-2.6.0-16.el7.ppc64le

How reproducible:

100%

Steps to Reproduce:
1. Start a VM with >2 possible cpu cores, but only 1 initial core
2. Attempt to hotplug the last core
3. Attempt to migrate the VM

Actual results:

Depending on exact version, either an error at step #2, or an error in step #3.

Expected results:

Hotplug succeeds and so does migration.

Additional info:

Comment 1 David Gibson 2016-07-29 05:56:33 UTC
This bug depends on bug 1172917 in terms of application order, but in order to test bug 1172917 we'll need the fix to this bug.  Not sure which way around the depends should go here.

Comment 4 Miroslav Rezanina 2016-08-05 10:57:41 UTC
Fix included in qemu-kvm-rhev-2.6.0-19.el7

Comment 6 Xujun Ma 2016-08-11 02:28:34 UTC
Reproduced the issue on old version:

Version-Release number of selected component (if applicable):
kernel-3.10.0-481.el7.ppc64le
qemu-kvm-rhev-2.6.0-16.el7.ppc64le
SLOF-20160223-5.gitdbbfda4.el7.noarch


Steps to Reproduce:


1.Boot up a guest with with command:
/usr/libexec/qemu-kvm \
 -name xuma-test \
 -smp 1,maxcpus=3,sockets=1,cores=1,threads=1 \
 -m 1024 \
 -monitor stdio \
 -vnc :20 \
 -qmp tcp:0:4444,server,nowait \
 -device virtio-scsi-pci,bus=pci.0 \
 -device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \
 -drive file=/root/RHEL-7.2.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \
 -device virtio-net-pci,netdev=net0,id=nic0,mac=52:54:00:c4:e7:84 \
 -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on \
 

2.check cpus in hmp then hotplug last core:
(qemu) info hotpluggable-cpus 
Hotpluggable CPUs:
  type: "host-spapr-cpu-core"
  vcpus_count: "1"
  CPUInstance Properties:
    core-id: "16"
  type: "host-spapr-cpu-core"
  vcpus_count: "1"
  CPUInstance Properties:
    core-id: "8"
  type: "host-spapr-cpu-core"
  vcpus_count: "1"
  qom_path: "/machine/unattached/device[1]"
  CPUInstance Properties:
    core-id: "0"
(qemu) device_add host-spapr-cpu-core,core-id=16
(qemu) info hotpluggable-cpus 
Hotpluggable CPUs:
  type: "host-spapr-cpu-core"
  vcpus_count: "1"
  qom_path: "/machine/peripheral-anon/device[1]"
  CPUInstance Properties:
    core-id: "16"
  type: "host-spapr-cpu-core"
  vcpus_count: "1"
  CPUInstance Properties:
    core-id: "8"
  type: "host-spapr-cpu-core"
  vcpus_count: "1"
  qom_path: "/machine/unattached/device[1]"
  CPUInstance Properties:
    core-id: "0"

3.boot up destination vm and hotplug last core:
/usr/libexec/qemu-kvm \
 -name xuma-test \
 -smp 1,maxcpus=3,sockets=1,cores=1,threads=1 \
 -m 1024 \
 -monitor stdio \
 -vnc :20 \
 -qmp tcp:0:4444,server,nowait \
 -device virtio-scsi-pci,bus=pci.0 \
 -device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \
 -drive file=/root/RHEL-7.2.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \
 -device virtio-net-pci,netdev=net0,id=nic0,mac=52:54:00:c4:e7:84 \
 -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on \
 -incoming tcp:0:7777
(qemu) device_add host-spapr-cpu-core,core-id=16

4.migrate vm in source vm hmp
(qemu) migrate tcp:0:7777


Actual results:
hotplugging cpu succeeded ,and migration failed with error information:
qemu-kvm: socket_writev_buffer: Got err=104 for (131328/18446744073709551615)


Verified the issue on the latest build:
Version-Release number of selected component (if applicable):
kernel-3.10.0-481.el7.ppc64le
qemu-kvm-rhev-2.6.0-19.el7.ppc64le
SLOF-20160223-5.gitdbbfda4.el7.noarch

Steps to Reproduce:
The same steps as above


Actual results:
hotplugging cpu and migration succeeded

Base on the above results ,the bug has been fixed.

Comment 8 errata-xmlrpc 2016-11-07 21:27:10 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.