mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/riscv: implement prerequisites for domain_create()
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 <oleksii.kurochko@gmail.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
6259991085
commit
7bab7aabff
2 files changed
+29
-17
No files matched your search
@@ -289,6 +289,35 @@ 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;
|
||||
}
|
||||
|
||||
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 = 0;
|
||||
|
||||
if ( is_idle_domain(d) )
|
||||
return 0;
|
||||
|
||||
if ( (rc = p2m_init(d, config)) != 0)
|
||||
goto fail;
|
||||
|
||||
return rc;
|
||||
|
||||
fail:
|
||||
arch_domain_destroy(d);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void __init __maybe_unused build_assertions(void)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -101,28 +101,11 @@ void dump_pageframe_info(struct domain *d)
|
||||
BUG_ON("unimplemented");
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
void arch_domain_destroy(struct domain *d)
|
||||
{
|
||||
BUG_ON("unimplemented");
|
||||
}
|
||||
|
||||
void arch_domain_shutdown(struct domain *d)
|
||||
{
|
||||
BUG_ON("unimplemented");
|
||||
|
||||