sphinx.addnodesdocument)}( rawsource children](translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget'/translations/zh_CN/virt/kvm/devices/vmmodnameN classnameNrefexplicitutagnamehhhubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/virt/kvm/devices/vmmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/virt/kvm/devices/vmmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/virt/kvm/devices/vmmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/virt/kvm/devices/vmmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/virt/kvm/devices/vmmodnameN classnameNrefexplicituh1hhhubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/virt/kvm/devices/vm.rsthKubhsection)}(hhh](htitle)}(hGeneric vm interfaceh]hGeneric vm interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hThe virtual machine "device" also accepts the ioctls KVM_SET_DEVICE_ATTR, KVM_GET_DEVICE_ATTR, and KVM_HAS_DEVICE_ATTR. The interface uses the same struct kvm_device_attr as other devices, but targets VM-wide settings and controls.h]hThe virtual machine “device” also accepts the ioctls KVM_SET_DEVICE_ATTR, KVM_GET_DEVICE_ATTR, and KVM_HAS_DEVICE_ATTR. The interface uses the same struct kvm_device_attr as other devices, but targets VM-wide settings and controls.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hQThe groups and attributes per virtual machine, if any, are architecture specific.h]hQThe groups and attributes per virtual machine, if any, are architecture specific.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h1. GROUP: KVM_S390_VM_MEM_CTRLh]h1. GROUP: KVM_S390_VM_MEM_CTRL}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhhhK ubh field_body)}(hs390 h]h)}(hs390h]hs390}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h+1.1. ATTRIBUTE: KVM_S390_VM_MEM_ENABLE_CMMAh]h+1.1. ATTRIBUTE: KVM_S390_VM_MEM_ENABLE_CMMA}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8 hhhhhKubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjL hhhK ubj )}(hnoneh]h)}(hj_ h]hnone}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj] ubah}(h]h ]h"]h$]h&]uh1j hjL ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjI hhubh)}(hhh](j )}(hReturnsh]hReturns}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjz hhhK ubj )}(h1-EBUSY if a vcpu is already defined, otherwise 0 h]h)}(h0-EBUSY if a vcpu is already defined, otherwise 0h]h0-EBUSY if a vcpu is already defined, otherwise 0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hjz ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjI hhubeh}(h]h ]h"]h$]h&]uh1hhj8 hhhhhKubh)}(hNEnables Collaborative Memory Management Assist (CMMA) for the virtual machine.h]hNEnables Collaborative Memory Management Assist (CMMA) for the virtual machine.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8 hhubeh}(h]%attribute-kvm-s390-vm-mem-enable-cmmaah ]h"]+1.1. attribute: kvm_s390_vm_mem_enable_cmmaah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h(1.2. ATTRIBUTE: KVM_S390_VM_MEM_CLR_CMMAh]h(1.2. ATTRIBUTE: KVM_S390_VM_MEM_CLR_CMMA}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(hnoneh]h)}(hj h]hnone}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hhh](j )}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(h--EINVAL if CMMA was not enabled; 0 otherwise h]h)}(h,-EINVAL if CMMA was not enabled; 0 otherwiseh]h,-EINVAL if CMMA was not enabled; 0 otherwise}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhK hj hhubeh}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hClear the CMMA status for all guest pages, so any pages the guest marked as unused are again used any may not be reclaimed by the host.h]hClear the CMMA status for all guest pages, so any pages the guest marked as unused are again used any may not be reclaimed by the host.}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hj hhubeh}(h]"attribute-kvm-s390-vm-mem-clr-cmmaah ]h"](1.2. attribute: kvm_s390_vm_mem_clr_cmmaah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h)1.3. ATTRIBUTE KVM_S390_VM_MEM_LIMIT_SIZEh]h)1.3. ATTRIBUTE KVM_S390_VM_MEM_LIMIT_SIZE}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR hhhhhK'ubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjf hhhK ubj )}(h;in attr->addr the address for the new limit of guest memoryh]h)}(hjy h]h;in attr->addr the address for the new limit of guest memory}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjw ubah}(h]h ]h"]h$]h&]uh1j hjf ubeh}(h]h ]h"]h$]h&]uh1hhhhK)hjc hhubh)}(hhh](j )}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(hX -EFAULT if the given address is not accessible; -EINVAL if the virtual machine is of type UCONTROL; -E2BIG if the given guest memory is to big for that machine; -EBUSY if a vcpu is already defined; -ENOMEM if not enough memory is available for a new shadow guest mapping; 0 otherwise. h]h)}(hX -EFAULT if the given address is not accessible; -EINVAL if the virtual machine is of type UCONTROL; -E2BIG if the given guest memory is to big for that machine; -EBUSY if a vcpu is already defined; -ENOMEM if not enough memory is available for a new shadow guest mapping; 0 otherwise.h]hX -EFAULT if the given address is not accessible; -EINVAL if the virtual machine is of type UCONTROL; -E2BIG if the given guest memory is to big for that machine; -EBUSY if a vcpu is already defined; -ENOMEM if not enough memory is available for a new shadow guest mapping; 0 otherwise.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhK*hjc hhubeh}(h]h ]h"]h$]h&]uh1hhjR hhhhhK)ubh)}(hXD Allows userspace to query the actual limit and set a new limit for the maximum guest memory size. The limit will be rounded up to 2048 MB, 4096 GB, 8192 TB respectively, as this limit is governed by the number of page table levels. In the case that there is no limit we will set the limit to KVM_S390_NO_MEM_LIMIT (U64_MAX).h]hXD Allows userspace to query the actual limit and set a new limit for the maximum guest memory size. The limit will be rounded up to 2048 MB, 4096 GB, 8192 TB respectively, as this limit is governed by the number of page table levels. In the case that there is no limit we will set the limit to KVM_S390_NO_MEM_LIMIT (U64_MAX).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjR hhubeh}(h]$attribute-kvm-s390-vm-mem-limit-sizeah ]h"])1.3. attribute kvm_s390_vm_mem_limit_sizeah$]h&]uh1hhhhhhhhK'ubeh}(h]group-kvm-s390-vm-mem-ctrlah ]h"]1. group: kvm_s390_vm_mem_ctrlah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h2. GROUP: KVM_S390_VM_CPU_MODELh]h2. GROUP: KVM_S390_VM_CPU_MODEL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhK8ubh)}(hhh]h)}(hhh](j )}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(hs390 h]h)}(hs390h]hs390}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhK:hj hhubah}(h]h ]h"]h$]h&]uh1hhj hhhhhK:ubh)}(hhh](h)}(h-2.1. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE (r/o)h]h-2.1. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE (r/o)}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0 hhhhhK=ubh)}(hPAllows user space to retrieve machine and kvm specific cpu related information::h]hOAllows user space to retrieve machine and kvm specific cpu related information:}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hj0 hhubh literal_block)}(hX& struct kvm_s390_vm_cpu_machine { __u64 cpuid; # CPUID of host __u32 ibc; # IBC level range offered by host __u8 pad[4]; __u64 fac_mask[256]; # set of cpu facilities enabled by KVM __u64 fac_list[256]; # set of cpu facilities offered by host }h]hX& struct kvm_s390_vm_cpu_machine { __u64 cpuid; # CPUID of host __u32 ibc; # IBC level range offered by host __u8 pad[4]; __u64 fac_mask[256]; # set of cpu facilities enabled by KVM __u64 fac_list[256]; # set of cpu facilities offered by host }}hjQ sbah}(h]h ]h"]h$]h&]hhuh1jO hhhKAhj0 hhubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjb hhhK ubj )}(h_address of buffer to store the machine related cpu data of type struct kvm_s390_vm_cpu_machine*h]h)}(h_address of buffer to store the machine related cpu data of type struct kvm_s390_vm_cpu_machine*h]h_address of buffer to store the machine related cpu data of type struct kvm_s390_vm_cpu_machine*}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjs ubah}(h]h ]h"]h$]h&]uh1j hjb ubeh}(h]h ]h"]h$]h&]uh1hhhhKIhj_ hhubh)}(hhh](j )}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(h-EFAULT if the given address is not accessible from kernel space; -ENOMEM if not enough memory is available to process the ioctl; 0 in case of success. h]h)}(h-EFAULT if the given address is not accessible from kernel space; -ENOMEM if not enough memory is available to process the ioctl; 0 in case of success.h]h-EFAULT if the given address is not accessible from kernel space; -ENOMEM if not enough memory is available to process the ioctl; 0 in case of success.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKKhj_ hhubeh}(h]h ]h"]h$]h&]uh1hhj0 hhhhhKIubeh}(h]%attribute-kvm-s390-vm-cpu-machine-r-oah ]h"]-2.1. attribute: kvm_s390_vm_cpu_machine (r/o)ah$]h&]uh1hhj hhhhhK=ubeh}(h]group-kvm-s390-vm-cpu-modelah ]h"]2. group: kvm_s390_vm_cpu_modelah$]h&]uh1hhhhhhhhK8ubh)}(hhh](h)}(h/2.2. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR (r/w)h]h/2.2. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR (r/w)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKPubh)}(hWAllows user space to retrieve or request to change cpu related information for a vcpu::h]hVAllows user space to retrieve or request to change cpu related information for a vcpu:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhj hhubjP )}(hXA struct kvm_s390_vm_cpu_processor { __u64 cpuid; # CPUID currently (to be) used by this vcpu __u16 ibc; # IBC level currently (to be) used by this vcpu __u8 pad[6]; __u64 fac_list[256]; # set of cpu facilities currently (to be) used # by this vcpu }h]hXA struct kvm_s390_vm_cpu_processor { __u64 cpuid; # CPUID currently (to be) used by this vcpu __u16 ibc; # IBC level currently (to be) used by this vcpu __u8 pad[6]; __u64 fac_list[256]; # set of cpu facilities currently (to be) used # by this vcpu }}hj sbah}(h]h ]h"]h$]h&]hhuh1jO hhhKThj hhubh)}(hX= KVM does not enforce or limit the cpu model data in any form. Take the information retrieved by means of KVM_S390_VM_CPU_MACHINE as hint for reasonable configuration setups. Instruction interceptions triggered by additionally set facility bits that are not handled by KVM need to by implemented in the VM driver code.h]hX= KVM does not enforce or limit the cpu model data in any form. Take the information retrieved by means of KVM_S390_VM_CPU_MACHINE as hint for reasonable configuration setups. Instruction interceptions triggered by additionally set facility bits that are not handled by KVM need to by implemented in the VM driver code.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hj hhubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(hhaddress of buffer to store/set the processor related cpu data of type struct kvm_s390_vm_cpu_processor*.h]h)}(hhaddress of buffer to store/set the processor related cpu data of type struct kvm_s390_vm_cpu_processor*.h]hhaddress of buffer to store/set the processor related cpu data of type struct kvm_s390_vm_cpu_processor*.}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahj% ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKahj hhubh)}(hhh](j )}(hReturnsh]hReturns}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjC hhhK ubj )}(h-EBUSY in case 1 or more vcpus are already activated (only in write case); -EFAULT if the given address is not accessible from kernel space; -ENOMEM if not enough memory is available to process the ioctl; 0 in case of success. h]h)}(h-EBUSY in case 1 or more vcpus are already activated (only in write case); -EFAULT if the given address is not accessible from kernel space; -ENOMEM if not enough memory is available to process the ioctl; 0 in case of success.h]h-EBUSY in case 1 or more vcpus are already activated (only in write case); -EFAULT if the given address is not accessible from kernel space; -ENOMEM if not enough memory is available to process the ioctl; 0 in case of success.}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjT ubah}(h]h ]h"]h$]h&]uh1j hjC ubeh}(h]h ]h"]h$]h&]uh1hhhhKchj hhubeh}(h]h ]h"]h$]h&]uh1hhj hhhhhKaubhtarget)}(h!.. _KVM_S390_VM_CPU_MACHINE_FEAT:h]h}(h]h ]h"]h$]h&]refidkvm-s390-vm-cpu-machine-featuh1jx hKhhj hhhhubh)}(hhh](h)}(h22.3. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE_FEAT (r/o)h]h22.3. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE_FEAT (r/o)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKkubh)}(hAllows user space to retrieve available cpu features. A feature is available if provided by the hardware and supported by kvm. In theory, cpu features could even be completely emulated by kvm.h]hAllows user space to retrieve available cpu features. A feature is available if provided by the hardware and supported by kvm. In theory, cpu features could even be completely emulated by kvm.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhj hhubjP )}(hlstruct kvm_s390_vm_cpu_feat { __u64 feat[16]; # Bitmap (1 = feature available), MSB 0 bit numbering };h]hlstruct kvm_s390_vm_cpu_feat { __u64 feat[16]; # Bitmap (1 = feature available), MSB 0 bit numbering };}hj sbah}(h]h ]h"]h$]h&]hhuh1jO hhhKshj hhubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(h2address of a buffer to load the feature list from.h]h)}(hj h]h2address of a buffer to load the feature list from.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKwhj hhubh)}(hhh](j )}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(hX-EFAULT if the given address is not accessible from kernel space; 0 in case of success. h]h)}(hW-EFAULT if the given address is not accessible from kernel space; 0 in case of success.h]hW-EFAULT if the given address is not accessible from kernel space; 0 in case of success.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKxhj hhubeh}(h]h ]h"]h$]h&]uh1hhj hhhhhKwubeh}(h](*attribute-kvm-s390-vm-cpu-machine-feat-r-oj eh ]h"](22.3. attribute: kvm_s390_vm_cpu_machine_feat (r/o)kvm_s390_vm_cpu_machine_feateh$]h&]uh1hhj hhhhhKkexpect_referenced_by_name}j jz sexpect_referenced_by_id}j jz subh)}(hhh](h)}(h42.4. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR_FEAT (r/w)h]h42.4. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR_FEAT (r/w)}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj& hhhhhK|ubh)}(hAllows user space to retrieve or change enabled cpu features for all VCPUs of a VM. Features that are not available cannot be enabled.h]hAllows user space to retrieve or change enabled cpu features for all VCPUs of a VM. Features that are not available cannot be enabled.}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hj& hhubh)}(hRSee :ref:`KVM_S390_VM_CPU_MACHINE_FEAT` for a description of the parameter struct.h](hSee }(hjE hhhNhNubh)}(h#:ref:`KVM_S390_VM_CPU_MACHINE_FEAT`h]hinline)}(hjO h]hKVM_S390_VM_CPU_MACHINE_FEAT}(hjS hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jQ hjM ubah}(h]h ]h"]h$]h&]refdocvirt/kvm/devices/vm refdomainj^ reftyperefrefexplicitrefwarn reftargetkvm_s390_vm_cpu_machine_featuh1hhhhKhjE ubh+ for a description of the parameter struct.}(hjE hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj& hhubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(h8address of a buffer to store/load the feature list from.h]h)}(hj h]h8address of a buffer to store/load the feature list from.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj| hhubh)}(hhh](j )}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(h-EFAULT if the given address is not accessible from kernel space; -EINVAL if a cpu feature that is not available is to be enabled; -EBUSY if at least one VCPU has already been defined; 0 in case of success. h]h)}(h-EFAULT if the given address is not accessible from kernel space; -EINVAL if a cpu feature that is not available is to be enabled; -EBUSY if at least one VCPU has already been defined; 0 in case of success.h]h-EFAULT if the given address is not accessible from kernel space; -EINVAL if a cpu feature that is not available is to be enabled; -EBUSY if at least one VCPU has already been defined; 0 in case of success.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj| hhubeh}(h]h ]h"]h$]h&]uh1hhj& hhhhhKubjy )}(h$.. _KVM_S390_VM_CPU_MACHINE_SUBFUNC:h]h}(h]h ]h"]h$]h&]j kvm-s390-vm-cpu-machine-subfuncuh1jx hKhj& hhhhubeh}(h],attribute-kvm-s390-vm-cpu-processor-feat-r-wah ]h"]42.4. attribute: kvm_s390_vm_cpu_processor_feat (r/w)ah$]h&]uh1hhj hhhhhK|ubh)}(hhh](h)}(h52.5. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE_SUBFUNC (r/o)h]h52.5. ATTRIBUTE: KVM_S390_VM_CPU_MACHINE_SUBFUNC (r/o)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hAllows user space to retrieve available cpu subfunctions without any filtering done by a set IBC. These subfunctions are indicated to the guest VCPU via query or "test bit" subfunctions and used e.g. by cpacf functions, plo and ptff.h]hAllows user space to retrieve available cpu subfunctions without any filtering done by a set IBC. These subfunctions are indicated to the guest VCPU via query or “test bit” subfunctions and used e.g. by cpacf functions, plo and ptff.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hX A subfunction block is only valid if KVM_S390_VM_CPU_MACHINE contains the STFL(E) bit introducing the affected instruction. If the affected instruction indicates subfunctions via a "query subfunction", the response block is contained in the returned struct. If the affected instruction indicates subfunctions via a "test bit" mechanism, the subfunction codes are contained in the returned struct in MSB 0 bit numbering.h]hX A subfunction block is only valid if KVM_S390_VM_CPU_MACHINE contains the STFL(E) bit introducing the affected instruction. If the affected instruction indicates subfunctions via a “query subfunction”, the response block is contained in the returned struct. If the affected instruction indicates subfunctions via a “test bit” mechanism, the subfunction codes are contained in the returned struct in MSB 0 bit numbering.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjP )}(hXx struct kvm_s390_vm_cpu_subfunc { u8 plo[32]; # always valid (ESA/390 feature) u8 ptff[16]; # valid with TOD-clock steering u8 kmac[16]; # valid with Message-Security-Assist u8 kmc[16]; # valid with Message-Security-Assist u8 km[16]; # valid with Message-Security-Assist u8 kimd[16]; # valid with Message-Security-Assist u8 klmd[16]; # valid with Message-Security-Assist u8 pckmo[16]; # valid with Message-Security-Assist-Extension 3 u8 kmctr[16]; # valid with Message-Security-Assist-Extension 4 u8 kmf[16]; # valid with Message-Security-Assist-Extension 4 u8 kmo[16]; # valid with Message-Security-Assist-Extension 4 u8 pcc[16]; # valid with Message-Security-Assist-Extension 4 u8 ppno[16]; # valid with Message-Security-Assist-Extension 5 u8 kma[16]; # valid with Message-Security-Assist-Extension 8 u8 kdsa[16]; # valid with Message-Security-Assist-Extension 9 u8 reserved[1792]; # reserved for future instructions };h]hXx struct kvm_s390_vm_cpu_subfunc { u8 plo[32]; # always valid (ESA/390 feature) u8 ptff[16]; # valid with TOD-clock steering u8 kmac[16]; # valid with Message-Security-Assist u8 kmc[16]; # valid with Message-Security-Assist u8 km[16]; # valid with Message-Security-Assist u8 kimd[16]; # valid with Message-Security-Assist u8 klmd[16]; # valid with Message-Security-Assist u8 pckmo[16]; # valid with Message-Security-Assist-Extension 3 u8 kmctr[16]; # valid with Message-Security-Assist-Extension 4 u8 kmf[16]; # valid with Message-Security-Assist-Extension 4 u8 kmo[16]; # valid with Message-Security-Assist-Extension 4 u8 pcc[16]; # valid with Message-Security-Assist-Extension 4 u8 ppno[16]; # valid with Message-Security-Assist-Extension 5 u8 kma[16]; # valid with Message-Security-Assist-Extension 8 u8 kdsa[16]; # valid with Message-Security-Assist-Extension 9 u8 reserved[1792]; # reserved for future instructions };}hj" sbah}(h]h ]h"]h$]h&]hhuh1jO hhhKhj hhubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj3 hhhK ubj )}(h8address of a buffer to load the subfunction blocks from.h]h)}(hjF h]h8address of a buffer to load the subfunction blocks from.}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjD ubah}(h]h ]h"]h$]h&]uh1j hj3 ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj0 hhubh)}(hhh](j )}(hReturnsh]hReturns}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1j hja hhhK ubj )}(hX-EFAULT if the given address is not accessible from kernel space; 0 in case of success. h]h)}(hW-EFAULT if the given address is not accessible from kernel space; 0 in case of success.h]hW-EFAULT if the given address is not accessible from kernel space; 0 in case of success.}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjr ubah}(h]h ]h"]h$]h&]uh1j hja ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj0 hhubeh}(h]h ]h"]h$]h&]uh1hhj hhhhhKubeh}(h](-attribute-kvm-s390-vm-cpu-machine-subfunc-r-oj eh ]h"](52.5. attribute: kvm_s390_vm_cpu_machine_subfunc (r/o)kvm_s390_vm_cpu_machine_subfunceh$]h&]uh1hhj hhhhhKj" }j j sj$ }j j subh)}(hhh](h)}(h72.6. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR_SUBFUNC (r/w)h]h72.6. ATTRIBUTE: KVM_S390_VM_CPU_PROCESSOR_SUBFUNC (r/w)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hAllows user space to retrieve or change cpu subfunctions to be indicated for all VCPUs of a VM. This attribute will only be available if kernel and hardware support are in place.h]hAllows user space to retrieve or change cpu subfunctions to be indicated for all VCPUs of a VM. This attribute will only be available if kernel and hardware support are in place.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hThe kernel uses the configured subfunction blocks for indication to the guest. A subfunction block will only be used if the associated STFL(E) bit has not been disabled by user space (so the instruction to be queried is actually available for the guest).h]hThe kernel uses the configured subfunction blocks for indication to the guest. A subfunction block will only be used if the associated STFL(E) bit has not been disabled by user space (so the instruction to be queried is actually available for the guest).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hAs long as no data has been written, a read will fail. The IBC will be used to determine available subfunctions in this case, this will guarantee backward compatibility.h]hAs long as no data has been written, a read will fail. The IBC will be used to determine available subfunctions in this case, this will guarantee backward compatibility.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hUSee :ref:`KVM_S390_VM_CPU_MACHINE_SUBFUNC` for a description of the parameter struct.h](hSee }(hj hhhNhNubh)}(h&:ref:`KVM_S390_VM_CPU_MACHINE_SUBFUNC`h]jR )}(hj h]hKVM_S390_VM_CPU_MACHINE_SUBFUNC}(hj hhhNhNubah}(h]h ](j] stdstd-refeh"]h$]h&]uh1jQ hj ubah}(h]h ]h"]h$]h&]refdocjj refdomainj reftyperefrefexplicitrefwarnjp kvm_s390_vm_cpu_machine_subfuncuh1hhhhKhj ubh+ for a description of the parameter struct.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(h>address of a buffer to store/load the subfunction blocks from.h]h)}(hj$ h]h>address of a buffer to store/load the subfunction blocks from.}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj" ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hhh](j )}(hReturnsh]hReturns}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj? hhhK ubj )}(h-EFAULT if the given address is not accessible from kernel space; -EINVAL when reading, if there was no write yet; -EBUSY if at least one VCPU has already been defined; 0 in case of success. h]h)}(h-EFAULT if the given address is not accessible from kernel space; -EINVAL when reading, if there was no write yet; -EBUSY if at least one VCPU has already been defined; 0 in case of success.h]h-EFAULT if the given address is not accessible from kernel space; -EINVAL when reading, if there was no write yet; -EBUSY if at least one VCPU has already been defined; 0 in case of success.}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjP ubah}(h]h ]h"]h$]h&]uh1j hj? ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]h ]h"]h$]h&]uh1hhj hhhhhKubeh}(h]/attribute-kvm-s390-vm-cpu-processor-subfunc-r-wah ]h"]72.6. attribute: kvm_s390_vm_cpu_processor_subfunc (r/w)ah$]h&]uh1hhj hhhhhKubeh}(h]'attribute-kvm-s390-vm-cpu-processor-r-wah ]h"]/2.2. attribute: kvm_s390_vm_cpu_processor (r/w)ah$]h&]uh1hhhhhhhhKPubh)}(hhh](h)}(h3. GROUP: KVM_S390_VM_TODh]h3. GROUP: KVM_S390_VM_TOD}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hhh]h)}(hhh](j )}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(hs390 h]h)}(hs390h]hs390}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(h$3.1. ATTRIBUTE: KVM_S390_VM_TOD_HIGHh]h$3.1. ATTRIBUTE: KVM_S390_VM_TOD_HIGH}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(h^Allows user space to set/get the TOD clock extension (u8) (superseded by KVM_S390_VM_TOD_EXT).h]h^Allows user space to set/get the TOD clock extension (u8) (superseded by KVM_S390_VM_TOD_EXT).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(h;address of a buffer in user space to store the data (u8) toh]h)}(hj h]h;address of a buffer in user space to store the data (u8) to}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hhh](j )}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj )}(h-EFAULT if the given address is not accessible from kernel space; -EINVAL if setting the TOD clock extension to != 0 is not supported -EOPNOTSUPP for a PV guest (TOD managed by the ultravisor) h]h)}(h-EFAULT if the given address is not accessible from kernel space; -EINVAL if setting the TOD clock extension to != 0 is not supported -EOPNOTSUPP for a PV guest (TOD managed by the ultravisor)h]h-EFAULT if the given address is not accessible from kernel space; -EINVAL if setting the TOD clock extension to != 0 is not supported -EOPNOTSUPP for a PV guest (TOD managed by the ultravisor)}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj. ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]h ]h"]h$]h&]uh1hhj hhhhhKubeh}(h]attribute-kvm-s390-vm-tod-highah ]h"]$3.1. attribute: kvm_s390_vm_tod_highah$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(h#3.2. ATTRIBUTE: KVM_S390_VM_TOD_LOWh]h#3.2. ATTRIBUTE: KVM_S390_VM_TOD_LOW}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZ hhhhhKubh)}(h]Allows user space to set/get bits 0-63 of the TOD clock register as defined in the POP (u64).h]h]Allows user space to set/get bits 0-63 of the TOD clock register as defined in the POP (u64).}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjZ hhubh)}(hhh](h)}(hhh](j )}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj| hhhK ubj )}(h