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-ia64-devel

RE: [Xen-ia64-devel] Why is cpl read as 0 in para-virtualization ?

To: "Magenheimer, Dan \(HP Labs Fort Collins\)" <dan.magenheimer@xxxxxx>, "Tristan Gingold" <Tristan.Gingold@xxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] Why is cpl read as 0 in para-virtualization ?
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 2 Mar 2006 12:56:33 +0800
Delivery-date: Thu, 02 Mar 2006 04:57:38 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcY9S2KhnzPSoFmpRMuY2INXTurOMwABVKgAABjTpoA=
Thread-topic: [Xen-ia64-devel] Why is cpl read as 0 in para-virtualization ?
>From: Magenheimer, Dan (HP Labs Fort Collins)
>Sent: 2006年3月2日 1:01
>> >
>> > I think some places in Linux/ia64 determine whether code
>> > is running in kernel or user mode by checking psr.cpl.
>> Correct.
>> One place is user_mode() is ptrace.h.
>> Currently it is true if cpl != 0.  I have made a simple test:
>> I have changed
>> the code to cpl == 3, and cpl reads as 2.  Linux is booting
>> (dom0+domU).
>
>IIRC, there was at least one place in assembly code which
>checked psr.cpl==0 (maybe mca code?) but this was a longtime
>ago (possibly 2.4.x) so the code may be gone.

Yes, MCA recover assembly code has that check. Also alt dtlb miss
handler has similar check to prevent user space speculation from 
polluting the TLB. Temporarily hacking one macro doesn't solve 
anything. You need to capture every places (rare or not) to eliminate 
all knowledges based on 4 ring levels. However, I didn't see necessity 
by far.

Thanks,
Kevin
>
>There is Itanium architecture work going on to establish a
>mechanism for determining whether an OS is running native or
>as a (paravirtualized or fully-virtualized) guest.  I don't
>know the status of this but am pretty sure it was checking
>a currently reserved bit, possibly in cr.dcr.
>
>Dan
>
>_______________________________________________
>Xen-ia64-devel mailing list
>Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-ia64-devel

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

<Prev in Thread] Current Thread [Next in Thread>