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: Michal Hocko
Subject: Re: [Qemu-devel] Memory Hotplug : Does QEmu support cold-plugged memory?
Date: Mon, 5 Jun 2017 10:54:32 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon 05-06-17 10:45:08, 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.

Yes and that will be always the case as long as you allow kernel
allocations to use that memory. I do not know of any other way to work
this around than online the specific memory range as movable.

-- 
Michal Hocko
SUSE Labs



reply via email to

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