*/
#define LIBXL_HAVE_P9S 1
+/*
+ * LIBXL_HAVE_BUILDINFO_ARM_VUART indicates that the toolstack supports virtual UART
+ * for ARM.
+ */
+#define LIBXL_HAVE_BUILDINFO_ARM_VUART 1
+
/*
* LIBXL_HAVE_BUILDINFO_GRANT_LIMITS indicates that libxl_domain_build_info
* has the max_grant_frames and max_maptrack_frames fields.
case LIBXL_CONSOLE_TYPE_SERIAL:
cons_type_s = "serial";
break;
+ case LIBXL_CONSOLE_TYPE_VUART:
+ cons_type_s = "vuart";
+ break;
default:
goto out;
}
if (xc_dom_translated(dom)) {
state->console_mfn = dom->console_pfn;
state->store_mfn = dom->xenstore_pfn;
+ state->vuart_gfn = dom->vuart_gfn;
} else {
state->console_mfn = xc_dom_p2m(dom, dom->console_pfn);
state->store_mfn = xc_dom_p2m(dom, dom->xenstore_pfn);
uint32_t num_vmemranges;
xc_domain_configuration_t config;
+
+ xen_pfn_t vuart_gfn;
+ evtchn_port_t vuart_port;
} libxl__domain_build_state;
_hidden int libxl__build_pre(libxl__gc *gc, uint32_t domid,
(0, "UNKNOWN"),
(1, "SERIAL"),
(2, "PV"),
+ (3, "VUART"),
])
libxl_disk_format = Enumeration("disk_format", [
(2, "COLO"),
])
+libxl_vuart_type = Enumeration("vuart_type", [
+ (0, "unknown"),
+ (1, "sbsa_uart"),
+ ])
+
#
# Complex libxl types
#
("arch_arm", Struct(None, [("gic_version", libxl_gic_version),
+ ("vuart", libxl_vuart_type),
])),
# Alternate p2m is not bound to any architecture or guest type, as it is
# supported by x86 HVM and ARM support is planned.
&main_console, 0, 0,
"Attach to domain's console",
"[options] <Domain>\n"
- "-t <type> console type, pv or serial\n"
+ "-t <type> console type, pv , serial or vuart\n"
"-n <number> console number"
},
{ "vncviewer",
uint32_t domid;
int opt = 0, num = 0;
libxl_console_type type = 0;
+ char *console_names = "pv, serial, vuart";
SWITCH_FOREACH_OPT(opt, "n:t:", NULL, "console", 1) {
case 't':
type = LIBXL_CONSOLE_TYPE_PV;
else if (!strcmp(optarg, "serial"))
type = LIBXL_CONSOLE_TYPE_SERIAL;
+ else if (!strcmp(optarg, "vuart"))
+ type = LIBXL_CONSOLE_TYPE_VUART;
else {
- fprintf(stderr, "console type supported are: pv, serial\n");
+ fprintf(stderr, "console type supported are: %s\n", console_names);
return EXIT_FAILURE;
}
break;
if (!xlu_cfg_get_long (config, "maxvcpus", &l, 0))
b_info->max_vcpus = l;
+ if (!xlu_cfg_get_string(config, "vuart", &buf, 0)) {
+ if (libxl_vuart_type_from_string(buf, &b_info->arch_arm.vuart)) {
+ fprintf(stderr, "ERROR: invalid value \"%s\" for \"vuart\"\n",
+ buf);
+ exit(1);
+ }
+ }
+
parse_vnuma_config(config, b_info);
/* Set max_memkb to target_memkb and max_vcpus to avail_vcpus if