Bug 1914069

Summary: [ppc64le] have this fix for rhel8.4 av (spapr: Allow memory unplug to always succeed)
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Min Deng <mdeng>
Component: qemu-kvmAssignee: Greg Kurz <gkurz>
qemu-kvm sub component: General QA Contact: Min Deng <mdeng>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: dgibson, gkurz, mdeng, qzhang, virt-maint, ymankad
Version: 8.4Keywords: Triaged
Target Milestone: rc   
Target Release: 8.4   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-5.2.0-5.module+el8.4.0+9775+0937c167 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-25 06:46:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test result none

Description Min Deng 2021-01-08 04:20:22 UTC
Description of problem:
[ppc64le] have this fix for rhel8.4 av (spapr: Allow memory unplug to always succeed)

Version-Release number of selected component (if applicable):
qemu-kvm-5.2.0-2.scrmod+el8.4.0+9296+f2b1d20b.wrb210106.ppc64le

How reproducible:
3/3

Steps to Reproduce:
1.hot-unplug pc-dimm on early stage of booting up a guest (see also bz1901837 for rhel8.4)
/usr/libexec/qemu-kvm -name guest=nrs,debug-threads=on -machine pseries,accel=kvm,cap-ccf-assist=off -m size=20G,slots=256,maxmem=100G -smp 4,sockets=4,cores=1,threads=1 -uuid d7987973-2467-43ff-b8d2-acefc6ac59e5 -display none -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/tmp/qmp,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -boot strict=on -device qemu-xhci,id=usb,bus=pci.0,addr=0x3 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x2 -drive file=rhel840-ppc64le-virtio-scsi.qcow2,format=qcow2,if=none,id=drive-scsi0-0-0-0 -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on -monitor stdio -chardev socket,id=serial_id_serial0,path=/tmp/S,server,nowait -device spapr-vty,reg=0x30000000,chardev=serial_id_serial0 -monitor unix:/tmp/monitor3,server,nowait -object memory-backend-ram,id=mem1,size=20G

QEMU 4.2.0 monitor - type 'help' for more information
(qemu)  device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) system_reset
(qemu) device_del dimm1 
Error: Memory hot unplug not supported for this guest
(qemu) device_del dimm1 
Error: Memory hot unplug not supported for this guest
(qemu) device_del dimm1 
Error: Memory hot unplug not supported for this guest
(qemu) device_del dimm1 
Error: Memory hot unplug not supported for this guest


Actual results:
Can't remove pc-dimm at early stage booting up and error's pop up

Expected results:
The linux kernel has been supporting these since 4.11. All recent
enough guests are thus capable of handling the removal of a memory
device at all time, including during early boot.

Additional info:
There's similar issue on rhel8.4 bz1901837 , it's an improvement for us and prefer to have this fix on rhel8.4 AV as well, so file this bug, thanks a lot.

Comment 8 Min Deng 2021-01-25 03:07:23 UTC
Hi Greg,
The test is on going, thanks.
Min

Comment 13 Min Deng 2021-01-25 11:00:01 UTC
Re-test the scratch build, the fix should work well, and QE will also provide some regression test for this feature as soon as I get the result. Thanks.

Comment 16 Min Deng 2021-01-26 02:14:52 UTC
Created attachment 1750739 [details]
test result

The memory hotplug regression test passed on build from comment6, thanks.

Comment 20 Min Deng 2021-02-03 09:20:02 UTC
Verified the bug with the build
qemu-kvm-5.2.0-5.module+el8.4.0+9775+0937c167
kenrel-4.18.0-277.el8.ppc64le

QEMU 5.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) system_reset
(qemu) device_del dimm1 
(qemu) device_del dimm1 
Error: Memory unplug already in progress for device dimm1
(qemu) device_del dimm1 
Error: Memory unplug already in progress for device dimm1
(qemu) device_del dimm1 
Error: Memory unplug already in progress for device dimm1
(qemu) device_del dimm1 
Error: Memory unplug already in progress for device dimm1
(qemu) device_del dimm1 
Error: Memory unplug already in progress for device dimm1
(qemu) device_del dimm1 
Error: Device 'dimm1' not found

Actual results,
The pc-dimm can be removed at early rebooting stage
Expected results,
The pc-dimm  can be removed at early rebooting stage

The issue should be fixed, thanks.

Comment 22 errata-xmlrpc 2021-05-25 06:46:31 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 (virt:av bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2021:2098