From nobody Sun Nov 24 18:43:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1729698745; cv=none; d=zohomail.com; s=zohoarc; b=L9KXga73lSuiVkuEtqK/z+vkOglm1BTUk9jz83f/qOcHEH/zQt9UF3sTF2ugyT5YkuvFcyWpuPcedMN+kI9b+CcVeIbSrprgKAz1JCI1ruCpZnx6OBONlVuOPzNqT1XemKbxdS8pTAMRi+IFeErEAHymXnZbiCcIXlyBfGuvkKE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729698745; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qyBwaOLFCgdNslW+ijXmTOFeKlk0y+Q5wJ9cIoxUkRA=; b=eNlPjVpi6uf5XBXP/98s2O9uyTyE/TQAZ8M+mKSyV/UqXnb71SvAqfBYBUj9h2y2bPE86qwKO2fGuYUbOjNfR32y6+RxsHSrp3kWJwPTuKHjHU3L+CagokeNJtDGcTU8TVbNAD1gb3yYLLovzSanOSpNdf0RVYGoYekLHgPDpVA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1729698745072445.8243404529344; Wed, 23 Oct 2024 08:52:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.824769.1238976 (Exim 4.92) (envelope-from ) id 1t3de7-0006JW-Dk; Wed, 23 Oct 2024 15:51:39 +0000 Received: by outflank-mailman (output) from mailman id 824769.1238976; Wed, 23 Oct 2024 15:51:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t3de7-0006JN-9X; Wed, 23 Oct 2024 15:51:39 +0000 Received: by outflank-mailman (input) for mailman id 824769; Wed, 23 Oct 2024 15:51:38 +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 1t3de5-0005bd-UE for xen-devel@lists.xenproject.org; Wed, 23 Oct 2024 15:51:37 +0000 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [2a00:1450:4864:20::531]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id af98d0cd-9156-11ef-a0be-8be0dac302b0; Wed, 23 Oct 2024 17:51:37 +0200 (CEST) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5c9850ae22eso8794206a12.3 for ; Wed, 23 Oct 2024 08:51:37 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912ee592sm493214466b.79.2024.10.23.08.51.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 08:51:35 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: af98d0cd-9156-11ef-a0be-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729698696; x=1730303496; 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=qyBwaOLFCgdNslW+ijXmTOFeKlk0y+Q5wJ9cIoxUkRA=; b=FOr230G5a5TK18y4jSS5vpoDrvJZEnTgwTxHA9YeuZ6AD1Piq1SVzCgWrkAfV0NjWl QnZhIWpeyl2lM+2RL7v2Uqev7IJ6VoM1wMda6CLdWopTITeqzMTe0g9bEqcdtc8B67u9 fUr7+1KDt4bB0Yogqbaaajo6Syned++6ZRHIgF7FP282TvR50l28WWMu57nwc3V1kRVA V0xiU7zb2kUd6s3itL9CMDn+UjCovD4xAxJXd9Zj1DBAo6ziEzEE9lOJTAE/iBXO6+tQ +Rnzo8OI8NAXcoZGzyDcHiCWptGI0RqmrRqC532xwUyIwWl/yoZWTOeHF7gFxqN8q7uG jyqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729698696; x=1730303496; 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=qyBwaOLFCgdNslW+ijXmTOFeKlk0y+Q5wJ9cIoxUkRA=; b=Zd2W4xystNr+n/axFfnTiMNMadEEP6XSTgeJ5RD8z4vbKTc/7fsnXYQBm1kJ87/AoN dzugegsnzR/Qj/dk+Xfs3yOzFUiKUbYnHxcVZ2J2mw6T3RdbCVp0XIMrw0kfdTgUNDHH 2O8Thwj9pU0LB0nT+A2UblZX24sOFzzl6LXfuX7oS5YMMrG1gz8iBl+tat8u4eJexNUo NlHez5mi2c4lLAgCK9dL8JcPP2fGTvnWQgH70rgR6Y3l92j8Hk7sQHRD+qYFLMNITHxE UwJYG98mazOC1XxXKqXPOYvCAi2rmPb77lDqxs385U/HiGVhxUmSSiyfY7z4SWxZeHt4 1xkQ== X-Gm-Message-State: AOJu0YxB/qZ00LkVwCcmCu0YH0X6jRGjMbpqsOPtXN6ZWCR3tjvhvlTe +/eS/rhTReZIqgElFHxHrSVioo/iSLoJ+TIWNcJYrzNUDF3NSmuQJNUiUg== X-Google-Smtp-Source: AGHT+IFR0DKvwk+yRKTHpgDVUpZ2peg9bCMsB1UnkX8Ai+O4dSBPWaMRSby8JjufyQYx5dy5AVosIA== X-Received: by 2002:a17:907:1ca3:b0:a9a:6477:bd03 with SMTP id a640c23a62f3a-a9abf8a5023mr230107266b.38.1729698695787; Wed, 23 Oct 2024 08:51:35 -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 v2 3/3] xen/riscv: finalize boot allocator and transition to boot state Date: Wed, 23 Oct 2024 17:50:24 +0200 Message-ID: X-Mailer: git-send-email 2.47.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1729698746927116600 Content-Type: text/plain; charset="utf-8" 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 --- Change in V2: - 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, =20 vm_init(); =20 + end_boot_allocator(); + + /* + * The memory subsystem has been initialized, we can now switch from + * early_boot -> boot. + */ + system_state =3D SYS_STATE_boot; + printk("All set up\n"); =20 machine_halt(); --=20 2.47.0