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] 64-bit failsafe callback

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxxxx>
Subject: RE: [Xen-devel] 64-bit failsafe callback
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Mon, 27 Mar 2006 14:46:52 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 27 Mar 2006 22:49:32 +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: AcZR71AMTHHCTv+3QEiRGYT1wW/0sAAAB71A
Thread-topic: [Xen-devel] 64-bit failsafe callback
Keir Fraser wrote:
> On 27 Mar 2006, at 22:57, Jan Beulich wrote:
> 
>> We're, while porting the kernel code back to SLES9, running into a
>> case where the failsafe callback gets entered. Looking at that code
>> we don't seem to be able to understand how it is actually expected
>> to work. That code, out of load_segments, stores the selectors
>> (including one or more that failed) into the (extended) frame for
>> the kernel to pick them up. The kernel code, however, simply re-does
>> the load of these selectors - how can that be expected to work any
>> better than in the hypervisor? Further, the kernel blindly loads fs
>> and gs, without caring to destroy their base addresses and, even
>> more importantly, its own ability to access the PDA. 
> 
> Xen allows the kernel to do something smarter if it wants, but the
> correct thing in Linux is to simply zero invalid selectors, so that's
> what the failsafe callback handler does. The reload into %gs is indeed
> bogus -- it should instead
> HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, gs).
> 
>   -- Keir
> 
> 

Frankly I don't think the failsafe callback code is expected to work. I
did not see failsafe callback triggered in normal cases or did not have
test cases for that at the initial port. When I actually saw it, it was
caused by a porting bug in x86-64 XenLinux. If you have a valid case
where the failsafe callback should handle, we should fix it.  

Jun
---
Intel Open Source Technology Center

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