[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 04/26] xen/riscv: implement prerequisites for domain_create()





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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.