*/
#define LIBXL_HAVE_CPUPOOL_NAME 1
+/*
+ * LIBXL_HAVE_BUILDINFO_SERIAL_LIST
+ *
+ * If this is defined, then the libxl_domain_build_info structure will
+ * contain hvm.serial_list, a libxl_string_list type that contains
+ * a list of serial ports to specify on the qemu command-line.
+ *
+ * If it is set, callers may use either hvm.serial or
+ * hvm.serial_list, but not both; if both are set, libxl will
+ * throw an error.
+ *
+ * If this is not defined, callers can only use hvm.serial. Note
+ * that this means only one serial port can be added at domain build time.
+ */
+#define LIBXL_HAVE_BUILDINFO_SERIAL_LIST 1
+
typedef uint8_t libxl_mac[6];
#define LIBXL_MAC_FMT "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"
#define LIBXL_MAC_FMTLEN ((2*6)+5) /* 6 hex bytes plus 5 colons */
int nr_set_cpus = 0;
char *s;
- if (b_info->u.hvm.serial) {
- flexarray_vappend(dm_args, "-serial", b_info->u.hvm.serial, NULL);
+ if (b_info->u.hvm.serial || b_info->u.hvm.serial_list) {
+ if ( b_info->u.hvm.serial && b_info->u.hvm.serial_list )
+ {
+ LOG(ERROR, "Both serial and serial_list set");
+ return NULL;
+ }
+ if (b_info->u.hvm.serial) {
+ flexarray_vappend(dm_args,
+ "-serial", b_info->u.hvm.serial, NULL);
+ } else if (b_info->u.hvm.serial_list) {
+ char **p;
+ for (p = b_info->u.hvm.serial_list;
+ *p;
+ p++) {
+ flexarray_vappend(dm_args,
+ "-serial",
+ *p, NULL);
+ }
+ }
}
if (libxl_defbool_val(b_info->u.hvm.nographic) && (!sdl && !vnc)) {
if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) {
int ioemu_nics = 0;
- if (b_info->u.hvm.serial) {
- flexarray_vappend(dm_args, "-serial", b_info->u.hvm.serial, NULL);
+ if (b_info->u.hvm.serial || b_info->u.hvm.serial_list) {
+ if ( b_info->u.hvm.serial && b_info->u.hvm.serial_list )
+ {
+ LOG(ERROR, "Both serial and serial_list set");
+ return NULL;
+ }
+ if (b_info->u.hvm.serial) {
+ flexarray_vappend(dm_args,
+ "-serial", b_info->u.hvm.serial, NULL);
+ } else if (b_info->u.hvm.serial_list) {
+ char **p;
+ for (p = b_info->u.hvm.serial_list;
+ *p;
+ p++) {
+ flexarray_vappend(dm_args,
+ "-serial",
+ *p, NULL);
+ }
+ }
}
if (libxl_defbool_val(b_info->u.hvm.nographic) && (!sdl && !vnc)) {
("vendor_device", libxl_vendor_device),
# See libxl_ms_vm_genid_generate()
("ms_vm_genid", libxl_ms_vm_genid),
+ ("serial_list", libxl_string_list),
])),
("pv", Struct(None, [("kernel", string),
("slack_memkb", MemKB),