All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory?
@ 2017-06-05  7:53 Dou Liyang
  2017-06-05  8:45 ` Igor Mammedov
  0 siblings, 1 reply; 4+ messages in thread
From: Dou Liyang @ 2017-06-05  7:53 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Igor Mammedov, David Gibson, Andrew Jones, Thomas Huth

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-05  9:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05  7:53 [Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory? Dou Liyang
2017-06-05  8:45 ` Igor Mammedov
2017-06-05  8:54   ` Michal Hocko
2017-06-05  9:50   ` Dou Liyang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.