*/
#define LIBXL_HAVE_SIGCHLD_SHARING 1
+/*
+ * LIBXL_HAVE_NO_SUSPEND_RESUME
+ *
+ * Is this is defined then the platform has no support for saving,
+ * restoring or migrating a domain. In this case the related functions
+ * should be expected to return failure. That is:
+ * - libxl_domain_suspend
+ * - libxl_domain_resume
+ * - libxl_domain_remus_start
+ */
+#if defined(__arm__) || defined(__aarch64__)
+#define LIBXL_HAVE_NO_SUSPEND_RESUME 1
+#endif
+
/* Functions annotated with LIBXL_EXTERNAL_CALLERS_ONLY may not be
* called from within libxl itself. Callers outside libxl, who
* do not #include libxl_internal.h, are fine. */
int main_pciassignable_add(int argc, char **argv);
int main_pciassignable_remove(int argc, char **argv);
int main_pciassignable_list(int argc, char **argv);
+#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
int main_restore(int argc, char **argv);
int main_migrate_receive(int argc, char **argv);
int main_save(int argc, char **argv);
int main_migrate(int argc, char **argv);
+#endif
int main_dump_core(int argc, char **argv);
int main_pause(int argc, char **argv);
int main_unpause(int argc, char **argv);
int main_getenforce(int argc, char **argv);
int main_setenforce(int argc, char **argv);
int main_loadpolicy(int argc, char **argv);
+#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
int main_remus(int argc, char **argv);
+#endif
int main_devd(int argc, char **argv);
void help(const char *command);
libxl_vminfo_list_free(info, nb_vm);
}
+static void core_dump_domain(uint32_t domid, const char *filename)
+{
+ int rc;
+
+ rc=libxl_domain_core_dump(ctx, domid, filename, NULL);
+ if (rc) { fprintf(stderr,"core dump failed (rc=%d)\n",rc);exit(-1); }
+}
+
+#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
static void save_domain_core_begin(uint32_t domid,
const char *override_config_file,
uint8_t **config_data_r,
exit(-ERROR_BADFAIL);
}
-static void core_dump_domain(uint32_t domid, const char *filename)
-{
- int rc;
-
- rc=libxl_domain_core_dump(ctx, domid, filename, NULL);
- if (rc) { fprintf(stderr,"core dump failed (rc=%d)\n",rc);exit(-1); }
-}
-
static void migrate_receive(int debug, int daemonize, int monitor,
int send_fd, int recv_fd, int remus)
{
migrate_domain(domid, rune, debug, config_filename);
return 0;
}
+#endif
int main_dump_core(int argc, char **argv)
{
return ret;
}
+#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
int main_remus(int argc, char **argv)
{
uint32_t domid;
close(send_fd);
return -ERROR_FAIL;
}
+#endif
int main_devd(int argc, char **argv)
{
" -autopass\n"
"--vncviewer-autopass (consistency alias for --autopass)"
},
+#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
{ "save",
&main_save, 0, 1,
"Save a domain state to restore later",
" of the domain.\n"
"--debug Print huge (!) amount of debug during the migration process."
},
- { "dump-core",
- &main_dump_core, 0, 1,
- "Core dump a domain",
- "<Domain> <filename>"
- },
{ "restore",
&main_restore, 0, 1,
"Restore a domain from a saved state",
"Restore a domain from a saved state",
"- for internal use only",
},
+#endif
+ { "dump-core",
+ &main_dump_core, 0, 1,
+ "Core dump a domain",
+ "<Domain> <filename>"
+ },
{ "cd-insert",
&main_cd_insert, 1, 1,
"Insert a cdrom into a guest's cd drive",
"Loads a new policy int the Flask Xen security module",
"<policy file>",
},
+#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME
{ "remus",
&main_remus, 0, 1,
"Enable Remus HA for domain",
" ssh <host> xl migrate-receive -r [-e]\n"
"-e Do not wait in the background (on <host>) for the death\n"
" of the domain."
-
},
+#endif
{ "devd",
&main_devd, 0, 1,
"Daemon that listens for devices and launches backends",