diff --git a/tests/data/cli/compare/virt-install-memory-hotplug.xml b/tests/data/cli/compare/virt-install-memory-hotplug.xml index 585e3f7c7..31e06c7c9 100644 --- a/tests/data/cli/compare/virt-install-memory-hotplug.xml +++ b/tests/data/cli/compare/virt-install-memory-hotplug.xml @@ -6,7 +6,7 @@ - 2097152 + 4194304 2 hvm @@ -122,6 +122,24 @@ + + + 524288 + 0 + 2048 + 524288 +
+ + + + + /tmp/virtio_pmem + + + 524288 +
+ + destroy @@ -133,7 +151,7 @@ - 2097152 + 4194304 2 hvm @@ -248,5 +266,23 @@ + + + 524288 + 0 + 2048 + 524288 +
+ + + + + /tmp/virtio_pmem + + + 524288 +
+ + diff --git a/tests/test_cli.py b/tests/test_cli.py index b5ddc781e..66d5b1ddb 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -898,7 +898,7 @@ c.add_compare("" # --memdev setup has a lot of interconnected validation, it's easier to keep this separate c.add_compare("--pxe " -"--memory hotplugmemorymax=2048,hotplugmemoryslots=3 " +"--memory hotplugmemorymax=4096,hotplugmemoryslots=3 " "--cpu cell0.cpus=0,cell0.memory=1048576 " "--memdev dimm,access=private,target_size=256,target_node=0," @@ -912,6 +912,12 @@ c.add_compare("--pxe " "address.type=dimm,address.base=0x100000000,address.slot=1," "source.pmem=on,source.alignsize=2048,target.readonly=on " +"--memdev virtio-mem,target_node=0,target.block=2048," +"target_size=512,target.requested=524288,target.address_base=0x180000000 " + +"--memdev virtio-pmem,source.path=/tmp/virtio_pmem," +"target_size=512,target.address_base=0x1a0000000 " + "", "memory-hotplug", precompare_check="5.3.0") diff --git a/virtinst/cli.py b/virtinst/cli.py index 7072e7b6b..60bc4ab9b 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -4366,6 +4366,7 @@ class ParserMemdev(VirtCLIParser): cls.add_arg("target.current", "target.current") cls.add_arg("target.requested", "target.requested") cls.add_arg("target.readonly", "target.readonly", is_onoff=True) + cls.add_arg("target.address_base", "target.address_base") cls.add_arg("source.pagesize", "source.pagesize") cls.add_arg("source.path", "source.path") cls.add_arg("source.nodemask", "source.nodemask", can_comma=True) diff --git a/virtinst/devices/memory.py b/virtinst/devices/memory.py index 812b4dbce..edc274e00 100644 --- a/virtinst/devices/memory.py +++ b/virtinst/devices/memory.py @@ -19,6 +19,7 @@ class _DeviceMemoryTarget(XMLBuilder): block = XMLProperty("./block", is_int=True) requested = XMLProperty("./requested", is_int=True) current = XMLProperty("./current", is_int=True) + address_base = XMLProperty("./address/@base") class _DeviceMemorySource(XMLBuilder):