From nobody Tue Aug 25 09:45:12 2026 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=1783353544; cv=none; d=zohomail.com; s=zohoarc; b=DWCxAZbmag1ZnqSBUV66zMnMsuvM6PFNLmKlElOhTHvH7hoa9cWAsa/kaXWPw7GNU+02ogBfjfVPwhzN35E8xhIm9ivEO8lIgo0wy3igzz6z6i92JvbL/z5sg9xaaiJkrD8nriWyqLo62tS7v+5Obc9Ua6YBbhUuSmcFM51gEb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783353544; 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=2wM02Rzxvcnp+4y/YzfnnOgBpcuqxKShTB/HzBg0suo=; b=LC692dQRNFjxO0hggWq6K1cBKv9xxV4xkEOQSi8hIN2wze/Mr9aEXReAyv6dBG7PUxmPy0S49A71WnuOltZapxGzyNQl1hwgj4TAiVG10qB5FIbRB33azgvGnQS/s3MXSh4Bpz0HAPJ7za9FbROYELb2It3ubJGb7NW9uanPpYE= 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 1783353543997194.52684441065276; Mon, 6 Jul 2026 08:59:03 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1355495.1610338 (Exim 4.92) (envelope-from ) id 1wgliJ-0008PO-SK; Mon, 06 Jul 2026 15:58:31 +0000 Received: by outflank-mailman (output) from mailman id 1355495.1610338; Mon, 06 Jul 2026 15:58:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wgliJ-0008P9-J0; Mon, 06 Jul 2026 15:58:31 +0000 Received: by outflank-mailman (input) for mailman id 1355495; Mon, 06 Jul 2026 15:58:30 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) id 1wgliI-0008Cm-Sz for xen-devel@lists.xenproject.org; Mon, 06 Jul 2026 15:58:30 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wgliI-003COz-9x for xen-devel@lists.xenproject.org; Mon, 06 Jul 2026 17:58:30 +0200 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a4bd092-2eae-0a2a0a5409dd-0a2a4502b80a-36 for ; Mon, 06 Jul 2026 17:58:30 +0200 Received: from [209.85.128.45] (helo=mail-wm1-f45.google.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a4bd0a5-5a27-0a2a45020019-d155802da869-3 for ; Mon, 06 Jul 2026 17:58:30 +0200 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-493b27c7451so38128505e9.0 for ; Mon, 06 Jul 2026 08:58:30 -0700 (PDT) Received: from fedora (user-109-243-144-234.play-internet.pl. [109.243.144.234]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493cce03fa1sm284910325e9.11.2026.07.06.08.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 08:58:28 -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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783353509; x=1783958309; 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=2wM02Rzxvcnp+4y/YzfnnOgBpcuqxKShTB/HzBg0suo=; b=Kxif4d4ZbgeE+LO3yz9Jf6TvFIlb8nYwn6Ca67uTQi5JT+MBH6sMr8RwLVHOyX91Al o+V+90YG3bP3cX/Tzk6A/bgqeChP6QC+VLCPI4Ivg9KQy640XFUMVzSY6lCJeU7i3MqG GV5Edlw2NChMfjp3hWbZroB7gfr63MaZhojrT9dk0GUdVfLkE6GkLP128Fi+4lhVQ8vV gh5cR56LpwkGzLfaE6Zxw44YEjjM65V75eiwXIH8hu8ML5r7HO41FzXTh12CMAguJfQh 2O/w6MmgvC66ma3lmKYnGt7LCHBBqRXJy3mEKeUOnq9sea915bITNMwE5dpMgcCjE1ZC TrEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783353509; x=1783958309; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2wM02Rzxvcnp+4y/YzfnnOgBpcuqxKShTB/HzBg0suo=; b=eqnFq+qv/xbk7jslJpc/6ARwktns1aHbJC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0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Romain Caritey , Baptiste Le Duc , Oleksii Kurochko , Alistair Francis , Connor Davis , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v5 08/26] xen/riscv: implement prerequisites for domain_create() Date: Mon, 6 Jul 2026 17:57:49 +0200 Message-ID: <2e6d9e0283bf401ca698e72ddeb7c7f4feaa118e.1783331040.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-720697/1783353510-7791E7C5-04EB336F/10/73395122804 X-purgate-type: spam X-purgate-size: 3039 X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1783353548768158502 Content-Type: text/plain; charset="utf-8" arch_domain_create() and arch_sanitise_domain_config() are prerequisites for domain_create(). arch_sanitise_domain_config() currently returns 0, as there is no specific work required at this stage. arch_domain_create() performs basic initialization, such as setting up the = P2M and initializing of next unused phandle. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in v5: - Only review. Nothing changed. --- Changes in v4: - Add Acked-by: Jan Beulich . --- Changes in v3: - Move arch_domain_destroy() from stubs.c to domain.c next to arch_domain_= create(). - Drop d->is_dying =3D DOMDYING_dead from arch_domain_create()'s fail labe= l as domain_create() already does it. - Replace BUG_ON("unimplemented") with printk() in arch_domain_destroy(). --- Changes in v2: - update the commit message. - Drop vcpu_switch_to_aarch64_mode() from riscv/stubs. It shouldn't be und= er riscv/ at all. - Drop next_phandle as it is now in common code. --- --- xen/arch/riscv/domain.c | 29 +++++++++++++++++++++++++++++ xen/arch/riscv/stubs.c | 17 ----------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/xen/arch/riscv/domain.c b/xen/arch/riscv/domain.c index c77be3b827eb..2819ff4e7c92 100644 --- a/xen/arch/riscv/domain.c +++ b/xen/arch/riscv/domain.c @@ -289,6 +289,35 @@ void sync_vcpu_execstate(struct vcpu *v) /* Nothing to do -- no lazy switching */ } =20 +int arch_sanitise_domain_config(struct xen_domctl_createdomain *config) +{ + return 0; +} + +void arch_domain_destroy(struct domain *d) +{ + printk(XENLOG_WARNING "%s: unimplemented\n", __func__); +} + +int arch_domain_create(struct domain *d, + struct xen_domctl_createdomain *config, + unsigned int flags) +{ + int rc =3D 0; + + if ( is_idle_domain(d) ) + return 0; + + if ( (rc =3D p2m_init(d, config)) !=3D 0) + goto fail; + + return rc; + + fail: + arch_domain_destroy(d); + return rc; +} + static void __init __maybe_unused build_assertions(void) { /* diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c index acbb5b9123ea..3a7953593d93 100644 --- a/xen/arch/riscv/stubs.c +++ b/xen/arch/riscv/stubs.c @@ -101,28 +101,11 @@ void dump_pageframe_info(struct domain *d) BUG_ON("unimplemented"); } =20 -int arch_sanitise_domain_config(struct xen_domctl_createdomain *config) -{ - BUG_ON("unimplemented"); -} - -int arch_domain_create(struct domain *d, - struct xen_domctl_createdomain *config, - unsigned int flags) -{ - BUG_ON("unimplemented"); -} - int arch_domain_teardown(struct domain *d) { BUG_ON("unimplemented"); } =20 -void arch_domain_destroy(struct domain *d) -{ - BUG_ON("unimplemented"); -} - void arch_domain_shutdown(struct domain *d) { BUG_ON("unimplemented"); --=20 2.54.0