From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Marczykowski Subject: Re: [PATCH v2 2/2] libvchan: replace munmap with correct xc_gntshr_munmap Date: Wed, 08 May 2013 16:08:22 +0200 Message-ID: <518A5C56.3000100@invisiblethingslab.com> References: <20130508040327.951AD329@duch.mimuw.edu.pl> <518A57ED.5030708@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8416714785259830749==" Return-path: In-Reply-To: <518A57ED.5030708@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel De Graaf Cc: George Dunlap , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============8416714785259830749== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2XXOLTASTLBQCECGPQIAN" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2XXOLTASTLBQCECGPQIAN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08.05.2013 15:49, Daniel De Graaf wrote: > On 05/04/2013 06:10 PM, Marek Marczykowski wrote: >> On linux it will end up in munmap anyway, but do not assume any >> particular xc_gntshr_munmap implementation details. >> >> Signed-off-by: Marek Marczykowski >=20 > On a client, this ends up using xc_gntshr_munmap to unmap pages that > were mapped with xc_gnttab_map_* instead of using xc_gnttab_unmam >=20 > George: unless there is another OS besides Linux that implements the > xc_gntshr_* interfaces (I found none from a grep of the source), this > is just code clean-up and so could be postponed to 4.4. This is actually prerequirement for libvchan for mini-os (already posted = v1, working on v2). But as mini-os libvchan isn't targeted for 4.3, this one = also can wait. >=20 >> --- >> tools/libvchan/io.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/tools/libvchan/io.c b/tools/libvchan/io.c >> index 5ec5fb9..3040099 100644 >> --- a/tools/libvchan/io.c >> +++ b/tools/libvchan/io.c >> @@ -324,9 +324,11 @@ void libxenvchan_close(struct libxenvchan *ctrl) >> if (!ctrl) >> return; >> if (ctrl->read.order >=3D PAGE_SHIFT) >> - munmap(ctrl->read.buffer, 1 << ctrl->read.order); >> + xc_gntshr_munmap(ctrl->gntshr, ctrl->read.buffer, >> + 1 << (ctrl->read.order - PAGE_SHIFT)); >> if (ctrl->write.order >=3D PAGE_SHIFT) >> - munmap(ctrl->write.buffer, 1 << ctrl->write.order); >> + xc_gntshr_munmap(ctrl->gntshr, ctrl->write.buffer, >> + 1 << (ctrl->write.order - PAGE_SHIFT)); >> if (ctrl->ring) { >> if (ctrl->is_server) { >> ctrl->ring->srv_live =3D 0; >> --=20 Best Regards, Marek Marczykowski Invisible Things Lab ------enig2XXOLTASTLBQCECGPQIAN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRilxXAAoJENuP0xzK19csGV0H/0L1IKdwsOG/4KRgdF+i6Wgc SokXQQy9GY6lA7quoVIhCef2+s7piyPFniEjmpRKH/B3HUYNTGUPxo2pn1uJepps m6hY4R8XdAwZDmqHf8iMgIDwHO65LrRsxSlBhuNlqivwqp93/gpCB7QwQ38SCjg2 6MiW8Ok/ZZsIO2tJGqF5wdhMo4riROUAjQ4+vn603SQweoytXgFmfRCiVs/HI7LO XSW3cgdLTOPEoOil4fQ6ZVlAW1yZUAugFsFVFD2vI7kLs+4q3YqrDvyoPOyJr29j bZQBi/dzSoEKY/OD/jGj55fukvDpdT0mfT/w4PJ0BO3q9YyDm6395bx+bq2emSU= =7R4F -----END PGP SIGNATURE----- ------enig2XXOLTASTLBQCECGPQIAN-- --===============8416714785259830749== 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 --===============8416714785259830749==--