Commit 3b2ca6a5 authored by Łukasz Nowak's avatar Łukasz Nowak

qemuqmpclient: Support qemu 5.x+

pc.ram key is used for the initial memory, and it can't be removed.
parent 597ad67a
...@@ -530,7 +530,9 @@ class QemuQMPWrapper(object): ...@@ -530,7 +530,9 @@ class QemuQMPWrapper(object):
current_memdev_list = self._send({ "execute": "query-memdev" }, retry=5) current_memdev_list = self._send({ "execute": "query-memdev" }, retry=5)
for memdev in current_memdev_list['return']: for memdev in current_memdev_list['return']:
cleanup_memdev_id_dict[memdev['id']] = '' # qemu 5.x+ reports init memory static memory as pc.ram
if memdev['id'] != 'pc.ram':
cleanup_memdev_id_dict[memdev['id']] = ''
for dimm in current_dimm_list['return']: for dimm in current_dimm_list['return']:
current_size += dimm['data']['size'] current_size += dimm['data']['size']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment