All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian.Jackson@eu.citrix.com, xen-devel@lists.xensource.com,
	wei.liu2@citrix.com, Ian.Campbell@citrix.com, dslutz@verizon.com
Subject: Re: [PATCH v6] libxl_set_memory_target: retain the same maxmem offset on top of the current target
Date: Mon, 2 Mar 2015 11:36:37 +0000	[thread overview]
Message-ID: <20150302113637.GB11855@zion.uk.xensource.com> (raw)
In-Reply-To: <1425041148-31034-1-git-send-email-stefano.stabellini@eu.citrix.com>

On Fri, Feb 27, 2015 at 12:45:47PM +0000, Stefano Stabellini wrote:
> In libxl_set_memory_target when setting the new maxmem, retain the same
> offset on top of the current target. In the future the offset will
> include memory allocated by QEMU for rom files.
> 

Sorry for not having mentioned this earlier.

I think the behaviour of this API is changed now (for good reason).

Ian and Ian, do want need a #define in libxl.h to mark such change?

> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 
> ---
> 
> Changes in v6:
> - remove now useless xc_domaininfo_t info and xc_domain_getinfolist call.
> 
> Changes in v5:
> - call libxl_dominfo_init;
> - move libxl_dominfo_dispose call before returning to the caller;
> 
> Changes in v4:
> - remove new_target_memkb <= 0 check.
> 
> Changes in v3:
> - move call to libxl__uuid2string and libxl_dominfo_dispose earlier;
> - error out if new_target_memkb <= 0.
> 
> Changes in v2:
> - remove LIBXL_MAXMEM_CONSTANT from LIBXL__LOG_ERRNO.
> ---
>  tools/libxl/libxl.c |   23 +++++++++--------------
>  1 file changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index b9a1941..b9d083a 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -4715,11 +4715,15 @@ int libxl_set_memory_target(libxl_ctx *ctx, uint32_t domid,
>      uint32_t current_max_memkb = 0;
>      char *memmax, *endptr, *videoram_s = NULL, *target = NULL;
>      char *dompath = libxl__xs_get_dompath(gc, domid);
> -    xc_domaininfo_t info;
>      libxl_dominfo ptr;
>      char *uuid;
>      xs_transaction_t t;

You missed libxl_domain_info_init.

>  
> +    if (libxl_domain_info(ctx, &ptr, domid) < 0)
> +        goto out_no_transaction;
> +
> +    uuid = libxl__uuid2string(gc, ptr.uuid);
> +

  reply	other threads:[~2015-03-02 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 12:45 [PATCH v6] libxl_set_memory_target: retain the same maxmem offset on top of the current target Stefano Stabellini
2015-03-02 11:36 ` Wei Liu [this message]
2015-03-02 14:05   ` Ian Campbell
2015-03-02 14:34     ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150302113637.GB11855@zion.uk.xensource.com \
    --to=wei.liu2@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dslutz@verizon.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.