@@ -2359,6 +2359,8 @@ Turns on or off the exposure of VMware cpuid. The number is
VMware's hardware version number, where 0 is off. A number >= 7
is needed to enable exposure of VMware cpuid.
+If not zero it changes the default for vmware_port to on.
+
The hardware version number (vmware_hwver) comes from VMware config files.
=over 4
@@ -2370,6 +2372,19 @@ For vssd:VirtualSystemType == vmx-07, vmware_hwver = 7.
=back
+=item B<vmware_port=BOOLEAN>
+
+Turns on or off the exposure of VMware port. This is known as
+vmport in QEMU. Also called VMware Backdoor I/O Port. Not all
+defined VMware backdoor commands are implemented. All of the
+ones that Linux kernel uses are defined.
+
+Defaults to enabled if vmware_hwver is non-zero (i.e. enabled)
+otherwise defaults to disabled.
+
+Note: vmware_port and nestedhvm cannot be specified at the
+same time.
+
=back
=head3 Emulated VGA Graphics Device
@@ -439,6 +439,11 @@
#define LIBXL_HAVE_CREATEINFO_PASSTHROUGH 1
/*
+ * libxl has VMware changes.
+ */
+#define LIBXL_HAVE_VMWARE 1
+
+/*
* libxl ABI compatibility
*
* The only guarantee which libxl makes regarding ABI compatibility
@@ -51,6 +51,7 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
libxl_defbool_setdefault(&c_info->oos, true);
}
+ libxl_defbool_setdefault(&c_info->vmware_port, c_info->vmware_hwver != 0);
libxl_defbool_setdefault(&c_info->run_hotplug_scripts, true);
libxl_defbool_setdefault(&c_info->driver_domain, false);
@@ -1185,6 +1186,15 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
goto error_out;
}
+ if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM &&
+ libxl_defbool_val(d_config->b_info.nested_hvm) &&
+ libxl_defbool_val(d_config->c_info.vmware_port)) {
+ ret = ERROR_INVAL;
+ LOGD(ERROR, domid,
+ "vmware_port and nestedhvm cannot be enabled simultaneously\n");
+ goto error_out;
+ }
+
if (d_config->c_info.type != LIBXL_DOMAIN_TYPE_PV &&
(libxl_defbool_val(d_config->b_info.nested_hvm) &&
((d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM &&
@@ -421,6 +421,7 @@ libxl_domain_create_info = Struct("domain_create_info",[
("passthrough", libxl_passthrough),
("xend_suspend_evtchn_compat",libxl_defbool),
("vmware_hwver", uint32),
+ ("vmware_port", libxl_defbool),
], dir=DIR_IN)
libxl_domain_restore_params = Struct("domain_restore_params", [
@@ -22,6 +22,8 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
}
config->arch.vmware_hwver = d_config->c_info.vmware_hwver;
+ if (libxl_defbool_val(d_config->c_info.vmware_port))
+ config->arch.emulation_flags |= XEN_X86_EMU_VMWARE_PORT;
return 0;
}
@@ -1321,6 +1321,7 @@ void parse_config_data(const char *config_source,
}
xlu_cfg_get_defbool(config, "oos", &c_info->oos, 0);
+ xlu_cfg_get_defbool(config, "vmware_port", &c_info->vmware_port, 0);
if (!xlu_cfg_get_string (config, "pool", &buf, 0))
xlu_cfg_replace_string(config, "pool", &c_info->pool_name, 0);