[libvirt] [PATCH] libxl: add memory attach support

Joao Martins joao.m.martins at oracle.com
Wed Aug 31 11:12:55 UTC 2016

On 08/31/2016 10:18 AM, Martin Kletzander wrote:
> On Wed, Aug 31, 2016 at 03:56:02PM +0800, Bob Liu wrote:
>> On 08/30/2016 11:20 PM, Joao Martins wrote:
>>> Hey!
>>> On 08/30/2016 11:00 AM, Bob Liu wrote:
>>>> Support for VIR_DOMAIN_DEVICE_MEMORY on domainAttachDeviceFlags API in libxl
>>>> driver, using libxl_set_memory_target in xen libxl.
>>>> With "virsh attach-device" command we can then hotplug memory to a domain:
>>>> <memory model='dimm'>
>>>>     <target>
>>>>         <size unit='MiB'>128</size>
>>>>         <node>0</node>
>>>>     </target>
>>>> </memory>
>>>> $ virsh attach-device domain_name this.xml --live
> Actually, attaching a memory device should do something else than
> calling libxl_set_memory_target().  It should add a guest-visible memory
> device into the DIMM slot (especially when it is model='dimm').  I'm no
> libxl expert, but the function you are using is just setting the memory
> IMHO and it is the same as if you would remove the check for:
>   newmem > virDomainDefGetMemoryTotal
> in libxlDomainSetMemoryFlags()

As a guest visible DIMM slot, doesn't appear to be supported at least as far as goes
my reading of libxl on staging. In which case you probably suggest dropping this
patch as it's not meant to be doing this? I misconcepted AttachDevice with
VIR_DOMAIN_DEVICE_MEMORY (thinking this could another way of increasing the balloon
other than libxlDomainSetMemory*), despite seeing now the XML/docs being obvious
about its sole purpose.


More information about the libvir-list mailing list