18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci====================
48c2ecf20Sopenharmony_ciGeneric vm interface
58c2ecf20Sopenharmony_ci====================
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciThe virtual machine "device" also accepts the ioctls KVM_SET_DEVICE_ATTR,
88c2ecf20Sopenharmony_ciKVM_GET_DEVICE_ATTR, and KVM_HAS_DEVICE_ATTR. The interface uses the same
98c2ecf20Sopenharmony_cistruct kvm_device_attr as other devices, but targets VM-wide settings
108c2ecf20Sopenharmony_ciand controls.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciThe groups and attributes per virtual machine, if any, are architecture
138c2ecf20Sopenharmony_cispecific.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci1. GROUP: KVM_S390_VM_MEM_CTRL
168c2ecf20Sopenharmony_ci==============================
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci:Architectures: s390
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci1.1. ATTRIBUTE: KVM_S390_VM_MEM_ENABLE_CMMA
218c2ecf20Sopenharmony_ci-------------------------------------------
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci:Parameters: none
248c2ecf20Sopenharmony_ci:Returns: -EBUSY if a vcpu is already defined, otherwise 0
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciEnables Collaborative Memory Management Assist (CMMA) for the virtual machine.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci1.2. ATTRIBUTE: KVM_S390_VM_MEM_CLR_CMMA
298c2ecf20Sopenharmony_ci----------------------------------------
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci:Parameters: none
328c2ecf20Sopenharmony_ci:Returns: -EINVAL if CMMA was not enabled;
338c2ecf20Sopenharmony_ci	  0 otherwise
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciClear the CMMA status for all guest pages, so any pages the guest marked
368c2ecf20Sopenharmony_cias unused are again used any may not be reclaimed by the host.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci1.3. ATTRIBUTE KVM_S390_VM_MEM_LIMIT_SIZE
398c2ecf20Sopenharmony_ci-----------------------------------------
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci:Parameters: in attr->addr the address for the new limit of guest memory
428c2ecf20Sopenharmony_ci:Returns: -EFAULT if the given address is not accessible;
438c2ecf20Sopenharmony_ci	  -EINVAL if the virtual machine is of type UCONTROL;
448c2ecf20Sopenharmony_ci	  -E2BIG if the given guest memory is to big for that machine;
458c2ecf20Sopenharmony_ci	  -EBUSY if a vcpu is already defined;
468c2ecf20Sopenharmony_ci	  -ENOMEM if not enough memory is available for a new shadow guest mapping;
478c2ecf20Sopenharmony_ci	  0 otherwise.
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ciAllows userspace to query the actual limit and set a new limit for
508c2ecf20Sopenharmony_cithe maximum guest memory size. The limit will be rounded up to
518c2ecf20Sopenharmony_ci2048 MB, 4096 GB, 8192 TB respectively, as this limit is governed by
528c2ecf20Sopenharmony_cithe number of page table levels. In the case that there is no limit we will set
538c2ecf20Sopenharmony_cithe limit to KVM_S390_NO_MEM_LIMIT (U64_MAX).
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci2. GROUP: KVM_S390_VM_CPU_MODEL
568c2ecf20Sopenharmony_ci===============================
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci:Architectures: s390
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci2.1. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE (r/o)
618c2ecf20Sopenharmony_ci---------------------------------------------
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ciAllows user space to retrieve machine and kvm specific cpu related information::
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci  struct kvm_s390_vm_cpu_machine {
668c2ecf20Sopenharmony_ci       __u64 cpuid;           # CPUID of host
678c2ecf20Sopenharmony_ci       __u32 ibc;             # IBC level range offered by host
688c2ecf20Sopenharmony_ci       __u8  pad[4];
698c2ecf20Sopenharmony_ci       __u64 fac_mask[256];   # set of cpu facilities enabled by KVM
708c2ecf20Sopenharmony_ci       __u64 fac_list[256];   # set of cpu facilities offered by host
718c2ecf20Sopenharmony_ci  }
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci:Parameters: address of buffer to store the machine related cpu data
748c2ecf20Sopenharmony_ci	     of type struct kvm_s390_vm_cpu_machine*
758c2ecf20Sopenharmony_ci:Returns:   -EFAULT if the given address is not accessible from kernel space;
768c2ecf20Sopenharmony_ci	    -ENOMEM if not enough memory is available to process the ioctl;
778c2ecf20Sopenharmony_ci	    0 in case of success.
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci2.2. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR (r/w)
808c2ecf20Sopenharmony_ci===============================================
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ciAllows user space to retrieve or request to change cpu related information for a vcpu::
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci  struct kvm_s390_vm_cpu_processor {
858c2ecf20Sopenharmony_ci       __u64 cpuid;           # CPUID currently (to be) used by this vcpu
868c2ecf20Sopenharmony_ci       __u16 ibc;             # IBC level currently (to be) used by this vcpu
878c2ecf20Sopenharmony_ci       __u8  pad[6];
888c2ecf20Sopenharmony_ci       __u64 fac_list[256];   # set of cpu facilities currently (to be) used
898c2ecf20Sopenharmony_ci			      # by this vcpu
908c2ecf20Sopenharmony_ci  }
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ciKVM does not enforce or limit the cpu model data in any form. Take the information
938c2ecf20Sopenharmony_ciretrieved by means of KVM_S390_VM_CPU_MACHINE as hint for reasonable configuration
948c2ecf20Sopenharmony_cisetups. Instruction interceptions triggered by additionally set facility bits that
958c2ecf20Sopenharmony_ciare not handled by KVM need to by imlemented in the VM driver code.
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci:Parameters: address of buffer to store/set the processor related cpu
988c2ecf20Sopenharmony_ci	     data of type struct kvm_s390_vm_cpu_processor*.
998c2ecf20Sopenharmony_ci:Returns:  -EBUSY in case 1 or more vcpus are already activated (only in write case);
1008c2ecf20Sopenharmony_ci	   -EFAULT if the given address is not accessible from kernel space;
1018c2ecf20Sopenharmony_ci	   -ENOMEM if not enough memory is available to process the ioctl;
1028c2ecf20Sopenharmony_ci	   0 in case of success.
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci.. _KVM_S390_VM_CPU_MACHINE_FEAT:
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci2.3. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE_FEAT (r/o)
1078c2ecf20Sopenharmony_ci--------------------------------------------------
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ciAllows user space to retrieve available cpu features. A feature is available if
1108c2ecf20Sopenharmony_ciprovided by the hardware and supported by kvm. In theory, cpu features could
1118c2ecf20Sopenharmony_cieven be completely emulated by kvm.
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci::
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci  struct kvm_s390_vm_cpu_feat {
1168c2ecf20Sopenharmony_ci	__u64 feat[16]; # Bitmap (1 = feature available), MSB 0 bit numbering
1178c2ecf20Sopenharmony_ci  };
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci:Parameters: address of a buffer to load the feature list from.
1208c2ecf20Sopenharmony_ci:Returns:  -EFAULT if the given address is not accessible from kernel space;
1218c2ecf20Sopenharmony_ci	   0 in case of success.
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci2.4. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR_FEAT (r/w)
1248c2ecf20Sopenharmony_ci----------------------------------------------------
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_ciAllows user space to retrieve or change enabled cpu features for all VCPUs of a
1278c2ecf20Sopenharmony_ciVM. Features that are not available cannot be enabled.
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ciSee :ref:`KVM_S390_VM_CPU_MACHINE_FEAT` for
1308c2ecf20Sopenharmony_cia description of the parameter struct.
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ci:Parameters: address of a buffer to store/load the feature list from.
1338c2ecf20Sopenharmony_ci:Returns:   -EFAULT if the given address is not accessible from kernel space;
1348c2ecf20Sopenharmony_ci	    -EINVAL if a cpu feature that is not available is to be enabled;
1358c2ecf20Sopenharmony_ci	    -EBUSY if at least one VCPU has already been defined;
1368c2ecf20Sopenharmony_ci	    0 in case of success.
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_ci.. _KVM_S390_VM_CPU_MACHINE_SUBFUNC:
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ci2.5. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE_SUBFUNC (r/o)
1418c2ecf20Sopenharmony_ci-----------------------------------------------------
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_ciAllows user space to retrieve available cpu subfunctions without any filtering
1448c2ecf20Sopenharmony_cidone by a set IBC. These subfunctions are indicated to the guest VCPU via
1458c2ecf20Sopenharmony_ciquery or "test bit" subfunctions and used e.g. by cpacf functions, plo and ptff.
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ciA subfunction block is only valid if KVM_S390_VM_CPU_MACHINE contains the
1488c2ecf20Sopenharmony_ciSTFL(E) bit introducing the affected instruction. If the affected instruction
1498c2ecf20Sopenharmony_ciindicates subfunctions via a "query subfunction", the response block is
1508c2ecf20Sopenharmony_cicontained in the returned struct. If the affected instruction
1518c2ecf20Sopenharmony_ciindicates subfunctions via a "test bit" mechanism, the subfunction codes are
1528c2ecf20Sopenharmony_cicontained in the returned struct in MSB 0 bit numbering.
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ci::
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ci  struct kvm_s390_vm_cpu_subfunc {
1578c2ecf20Sopenharmony_ci       u8 plo[32];           # always valid (ESA/390 feature)
1588c2ecf20Sopenharmony_ci       u8 ptff[16];          # valid with TOD-clock steering
1598c2ecf20Sopenharmony_ci       u8 kmac[16];          # valid with Message-Security-Assist
1608c2ecf20Sopenharmony_ci       u8 kmc[16];           # valid with Message-Security-Assist
1618c2ecf20Sopenharmony_ci       u8 km[16];            # valid with Message-Security-Assist
1628c2ecf20Sopenharmony_ci       u8 kimd[16];          # valid with Message-Security-Assist
1638c2ecf20Sopenharmony_ci       u8 klmd[16];          # valid with Message-Security-Assist
1648c2ecf20Sopenharmony_ci       u8 pckmo[16];         # valid with Message-Security-Assist-Extension 3
1658c2ecf20Sopenharmony_ci       u8 kmctr[16];         # valid with Message-Security-Assist-Extension 4
1668c2ecf20Sopenharmony_ci       u8 kmf[16];           # valid with Message-Security-Assist-Extension 4
1678c2ecf20Sopenharmony_ci       u8 kmo[16];           # valid with Message-Security-Assist-Extension 4
1688c2ecf20Sopenharmony_ci       u8 pcc[16];           # valid with Message-Security-Assist-Extension 4
1698c2ecf20Sopenharmony_ci       u8 ppno[16];          # valid with Message-Security-Assist-Extension 5
1708c2ecf20Sopenharmony_ci       u8 kma[16];           # valid with Message-Security-Assist-Extension 8
1718c2ecf20Sopenharmony_ci       u8 kdsa[16];          # valid with Message-Security-Assist-Extension 9
1728c2ecf20Sopenharmony_ci       u8 reserved[1792];    # reserved for future instructions
1738c2ecf20Sopenharmony_ci  };
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci:Parameters: address of a buffer to load the subfunction blocks from.
1768c2ecf20Sopenharmony_ci:Returns:   -EFAULT if the given address is not accessible from kernel space;
1778c2ecf20Sopenharmony_ci	    0 in case of success.
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ci2.6. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR_SUBFUNC (r/w)
1808c2ecf20Sopenharmony_ci-------------------------------------------------------
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_ciAllows user space to retrieve or change cpu subfunctions to be indicated for
1838c2ecf20Sopenharmony_ciall VCPUs of a VM. This attribute will only be available if kernel and
1848c2ecf20Sopenharmony_cihardware support are in place.
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ciThe kernel uses the configured subfunction blocks for indication to
1878c2ecf20Sopenharmony_cithe guest. A subfunction block will only be used if the associated STFL(E) bit
1888c2ecf20Sopenharmony_cihas not been disabled by user space (so the instruction to be queried is
1898c2ecf20Sopenharmony_ciactually available for the guest).
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_ciAs long as no data has been written, a read will fail. The IBC will be used
1928c2ecf20Sopenharmony_cito determine available subfunctions in this case, this will guarantee backward
1938c2ecf20Sopenharmony_cicompatibility.
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ciSee :ref:`KVM_S390_VM_CPU_MACHINE_SUBFUNC` for a
1968c2ecf20Sopenharmony_cidescription of the parameter struct.
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ci:Parameters: address of a buffer to store/load the subfunction blocks from.
1998c2ecf20Sopenharmony_ci:Returns:   -EFAULT if the given address is not accessible from kernel space;
2008c2ecf20Sopenharmony_ci	    -EINVAL when reading, if there was no write yet;
2018c2ecf20Sopenharmony_ci	    -EBUSY if at least one VCPU has already been defined;
2028c2ecf20Sopenharmony_ci	    0 in case of success.
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_ci3. GROUP: KVM_S390_VM_TOD
2058c2ecf20Sopenharmony_ci=========================
2068c2ecf20Sopenharmony_ci
2078c2ecf20Sopenharmony_ci:Architectures: s390
2088c2ecf20Sopenharmony_ci
2098c2ecf20Sopenharmony_ci3.1. ATTRIBUTE: KVM_S390_VM_TOD_HIGH
2108c2ecf20Sopenharmony_ci------------------------------------
2118c2ecf20Sopenharmony_ci
2128c2ecf20Sopenharmony_ciAllows user space to set/get the TOD clock extension (u8) (superseded by
2138c2ecf20Sopenharmony_ciKVM_S390_VM_TOD_EXT).
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_ci:Parameters: address of a buffer in user space to store the data (u8) to
2168c2ecf20Sopenharmony_ci:Returns:   -EFAULT if the given address is not accessible from kernel space;
2178c2ecf20Sopenharmony_ci	    -EINVAL if setting the TOD clock extension to != 0 is not supported
2188c2ecf20Sopenharmony_ci	    -EOPNOTSUPP for a PV guest (TOD managed by the ultravisor)
2198c2ecf20Sopenharmony_ci
2208c2ecf20Sopenharmony_ci3.2. ATTRIBUTE: KVM_S390_VM_TOD_LOW
2218c2ecf20Sopenharmony_ci-----------------------------------
2228c2ecf20Sopenharmony_ci
2238c2ecf20Sopenharmony_ciAllows user space to set/get bits 0-63 of the TOD clock register as defined in
2248c2ecf20Sopenharmony_cithe POP (u64).
2258c2ecf20Sopenharmony_ci
2268c2ecf20Sopenharmony_ci:Parameters: address of a buffer in user space to store the data (u64) to
2278c2ecf20Sopenharmony_ci:Returns:    -EFAULT if the given address is not accessible from kernel space
2288c2ecf20Sopenharmony_ci	     -EOPNOTSUPP for a PV guest (TOD managed by the ultravisor)
2298c2ecf20Sopenharmony_ci
2308c2ecf20Sopenharmony_ci3.3. ATTRIBUTE: KVM_S390_VM_TOD_EXT
2318c2ecf20Sopenharmony_ci-----------------------------------
2328c2ecf20Sopenharmony_ci
2338c2ecf20Sopenharmony_ciAllows user space to set/get bits 0-63 of the TOD clock register as defined in
2348c2ecf20Sopenharmony_cithe POP (u64). If the guest CPU model supports the TOD clock extension (u8), it
2358c2ecf20Sopenharmony_cialso allows user space to get/set it. If the guest CPU model does not support
2368c2ecf20Sopenharmony_ciit, it is stored as 0 and not allowed to be set to a value != 0.
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_ci:Parameters: address of a buffer in user space to store the data
2398c2ecf20Sopenharmony_ci	     (kvm_s390_vm_tod_clock) to
2408c2ecf20Sopenharmony_ci:Returns:   -EFAULT if the given address is not accessible from kernel space;
2418c2ecf20Sopenharmony_ci	    -EINVAL if setting the TOD clock extension to != 0 is not supported
2428c2ecf20Sopenharmony_ci	    -EOPNOTSUPP for a PV guest (TOD managed by the ultravisor)
2438c2ecf20Sopenharmony_ci
2448c2ecf20Sopenharmony_ci4. GROUP: KVM_S390_VM_CRYPTO
2458c2ecf20Sopenharmony_ci============================
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_ci:Architectures: s390
2488c2ecf20Sopenharmony_ci
2498c2ecf20Sopenharmony_ci4.1. ATTRIBUTE: KVM_S390_VM_CRYPTO_ENABLE_AES_KW (w/o)
2508c2ecf20Sopenharmony_ci------------------------------------------------------
2518c2ecf20Sopenharmony_ci
2528c2ecf20Sopenharmony_ciAllows user space to enable aes key wrapping, including generating a new
2538c2ecf20Sopenharmony_ciwrapping key.
2548c2ecf20Sopenharmony_ci
2558c2ecf20Sopenharmony_ci:Parameters: none
2568c2ecf20Sopenharmony_ci:Returns:    0
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_ci4.2. ATTRIBUTE: KVM_S390_VM_CRYPTO_ENABLE_DEA_KW (w/o)
2598c2ecf20Sopenharmony_ci------------------------------------------------------
2608c2ecf20Sopenharmony_ci
2618c2ecf20Sopenharmony_ciAllows user space to enable dea key wrapping, including generating a new
2628c2ecf20Sopenharmony_ciwrapping key.
2638c2ecf20Sopenharmony_ci
2648c2ecf20Sopenharmony_ci:Parameters: none
2658c2ecf20Sopenharmony_ci:Returns:    0
2668c2ecf20Sopenharmony_ci
2678c2ecf20Sopenharmony_ci4.3. ATTRIBUTE: KVM_S390_VM_CRYPTO_DISABLE_AES_KW (w/o)
2688c2ecf20Sopenharmony_ci-------------------------------------------------------
2698c2ecf20Sopenharmony_ci
2708c2ecf20Sopenharmony_ciAllows user space to disable aes key wrapping, clearing the wrapping key.
2718c2ecf20Sopenharmony_ci
2728c2ecf20Sopenharmony_ci:Parameters: none
2738c2ecf20Sopenharmony_ci:Returns:    0
2748c2ecf20Sopenharmony_ci
2758c2ecf20Sopenharmony_ci4.4. ATTRIBUTE: KVM_S390_VM_CRYPTO_DISABLE_DEA_KW (w/o)
2768c2ecf20Sopenharmony_ci-------------------------------------------------------
2778c2ecf20Sopenharmony_ci
2788c2ecf20Sopenharmony_ciAllows user space to disable dea key wrapping, clearing the wrapping key.
2798c2ecf20Sopenharmony_ci
2808c2ecf20Sopenharmony_ci:Parameters: none
2818c2ecf20Sopenharmony_ci:Returns:    0
2828c2ecf20Sopenharmony_ci
2838c2ecf20Sopenharmony_ci5. GROUP: KVM_S390_VM_MIGRATION
2848c2ecf20Sopenharmony_ci===============================
2858c2ecf20Sopenharmony_ci
2868c2ecf20Sopenharmony_ci:Architectures: s390
2878c2ecf20Sopenharmony_ci
2888c2ecf20Sopenharmony_ci5.1. ATTRIBUTE: KVM_S390_VM_MIGRATION_STOP (w/o)
2898c2ecf20Sopenharmony_ci------------------------------------------------
2908c2ecf20Sopenharmony_ci
2918c2ecf20Sopenharmony_ciAllows userspace to stop migration mode, needed for PGSTE migration.
2928c2ecf20Sopenharmony_ciSetting this attribute when migration mode is not active will have no
2938c2ecf20Sopenharmony_cieffects.
2948c2ecf20Sopenharmony_ci
2958c2ecf20Sopenharmony_ci:Parameters: none
2968c2ecf20Sopenharmony_ci:Returns:    0
2978c2ecf20Sopenharmony_ci
2988c2ecf20Sopenharmony_ci5.2. ATTRIBUTE: KVM_S390_VM_MIGRATION_START (w/o)
2998c2ecf20Sopenharmony_ci-------------------------------------------------
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_ciAllows userspace to start migration mode, needed for PGSTE migration.
3028c2ecf20Sopenharmony_ciSetting this attribute when migration mode is already active will have
3038c2ecf20Sopenharmony_cino effects.
3048c2ecf20Sopenharmony_ci
3058c2ecf20Sopenharmony_ciDirty tracking must be enabled on all memslots, else -EINVAL is returned. When
3068c2ecf20Sopenharmony_cidirty tracking is disabled on any memslot, migration mode is automatically
3078c2ecf20Sopenharmony_cistopped.
3088c2ecf20Sopenharmony_ci
3098c2ecf20Sopenharmony_ci:Parameters: none
3108c2ecf20Sopenharmony_ci:Returns:   -ENOMEM if there is not enough free memory to start migration mode;
3118c2ecf20Sopenharmony_ci	    -EINVAL if the state of the VM is invalid (e.g. no memory defined);
3128c2ecf20Sopenharmony_ci	    0 in case of success.
3138c2ecf20Sopenharmony_ci
3148c2ecf20Sopenharmony_ci5.3. ATTRIBUTE: KVM_S390_VM_MIGRATION_STATUS (r/o)
3158c2ecf20Sopenharmony_ci--------------------------------------------------
3168c2ecf20Sopenharmony_ci
3178c2ecf20Sopenharmony_ciAllows userspace to query the status of migration mode.
3188c2ecf20Sopenharmony_ci
3198c2ecf20Sopenharmony_ci:Parameters: address of a buffer in user space to store the data (u64) to;
3208c2ecf20Sopenharmony_ci	     the data itself is either 0 if migration mode is disabled or 1
3218c2ecf20Sopenharmony_ci	     if it is enabled
3228c2ecf20Sopenharmony_ci:Returns:   -EFAULT if the given address is not accessible from kernel space;
3238c2ecf20Sopenharmony_ci	    0 in case of success.
324