WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH] Fix >4G i386 PAE grant table interface

To: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] Fix >4G i386 PAE grant table interface
From: Steven Rostedt <srostedt@xxxxxxxxxx>
Date: Fri, 03 Nov 2006 17:46:56 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 03 Nov 2006 14:47:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <454B19DB.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <454A2271.90000@xxxxxxxxxx> <C16FE66E.3F71%Keir.Fraser@xxxxxxxxxxxx> <454B19DB.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
Jan Beulich wrote:
Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> 02.11.06 19:16 >>>
On 2/11/06 16:53, "Steven Rostedt" <srostedt@xxxxxxxxxx> wrote:

This patch updates both the linux-2.6-sparse tree and the xen HV to use
uint64_t instead of unsigned long for those particular functions.  This
patch has been tested on RHEL5 Beta on a box with 12G i386.

Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
Nasty bug. At least it affects only blktap. Thanks.

Looking at this it would seem to me that the second call to
gnttab_set_unmap_op in blkltap.c is missing the
GNTMAP_contains_pte flag, affecting auto_translated_physmap
guests.

It's much worst than that!

Without this patch, my patch is still broken. In the hypervisor this flag is checked, and will go down the wrong path when it is missing:


int destroy_grant_host_mapping(
    u64 addr, unsigned long frame, unsigned int flags)
{
    if ( flags & GNTMAP_contains_pte )
        return destroy_grant_pte_mapping(addr, frame, current->domain);
    return destroy_grant_va_mapping(addr, frame, current);
}


You can see here that we call the va_mapping instead of the pte mapping. Which means that we once again truncate the top 32 bits of the address, since a va addr is expected to be "unsigned long" in size.

Also, this can be bad, if the va addr is really virtual, and doesn't match the actual offset shift (like handling high memory).


Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>


please apply.

Acked-by: Steven Rostedt <srostedt@xxxxxxxxxx>

-- Steve

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel