From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com
Subject: Re: [PATCH 6/6] xen-gntdev: Introduce HVM version of gntdev
Date: Tue, 14 Dec 2010 17:27:56 -0500 [thread overview]
Message-ID: <4D07EF6C.8090009@tycho.nsa.gov> (raw)
In-Reply-To: <4D07E570.2060301@goop.org>
On 12/14/2010 04:45 PM, Jeremy Fitzhardinge wrote:
> On 12/14/2010 06:55 AM, Daniel De Graaf wrote:
>> HVM does not allow direct PTE modification, so guest pages must be
>> allocated and used for grant mappings. If Xen does not provide an
>> auto-translated physmap, the existing direct PTE modification is more
>> efficient.
>
> I haven't looked at this in detail, but doing a complete duplication of
> the driver doesn't seem like a great idea.
>
> Also, Stefano and I have been working on a modification to gntdev to
> make sure that each granted page is backed with a proper struct page (so
> that direct aio works on them). Would this help the hvm case?
>
> Thanks,
> J
Only if this also allocates a guest frame number that can be passed to Xen
in order to eliminate GNTMAP_contains_pte (which cannot work in HVM). I do
have a first attempt to get this version working in the PV case (I can
share it if you're interested); mapping works, but unmap currently leaves
the system in a bad state, triggering a number of BUG_ONs.
One problem that I noticed soon after posting is that Xen does not restore
the original mapping when the unmap hypercall is run; instead, it replaces
the page with one that discards writes and returns all one bits on read.
In the PV case, it seems like integrating with the balloon device would be
the proper way to request that Xen restore a real MFN under the GFNs that
used to map granted pages. I have tried to use XENMEM_populate_physmap to
request that Xen restore page mappings, but this seems to be a noop on HVM.
As an alternative to completely duplicating the module, the module could be
expanded to check xen_feature(XENFEAT_auto_translated_physmap) and perform
the correct type of mapping based on that. Eliminating PTE modification
completely will make the module more maintainable, however.
--
Daniel De Graaf
National Security Agency
prev parent reply other threads:[~2010-12-14 22:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-14 14:55 [PATCH v2] Userspace grant communication Daniel De Graaf
2010-12-14 14:55 ` [PATCH 1/6] xen-gntdev: Fix circular locking dependency Daniel De Graaf
2010-12-14 21:11 ` Jeremy Fitzhardinge
2010-12-14 21:40 ` Daniel De Graaf
2010-12-15 9:47 ` Ian Campbell
2010-12-16 0:28 ` Jeremy Fitzhardinge
2010-12-16 15:09 ` Stefano Stabellini
2010-12-14 14:55 ` [PATCH 2/6] xen-gntdev: Change page limit to be global instead of per-open Daniel De Graaf
2010-12-14 21:12 ` Jeremy Fitzhardinge
2010-12-14 21:42 ` Daniel De Graaf
2010-12-15 9:50 ` Ian Campbell
2010-12-16 0:27 ` Jeremy Fitzhardinge
2010-12-14 14:55 ` [PATCH 3/6] xen-gntdev: Remove unneeded structures from grant_map tracking data Daniel De Graaf
2010-12-14 21:15 ` Jeremy Fitzhardinge
2010-12-14 21:52 ` Daniel De Graaf
2010-12-14 21:56 ` Jeremy Fitzhardinge
2010-12-14 21:54 ` Jeremy Fitzhardinge
2010-12-14 14:55 ` [PATCH 4/6] xen-gntdev: Use find_vma rather than iterating our vma list manually Daniel De Graaf
2010-12-14 21:20 ` Jeremy Fitzhardinge
2010-12-15 9:58 ` Ian Campbell
2010-12-16 0:29 ` Jeremy Fitzhardinge
2010-12-14 14:55 ` [PATCH 5/6] xen-gntalloc: Userspace grant allocation driver Daniel De Graaf
2010-12-14 21:42 ` Jeremy Fitzhardinge
2010-12-14 22:06 ` Daniel De Graaf
2010-12-14 22:40 ` Jeremy Fitzhardinge
2010-12-15 14:18 ` Daniel De Graaf
2010-12-16 1:05 ` Jeremy Fitzhardinge
2010-12-16 15:22 ` Daniel De Graaf
2010-12-16 19:14 ` Jeremy Fitzhardinge
2010-12-14 14:55 ` [PATCH 6/6] xen-gntdev: Introduce HVM version of gntdev Daniel De Graaf
2010-12-14 21:45 ` Jeremy Fitzhardinge
2010-12-14 22:27 ` Daniel De Graaf [this message]
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=4D07EF6C.8090009@tycho.nsa.gov \
--to=dgdegra@tycho.nsa.gov \
--cc=Ian.Campbell@citrix.com \
--cc=jeremy@goop.org \
--cc=xen-devel@lists.xensource.com \
/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.