From: David Scott <dave.scott@eu.citrix.com>
To: xen-devel <xen-devel@lists.xen.org>
Subject: GNTTABOP_unmap_grant_ref doc
Date: Wed, 24 Jul 2013 13:49:42 +0100 [thread overview]
Message-ID: <51EFCD66.9000402@eu.citrix.com> (raw)
Hi,
I've been working on the Mirage (mini-OS + OCaml runtime) blkback
implementation. It seems to be working much more happily now but I was a
bit surprised by the GNTTABOP_unmap_grant_ref doc -- maybe I misread it.
In ./xen/include/public/grant_table.h it says
/*
* GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings
* tracked by <handle>. If <host_addr> or <dev_bus_addr> is zero, that
* field is ignored. If non-zero, they must refer to a device/host mapping
* that is tracked by <handle>
* NOTES:
* 1. The call may fail in an undefined manner if either mapping is not
* tracked by <handle>.
* 3. After executing a batch of unmaps, it is guaranteed that no stale
* mappings will remain in the device or host TLBs.
*/
When I read
"If <host_addr> or <dev_bus_addr> is zero, that field is ignored"
"The call may fail in an undefined manner if either mapping is not
tracked by <handle>"
I thought, "great, I'll not bother tracking anything except the handle
and set both fields to zero". However if I set host_addr to zero then my
frontend complains bitterly
gnttab_stubs.c: WARNING: g.e. 53 still in use! (19)
If I store the host_addr and fill it in during the unmap, everything
seems to work.
So did I misread the doc? Or did it mean exclusive-or i.e. you must fill
in either one of these two fields? Or have I done something stupid
elsewhere (always possible)?
If it turns out that I have misread the doc, I'll happily send a patch
to improve the text (once I'm sure I understand what it should say...)
Thanks!
Dave
next reply other threads:[~2013-07-24 12:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 12:49 David Scott [this message]
2013-07-24 17:31 ` GNTTABOP_unmap_grant_ref doc Stefano Stabellini
2013-07-29 8:42 ` Ian Campbell
2013-07-29 9:00 ` Keir Fraser
2013-07-24 18:30 ` David Vrabel
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=51EFCD66.9000402@eu.citrix.com \
--to=dave.scott@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).