qemu-devel
[Top][All Lists]
Advanced

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

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


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

Hi Igor,

At 06/05/2017 04:45 PM, Igor Mammedov wrote:
On Mon, 5 Jun 2017 15:53:02 +0800
Dou Liyang <address@hidden> wrote:

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.
It's issue in the guest side kernel.
In short it's not guarantied that guest kernel would be able
to hotremove DIMM module (even if hardware is capable of) since
kernel might use its memory as not MOVABLE, so DIMM might be
temporally or permanently pinned by kernel allocations.


I see.

There is ongoing refactoring/cleanup work upstream, that
tries to make memhotplug behavior consistent/reasonable.

If you are interested, I'd suggest to review/test changes that
Michal works on upstream, to make sure that refactoring won't
break your usecase.

OK, I will.


You can find the latest series Michal posted at:
http://www.mail-archive.com/address@hidden/msg1410289.html


um, I found the patchset, and I am reading the discussions and test
cases you gave in v2.



Could you help me:

1, Can the ram based memory-backend be plugged like above?
yes, it can be used as above

2, Does the 'info memory-devices' command show a wrong info?
nope,
command shows hotpluggable status the way hw (qemu) sees it

3, Can file memory backend(memory-backend-file) be cold-plugged?
yes, it can.

[...]


Thanks a lot ;)

Thanks,
        dou.








reply via email to

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