From nobody Mon Feb 9 14:16:02 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1576698126; cv=none; d=zohomail.com; s=zohoarc; b=U0amEcBYPF4rYWuUaYhJkdGcwJAvXisKtoLuZhD835wl4sb+r15Py+s99IF+DTAFy5e/fbRgZRFrPOcGXljPNeeY0knB9aid3RfwK7wJDJGuWUQx/sgu5NUPQwzUjQmrxCemJbTtas6OzlBPYI0iladL0aPF9h7lze8NsU1HX0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576698126; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=r5KLvGgfUEDEeilGXwJnw5AEvt+vs84SRsUaK+UFJBg=; b=nIwy6HHgivwIU1dO0idfP5ZhPfLv+q2cvDGoTnfYnf/f6WcvhTGizid18v/8dKAYCPPl/tbx/rjnzdAfYxJ3lFIEhPQs2enRTUU4x9VBZa3VBHEVXYm6eWbt/+YDhopNZRIdhAXN5Y02yjYOK1xLfD6hsdJ+lF5CXagfTRETcUw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1576698126290470.29332207779737; Wed, 18 Dec 2019 11:42:06 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihfCG-0007co-Eh; Wed, 18 Dec 2019 19:41:24 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihfCF-0007cP-6s for xen-devel@lists.xenproject.org; Wed, 18 Dec 2019 19:41:23 +0000 Received: from mga03.intel.com (unknown [134.134.136.65]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 58b04db5-21ce-11ea-90f3-12813bfff9fa; Wed, 18 Dec 2019 19:41:13 +0000 (UTC) Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2019 11:41:12 -0800 Received: from tlengyel-mobl2.amr.corp.intel.com (HELO localhost.localdomain) ([10.254.103.7]) by orsmga008.jf.intel.com with ESMTP; 18 Dec 2019 11:41:11 -0800 X-Inumbo-ID: 58b04db5-21ce-11ea-90f3-12813bfff9fa X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,330,1571727600"; d="scan'208";a="210196285" From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Wed, 18 Dec 2019 11:40:40 -0800 Message-Id: <01275f564385bb6b2f69158b004ef671ab890719.1576697796.git.tamas.lengyel@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 03/20] tools/libxc: clean up memory sharing files X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson , Tamas K Lengyel , Wei Liu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" No functional changes. Signed-off-by: Tamas K Lengyel Acked-by: Wei Liu --- tools/libxc/include/xenctrl.h | 24 ++++++++++++------------ tools/libxc/xc_memshr.c | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index f4431687b3..b5ffa53d55 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -2060,7 +2060,7 @@ int xc_monitor_emulate_each_rep(xc_interface *xch, ui= nt32_t domain_id, * * Sharing is supported only on the x86 architecture in 64 bit mode, with * Hardware-Assisted Paging (i.e. Intel EPT, AMD NPT). Moreover, AMD NPT - * support is considered experimental.=20 + * support is considered experimental. =20 * Calls below return ENOSYS if not in the x86_64 architecture. * Calls below return ENODEV if the domain does not support HAP. @@ -2107,13 +2107,13 @@ int xc_memshr_control(xc_interface *xch, * EINVAL or EACCESS if the request is denied by the security policy */ =20 -int xc_memshr_ring_enable(xc_interface *xch,=20 +int xc_memshr_ring_enable(xc_interface *xch, uint32_t domid, uint32_t *port); /* Disable the ring for ENOMEM communication. * May fail with EINVAL if the ring was not enabled in the first place. */ -int xc_memshr_ring_disable(xc_interface *xch,=20 +int xc_memshr_ring_disable(xc_interface *xch, uint32_t domid); =20 /* @@ -2126,7 +2126,7 @@ int xc_memshr_ring_disable(xc_interface *xch, int xc_memshr_domain_resume(xc_interface *xch, uint32_t domid); =20 -/* Select a page for sharing.=20 +/* Select a page for sharing. * * A 64 bit opaque handle will be stored in handle. The hypervisor ensures * that if the page is modified, the handle will be invalidated, and future @@ -2155,7 +2155,7 @@ int xc_memshr_nominate_gref(xc_interface *xch, =20 /* The three calls below may fail with * 10 (or -XENMEM_SHARING_OP_S_HANDLE_INVALID) if the handle passed as sou= rce - * is invalid. =20 + * is invalid. * 9 (or -XENMEM_SHARING_OP_C_HANDLE_INVALID) if the handle passed as clie= nt is * invalid. */ @@ -2168,7 +2168,7 @@ int xc_memshr_nominate_gref(xc_interface *xch, * * After successful sharing, the client handle becomes invalid. Both tuples point to the same mfn with the same handle, the one specifi= ed as - * source. Either 3-tuple can be specified later for further re-sharing.=20 + * source. Either 3-tuple can be specified later for further re-sharing. */ int xc_memshr_share_gfns(xc_interface *xch, uint32_t source_domain, @@ -2193,7 +2193,7 @@ int xc_memshr_share_grefs(xc_interface *xch, /* Allows to add to the guest physmap of the client domain a shared frame * directly. * - * May additionally fail with=20 + * May additionally fail with * 9 (-XENMEM_SHARING_OP_C_HANDLE_INVALID) if the physmap entry for the g= fn is * not suitable. * ENOMEM if internal data structures cannot be allocated. @@ -2222,7 +2222,7 @@ int xc_memshr_range_share(xc_interface *xch, uint64_t last_gfn); =20 /* Debug calls: return the number of pages referencing the shared frame ba= cking - * the input argument. Should be one or greater.=20 + * the input argument. Should be one or greater. * * May fail with EINVAL if there is no backing shared frame for the input * argument. @@ -2235,9 +2235,9 @@ int xc_memshr_debug_gref(xc_interface *xch, uint32_t domid, grant_ref_t gref); =20 -/* Audits the share subsystem.=20 - *=20 - * Returns ENOSYS if not supported (may not be compiled into the hyperviso= r).=20 +/* Audits the share subsystem. + * + * Returns ENOSYS if not supported (may not be compiled into the hyperviso= r). * * Returns the number of errors found during auditing otherwise. May be (s= hould * be!) zero. @@ -2273,7 +2273,7 @@ long xc_sharing_freed_pages(xc_interface *xch); * should return 1. (And dominfo(d) for each of the two domains should ret= urn 1 * as well). * - * Note that some of these sharing_used_frames may be referenced by=20 + * Note that some of these sharing_used_frames may be referenced by * a single domain page, and thus not realize any savings. The same * applies to some of the pages counted in dominfo(d)->shr_pages. */ diff --git a/tools/libxc/xc_memshr.c b/tools/libxc/xc_memshr.c index d5e135e0d9..5ef56a6933 100644 --- a/tools/libxc/xc_memshr.c +++ b/tools/libxc/xc_memshr.c @@ -41,7 +41,7 @@ int xc_memshr_control(xc_interface *xch, return do_domctl(xch, &domctl); } =20 -int xc_memshr_ring_enable(xc_interface *xch,=20 +int xc_memshr_ring_enable(xc_interface *xch, uint32_t domid, uint32_t *port) { @@ -57,7 +57,7 @@ int xc_memshr_ring_enable(xc_interface *xch, port); } =20 -int xc_memshr_ring_disable(xc_interface *xch,=20 +int xc_memshr_ring_disable(xc_interface *xch, uint32_t domid) { return xc_vm_event_control(xch, domid, @@ -85,11 +85,11 @@ int xc_memshr_nominate_gfn(xc_interface *xch, memset(&mso, 0, sizeof(mso)); =20 mso.op =3D XENMEM_sharing_op_nominate_gfn; - mso.u.nominate.u.gfn =3D gfn;=20 + mso.u.nominate.u.gfn =3D gfn; =20 rc =3D xc_memshr_memop(xch, domid, &mso); =20 - if (!rc) *handle =3D mso.u.nominate.handle;=20 + if (!rc) *handle =3D mso.u.nominate.handle; =20 return rc; } @@ -105,11 +105,11 @@ int xc_memshr_nominate_gref(xc_interface *xch, memset(&mso, 0, sizeof(mso)); =20 mso.op =3D XENMEM_sharing_op_nominate_gref; - mso.u.nominate.u.grant_ref =3D gref;=20 + mso.u.nominate.u.grant_ref =3D gref; =20 rc =3D xc_memshr_memop(xch, domid, &mso); =20 - if (!rc) *handle =3D mso.u.nominate.handle;=20 + if (!rc) *handle =3D mso.u.nominate.handle; =20 return rc; } --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel