xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Dongli Zhang <dongli.zhang@oracle.com>
Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH 1/2] tools/libxc: add interface for GNTTABOP_query_size
Date: Fri, 30 Jun 2017 14:57:05 +0100	[thread overview]
Message-ID: <20170630135705.c73nrgva2664mzla@citrix.com> (raw)
In-Reply-To: <1498807291-3356-1-git-send-email-dongli.zhang@oracle.com>

On Fri, Jun 30, 2017 at 03:21:30PM +0800, Dongli Zhang wrote:
> This patch adds new interface for GNTTABOP_query_size in libxc to help
> query the current grant table frames and maximum grant table frames for a
> specific domain.
> 
> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
> ---
>  tools/libxc/include/xenctrl.h |  1 +
>  tools/libxc/xc_gnttab.c       | 12 ++++++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
> index 1629f41..155c69e 100644
> --- a/tools/libxc/include/xenctrl.h
> +++ b/tools/libxc/include/xenctrl.h
> @@ -1597,6 +1597,7 @@ int xc_gnttab_op(xc_interface *xch, int cmd,
>                   void * op, int op_size, int count);
>  /* Logs iff hypercall bounce fails, otherwise doesn't. */
>  
> +int xc_gnttab_query_size(xc_interface *xch, struct gnttab_query_size *query);
>  int xc_gnttab_get_version(xc_interface *xch, int domid); /* Never logs */
>  grant_entry_v1_t *xc_gnttab_map_table_v1(xc_interface *xch, int domid, int *gnt_num);
>  grant_entry_v2_t *xc_gnttab_map_table_v2(xc_interface *xch, int domid, int *gnt_num);
> diff --git a/tools/libxc/xc_gnttab.c b/tools/libxc/xc_gnttab.c
> index af53fac..81a89fe 100644
> --- a/tools/libxc/xc_gnttab.c
> +++ b/tools/libxc/xc_gnttab.c
> @@ -38,6 +38,18 @@ int xc_gnttab_op(xc_interface *xch, int cmd, void * op, int op_size, int count)
>      return ret;
>  }
>  
> +int xc_gnttab_query_size(xc_interface *xch, struct gnttab_query_size *query)
> +{
> +    int rc;
> +
> +    rc = xc_gnttab_op(xch, GNTTABOP_query_size, query, sizeof(*query), 1);
> +
> +    if ( rc || (query->status != GNTST_okay) )
> +        ERROR("Could not query dom %d's grant size\n", query->dom);

%u please.

Otherwise:

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      parent reply	other threads:[~2017-06-30 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30  7:21 [PATCH 1/2] tools/libxc: add interface for GNTTABOP_query_size Dongli Zhang
2017-06-30  7:21 ` [PATCH 2/2] tools: utility to dump guest grant table info Dongli Zhang
2017-06-30 14:07   ` Wei Liu
2017-06-30 16:25   ` Konrad Rzeszutek Wilk
2017-06-30 13:57 ` Wei Liu [this message]

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=20170630135705.c73nrgva2664mzla@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=dongli.zhang@oracle.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).