Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
libxkutil/device_parsing.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
index 2b713de..e98ed39 100644
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -2364,6 +2364,7 @@ static int _get_mem_device(const char *xml, struct virt_device
**list)
struct virt_device *mdev = NULL;
int ret;
bool mem_dump_core_set = false;
+ struct others *tmp = NULL;
ret = parse_devices(xml, &mdevs, CIM_RES_TYPE_MEM);
if (ret <= 0)
@@ -2383,6 +2384,11 @@ static int _get_mem_device(const char *xml, struct virt_device
**list)
mdevs[1].dev.mem.size);
mdev->dev.mem.maxsize = MAX(mdevs[0].dev.mem.maxsize,
mdevs[1].dev.mem.maxsize);
+ mdev->dev.mem.others = dup_others(mdevs[0].dev.mem.others);
+ tmp = dup_others(mdevs[1].dev.mem.others);
+ mdev->dev.mem.others = combine_others(mdev->dev.mem.others,
+ tmp);
+
/* libvirt dumpCore tag always belong to memory xml node, but
* here we may have two mdev for memory node and currentMemory
* node. So pick up one value.
@@ -2402,6 +2408,7 @@ static int _get_mem_device(const char *xml, struct virt_device
**list)
mdev->dev.mem.size = MAX(mdevs[0].dev.mem.size,
mdevs[0].dev.mem.maxsize);
mdev->dev.mem.maxsize = mdev->dev.mem.size;
+ mdev->dev.mem.others = dup_others(mdevs[0].dev.mem.others);
mdev->dev.mem.dumpCore = mdevs[0].dev.mem.dumpCore;
}
--
1.7.1