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] [patch] pae: tlbflush linear page table updates

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Gerd Knorr" <kraxel@xxxxxxx>
Subject: RE: [Xen-devel] [patch] pae: tlbflush linear page table updates
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Fri, 12 Aug 2005 17:02:41 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 12 Aug 2005 09:01:16 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWdrIJ4ieczLSmTRvKCtQiyPZtuswBbr1iQ
Thread-topic: [Xen-devel] [patch] pae: tlbflush linear page table updates
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Keir Fraser
>Sent: Wednesday, August 10, 2005 9:12 PM
>On 10 Aug 2005, at 14:01, Gerd Knorr wrote:
>
>>> Sure?  The patch below fixes it for me.
>>
>> Uhm, well, it doesn't really fix it.
>>
>>> The tlbflush stuff is red herring btw, the real difference is
>>> optimization.  Build with "optimize=n" boot fine, others don't.
>>
>> While looking into this I've noticed the bug comes and goes away
>> with the optimization level.  Building with -O1 works fine,
>> building with -O2 breaks (both with the patch mailed applied).
>>
>> There might be something wrong with the inline assembler ...
>
>See the fix I just this minute checked in :-)
>
>Hopefully it should fix all these weirdnesses....
>
>  -- Keir

Is similar fix also required by __put_user_64?

#define __put_user_u64(x, addr, retval, errret)                 \
        ...
        : "=r"(retval)                                  \
    : "A" (x), "r" (addr), "i"(errret), "0"(retval))

I'm not sure exact rules for compiler to choose registers. But once
compiler optimizes retval or addr to reuse eax/edx under some condition,
user will also see either incorrect return value, or incorrect content
written to incorrect address. Can we assume such optimization never
happen?

Thanks,
Kevin

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