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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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