mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
qemu: Fetch info on NVDIMM-s too when updating memory devices
Sometimes it may come handy to learn what address is a NVDIMM mapped to inside a guest. While users can provide an address they want to have NVDIMM mapped to, it's optional. Fortunately, when a domain is being started we issue the 'query-memory-devices' monitor command and the reply is the same for 'dimm' and 'nvdimm' types. Therefore, updating NVDIMM address is trivial. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6be7beb3bd
commit
48b9a6ae31
@ -7484,7 +7484,7 @@ qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitor *mon,
|
||||
meminfo = g_new0(qemuMonitorMemoryDeviceInfo, 1);
|
||||
|
||||
/* dimm memory devices */
|
||||
if (STREQ(type, "dimm")) {
|
||||
if (STREQ(type, "dimm") || STREQ(type, "nvdimm")) {
|
||||
if (virJSONValueObjectGetNumberUlong(dimminfo, "addr",
|
||||
&meminfo->address) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
|
Loading…
x
Reference in New Issue
Block a user