From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: Re: [PATCH] Fix >4G i386 PAE grant table interface Date: Sat, 04 Nov 2006 12:10:55 -0500 Message-ID: <454CC99F.5080707@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org Keir Fraser wrote: > > > On 4/11/06 2:25 pm, "Steven Rostedt" wrote: > >> So is there a difference between create_grant_pte_mapping and >> create_grant_va_mapping. As well as destroy_grant_pte_mapping and >> destroy_grant_va_mapping. So calling pte create, and then va destroy on >> the same mapping is not a bug? > > That would be a bug, if it were possible, which it's not. 'flags' is not a > parameter to the gnttab_unmap operation. Xen remembers the flags from the > original map operation. > OK, took me some time to find what you mean: __gnttab_unmap_grant_ref( struct gnttab_unmap_grant_ref *op) { [...] map = &ld->grant_table->maptrack[op->handle]; [...] dom = map->domid; ref = map->ref; flags = map->flags; [...] if ( (op->host_addr != 0) && (flags & GNTMAP_host_map) ) { if ( (rc = destroy_grant_host_mapping(op->host_addr, frame, flags)) < 0 ) goto unmap_out; OK, but it can be a problem on the kernel side because of the Xen auto translate physmap feature. But not as bad as I thought. But it's still good to be consistent. -- Steve