qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory?


From: Dou Liyang
Subject: [Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory?
Date: Mon, 5 Jun 2017 15:53:02 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Hi all,

I want to boot up a system with some removable memory.

So, i used '-object' and '-device' to cold-plug memory
in QEmu as following :

./x86_64-softmmu/qemu-system-x86_64 \
        ...
        -object memory-backend-ram,id=mem3,size=128M \
        -device pc-dimm,id=dimm3,memdev=mem3 \
        ...

then i want to hot-remove this memory by 'device-del' and
'object-del'.

But, unfortunately, I can't remove the memory device.

And, in guest OS, I found the memory's removable feature is 0,
But, in QEmu monitor with 'info memory-devices', I found the
hotplugged is false and hotpluggable is true.

Could you help me:

1, Can the ram based memory-backend be plugged like above?

2, Does the 'info memory-devices' command show a wrong info?

3, Can file memory backend(memory-backend-file) be cold-plugged?


PS: here is my whole script:
----
gdb --arg ./x86_64-softmmu/qemu-system-x86_64 \
        -hda /image/fedora.img \
        -m 256M,slots=4,maxmem=1G \
        -enable-kvm \
        -smp 2,maxcpus=16,sockets=2,cores=2,threads=2\
        -object memory-backend-ram,id=mem1,size=128M \
        -object memory-backend-ram,id=mem2,size=128M \
        -object memory-backend-ram,id=mem3,size=128M \
        -device pc-dimm,id=dimm3,memdev=mem3 \
        -device qemu64-x86_64-cpu,id=cpu2,socket-id=0,core-id=1,thread-id=0 \
        -device qemu64-x86_64-cpu,id=cpu3,socket-id=0,core-id=1,thread-id=1 \
        -numa node,memdev=mem1,nodeid=0 \
        -numa node,memdev=mem2,nodeid=1 \
        -serial stdio \
        -monitor telnet:127.0.0.1:4444,server,nowait \
        -kernel /home/douly/openSource/orignal_linux/arch/x86_64/boot/bzImage \
-append "root=/dev/mapper/fedora_s3101490-root mem=256M movable_node nokaslr earlyprintk=serial,ttyS0,115200" \
        -initrd /home/douly/openSource/initramfs_image/4.12.0-rc3.img \
----

Thanks,
        dou.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]