[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/4] xen/arm: mpu: Implement a dummy enable_secondary_cpu_mm
- To: Julien Grall <julien@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Ayan Kumar Halder <ayankuma@xxxxxxx>
- Date: Tue, 24 Sep 2024 12:34:31 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=av0pSuShk8DIuESQEQbdZzyT6wnySbCxw/mI/Ynf+FA=; b=L/w4t0jNTin84Bmy6/wYgVt2DstawE5o1t4o9Vryzc+fh+9sF785W74tBsbZ2ItdHe3B0s+wml9DPLEjBIu28mWLFSg8sx91BqsFTi9JOXwccVh1MVEZ4bjdh43wVWUZguO0Z0lsmMdmsgfcohoFWopl760VpNUsw/U4OBjfBy0wh7nFAlpkykxyP25EPOufECjAzKb6C07S9BmtJKNJR2OJJOjSiyGTO9LddC10DOc7eMNuQtbPB5PxWUBaZFx+Cpseaz3J5vnhSZt4aKpfx+dORE4v8EUlS6UemnTRqsz6iHUsRv1dOb+XMgf/AnU9eYZc5Xc+wcEIH3kTSSSfrg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VQe7nPKP0FxnnEd3hOSggCZHObygkordGJlNYQX9ygnenOhXYbgPqwXth+NRcQ94oY/X1sQvmO4Zi/rshuGODJkKbzpyxQaKlvIcdFzxB1iR/NiN1kb1vae9dB2v7mGVfwl3LZfhxPnLL6v9xERyqNq2RWx2KtBSWSYAy9rcvO7k3y+0LlOHeeDuNoHBblMCjHiv5sUs/IrlhMGwBme5KVu9Qf7s8rXKq4X4kH8DptMf10kkQcsSCo+TyTuaOe9Nz8dnUTi6BnrFXzLcwwayRBIFnwy1f9Oe7Xw5L4X9yAHeQCOkqgkRRWFvLTgWnV9XAN8cwepH0VW/ZaV+Ov8Kmg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 24 Sep 2024 11:34:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 19/09/2024 14:20, Julien Grall wrote:
Hi,
Hi Julien,
On 18/09/2024 19:51, Ayan Kumar Halder wrote:
Secondary cpus initialization is not yet supported. Thus, we print an
appropriate message and put the secondary cpus in WFE state.
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---
Changes from :-
v1 - 1. NR_CPUS is defined as 1 for MPU
2. Added a message in enable_secondary_cpu_mm()
xen/arch/Kconfig | 1 +
xen/arch/arm/arm64/mpu/head.S | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig
index 308ce129a8..8640b7ec8b 100644
--- a/xen/arch/Kconfig
+++ b/xen/arch/Kconfig
@@ -11,6 +11,7 @@ config NR_CPUS
default "8" if ARM && RCAR3
default "4" if ARM && QEMU
default "4" if ARM && MPSOC
+ default "1" if ARM && MPU
default "128" if ARM
help
Controls the build-time size of various arrays and bitmaps
diff --git a/xen/arch/arm/arm64/mpu/head.S
b/xen/arch/arm/arm64/mpu/head.S
index ef55c8765c..3dfbbf8879 100644
--- a/xen/arch/arm/arm64/mpu/head.S
+++ b/xen/arch/arm/arm64/mpu/head.S
@@ -168,6 +168,16 @@ FUNC(enable_boot_cpu_mm)
b 1b
END(enable_boot_cpu_mm)
+/*
+ * Secondary cpu has not yet been supported on MPU systems. We will
block the
+ * secondary cpu bringup at this stage.
Given that NR_CPUS is 1, this should not be reachable. How about the
following comment:
"We don't yet support secondary CPUs bring-up. Implement a dummy
helper to please the common code."
Ack.
+ */
+ENTRY(enable_secondary_cpu_mm)
+1: PRINT("- SMP not enabled yet -\r\n")
You want the print to be outside of the loop. Otherwise, it will spam
the console in the unlikely case the code is reached.
Ack.
- Ayan
+ wfe
+ b 1b
+ENDPROC(enable_secondary_cpu_mm)
+
/*
* Local variables:
* mode: ASM
Cheers,
|