sphinx.addnodesdocument)}( rawsourcechildren]( 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 classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/virt/kvm/devices/vmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/virt/kvm/devices/vmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/virt/kvm/devices/vmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/virt/kvm/devices/vmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/virt/kvm/devices/vmmodnameN classnameN refexplicituh1hhh ubeh}(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&]uh1hhhhK hhhhubh)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhhhKubh field_body)}(hs390 h]h)}(hs390h]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhubeh}(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&]uh1hhj8hhhhhKubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLhhhKubj)}(hnoneh]h)}(hj_h]hnone}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1hhhhKhjIhhubh)}(hhh](j)}(hReturnsh]hReturns}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzhhhKubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1hhhhKhjIhhubeh}(h]h ]h"]h$]h&]uh1hhj8hhhhhKubh)}(hNEnables Collaborative Memory Management Assist (CMMA) for the virtual machine.h]hNEnables Collaborative Memory Management Assist (CMMA) for the virtual machine.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(hnoneh]h)}(hjh]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](j)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK hjhhubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(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#hjhhubeh}(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}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhhhhhK'ubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfhhhKubj)}(h;in attr->addr the address for the new limit of guest memoryh]h)}(hjyh]h;in attr->addr the address for the new limit of guest memory}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjwubah}(h]h ]h"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]uh1hhhhK)hjchhubh)}(hhh](j)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK*hjchhubeh}(h]h ]h"]h$]h&]uh1hhjRhhhhhK)ubh)}(hXDAllows 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]hXDAllows 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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjRhhubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK8ubh)}(hhh]h)}(hhh](j)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(hs390 h]h)}(hs390h]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK: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)}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhK=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:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hj0hhubh 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 }}hjQsbah}(h]h ]h"]h$]h&]hhuh1jOhhhKAhj0hhubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbhhhKubj)}(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*}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjsubah}(h]h ]h"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]uh1hhhhKIhj_hhubh)}(hhh](j)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKKhj_hhubeh}(h]h ]h"]h$]h&]uh1hhj0hhhhhKIubeh}(h]%attribute-kvm-s390-vm-cpu-machine-r-oah ]h"]-2.1. attribute: kvm_s390_vm_cpu_machine (r/o)ah$]h&]uh1hhjhhhhhK=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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKPubh)}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjhhubjP)}(hXAstruct 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]hXAstruct 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 }}hjsbah}(h]h ]h"]h$]h&]hhuh1jOhhhKThjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hjhhubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKahjhhubh)}(hhh](j)}(hReturnsh]hReturns}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjChhhKubj)}(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.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjTubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1hhhhKchjhhubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKaubhtarget)}(h!.. _KVM_S390_VM_CPU_MACHINE_FEAT:h]h}(h]h ]h"]h$]h&]refidkvm-s390-vm-cpu-machine-featuh1jxhKhhjhhhhubh)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKkubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjhhubjP)}(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 };}hjsbah}(h]h ]h"]h$]h&]hhuh1jOhhhKshjhhubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(h2address of a buffer to load the feature list from.h]h)}(hjh]h2address of a buffer to load the feature list from.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKwhjhhubh)}(hhh](j)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKxhjhhubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKwubeh}(h](*attribute-kvm-s390-vm-cpu-machine-feat-r-ojeh ]h"](22.3. attribute: kvm_s390_vm_cpu_machine_feat (r/o)kvm_s390_vm_cpu_machine_feateh$]h&]uh1hhjhhhhhKkexpect_referenced_by_name}jjzsexpect_referenced_by_id}jjzsubh)}(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.}(hj7hhhNhNubah}(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 }(hjEhhhNhNubh)}(h#:ref:`KVM_S390_VM_CPU_MACHINE_FEAT`h]hinline)}(hjOh]hKVM_S390_VM_CPU_MACHINE_FEAT}(hjShhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jQhjMubah}(h]h ]h"]h$]h&]refdocvirt/kvm/devices/vm refdomainj^reftyperef refexplicitrefwarn reftargetkvm_s390_vm_cpu_machine_featuh1hhhhKhjEubh+ for a description of the parameter struct.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj&hhubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(h8address of a buffer to store/load the feature list from.h]h)}(hjh]h8address of a buffer to store/load the feature list from.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhj|hhubh)}(hhh](j)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(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&]jkvm-s390-vm-cpu-machine-subfuncuh1jxhKhj&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&]uh1hhjhhhhhK|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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXA 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]hXA 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjP)}(hXxstruct 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]hXxstruct 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&]hhuh1jOhhhKhjhhubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3hhhKubj)}(h8address of a buffer to load the subfunction blocks from.h]h)}(hjFh]h8address of a buffer to load the subfunction blocks from.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj0hhubh)}(hhh](j)}(hReturnsh]hReturns}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjahhhKubj)}(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.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjrubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1hhhhKhj0hhubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKubeh}(h](-attribute-kvm-s390-vm-cpu-machine-subfunc-r-ojeh ]h"](52.5. attribute: kvm_s390_vm_cpu_machine_subfunc (r/o)kvm_s390_vm_cpu_machine_subfunceh$]h&]uh1hhjhhhhhKj"}jjsj$}jjsubh)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hUSee :ref:`KVM_S390_VM_CPU_MACHINE_SUBFUNC` for a description of the parameter struct.h](hSee }(hjhhhNhNubh)}(h&:ref:`KVM_S390_VM_CPU_MACHINE_SUBFUNC`h]jR)}(hjh]hKVM_S390_VM_CPU_MACHINE_SUBFUNC}(hjhhhNhNubah}(h]h ](j]stdstd-refeh"]h$]h&]uh1jQhjubah}(h]h ]h"]h$]h&]refdocjj refdomainjreftyperef refexplicitrefwarnjpkvm_s390_vm_cpu_machine_subfuncuh1hhhhKhjubh+ for a description of the parameter struct.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](j)}(hReturnsh]hReturns}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?hhhKubj)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjPubah}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKubeh}(h]/attribute-kvm-s390-vm-cpu-processor-subfunc-r-wah ]h"]72.6. attribute: kvm_s390_vm_cpu_processor_subfunc (r/w)ah$]h&]uh1hhjhhhhhKubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh]h)}(hhh](j)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(hs390 h]h)}(hs390h]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h$3.1. ATTRIBUTE: KVM_S390_VM_TOD_HIGHh]h$3.1. ATTRIBUTE: KVM_S390_VM_TOD_HIGH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(h;address of a buffer in user space to store the data (u8) toh]h)}(hjh]h;address of a buffer in user space to store the data (u8) to}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](j)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubj)}(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)}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj.ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKubeh}(h]attribute-kvm-s390-vm-tod-highah ]h"]$3.1. attribute: kvm_s390_vm_tod_highah$]h&]uh1hhjhhhhhKubh)}(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&]uh1hhjZhhhhhKubh)}(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).}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjZhhubh)}(hhh](h)}(hhh](j)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|hhhKubj)}(h