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 2 of 3] apic: remove 'enabled_via_apicbase' varia

To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 2 of 3] apic: remove 'enabled_via_apicbase' variable
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 19 May 2011 11:31:58 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 18 May 2011 20:33:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DD42D9E.7030700@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1305742093@andrewcoop> <e80b5280fe2fb8653204.1305742095@andrewcoop> <20110518185339.GD14013@xxxxxxxxxxxx> <4DD42D9E.7030700@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcwVm6K/X9En65OVT3KnChHCubCPyAAOR3aw
Thread-topic: [Xen-devel] [PATCH 2 of 3] apic: remove 'enabled_via_apicbase' variable
> From: Andrew Cooper
> Sent: Thursday, May 19, 2011 4:36 AM
> 
> >
> >> which has been changed to correctly tare down the local APIC without
> >> a
> > teardown?
> >> protection fault (which leads to a general protection fault).
> > So if you don't have x2apic, then it is wrong to disable the LAPIC mode?
> > What about older hardware?
> I guess I wasn't very clear in my description.  In older hardware without
> x2apic, it is correct to simply twiddle the ENABLE bit in the APICBASE MSR.
> However, with x2apic mode enabled, setting the ENABLE bit from 1 to 0 while
> leaving the EXTD bit set will result in a protection fault which will 
> propagate to
> a general protection fault the same codepath will be called in the fault 
> handler.
> As a result, the current code in disable_local_APIC will result in a GPF if 
> the
> BIOS boots with LAPICs disabled (fine as per the spec for compatibility) and 
> xen
> decided to take advantage of x2apic mode.

Though above is true a bug, I'm curious whether it's a hard requirement to reset
APIC state to the BIOS state, or whether there's other way around to handle it
in kexec path. Could you check how upstream Linux handles this? In a glimpse
upstream Linux only tries to recover APIC to BIOS state for 32bit, and also 
lacks
of special treatment on x2apic. Then how would 64bit linux work with kexec?

Thanks
Kevin

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