[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 04/26] xen/riscv: implement prerequisites for domain_create()
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Tue, 19 May 2026 13:33:39 +0200
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:In-Reply-To:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
- Cc: Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 19 May 2026 11:33:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 5/18/26 5:43 PM, Jan Beulich wrote:
On 08.05.2026 16:43, Oleksii Kurochko wrote:
--- a/xen/arch/riscv/domain.c
+++ b/xen/arch/riscv/domain.c
@@ -289,6 +289,31 @@ void sync_vcpu_execstate(struct vcpu *v)
/* Nothing to do -- no lazy switching */
}
+int arch_sanitise_domain_config(struct xen_domctl_createdomain *config)
+{
+ return 0;
+}
+
+int arch_domain_create(struct domain *d,
+ struct xen_domctl_createdomain *config,
+ unsigned int flags)
+{
+ int rc = 0;
+
+ if ( is_idle_domain(d) )
+ return 0;
+
+ if ( (rc = p2m_init(d, config)) != 0)
+ goto fail;
+
+ return rc;
+
+ fail:
+ d->is_dying = DOMDYING_dead;
domain_create() does this as well. Is it really needed here?
Considering that domain wasn't created and thereby scheduled that
nothing will use d->is_dying and so it could be dropped or moved to
arch_domain_destroy().
+ arch_domain_destroy(d);
This continues to be a stub, i.e. upon encountering any kind of error one
would hit the BUG_ON() there.
I think that for current stage of development it is fine.
Would it be better change BUG_ON() to printk()? And add proper
implementation a little bit later?
~ Oleksii
|