32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
|
From: Bruce Rogers <brogers@suse.com>
|
||
|
Date: Thu, 17 Jan 2019 14:40:10 -0700
|
||
|
Subject: xen: Add xen v4.12 based xc_domain_create call
|
||
|
|
||
|
In xen v4.12, the xc_domain_create call parameters changed.
|
||
|
|
||
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
||
|
---
|
||
|
include/hw/xen/xen_common.h | 8 ++++++++
|
||
|
1 file changed, 8 insertions(+)
|
||
|
|
||
|
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
|
||
|
index 93f631e5bf..42b088ae90 100644
|
||
|
--- a/include/hw/xen/xen_common.h
|
||
|
+++ b/include/hw/xen/xen_common.h
|
||
|
@@ -674,7 +674,15 @@ static inline int xen_domain_create(xc_interface *xc, uint32_t ssidref,
|
||
|
xen_domain_handle_t handle, uint32_t flags,
|
||
|
uint32_t *pdomid)
|
||
|
{
|
||
|
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 41200
|
||
|
return xc_domain_create(xc, ssidref, handle, flags, pdomid, NULL);
|
||
|
+#else
|
||
|
+ struct xen_domctl_createdomain create;
|
||
|
+ create.ssidref = ssidref;
|
||
|
+ memcpy(&(create.handle), handle, sizeof(xen_domain_handle_t));
|
||
|
+ create.flags = flags;
|
||
|
+ return xc_domain_create(xc, pdomid, &create);
|
||
|
+#endif
|
||
|
}
|
||
|
#endif
|
||
|
#endif
|