From: Ian Campbell <Ian.Campbell@citrix.com>
To: "dgdegra@tycho.nsa.gov" <dgdegra@tycho.nsa.gov>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 2/3] xen-fbfront: Use grant references when requested
Date: Fri, 7 Jan 2011 20:44:45 +0000 [thread overview]
Message-ID: <1294433085.12280.37.camel@localhost.localdomain> (raw)
In-Reply-To: <1294416779-13833-3-git-send-email-dgdegra@tycho.nsa.gov>
On Fri, 2011-01-07 at 16:12 +0000, dgdegra@tycho.nsa.gov wrote:
> @@ -556,17 +552,58 @@ static unsigned long vmalloc_to_mfn(void *address)
> return pfn_to_mfn(vmalloc_to_pfn(address));
> }
>
> -static void xenfb_init_shared_page(struct xenfb_info *info,
> +static void xenfb_init_shared_page(struct xenbus_device *dev,
> + struct xenfb_info *info,
> struct fb_info *fb_info)
> {
> - int i;
> int epd = PAGE_SIZE / sizeof(info->mfns[0]);
> + int be_id = dev->otherend_id;
> + int i, ref;
> + unsigned long mfn;
> + grant_ref_t gref_head;
> + int allpages = info->nr_pages + ((info->nr_pages + epd - 1) / epd) + 1;
> +
> + int grants = 0;
> + xenbus_scanf(XBT_NIL, dev->otherend, "use-grants", "%d", &grants);
There doesn't seem to be any negotiation with the backend about whether
or not grants should be used so there is no way for a backend to know if
it can choose to set this flag or not, granted not all backends will
have a choice due to their privilege level.
More importantly there is also no way for the backend to figure out is
the frontend is going to obey the request if it does write it (at least
until it tries to map a gref and fails because its really got an mfn).
Usually both front and backend would write a feature-foo node to their
respective directory in xenstore and then figure out what to do based on
what the other end wrote.
In the kbdfront patch you simply write both the mfn and the grant
reference to xenstore, presumably the backend then just picks for itself
which access method to use, could that approach be applicable here?
There seems to be slack in xenfb_page which could accommodate a second
pd array containing grefs for the pages. The presence of a page-gref
node in xenstore would indicate that the larger structure with the grefs
is in use.
Ian.
next prev parent reply other threads:[~2011-01-07 20:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 16:12 [PATCH] Add grant references for fbfront/kbdfront dgdegra
2011-01-07 16:12 ` [PATCH 1/3] xen-fbfront: Read width/height from backend dgdegra
2011-01-07 20:47 ` Ian Campbell
2011-01-07 21:30 ` Daniel De Graaf
2011-01-07 16:12 ` [PATCH 2/3] xen-fbfront: Use grant references when requested dgdegra
2011-01-07 20:44 ` Ian Campbell [this message]
2011-01-07 21:02 ` Daniel De Graaf
2011-01-07 21:41 ` Daniel De Graaf
2011-01-07 21:56 ` Ian Campbell
2011-01-07 16:12 ` [PATCH 3/3] xen-kbdfront: Add grant reference for shared page dgdegra
2011-01-07 16:51 ` [PATCH] Add grant references for fbfront/kbdfront Konrad Rzeszutek Wilk
2011-01-07 17:55 ` Daniel De Graaf
2011-01-07 18:28 ` Ian Campbell
2011-01-07 19:36 ` Daniel De Graaf
2011-01-07 20:44 ` Ian Campbell
2011-01-07 21:51 ` Daniel De Graaf
2011-01-07 22:09 ` [PATCH qemu] Support grant references in mapping Daniel De Graaf
2011-01-11 16:19 ` Ian Jackson
2011-02-25 15:01 ` Konrad Rzeszutek Wilk
2011-02-25 17:38 ` Stefano Stabellini
2011-01-07 19:21 ` [PATCH] Add grant references for fbfront/kbdfront Konrad Rzeszutek Wilk
2011-01-07 19:32 ` Daniel De Graaf
2011-01-07 19:51 ` Konrad Rzeszutek Wilk
-- strict thread matches above, loose matches on Subject: below --
2011-03-07 20:11 [PATCH v2] " Daniel De Graaf
2011-03-07 20:11 ` [PATCH 2/3] xen-fbfront: Use grant references when requested Daniel De Graaf
2011-03-09 21:53 ` Konrad Rzeszutek Wilk
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=1294433085.12280.37.camel@localhost.localdomain \
--to=ian.campbell@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--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 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).