|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 08/25] xen/domctl: wrap around XEN_DOMCTL_soft_reset
Function domain_soft_reset() is responsible for domain soft reset, tracking
its calling chain, and the following functions could also be wrapped:
- grant_table_warn_active_grants()
- argo_soft_reset()
- arch_domain_soft_reset()
- domain_resume(), another usage is in XEN_DOMCTL_resumedomain domctl-op.
Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
xen/arch/arm/domain.c | 2 ++
xen/arch/ppc/stubs.c | 2 ++
xen/arch/riscv/stubs.c | 2 ++
xen/arch/x86/domain.c | 2 ++
xen/common/argo.c | 2 ++
xen/common/domain.c | 4 ++++
xen/common/grant_table.c | 2 ++
7 files changed, 16 insertions(+)
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 310c578909..4124d201d1 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -870,10 +870,12 @@ void arch_domain_unpause(struct domain *d)
{
}
+#ifdef CONFIG_DOMCTL
int arch_domain_soft_reset(struct domain *d)
{
return -ENOSYS;
}
+#endif /* CONFIG_DOMCTL */
void arch_domain_creation_finished(struct domain *d)
{
diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c
index 4679cf9360..b2b97c6eb7 100644
--- a/xen/arch/ppc/stubs.c
+++ b/xen/arch/ppc/stubs.c
@@ -236,10 +236,12 @@ void arch_domain_unpause(struct domain *d)
BUG_ON("unimplemented");
}
+#ifdef CONFIG_DOMCTL
int arch_domain_soft_reset(struct domain *d)
{
BUG_ON("unimplemented");
}
+#endif /* CONFIG_DOMCTL */
void arch_domain_creation_finished(struct domain *d)
{
diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c
index 8918cebf35..4f817bfe83 100644
--- a/xen/arch/riscv/stubs.c
+++ b/xen/arch/riscv/stubs.c
@@ -208,10 +208,12 @@ void arch_domain_unpause(struct domain *d)
BUG_ON("unimplemented");
}
+#ifdef CONFIG_DOMCTL
int arch_domain_soft_reset(struct domain *d)
{
BUG_ON("unimplemented");
}
+#endif /* CONFIG_DOMCTL */
void arch_domain_creation_finished(struct domain *d)
{
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 56c3816187..13ccaf1c79 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1001,6 +1001,7 @@ void arch_domain_unpause(struct domain *d)
viridian_time_domain_thaw(d);
}
+#ifdef CONFIG_DOMCTL
int arch_domain_soft_reset(struct domain *d)
{
struct page_info *page = virt_to_page(d->shared_info), *new_page;
@@ -1102,6 +1103,7 @@ int arch_domain_soft_reset(struct domain *d)
return ret;
}
+#endif /* CONFIG_DOMCTL */
void arch_domain_creation_finished(struct domain *d)
{
diff --git a/xen/common/argo.c b/xen/common/argo.c
index cbe8911a43..932f9fde9b 100644
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -2351,6 +2351,7 @@ argo_destroy(struct domain *d)
write_unlock(&L1_global_argo_rwlock);
}
+#ifdef CONFIG_DOMCTL
void
argo_soft_reset(struct domain *d)
{
@@ -2374,3 +2375,4 @@ argo_soft_reset(struct domain *d)
write_unlock(&L1_global_argo_rwlock);
}
+#endif /* CONFIG_DOMCTL */
diff --git a/xen/common/domain.c b/xen/common/domain.c
index e20fe2d40d..604217d782 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -1343,6 +1343,7 @@ int domain_shutdown(struct domain *d, u8 reason)
return 0;
}
+#ifdef CONFIG_DOMCTL
void domain_resume(struct domain *d)
{
struct vcpu *v;
@@ -1369,6 +1370,7 @@ void domain_resume(struct domain *d)
domain_unpause(d);
}
+#endif /* CONFIG_DOMCTL */
int vcpu_start_shutdown_deferral(struct vcpu *v)
{
@@ -1681,6 +1683,7 @@ void domain_unpause_except_self(struct domain *d)
domain_unpause(d);
}
+#ifdef CONFIG_DOMCTL
int domain_soft_reset(struct domain *d, bool resuming)
{
struct vcpu *v;
@@ -1718,6 +1721,7 @@ int domain_soft_reset(struct domain *d, bool resuming)
return rc;
}
+#endif /* CONFIG_DOMCTL */
int vcpu_reset(struct vcpu *v)
{
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index cf131c43a1..bfb199be7f 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -3962,6 +3962,7 @@ int gnttab_release_mappings(struct domain *d)
return 0;
}
+#ifdef CONFIG_DOMCTL
void grant_table_warn_active_grants(struct domain *d)
{
struct grant_table *gt = d->grant_table;
@@ -4006,6 +4007,7 @@ void grant_table_warn_active_grants(struct domain *d)
#undef WARN_GRANT_MAX
}
+#endif /* CONFIG_DOMCTL */
void
grant_table_destroy(
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |