From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 3/4] xen/arm: introduce XENMEM_cache_flush Date: Fri, 3 Oct 2014 14:41:07 +0100 Message-ID: <1412343667.12695.14.camel@citrix.com> References: <1412244158-12124-3-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1412244158-12124-3-git-send-email-stefano.stabellini@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, 2014-10-02 at 11:02 +0100, Stefano Stabellini wrote: > + if ( owner != d && !grant_map_exists(d, owner->grant_table, mfn) ) > + { > + printk(XENLOG_G_ERR "mfn %llx hasn't been granted by %d to %d\n", mfn, owner->domain_id, d->domain_id); > + ret = -EINVAL; > + goto out; > + } I know you are rewriting this as a gnttab op but this made me think to mention: Be sure to consider the case of a loop back grant, i.e. granting something to yourself. We do occasionally have call to loopback attach e.g. vbd devices to dom0. Ian.