[PATCH v1 23/26] qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event

Michal Privoznik mprivozn at redhat.com
Wed Dec 2 08:50:21 UTC 2020


On 11/30/20 10:44 PM, Daniel Henrique Barboza wrote:
> 
> 
> On 11/27/20 12:03 PM, Michal Privoznik wrote:
>> As advertised in previous commit, this event is delivered to us
>> when virtio-mem module changes the allocation inside the guest.
>> It comes with one attribute - size - which holds the new size of
>> the virtio-mem (well, allocated size), in bytes.
>> Mind you, this is not necessarily the same number as 'requested
>> size'. It almost certainly will be when sizing the memory up, but
>> it might not be when sizing the memory down - the guest kernel
>> might be unable to free some blocks.
>>
>> This actual size is reported in the domain XML as an output
>> element only.
>>
>> TODO: Fix up total domain memory calculation.
> 
> I don't mind the 'TODO' here, but it would be good to clarify what
> we can/can't expect while this isn't looked at.
> 
> E.g. I took the series for a spin in my x86 dev box (apparently pSeries
> does no support virtio-pmem and virtio-mem, so here I am doing x86
> work hehe) and I saw that  'virsh setmem --virtio' does not update the
> 'maxMemory' of the live XML. Is that the intended effect of this pending
> 'TODO' the commit is referring to?

That is the part that's missing, yes, that's what the TODO is refering 
to. Let me see if I can get my head around it this time.

Michal




More information about the libvir-list mailing list