mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
LIBXL_PASSTHROUGH_UNKNOWN (aka "ENABLED" in an earlier uncommitted
version of this code) is doing double duty. We actually need all of
the following to be specifiable:
* "default": enable PT iff we have devices to
pass through specified in the initial config file.
* "enabled" (and fail if the platform doesn't support it).
* "disabled" (and reject future PT hotplug).
* "share_pt"/"sync_pt": enable PT and set a specific PT mode.
Defaulting and error checking should be done in libxl. So, we make
several changes here.
We introduce "enabled", and rename "unknown" to "default".
We move all of the error checking and defaulting code from xl into
libxl. Now, libxl__domain_config_setdefault has all of the necessary
information to get this right. So we can do it all there. Choosing
the specific mode is arch-specific.
We can also arrange to have only one place each which calculates
(i) whether passthrough needs to be enabled because pt devices were
specified (ii) whether pt_share can be used (for each arch).
xl now only has to parse the enum in the same way as it parses all
other enums.
This change fixes a regression from earlier 4.13-pre: until recent
changes, passthrough was only enabled by default if passthrough
devices were specified. We restore this behaviour.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
CC: Andrew Cooper <Andrew.Cooper3@citrix.com>
CC: Paul Durrant <pdurrant@gmail.com>
CC: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Remus provides fault tolerance for virtual machines by sending continuous checkpoints to a backup, which will activate if the target VM fails. See the website at http://wiki.xen.org/wiki/Remus for details. Using Remus with libxl on Xen 4.5 and higher: To enable network buffering, you need libnl 3.2.8 or higher along with the development headers and command line utilities. If your distro does not have the appropriate libnl3 version, you can find the latest source tarball of libnl3 at http://www.carisma.slowglass.com/~tgr/libnl/ Disk replication: VMs protected by Remus need to use DRBD based disk backends. Specifically, you need a compile and install a custom version of DRBD, that is available publicly at https://github.com/rshriram/remus-drbd This code is based on DRBD 8.3.11 and uses a new replication protocol (named protocol D) for asynchronous disk checkpoint replication. A protected VM's DRBD disks on the primary and backup hosts need to be configured to use protocol D as the replication protocol. An example resource configuration file can be found in the aforementioned github repository.