[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH 1/2] xen/arm: Defer request_irq on secondary CPUs after local_irq_enable


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Thu, 5 May 2022 07:27:52 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4pk0LjocVE6GhlK5fZwvyOKzsUSDK9bj8ABNjqw79Q8=; b=mhU2DFQlr5u0ZTdVg1NADU4Cp7olJ+9EsnQZZqz6kfGLZEL71wpZ4MkZ+Lkb/cyn7Sz3IZzBY9krqvRxkKYk6ivczqO8uxdDC6VBzT7DhzLZLGVqoztvT3aATaQBJilxP6eoTWnDBPz07udUvYAyyuKWnt/o/qJ+vBH3FD8EZk/SurgFR1XR7z/3WTs8ipnAYBabcyjdDyERMM63pXzFBiT/BvybrEevQYH+1Xo7P5QI8JMVbt8Pp3teiKVT42D429+KeLmoWNSfX6aBv/WQHmmIohp2KrjrbQ/QHjT4ZK6ESTjWzy/lmOzHPFcY7PioKHbIvwX1xMEsjuBESyI+Ng==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4pk0LjocVE6GhlK5fZwvyOKzsUSDK9bj8ABNjqw79Q8=; b=c/RppT8+TuYGvkMxI7Y/OAM/RsL18RjWM5fuqeAiIgREAKs2P3hgPSoh9BowncrIwUrjOj34Sr6I/yt7UVvQC2WNL37D/obx6V8dRiZ8lj2478El1GXBwfQn9kfGA9IpaA5haDGYvhsQuTs836o7+Gt6zJVsgnU0W4YLVDEQnhM+RPR/Z+JtI11aBAR9waT2qiLg2H9xViGtA7FT+p3cHeC+K82AsoTqp5synWOonBWy3OhqGL8QOtCQxW3urPUw+zn0+I+rXLzb3X3QZP8K9grQ02S94eL4MsX5xgOGREXrs9uXdG5BoorH9MvEk14f6jzAfOKe/+oss8wEg51l3A==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=AVtDFUk06UtQSF47zoKzsV7OZp344arAemapA2DVCW/4b4W0xft3kUkDOPIwX8VPR7RC/DzuFsbM3/3yBQ7OhaNxG8yWxs5LZiQtR2CZqAFc70xHQQ8IkQWTY1373TehxXdHWH2jIvWwr1T8W+KmmqmHvygoD0IQoSsxON03Ima+tSWWtZhPH5aiItCigOucKJ9ko3+DcOuAbntyU5Pyxor8lVt4wV+BfHRlmzySO6et53KdeBmZcxvKuj9Ipad8UlbABSL/4M9uye1utnWJP8+zcl82BoqK35IStrXi3jTflX1YiNvsJUxhMRaQ7Y3NShq/vZ7inSKfE6bRUS0i4Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EgHEI/KrF148kdAPbVkhcuk9+7Yyfi7soQXPJ0MuReaeZv6yGWCqVVurUIfyoq4bN//8PGZ1RbASHSqQLBwroA2R18dal4VHTnfpVQQ5zcV9xC1s/1OVQpnehWP00GP7qacMaOoNe9W9kGMet5NZZWAwRjbigrHLKJ3UvKYy3M48C5gQp3FkZeqTHlxRqXmDHTVIt9rKBqIVY572yy6UNOE6uTHjOGtMrFd1ltd6qbhatw0Q5ZkALWCPu0FuKOV7KI1aPXsKzH0Z2GZaDheoYvBVbV/exRBGLfuk55w8O39+u6OCOxXQ93wYmlE38uo13JvOnRx34jgUYkap7y0QcA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Thu, 05 May 2022 07:28:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYYCt6dq3rsqHdhkOYsjKIcgbjk60P4h+AgAAAaRA=
  • Thread-topic: [PATCH 1/2] xen/arm: Defer request_irq on secondary CPUs after local_irq_enable

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Hi Henry,
> 
> The CC list doesn't seem to contain the other maintainers. Please use
> the scripts provided in the repo (such scripts/add_maintainers.pl) to
> generate the CC.
> 
> On 05/05/2022 03:54, Henry Wang wrote:
> > With the enhanced ASSERT_ALLOC_CONTEXT, calling request_irq before
> > local_irq_enable on secondary cores will lead to
> >
> > (XEN) Xen call trace:
> > (XEN) [<000000000021d86c>] alloc_xenheap_pages+0x74/0x194 (PC)
> > (XEN) [<000000000021d864>] alloc_xenheap_pages+0x6c/0x194 (LR)
> > (XEN) [<0000000000229e90>] xmalloc_tlsf.c#xmalloc_pool_get+0x1c/0x28
> > (XEN) [<000000000022a270>] xmem_pool_alloc+0x21c/0x448
> > (XEN) [<000000000022a8dc>] _xmalloc+0x8c/0x290
> > (XEN) [<000000000026b57c>] request_irq+0x40/0xb8
> > (XEN) [<0000000000272780>] init_timer_interrupt+0x74/0xcc
> > (XEN) [<000000000027212c>] start_secondary+0x1b4/0x238
> > (XEN) [<0000000084000200>] 0000000084000200
> > (XEN)
> > (XEN)
> > (XEN) ****************************************
> > (XEN) Panic on CPU 4:
> > (XEN) Assertion '!in_irq() && (local_irq_is_enabled() ||
> > num_online_cpus() <= 1)' failed at common/page_alloc.c:2212
> > (XEN) ****************************************
> >
> > on systems without a big enough pool for xmalloc() to cater the
> > requested size.
> 
> Can you explain in the commit message, why this is OK to move the code
> after enabling interrupts?

Sure, will correct both issues in v2.

Kind regards,
Henry

> 
> >
> > Reported-by: Wei Chen <Wei.Chen@xxxxxxx>
> > Suggested-by: Julien Grall <jgrall@xxxxxxxxxx>
> > Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx>
> > Change-Id: Iebdde81f52785b0c6e037c981ff68922db016d08
> > ---
> >   xen/arch/arm/smpboot.c | 7 ++++---
> >   1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
> > index 7bfd0a73a7..a057e85ac1 100644
> > --- a/xen/arch/arm/smpboot.c
> > +++ b/xen/arch/arm/smpboot.c
> > @@ -361,9 +361,6 @@ void start_secondary(void)
> >
> >       init_secondary_IRQ();
> >
> > -    init_maintenance_interrupt();
> > -    init_timer_interrupt();
> > -
> >       set_current(idle_vcpu[cpuid]);
> >
> >       setup_cpu_sibling_map(cpuid);
> > @@ -380,6 +377,10 @@ void start_secondary(void)
> >       cpumask_set_cpu(cpuid, &cpu_online_map);
> >
> >       local_irq_enable();
> > +
> > +    init_maintenance_interrupt();
> > +    init_timer_interrupt();
> > +
> >       local_abort_enable();
> >
> >       check_local_cpu_errata();
> 
> Cheers,
> 
> --
> Julien Grall

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.