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] Query about cpuidle

To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <kevin.tian@xxxxxxxxx>
Subject: Re: [Xen-devel] Query about cpuidle
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Fri, 09 Sep 2011 13:50:22 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 09 Sep 2011 05:50:59 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=95q/3bAFRJsM1bF2CMkS4n886L8yYaQWIxBySbD5fk8=; b=sOJBZ5Vp4KS7eTwoaSTDJcs8YMiXwT1fUFbSj5hSLIclI3MAm4v2P5g4XsxQW6SC4E N617Rzr0m5FpMWuTXe6+FAow1YII5S/Z30uBHBsaP8bhHnROM9QUSSzeAmeuqDaIGL+L tRrg9wHS7IsXpQ/S14hwK+BuuzC92aahNgut4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E6A03FE.8090202@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acxu7wlZP9sSwgg3gkygHpKUqoss2Q==
Thread-topic: [Xen-devel] Query about cpuidle
User-agent: Microsoft-Entourage/12.30.0.110427
On 09/09/2011 13:18, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx> wrote:

> Hello,
> 
> We have recently had a support escalation about Xen-4.1.1 being unable
> to boot on HP BL460c G7 blades.  The problem turned out to be a null
> function pointer deference (ns_to_tick in cpu_idle.c) during early boot
> of dom0, in the set_cx_pminfo function.
> 
> I applied your patch, changeset 23662:2faba14bac13, about initializing
> default C state information, and this appears to have fixed the problem.
> 
> However, I see in the patch that setting up the function pointers
> (ns_to_tick, tick_to_ns etc) is predicated on the hypercall coming in on
> CPU0.

Firstly, it's predicated on the hypercall addressing CPU0, rather than being
executed on CPU0. Secondly, the cpuidle_init_cpu() functiomn is *also*
called from the CPU-hotplug path in Xen, and is called directly from the
presmp_initcall path for CPU0. I don't know why it is called both on a
hypercall path and on a hotplug path, it seems weird. But anyhow, this means
that the function pointers will guaranteed get set up early during Xen boot?

I can only sympathise and agree that the code is complicated and opaque,
however.

 -- Keir

>  What guarantees are in place to ensure that these function
> pointers get set up?  I cant see anything obvious from the code, but
> have to admit that the null pointer deference appears to have gone away.
> 
> Thanks in advance,



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

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