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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/pt_BR/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 hj hhhK ubh field_body)}(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&]uh1j hhhKhj hhubah}(h]h ]h"]h$]h&]uh1j hhhhhhhKubh)}(hhh](h)}(h+1.1. ATTRIBUTE: KVM_S390_VM_MEM_ENABLE_CMMAh]h+1.1. ATTRIBUTE: KVM_S390_VM_MEM_ENABLE_CMMA}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL hhhhhKubj )}(hhh](j )}(hhh](j )}(h Parametersh]h Parameters}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj` hhhK ubj' )}(hnoneh]h)}(hjs h]hnone}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjq ubah}(h]h ]h"]h$]h&]uh1j& hj` ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj] hhubj )}(hhh](j )}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj 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& hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj] hhubeh}(h]h ]h"]h$]h&]uh1j hjL 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&]uh1hhhhKhjL 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 hhhhhKubj )}(hhh](j )}(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&]uh1j hhhKhj hhubj )}(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}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hj, ubah}(h]h ]h"]h$]h&]uh1j& hj ubeh}(h]h ]h"]h$]h&]uh1j hhhK hj hhubeh}(h]h ]h"]h$]h&]uh1j hj 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.}(hjP 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}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf hhhhhK'ubj )}(hhh](j )}(hhh](j )}(h Parametersh]h Parameters}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjz hhhK ubj' )}(h;in attr->addr the address for the new limit of guest memoryh]h)}(hj h]h;in attr->addr the address for the new limit of guest memory}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hj ubah}(h]h ]h"]h$]h&]uh1j& hjz ubeh}(h]h ]h"]h$]h&]uh1j hhhK)hjw hhubj )}(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&]uh1j hhhK*hjw hhubeh}(h]h ]h"]h$]h&]uh1j hjf 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&]uh1hhhhK1hjf 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 hhhhhK8ubj )}(hhh]j )}(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&]uh1j hhhK:hj hhubah}(h]h ]h"]h$]h&]uh1j hj 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)}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD 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:}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjD 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 }}hje sbah}(h]h ]h"]h$]h&]hhuh1jc hhhKAhjD hhubj )}(hhh](j )}(hhh](j )}(h Parametersh]h Parameters}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjv 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*}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhj ubah}(h]h ]h"]h$]h&]uh1j& hjv ubeh}(h]h ]h"]h$]h&]uh1j hhhKIhjs hhubj )}(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&]uh1j hhhKKhjs hhubeh}(h]h ]h"]h$]h&]uh1j hjD 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 hhubjd )}(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&]hhuh1jc 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 hhubj )}(hhh](j )}(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&]uh1hhhhKahj9 ubah}(h]h ]h"]h$]h&]uh1j& hj( ubeh}(h]h ]h"]h$]h&]uh1j hhhKahj% hhubj )}(hhh](j )}(hReturnsh]hReturns}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjW 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.}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjh ubah}(h]h ]h"]h$]h&]uh1j& hjW ubeh}(h]h ]h"]h$]h&]uh1j hhhKchj% hhubeh}(h]h ]h"]h$]h&]uh1j hj hhhhhKaubhtarget)}(h!.. _KVM_S390_VM_CPU_MACHINE_FEAT:h]h}(h]h ]h"]h$]h&]refidkvm-s390-vm-cpu-machine-featuh1j 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 hhubjd )}(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&]hhuh1jc hhhKshj hhubj )}(hhh](j )}(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&]uh1j hhhKwhj hhubj )}(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&]uh1j hhhKxhj hhubeh}(h]h ]h"]h$]h&]uh1j hj 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}j3 j sexpect_referenced_by_id}j j 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.}(hjK 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 }(hjY hhhNhNubh)}(h#:ref:`KVM_S390_VM_CPU_MACHINE_FEAT`h]hinline)}(hjc h]hKVM_S390_VM_CPU_MACHINE_FEAT}(hjg hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1je hja ubah}(h]h ]h"]h$]h&]refdocvirt/kvm/devices/vm refdomainjr reftyperefrefexplicitrefwarn reftargetkvm_s390_vm_cpu_machine_featuh1hhhhKhjY ubh+ for a description of the parameter struct.}(hjY hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj: hhubj )}(hhh](j )}(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&]uh1j hhhKhj hhubj )}(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&]uh1j hhhKhj hhubeh}(h]h ]h"]h$]h&]uh1j hj: hhhhhKubj )}(h$.. _KVM_S390_VM_CPU_MACHINE_SUBFUNC:h]h}(h]h ]h"]h$]h&]j kvm-s390-vm-cpu-machine-subfuncuh1j 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 hhubjd )}(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 };}hj6 sbah}(h]h ]h"]h$]h&]hhuh1jc hhhKhj hhubj )}(hhh](j )}(hhh](j )}(h Parametersh]h Parameters}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjG hhhK ubj' )}(h8address of a buffer to load the subfunction blocks from.h]h)}(hjZ h]h8address of a buffer to load the subfunction blocks from.}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjX ubah}(h]h ]h"]h$]h&]uh1j& hjG ubeh}(h]h ]h"]h$]h&]uh1j hhhKhjD hhubj )}(hhh](j )}(hReturnsh]hReturns}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1j hju 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&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j& hju ubeh}(h]h ]h"]h$]h&]uh1j hhhKhjD hhubeh}(h]h ]h"]h$]h&]uh1j hj 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 hhhhhKj6 }j j sj8 }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]jf )}(hj h]hKVM_S390_VM_CPU_MACHINE_SUBFUNC}(hj hhhNhNubah}(h]h ](jq stdstd-refeh"]h$]h&]uh1je hj ubah}(h]h ]h"]h$]h&]refdocj~ refdomainj reftyperefrefexplicitrefwarnj kvm_s390_vm_cpu_machine_subfuncuh1hhhhKhj ubh+ for a description of the parameter struct.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj )}(hhh](j )}(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)}(hj8 h]h>address of a buffer to store/load the subfunction blocks from.}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6 ubah}(h]h ]h"]h$]h&]uh1j& hj% ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj" hhubj )}(hhh](j )}(hReturnsh]hReturns}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjS 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.}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjd ubah}(h]h ]h"]h$]h&]uh1j& hjS ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj" hhubeh}(h]h ]h"]h$]h&]uh1j hj 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 hhhhhKubj )}(hhh]j )}(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&]uh1j hhhKhj hhubah}(h]h ]h"]h$]h&]uh1j hj 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 hhubj )}(hhh](j )}(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&]uh1j hhhKhj hhubj )}(hhh](j )}(hReturnsh]hReturns}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj1 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)}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjB ubah}(h]h ]h"]h$]h&]uh1j& hj1 ubeh}(h]h ]h"]h$]h&]uh1j hhhKhj hhubeh}(h]h ]h"]h$]h&]uh1j hj 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}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjn 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).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjn hhubj )}(hhh](j )}(hhh](j )}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hhhK ubj' )}(h