[libvirt] [PATCH] setmem: provide dummy impls for remaining drivers

Eric Blake eblake at redhat.com
Fri Mar 11 15:26:43 UTC 2011


On 03/10/2011 03:53 PM, Eric Blake wrote:
>> Hmm, for other API additions, I have provided dummy wrappers for the new
>> function anywhere the old function existed, that merely require the same
>> flags as the old function would use.  I'll probably propose that as a
>> followup patch.
> 
> Like so.
> 
>  src/esx/esx_driver.c   |   17 ++++++++++++++---
>  src/lxc/lxc_driver.c   |   15 +++++++++++++--
>  src/test/test_driver.c |   19 ++++++++++++++++---
>  src/uml/uml_driver.c   |   15 +++++++++++++--
>  src/vbox/vbox_tmpl.c   |   15 +++++++++++++--
>  src/xen/xen_driver.c   |   15 ++++++++++++++-

Hmm, re-reading this patch exposes a problem (existing before this
patch, and this patch doesn't change the situation):

In 0.8.8, 'virsh setmem' on xen:/// meant:
if guest is live, then affect live (only); otherwise affect config

But with this patch, 'virsh setmem --live' will _still_ affect a config.

What we need is three flags instead of two:

VIR_DOMAIN_MEM_LIVE
VIR_DOMAIN_MEM_CONFIG
VIR_DOMAIN_MEM_CURRENT - use LIVE or CONFIG according to domain state

where we document that virDomainSetMemory is hypervisor-defined whether
it implies CURRENT (xen) or LIVE (qemu), and where
virDomainSetMemoryFlags properly honors all three flags for both
hypervisors.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110311/690984d4/attachment-0001.sig>


More information about the libvir-list mailing list