RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1281407 - Memdev id is not specified when query memdev via QMP
Summary: Memdev id is not specified when query memdev via QMP
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Igor Mammedov
QA Contact: Yumei Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-12 12:57 UTC by Yumei Huang
Modified: 2017-08-02 03:24 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-rhev-2.9.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 23:29:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2392 0 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2017-08-01 20:04:36 UTC

Description Yumei Huang 2015-11-12 12:57:43 UTC
Description of problem:
When query-memdev via QMP, the returned string doesn't specify the memdev id.

Version-Release number of selected component (if applicable):
kernel: 3.10.0-329.el7.x86_64
qemu-kvm: qemu-kvm-rhev-2.3.0-31.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Launch a guest:
/usr/libexec/qemu-kvm -m 4G,slots=4,maxmem=16G -smp 4 \
-monitor stdio -qmp tcp:0:4444,server,nowait \
-object memory-backend-ram,id=mem0,size=1G -device pc-dimm,id=dimm0,memdev=mem0  \
 -object memory-backend-ram,id=mem1,size=1G -device pc-dimm,id=dimm1,memdev=mem1  

2. Query memdev via QMP:
{'execute': 'qmp_capabilities'}
{"return": {}}

{ "execute": "query-memdev" }
{"return": [{"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default"}, {"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default"}]}



Actual results:
{"return": [{"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default"}, {"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default"}]}

Expected results:
The returned string should specify the memdev id.

Additional info:

Comment 2 Igor Mammedov 2016-09-20 12:10:37 UTC
not 7.3 material by now, moving to 7.4 as feature improvement

Comment 3 Igor Mammedov 2017-01-03 13:05:02 UTC
posted fix upstream:
 https://www.mail-archive.com/qemu-devel@nongnu.org/msg419924.html

Comment 4 Igor Mammedov 2017-01-16 10:06:12 UTC
Upstream commits:

e1ff3c6 monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends
3a46410 monitor: reuse user_creatable_add_opts() instead of user_creatable_add()
8a00025 qom: remove unused header

Comment 5 Yumei Huang 2017-04-24 08:56:40 UTC
Verify:
qemu-kvm-rhev-2.9.0-1.el7
kernel-3.10.0-655.el7.x86_64

1. Boot guest with two pc-dimm

# /usr/libexec/qemu-kvm -m 4G,slots=40,maxmem=40G \

-drive file=rhel74.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none  -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \

 -netdev tap,id=idinWyYp -device virtio-net-pci,mac=42:ce:a9:d2:4d:d7,id=idlbq7eA,netdev=idinWyYp \

-vnc :0 -monitor stdio \

-object memory-backend-ram,id=mem0,size=1G -device pc-dimm,id=dimm0,memdev=mem0\

-object memory-backend-ram,id=mem1,size=1G -device pc-dimm,id=dimm1,memdev=mem1\

-qmp tcp:0:4444,server,nowait

2. Hotplug memory to guest
(qemu) object_add memory-backend-ram,id=mem3,host-nodes=1,size=1G,policy=bind
(qemu) device_add pc-dimm,id=dimm3,memdev=mem3

3. Check memdev via qmp
{'execute': 'qmp_capabilities'}
{"return": {}}

{ "execute": "query-memdev" }
{"return": [{"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default", "id": "mem1"}, {"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default", "id": "mem0"}, {"prealloc": false, "host-nodes": [1], "size": 1073741824, "merge": true, "dump": true, "policy": "bind", "id": "mem3"}]}

The memdev id is explicit and correct in qmp. So the bug is fixed.

Comment 7 errata-xmlrpc 2017-08-01 23:29:42 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://access.redhat.com/errata/RHSA-2017:2392

Comment 8 errata-xmlrpc 2017-08-02 01:07:21 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://access.redhat.com/errata/RHSA-2017:2392

Comment 9 errata-xmlrpc 2017-08-02 01:59:20 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://access.redhat.com/errata/RHSA-2017:2392

Comment 10 errata-xmlrpc 2017-08-02 02:40:06 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://access.redhat.com/errata/RHSA-2017:2392

Comment 11 errata-xmlrpc 2017-08-02 03:04:50 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://access.redhat.com/errata/RHSA-2017:2392

Comment 12 errata-xmlrpc 2017-08-02 03:24:58 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://access.redhat.com/errata/RHSA-2017:2392


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