From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Magenheimer Subject: [PATCH v9 2/2] tools: XENMEM_claim_pages (subop of existing) hypercall Date: Thu, 3 Jan 2013 10:15:25 -0800 (PST) Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="__135723692672485957abhmt102.oracle.com" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Keir Fraser , TimDeegan , Ian Campbell Cc: Andres Lagar-Cavilla , Zhigang Wang , Matthew Daley , Konrad Wilk , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --__135723692672485957abhmt102.oracle.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable This is patch 2of2 of a ninth cut of the patch of the proposed XENMEM_claim_pages hypercall/subop, taking into account feedback from Jan and Keir and IanC and Matthew Daley. As requested by Jan, this is a separate post of the tools part of the patch. NOTE: This patch must be applied after the hypervisor part of the patchset or otherwise may break the build! v5->v9: - no change in this patch (only in patch 1of2) Signed-off-by: Dan Magenheimer tools/libxc/xc_domain.c | 1 + tools/libxc/xenctrl.h | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 4b82884..3bc0976 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -234,6 +234,7 @@ int xc_domain_getinfo(xc_interface *xch, =20 info->ssidref =3D domctl.u.getdomaininfo.ssidref; info->nr_pages =3D domctl.u.getdomaininfo.tot_pages; + info->nr_unclaimed_pages =3D domctl.u.getdomaininfo.unclaimed_page= s; info->nr_shared_pages =3D domctl.u.getdomaininfo.shr_pages; info->nr_paged_pages =3D domctl.u.getdomaininfo.paged_pages; info->max_memkb =3D domctl.u.getdomaininfo.max_pages << (PAGE_SHIF= T-10); diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h index 32122fd..ba30ba6 100644 --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -364,6 +364,7 @@ typedef struct xc_dominfo { hvm:1, debugged:1; unsigned int shutdown_reason; /* only meaningful if shutdown=3D=3D1 *= / unsigned long nr_pages; /* current number, not maximum */ + unsigned long nr_unclaimed_pages; unsigned long nr_shared_pages; unsigned long nr_paged_pages; unsigned long shared_info_frame; --__135723692672485957abhmt102.oracle.com Content-Type: application/octet-stream; name="claim-130102-tools.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="claim-130102-tools.patch" ZGlmZiAtLWdpdCBhL3Rvb2xzL2xpYnhjL3hjX2RvbWFpbi5jIGIvdG9vbHMvbGlieGMveGNfZG9t YWluLmMKaW5kZXggNGI4Mjg4NC4uM2JjMDk3NiAxMDA2NDQKLS0tIGEvdG9vbHMvbGlieGMveGNf ZG9tYWluLmMKKysrIGIvdG9vbHMvbGlieGMveGNfZG9tYWluLmMKQEAgLTIzNCw2ICsyMzQsNyBA QCBpbnQgeGNfZG9tYWluX2dldGluZm8oeGNfaW50ZXJmYWNlICp4Y2gsCiAKICAgICAgICAgaW5m by0+c3NpZHJlZiAgPSBkb21jdGwudS5nZXRkb21haW5pbmZvLnNzaWRyZWY7CiAgICAgICAgIGlu Zm8tPm5yX3BhZ2VzID0gZG9tY3RsLnUuZ2V0ZG9tYWluaW5mby50b3RfcGFnZXM7CisgICAgICAg IGluZm8tPm5yX3VuY2xhaW1lZF9wYWdlcyA9IGRvbWN0bC51LmdldGRvbWFpbmluZm8udW5jbGFp bWVkX3BhZ2VzOwogICAgICAgICBpbmZvLT5ucl9zaGFyZWRfcGFnZXMgPSBkb21jdGwudS5nZXRk b21haW5pbmZvLnNocl9wYWdlczsKICAgICAgICAgaW5mby0+bnJfcGFnZWRfcGFnZXMgPSBkb21j dGwudS5nZXRkb21haW5pbmZvLnBhZ2VkX3BhZ2VzOwogICAgICAgICBpbmZvLT5tYXhfbWVta2Ig PSBkb21jdGwudS5nZXRkb21haW5pbmZvLm1heF9wYWdlcyA8PCAoUEFHRV9TSElGVC0xMCk7CmRp ZmYgLS1naXQgYS90b29scy9saWJ4Yy94ZW5jdHJsLmggYi90b29scy9saWJ4Yy94ZW5jdHJsLmgK aW5kZXggMzIxMjJmZC4uYmEzMGJhNiAxMDA2NDQKLS0tIGEvdG9vbHMvbGlieGMveGVuY3RybC5o CisrKyBiL3Rvb2xzL2xpYnhjL3hlbmN0cmwuaApAQCAtMzY0LDYgKzM2NCw3IEBAIHR5cGVkZWYg c3RydWN0IHhjX2RvbWluZm8gewogICAgICAgICAgICAgICAgICAgaHZtOjEsIGRlYnVnZ2VkOjE7 CiAgICAgdW5zaWduZWQgaW50ICBzaHV0ZG93bl9yZWFzb247IC8qIG9ubHkgbWVhbmluZ2Z1bCBp ZiBzaHV0ZG93bj09MSAqLwogICAgIHVuc2lnbmVkIGxvbmcgbnJfcGFnZXM7IC8qIGN1cnJlbnQg bnVtYmVyLCBub3QgbWF4aW11bSAqLworICAgIHVuc2lnbmVkIGxvbmcgbnJfdW5jbGFpbWVkX3Bh Z2VzOwogICAgIHVuc2lnbmVkIGxvbmcgbnJfc2hhcmVkX3BhZ2VzOwogICAgIHVuc2lnbmVkIGxv bmcgbnJfcGFnZWRfcGFnZXM7CiAgICAgdW5zaWduZWQgbG9uZyBzaGFyZWRfaW5mb19mcmFtZTsK --__135723692672485957abhmt102.oracle.com Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --__135723692672485957abhmt102.oracle.com--