From 086e0f19d8dd439209618c01bf36c0152be26a7f Mon Sep 17 00:00:00 2001 From: Zide Chen Date: Thu, 9 Jan 2020 15:17:02 -0800 Subject: [PATCH] hv: fix pcpu_id mask issue in smp_call_function() INVALID_BIT_INDEX has 16 bits only, which removes all pcpu_id that is >= 16 from the destination mask. Tracked-On: #4354 Signed-off-by: Zide Chen --- hypervisor/arch/x86/notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/arch/x86/notify.c b/hypervisor/arch/x86/notify.c index d9220f59a..cbed7c7e3 100644 --- a/hypervisor/arch/x86/notify.c +++ b/hypervisor/arch/x86/notify.c @@ -43,7 +43,7 @@ void smp_call_function(uint64_t mask, smp_call_func_t func, void *data) struct smp_call_info_data *smp_call; /* wait for previous smp call complete, which may run on other cpus */ - while (atomic_cmpxchg64(&smp_call_mask, 0UL, mask & INVALID_BIT_INDEX) != 0UL); + while (atomic_cmpxchg64(&smp_call_mask, 0UL, mask) != 0UL); pcpu_id = ffs64(mask); while (pcpu_id < MAX_PCPU_NUM) { bitmap_clear_nolock(pcpu_id, &mask);