[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] xen/common: Use enhanced ASSERT_ALLOC_CONTEXT in xmalloc()
- To: Henry Wang <Henry.Wang@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Julien Grall <julien@xxxxxxx>
- Date: Wed, 8 Jun 2022 10:42:12 +0100
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
- Delivery-date: Wed, 08 Jun 2022 09:42:35 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Henry,
On 24/05/2022 02:53, Henry Wang wrote:
-----Original Message-----
From: Julien Grall <julien@xxxxxxx>
Subject: Re: [PATCH v3 2/2] xen/common: Use enhanced
ASSERT_ALLOC_CONTEXT in xmalloc()
Hi,
On 07/05/2022 03:54, Henry Wang wrote:
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index e866e0d864..ea59cd1a4a 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -162,13 +162,6 @@
static char __initdata opt_badpage[100] = "";
string_param("badpage", opt_badpage);
-/*
- * Heap allocations may need TLB flushes which may require IRQs to be
- * enabled (except when only 1 PCPU is online).
- */
-#define ASSERT_ALLOC_CONTEXT() \
- ASSERT(!in_irq() && (local_irq_is_enabled() || num_online_cpus() <=
1))
-
FYI, the patch introducing ASSERT_ALLOC_CONTEXT() has been reverted. I
intend to re-introduce it once your previous patch and the one fixing
the ITS (not yet formally sent) have been committed.
Thanks for the information! IIUC the patch:
"xen/arm: gic-v3-lpi: Allocate the pending table while preparing the CPU"
is merged. So I guess both "page_alloc: assert IRQs are enabled in heap
alloc/free"
and this patch can be re-introduced if everyone is happy with the patch?
I have re-committed David's patch and committed yours.
Cheers,
--
Julien Grall
|