From: Ian Campbell Subject: Re: [PATCH 2/3] xen-fbfront: Use grant references when requested Date: Fri, 7 Jan 2011 21:56:33 +0000 Message-ID: <1294437393.12280.48.camel@localhost.localdomain> References: <1294416779-13833-1-git-send-email-dgdegra@tycho.nsa.gov> <1294416779-13833-3-git-send-email-dgdegra@tycho.nsa.gov> <1294433085.12280.37.camel@localhost.localdomain> <4D277F5F.8090500@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4D277F5F.8090500@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel De Graaf Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2011-01-07 at 21:02 +0000, Daniel De Graaf wrote: > On 01/07/2011 03:44 PM, Ian Campbell wrote: > > 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). > > The key used in xenstore (page-gref versus page-ref) tells the backend if > the request was honored. Oh yes, of course. I even suggested the same thing myself later on... > > 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. > > Perhaps "use-grants" should be renamed to "feature-grants"? I think it would be more consistent with the other protocols (and the existing feature-update in the fb protocol) to do so. Also use-grants sounds a bit like a command rather than a suggestion to me. > I thought the > frontend writing a feature-grants node would be redundant since the > page-gref node already communicated what was chosen. Agreed. > > 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? > > Possible, but it would waste a bit of memory (a few extra pages for the > MFN tables in addition to the grant-ref tables). If this isn't an issue, > then fbfront can expose both and allow the backend to choose without any > negotiation. Is this preferred? Since you've already got the negotiation aspect covered I don't think there is any need go down this path. Ian.