=back
+=item B<vendor_device="VENDOR_DEVICE">
+
+Selects which variant of the QEMU xen-pvdevice should be used for this
+guest. Valid values are:
+
+=over 4
+
+=item B<none>
+
+The xen-pvdevice should be omitted. This is the default.
+
+=item B<xenserver>
+
+The xenserver variant of the xen-pvdevice (device-id=C000) will be
+specified, enabling the use of XenServer PV drivers in the guest.
+
+=back
+
+This parameter only takes effect when device_model_version=qemu-xen.
+See F<docs/misc/pci-device-reservations.txt> for more information.
+
+=back
+
=head2 Device-Model Options
The following options control the selection of the device-model. This
*/
#define LIBXL_HAVE_DOMAIN_NODEAFFINITY 1
+/*
+ * LIBXL_HAVE_BUILDINFO_HVM_VENDOR_DEVICE indicates that the
+ * libxl_vendor_device field is present in the hvm sections of
+ * libxl_domain_build_info. This field tells libxl which
+ * flavour of xen-pvdevice to enable in QEMU.
+ */
+#define LIBXL_HAVE_BUILDINFO_HVM_VENDOR_DEVICE 1
+
/*
* libxl ABI compatibility
*
flexarray_append(dm_args, "-drive");
flexarray_append(dm_args, drive);
}
+
+ switch (b_info->u.hvm.vendor_device) {
+ case LIBXL_VENDOR_DEVICE_XENSERVER:
+ flexarray_append(dm_args, "-device");
+ flexarray_append(dm_args, "xen-pvdevice,device-id=0xc000");
+ break;
+ default:
+ break;
+ }
}
flexarray_append(dm_args, NULL);
return (char **) flexarray_contents(dm_args);
(2, "STD"),
], init_val = 0)
+libxl_vendor_device = Enumeration("vendor_device", [
+ (0, "NONE"),
+ (1, "XENSERVER"),
+ ])
#
# Complex libxl types
#
("soundhw", string),
("xen_platform_pci", libxl_defbool),
("usbdevice_list", libxl_string_list),
+ ("vendor_device", libxl_vendor_device),
])),
("pv", Struct(None, [("kernel", string),
("slack_memkb", MemKB),
exit (1);
}
+
+ if (!xlu_cfg_get_string (config, "vendor_device", &buf, 0)) {
+ libxl_vendor_device d;
+
+ e = libxl_vendor_device_from_string(buf, &d);
+ if (e) {
+ fprintf(stderr,
+ "xl: unknown vendor_device '%s'\n",
+ buf);
+ exit(-ERROR_FAIL);
+ }
+
+ b_info->u.hvm.vendor_device = d;
+ }
}
xlu_cfg_destroy(config);