This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1261846 - qemu-kvm-rhev: 64-bit PCI bars may overlap hotplugged memory and vice verse
qemu-kvm-rhev: 64-bit PCI bars may overlap hotplugged memory and vice verse
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
Unspecified Unspecified
medium Severity high
: rc
: ---
Assigned To: Igor Mammedov
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-10 06:02 EDT by Igor Mammedov
Modified: 2015-12-04 11:56 EST (History)
8 users (show)

See Also:
Fixed In Version: qemu-kvm-rhev-2.3.0-23.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-04 11:56:52 EST
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)

  None (edit)
Description Igor Mammedov 2015-09-10 06:02:36 EDT
Description of problem:
In QEMU reserved-memory-end tells firmware address from which
it could start treating memory as PCI address space
and map PCI BARs after it to avoid collisions with
RAM.
Currently it is incorrectly pointing to address where
hotplugged memory range starts which could redirect
hotplugged RAM accesses to PCI BARs when firmware
maps them over RAM or vice verse.
Fix this by pointing reserved-memory-end to the end
of memory hotplug area.

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-102
Comment 4 Igor Mammedov 2015-09-11 08:49:54 EDT
Easy way to verify bug,

1: 
/usr/libexec/qemu-kvm  -m 4G,slots=1,maxmem=12G \
   -object memory-backend-ram,id=dimm1,size=1G \
   -device ivshmem,size=1G,shm=ssss \
   -device pc-dimm,id=d1,memdev=dimm1 \
   -monitor stdio -M pc-i440fx-rhel7.2.0

2:
execute in monitor prompt command 'info mtree'

Actual results:
  0000000140000000-000000017fffffff (prio 0, RW): ivshmem.bar2
...
0000000140000000-000000037fffffff (prio 0, RW): hotplug-memory
  0000000140000000-000000017fffffff (prio 0, RW): dimm1

Expected results:
ivshmem.bar2 shouldn't intersect with hotplugged memory
and should start beyond hotplug-memory region range, i.e. after 000000037fffffff

with -M pc-i440fx-rhel7.1.0 Expected result should stay broken like in Actual result.
Comment 6 Miroslav Rezanina 2015-09-15 06:51:15 EDT
Fix included in qemu-kvm-rhev-2.3.0-23.el7
Comment 7 Pei Zhang 2015-09-16 01:24:57 EDT
Summary: The results of verification can prove that this bug has been fixed.


Reproduced:
Host:
kernel:3.10.0-316.el7.x86_64
qemu-img-rhev-2.3.0-22.el7.x86_64

Steps:
1.# /usr/libexec/qemu-kvm  -m 4G,slots=1,maxmem=12G \
   -object memory-backend-ram,id=dimm1,size=1G \
   -device ivshmem,size=1G,shm=ssss \
   -device pc-dimm,id=d1,memdev=dimm1 \
   -monitor stdio -M pc-i440fx-rhel7.2.0
(qemu)info mtree
...
      0000000140000000-000000017fffffff (prio 0, RW): ivshmem.bar2
...
  0000000140000000-000000037fffffff (prio 0, RW): hotplug-memory
    0000000140000000-000000017fffffff (prio 0, RW): dimm1

ivshmem.bar2 intersect with hotplug-memory. So this bug is reproduced.



Verified:
Host:
kernel:3.10.0-316.el7.x86_64
qemu-img-rhev-2.3.0-23.el7.x86_64

Scenario 1: -M pc-i440fx-rhel7.2.0
#/usr/libexec/qemu-kvm  -m 4G,slots=1,maxmem=12G \
   -object memory-backend-ram,id=dimm1,size=1G \
   -device ivshmem,size=1G,shm=ssss \
   -device pc-dimm,id=d1,memdev=dimm1 \
   -monitor stdio -M pc-i440fx-rhel7.2.0
(qemu)info mtree
...
    0000000380000000-00000003bfffffff (prio 0, RW): ivshmem.bar2
...
  0000000140000000-000000037fffffff (prio 0, RW): hotplug-memory
    0000000140000000-000000017fffffff (prio 0, RW): dimm1

ivshmem.bar2 doesn't intersect with hotplug-memory and start beyong hotplug-memory. 


Scenario 2: -M pc-i440fx-rhel7.1.0
#/usr/libexec/qemu-kvm  -m 4G,slots=1,maxmem=12G \
   -object memory-backend-ram,id=dimm1,size=1G \
   -device ivshmem,size=1G,shm=ssss \
   -device pc-dimm,id=d1,memdev=dimm1 \
   -monitor stdio -M pc-i440fx-rhel7.1.0
(qemu)info mtree
...
      0000000140000000-000000017fffffff (prio 0, RW): ivshmem.bar2
...
  0000000140000000-000000033fffffff (prio 0, RW): hotplug-memory
    0000000140000000-000000017fffffff (prio 0, RW): dimm1

ivshmem.bar2 intersect with hotplug-memory, it is broken.

According to Comment 4, results of Scenario 1 and Scenario 2 is expected. So this bug has been fixed.
Comment 8 juzhang 2015-09-20 23:05:07 EDT
According to comment4 and comment5, set this issue as verified.
Comment 10 errata-xmlrpc 2015-12-04 11:56:52 EST
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-2015-2546.html

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