Bug 1150510

Summary: kernel ignores ACPI memory devices (PNP0C80) present at boot time
Product: Red Hat Enterprise Linux 6 Reporter: Igor Mammedov <imammedo>
Component: kernelAssignee: Igor Mammedov <imammedo>
kernel sub component: Other QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: chayang, hhuang, huding, juzhang, qzhang, xfu, xwei
Version: 6.7   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-2.6.32-517.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 08:25:49 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
[RHEL6.7 1/7] ACPI / memory-hotplug: call acpi_bus_trim() to remove memory device
none
[RHEL6.7 2/7] ACPI / memory-hotplug: add memory offline code to acpi_memory_device_remove()
none
[RHEL6.7 3/7] ACPI / memhotplug: deal with eject request in hotplug queue
none
[RHEL6.7 4/7] ACPI / memhotplug: fix memory leak when memory device is unbound from acpi_memhotplug
none
Subject: [RHEL6.7 5/7] ACPI / memhotplug: free memory device if acpi_memory_enable_device() failed
none
[RHEL6.7 6/7] ACPI / memhotplug: don't allow to eject the memory device if it is being used
none
[RHEL6.7 7/7] ACPI / memhotplug: bind the memory device when the driver is being loaded none

Description Igor Mammedov 2014-10-08 11:42:26 UTC
Description of problem:

ACPI Memory devices present in ACPI tables at boot time are ignored by kernel.

as result is doesn't create sysfs nodes for it which makes this memory unmanageable. While if such device is hotplugged, kernel creates necessary sysfs entries for it.

Version-Release number of selected component (if applicable):
2.6.32-504 and older

How reproducible:
100%

Steps to Reproduce:
1. on rhel 7.1 host start guest with following CLI

qemu-kvm -enable-kvm  -m 1024,slots=2,maxmem=4G -object memory-backend-ram,id=m0,size=1G -device pc-dimm,id=foo,memdev=m0 -drive if=virtio,file=./rhel6x64.qcow2

2.in guest:

cat /sys/devices/system/memory/memory32/state
...: No such file or directory

Actual results:
missing sysfs entries for second gigabyte described as PNP0C80 device in ACPI tables.

Expected results:
sysfs entries for device should be present regardless if device was hotplugged or present at boot time.

Additional info:
Issue is fixed upstream in 3.8 kernel.

Comment 1 Igor Mammedov 2014-10-09 08:11:21 UTC
Created attachment 945218 [details]
[RHEL6.7 1/7] ACPI / memory-hotplug: call acpi_bus_trim() to remove  memory device

Comment 2 Igor Mammedov 2014-10-09 08:12:01 UTC
Created attachment 945221 [details]
[RHEL6.7 2/7] ACPI / memory-hotplug: add memory offline code to  acpi_memory_device_remove()

Comment 3 Igor Mammedov 2014-10-09 08:12:40 UTC
Created attachment 945222 [details]
[RHEL6.7 3/7] ACPI / memhotplug: deal with eject request in hotplug  queue

Comment 4 Igor Mammedov 2014-10-09 08:13:17 UTC
Created attachment 945223 [details]
[RHEL6.7 4/7] ACPI / memhotplug: fix memory leak when memory device  is unbound from acpi_memhotplug

Comment 5 Igor Mammedov 2014-10-09 08:14:05 UTC
Created attachment 945224 [details]
Subject: [RHEL6.7 5/7] ACPI / memhotplug: free memory device if  acpi_memory_enable_device() failed

Comment 6 Igor Mammedov 2014-10-09 08:14:45 UTC
Created attachment 945225 [details]
[RHEL6.7 6/7] ACPI / memhotplug: don't allow to eject the memory  device if it is being used

Comment 7 Igor Mammedov 2014-10-09 08:15:44 UTC
Created attachment 945226 [details]
[RHEL6.7 7/7] ACPI / memhotplug: bind the memory device when the  driver is being loaded

Comment 8 RHEL Program Management 2014-11-10 23:10:13 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 9 Rafael Aquini 2014-12-11 22:42:11 UTC
Patch(es) available on kernel-2.6.32-517.el6

Comment 12 Xiaoqing Wei 2015-02-28 08:21:42 UTC
/bin/qemu-kvm -monitor stdio \
    -S  \
    -name 'virt-tests-vm1'  \
    -sandbox off  \
    -M pc  \
    -nodefaults  \
    -vga cirrus  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20150228-161325-He5UApdY,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20150228-161325-He5UApdY,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20150228-161325-He5UApdY,path=/tmp/seabios-20150228-161325-He5UApdY,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20150228-161325-He5UApdY,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-6.7-64-virtio.qcow2 \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=04 \
    -device virtio-net-pci,mac=9a:96:97:98:99:9a,id=idKozQLY,vectors=4,netdev=idcXDmAM,bus=pci.0,addr=05  \
    -netdev tap,id=idcXDmAM,vhost=on  \
\
\

    -m 1024,slots=2,maxmem=4G -object memory-backend-ram,id=m0,size=1G -device pc-dimm,id=foo,memdev=m0  \
\
\
\
    -smp 2,maxcpus=2,cores=1,threads=1,sockets=2  \
    -cpu 'Opteron_G5',+kvm_pv_unhalt \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :0  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm



on guest w/ kernel 504:


cat /sys/devices/system/memory/memory32/state
...: No such file or directory


on guest w/ kernel 540:


cat /sys/devices/system/memory/memory32/state
online



based on above, this bug has fixed.

Comment 14 errata-xmlrpc 2015-07-22 08:25:49 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/RHSA-2015-1272.html