From patchwork Wed Oct 16 09:15:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13837964 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 5D6B4D1AD32 for ; Wed, 16 Oct 2024 09:16:28 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.819726.1233187 (Exim 4.92) (envelope-from ) id 1t108Y-00065c-8i; Wed, 16 Oct 2024 09:16:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 819726.1233187; Wed, 16 Oct 2024 09:16:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t108Y-00065H-2I; Wed, 16 Oct 2024 09:16:10 +0000 Received: by outflank-mailman (input) for mailman id 819726; Wed, 16 Oct 2024 09:16:08 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t108W-0005Dr-9j for xen-devel@lists.xenproject.org; Wed, 16 Oct 2024 09:16:08 +0000 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [2a00:1450:4864:20::12f]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 464a56a6-8b9f-11ef-a0be-8be0dac302b0; Wed, 16 Oct 2024 11:16:06 +0200 (CEST) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-539fbbadf83so3650876e87.0 for ; Wed, 16 Oct 2024 02:16:06 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a000129eesm391451e87.259.2024.10.16.02.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 02:16:05 -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: 464a56a6-8b9f-11ef-a0be-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729070166; x=1729674966; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uq1Ji0h1S5Dw2PEhn0+S62eckwVA0WVyWGndSlD+Pe0=; b=LpondwmI2+PhEDMQBJFrAL4cBU9ir79eVPXLnvmxhrrQmPkN0Umj7jksn3+hTjqyDl S7X+ExE9M3QPziSXfm6cFi+JTSq/5EaFy+oqpNeTlfELvqR7gQJdQr+yWE5XFvUYKqR8 PNbificNlG4guCVl+FwnYvOd2Qhm5oBvYAGk6y6WRnEcS/VpQREqKJFOheabCq9mBgES xWqwsrhIM8DGsHxrbrpf+vbrl8EGV7KbG3mWWWGddH7maUkEw4GQpuYiEg02GE2t5ACC td/SQMA/nKp8RnZoAeIZ2Pk/gJY8zFTZNY01u8Xjg+w2xqtjsW7JQLGVtCQgOUt6/d9R VIXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729070166; x=1729674966; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uq1Ji0h1S5Dw2PEhn0+S62eckwVA0WVyWGndSlD+Pe0=; b=ofIHNf2XHbR3jONHaZg2Sb0hQokUt/6IlCL9mJPeJUTgVPPKy8tWaqy6mfMdpC79mE ZKzLGdx3gNoq8itqn/X3xPiZtMdCpanzsrqQbxMX4nX3vK2+jmV72UpvFzEx1Gkt2Ega 9jim8Cs7uvJE9vulaWiC0bXy0vvnzZv0FUDf7jdHSIsWcQHHWiCpK47HgilMXB7qXUlR 86dkt4+n/3xQHu4+F+ccrZBQZ4ctel5haKbx+/ZBN83rUY0pWTrQ0nAJ6wBuX/WSl83q 5Kw9xDRMl3VwmLzuc19JCfvlRphb3IKiXQzybzqf9kTZx2R6xY4rkI2HfZokDT03Zhwd aNmA== X-Gm-Message-State: AOJu0Yxkuc1M/LmsTsviJcPvPJct59f3we3+fkgDkUHWMRKlv2y+0Z2U 4pE4VBl1WoNWLs1iJb7zXGx5XoqvPSz+ReJZLIWDEQT7C2WliucaPjB1+w== X-Google-Smtp-Source: AGHT+IGO+hyNoyG8ho2yeBme03+6EdXfXPmLx1WZxdmZiZeFAIbiv88WI4R0FDSR9TzuYZZ5fIxFCw== X-Received: by 2002:a05:6512:3d23:b0:536:568f:c5ed with SMTP id 2adb3069b0e04-539da3b41c0mr8592917e87.1.1729070165984; Wed, 16 Oct 2024 02:16:05 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Alistair Francis , Bob Eshleman , Connor Davis , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [PATCH v1 5/5] xen/riscv: finalize boot allocator and transition to boot state Date: Wed, 16 Oct 2024 11:15:57 +0200 Message-ID: X-Mailer: git-send-email 2.47.0 In-Reply-To: References: MIME-Version: 1.0 Add a call to end_boot_allocator() in start_xen() to finalize the boot memory allocator, moving free pages to the domain sub-allocator. After initializing the memory subsystem, update `system_state` from `SYS_STATE_early_boot` to `SYS_STATE_boot`, signifying the end of the early boot phase. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- xen/arch/riscv/setup.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 3652cb056d..9680332fee 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -65,6 +65,14 @@ void __init noreturn start_xen(unsigned long bootcpu_id, vm_init(); + end_boot_allocator(); + + /* + * The memory subsystem has been initialized, we can now switch from + * early_boot -> boot. + */ + system_state = SYS_STATE_boot; + printk("All set up\n"); machine_halt();