From patchwork Mon Jun 26 03:34:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Penny Zheng X-Patchwork-Id: 13292283 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 633D8EB64DC for ; Mon, 26 Jun 2023 03:40:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.555006.866569 (Exim 4.92) (envelope-from ) id 1qDd4q-0005wi-Rv; Mon, 26 Jun 2023 03:39:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 555006.866569; Mon, 26 Jun 2023 03:39:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qDd4q-0005ss-9L; Mon, 26 Jun 2023 03:39:44 +0000 Received: by outflank-mailman (input) for mailman id 555006; Mon, 26 Jun 2023 03:39:42 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qDd30-0000HH-6q for xen-devel@lists.xenproject.org; Mon, 26 Jun 2023 03:37:50 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id d1fab75a-13d2-11ee-8611-37d641c3527e; Mon, 26 Jun 2023 05:37:48 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F31831FB; Sun, 25 Jun 2023 20:38:31 -0700 (PDT) Received: from a011292.shanghai.arm.com (a011292.shanghai.arm.com [10.169.190.94]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 587093F64C; Sun, 25 Jun 2023 20:37:45 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d1fab75a-13d2-11ee-8611-37d641c3527e From: Penny Zheng To: xen-devel@lists.xenproject.org Cc: Penny Zheng , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Penny Zheng , Wei Chen Subject: [PATCH v3 51/52] xen/mpu: create stubs of function/variables for UNSUPPORTED features Date: Mon, 26 Jun 2023 11:34:42 +0800 Message-Id: <20230626033443.2943270-52-Penny.Zheng@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230626033443.2943270-1-Penny.Zheng@arm.com> References: <20230626033443.2943270-1-Penny.Zheng@arm.com> MIME-Version: 1.0 As we are not introduing features like SMP, SET/WAY emulation, etc, in MPU system, so we create empty stubs of function/variables and warnings for these UNSUPPORTED features. Signed-off-by: Penny Zheng Signed-off-by: Wei Chen --- v3: - new commit --- xen/arch/arm/arm64/mpu/head.S | 6 ++++++ xen/arch/arm/mpu/mm.c | 16 ++++++++++++++++ xen/arch/arm/mpu/p2m.c | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/xen/arch/arm/arm64/mpu/head.S b/xen/arch/arm/arm64/mpu/head.S index 147a01e977..9f3c5b8990 100644 --- a/xen/arch/arm/arm64/mpu/head.S +++ b/xen/arch/arm/arm64/mpu/head.S @@ -241,6 +241,12 @@ ENTRY(setup_early_uart) #endif ENDPROC(setup_early_uart) +ENTRY(enable_runtime_mm) + PRINT("- SMP NOT SUPPORTED -\r\n") +1: wfe + b 1b +ENDPROC(enable_runtime_mm) + /* * Local variables: * mode: ASM diff --git a/xen/arch/arm/mpu/mm.c b/xen/arch/arm/mpu/mm.c index ef8a327037..8a554a950b 100644 --- a/xen/arch/arm/mpu/mm.c +++ b/xen/arch/arm/mpu/mm.c @@ -933,6 +933,22 @@ void dump_hyp_walk(vaddr_t addr) } } +void mm_init_secondary_cpu(void) +{ + printk(XENLOG_ERR "SMP not *SUPPORTED*\n"); +} + +int init_secondary_mm(int cpu) +{ + printk(XENLOG_ERR "mpu: SMP not *SUPPORTED*\n"); + return -EINVAL; +} + +void update_mm_mapping(bool enable) +{ + printk(XENLOG_ERR "mpu: SMP not *SUPPORTED*\n"); +} + /* * Local variables: * mode: C diff --git a/xen/arch/arm/mpu/p2m.c b/xen/arch/arm/mpu/p2m.c index 87e350270d..4bc09326f5 100644 --- a/xen/arch/arm/mpu/p2m.c +++ b/xen/arch/arm/mpu/p2m.c @@ -492,6 +492,22 @@ void p2m_dump_info(struct domain *d) p2m_read_unlock(p2m); } +void setup_virt_paging_one(void *data) +{ + printk(XENLOG_ERR "mpu: SMP not *SUPPORTED*\n"); +} + +void p2m_invalidate_root(struct p2m_domain *p2m) +{ + printk(XENLOG_ERR "mpu: p2m_invalidate_root() not *SUPPORTED*\n"); +} + +bool p2m_resolve_translation_fault(struct domain *d, gfn_t gfn) +{ + printk(XENLOG_ERR "mpu: p2m_resolve_translation_fault() not *SUPPORTED*\n"); + return false; +} + /* * Local variables: * mode: C