All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Marczykowski <marmarek@invisiblethingslab.com>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v2 2/2] libvchan: replace munmap with correct xc_gntshr_munmap
Date: Wed, 08 May 2013 16:08:22 +0200	[thread overview]
Message-ID: <518A5C56.3000100@invisiblethingslab.com> (raw)
In-Reply-To: <518A57ED.5030708@tycho.nsa.gov>


[-- Attachment #1.1: Type: text/plain, Size: 1850 bytes --]

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 <marmarek@invisiblethingslab.com>
> 
> 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
> 
> 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.

> 
>> ---
>>   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 >= 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 >= 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 = 0;
>>


-- 
Best Regards,
Marek Marczykowski
Invisible Things Lab


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 555 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2013-05-08 14:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-04 22:10 [PATCH v2 2/2] libvchan: replace munmap with correct xc_gntshr_munmap Marek Marczykowski
2013-05-08 10:48 ` George Dunlap
2013-05-08 10:55   ` Ian Campbell
2013-05-08 10:57 ` Ian Campbell
2013-05-08 11:42   ` Ian Campbell
2013-05-08 14:06     ` Marek Marczykowski
2013-05-08 13:49 ` Daniel De Graaf
2013-05-08 14:08   ` Marek Marczykowski [this message]
2013-05-10 13:46     ` Ian Campbell
2013-05-10 13:55       ` Marek Marczykowski
2013-05-10 13:57         ` George Dunlap
2013-05-10 14:08         ` Ian Campbell
2013-05-10 14:15           ` George Dunlap
2013-05-10 14:18             ` Ian Campbell
2013-07-04  9:43   ` Ian Campbell

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=518A5C56.3000100@invisiblethingslab.com \
    --to=marmarek@invisiblethingslab.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@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 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.