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

xen-devel

[Top] [All Lists]

Re: [Xen-devel] What is the current state of Dom0 kernel support? / cras

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] What is the current state of Dom0 kernel support? / crash
From: Pasi Kärkkäinen <pasik@xxxxxx>
Date: 2009年7月30日 11:48:00 +0300
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2009年7月30日 01:48:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A70B585.2070109@xxxxxxxx>
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: <4A553888.1090302@xxxxxxxx> <20090709222414.GL24960@xxxxxxxxxxxxxxx> <20090715082242.GB24960@xxxxxxxxxxxxxxx> <20090721130342.GQ24960@xxxxxxxxxxxxxxx> <4A67651D.7040300@xxxxxxxx> <20090722193530.GR24960@xxxxxxxxxxxxxxx> <20090722195748.GS24960@xxxxxxxxxxxxxxx> <4A6775C9.5010802@xxxxxxxx> <20090722205346.GU24960@xxxxxxxxxxxxxxx> <4A70B585.2070109@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006年08月11日)
On Wed, Jul 29, 2009 at 01:48:05PM -0700, Jeremy Fitzhardinge wrote:
> >>>>> The stack backtrace is a bit fuzzy; do you have CONFIG_FRAMEPOINTER 
> >>>>> enabled? 
> >>>>> And if you have CONFIG_DEBUGINFO enabled, you can map the eip c058cdcb 
> >>>>> to a specific source line (its not clear to me which pointer is NULL).
> >>>>>
> >>>>> 
> >>>>> 
> >>>> [root@dom0test linux-2.6-xen]# grep -i CONFIG_FRAMEPOINTER .config
> >>>> [root@dom0test linux-2.6-xen]# grep -i CONFIG_DEBUGINFO .config
> >>>> [root@dom0test linux-2.6-xen]# 
> >>>>
> >>>> Unfortunately those were not enabled.. I'll build a new kernel with
> >>>> CONFIG_DEBUGINFO enabled.
> >>>>
> >>>> 
> >>>> 
> >>> Actually CONFIG_DEBUG_INFO was enabled, if you meant that? 
> >>> 
> >>> 
> >> Yes, that's it.
> >> 
> >>> (gdb) x/i 0xc058cdcb
> >>> 
> >>> 
> >> Try "list *0xc058cdcb".
> >>
> >> 
> >
> > (gdb) list *0xc058cdcb
> > 0xc058cdcb is in active_evtchns (drivers/xen/events.c:237).
> > 232
> > 233 static inline unsigned long active_evtchns(unsigned int cpu,
> > 234 struct shared_info *sh,
> > 235 unsigned int idx)
> > 236 {
> > 237 return (sh->evtchn_pending[idx] &
> > 238 cpu_evtchn_mask(cpu)[idx] &
> > 239 ~sh->evtchn_mask[idx]);
> > 240 }
> > 241
> > (gdb)
> >
> >
> > -- Pasi
> >
> > 
>
> Does this help?
>
I'll try it later today. 
-- Pasi
> J
>
> Subject: [PATCH] xen: use proper percpu variable for cpu_evtchn_mask
>
> cpu_evtchn_mask is a per-cpu mask of event channels, so it should
> be implemented as a proper per_cpu variable.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
>
> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> index abad71b..4443b0f 100644
> --- a/drivers/xen/events.c
> +++ b/drivers/xen/events.c
> @@ -93,14 +93,11 @@ static struct irq_info irq_info[NR_IRQS];
> static int evtchn_to_irq[NR_EVENT_CHANNELS] = {
> [0 ... NR_EVENT_CHANNELS-1] = -1
> };
> -struct cpu_evtchn_s {
> - unsigned long bits[NR_EVENT_CHANNELS/BITS_PER_LONG];
> -};
> -static struct cpu_evtchn_s *cpu_evtchn_mask_p;
> -static inline unsigned long *cpu_evtchn_mask(int cpu)
> -{
> - return cpu_evtchn_mask_p[cpu].bits;
> -}
> +
> +#define NR_EVENT_CHANNEL_LONGS (NR_EVENT_CHANNELS/BITS_PER_LONG)
> +static DEFINE_PER_CPU(unsigned long,
> + cpu_evtchn_mask[NR_EVENT_CHANNEL_LONGS]) =
> + {[0 ... NR_EVENT_CHANNEL_LONGS-1] = ~0};
>
> /* Xen will never allocate port zero for any purpose. */
> #define VALID_EVTCHN(chn) ((chn) != 0)
> @@ -223,7 +220,7 @@ static inline unsigned long active_evtchns(unsigned int 
> cpu,
> unsigned int idx)
> {
> return (sh->evtchn_pending[idx] &
> - cpu_evtchn_mask(cpu)[idx] &
> + per_cpu(cpu_evtchn_mask, cpu)[idx] &
> ~sh->evtchn_mask[idx]);
> }
>
> @@ -236,8 +233,8 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned 
> int cpu)
> cpumask_copy(irq_to_desc(irq)->affinity, cpumask_of(cpu));
> #endif
>
> - __clear_bit(chn, cpu_evtchn_mask(cpu_from_irq(irq)));
> - __set_bit(chn, cpu_evtchn_mask(cpu));
> + __clear_bit(chn, per_cpu(cpu_evtchn_mask, cpu_from_irq(irq)));
> + __set_bit(chn, per_cpu(cpu_evtchn_mask, cpu));
>
> irq_info[irq].cpu = cpu;
> }
> @@ -253,8 +250,6 @@ static void init_evtchn_cpu_bindings(void)
> cpumask_copy(desc->affinity, cpumask_of(0));
> }
> #endif
> -
> - memset(cpu_evtchn_mask(0), ~0, sizeof(cpu_evtchn_mask(0)));
> }
>
> static inline void clear_evtchn(int port)
> @@ -928,10 +923,6 @@ void __init xen_init_IRQ(void)
> {
> int i;
>
> - cpu_evtchn_mask_p = kcalloc(nr_cpu_ids, sizeof(struct cpu_evtchn_s),
> - GFP_KERNEL);
> - BUG_ON(cpu_evtchn_mask_p == NULL);
> -
> init_evtchn_cpu_bindings();
>
> /* No event channels are 'live' right now. */
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: RE: [Xen-devel] [pvops-dom0] Adding MCA logging support in pv_ops , Ke, Liping
Next by Date: [Xen-devel] Re: [PATCH] dm-ioband-v1.12.2: I/O bandwidth controller , Ryo Tsuruta
Previous by Thread: Re: [Xen-devel] What is the current state of Dom0 kernel support? / crash , Jeremy Fitzhardinge
Next by Thread: Re: [Xen-devel] What is the current state of Dom0 kernel support? / crash , Pasi Kärkkäinen
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /