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/apimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/zh_TW/virt/kvm/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/it_IT/virt/kvm/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ja_JP/virt/kvm/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ko_KR/virt/kvm/apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/sp_SP/virt/kvm/apimodnameN 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:spacepreserveuh1hhhhhh:/var/lib/git/docbuild/linux/Documentation/virt/kvm/api.rsthKubhsection)}(hhh](htitle)}(hCThe Definitive KVM (Kernel-based Virtual Machine) API Documentationh]hCThe Definitive KVM (Kernel-based Virtual Machine) API Documentation}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h1. General descriptionh]h1. General description}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe kvm API is centered around different kinds of file descriptors and ioctls that can be issued to these file descriptors. An initial open("/dev/kvm") obtains a handle to the kvm subsystem; this handle can be used to issue system ioctls. A KVM_CREATE_VM ioctl on this handle will create a VM file descriptor which can be used to issue VM ioctls. A KVM_CREATE_VCPU or KVM_CREATE_DEVICE ioctl on a VM fd will create a virtual cpu or device and return a file descriptor pointing to the new resource.h]hXThe kvm API is centered around different kinds of file descriptors and ioctls that can be issued to these file descriptors. An initial open(“/dev/kvm”) obtains a handle to the kvm subsystem; this handle can be used to issue system ioctls. A KVM_CREATE_VM ioctl on this handle will create a VM file descriptor which can be used to issue VM ioctls. A KVM_CREATE_VCPU or KVM_CREATE_DEVICE ioctl on a VM fd will create a virtual cpu or device and return a file descriptor pointing to the new resource.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hIn other words, the kvm API is a set of ioctls that are issued to different kinds of file descriptor in order to control various aspects of a virtual machine. Depending on the file descriptor that accepts them, ioctls belong to the following classes:h]hIn other words, the kvm API is a set of ioctls that are issued to different kinds of file descriptor in order to control various aspects of a virtual machine. Depending on the file descriptor that accepts them, ioctls belong to the following classes:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh block_quote)}(hX- System ioctls: These query and set global attributes which affect the whole kvm subsystem. In addition a system ioctl is used to create virtual machines. - VM ioctls: These query and set attributes that affect an entire virtual machine, for example memory layout. In addition a VM ioctl is used to create virtual cpus (vcpus) and devices. VM ioctls must be issued from the same process (address space) that was used to create the VM. - vcpu ioctls: These query and set attributes that control the operation of a single virtual cpu. vcpu ioctls should be issued from the same thread that was used to create the vcpu, except for asynchronous vcpu ioctl that are marked as such in the documentation. Otherwise, the first ioctl after switching threads could see a performance impact. - device ioctls: These query and set attributes that control the operation of a single device. device ioctls must be issued from the same process (address space) that was used to create the VM. h]h bullet_list)}(hhh](h list_item)}(hSystem ioctls: These query and set global attributes which affect the whole kvm subsystem. In addition a system ioctl is used to create virtual machines. h]h)}(hSystem ioctls: These query and set global attributes which affect the whole kvm subsystem. In addition a system ioctl is used to create virtual machines.h]hSystem ioctls: These query and set global attributes which affect the whole kvm subsystem. In addition a system ioctl is used to create virtual machines.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXVM ioctls: These query and set attributes that affect an entire virtual machine, for example memory layout. In addition a VM ioctl is used to create virtual cpus (vcpus) and devices. VM ioctls must be issued from the same process (address space) that was used to create the VM. h](h)}(hVM ioctls: These query and set attributes that affect an entire virtual machine, for example memory layout. In addition a VM ioctl is used to create virtual cpus (vcpus) and devices.h]hVM ioctls: These query and set attributes that affect an entire virtual machine, for example memory layout. In addition a VM ioctl is used to create virtual cpus (vcpus) and devices.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h^VM ioctls must be issued from the same process (address space) that was used to create the VM.h]h^VM ioctls must be issued from the same process (address space) that was used to create the VM.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hXZvcpu ioctls: These query and set attributes that control the operation of a single virtual cpu. vcpu ioctls should be issued from the same thread that was used to create the vcpu, except for asynchronous vcpu ioctl that are marked as such in the documentation. Otherwise, the first ioctl after switching threads could see a performance impact. h](h)}(h_vcpu ioctls: These query and set attributes that control the operation of a single virtual cpu.h]h_vcpu ioctls: These query and set attributes that control the operation of a single virtual cpu.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjCubh)}(hvcpu ioctls should be issued from the same thread that was used to create the vcpu, except for asynchronous vcpu ioctl that are marked as such in the documentation. Otherwise, the first ioctl after switching threads could see a performance impact.h]hvcpu ioctls should be issued from the same thread that was used to create the vcpu, except for asynchronous vcpu ioctl that are marked as such in the documentation. Otherwise, the first ioctl after switching threads could see a performance impact.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjCubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hdevice ioctls: These query and set attributes that control the operation of a single device. device ioctls must be issued from the same process (address space) that was used to create the VM. h](h)}(h\device ioctls: These query and set attributes that control the operation of a single device.h]h\device ioctls: These query and set attributes that control the operation of a single device.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjiubh)}(hbdevice ioctls must be issued from the same process (address space) that was used to create the VM.h]hbdevice ioctls must be issued from the same process (address space) that was used to create the VM.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjiubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h~While most ioctls are specific to one kind of file descriptor, in some cases the same ioctl can belong to more than one class.h]h~While most ioctls are specific to one kind of file descriptor, in some cases the same ioctl can belong to more than one class.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hhhhubh)}(hXThe KVM API grew over time. For this reason, KVM defines many constants of the form ``KVM_CAP_*``, each corresponding to a set of functionality provided by one or more ioctls. Availability of these "capabilities" can be checked with :ref:`KVM_CHECK_EXTENSION `. Some capabilities also need to be enabled for VMs or VCPUs where their functionality is desired (see :ref:`cap_enable` and :ref:`cap_enable_vm`).h](hUThe KVM API grew over time. For this reason, KVM defines many constants of the form }(hjhhhNhNubhliteral)}(h ``KVM_CAP_*``h]h KVM_CAP_*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, each corresponding to a set of functionality provided by one or more ioctls. Availability of these “capabilities” can be checked with }(hjhhhNhNubh)}(h0:ref:`KVM_CHECK_EXTENSION `h]hinline)}(hjh]hKVM_CHECK_EXTENSION}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc virt/kvm/api refdomainjreftyperef refexplicitrefwarn reftargetkvm_check_extensionuh1hhhhK4hjubhh. Some capabilities also need to be enabled for VMs or VCPUs where their functionality is desired (see }(hjhhhNhNubh)}(h:ref:`cap_enable`h]j)}(hjh]h cap_enable}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj cap_enableuh1hhhhK4hjubh and }(hjhhhNhNubh)}(h:ref:`cap_enable_vm`h]j)}(hjh]h cap_enable_vm}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj"reftyperef refexplicitrefwarnj cap_enable_vmuh1hhhhK4hjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK4hhhhubeh}(h]general-descriptionah ]h"]1. general descriptionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h2. Restrictionsh]h2. Restrictions}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhK=ubh)}(hXxIn general file descriptors can be migrated among processes by means of fork() and the SCM_RIGHTS facility of unix domain socket. These kinds of tricks are explicitly not supported by kvm. While they will not cause harm to the host, their actual behavior is not guaranteed by the API. See "General description" for details on the ioctl usage model that is supported by KVM.h]hX|In general file descriptors can be migrated among processes by means of fork() and the SCM_RIGHTS facility of unix domain socket. These kinds of tricks are explicitly not supported by kvm. While they will not cause harm to the host, their actual behavior is not guaranteed by the API. See “General description” for details on the ioctl usage model that is supported by KVM.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjFhhubh)}(hX+It is important to note that although VM ioctls may only be issued from the process that created the VM, a VM's lifecycle is associated with its file descriptor, not its creator (process). In other words, the VM and its resources, *including the associated address space*, are not freed until the last reference to the VM's file descriptor has been released. For example, if fork() is issued after ioctl(KVM_CREATE_VM), the VM will not be freed until both the parent (original) process and its child have put their references to the VM's file descriptor.h](hIt is important to note that although VM ioctls may only be issued from the process that created the VM, a VM’s lifecycle is associated with its file descriptor, not its creator (process). In other words, the VM and its resources, }(hjehhhNhNubhemphasis)}(h(*including the associated address space*h]h&including the associated address space}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjeubhX, are not freed until the last reference to the VM’s file descriptor has been released. For example, if fork() is issued after ioctl(KVM_CREATE_VM), the VM will not be freed until both the parent (original) process and its child have put their references to the VM’s file descriptor.}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKFhjFhhubh)}(hXpBecause a VM's resources are not freed until the last reference to its file descriptor is released, creating additional references to a VM via fork(), dup(), etc... without careful consideration is strongly discouraged and may have unwanted side effects, e.g. memory allocated by and on behalf of the VM's process may not be freed/unaccounted when the VM is shut down.h]hXtBecause a VM’s resources are not freed until the last reference to its file descriptor is released, creating additional references to a VM via fork(), dup(), etc... without careful consideration is strongly discouraged and may have unwanted side effects, e.g. memory allocated by and on behalf of the VM’s process may not be freed/unaccounted when the VM is shut down.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjFhhubeh}(h] restrictionsah ]h"]2. restrictionsah$]h&]uh1hhhhhhhhK=ubh)}(hhh](h)}(h 3. Extensionsh]h 3. Extensions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKXubh)}(hAs of Linux 2.6.22, the KVM ABI has been stabilized: no backward incompatible change are allowed. However, there is an extension facility that allows backward-compatible extensions to the API to be queried and used.h]hAs of Linux 2.6.22, the KVM ABI has been stabilized: no backward incompatible change are allowed. However, there is an extension facility that allows backward-compatible extensions to the API to be queried and used.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjhhubh)}(hThe extension mechanism is not based on the Linux version number. Instead, kvm defines extension identifiers and a facility to query whether a particular extension identifier is available. If it is, a set of ioctls is available for application use.h]hThe extension mechanism is not based on the Linux version number. Instead, kvm defines extension identifiers and a facility to query whether a particular extension identifier is available. If it is, a set of ioctls is available for application use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjhhubeh}(h] extensionsah ]h"] 3. extensionsah$]h&]uh1hhhhhhhhKXubh)}(hhh](h)}(h4. API descriptionh]h4. API description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKfubh)}(hThis section describes ioctls that can be used to control kvm guests. For each ioctl, the following information is provided along with a description:h]hThis section describes ioctls that can be used to control kvm guests. For each ioctl, the following information is provided along with a description:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjhhubh)}(hXCapability: which KVM extension provides this ioctl. Can be 'basic', which means that is will be provided by any kernel that supports API version 12 (see :ref:`KVM_GET_API_VERSION `), or a KVM_CAP_xyz constant that can be checked with :ref:`KVM_CHECK_EXTENSION `. Architectures: which instruction set architectures provide this ioctl. x86 includes both i386 and x86_64. Type: system, vm, or vcpu. Parameters: what parameters are accepted by the ioctl. Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) are not detailed, but errors with specific meanings are. h]hdefinition_list)}(hhh](hdefinition_list_item)}(hX3Capability: which KVM extension provides this ioctl. Can be 'basic', which means that is will be provided by any kernel that supports API version 12 (see :ref:`KVM_GET_API_VERSION `), or a KVM_CAP_xyz constant that can be checked with :ref:`KVM_CHECK_EXTENSION `. h](hterm)}(h Capability:h]h Capability:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKqhjubh definition)}(hhh]h)}(hX&which KVM extension provides this ioctl. Can be 'basic', which means that is will be provided by any kernel that supports API version 12 (see :ref:`KVM_GET_API_VERSION `), or a KVM_CAP_xyz constant that can be checked with :ref:`KVM_CHECK_EXTENSION `.h](hwhich KVM extension provides this ioctl. Can be ‘basic’, which means that is will be provided by any kernel that supports API version 12 (see }(hjhhhNhNubh)}(h0:ref:`KVM_GET_API_VERSION `h]j)}(hjh]hKVM_GET_API_VERSION}(hj!hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj+reftyperef refexplicitrefwarnjkvm_get_api_versionuh1hhhhKmhjubh6), or a KVM_CAP_xyz constant that can be checked with }(hjhhhNhNubh)}(h0:ref:`KVM_CHECK_EXTENSION `h]j)}(hjCh]hKVM_CHECK_EXTENSION}(hjEhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]refdocj refdomainjOreftyperef refexplicitrefwarnjkvm_check_extensionuh1hhhhKmhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKqhjubj)}(hjArchitectures: which instruction set architectures provide this ioctl. x86 includes both i386 and x86_64. h](j)}(hArchitectures:h]hArchitectures:}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKuhjwubj)}(hhh]h)}(hZwhich instruction set architectures provide this ioctl. x86 includes both i386 and x86_64.h]hZwhich instruction set architectures provide this ioctl. x86 includes both i386 and x86_64.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]uh1jhhhKuhjubj)}(hType: system, vm, or vcpu. h](j)}(hType:h]hType:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKxhjubj)}(hhh]h)}(hsystem, vm, or vcpu.h]hsystem, vm, or vcpu.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKxhjubj)}(h7Parameters: what parameters are accepted by the ioctl. h](j)}(h Parameters:h]h Parameters:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK{hjubj)}(hhh]h)}(h*what parameters are accepted by the ioctl.h]h*what parameters are accepted by the ioctl.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK{hjubj)}(hReturns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) are not detailed, but errors with specific meanings are. h](j)}(hReturns:h]hReturns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hythe return value. General error numbers (EBADF, ENOMEM, EINVAL) are not detailed, but errors with specific meanings are.h]hythe return value. General error numbers (EBADF, ENOMEM, EINVAL) are not detailed, but errors with specific meanings are.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKlhjhhubhtarget)}(h.. _KVM_GET_API_VERSION:h]h}(h]h ]h"]h$]h&]refidkvm-get-api-versionuh1j?hKhjhhhhubh)}(hhh](h)}(h4.1 KVM_GET_API_VERSIONh]h4.1 KVM_GET_API_VERSION}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhhhhhKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(h Capabilityh]h Capability}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjehhhKubh field_body)}(hbasich]h)}(hj|h]hbasic}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjzubah}(h]h ]h"]h$]h&]uh1jxhjeubeh}(h]h ]h"]h$]h&]uh1jchhhKhj`hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hallh]h)}(hjh]hall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhj`hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h system ioctlh]h)}(hjh]h system ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhj`hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hnoneh]h)}(hjh]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhj`hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(h#the constant KVM_API_VERSION (=12) h]h)}(h"the constant KVM_API_VERSION (=12)h]h"the constant KVM_API_VERSION (=12)}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj2ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhKhj`hhubeh}(h]h ]h"]h$]h&]uh1j^hjMhhhhhKubh)}(hXqThis identifies the API version as the stable kvm API. It is not expected that this number will change. However, Linux 2.6.20 and 2.6.21 report earlier versions; these are not documented and not supported. Applications should refuse to run if KVM_GET_API_VERSION returns a value other than 12. If this check passes, all ioctls described as 'basic' will be available.h]hXuThis identifies the API version as the stable kvm API. It is not expected that this number will change. However, Linux 2.6.20 and 2.6.21 report earlier versions; these are not documented and not supported. Applications should refuse to run if KVM_GET_API_VERSION returns a value other than 12. If this check passes, all ioctls described as ‘basic’ will be available.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjMhhubeh}(h](jLid1eh ]h"](4.1 kvm_get_api_versionkvm_get_api_versioneh$]h&]uh1hhjhhhhhKexpect_referenced_by_name}jjjAsexpect_referenced_by_id}jLjAsubh)}(hhh](h)}(h4.2 KVM_CREATE_VMh]h4.2 KVM_CREATE_VM}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhhhhhKubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hallh]h)}(hjh]hall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h system ioctlh]h)}(hjh]h system ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h"machine type identifier (KVM_VM_*)h]h)}(hj"h]h"machine type identifier (KVM_VM_*)}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=hhhKubjy)}(h=a VM fd that can be used to control the new virtual machine. h]h)}(he.g, to configure a guest to use 48bit physical address size::h]h=e.g, to configure a guest to use 48bit physical address size:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh literal_block)}(hCvm_fd = ioctl(dev_fd, KVM_CREATE_VM, KVM_VM_TYPE_ARM_IPA_SIZE(48));h]hCvm_fd = ioctl(dev_fd, KVM_CREATE_VM, KVM_VM_TYPE_ARM_IPA_SIZE(48));}hj%sbah}(h]h ]h"]h$]h&]hhuh1j#hhhKhjhhubh)}(h&The requested size (IPA_Bits) must be:h]h&The requested size (IPA_Bits) must be:}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX== ========================================================= 0 Implies default size, 40bits (for backward compatibility) N Implies N bits, where N is a positive integer such that, 32 <= N <= Host_IPA_Limit == ========================================================= h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjLubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK9uh1jOhjLubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h0h]h0}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjqubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(h9Implies default size, 40bits (for backward compatibility)h]h9Implies default size, 40bits (for backward compatibility)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1johjlubeh}(h]h ]h"]h$]h&]uh1jjhjgubjk)}(hhh](jp)}(hhh]h)}(hNh]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hRImplies N bits, where N is a positive integer such that, 32 <= N <= Host_IPA_Limith]hRImplies N bits, where N is a positive integer such that, 32 <= N <= Host_IPA_Limit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjgubeh}(h]h ]h"]h$]h&]uh1jehjLubeh}(h]h ]h"]h$]h&]colsKuh1jJhjGubah}(h]h ]h"]h$]h&]uh1jEhjAubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hHost_IPA_Limit is the maximum possible value for IPA_Bits on the host and is dependent on the CPU capability and the kernel configuration. The limit can be retrieved using KVM_CAP_ARM_VM_IPA_SIZE of the KVM_CHECK_EXTENSION ioctl() at run-time.h]hHost_IPA_Limit is the maximum possible value for IPA_Bits on the host and is dependent on the CPU capability and the kernel configuration. The limit can be retrieved using KVM_CAP_ARM_VM_IPA_SIZE of the KVM_CHECK_EXTENSION ioctl() at run-time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hwCreation of the VM will fail if the requested IPA size (whether it is implicit or explicit) is unsupported on the host.h]hwCreation of the VM will fail if the requested IPA size (whether it is implicit or explicit) is unsupported on the host.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hPlease note that configuring the IPA size does not affect the capability exposed by the guest CPUs in ID_AA64MMFR0_EL1[PARange]. It only affects size of the address translated by the stage2 level (guest physical to host physical address translations).h]hPlease note that configuring the IPA size does not affect the capability exposed by the guest CPUs in ID_AA64MMFR0_EL1[PARange]. It only affects size of the address translated by the stage2 level (guest physical to host physical address translations).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]arm64ah ]h"]h$]arm64:ah&]uh1hhjqhhhhhKjKubeh}(h] kvm-create-vmah ]h"]4.2 kvm_create_vmah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h:4.3 KVM_GET_MSR_INDEX_LIST, KVM_GET_MSR_FEATURE_INDEX_LISTh]h:4.3 KVM_GET_MSR_INDEX_LIST, KVM_GET_MSR_FEATURE_INDEX_LIST}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhKubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(hBbasic, KVM_CAP_GET_MSR_FEATURES for KVM_GET_MSR_FEATURE_INDEX_LISTh]h)}(hjVh]hBbasic, KVM_CAP_GET_MSR_FEATURES for KVM_GET_MSR_FEATURE_INDEX_LIST}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjTubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhKhj@hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjqhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjqubeh}(h]h ]h"]h$]h&]uh1jchhhKhj@hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h system ioctlh]h)}(hjh]h system ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhj@hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_msr_list (in/out)h]h)}(hjh]hstruct kvm_msr_list (in/out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhj@hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhj@hhubeh}(h]h ]h"]h$]h&]uh1j^hj/hhhhhKubh)}(hErrors:h]hErrors:}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubh)}(hX/====== ============================================================ EFAULT the msr index list cannot be read from or written to E2BIG the msr index list is too big to fit in the array specified by the user. ====== ============================================================ h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjE ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK>uh1jOhjE ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEFAULTh]hEFAULT}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjb ubah}(h]h ]h"]h$]h&]uh1johj_ ubjp)}(hhh]h)}(h4the msr index list cannot be read from or written toh]h4the msr index list cannot be read from or written to}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjy ubah}(h]h ]h"]h$]h&]uh1johj_ ubeh}(h]h ]h"]h$]h&]uh1jjhj\ ubjk)}(hhh](jp)}(hhh]h)}(hE2BIGh]hE2BIG}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hHthe msr index list is too big to fit in the array specified by the user.h]hHthe msr index list is too big to fit in the array specified by the user.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1johj ubeh}(h]h ]h"]h$]h&]uh1jjhj\ ubeh}(h]h ]h"]h$]h&]uh1jehjE ubeh}(h]h ]h"]h$]h&]colsKuh1jJhjB ubah}(h]h ]h"]h$]h&]uh1jEhj> ubah}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubj$)}(hcstruct kvm_msr_list { __u32 nmsrs; /* number of msrs in entries */ __u32 indices[0]; };h]hcstruct kvm_msr_list { __u32 nmsrs; /* number of msrs in entries */ __u32 indices[0]; };}hj sbah}(h]h ]h"]h$]h&]hhuh1j#hhhKhj/hhubh)}(hThe user fills in the size of the indices array in nmsrs, and in return kvm adjusts nmsrs to reflect the actual number of msrs and fills in the indices array with their numbers.h]hThe user fills in the size of the indices array in nmsrs, and in return kvm adjusts nmsrs to reflect the actual number of msrs and fills in the indices array with their numbers.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubh)}(hKVM_GET_MSR_INDEX_LIST returns the guest msrs that are supported. The list varies by kvm version and host processor, but does not change otherwise.h]hKVM_GET_MSR_INDEX_LIST returns the guest msrs that are supported. The list varies by kvm version and host processor, but does not change otherwise.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubh)}(hNote: if kvm indicates supports MCE (KVM_CAP_MCE), then the MCE bank MSRs are not returned in the MSR list, as different vcpus can have a different number of banks, as set via the KVM_X86_SETUP_MCE ioctl.h]hNote: if kvm indicates supports MCE (KVM_CAP_MCE), then the MCE bank MSRs are not returned in the MSR list, as different vcpus can have a different number of banks, as set via the KVM_X86_SETUP_MCE ioctl.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubh)}(hX<KVM_GET_MSR_FEATURE_INDEX_LIST returns the list of MSRs that can be passed to the KVM_GET_MSRS system ioctl. This lets userspace probe host capabilities and processor features that are exposed via MSRs (e.g., VMX capabilities). This list also varies by kvm version and host processor, but does not change otherwise.h]hX<KVM_GET_MSR_FEATURE_INDEX_LIST returns the list of MSRs that can be passed to the KVM_GET_MSRS system ioctl. This lets userspace probe host capabilities and processor features that are exposed via MSRs (e.g., VMX capabilities). This list also varies by kvm version and host processor, but does not change otherwise.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubj@)}(h.. _KVM_CHECK_EXTENSION:h]h}(h]h ]h"]h$]h&]jKkvm-check-extensionuh1j?hMhj/hhhhubeh}(h]5kvm-get-msr-index-list-kvm-get-msr-feature-index-listah ]h"]:4.3 kvm_get_msr_index_list, kvm_get_msr_feature_index_listah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h4.4 KVM_CHECK_EXTENSIONh]h4.4 KVM_CHECK_EXTENSION}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj? hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjS hhhKubjy)}(h.basic, KVM_CAP_CHECK_EXTENSION_VM for vm ioctlh]h)}(hjf h]h.basic, KVM_CAP_CHECK_EXTENSION_VM for vm ioctl}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjd ubah}(h]h ]h"]h$]h&]uh1jxhjS ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjP hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hallh]h)}(hj h]hall}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjP hhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hsystem ioctl, vm ioctlh]h)}(hj h]hsystem ioctl, vm ioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjP hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h extension identifier (KVM_CAP_*)h]h)}(hj h]h extension identifier (KVM_CAP_*)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjP hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hB0 if unsupported; 1 (or some other positive integer) if supported h]h)}(hA0 if unsupported; 1 (or some other positive integer) if supportedh]hA0 if unsupported; 1 (or some other positive integer) if supported}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjP hhubeh}(h]h ]h"]h$]h&]uh1j^hj? hhhhhM ubh)}(hX@The API allows the application to query about extensions to the core kvm API. Userspace passes an extension identifier (an integer) and receives an integer that describes the extension availability. Generally 0 means no and 1 means yes, but some extensions may report additional information in the integer return value.h]hX@The API allows the application to query about extensions to the core kvm API. Userspace passes an extension identifier (an integer) and receives an integer that describes the extension availability. Generally 0 means no and 1 means yes, but some extensions may report additional information in the integer return value.}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj? hhubh)}(hBased on their initialization different VMs may have different capabilities. It is thus encouraged to use the vm ioctl to query for capabilities (available with KVM_CAP_CHECK_EXTENSION_VM on the vm fd)h]hBased on their initialization different VMs may have different capabilities. It is thus encouraged to use the vm ioctl to query for capabilities (available with KVM_CAP_CHECK_EXTENSION_VM on the vm fd)}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj? hhubeh}(h](j6 id2eh ]h"](4.4 kvm_check_extensionkvm_check_extensioneh$]h&]uh1hhjhhhhhMjm}jb j, sjo}j6 j, subh)}(hhh](h)}(h4.5 KVM_GET_VCPU_MMAP_SIZEh]h4.5 KVM_GET_VCPU_MMAP_SIZE}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjg hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj{ hhhKubjy)}(hbasich]h)}(hj h]hbasic}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj{ ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjx hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hallh]h)}(hj h]hall}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjx hhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h system ioctlh]h)}(hj h]h system ioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjx hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hnoneh]h)}(hj h]hnone}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjx hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3 hhhKubjy)}(h!size of vcpu mmap area, in bytes h]h)}(h size of vcpu mmap area, in bytesh]h size of vcpu mmap area, in bytes}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjD ubah}(h]h ]h"]h$]h&]uh1jxhj3 ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjx hhubeh}(h]h ]h"]h$]h&]uh1j^hjg hhhhhMubh)}(hThe KVM_RUN ioctl (cf.) communicates with userspace via a shared memory region. This ioctl returns the size of that region. See the KVM_RUN documentation for details.h]hThe KVM_RUN ioctl (cf.) communicates with userspace via a shared memory region. This ioctl returns the size of that region. See the KVM_RUN documentation for details.}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjg hhubh)}(hxBesides the size of the KVM_RUN communication region, other areas of the VCPU file descriptor can be mmap-ed, including:h]hxBesides the size of the KVM_RUN communication region, other areas of the VCPU file descriptor can be mmap-ed, including:}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjg hhubh)}(hhh](j)}(hif KVM_CAP_COALESCED_MMIO is available, a page at KVM_COALESCED_MMIO_PAGE_OFFSET * PAGE_SIZE; for historical reasons, this page is included in the result of KVM_GET_VCPU_MMAP_SIZE. KVM_CAP_COALESCED_MMIO is not documented yet. h]h)}(hif KVM_CAP_COALESCED_MMIO is available, a page at KVM_COALESCED_MMIO_PAGE_OFFSET * PAGE_SIZE; for historical reasons, this page is included in the result of KVM_GET_VCPU_MMAP_SIZE. KVM_CAP_COALESCED_MMIO is not documented yet.h]hif KVM_CAP_COALESCED_MMIO is available, a page at KVM_COALESCED_MMIO_PAGE_OFFSET * PAGE_SIZE; for historical reasons, this page is included in the result of KVM_GET_VCPU_MMAP_SIZE. KVM_CAP_COALESCED_MMIO is not documented yet.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(hif KVM_CAP_DIRTY_LOG_RING is available, a number of pages at KVM_DIRTY_LOG_PAGE_OFFSET * PAGE_SIZE. For more information on KVM_CAP_DIRTY_LOG_RING, see :ref:`KVM_CAP_DIRTY_LOG_RING`. h]h)}(hif KVM_CAP_DIRTY_LOG_RING is available, a number of pages at KVM_DIRTY_LOG_PAGE_OFFSET * PAGE_SIZE. For more information on KVM_CAP_DIRTY_LOG_RING, see :ref:`KVM_CAP_DIRTY_LOG_RING`.h](hif KVM_CAP_DIRTY_LOG_RING is available, a number of pages at KVM_DIRTY_LOG_PAGE_OFFSET * PAGE_SIZE. For more information on KVM_CAP_DIRTY_LOG_RING, see }(hj hhhNhNubh)}(h:ref:`KVM_CAP_DIRTY_LOG_RING`h]j)}(hj h]hKVM_CAP_DIRTY_LOG_RING}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjkvm_cap_dirty_log_ringuh1hhhhM.hj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM.hj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhM)hjg hhubeh}(h]kvm-get-vcpu-mmap-sizeah ]h"]4.5 kvm_get_vcpu_mmap_sizeah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.7 KVM_CREATE_VCPUh]h4.7 KVM_CREATE_VCPU}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM4ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hbasich]h)}(hj h]hbasic}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM6hj hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+ hhhKubjy)}(hallh]h)}(hj> h]hall}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj< ubah}(h]h ]h"]h$]h&]uh1jxhj+ ubeh}(h]h ]h"]h$]h&]uh1jchhhM7hj hhubjd)}(hhh](ji)}(hTypeh]hType}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjY hhhKubjy)}(hvm ioctlh]h)}(hjl h]hvm ioctl}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjj ubah}(h]h ]h"]h$]h&]uh1jxhjY ubeh}(h]h ]h"]h$]h&]uh1jchhhM8hj hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hvcpu id (apic id on x86)h]h)}(hj h]hvcpu id (apic id on x86)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM9hj hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h vcpu fd on success, -1 on error h]h)}(hvcpu fd on success, -1 on errorh]hvcpu fd on success, -1 on error}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM:hj hhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhM6ubh)}(hThis API adds a vcpu to a virtual machine. No more than max_vcpus may be added. The vcpu id is an integer in the range [0, max_vcpu_id).h]hThis API adds a vcpu to a virtual machine. No more than max_vcpus may be added. The vcpu id is an integer in the range [0, max_vcpu_id).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj hhubh)}(hXThe recommended max_vcpus value can be retrieved using the KVM_CAP_NR_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time. The maximum possible value for max_vcpus can be retrieved using the KVM_CAP_MAX_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time.h]hXThe recommended max_vcpus value can be retrieved using the KVM_CAP_NR_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time. The maximum possible value for max_vcpus can be retrieved using the KVM_CAP_MAX_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj hhubh)}(hIf the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4 cpus max. If the KVM_CAP_MAX_VCPUS does not exist, you should assume that max_vcpus is same as the value returned from KVM_CAP_NR_VCPUS.h]hIf the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4 cpus max. If the KVM_CAP_MAX_VCPUS does not exist, you should assume that max_vcpus is same as the value returned from KVM_CAP_NR_VCPUS.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhj hhubh)}(hThe maximum possible value for max_vcpu_id can be retrieved using the KVM_CAP_MAX_VCPU_ID of the KVM_CHECK_EXTENSION ioctl() at run-time.h]hThe maximum possible value for max_vcpu_id can be retrieved using the KVM_CAP_MAX_VCPU_ID of the KVM_CHECK_EXTENSION ioctl() at run-time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj hhubh)}(hIf the KVM_CAP_MAX_VCPU_ID does not exist, you should assume that max_vcpu_id is the same as the value returned from KVM_CAP_MAX_VCPUS.h]hIf the KVM_CAP_MAX_VCPU_ID does not exist, you should assume that max_vcpu_id is the same as the value returned from KVM_CAP_MAX_VCPUS.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj hhubh)}(hXOn powerpc using book3s_hv mode, the vcpus are mapped onto virtual threads in one or more virtual CPU cores. (This is because the hardware requires all the hardware threads in a CPU core to be in the same partition.) The KVM_CAP_PPC_SMT capability indicates the number of vcpus per virtual core (vcore). The vcore id is obtained by dividing the vcpu id by the number of vcpus per vcore. The vcpus in a given vcore will always be in the same physical core as each other (though that might be a different physical core from time to time). Userspace can control the threading (SMT) mode of the guest by its allocation of vcpu ids. For example, if userspace wants single-threaded guest vcpus, it should make all vcpu ids be a multiple of the number of vcpus per vcore.h]hXOn powerpc using book3s_hv mode, the vcpus are mapped onto virtual threads in one or more virtual CPU cores. (This is because the hardware requires all the hardware threads in a CPU core to be in the same partition.) The KVM_CAP_PPC_SMT capability indicates the number of vcpus per virtual core (vcore). The vcore id is obtained by dividing the vcpu id by the number of vcpus per vcore. The vcpus in a given vcore will always be in the same physical core as each other (though that might be a different physical core from time to time). Userspace can control the threading (SMT) mode of the guest by its allocation of vcpu ids. For example, if userspace wants single-threaded guest vcpus, it should make all vcpu ids be a multiple of the number of vcpus per vcore.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj hhubh)}(hFor virtual cpus that have been created with S390 user controlled virtual machines, the resulting vcpu fd can be memory mapped at page offset KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual cpu's hardware control block.h]hFor virtual cpus that have been created with S390 user controlled virtual machines, the resulting vcpu fd can be memory mapped at page offset KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual cpu’s hardware control block.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hj hhubeh}(h]kvm-create-vcpuah ]h"]4.7 kvm_create_vcpuah$]h&]uh1hhjhhhhhM4ubh)}(hhh](h)}(h4.8 KVM_GET_DIRTY_LOGh]h4.8 KVM_GET_DIRTY_LOG}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThhhhhMcubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhhKubjy)}(hbasich]h)}(hj{h]hbasic}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjyubah}(h]h ]h"]h$]h&]uh1jxhjhubeh}(h]h ]h"]h$]h&]uh1jchhhMehjehhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hallh]h)}(hjh]hall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMfhjehhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMghjehhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_dirty_log (in/out)h]h)}(hjh]hstruct kvm_dirty_log (in/out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhhjehhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihj1ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMihjehhubeh}(h]h ]h"]h$]h&]uh1j^hjThhhhhMeubj$)}(h/* for KVM_GET_DIRTY_LOG */ struct kvm_dirty_log { __u32 slot; __u32 padding; union { void __user *dirty_bitmap; /* one bit per page */ __u64 padding; }; };h]h/* for KVM_GET_DIRTY_LOG */ struct kvm_dirty_log { __u32 slot; __u32 padding; union { void __user *dirty_bitmap; /* one bit per page */ __u64 padding; }; };}hjUsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMmhjThhubh)}(hGiven a memory slot, return a bitmap containing any pages dirtied since the last call to this ioctl. Bit 0 is the first page in the memory slot. Ensure the entire structure is cleared to avoid padding issues.h]hGiven a memory slot, return a bitmap containing any pages dirtied since the last call to this ioctl. Bit 0 is the first page in the memory slot. Ensure the entire structure is cleared to avoid padding issues.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjThhubh)}(hIf KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of slot field specifies the address space for which you want to return the dirty bitmap. See KVM_SET_USER_MEMORY_REGION for details on the usage of slot field.h]hIf KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of slot field specifies the address space for which you want to return the dirty bitmap. See KVM_SET_USER_MEMORY_REGION for details on the usage of slot field.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjThhubh)}(hThe bits in the dirty bitmap are cleared before the ioctl returns, unless KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is enabled. For more information, see the description of the capability.h]hThe bits in the dirty bitmap are cleared before the ioctl returns, unless KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is enabled. For more information, see the description of the capability.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(h}Note that the Xen shared_info page, if configured, shall always be assumed to be dirty. KVM will not explicitly mark it such.h]h}Note that the Xen shared_info page, if configured, shall always be assumed to be dirty. KVM will not explicitly mark it such.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubeh}(h]kvm-get-dirty-logah ]h"]4.8 kvm_get_dirty_logah$]h&]uh1hhjhhhhhMcubh)}(hhh](h)}(h 4.10 KVM_RUNh]h 4.10 KVM_RUN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hallh]h)}(hjh]hall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hj&h]h vcpu ioctl}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hnoneh]h)}(hjTh]hnone}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjRubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjohhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjoubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX======= ============================================================== EINTR an unmasked signal is pending ENOEXEC the vcpu hasn't been initialized or the guest tried to execute instructions from device memory (arm64) ENOSYS data abort outside memslots with no syndrome info and KVM_CAP_ARM_NISV_TO_USER not enabled (arm64) EPERM SVE feature set but not finalized (arm64) ======= ============================================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK>uh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEINTRh]hEINTR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(han unmasked signal is pendingh]han unmasked signal is pending}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hENOEXECh]hENOEXEC}(hjhhhNhNubah}(h]h G]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hfthe vcpu hasn't been initialized or the guest tried to execute instructions from device memory (arm64)h]hhthe vcpu hasn’t been initialized or the guest tried to execute instructions from device memory (arm64)}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1johj ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hENOSYSh]hENOSYS}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1johjAubjp)}(hhh]h)}(hbdata abort outside memslots with no syndrome info and KVM_CAP_ARM_NISV_TO_USER not enabled (arm64)h]hbdata abort outside memslots with no syndrome info and KVM_CAP_ARM_NISV_TO_USER not enabled (arm64)}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ubah}(h]h ]h"]h$]h&]uh1johjAubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hEPERMh]hEPERM}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{ubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(h)SVE feature set but not finalized (arm64)h]h)SVE feature set but not finalized (arm64)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjxubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX+This ioctl is used to run a guest virtual cpu. While there are no explicit parameters, there is an implicit parameter block that can be obtained by mmap()ing the vcpu fd at offset 0, with the size given by KVM_GET_VCPU_MMAP_SIZE. The parameter block is formatted as a 'struct kvm_run' (see below).h]hX/This ioctl is used to run a guest virtual cpu. While there are no explicit parameters, there is an implicit parameter block that can be obtained by mmap()ing the vcpu fd at offset 0, with the size given by KVM_GET_VCPU_MMAP_SIZE. The parameter block is formatted as a ‘struct kvm_run’ (see below).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-runah ]h"] 4.10 kvm_runah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.11 KVM_GET_REGSh]h4.11 KVM_GET_REGS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hall except arm64h]h)}(hj3h]hall except arm64}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNhhhKubjy)}(h vcpu ioctlh]h)}(hjah]h vcpu ioctl}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jxhjNubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|hhhKubjy)}(hstruct kvm_regs (out)h]h)}(hjh]hstruct kvm_regs (out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(h2Reads the general purpose registers from the vcpu.h]h2Reads the general purpose registers from the vcpu.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(hX/* x86 */ struct kvm_regs { /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ __u64 rax, rbx, rcx, rdx; __u64 rsi, rdi, rsp, rbp; __u64 r8, r9, r10, r11; __u64 r12, r13, r14, r15; __u64 rip, rflags; }; /* mips */ struct kvm_regs { /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ __u64 gpr[32]; __u64 hi; __u64 lo; __u64 pc; }; /* LoongArch */ struct kvm_regs { /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ unsigned long gpr[32]; unsigned long pc; };h]hX/* x86 */ struct kvm_regs { /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ __u64 rax, rbx, rcx, rdx; __u64 rsi, rdi, rsp, rbp; __u64 r8, r9, r10, r11; __u64 r12, r13, r14, r15; __u64 rip, rflags; }; /* mips */ struct kvm_regs { /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ __u64 gpr[32]; __u64 hi; __u64 lo; __u64 pc; }; /* LoongArch */ struct kvm_regs { /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ unsigned long gpr[32]; unsigned long pc; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubeh}(h] kvm-get-regsah ]h"]4.11 kvm_get_regsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.12 KVM_SET_REGSh]h4.12 KVM_SET_REGS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hj*h]hbasic}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(hall except arm64h]h)}(hjXh]hall except arm64}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjVubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjshhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjsubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_regs (in)h]h)}(hjh]hstruct kvm_regs (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(h3Writes the general purpose registers into the vcpu.h]h3Writes the general purpose registers into the vcpu.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h(See KVM_GET_REGS for the data structure.h]h(See KVM_GET_REGS for the data structure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] kvm-set-regsah ]h"]4.12 kvm_set_regsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.13 KVM_GET_SREGSh]h4.13 KVM_GET_SREGS}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<hhhKubjy)}(hbasich]h)}(hjOh]hbasic}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMubah}(h]h ]h"]h$]h&]uh1jxhj<ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjhhhKubjy)}(hx86, ppch]h)}(hj}h]hx86, ppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{ubah}(h]h ]h"]h$]h&]uh1jxhjjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_sregs (out)h]h)}(hjh]hstruct kvm_sregs (out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9hhubeh}(h]h ]h"]h$]h&]uh1j^hj(hhhhhMubh)}(h&Reads special registers from the vcpu.h]h&Reads special registers from the vcpu.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubj$)}(hXU/* x86 */ struct kvm_sregs { struct kvm_segment cs, ds, es, fs, gs, ss; struct kvm_segment tr, ldt; struct kvm_dtable gdt, idt; __u64 cr0, cr2, cr3, cr4, cr8; __u64 efer; __u64 apic_base; __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64]; }; /* ppc -- see arch/powerpc/include/uapi/asm/kvm.h */h]hXU/* x86 */ struct kvm_sregs { struct kvm_segment cs, ds, es, fs, gs, ss; struct kvm_segment tr, ldt; struct kvm_dtable gdt, idt; __u64 cr0, cr2, cr3, cr4, cr8; __u64 efer; __u64 apic_base; __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64]; }; /* ppc -- see arch/powerpc/include/uapi/asm/kvm.h */}hj7sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj(hhubh)}(hinterrupt_bitmap is a bitmap of pending external interrupts. At most one bit may be set. This interrupt has been acknowledged by the APIC but not yet injected into the cpu core.h]hinterrupt_bitmap is a bitmap of pending external interrupts. At most one bit may be set. This interrupt has been acknowledged by the APIC but not yet injected into the cpu core.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubeh}(h] kvm-get-sregsah ]h"]4.13 kvm_get_sregsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.14 KVM_SET_SREGSh]h4.14 KVM_SET_SREGS}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjohhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjoubeh}(h]h ]h"]h$]h&]uh1jchhhMhjlhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86, ppch]h)}(hjh]hx86, ppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjlhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjlhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_sregs (in)h]h)}(hj h]hstruct kvm_sregs (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjlhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj'hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8ubah}(h]h ]h"]h$]h&]uh1jxhj'ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjlhhubeh}(h]h ]h"]h$]h&]uh1j^hj[hhhhhMubh)}(hSWrites special registers into the vcpu. See KVM_GET_SREGS for the data structures.h]hSWrites special registers into the vcpu. See KVM_GET_SREGS for the data structures.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[hhubeh}(h] kvm-set-sregsah ]h"]4.14 kvm_set_sregsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.15 KVM_TRANSLATEh]h4.15 KVM_TRANSLATE}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_translation (in/out)h]h)}(hj#h]hstruct kvm_translation (in/out)}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj!ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj>hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjOubah}(h]h ]h"]h$]h&]uh1jxhj>ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjrhhhhhMubh)}(hVTranslates a virtual address according to the vcpu's current address translation mode.h]hXTranslates a virtual address according to the vcpu’s current address translation mode.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrhhubj$)}(hstruct kvm_translation { /* in */ __u64 linear_address; /* out */ __u64 physical_address; __u8 valid; __u8 writeable; __u8 usermode; __u8 pad[5]; };h]hstruct kvm_translation { /* in */ __u64 linear_address; /* out */ __u64 physical_address; __u8 valid; __u8 writeable; __u8 usermode; __u8 pad[5]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjrhhubeh}(h] kvm-translateah ]h"]4.15 kvm_translateah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.16 KVM_INTERRUPTh]h4.16 KVM_INTERRUPT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM!ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM#hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h x86, ppc, mips, riscv, loongarchh]h)}(hjh]h x86, ppc, mips, riscv, loongarch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM$hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM%hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(hstruct kvm_interrupt (in)h]h)}(hjHh]hstruct kvm_interrupt (in)}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjFubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhM&hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjchhhKubjy)}(h#0 on success, negative on failure. h]h)}(h"0 on success, negative on failure.h]h"0 on success, negative on failure.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjtubah}(h]h ]h"]h$]h&]uh1jxhjcubeh}(h]h ]h"]h$]h&]uh1jchhhM'hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM#ubh)}(h2Queues a hardware interrupt vector to be injected.h]h2Queues a hardware interrupt vector to be injected.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjhhubj$)}(hQ/* for KVM_INTERRUPT */ struct kvm_interrupt { /* in */ __u32 irq; };h]hQ/* for KVM_INTERRUPT */ struct kvm_interrupt { /* in */ __u32 irq; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM-hjhhubh)}(hhh](h)}(hX86:h]hX86:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM4ubj_)}(hhh]jd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hX========= =================================== 0 on success, -EEXIST if an interrupt is already enqueued -EINVAL the irq number is invalid -ENXIO if the PIC is in the kernel -EFAULT if the pointer is invalid ========= =================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK#uh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hjvh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h on success,h]h on success,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h-EEXISTh]h-EEXIST}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj3ubah}(h]h ]h"]h$]h&]uh1johj0ubjp)}(hhh]h)}(h#if an interrupt is already enqueuedh]h#if an interrupt is already enqueued}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjJubah}(h]h ]h"]h$]h&]uh1johj0ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h-EINVALh]h-EINVAL}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjjubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(hthe irq number is invalidh]hthe irq number is invalid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1johjgubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h-ENXIOh]h-ENXIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hif the PIC is in the kernelh]hif the PIC is in the kernel}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h-EFAULTh]h-EFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hif the pointer is invalidh]hif the pointer is invalid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM6hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM6ubh)}(hwNote 'irq' is an interrupt vector, not an interrupt pin or line. This ioctl is useful if the in-kernel PIC is not used.h]h{Note ‘irq’ is an interrupt vector, not an interrupt pin or line. This ioctl is useful if the in-kernel PIC is not used.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hjhhubeh}(h]id3ah ]h"]h$]jah&]uh1hhjhhhhhM4jKubh)}(hhh](h)}(hPPC:h]hPPC:}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhMDubh)}(hbQueues an external interrupt to be injected. This ioctl is overloaded with 3 different irq values:h]hbQueues an external interrupt to be injected. This ioctl is overloaded with 3 different irq values:}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhjFhhubhenumerated_list)}(hhh](j)}(hKVM_INTERRUPT_SET This injects an edge type external interrupt into the guest once it's ready to receive interrupts. When injected, the interrupt is done. h](h)}(hKVM_INTERRUPT_SETh]hKVM_INTERRUPT_SET}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjjubh)}(hThis injects an edge type external interrupt into the guest once it's ready to receive interrupts. When injected, the interrupt is done.h]hThis injects an edge type external interrupt into the guest once it’s ready to receive interrupts. When injected, the interrupt is done.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjjubeh}(h]h ]h"]h$]h&]uh1jhjghhhhhNubj)}(hdKVM_INTERRUPT_UNSET This unsets any pending interrupt. Only available with KVM_CAP_PPC_UNSET_IRQ. h](h)}(hKVM_INTERRUPT_UNSETh]hKVM_INTERRUPT_UNSET}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjubh)}(h"This unsets any pending interrupt.h]h"This unsets any pending interrupt.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjubh)}(h*Only available with KVM_CAP_PPC_UNSET_IRQ.h]h*Only available with KVM_CAP_PPC_UNSET_IRQ.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubeh}(h]h ]h"]h$]h&]uh1jhjghhhhhNubj)}(hKVM_INTERRUPT_SET_LEVEL This injects a level type external interrupt into the guest context. The interrupt stays pending until a specific ioctl with KVM_INTERRUPT_UNSET is triggered. Only available with KVM_CAP_PPC_IRQ_LEVEL. h](h)}(hKVM_INTERRUPT_SET_LEVELh]hKVM_INTERRUPT_SET_LEVEL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjubh)}(hThis injects a level type external interrupt into the guest context. The interrupt stays pending until a specific ioctl with KVM_INTERRUPT_UNSET is triggered.h]hThis injects a level type external interrupt into the guest context. The interrupt stays pending until a specific ioctl with KVM_INTERRUPT_UNSET is triggered.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjubh)}(h*Only available with KVM_CAP_PPC_IRQ_LEVEL.h]h*Only available with KVM_CAP_PPC_IRQ_LEVEL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjubeh}(h]h ]h"]h$]h&]uh1jhjghhhhhNubeh}(h]h ]h"]h$]h&]enumtype loweralphaprefixhsuffix)uh1jehjFhhhhhMIubh)}(hiNote that any value for 'irq' other than the ones stated above is invalid and incurs unexpected behavior.h]hmNote that any value for ‘irq’ other than the ones stated above is invalid and incurs unexpected behavior.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjFhhubh)}(hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.h]hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjFhhubeh}(h]ppcah ]h"]ppc:ah$]h&]uh1hhjhhhhhMDubh)}(hhh](h)}(hMIPS:h]hMIPS:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hhhhhMbubh)}(huQueues an external interrupt to be injected into the virtual CPU. A negative interrupt number dequeues the interrupt.h]huQueues an external interrupt to be injected into the virtual CPU. A negative interrupt number dequeues the interrupt.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj'hhubh)}(hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.h]hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj'hhubeh}(h]id4ah ]h"]h$]jah&]uh1hhjhhhhhMbjKubh)}(hhh](h)}(hRISC-V:h]hRISC-V:}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hhhhhMjubh)}(hwQueues an external interrupt to be injected into the virtual CPU. This ioctl is overloaded with 2 different irq values:h]hwQueues an external interrupt to be injected into the virtual CPU. This ioctl is overloaded with 2 different irq values:}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhj[hhubjf)}(hhh](j)}(hhKVM_INTERRUPT_SET This sets external interrupt for a virtual CPU and it will receive once it is ready. h](h)}(hKVM_INTERRUPT_SETh]hKVM_INTERRUPT_SET}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohj}ubh)}(hTThis sets external interrupt for a virtual CPU and it will receive once it is ready.h]hTThis sets external interrupt for a virtual CPU and it will receive once it is ready.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhj}ubeh}(h]h ]h"]h$]h&]uh1jhjzhhhhhNubj)}(hOKVM_INTERRUPT_UNSET This clears pending external interrupt for a virtual CPU. h](h)}(hKVM_INTERRUPT_UNSETh]hKVM_INTERRUPT_UNSET}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjubh)}(h9This clears pending external interrupt for a virtual CPU.h]h9This clears pending external interrupt for a virtual CPU.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjubeh}(h]h ]h"]h$]h&]uh1jhjzhhhhhNubeh}(h]h ]h"]h$]h&]jjjhjjuh1jehj[hhhhhMoubh)}(hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.h]hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhj[hhubeh}(h]risc-vah ]h"]risc-v:ah$]h&]uh1hhjhhhhhMjubh)}(hhh](h)}(h LOONGARCH:h]h LOONGARCH:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM{ubh)}(huQueues an external interrupt to be injected into the virtual CPU. A negative interrupt number dequeues the interrupt.h]huQueues an external interrupt to be injected into the virtual CPU. A negative interrupt number dequeues the interrupt.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjhhubh)}(hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.h]hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] loongarchah ]h"] loongarch:ah$]h&]uh1hhjhhhhhM{ubeh}(h] kvm-interruptah ]h"]4.16 kvm_interruptah$]h&]uh1hhjhhhhhM!ubh)}(hhh](h)}(h4.18 KVM_GET_MSRSh]h4.18 KVM_GET_MSRS}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj6hhhKubjy)}(h/basic (vcpu), KVM_CAP_GET_MSR_FEATURES (system)h]h)}(hjIh]h/basic (vcpu), KVM_CAP_GET_MSR_FEATURES (system)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1jxhj6ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj3hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjdhhhKubjy)}(hx86h]h)}(hjwh]hx86}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuubah}(h]h ]h"]h$]h&]uh1jxhjdubeh}(h]h ]h"]h$]h&]uh1jchhhMhj3hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hsystem ioctl, vcpu ioctlh]h)}(hjh]hsystem ioctl, vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj3hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_msrs (in/out)h]h)}(hjh]hstruct kvm_msrs (in/out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj3hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h2number of msrs successfully returned; -1 on error h]h)}(h1number of msrs successfully returned; -1 on errorh]h1number of msrs successfully returned; -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj3hhubeh}(h]h ]h"]h$]h&]uh1j^hj"hhhhhMubh)}(hXWhen used as a system ioctl: Reads the values of MSR-based features that are available for the VM. This is similar to KVM_GET_SUPPORTED_CPUID, but it returns MSR indices and values. The list of msr-based features can be obtained using KVM_GET_MSR_FEATURE_INDEX_LIST in a system ioctl.h]hXWhen used as a system ioctl: Reads the values of MSR-based features that are available for the VM. This is similar to KVM_GET_SUPPORTED_CPUID, but it returns MSR indices and values. The list of msr-based features can be obtained using KVM_GET_MSR_FEATURE_INDEX_LIST in a system ioctl.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubh)}(hWhen used as a vcpu ioctl: Reads model-specific registers from the vcpu. Supported msr indices can be obtained using KVM_GET_MSR_INDEX_LIST in a system ioctl.h]hWhen used as a vcpu ioctl: Reads model-specific registers from the vcpu. Supported msr indices can be obtained using KVM_GET_MSR_INDEX_LIST in a system ioctl.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubj$)}(hstruct kvm_msrs { __u32 nmsrs; /* number of msrs in entries */ __u32 pad; struct kvm_msr_entry entries[0]; }; struct kvm_msr_entry { __u32 index; __u32 reserved; __u64 data; };h]hstruct kvm_msrs { __u32 nmsrs; /* number of msrs in entries */ __u32 pad; struct kvm_msr_entry entries[0]; }; struct kvm_msr_entry { __u32 index; __u32 reserved; __u64 data; };}hj?sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj"hhubh)}(hApplication code should set the 'nmsrs' member (which indicates the size of the entries array) and the 'index' member of each array entry. kvm will fill in the 'data' member.h]hApplication code should set the ‘nmsrs’ member (which indicates the size of the entries array) and the ‘index’ member of each array entry. kvm will fill in the ‘data’ member.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubeh}(h] kvm-get-msrsah ]h"]4.18 kvm_get_msrsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.19 KVM_SET_MSRSh]h4.19 KVM_SET_MSRS}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjwubeh}(h]h ]h"]h$]h&]uh1jchhhMhjthhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjthhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjthhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_msrs (in)h]h)}(hjh]hstruct kvm_msrs (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjthhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj/hhhKubjy)}(h9number of msrs successfully set (see below), -1 on error h]h)}(h8number of msrs successfully set (see below), -1 on errorh]h8number of msrs successfully set (see below), -1 on error}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ubah}(h]h ]h"]h$]h&]uh1jxhj/ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjthhubeh}(h]h ]h"]h$]h&]uh1j^hjchhhhhMubh)}(hWWrites model-specific registers to the vcpu. See KVM_GET_MSRS for the data structures.h]hWWrites model-specific registers to the vcpu. See KVM_GET_MSRS for the data structures.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjchhubh)}(hApplication code should set the 'nmsrs' member (which indicates the size of the entries array), and the 'index' and 'data' members of each array entry.h]hApplication code should set the ‘nmsrs’ member (which indicates the size of the entries array), and the ‘index’ and ‘data’ members of each array entry.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjchhubh)}(hXIt tries to set the MSRs in array entries[] one by one. If setting an MSR fails, e.g., due to setting reserved bits, the MSR isn't supported/emulated by KVM, etc..., it stops processing the MSR list and returns the number of MSRs that have been set successfully.h]hXIt tries to set the MSRs in array entries[] one by one. If setting an MSR fails, e.g., due to setting reserved bits, the MSR isn’t supported/emulated by KVM, etc..., it stops processing the MSR list and returns the number of MSRs that have been set successfully.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjchhubeh}(h] kvm-set-msrsah ]h"]4.19 kvm_set_msrsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.20 KVM_SET_CPUIDh]h4.20 KVM_SET_CPUID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hstruct kvm_cpuid (in)h]h)}(hjGh]hstruct kvm_cpuid (in)}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjbhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjsubah}(h]h ]h"]h$]h&]uh1jxhjbubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(htDefines the vcpu responses to the cpuid instruction. Applications should use the KVM_SET_CPUID2 ioctl if available.h]htDefines the vcpu responses to the cpuid instruction. Applications should use the KVM_SET_CPUID2 ioctl if available.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hhh]j)}(hXCaveat emptor: - If this IOCTL fails, KVM gives no guarantees that previous valid CPUID configuration (if there is) is not corrupted. Userspace can get a copy of the resulting CPUID configuration through KVM_GET_CPUID2 in case. - Using KVM_SET_CPUID{,2} after KVM_RUN, i.e. changing the guest vCPU model after running the guest, may cause guest instability. - Using heterogeneous CPUID configurations, modulo APIC IDs, topology, etc... may cause guest instability. h](j)}(hCaveat emptor:h]hCaveat emptor:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(hhh]h)}(hhh](j)}(hIf this IOCTL fails, KVM gives no guarantees that previous valid CPUID configuration (if there is) is not corrupted. Userspace can get a copy of the resulting CPUID configuration through KVM_GET_CPUID2 in case.h]h)}(hIf this IOCTL fails, KVM gives no guarantees that previous valid CPUID configuration (if there is) is not corrupted. Userspace can get a copy of the resulting CPUID configuration through KVM_GET_CPUID2 in case.h]hIf this IOCTL fails, KVM gives no guarantees that previous valid CPUID configuration (if there is) is not corrupted. Userspace can get a copy of the resulting CPUID configuration through KVM_GET_CPUID2 in case.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hUsing KVM_SET_CPUID{,2} after KVM_RUN, i.e. changing the guest vCPU model after running the guest, may cause guest instability.h]h)}(hUsing KVM_SET_CPUID{,2} after KVM_RUN, i.e. changing the guest vCPU model after running the guest, may cause guest instability.h]hUsing KVM_SET_CPUID{,2} after KVM_RUN, i.e. changing the guest vCPU model after running the guest, may cause guest instability.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hiUsing heterogeneous CPUID configurations, modulo APIC IDs, topology, etc... may cause guest instability. h]h)}(hhUsing heterogeneous CPUID configurations, modulo APIC IDs, topology, etc... may cause guest instability.h]hhUsing heterogeneous CPUID configurations, modulo APIC IDs, topology, etc... may cause guest instability.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj$)}(hX struct kvm_cpuid_entry { __u32 function; __u32 eax; __u32 ebx; __u32 ecx; __u32 edx; __u32 padding; }; /* for KVM_SET_CPUID */ struct kvm_cpuid { __u32 nent; __u32 padding; struct kvm_cpuid_entry entries[0]; };h]hX struct kvm_cpuid_entry { __u32 function; __u32 eax; __u32 ebx; __u32 ecx; __u32 edx; __u32 padding; }; /* for KVM_SET_CPUID */ struct kvm_cpuid { __u32 nent; __u32 padding; struct kvm_cpuid_entry entries[0]; };}hj sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubeh}(h] kvm-set-cpuidah ]h"]4.20 kvm_set_cpuidah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.21 KVM_SET_SIGNAL_MASKh]h4.21 KVM_SET_SIGNAL_MASK}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6 hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjJ hhhKubjy)}(hbasich]h)}(hj] h]hbasic}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ ubah}(h]h ]h"]h$]h&]uh1jxhjJ ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjG hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjx hhhKubjy)}(hallh]h)}(hj h]hall}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjx ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjG hhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h vcpu ioctlh]h)}(hj h]h vcpu ioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjG hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hstruct kvm_signal_mask (in)h]h)}(hj h]hstruct kvm_signal_mask (in)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjG hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjG hhubeh}(h]h ]h"]h$]h&]uh1j^hj6 hhhhhMubh)}(hXDefines which signals are blocked during execution of KVM_RUN. This signal mask temporarily overrides the threads signal mask. Any unblocked signal received (except SIGKILL and SIGSTOP, which retain their traditional behaviour) will cause KVM_RUN to return with -EINTR.h]hXDefines which signals are blocked during execution of KVM_RUN. This signal mask temporarily overrides the threads signal mask. Any unblocked signal received (except SIGKILL and SIGSTOP, which retain their traditional behaviour) will cause KVM_RUN to return with -EINTR.}(hj7!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6 hhubh)}(hRNote the signal will only be delivered if not blocked by the original signal mask.h]hRNote the signal will only be delivered if not blocked by the original signal mask.}(hjE!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6 hhubj$)}(ha/* for KVM_SET_SIGNAL_MASK */ struct kvm_signal_mask { __u32 len; __u8 sigset[0]; };h]ha/* for KVM_SET_SIGNAL_MASK */ struct kvm_signal_mask { __u32 len; __u8 sigset[0]; };}hjS!sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj6 hhubeh}(h]kvm-set-signal-maskah ]h"]4.21 kvm_set_signal_maskah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.22 KVM_GET_FPUh]h4.22 KVM_GET_FPU}(hjl!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji!hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}!hhhKubjy)}(hbasich]h)}(hj!h]hbasic}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jxhj}!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjz!hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(hx86, loongarchh]h)}(hj!h]hx86, loongarch}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjz!hhubjd)}(hhh](ji)}(hTypeh]hType}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(h vcpu ioctlh]h)}(hj!h]h vcpu ioctl}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjz!hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj "hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(hstruct kvm_fpu (out)h]h)}(hj"h]hstruct kvm_fpu (out)}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj"ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjz!hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj8"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5"hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjJ"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjF"ubah}(h]h ]h"]h$]h&]uh1jxhj5"ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjz!hhubeh}(h]h ]h"]h$]h&]uh1j^hji!hhhhhMubh)}(h-Reads the floating point state from the vcpu.h]h-Reads the floating point state from the vcpu.}(hjj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hji!hhubj$)}(hX/* x86: for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u8 fpr[8][16]; __u16 fcw; __u16 fsw; __u8 ftwx; /* in fxsave format */ __u8 pad1; __u16 last_opcode; __u64 last_ip; __u64 last_dp; __u8 xmm[16][16]; __u32 mxcsr; __u32 pad2; }; /* LoongArch: for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u32 fcsr; __u64 fcc; struct kvm_fpureg { __u64 val64[4]; }fpr[32]; };h]hX/* x86: for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u8 fpr[8][16]; __u16 fcw; __u16 fsw; __u8 ftwx; /* in fxsave format */ __u8 pad1; __u16 last_opcode; __u64 last_ip; __u64 last_dp; __u8 xmm[16][16]; __u32 mxcsr; __u32 pad2; }; /* LoongArch: for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u32 fcsr; __u64 fcc; struct kvm_fpureg { __u64 val64[4]; }fpr[32]; };}hjx"sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhji!hhubeh}(h] kvm-get-fpuah ]h"]4.22 kvm_get_fpuah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.23 KVM_SET_FPUh]h4.23 KVM_SET_FPU}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhM*ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(hbasich]h)}(hj"h]hbasic}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj"ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhM,hj"hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(hx86, loongarchh]h)}(hj"h]hx86, loongarch}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj"ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhM-hj"hhubjd)}(hhh](ji)}(hTypeh]hType}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(h vcpu ioctlh]h)}(hj#h]h vcpu ioctl}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hj#ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhM.hj"hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj/#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,#hhhKubjy)}(hstruct kvm_fpu (in)h]h)}(hj?#h]hstruct kvm_fpu (in)}(hjA#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj=#ubah}(h]h ]h"]h$]h&]uh1jxhj,#ubeh}(h]h ]h"]h$]h&]uh1jchhhM/hj"hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj]#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjZ#hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjo#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hjk#ubah}(h]h ]h"]h$]h&]uh1jxhjZ#ubeh}(h]h ]h"]h$]h&]uh1jchhhM0hj"hhubeh}(h]h ]h"]h$]h&]uh1j^hj"hhhhhM,ubh)}(h,Writes the floating point state to the vcpu.h]h,Writes the floating point state to the vcpu.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hj"hhubj$)}(hX/* x86: for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u8 fpr[8][16]; __u16 fcw; __u16 fsw; __u8 ftwx; /* in fxsave format */ __u8 pad1; __u16 last_opcode; __u64 last_ip; __u64 last_dp; __u8 xmm[16][16]; __u32 mxcsr; __u32 pad2; }; /* LoongArch: for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u32 fcsr; __u64 fcc; struct kvm_fpureg { __u64 val64[4]; }fpr[32]; };h]hX/* x86: for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u8 fpr[8][16]; __u16 fcw; __u16 fsw; __u8 ftwx; /* in fxsave format */ __u8 pad1; __u16 last_opcode; __u64 last_ip; __u64 last_dp; __u8 xmm[16][16]; __u32 mxcsr; __u32 pad2; }; /* LoongArch: for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u32 fcsr; __u64 fcc; struct kvm_fpureg { __u64 val64[4]; }fpr[32]; };}hj#sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM6hj"hhubeh}(h] kvm-set-fpuah ]h"]4.23 kvm_set_fpuah$]h&]uh1hhjhhhhhM*ubh)}(hhh](h)}(h4.24 KVM_CREATE_IRQCHIPh]h4.24 KVM_CREATE_IRQCHIP}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hhhhhMPubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj#hhhKubjy)}(h,KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390)h]h)}(hj#h]h,KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390)}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj#ubah}(h]h ]h"]h$]h&]uh1jxhj#ubeh}(h]h ]h"]h$]h&]uh1jchhhMRhj#hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj#hhhKubjy)}(hx86, arm64, s390h]h)}(hj$h]hx86, arm64, s390}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj$ubah}(h]h ]h"]h$]h&]uh1jxhj#ubeh}(h]h ]h"]h$]h&]uh1jchhhMShj#hhubjd)}(hhh](ji)}(hTypeh]hType}(hj&$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj#$hhhKubjy)}(hvm ioctlh]h)}(hj6$h]hvm ioctl}(hj8$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj4$ubah}(h]h ]h"]h$]h&]uh1jxhj#$ubeh}(h]h ]h"]h$]h&]uh1jchhhMThj#hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjT$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQ$hhhKubjy)}(hnoneh]h)}(hjd$h]hnone}(hjf$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjb$ubah}(h]h ]h"]h$]h&]uh1jxhjQ$ubeh}(h]h ]h"]h$]h&]uh1jchhhMUhj#hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj$ubah}(h]h ]h"]h$]h&]uh1jxhj$ubeh}(h]h ]h"]h$]h&]uh1jchhhMVhj#hhubeh}(h]h ]h"]h$]h&]uh1j^hj#hhhhhMRubh)}(hXCreates an interrupt controller model in the kernel. On x86, creates a virtual ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 only go to the IOAPIC. On arm64, a GICv2 is created. Any other GIC versions require the usage of KVM_CREATE_DEVICE, which also supports creating a GICv2. Using KVM_CREATE_DEVICE is preferred over KVM_CREATE_IRQCHIP for GICv2. On s390, a dummy irq routing table is created.h]hXCreates an interrupt controller model in the kernel. On x86, creates a virtual ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 only go to the IOAPIC. On arm64, a GICv2 is created. Any other GIC versions require the usage of KVM_CREATE_DEVICE, which also supports creating a GICv2. Using KVM_CREATE_DEVICE is preferred over KVM_CREATE_IRQCHIP for GICv2. On s390, a dummy irq routing table is created.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj#hhubh)}(hsNote that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled before KVM_CREATE_IRQCHIP can be used.h]hsNote that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled before KVM_CREATE_IRQCHIP can be used.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahj#hhubeh}(h]kvm-create-irqchipah ]h"]4.24 kvm_create_irqchipah$]h&]uh1hhjhhhhhMPubh)}(hhh](h)}(h4.25 KVM_IRQ_LINEh]h4.25 KVM_IRQ_LINE}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hhhhhMfubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$hhhKubjy)}(hKVM_CAP_IRQCHIPh]h)}(hj$h]hKVM_CAP_IRQCHIP}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhj$ubah}(h]h ]h"]h$]h&]uh1jxhj$ubeh}(h]h ]h"]h$]h&]uh1jchhhMhhj$hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj%hhhKubjy)}(h x86, arm64h]h)}(hj-%h]h x86, arm64}(hj/%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihj+%ubah}(h]h ]h"]h$]h&]uh1jxhj%ubeh}(h]h ]h"]h$]h&]uh1jchhhMihj$hhubjd)}(hhh](ji)}(hTypeh]hType}(hjK%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjH%hhhKubjy)}(hvm ioctlh]h)}(hj[%h]hvm ioctl}(hj]%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjY%ubah}(h]h ]h"]h$]h&]uh1jxhjH%ubeh}(h]h ]h"]h$]h&]uh1jchhhMjhj$hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjy%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjv%hhhKubjy)}(hstruct kvm_irq_levelh]h)}(hj%h]hstruct kvm_irq_level}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj%ubah}(h]h ]h"]h$]h&]uh1jxhjv%ubeh}(h]h ]h"]h$]h&]uh1jchhhMkhj$hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj%hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhj%ubah}(h]h ]h"]h$]h&]uh1jxhj%ubeh}(h]h ]h"]h$]h&]uh1jchhhMlhj$hhubeh}(h]h ]h"]h$]h&]uh1j^hj$hhhhhMhubh)}(hX%Sets the level of a GSI input to the interrupt controller model in the kernel. On some architectures it is required that an interrupt controller model has been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered interrupts require the level to be set to 1 and then back to 0.h]hX%Sets the level of a GSI input to the interrupt controller model in the kernel. On some architectures it is required that an interrupt controller model has been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered interrupts require the level to be set to 1 and then back to 0.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj$hhubh)}(hOn real hardware, interrupt pins can be active-low or active-high. This does not matter for the level field of struct kvm_irq_level: 1 always means active (asserted), 0 means inactive (deasserted).h]hOn real hardware, interrupt pins can be active-low or active-high. This does not matter for the level field of struct kvm_irq_level: 1 always means active (asserted), 0 means inactive (deasserted).}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj$hhubh)}(hXx86 allows the operating system to program the interrupt polarity (active-low/active-high) for level-triggered interrupts, and KVM used to consider the polarity. However, due to bitrot in the handling of active-low interrupts, the above convention is now valid on x86 too. This is signaled by KVM_CAP_X86_IOAPIC_POLARITY_IGNORED. Userspace should not present interrupts to the guest as active-low unless this capability is present (or unless it is not using the in-kernel irqchip, of course).h]hXx86 allows the operating system to program the interrupt polarity (active-low/active-high) for level-triggered interrupts, and KVM used to consider the polarity. However, due to bitrot in the handling of active-low interrupts, the above convention is now valid on x86 too. This is signaled by KVM_CAP_X86_IOAPIC_POLARITY_IGNORED. Userspace should not present interrupts to the guest as active-low unless this capability is present (or unless it is not using the in-kernel irqchip, of course).}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhj$hhubh)}(harm64 can signal an interrupt either at the CPU level, or at the in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to use PPIs designated for specific cpus. The irq field is interpreted like this::h]harm64 can signal an interrupt either at the CPU level, or at the in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to use PPIs designated for specific cpus. The irq field is interpreted like this:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubj$)}(hubits: | 31 ... 28 | 27 ... 24 | 23 ... 16 | 15 ... 0 | field: | vcpu2_index | irq_type | vcpu_index | irq_id |h]hubits: | 31 ... 28 | 27 ... 24 | 23 ... 16 | 15 ... 0 | field: | vcpu2_index | irq_type | vcpu_index | irq_id |}hj&sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj$hhubh)}(h,The irq_type field has the following values:h]h,The irq_type field has the following values:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubh)}(hhh](j)}(hVKVM_ARM_IRQ_TYPE_CPU: out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQh]j)}(hhh]j)}(hIKVM_ARM_IRQ_TYPE_CPU: out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQh](j)}(hKVM_ARM_IRQ_TYPE_CPU:h]hKVM_ARM_IRQ_TYPE_CPU:}(hj;&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj7&ubj)}(hhh]h)}(h3out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQh]h3out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQ}(hjL&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjI&ubah}(h]h ]h"]h$]h&]uh1jhj7&ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj4&ubah}(h]h ]h"]h$]h&]uh1jhj0&ubah}(h]h ]h"]h$]h&]uh1jhj-&hhhNhNubj)}(hKVM_ARM_IRQ_TYPE_SPI: in-kernel GIC: SPI, irq_id between 32 and 1019 (incl.) (the vcpu_index field is ignored)h]j)}(hhh]j)}(hnKVM_ARM_IRQ_TYPE_SPI: in-kernel GIC: SPI, irq_id between 32 and 1019 (incl.) (the vcpu_index field is ignored)h](j)}(hKVM_ARM_IRQ_TYPE_SPI:h]hKVM_ARM_IRQ_TYPE_SPI:}(hj}&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjy&ubj)}(hhh]h)}(hXin-kernel GIC: SPI, irq_id between 32 and 1019 (incl.) (the vcpu_index field is ignored)h]hXin-kernel GIC: SPI, irq_id between 32 and 1019 (incl.) (the vcpu_index field is ignored)}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jhjy&ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjv&ubah}(h]h ]h"]h$]h&]uh1jhjr&ubah}(h]h ]h"]h$]h&]uh1jhj-&hhhNhNubj)}(hXKVM_ARM_IRQ_TYPE_PPI: in-kernel GIC: PPI, irq_id between 16 and 31 (incl.) h]j)}(hhh]j)}(hKKVM_ARM_IRQ_TYPE_PPI: in-kernel GIC: PPI, irq_id between 16 and 31 (incl.) h](j)}(hKVM_ARM_IRQ_TYPE_PPI:h]hKVM_ARM_IRQ_TYPE_PPI:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj&ubj)}(hhh]h)}(h4in-kernel GIC: PPI, irq_id between 16 and 31 (incl.)h]h4in-kernel GIC: PPI, irq_id between 16 and 31 (incl.)}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhj-&hhhNhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj$hhubh)}(hM(The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs)h]hM(The irq_id field thus corresponds nicely to the IRQ ID in the ARM GIC specs)}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubh)}(h9In both cases, level is used to assert/deassert the line.h]h9In both cases, level is used to assert/deassert the line.}(hj 'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubh)}(hWhen KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 is supported, the target vcpu is identified as (256 * vcpu2_index + vcpu_index). Otherwise, vcpu2_index must be zero.h]hWhen KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 is supported, the target vcpu is identified as (256 * vcpu2_index + vcpu_index). Otherwise, vcpu2_index must be zero.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubh)}(hNote that on arm64, the KVM_CAP_IRQCHIP capability only conditions injection of interrupts for the in-kernel irqchip. KVM_IRQ_LINE can always be used for a userspace interrupt controller.h]hNote that on arm64, the KVM_CAP_IRQCHIP capability only conditions injection of interrupts for the in-kernel irqchip. KVM_IRQ_LINE can always be used for a userspace interrupt controller.}(hj&'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubj$)}(hstruct kvm_irq_level { union { __u32 irq; /* GSI */ __s32 status; /* not used for KVM_IRQ_LEVEL */ }; __u32 level; /* 0 or 1 */ };h]hstruct kvm_irq_level { union { __u32 irq; /* GSI */ __s32 status; /* not used for KVM_IRQ_LEVEL */ }; __u32 level; /* 0 or 1 */ };}hj4'sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj$hhubeh}(h] kvm-irq-lineah ]h"]4.25 kvm_irq_lineah$]h&]uh1hhjhhhhhMfubh)}(hhh](h)}(h4.26 KVM_GET_IRQCHIPh]h4.26 KVM_GET_IRQCHIP}(hjM'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ'hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hja'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj^'hhhKubjy)}(hKVM_CAP_IRQCHIPh]h)}(hjq'h]hKVM_CAP_IRQCHIP}(hjs'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo'ubah}(h]h ]h"]h$]h&]uh1jxhj^'ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj['hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj'hhhKubjy)}(hx86h]h)}(hj'h]hx86}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jxhj'ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj['hhubjd)}(hhh](ji)}(hTypeh]hType}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj'hhhKubjy)}(hvm ioctlh]h)}(hj'h]hvm ioctl}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jxhj'ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj['hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj'hhhKubjy)}(hstruct kvm_irqchip (in/out)h]h)}(hj'h]hstruct kvm_irqchip (in/out)}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jxhj'ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj['hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj+(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'(ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj['hhubeh}(h]h ]h"]h$]h&]uh1j^hjJ'hhhhhMubh)}(hvReads the state of a kernel interrupt controller created with KVM_CREATE_IRQCHIP into a buffer provided by the caller.h]hvReads the state of a kernel interrupt controller created with KVM_CREATE_IRQCHIP into a buffer provided by the caller.}(hjK(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJ'hhubj$)}(hX struct kvm_irqchip { __u32 chip_id; /* 0 = PIC1, 1 = PIC2, 2 = IOAPIC */ __u32 pad; union { char dummy[512]; /* reserving space */ struct kvm_pic_state pic; struct kvm_ioapic_state ioapic; } chip; };h]hX struct kvm_irqchip { __u32 chip_id; /* 0 = PIC1, 1 = PIC2, 2 = IOAPIC */ __u32 pad; union { char dummy[512]; /* reserving space */ struct kvm_pic_state pic; struct kvm_ioapic_state ioapic; } chip; };}hjY(sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjJ'hhubeh}(h]kvm-get-irqchipah ]h"]4.26 kvm_get_irqchipah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.27 KVM_SET_IRQCHIPh]h4.27 KVM_SET_IRQCHIP}(hjr(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo(hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(hhhKubjy)}(hKVM_CAP_IRQCHIPh]h)}(hj(h]hKVM_CAP_IRQCHIP}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj(hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(hhhKubjy)}(hx86h]h)}(hj(h]hx86}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj(hhubjd)}(hhh](ji)}(hTypeh]hType}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(hhhKubjy)}(hvm ioctlh]h)}(hj(h]hvm ioctl}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj(hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj )hhhKubjy)}(hstruct kvm_irqchip (in)h]h)}(hj )h]hstruct kvm_irqchip (in)}(hj")hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubah}(h]h ]h"]h$]h&]uh1jxhj )ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj(hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj>)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj;)hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjP)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjL)ubah}(h]h ]h"]h$]h&]uh1jxhj;)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj(hhubeh}(h]h ]h"]h$]h&]uh1j^hjo(hhhhhMubh)}(huSets the state of a kernel interrupt controller created with KVM_CREATE_IRQCHIP from a buffer provided by the caller.h]huSets the state of a kernel interrupt controller created with KVM_CREATE_IRQCHIP from a buffer provided by the caller.}(hjp)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo(hhubj$)}(hX struct kvm_irqchip { __u32 chip_id; /* 0 = PIC1, 1 = PIC2, 2 = IOAPIC */ __u32 pad; union { char dummy[512]; /* reserving space */ struct kvm_pic_state pic; struct kvm_ioapic_state ioapic; } chip; };h]hX struct kvm_irqchip { __u32 chip_id; /* 0 = PIC1, 1 = PIC2, 2 = IOAPIC */ __u32 pad; union { char dummy[512]; /* reserving space */ struct kvm_pic_state pic; struct kvm_ioapic_state ioapic; } chip; };}hj~)sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjo(hhubeh}(h]kvm-set-irqchipah ]h"]4.27 kvm_set_irqchipah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.28 KVM_XEN_HVM_CONFIGh]h4.28 KVM_XEN_HVM_CONFIG}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)hhhKubjy)}(hKVM_CAP_XEN_HVMh]h)}(hj)h]hKVM_CAP_XEN_HVM}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubah}(h]h ]h"]h$]h&]uh1jxhj)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj)hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)hhhKubjy)}(hx86h]h)}(hj)h]hx86}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubah}(h]h ]h"]h$]h&]uh1jxhj)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj)hhubjd)}(hhh](ji)}(hTypeh]hType}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj*hhhKubjy)}(hvm ioctlh]h)}(hj*h]hvm ioctl}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jxhj*ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj)hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj5*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj2*hhhKubjy)}(hstruct kvm_xen_hvm_config (in)h]h)}(hjE*h]hstruct kvm_xen_hvm_config (in)}(hjG*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC*ubah}(h]h ]h"]h$]h&]uh1jxhj2*ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj)hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjc*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj`*hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hju*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjq*ubah}(h]h ]h"]h$]h&]uh1jxhj`*ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj)hhubeh}(h]h ]h"]h$]h&]uh1j^hj)hhhhhMubh)}(hXSets the MSR that the Xen HVM guest uses to initialize its hypercall page, and provides the starting address and size of the hypercall blobs in userspace. When the guest writes the MSR, kvm copies one page of a blob (32- or 64-bit, depending on the vcpu mode) to guest memory.h]hXSets the MSR that the Xen HVM guest uses to initialize its hypercall page, and provides the starting address and size of the hypercall blobs in userspace. When the guest writes the MSR, kvm copies one page of a blob (32- or 64-bit, depending on the vcpu mode) to guest memory.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(hThe MSR index must be in the range [0x40000000, 0x4fffffff], i.e. must reside in the range that is unofficially reserved for use by hypervisors. The min/max values are enumerated via KVM_XEN_MSR_MIN_INDEX and KVM_XEN_MSR_MAX_INDEX.h]hThe MSR index must be in the range [0x40000000, 0x4fffffff], i.e. must reside in the range that is unofficially reserved for use by hypervisors. The min/max values are enumerated via KVM_XEN_MSR_MIN_INDEX and KVM_XEN_MSR_MAX_INDEX.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubj$)}(hstruct kvm_xen_hvm_config { __u32 flags; __u32 msr; __u64 blob_addr_32; __u64 blob_addr_64; __u8 blob_size_32; __u8 blob_size_64; __u8 pad2[30]; };h]hstruct kvm_xen_hvm_config { __u32 flags; __u32 msr; __u64 blob_addr_32; __u64 blob_addr_64; __u8 blob_size_32; __u8 blob_size_64; __u8 pad2[30]; };}hj*sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj)hhubh)}(hoIf certain flags are returned from the KVM_CAP_XEN_HVM check, they may be set in the flags field of this ioctl:h]hoIf certain flags are returned from the KVM_CAP_XEN_HVM check, they may be set in the flags field of this ioctl:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(hXThe KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL flag requests KVM to generate the contents of the hypercall page automatically; hypercalls will be intercepted and passed to userspace through KVM_EXIT_XEN. In this case, all of the blob size and address fields must be zero.h]hXThe KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL flag requests KVM to generate the contents of the hypercall page automatically; hypercalls will be intercepted and passed to userspace through KVM_EXIT_XEN. In this case, all of the blob size and address fields must be zero.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(hX The KVM_XEN_HVM_CONFIG_EVTCHN_SEND flag indicates to KVM that userspace will always use the KVM_XEN_HVM_EVTCHN_SEND ioctl to deliver event channel interrupts rather than manipulating the guest's shared_info structures directly. This, in turn, may allow KVM to enable features such as intercepting the SCHEDOP_poll hypercall to accelerate PV spinlock operation for the guest. Userspace may still use the ioctl to deliver events if it was advertised, even if userspace does not send this indication that it will always do soh]hX The KVM_XEN_HVM_CONFIG_EVTCHN_SEND flag indicates to KVM that userspace will always use the KVM_XEN_HVM_EVTCHN_SEND ioctl to deliver event channel interrupts rather than manipulating the guest’s shared_info structures directly. This, in turn, may allow KVM to enable features such as intercepting the SCHEDOP_poll hypercall to accelerate PV spinlock operation for the guest. Userspace may still use the ioctl to deliver events if it was advertised, even if userspace does not send this indication that it will always do so}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(hDNo other flags are currently valid in the struct kvm_xen_hvm_config.h]hDNo other flags are currently valid in the struct kvm_xen_hvm_config.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj)hhubeh}(h]kvm-xen-hvm-configah ]h"]4.28 kvm_xen_hvm_configah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.29 KVM_GET_CLOCKh]h4.29 KVM_GET_CLOCK}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+hhhKubjy)}(hKVM_CAP_ADJUST_CLOCKh]h)}(hj&+h]hKVM_CAP_ADJUST_CLOCK}(hj(+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$+ubah}(h]h ]h"]h$]h&]uh1jxhj+ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjD+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjA+hhhKubjy)}(hx86h]h)}(hjT+h]hx86}(hjV+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjR+ubah}(h]h ]h"]h$]h&]uh1jxhjA+ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubjd)}(hhh](ji)}(hTypeh]hType}(hjr+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjo+hhhKubjy)}(hvm ioctlh]h)}(hj+h]hvm ioctl}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jxhjo+ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+hhhKubjy)}(hstruct kvm_clock_data (out)h]h)}(hj+h]hstruct kvm_clock_data (out)}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jxhj+ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jxhj+ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubeh}(h]h ]h"]h$]h&]uh1j^hj*hhhhhMubh)}(hGets the current timestamp of kvmclock as seen by the current guest. In conjunction with KVM_SET_CLOCK, it is used to ensure monotonicity on scenarios such as migration.h]hGets the current timestamp of kvmclock as seen by the current guest. In conjunction with KVM_SET_CLOCK, it is used to ensure monotonicity on scenarios such as migration.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*hhubh)}(hWhen KVM_CAP_ADJUST_CLOCK is passed to KVM_CHECK_EXTENSION, it returns the set of bits that KVM can return in struct kvm_clock_data's flag member.h]hWhen KVM_CAP_ADJUST_CLOCK is passed to KVM_CHECK_EXTENSION, it returns the set of bits that KVM can return in struct kvm_clock_data’s flag member.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*hhubh)}(h The following flags are defined:h]h The following flags are defined:}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*hhubj)}(hhh](j)}(hXKVM_CLOCK_TSC_STABLE If set, the returned value is the exact kvmclock value seen by all VCPUs at the instant when KVM_GET_CLOCK was called. If clear, the returned value is simply CLOCK_MONOTONIC plus a constant offset; the offset can be modified with KVM_SET_CLOCK. KVM will try to make all VCPUs follow this clock, but the exact value read by each VCPU could differ, because the host TSC is not stable. h](j)}(hKVM_CLOCK_TSC_STABLEh]hKVM_CLOCK_TSC_STABLE}(hj1,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM&hj-,ubj)}(hhh]h)}(hXIf set, the returned value is the exact kvmclock value seen by all VCPUs at the instant when KVM_GET_CLOCK was called. If clear, the returned value is simply CLOCK_MONOTONIC plus a constant offset; the offset can be modified with KVM_SET_CLOCK. KVM will try to make all VCPUs follow this clock, but the exact value read by each VCPU could differ, because the host TSC is not stable.h]hXIf set, the returned value is the exact kvmclock value seen by all VCPUs at the instant when KVM_GET_CLOCK was called. If clear, the returned value is simply CLOCK_MONOTONIC plus a constant offset; the offset can be modified with KVM_SET_CLOCK. KVM will try to make all VCPUs follow this clock, but the exact value read by each VCPU could differ, because the host TSC is not stable.}(hjB,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj?,ubah}(h]h ]h"]h$]h&]uh1jhj-,ubeh}(h]h ]h"]h$]h&]uh1jhhhM&hj*,ubj)}(hKVM_CLOCK_REALTIME If set, the `realtime` field in the kvm_clock_data structure is populated with the value of the host's real time clocksource at the instant when KVM_GET_CLOCK was called. If clear, the `realtime` field does not contain a value. h](j)}(hKVM_CLOCK_REALTIMEh]hKVM_CLOCK_REALTIME}(hj`,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM,hj\,ubj)}(hhh]h)}(hIf set, the `realtime` field in the kvm_clock_data structure is populated with the value of the host's real time clocksource at the instant when KVM_GET_CLOCK was called. If clear, the `realtime` field does not contain a value.h](h If set, the }(hjq,hhhNhNubhtitle_reference)}(h `realtime`h]hrealtime}(hj{,hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjq,ubh field in the kvm_clock_data structure is populated with the value of the host’s real time clocksource at the instant when KVM_GET_CLOCK was called. If clear, the }(hjq,hhhNhNubjz,)}(h `realtime`h]hrealtime}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjq,ubh field does not contain a value.}(hjq,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM)hjn,ubah}(h]h ]h"]h$]h&]uh1jhj\,ubeh}(h]h ]h"]h$]h&]uh1jhhhM,hj*,hhubj)}(hKVM_CLOCK_HOST_TSC If set, the `host_tsc` field in the kvm_clock_data structure is populated with the value of the host's timestamp counter (TSC) at the instant when KVM_GET_CLOCK was called. If clear, the `host_tsc` field does not contain a value. h](j)}(hKVM_CLOCK_HOST_TSCh]hKVM_CLOCK_HOST_TSC}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM2hj,ubj)}(hhh]h)}(hIf set, the `host_tsc` field in the kvm_clock_data structure is populated with the value of the host's timestamp counter (TSC) at the instant when KVM_GET_CLOCK was called. If clear, the `host_tsc` field does not contain a value.h](h If set, the }(hj,hhhNhNubjz,)}(h `host_tsc`h]hhost_tsc}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj,ubh field in the kvm_clock_data structure is populated with the value of the host’s timestamp counter (TSC) at the instant when KVM_GET_CLOCK was called. If clear, the }(hj,hhhNhNubjz,)}(h `host_tsc`h]hhost_tsc}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj,ubh field does not contain a value.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM/hj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhhhM2hj*,hhubeh}(h]h ]h"]h$]h&]uh1jhj*hhhhhNubj$)}(hstruct kvm_clock_data { __u64 clock; /* kvmclock current value */ __u32 flags; __u32 pad0; __u64 realtime; __u64 host_tsc; __u32 pad[4]; };h]hstruct kvm_clock_data { __u64 clock; /* kvmclock current value */ __u32 flags; __u32 pad0; __u64 realtime; __u64 host_tsc; __u32 pad[4]; };}hj -sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM6hj*hhubeh}(h] kvm-get-clockah ]h"]4.29 kvm_get_clockah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.30 KVM_SET_CLOCKh]h4.30 KVM_SET_CLOCK}(hj#-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj -hhhhhMAubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj7-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4-hhhKubjy)}(hKVM_CAP_ADJUST_CLOCKh]h)}(hjG-h]hKVM_CAP_ADJUST_CLOCK}(hjI-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjE-ubah}(h]h ]h"]h$]h&]uh1jxhj4-ubeh}(h]h ]h"]h$]h&]uh1jchhhMChj1-hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hje-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjb-hhhKubjy)}(hx86h]h)}(hju-h]hx86}(hjw-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjs-ubah}(h]h ]h"]h$]h&]uh1jxhjb-ubeh}(h]h ]h"]h$]h&]uh1jchhhMDhj1-hhubjd)}(hhh](ji)}(hTypeh]hType}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj-hhhKubjy)}(hvm ioctlh]h)}(hj-h]hvm ioctl}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj-ubah}(h]h ]h"]h$]h&]uh1jxhj-ubeh}(h]h ]h"]h$]h&]uh1jchhhMEhj1-hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj-hhhKubjy)}(hstruct kvm_clock_data (in)h]h)}(hj-h]hstruct kvm_clock_data (in)}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj-ubah}(h]h ]h"]h$]h&]uh1jxhj-ubeh}(h]h ]h"]h$]h&]uh1jchhhMFhj1-hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj-hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj-ubah}(h]h ]h"]h$]h&]uh1jxhj-ubeh}(h]h ]h"]h$]h&]uh1jchhhMGhj1-hhubeh}(h]h ]h"]h$]h&]uh1j^hj -hhhhhMCubh)}(hSets the current timestamp of kvmclock to the value specified in its parameter. In conjunction with KVM_GET_CLOCK, it is used to ensure monotonicity on scenarios such as migration.h]hSets the current timestamp of kvmclock to the value specified in its parameter. In conjunction with KVM_GET_CLOCK, it is used to ensure monotonicity on scenarios such as migration.}(hj!.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj -hhubh)}(h"The following flags can be passed:h]h"The following flags can be passed:}(hj/.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj -hhubj)}(hhh]j)}(hXKVM_CLOCK_REALTIME If set, KVM will compare the value of the `realtime` field with the value of the host's real time clocksource at the instant when KVM_SET_CLOCK was called. The difference in elapsed time is added to the final kvmclock value that will be provided to guests. h](j)}(hKVM_CLOCK_REALTIMEh]hKVM_CLOCK_REALTIME}(hjD.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMShj@.ubj)}(hhh]h)}(hXIf set, KVM will compare the value of the `realtime` field with the value of the host's real time clocksource at the instant when KVM_SET_CLOCK was called. The difference in elapsed time is added to the final kvmclock value that will be provided to guests.h](h*If set, KVM will compare the value of the }(hjU.hhhNhNubjz,)}(h `realtime`h]hrealtime}(hj].hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjU.ubh field with the value of the host’s real time clocksource at the instant when KVM_SET_CLOCK was called. The difference in elapsed time is added to the final kvmclock value that will be provided to guests.}(hjU.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMPhjR.ubah}(h]h ]h"]h$]h&]uh1jhj@.ubeh}(h]h ]h"]h$]h&]uh1jhhhMShj=.ubah}(h]h ]h"]h$]h&]uh1jhj -hhhhhNubh)}(hCOther flags returned by ``KVM_GET_CLOCK`` are accepted but ignored.h](hOther flags returned by }(hj.hhhNhNubj)}(h``KVM_GET_CLOCK``h]h KVM_GET_CLOCK}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh are accepted but ignored.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMUhj -hhubj$)}(hstruct kvm_clock_data { __u64 clock; /* kvmclock current value */ __u32 flags; __u32 pad0; __u64 realtime; __u64 host_tsc; __u32 pad[4]; };h]hstruct kvm_clock_data { __u64 clock; /* kvmclock current value */ __u32 flags; __u32 pad0; __u64 realtime; __u64 host_tsc; __u32 pad[4]; };}hj.sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMYhj -hhubeh}(h] kvm-set-clockah ]h"]4.30 kvm_set_clockah$]h&]uh1hhjhhhhhMAubh)}(hhh](h)}(h4.31 KVM_GET_VCPU_EVENTSh]h4.31 KVM_GET_VCPU_EVENTS}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hhhhhMdubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj.hhhKubjy)}(hKVM_CAP_VCPU_EVENTSh]h)}(hj.h]hKVM_CAP_VCPU_EVENTS}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhj.ubah}(h]h ]h"]h$]h&]uh1jxhj.ubeh}(h]h ]h"]h$]h&]uh1jchhhMfhj.hhubjd)}(hhh](ji)}(h Extended byh]h Extended by}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj.hhhKubjy)}(hKVM_CAP_INTR_SHADOWh]h)}(hj/h]hKVM_CAP_INTR_SHADOW}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj/ubah}(h]h ]h"]h$]h&]uh1jxhj.ubeh}(h]h ]h"]h$]h&]uh1jchhhMghj.hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj0/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj-/hhhKubjy)}(h x86, arm64h]h)}(hj@/h]h x86, arm64}(hjB/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhj>/ubah}(h]h ]h"]h$]h&]uh1jxhj-/ubeh}(h]h ]h"]h$]h&]uh1jchhhMhhj.hhubjd)}(hhh](ji)}(hTypeh]hType}(hj^/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj[/hhhKubjy)}(h vcpu ioctlh]h)}(hjn/h]h vcpu ioctl}(hjp/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihjl/ubah}(h]h ]h"]h$]h&]uh1jxhj[/ubeh}(h]h ]h"]h$]h&]uh1jchhhMihj.hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj/hhhKubjy)}(hstruct kvm_vcpu_events (out)h]h)}(hj/h]hstruct kvm_vcpu_events (out)}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhj/ubah}(h]h ]h"]h$]h&]uh1jxhj/ubeh}(h]h ]h"]h$]h&]uh1jchhhMjhj.hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj/hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj/ubah}(h]h ]h"]h$]h&]uh1jxhj/ubeh}(h]h ]h"]h$]h&]uh1jchhhMkhj.hhubeh}(h]h ]h"]h$]h&]uh1j^hj.hhhhhMfubh)}(hhh](h)}(hX86:h]hX86:}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhMnubh)}(h^Gets currently pending exceptions, interrupts, and NMIs as well as related states of the vcpu.h]h^Gets currently pending exceptions, interrupts, and NMIs as well as related states of the vcpu.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj/hhubj$)}(hXstruct kvm_vcpu_events { struct { __u8 injected; __u8 nr; __u8 has_error_code; __u8 pending; __u32 error_code; } exception; struct { __u8 injected; __u8 nr; __u8 soft; __u8 shadow; } interrupt; struct { __u8 injected; __u8 pending; __u8 masked; __u8 pad; } nmi; __u32 sipi_vector; __u32 flags; struct { __u8 smm; __u8 pending; __u8 smm_inside_nmi; __u8 latched_init; } smi; __u8 reserved[27]; __u8 exception_has_payload; __u64 exception_payload; };h]hXstruct kvm_vcpu_events { struct { __u8 injected; __u8 nr; __u8 has_error_code; __u8 pending; __u32 error_code; } exception; struct { __u8 injected; __u8 nr; __u8 soft; __u8 shadow; } interrupt; struct { __u8 injected; __u8 pending; __u8 masked; __u8 pad; } nmi; __u32 sipi_vector; __u32 flags; struct { __u8 smm; __u8 pending; __u8 smm_inside_nmi; __u8 latched_init; } smi; __u8 reserved[27]; __u8 exception_has_payload; __u64 exception_payload; };}hj 0sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMuhj/hhubh)}(h2The following bits are defined in the flags field:h]h2The following bits are defined in the flags field:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubh)}(hhh](j)}(h^KVM_VCPUEVENT_VALID_SHADOW may be set to signal that interrupt.shadow contains a valid state. h]h)}(h]KVM_VCPUEVENT_VALID_SHADOW may be set to signal that interrupt.shadow contains a valid state.h]h]KVM_VCPUEVENT_VALID_SHADOW may be set to signal that interrupt.shadow contains a valid state.}(hj.0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*0ubah}(h]h ]h"]h$]h&]uh1jhj'0hhhhhNubj)}(hNKVM_VCPUEVENT_VALID_SMM may be set to signal that smi contains a valid state. h]h)}(hMKVM_VCPUEVENT_VALID_SMM may be set to signal that smi contains a valid state.h]hMKVM_VCPUEVENT_VALID_SMM may be set to signal that smi contains a valid state.}(hjF0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjB0ubah}(h]h ]h"]h$]h&]uh1jhj'0hhhhhNubj)}(hKVM_VCPUEVENT_VALID_PAYLOAD may be set to signal that the exception_has_payload, exception_payload, and exception.pending fields contain a valid state. This bit will be set whenever KVM_CAP_EXCEPTION_PAYLOAD is enabled. h]h)}(hKVM_VCPUEVENT_VALID_PAYLOAD may be set to signal that the exception_has_payload, exception_payload, and exception.pending fields contain a valid state. This bit will be set whenever KVM_CAP_EXCEPTION_PAYLOAD is enabled.h]hKVM_VCPUEVENT_VALID_PAYLOAD may be set to signal that the exception_has_payload, exception_payload, and exception.pending fields contain a valid state. This bit will be set whenever KVM_CAP_EXCEPTION_PAYLOAD is enabled.}(hj^0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ0ubah}(h]h ]h"]h$]h&]uh1jhj'0hhhhhNubj)}(hKVM_VCPUEVENT_VALID_TRIPLE_FAULT may be set to signal that the triple_fault_pending field contains a valid state. This bit will be set whenever KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled. h]h)}(hKVM_VCPUEVENT_VALID_TRIPLE_FAULT may be set to signal that the triple_fault_pending field contains a valid state. This bit will be set whenever KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled.h]hKVM_VCPUEVENT_VALID_TRIPLE_FAULT may be set to signal that the triple_fault_pending field contains a valid state. This bit will be set whenever KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled.}(hjv0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjr0ubah}(h]h ]h"]h$]h&]uh1jhj'0hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj/hhubeh}(h]id5ah ]h"]h$]x86:ah&]uh1hhj.hhhhhMnjKubh)}(hhh](h)}(hARM64:h]hARM64:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhMubh)}(hX'If the guest accesses a device that is being emulated by the host kernel in such a way that a real device would generate a physical SError, KVM may make a virtual SError pending for that VCPU. This system error interrupt remains pending until the guest takes the exception by unmasking PSTATE.A.h]hX'If the guest accesses a device that is being emulated by the host kernel in such a way that a real device would generate a physical SError, KVM may make a virtual SError pending for that VCPU. This system error interrupt remains pending until the guest takes the exception by unmasking PSTATE.A.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(hRunning the VCPU may cause it to take a pending SError, or make an access that causes an SError to become pending. The event's description is only valid while the VPCU is not running.h]hRunning the VCPU may cause it to take a pending SError, or make an access that causes an SError to become pending. The event’s description is only valid while the VPCU is not running.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(hXNThis API provides a way to read and write the pending 'event' state that is not visible to the guest. To save, restore or migrate a VCPU the struct representing the state can be read then written using this GET/SET API, along with the other guest-visible registers. It is not possible to 'cancel' an SError that has been made pending.h]hXVThis API provides a way to read and write the pending ‘event’ state that is not visible to the guest. To save, restore or migrate a VCPU the struct representing the state can be read then written using this GET/SET API, along with the other guest-visible registers. It is not possible to ‘cancel’ an SError that has been made pending.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(hXA device being emulated in user-space may also wish to generate an SError. To do this the events structure can be populated by user-space. The current state should be read first, to ensure no existing SError is pending. If an existing SError is pending, the architecture's 'Multiple SError interrupts' rules should be followed. (2.5.3 of DDI0587.a "ARM Reliability, Availability, and Serviceability (RAS) Specification").h]hXA device being emulated in user-space may also wish to generate an SError. To do this the events structure can be populated by user-space. The current state should be read first, to ensure no existing SError is pending. If an existing SError is pending, the architecture’s ‘Multiple SError interrupts’ rules should be followed. (2.5.3 of DDI0587.a “ARM Reliability, Availability, and Serviceability (RAS) Specification”).}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(hXSError exceptions always have an ESR value. Some CPUs have the ability to specify what the virtual SError's ESR value should be. These systems will advertise KVM_CAP_ARM_INJECT_SERROR_ESR. In this case exception.has_esr will always have a non-zero value when read, and the agent making an SError pending should specify the ISS field in the lower 24 bits of exception.serror_esr. If the system supports KVM_CAP_ARM_INJECT_SERROR_ESR, but user-space sets the events with exception.has_esr as zero, KVM will choose an ESR.h]hX SError exceptions always have an ESR value. Some CPUs have the ability to specify what the virtual SError’s ESR value should be. These systems will advertise KVM_CAP_ARM_INJECT_SERROR_ESR. In this case exception.has_esr will always have a non-zero value when read, and the agent making an SError pending should specify the ISS field in the lower 24 bits of exception.serror_esr. If the system supports KVM_CAP_ARM_INJECT_SERROR_ESR, but user-space sets the events with exception.has_esr as zero, KVM will choose an ESR.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(hSpecifying exception.has_esr on a system that does not support it will return -EINVAL. Setting anything other than the lower 24bits of exception.serror_esr will return -EINVAL.h]hSpecifying exception.has_esr on a system that does not support it will return -EINVAL. Setting anything other than the lower 24bits of exception.serror_esr will return -EINVAL.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(hIt is not possible to read back a pending external abort (injected via KVM_SET_VCPU_EVENTS or otherwise) because such an exception is always delivered directly to the virtual CPU).h]hIt is not possible to read back a pending external abort (injected via KVM_SET_VCPU_EVENTS or otherwise) because such an exception is always delivered directly to the virtual CPU).}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubj$)}(hX%struct kvm_vcpu_events { struct { __u8 serror_pending; __u8 serror_has_esr; __u8 ext_dabt_pending; /* Align it to 8 bytes */ __u8 pad[5]; __u64 serror_esr; } exception; __u32 reserved[12]; };h]hX%struct kvm_vcpu_events { struct { __u8 serror_pending; __u8 serror_has_esr; __u8 ext_dabt_pending; /* Align it to 8 bytes */ __u8 pad[5]; __u64 serror_esr; } exception; __u32 reserved[12]; };}hj 1sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj0hhubeh}(h]id6ah ]h"]h$]j%ah&]uh1hhj.hhhhhMjKubeh}(h]kvm-get-vcpu-eventsah ]h"]4.31 kvm_get_vcpu_eventsah$]h&]uh1hhjhhhhhMdubh)}(hhh](h)}(h4.32 KVM_SET_VCPU_EVENTSh]h4.32 KVM_SET_VCPU_EVENTS}(hj+1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(1hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj?1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<1hhhKubjy)}(hKVM_CAP_VCPU_EVENTSh]h)}(hjO1h]hKVM_CAP_VCPU_EVENTS}(hjQ1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjM1ubah}(h]h ]h"]h$]h&]uh1jxhj<1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj91hhubjd)}(hhh](ji)}(h Extended byh]h Extended by}(hjm1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjj1hhhKubjy)}(hKVM_CAP_INTR_SHADOWh]h)}(hj}1h]hKVM_CAP_INTR_SHADOW}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{1ubah}(h]h ]h"]h$]h&]uh1jxhjj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj91hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(h x86, arm64h]h)}(hj1h]h x86, arm64}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj91hhubjd)}(hhh](ji)}(hTypeh]hType}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(h vcpu ioctlh]h)}(hj1h]h vcpu ioctl}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj91hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(hstruct kvm_vcpu_events (in)h]h)}(hj2h]hstruct kvm_vcpu_events (in)}(hj 2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj91hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj%2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"2hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj72hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj32ubah}(h]h ]h"]h$]h&]uh1jxhj"2ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj91hhubeh}(h]h ]h"]h$]h&]uh1j^hj(1hhhhhMubh)}(hhh](h)}(hX86:h]hX86:}(hjZ2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjW2hhhhhMubh)}(hSSet pending exceptions, interrupts, and NMIs as well as related states of the vcpu.h]hSSet pending exceptions, interrupts, and NMIs as well as related states of the vcpu.}(hjh2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjW2hhubh)}(h/See KVM_GET_VCPU_EVENTS for the data structure.h]h/See KVM_GET_VCPU_EVENTS for the data structure.}(hjv2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjW2hhubh)}(hXFields that may be modified asynchronously by running VCPUs can be excluded from the update. These fields are nmi.pending, sipi_vector, smi.smm, smi.pending. Keep the corresponding bits in the flags field cleared to suppress overwriting the current in-kernel state. The bits are:h]hXFields that may be modified asynchronously by running VCPUs can be excluded from the update. These fields are nmi.pending, sipi_vector, smi.smm, smi.pending. Keep the corresponding bits in the flags field cleared to suppress overwriting the current in-kernel state. The bits are:}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjW2hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj2ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK"uh1jOhj2ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hKVM_VCPUEVENT_VALID_NMI_PENDINGh]hKVM_VCPUEVENT_VALID_NMI_PENDING}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1johj2ubjp)}(hhh]h)}(h"transfer nmi.pending to the kernelh]h"transfer nmi.pending to the kernel}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1johj2ubeh}(h]h ]h"]h$]h&]uh1jjhj2ubjk)}(hhh](jp)}(hhh]h)}(hKVM_VCPUEVENT_VALID_SIPI_VECTORh]hKVM_VCPUEVENT_VALID_SIPI_VECTOR}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1johj2ubjp)}(hhh]h)}(htransfer sipi_vectorh]htransfer sipi_vector}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1johj2ubeh}(h]h ]h"]h$]h&]uh1jjhj2ubjk)}(hhh](jp)}(hhh]h)}(hKVM_VCPUEVENT_VALID_SMMh]hKVM_VCPUEVENT_VALID_SMM}(hj#3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj 3ubah}(h]h ]h"]h$]h&]uh1johj3ubjp)}(hhh]h)}(htransfer the smi sub-struct.h]htransfer the smi sub-struct.}(hj:3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj73ubah}(h]h ]h"]h$]h&]uh1johj3ubeh}(h]h ]h"]h$]h&]uh1jjhj2ubeh}(h]h ]h"]h$]h&]uh1jehj2ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj2ubah}(h]h ]h"]h$]h&]uh1jEhjW2hhhhhNubh)}(hIf KVM_CAP_INTR_SHADOW is available, KVM_VCPUEVENT_VALID_SHADOW can be set in the flags field to signal that interrupt.shadow contains a valid state and shall be written into the VCPU.h]hIf KVM_CAP_INTR_SHADOW is available, KVM_VCPUEVENT_VALID_SHADOW can be set in the flags field to signal that interrupt.shadow contains a valid state and shall be written into the VCPU.}(hjg3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjW2hhubh)}(hHKVM_VCPUEVENT_VALID_SMM can only be set if KVM_CAP_X86_SMM is available.h]hHKVM_VCPUEVENT_VALID_SMM can only be set if KVM_CAP_X86_SMM is available.}(hju3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjW2hhubh)}(hIf KVM_CAP_EXCEPTION_PAYLOAD is enabled, KVM_VCPUEVENT_VALID_PAYLOAD can be set in the flags field to signal that the exception_has_payload, exception_payload, and exception.pending fields contain a valid state and shall be written into the VCPU.h]hIf KVM_CAP_EXCEPTION_PAYLOAD is enabled, KVM_VCPUEVENT_VALID_PAYLOAD can be set in the flags field to signal that the exception_has_payload, exception_payload, and exception.pending fields contain a valid state and shall be written into the VCPU.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjW2hhubh)}(hIf KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled, KVM_VCPUEVENT_VALID_TRIPLE_FAULT can be set in flags field to signal that the triple_fault field contains a valid state and shall be written into the VCPU.h]hIf KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled, KVM_VCPUEVENT_VALID_TRIPLE_FAULT can be set in flags field to signal that the triple_fault field contains a valid state and shall be written into the VCPU.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjW2hhubeh}(h]id7ah ]h"]h$]x86:ah&]uh1hhj(1hhhhhMjKubh)}(hhh](h)}(hARM64:h]hARM64:}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhM ubh)}(hCUser space may need to inject several types of events to the guest.h]hCUser space may need to inject several types of events to the guest.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj3hhubh)}(hzSet the pending SError exception state for this VCPU. It is not possible to 'cancel' an Serror that has been made pending.h]h~Set the pending SError exception state for this VCPU. It is not possible to ‘cancel’ an Serror that has been made pending.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3hhubh)}(hX2If the guest performed an access to I/O memory which could not be handled by userspace, for example because of missing instruction syndrome decode information or because there is no device mapped at the accessed IPA, then userspace can ask the kernel to inject an external abort using the address from the exiting fault on the VCPU. It is a programming error to set ext_dabt_pending after an exit which was not either KVM_EXIT_MMIO or KVM_EXIT_ARM_NISV. This feature is only available if the system supports KVM_CAP_ARM_INJECT_EXT_DABT. This is a helper which provides commonality in how userspace reports accesses for the above cases to guests, across different userspace implementations. Nevertheless, userspace can still emulate all Arm exceptions by manipulating individual registers using the KVM_SET_ONE_REG API.h]hX2If the guest performed an access to I/O memory which could not be handled by userspace, for example because of missing instruction syndrome decode information or because there is no device mapped at the accessed IPA, then userspace can ask the kernel to inject an external abort using the address from the exiting fault on the VCPU. It is a programming error to set ext_dabt_pending after an exit which was not either KVM_EXIT_MMIO or KVM_EXIT_ARM_NISV. This feature is only available if the system supports KVM_CAP_ARM_INJECT_EXT_DABT. This is a helper which provides commonality in how userspace reports accesses for the above cases to guests, across different userspace implementations. Nevertheless, userspace can still emulate all Arm exceptions by manipulating individual registers using the KVM_SET_ONE_REG API.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3hhubh)}(h/See KVM_GET_VCPU_EVENTS for the data structure.h]h/See KVM_GET_VCPU_EVENTS for the data structure.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3hhubeh}(h]id8ah ]h"]h$]arm64:ah&]uh1hhj(1hhhhhM jKubeh}(h]kvm-set-vcpu-eventsah ]h"]4.32 kvm_set_vcpu_eventsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.33 KVM_GET_DEBUGREGSh]h4.33 KVM_GET_DEBUGREGS}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hhhhhM"ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hKVM_CAP_DEBUGREGSh]h)}(hj'4h]hKVM_CAP_DEBUGREGS}(hj)4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hj%4ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhM$hj4hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjE4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjB4hhhKubjy)}(hx86h]h)}(hjU4h]hx86}(hjW4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjS4ubah}(h]h ]h"]h$]h&]uh1jxhjB4ubeh}(h]h ]h"]h$]h&]uh1jchhhM%hj4hhubjd)}(hhh](ji)}(hTypeh]hType}(hjs4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjp4hhhKubjy)}(h vcpu ioctlh]h)}(hj4h]h vcpu ioctl}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hj4ubah}(h]h ]h"]h$]h&]uh1jxhjp4ubeh}(h]h ]h"]h$]h&]uh1jchhhM&hj4hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hstruct kvm_debugregs (out)h]h)}(hj4h]hstruct kvm_debugregs (out)}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj4ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhM'hj4hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hj4ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhM(hj4hhubeh}(h]h ]h"]h$]h&]uh1j^hj4hhhhhM$ubh)}(h$Reads debug registers from the vcpu.h]h$Reads debug registers from the vcpu.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj4hhubj$)}(hzstruct kvm_debugregs { __u64 db[4]; __u64 dr6; __u64 dr7; __u64 flags; __u64 reserved[9]; };h]hzstruct kvm_debugregs { __u64 db[4]; __u64 dr6; __u64 dr7; __u64 flags; __u64 reserved[9]; };}hj5sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM.hj4hhubeh}(h]kvm-get-debugregsah ]h"]4.33 kvm_get_debugregsah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h4.34 KVM_SET_DEBUGREGSh]h4.34 KVM_SET_DEBUGREGS}(hj(5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%5hhhhhM8ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj<5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj95hhhKubjy)}(hKVM_CAP_DEBUGREGSh]h)}(hjL5h]hKVM_CAP_DEBUGREGS}(hjN5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjJ5ubah}(h]h ]h"]h$]h&]uh1jxhj95ubeh}(h]h ]h"]h$]h&]uh1jchhhM:hj65hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjg5hhhKubjy)}(hx86h]h)}(hjz5h]hx86}(hj|5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjx5ubah}(h]h ]h"]h$]h&]uh1jxhjg5ubeh}(h]h ]h"]h$]h&]uh1jchhhM;hj65hhubjd)}(hhh](ji)}(hTypeh]hType}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(h vcpu ioctlh]h)}(hj5h]h vcpu ioctl}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj5ubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhM<hj65hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(hstruct kvm_debugregs (in)h]h)}(hj5h]hstruct kvm_debugregs (in)}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj5ubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhM=hj65hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj6ubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhM>hj65hhubeh}(h]h ]h"]h$]h&]uh1j^hj%5hhhhhM:ubh)}(h%Writes debug registers into the vcpu.h]h%Writes debug registers into the vcpu.}(hj&6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj%5hhubh)}(hiSee KVM_GET_DEBUGREGS for the data structure. The flags field is unused yet and must be cleared on entry.h]hiSee KVM_GET_DEBUGREGS for the data structure. The flags field is unused yet and must be cleared on entry.}(hj46hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj%5hhubeh}(h]kvm-set-debugregsah ]h"]4.34 kvm_set_debugregsah$]h&]uh1hhjhhhhhM8ubh)}(hhh](h)}(h4.35 KVM_SET_USER_MEMORY_REGIONh]h4.35 KVM_SET_USER_MEMORY_REGION}(hjM6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ6hhhhhMGubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hja6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj^6hhhKubjy)}(hKVM_CAP_USER_MEMORYh]h)}(hjq6h]hKVM_CAP_USER_MEMORY}(hjs6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjo6ubah}(h]h ]h"]h$]h&]uh1jxhj^6ubeh}(h]h ]h"]h$]h&]uh1jchhhMIhj[6hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj6hhhKubjy)}(hallh]h)}(hj6h]hall}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhj6ubah}(h]h ]h"]h$]h&]uh1jxhj6ubeh}(h]h ]h"]h$]h&]uh1jchhhMJhj[6hhubjd)}(hhh](ji)}(hTypeh]hType}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj6hhhKubjy)}(hvm ioctlh]h)}(hj6h]hvm ioctl}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhj6ubah}(h]h ]h"]h$]h&]uh1jxhj6ubeh}(h]h ]h"]h$]h&]uh1jchhhMKhj[6hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj6hhhKubjy)}(h'struct kvm_userspace_memory_region (in)h]h)}(hj6h]h'struct kvm_userspace_memory_region (in)}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj6ubah}(h]h ]h"]h$]h&]uh1jxhj6ubeh}(h]h ]h"]h$]h&]uh1jchhhMLhj[6hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj7hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj+7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj'7ubah}(h]h ]h"]h$]h&]uh1jxhj7ubeh}(h]h ]h"]h$]h&]uh1jchhhMMhj[6hhubeh}(h]h ]h"]h$]h&]uh1j^hjJ6hhhhhMIubj$)}(hX`struct kvm_userspace_memory_region { __u32 slot; __u32 flags; __u64 guest_phys_addr; __u64 memory_size; /* bytes */ __u64 userspace_addr; /* start of the userspace allocated memory */ }; /* for kvm_userspace_memory_region::flags */ #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) #define KVM_MEM_READONLY (1UL << 1)h]hX`struct kvm_userspace_memory_region { __u32 slot; __u32 flags; __u64 guest_phys_addr; __u64 memory_size; /* bytes */ __u64 userspace_addr; /* start of the userspace allocated memory */ }; /* for kvm_userspace_memory_region::flags */ #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) #define KVM_MEM_READONLY (1UL << 1)}hjK7sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMQhjJ6hhubh)}(hXVThis ioctl allows the user to create, modify or delete a guest physical memory slot. Bits 0-15 of "slot" specify the slot id and this value should be less than the maximum number of user memory slots supported per VM. The maximum allowed slots can be queried using KVM_CAP_NR_MEMSLOTS. Slots may not overlap in guest physical address space.h]hXZThis ioctl allows the user to create, modify or delete a guest physical memory slot. Bits 0-15 of “slot” specify the slot id and this value should be less than the maximum number of user memory slots supported per VM. The maximum allowed slots can be queried using KVM_CAP_NR_MEMSLOTS. Slots may not overlap in guest physical address space.}(hjY7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjJ6hhubh)}(hXgIf KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of "slot" specifies the address space which is being modified. They must be less than the value that KVM_CHECK_EXTENSION returns for the KVM_CAP_MULTI_ADDRESS_SPACE capability. Slots in separate address spaces are unrelated; the restriction on overlapping slots only applies within each address space.h]hXkIf KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of “slot” specifies the address space which is being modified. They must be less than the value that KVM_CHECK_EXTENSION returns for the KVM_CAP_MULTI_ADDRESS_SPACE capability. Slots in separate address spaces are unrelated; the restriction on overlapping slots only applies within each address space.}(hjg7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchjJ6hhubh)}(hDeleting a slot is done by passing zero for memory_size. When changing an existing slot, it may be moved in the guest physical memory space, or its flags may be modified, but it may not be resized.h]hDeleting a slot is done by passing zero for memory_size. When changing an existing slot, it may be moved in the guest physical memory space, or its flags may be modified, but it may not be resized.}(hju7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjJ6hhubh)}(hXMemory for the region is taken starting at the address denoted by the field userspace_addr, which must point at user addressable memory for the entire memory slot size. Any object may back this memory, including anonymous memory, ordinary files, and hugetlbfs.h]hXMemory for the region is taken starting at the address denoted by the field userspace_addr, which must point at user addressable memory for the entire memory slot size. Any object may back this memory, including anonymous memory, ordinary files, and hugetlbfs.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjJ6hhubh)}(hdOn architectures that support a form of address tagging, userspace_addr must be an untagged address.h]hdOn architectures that support a form of address tagging, userspace_addr must be an untagged address.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjJ6hhubh)}(hIt is recommended that the lower 21 bits of guest_phys_addr and userspace_addr be identical. This allows large pages in the guest to be backed by large pages in the host.h]hIt is recommended that the lower 21 bits of guest_phys_addr and userspace_addr be identical. This allows large pages in the guest to be backed by large pages in the host.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjJ6hhubh)}(hXThe flags field supports two flags: KVM_MEM_LOG_DIRTY_PAGES and KVM_MEM_READONLY. The former can be set to instruct KVM to keep track of writes to memory within the slot. See KVM_GET_DIRTY_LOG ioctl to know how to use it. The latter can be set, if KVM_CAP_READONLY_MEM capability allows it, to make a new slot read-only. In this case, writes to this memory will be posted to userspace as KVM_EXIT_MMIO exits.h]hXThe flags field supports two flags: KVM_MEM_LOG_DIRTY_PAGES and KVM_MEM_READONLY. The former can be set to instruct KVM to keep track of writes to memory within the slot. See KVM_GET_DIRTY_LOG ioctl to know how to use it. The latter can be set, if KVM_CAP_READONLY_MEM capability allows it, to make a new slot read-only. In this case, writes to this memory will be posted to userspace as KVM_EXIT_MMIO exits.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjJ6hhubh)}(hXWhen the KVM_CAP_SYNC_MMU capability is available, changes in the backing of the memory region are automatically reflected into the guest. For example, an mmap() that affects the region will be made visible immediately. Another example is madvise(MADV_DROP).h]hXWhen the KVM_CAP_SYNC_MMU capability is available, changes in the backing of the memory region are automatically reflected into the guest. For example, an mmap() that affects the region will be made visible immediately. Another example is madvise(MADV_DROP).}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJ6hhubh)}(hFor TDX guest, deleting/moving memory region loses guest memory contents. Read only region isn't supported. Only as-id 0 is supported.h]hFor TDX guest, deleting/moving memory region loses guest memory contents. Read only region isn’t supported. Only as-id 0 is supported.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJ6hhubh)}(hXNote: On arm64, a write generated by the page-table walker (to update the Access and Dirty flags, for example) never results in a KVM_EXIT_MMIO exit when the slot has the KVM_MEM_READONLY flag. This is because KVM cannot provide the data that would be written by the page-table walker, making it impossible to emulate the access. Instead, an abort (data abort if the cause of the page-table update was a load or a store, instruction abort if it was an instruction fetch) is injected in the guest.h]hXNote: On arm64, a write generated by the page-table walker (to update the Access and Dirty flags, for example) never results in a KVM_EXIT_MMIO exit when the slot has the KVM_MEM_READONLY flag. This is because KVM cannot provide the data that would be written by the page-table walker, making it impossible to emulate the access. Instead, an abort (data abort if the cause of the page-table update was a load or a store, instruction abort if it was an instruction fetch) is injected in the guest.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJ6hhubh)}(hhh](h)}(hS390:h]hS390:}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hhhhhMubh)}(hxReturns -EINVAL or -EEXIST if the VM has the KVM_VM_S390_UCONTROL flag set. Returns -EINVAL if called on a protected VM.h]hxReturns -EINVAL or -EEXIST if the VM has the KVM_VM_S390_UCONTROL flag set. Returns -EINVAL if called on a protected VM.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7hhubeh}(h]id9ah ]h"]h$]jah&]uh1hhjJ6hhhhhMjKubeh}(h]kvm-set-user-memory-regionah ]h"]4.35 kvm_set_user_memory_regionah$]h&]uh1hhjhhhhhMGubh)}(hhh](h)}(h4.36 KVM_SET_TSS_ADDRh]h4.36 KVM_SET_TSS_ADDR}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj*8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj'8hhhKubjy)}(hKVM_CAP_SET_TSS_ADDRh]h)}(hj:8h]hKVM_CAP_SET_TSS_ADDR}(hj<8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj88ubah}(h]h ]h"]h$]h&]uh1jxhj'8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj$8hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjX8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjU8hhhKubjy)}(hx86h]h)}(hjh8h]hx86}(hjj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf8ubah}(h]h ]h"]h$]h&]uh1jxhjU8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj$8hhubjd)}(hhh](ji)}(hTypeh]hType}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8hhhKubjy)}(hvm ioctlh]h)}(hj8h]hvm ioctl}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8ubah}(h]h ]h"]h$]h&]uh1jxhj8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj$8hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8hhhKubjy)}(hunsigned long tss_address (in)h]h)}(hj8h]hunsigned long tss_address (in)}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8ubah}(h]h ]h"]h$]h&]uh1jxhj8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj$8hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8ubah}(h]h ]h"]h$]h&]uh1jxhj8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj$8hhubeh}(h]h ]h"]h$]h&]uh1j^hj8hhhhhMubh)}(hX.This ioctl defines the physical address of a three-page region in the guest physical address space. The region must be within the first 4GB of the guest physical address space and must not conflict with any memory slot or any mmio address. The guest may malfunction if it accesses this memory region.h]hX.This ioctl defines the physical address of a three-page region in the guest physical address space. The region must be within the first 4GB of the guest physical address space and must not conflict with any memory slot or any mmio address. The guest may malfunction if it accesses this memory region.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8hhubh)}(hThis ioctl is required on Intel-based hosts. This is needed on Intel hardware because of a quirk in the virtualization implementation (see the internals documentation when it pops into existence).h]hThis ioctl is required on Intel-based hosts. This is needed on Intel hardware because of a quirk in the virtualization implementation (see the internals documentation when it pops into existence).}(hj"9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8hhubj@)}(h.. _KVM_ENABLE_CAP:h]h}(h]h ]h"]h$]h&]jKkvm-enable-capuh1j?hMhj8hhhhubeh}(h]kvm-set-tss-addrah ]h"]4.36 kvm_set_tss_addrah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.37 KVM_ENABLE_CAPh]h4.37 KVM_ENABLE_CAP}(hjF9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjC9hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjZ9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjW9hhhKubjy)}(hKVM_CAP_ENABLE_CAPh]h)}(hjj9h]hKVM_CAP_ENABLE_CAP}(hjl9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh9ubah}(h]h ]h"]h$]h&]uh1jxhjW9ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj9hhhKubjy)}(hmips, ppc, s390, x86, loongarchh]h)}(hj9h]hmips, ppc, s390, x86, loongarch}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jxhj9ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(hTypeh]hType}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj9hhhKubjy)}(h vcpu ioctlh]h)}(hj9h]h vcpu ioctl}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jxhj9ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj9hhhKubjy)}(hstruct kvm_enable_cap (in)h]h)}(hj9h]hstruct kvm_enable_cap (in)}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jxhj9ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj:hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj$:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj :ubah}(h]h ]h"]h$]h&]uh1jxhj:ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(h Capabilityh]h Capability}(hjA:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj>:hhhKubjy)}(hKVM_CAP_ENABLE_CAP_VMh]h)}(hjQ:h]hKVM_CAP_ENABLE_CAP_VM}(hjS:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjO:ubah}(h]h ]h"]h$]h&]uh1jxhj>:ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjo:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjl:hhhKubjy)}(hallh]h)}(hj:h]hall}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}:ubah}(h]h ]h"]h$]h&]uh1jxhjl:ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(hTypeh]hType}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj:hhhKubjy)}(hvm ioctlh]h)}(hj:h]hvm ioctl}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:ubah}(h]h ]h"]h$]h&]uh1jxhj:ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj:hhhKubjy)}(hstruct kvm_enable_cap (in)h]h)}(hj:h]hstruct kvm_enable_cap (in)}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:ubah}(h]h ]h"]h$]h&]uh1jxhj:ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj:hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj ;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1jxhj:ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjT9hhubeh}(h]h ]h"]h$]h&]uh1j^hjC9hhhhhMubhnote)}(hNot all extensions are enabled by default. Using this ioctl the application can enable an extension, making it available to the guest.h]h)}(hNot all extensions are enabled by default. Using this ioctl the application can enable an extension, making it available to the guest.h]hNot all extensions are enabled by default. Using this ioctl the application can enable an extension, making it available to the guest.}(hj1;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-;ubah}(h]h ]h"]h$]h&]uh1j+;hjC9hhhhhNubh)}(hOn systems that do not support this ioctl, it always fails. On systems that do support it, it only works for extensions that are supported for enablement.h]hOn systems that do not support this ioctl, it always fails. On systems that do support it, it only works for extensions that are supported for enablement.}(hjE;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC9hhubh)}(hVTo check if a capability can be enabled, the KVM_CHECK_EXTENSION ioctl should be used.h]hVTo check if a capability can be enabled, the KVM_CHECK_EXTENSION ioctl should be used.}(hjS;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC9hhubj$)}(h5struct kvm_enable_cap { /* in */ __u32 cap;h]h5struct kvm_enable_cap { /* in */ __u32 cap;}hja;sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjC9hhubh)}(h/The capability that is supposed to get enabled.h]h/The capability that is supposed to get enabled.}(hjo;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC9hhubj$)}(h __u32 flags;h]h __u32 flags;}hj};sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjC9hhubh)}(h?A bitfield indicating future enhancements. Has to be 0 for now.h]h?A bitfield indicating future enhancements. Has to be 0 for now.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC9hhubj$)}(h__u64 args[4];h]h__u64 args[4];}hj;sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjC9hhubh)}(hxArguments for enabling a feature. If a feature needs initial values to function properly, this is the place to put them.h]hxArguments for enabling a feature. If a feature needs initial values to function properly, this is the place to put them.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC9hhubj$)}(h __u8 pad[64]; };h]h __u8 pad[64]; };}hj;sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjC9hhubh)}(hdThe vcpu ioctl should be used for vcpu-specific capabilities, the vm ioctl for vm-wide capabilities.h]hdThe vcpu ioctl should be used for vcpu-specific capabilities, the vm ioctl for vm-wide capabilities.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC9hhubeh}(h](j:9id10eh ]h"](4.37 kvm_enable_capkvm_enable_capeh$]h&]uh1hhjhhhhhMjm}j;j09sjo}j:9j09subh)}(hhh](h)}(h4.38 KVM_GET_MP_STATEh]h4.38 KVM_GET_MP_STATE}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj;hhhKubjy)}(hKVM_CAP_MP_STATEh]h)}(hj<h]hKVM_CAP_MP_STATE}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jxhj;ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj;hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj!<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<hhhKubjy)}(h"x86, s390, arm64, riscv, loongarchh]h)}(hj1<h]h"x86, s390, arm64, riscv, loongarch}(hj3<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/<ubah}(h]h ]h"]h$]h&]uh1jxhj<ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj;hhubjd)}(hhh](ji)}(hTypeh]hType}(hjO<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjL<hhhKubjy)}(h vcpu ioctlh]h)}(hj_<h]h vcpu ioctl}(hja<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]<ubah}(h]h ]h"]h$]h&]uh1jxhjL<ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj;hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj}<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjz<hhhKubjy)}(hstruct kvm_mp_state (out)h]h)}(hj<h]hstruct kvm_mp_state (out)}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jxhjz<ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj;hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jxhj<ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj;hhubeh}(h]h ]h"]h$]h&]uh1j^hj;hhhhhMubj$)}(h.struct kvm_mp_state { __u32 mp_state; };h]h.struct kvm_mp_state { __u32 mp_state; };}hj<sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj;hhubh)}(h^Returns the vcpu's current "multiprocessing state" (though also valid on uniprocessor guests).h]hdReturns the vcpu’s current “multiprocessing state” (though also valid on uniprocessor guests).}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;hhubh)}(hPossible values are:h]hPossible values are:}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;hhubh)}(hX6========================== =============================================== KVM_MP_STATE_RUNNABLE the vcpu is currently running [x86,arm64,riscv,loongarch] KVM_MP_STATE_UNINITIALIZED the vcpu is an application processor (AP) which has not yet received an INIT signal [x86] KVM_MP_STATE_INIT_RECEIVED the vcpu has received an INIT signal, and is now ready for a SIPI [x86] KVM_MP_STATE_HALTED the vcpu has executed a HLT instruction and is waiting for an interrupt [x86] KVM_MP_STATE_SIPI_RECEIVED the vcpu has just received a SIPI (vector accessible via KVM_GET_VCPU_EVENTS) [x86] KVM_MP_STATE_STOPPED the vcpu is stopped [s390,arm64,riscv] KVM_MP_STATE_CHECK_STOP the vcpu is in a special error state [s390] KVM_MP_STATE_OPERATING the vcpu is operating (running or halted) [s390] KVM_MP_STATE_LOAD the vcpu is in a special load/startup state [s390] KVM_MP_STATE_SUSPENDED the vcpu is in a suspend state and is waiting for a wakeup event [arm64] ========================== =============================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj=ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jOhj=ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_RUNNABLEh]hKVM_MP_STATE_RUNNABLE}(hj.=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+=ubah}(h]h ]h"]h$]h&]uh1johj(=ubjp)}(hhh]h)}(h9the vcpu is currently running [x86,arm64,riscv,loongarch]h]h9the vcpu is currently running [x86,arm64,riscv,loongarch]}(hjE=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjB=ubah}(h]h ]h"]h$]h&]uh1johj(=ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_UNINITIALIZEDh]hKVM_MP_STATE_UNINITIALIZED}(hje=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb=ubah}(h]h ]h"]h$]h&]uh1johj_=ubjp)}(hhh]h)}(hYthe vcpu is an application processor (AP) which has not yet received an INIT signal [x86]h]hYthe vcpu is an application processor (AP) which has not yet received an INIT signal [x86]}(hj|=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjy=ubah}(h]h ]h"]h$]h&]uh1johj_=ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_INIT_RECEIVEDh]hKVM_MP_STATE_INIT_RECEIVED}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h)}(hGthe vcpu has received an INIT signal, and is now ready for a SIPI [x86]h]hGthe vcpu has received an INIT signal, and is now ready for a SIPI [x86]}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1johj=ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_HALTEDh]hKVM_MP_STATE_HALTED}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h)}(hMthe vcpu has executed a HLT instruction and is waiting for an interrupt [x86]h]hMthe vcpu has executed a HLT instruction and is waiting for an interrupt [x86]}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1johj=ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_SIPI_RECEIVEDh]hKVM_MP_STATE_SIPI_RECEIVED}(hj >hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1johj>ubjp)}(hhh]h)}(hSthe vcpu has just received a SIPI (vector accessible via KVM_GET_VCPU_EVENTS) [x86]h]hSthe vcpu has just received a SIPI (vector accessible via KVM_GET_VCPU_EVENTS) [x86]}(hj!>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1johj>ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_STOPPEDh]hKVM_MP_STATE_STOPPED}(hjA>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>>ubah}(h]h ]h"]h$]h&]uh1johj;>ubjp)}(hhh]h)}(h&the vcpu is stopped [s390,arm64,riscv]h]h&the vcpu is stopped [s390,arm64,riscv]}(hjX>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjU>ubah}(h]h ]h"]h$]h&]uh1johj;>ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_CHECK_STOPh]hKVM_MP_STATE_CHECK_STOP}(hjx>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhju>ubah}(h]h ]h"]h$]h&]uh1johjr>ubjp)}(hhh]h)}(h+the vcpu is in a special error state [s390]h]h+the vcpu is in a special error state [s390]}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1johjr>ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_OPERATINGh]hKVM_MP_STATE_OPERATING}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1johj>ubjp)}(hhh]h)}(h0the vcpu is operating (running or halted) [s390]h]h0the vcpu is operating (running or halted) [s390]}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1johj>ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_LOADh]hKVM_MP_STATE_LOAD}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1johj>ubjp)}(hhh]h)}(h2the vcpu is in a special load/startup state [s390]h]h2the vcpu is in a special load/startup state [s390]}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1johj>ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MP_STATE_SUSPENDEDh]hKVM_MP_STATE_SUSPENDED}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj?ubah}(h]h ]h"]h$]h&]uh1johj?ubjp)}(hhh]h)}(hHthe vcpu is in a suspend state and is waiting for a wakeup event [arm64]h]hHthe vcpu is in a suspend state and is waiting for a wakeup event [arm64]}(hj4?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj1?ubah}(h]h ]h"]h$]h&]uh1johj?ubeh}(h]h ]h"]h$]h&]uh1jjhj%=ubeh}(h]h ]h"]h$]h&]uh1jehj=ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj =ubah}(h]h ]h"]h$]h&]uh1jEhj=ubah}(h]h ]h"]h$]h&]uh1hhhhMhj;hhubh)}(hOn x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel irqchip, the multiprocessing state must be maintained by userspace on these architectures.h]hOn x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel irqchip, the multiprocessing state must be maintained by userspace on these architectures.}(hjg?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;hhubh)}(hhh](h)}(h For arm64:h]h For arm64:}(hjx?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhju?hhhhhMubh)}(htIf a vCPU is in the KVM_MP_STATE_SUSPENDED state, KVM will emulate the architectural execution of a WFI instruction.h]htIf a vCPU is in the KVM_MP_STATE_SUSPENDED state, KVM will emulate the architectural execution of a WFI instruction.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhju?hhubh)}(hXFIf a wakeup event is recognized, KVM will exit to userspace with a KVM_SYSTEM_EVENT exit, where the event type is KVM_SYSTEM_EVENT_WAKEUP. If userspace wants to honor the wakeup, it must set the vCPU's MP state to KVM_MP_STATE_RUNNABLE. If it does not, KVM will continue to await a wakeup event in subsequent calls to KVM_RUN.h]hXHIf a wakeup event is recognized, KVM will exit to userspace with a KVM_SYSTEM_EVENT exit, where the event type is KVM_SYSTEM_EVENT_WAKEUP. If userspace wants to honor the wakeup, it must set the vCPU’s MP state to KVM_MP_STATE_RUNNABLE. If it does not, KVM will continue to await a wakeup event in subsequent calls to KVM_RUN.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhju?hhubhwarning)}(hXIf userspace intends to keep the vCPU in a SUSPENDED state, it is strongly recommended that userspace take action to suppress the wakeup event (such as masking an interrupt). Otherwise, subsequent calls to KVM_RUN will immediately exit with a KVM_SYSTEM_EVENT_WAKEUP event and inadvertently waste CPU cycles. Additionally, if userspace takes action to suppress a wakeup event, it is strongly recommended that it also restores the vCPU to its original state when the vCPU is made RUNNABLE again. For example, if userspace masked a pending interrupt to suppress the wakeup, the interrupt should be unmasked before returning control to the guest.h](h)}(hX4If userspace intends to keep the vCPU in a SUSPENDED state, it is strongly recommended that userspace take action to suppress the wakeup event (such as masking an interrupt). Otherwise, subsequent calls to KVM_RUN will immediately exit with a KVM_SYSTEM_EVENT_WAKEUP event and inadvertently waste CPU cycles.h]hX4If userspace intends to keep the vCPU in a SUSPENDED state, it is strongly recommended that userspace take action to suppress the wakeup event (such as masking an interrupt). Otherwise, subsequent calls to KVM_RUN will immediately exit with a KVM_SYSTEM_EVENT_WAKEUP event and inadvertently waste CPU cycles.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj?ubh)}(hXNAdditionally, if userspace takes action to suppress a wakeup event, it is strongly recommended that it also restores the vCPU to its original state when the vCPU is made RUNNABLE again. For example, if userspace masked a pending interrupt to suppress the wakeup, the interrupt should be unmasked before returning control to the guest.h]hXNAdditionally, if userspace takes action to suppress a wakeup event, it is strongly recommended that it also restores the vCPU to its original state when the vCPU is made RUNNABLE again. For example, if userspace masked a pending interrupt to suppress the wakeup, the interrupt should be unmasked before returning control to the guest.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hj?ubeh}(h]h ]h"]h$]h&]uh1j?hju?hhhhhNubeh}(h] for-arm64ah ]h"]h$] for arm64:ah&]uh1hhj;hhhhhMjKubh)}(hhh](h)}(h For riscv:h]h For riscv:}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hhhhhM.ubh)}(h}The only states that are valid are KVM_MP_STATE_STOPPED and KVM_MP_STATE_RUNNABLE which reflect if the vcpu is paused or not.h]h}The only states that are valid are KVM_MP_STATE_STOPPED and KVM_MP_STATE_RUNNABLE which reflect if the vcpu is paused or not.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj?hhubh)}(hcOn LoongArch, only the KVM_MP_STATE_RUNNABLE state is used to reflect whether the vcpu is runnable.h]hcOn LoongArch, only the KVM_MP_STATE_RUNNABLE state is used to reflect whether the vcpu is runnable.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj?hhubeh}(h] for-riscvah ]h"] for riscv:ah$]h&]uh1hhj;hhhhhM.ubeh}(h]kvm-get-mp-stateah ]h"]4.38 kvm_get_mp_stateah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.39 KVM_SET_MP_STATEh]h4.39 KVM_SET_MP_STATE}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhM7ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj&@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj#@hhhKubjy)}(hKVM_CAP_MP_STATEh]h)}(hj6@h]hKVM_CAP_MP_STATE}(hj8@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj4@ubah}(h]h ]h"]h$]h&]uh1jxhj#@ubeh}(h]h ]h"]h$]h&]uh1jchhhM9hj @hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjT@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQ@hhhKubjy)}(h"x86, s390, arm64, riscv, loongarchh]h)}(hjd@h]h"x86, s390, arm64, riscv, loongarch}(hjf@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjb@ubah}(h]h ]h"]h$]h&]uh1jxhjQ@ubeh}(h]h ]h"]h$]h&]uh1jchhhM:hj @hhubjd)}(hhh](ji)}(hTypeh]hType}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@hhhKubjy)}(h vcpu ioctlh]h)}(hj@h]h vcpu ioctl}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj@ubah}(h]h ]h"]h$]h&]uh1jxhj@ubeh}(h]h ]h"]h$]h&]uh1jchhhM;hj @hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@hhhKubjy)}(hstruct kvm_mp_state (in)h]h)}(hj@h]hstruct kvm_mp_state (in)}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj@ubah}(h]h ]h"]h$]h&]uh1jxhj@ubeh}(h]h ]h"]h$]h&]uh1jchhhM<hj @hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj@ubah}(h]h ]h"]h$]h&]uh1jxhj@ubeh}(h]h ]h"]h$]h&]uh1jchhhM=hj @hhubeh}(h]h ]h"]h$]h&]uh1j^hj@hhhhhM9ubh)}(hTSets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for arguments.h]hZSets the vcpu’s current “multiprocessing state”; see KVM_GET_MP_STATE for arguments.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj@hhubh)}(hOn x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel irqchip, the multiprocessing state must be maintained by userspace on these architectures.h]hOn x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel irqchip, the multiprocessing state must be maintained by userspace on these architectures.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj@hhubh)}(hhh](h)}(hFor arm64/riscv:h]hFor arm64/riscv:}(hj/AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,AhhhhhMGubh)}(hThe only states that are valid are KVM_MP_STATE_STOPPED and KVM_MP_STATE_RUNNABLE which reflect if the vcpu should be paused or not.h]hThe only states that are valid are KVM_MP_STATE_STOPPED and KVM_MP_STATE_RUNNABLE which reflect if the vcpu should be paused or not.}(hj=AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj,Ahhubh)}(hcOn LoongArch, only the KVM_MP_STATE_RUNNABLE state is used to reflect whether the vcpu is runnable.h]hcOn LoongArch, only the KVM_MP_STATE_RUNNABLE state is used to reflect whether the vcpu is runnable.}(hjKAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj,Ahhubeh}(h]for-arm64-riscvah ]h"]for arm64/riscv:ah$]h&]uh1hhj@hhhhhMGubeh}(h]kvm-set-mp-stateah ]h"]4.39 kvm_set_mp_stateah$]h&]uh1hhjhhhhhM7ubh)}(hhh](h)}(h4.40 KVM_SET_IDENTITY_MAP_ADDRh]h4.40 KVM_SET_IDENTITY_MAP_ADDR}(hjlAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjiAhhhhhMPubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}AhhhKubjy)}(hKVM_CAP_SET_IDENTITY_MAP_ADDRh]h)}(hjAh]hKVM_CAP_SET_IDENTITY_MAP_ADDR}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjAubah}(h]h ]h"]h$]h&]uh1jxhj}Aubeh}(h]h ]h"]h$]h&]uh1jchhhMRhjzAhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hx86h]h)}(hjAh]hx86}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjAubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMShjzAhhubjd)}(hhh](ji)}(hTypeh]hType}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hvm ioctlh]h)}(hjAh]hvm ioctl}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjAubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMThjzAhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hunsigned long identity (in)h]h)}(hjBh]hunsigned long identity (in)}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjBubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMUhjzAhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj8BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5BhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjJBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjFBubah}(h]h ]h"]h$]h&]uh1jxhj5Bubeh}(h]h ]h"]h$]h&]uh1jchhhMVhjzAhhubeh}(h]h ]h"]h$]h&]uh1j^hjiAhhhhhMRubh)}(hX,This ioctl defines the physical address of a one-page region in the guest physical address space. The region must be within the first 4GB of the guest physical address space and must not conflict with any memory slot or any mmio address. The guest may malfunction if it accesses this memory region.h]hX,This ioctl defines the physical address of a one-page region in the guest physical address space. The region must be within the first 4GB of the guest physical address space and must not conflict with any memory slot or any mmio address. The guest may malfunction if it accesses this memory region.}(hjjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjiAhhubh)}(hZSetting the address to 0 will result in resetting the address to its default (0xfffbc000).h]hZSetting the address to 0 will result in resetting the address to its default (0xfffbc000).}(hjxBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjiAhhubh)}(hThis ioctl is required on Intel-based hosts. This is needed on Intel hardware because of a quirk in the virtualization implementation (see the internals documentation when it pops into existence).h]hThis ioctl is required on Intel-based hosts. This is needed on Intel hardware because of a quirk in the virtualization implementation (see the internals documentation when it pops into existence).}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjiAhhubh)}(h+Fails if any VCPU has already been created.h]h+Fails if any VCPU has already been created.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjiAhhubeh}(h]kvm-set-identity-map-addrah ]h"]4.40 kvm_set_identity_map_addrah$]h&]uh1hhjhhhhhMPubh)}(hhh](h)}(h4.41 KVM_SET_BOOT_CPU_IDh]h4.41 KVM_SET_BOOT_CPU_ID}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhMhubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hKVM_CAP_SET_BOOT_CPU_IDh]h)}(hjBh]hKVM_CAP_SET_BOOT_CPU_ID}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjBubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMjhjBhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hx86h]h)}(hjBh]hx86}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjBubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMkhjBhhubjd)}(hhh](ji)}(hTypeh]hType}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(hvm ioctlh]h)}(hj-Ch]hvm ioctl}(hj/ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhj+Cubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhMlhjBhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjKChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjHChhhKubjy)}(hunsigned long vcpu_idh]h)}(hj[Ch]hunsigned long vcpu_id}(hj]ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhjYCubah}(h]h ]h"]h$]h&]uh1jxhjHCubeh}(h]h ]h"]h$]h&]uh1jchhhMmhjBhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjyChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvChhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjCubah}(h]h ]h"]h$]h&]uh1jxhjvCubeh}(h]h ]h"]h$]h&]uh1jchhhMnhjBhhubeh}(h]h ]h"]h$]h&]uh1j^hjBhhhhhMjubh)}(hDefine which vcpu is the Bootstrap Processor (BSP). Values are the same as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default is vcpu 0. This ioctl has to be called before vcpu creation, otherwise it will return EBUSY error.h]hDefine which vcpu is the Bootstrap Processor (BSP). Values are the same as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default is vcpu 0. This ioctl has to be called before vcpu creation, otherwise it will return EBUSY error.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjBhhubeh}(h]kvm-set-boot-cpu-idah ]h"]4.41 kvm_set_boot_cpu_idah$]h&]uh1hhjhhhhhMhubh)}(hhh](h)}(h4.42 KVM_GET_XSAVEh]h4.42 KVM_GET_XSAVE}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhMwubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(h KVM_CAP_XSAVEh]h)}(hjCh]h KVM_CAP_XSAVE}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjCubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhMyhjChhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(hx86h]h)}(hjDh]hx86}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjDubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhMzhjChhubjd)}(hhh](ji)}(hTypeh]hType}(hj4DhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1DhhhKubjy)}(h vcpu ioctlh]h)}(hjDDh]h vcpu ioctl}(hjFDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjBDubah}(h]h ]h"]h$]h&]uh1jxhj1Dubeh}(h]h ]h"]h$]h&]uh1jchhhM{hjChhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjbDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_DhhhKubjy)}(hstruct kvm_xsave (out)h]h)}(hjrDh]hstruct kvm_xsave (out)}(hjtDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjpDubah}(h]h ]h"]h$]h&]uh1jxhj_Dubeh}(h]h ]h"]h$]h&]uh1jchhhM|hjChhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjDubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhM}hjChhubeh}(h]h ]h"]h$]h&]uh1j^hjChhhhhMyubj$)}(hEstruct kvm_xsave { __u32 region[1024]; __u32 extra[0]; };h]hEstruct kvm_xsave { __u32 region[1024]; __u32 extra[0]; };}hjDsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjChhubh)}(hCThis ioctl would copy current vcpu's xsave struct to the userspace.h]hEThis ioctl would copy current vcpu’s xsave struct to the userspace.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjChhubeh}(h] kvm-get-xsaveah ]h"]4.42 kvm_get_xsaveah$]h&]uh1hhjhhhhhMwubh)}(hhh](h)}(h4.43 KVM_SET_XSAVEh]h4.43 KVM_SET_XSAVE}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(h KVM_CAP_XSAVE and KVM_CAP_XSAVE2h]h)}(hj Eh]h KVM_CAP_XSAVE and KVM_CAP_XSAVE2}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj Eubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhMhjDhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj+EhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(EhhhKubjy)}(hx86h]h)}(hj;Eh]hx86}(hj=EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9Eubah}(h]h ]h"]h$]h&]uh1jxhj(Eubeh}(h]h ]h"]h$]h&]uh1jchhhMhjDhhubjd)}(hhh](ji)}(hTypeh]hType}(hjYEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjVEhhhKubjy)}(h vcpu ioctlh]h)}(hjiEh]h vcpu ioctl}(hjkEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjgEubah}(h]h ]h"]h$]h&]uh1jxhjVEubeh}(h]h ]h"]h$]h&]uh1jchhhMhjDhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(hstruct kvm_xsave (in)h]h)}(hjEh]hstruct kvm_xsave (in)}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMhjDhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMhjDhhubeh}(h]h ]h"]h$]h&]uh1j^hjDhhhhhMubj$)}(hEstruct kvm_xsave { __u32 region[1024]; __u32 extra[0]; };h]hEstruct kvm_xsave { __u32 region[1024]; __u32 extra[0]; };}hjEsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjDhhubh)}(hXThis ioctl would copy userspace's xsave struct to the kernel. It copies as many bytes as are returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2), when invoked on the vm file descriptor. The size value returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) will always be at least 4096. Currently, it is only greater than 4096 if a dynamic feature has been enabled with ``arch_prctl()``, but this may change in the future.h](hXhThis ioctl would copy userspace’s xsave struct to the kernel. It copies as many bytes as are returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2), when invoked on the vm file descriptor. The size value returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) will always be at least 4096. Currently, it is only greater than 4096 if a dynamic feature has been enabled with }(hjEhhhNhNubj)}(h``arch_prctl()``h]h arch_prctl()}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh$, but this may change in the future.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjDhhubh)}(hjThe offsets of the state save areas in struct kvm_xsave follow the contents of CPUID leaf 0xD on the host.h]hjThe offsets of the state save areas in struct kvm_xsave follow the contents of CPUID leaf 0xD on the host.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDhhubeh}(h] kvm-set-xsaveah ]h"]4.43 kvm_set_xsaveah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.44 KVM_GET_XCRSh]h4.44 KVM_GET_XCRS}(hj.FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+FhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjBFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?FhhhKubjy)}(h KVM_CAP_XCRSh]h)}(hjRFh]h KVM_CAP_XCRS}(hjTFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPFubah}(h]h ]h"]h$]h&]uh1jxhj?Fubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhjKubah}(h]h ]h"]h$]h&]uh1jxhjKubeh}(h]h ]h"]h$]h&]uh1jchhhM>hjQKhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj LhhhKubjy)}(h0 on success, !0 on error h]h)}(h0 on success, !0 on errorh]h0 on success, !0 on error}(hj!LhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjLubah}(h]h ]h"]h$]h&]uh1jxhj Lubeh}(h]h ]h"]h$]h&]uh1jchhhM?hjQKhhubeh}(h]h ]h"]h$]h&]uh1j^hj@KhhhhhM;ubj$)}(hYstruct kvm_ppc_pvinfo { __u32 flags; __u32 hcall[4]; __u8 pad[108]; };h]hYstruct kvm_ppc_pvinfo { __u32 flags; __u32 hcall[4]; __u8 pad[108]; };}hjALsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMChj@Khhubh)}(hThis ioctl fetches PV specific information that need to be passed to the guest using the device tree or other means from vm context.h]hThis ioctl fetches PV specific information that need to be passed to the guest using the device tree or other means from vm context.}(hjOLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj@Khhubh)}(h@The hcall array defines 4 instructions that make up a hypercall.h]h@The hcall array defines 4 instructions that make up a hypercall.}(hj]LhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj@Khhubh)}(hIf any additional field gets added to this structure later on, a bit for that additional piece of information will be set in the flags bitmap.h]hIf any additional field gets added to this structure later on, a bit for that additional piece of information will be set in the flags bitmap.}(hjkLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhj@Khhubh)}(h The flags bitmap is defined as::h]hThe flags bitmap is defined as:}(hjyLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj@Khhubj$)}(hW/* the host supports the ePAPR idle hcall #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0)h]hW/* the host supports the ePAPR idle hcall #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0)}hjLsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMShj@Khhubeh}(h]kvm-ppc-get-pvinfoah ]h"]4.47 kvm_ppc_get_pvinfoah$]h&]uh1hhjhhhhhM9ubh)}(hhh](h)}(h4.52 KVM_SET_GSI_ROUTINGh]h4.52 KVM_SET_GSI_ROUTING}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhhhhhMWubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjLhhhKubjy)}(hKVM_CAP_IRQ_ROUTINGh]h)}(hjLh]hKVM_CAP_IRQ_ROUTING}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjLubah}(h]h ]h"]h$]h&]uh1jxhjLubeh}(h]h ]h"]h$]h&]uh1jchhhMYhjLhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjLhhhKubjy)}(hx86 s390 arm64h]h)}(hjLh]hx86 s390 arm64}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjLubah}(h]h ]h"]h$]h&]uh1jxhjLubeh}(h]h ]h"]h$]h&]uh1jchhhMZhjLhhubjd)}(hhh](ji)}(hTypeh]hType}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj MhhhKubjy)}(hvm ioctlh]h)}(hj Mh]hvm ioctl}(hj"MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjMubah}(h]h ]h"]h$]h&]uh1jxhj Mubeh}(h]h ]h"]h$]h&]uh1jchhhM[hjLhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj>MhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj;MhhhKubjy)}(hstruct kvm_irq_routing (in)h]h)}(hjNMh]hstruct kvm_irq_routing (in)}(hjPMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjLMubah}(h]h ]h"]h$]h&]uh1jxhj;Mubeh}(h]h ]h"]h$]h&]uh1jchhhM\hjLhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjlMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjiMhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj~MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjzMubah}(h]h ]h"]h$]h&]uh1jxhjiMubeh}(h]h ]h"]h$]h&]uh1jchhhM]hjLhhubeh}(h]h ]h"]h$]h&]uh1j^hjLhhhhhMYubh)}(hKSets the GSI routing table entries, overwriting any previously set entries.h]hKSets the GSI routing table entries, overwriting any previously set entries.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjLhhubh)}(h3On arm64, GSI routing has the following limitation:h]h3On arm64, GSI routing has the following limitation:}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjLhhubh)}(hhh]j)}(hBGSI routing does not apply to KVM_IRQ_LINE but only to KVM_IRQFD. h]h)}(hAGSI routing does not apply to KVM_IRQ_LINE but only to KVM_IRQFD.h]hAGSI routing does not apply to KVM_IRQ_LINE but only to KVM_IRQFD.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchjMubah}(h]h ]h"]h$]h&]uh1jhjMhhhhhNubah}(h]h ]h"]h$]h&]jjuh1hhhhMchjLhhubj$)}(hmstruct kvm_irq_routing { __u32 nr; __u32 flags; struct kvm_irq_routing_entry entries[0]; };h]hmstruct kvm_irq_routing { __u32 nr; __u32 flags; struct kvm_irq_routing_entry entries[0]; };}hjMsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMghjLhhubh)}(hKNo flags are specified so far, the corresponding field must be set to zero.h]hKNo flags are specified so far, the corresponding field must be set to zero.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhjLhhubj$)}(hX{struct kvm_irq_routing_entry { __u32 gsi; __u32 type; __u32 flags; __u32 pad; union { struct kvm_irq_routing_irqchip irqchip; struct kvm_irq_routing_msi msi; struct kvm_irq_routing_s390_adapter adapter; struct kvm_irq_routing_hv_sint hv_sint; struct kvm_irq_routing_xen_evtchn xen_evtchn; __u32 pad[8]; } u; }; /* gsi routing entry types */ #define KVM_IRQ_ROUTING_IRQCHIP 1 #define KVM_IRQ_ROUTING_MSI 2 #define KVM_IRQ_ROUTING_S390_ADAPTER 3 #define KVM_IRQ_ROUTING_HV_SINT 4 #define KVM_IRQ_ROUTING_XEN_EVTCHN 5h]hX{struct kvm_irq_routing_entry { __u32 gsi; __u32 type; __u32 flags; __u32 pad; union { struct kvm_irq_routing_irqchip irqchip; struct kvm_irq_routing_msi msi; struct kvm_irq_routing_s390_adapter adapter; struct kvm_irq_routing_hv_sint hv_sint; struct kvm_irq_routing_xen_evtchn xen_evtchn; __u32 pad[8]; } u; }; /* gsi routing entry types */ #define KVM_IRQ_ROUTING_IRQCHIP 1 #define KVM_IRQ_ROUTING_MSI 2 #define KVM_IRQ_ROUTING_S390_ADAPTER 3 #define KVM_IRQ_ROUTING_HV_SINT 4 #define KVM_IRQ_ROUTING_XEN_EVTCHN 5}hjMsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMqhjLhhubh)}(h^On s390, adding a KVM_IRQ_ROUTING_S390_ADAPTER is rejected on ucontrol VMs with error -EINVAL.h]h^On s390, adding a KVM_IRQ_ROUTING_S390_ADAPTER is rejected on ucontrol VMs with error -EINVAL.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLhhubh)}(hflags:h]hflags:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLhhubh)}(hhh](j)}(hXXKVM_MSI_VALID_DEVID: used along with KVM_IRQ_ROUTING_MSI routing entry type, specifies that the devid field contains a valid value. The per-VM KVM_CAP_MSI_DEVID capability advertises the requirement to provide the device ID. If this capability is not available, userspace should never set the KVM_MSI_VALID_DEVID flag as the ioctl might fail.h]h)}(hXXKVM_MSI_VALID_DEVID: used along with KVM_IRQ_ROUTING_MSI routing entry type, specifies that the devid field contains a valid value. The per-VM KVM_CAP_MSI_DEVID capability advertises the requirement to provide the device ID. If this capability is not available, userspace should never set the KVM_MSI_VALID_DEVID flag as the ioctl might fail.h]hXXKVM_MSI_VALID_DEVID: used along with KVM_IRQ_ROUTING_MSI routing entry type, specifies that the devid field contains a valid value. The per-VM KVM_CAP_MSI_DEVID capability advertises the requirement to provide the device ID. If this capability is not available, userspace should never set the KVM_MSI_VALID_DEVID flag as the ioctl might fail.}(hj(NhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$Nubah}(h]h ]h"]h$]h&]uh1jhj!NhhhhhNubj)}(hzero otherwise h]h)}(hzero otherwiseh]hzero otherwise}(hj@NhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPh]hx86}(hj@PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj;\hhhKubjy)}(h vcpu ioctlh]h)}(hjN\h]h vcpu ioctl}(hjP\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjL\ubah}(h]h ]h"]h$]h&]uh1jxhj;\ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj[hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjl\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhji\hhhKubjy)}(hvcpu absolute address (in)h]h)}(hj|\h]hvcpu absolute address (in)}(hj~\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjz\ubah}(h]h ]h"]h$]h&]uh1jxhji\ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj[hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj\hhhKubjy)}(h0 in case of success h]h)}(h0 in case of successh]h0 in case of success}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\ubah}(h]h ]h"]h$]h&]uh1jxhj\ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj[hhubeh}(h]h ]h"]h$]h&]uh1j^hj[hhhhhMubh)}(hXThis call creates a page table entry on the virtual cpu's address space (for user controlled virtual machines) or the virtual machine's address space (for regular virtual machines). This only works for minor faults, thus it's recommended to access subject memory page via the user page table upfront. This is useful to handle validity intercepts for user controlled virtual machines to fault in the virtual cpu's lowcore pages prior to calling the KVM_RUN ioctl.h]hXThis call creates a page table entry on the virtual cpu’s address space (for user controlled virtual machines) or the virtual machine’s address space (for regular virtual machines). This only works for minor faults, thus it’s recommended to access subject memory page via the user page table upfront. This is useful to handle validity intercepts for user controlled virtual machines to fault in the virtual cpu’s lowcore pages prior to calling the KVM_RUN ioctl.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[hhubeh}(h]kvm-s390-vcpu-faultah ]h"]4.67 kvm_s390_vcpu_faultah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.68 KVM_SET_ONE_REGh]h4.68 KVM_SET_ONE_REG}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj\hhhKubjy)}(hKVM_CAP_ONE_REGh]h)}(hj ]h]hKVM_CAP_ONE_REG}(hj ]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]ubah}(h]h ]h"]h$]h&]uh1jxhj\ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj\hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj']hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$]hhhKubjy)}(hallh]h)}(hj7]h]hall}(hj9]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5]ubah}(h]h ]h"]h$]h&]uh1jxhj$]ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj\hhubjd)}(hhh](ji)}(hTypeh]hType}(hjU]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjR]hhhKubjy)}(h vcpu ioctlh]h)}(hje]h]h vcpu ioctl}(hjg]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjc]ubah}(h]h ]h"]h$]h&]uh1jxhjR]ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj\hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj]hhhKubjy)}(hstruct kvm_one_reg (in)h]h)}(hj]h]hstruct kvm_one_reg (in)}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]ubah}(h]h ]h"]h$]h&]uh1jxhj]ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj\hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj]hhhKubjy)}(h(0 on success, negative value on failure h]h)}(h'0 on success, negative value on failureh]h'0 on success, negative value on failure}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj]ubah}(h]h ]h"]h$]h&]uh1jxhj]ubeh}(h]h ]h"]h$]h&]uh1jchhhM hj\hhubeh}(h]h ]h"]h$]h&]uh1j^hj\hhhhhMubh)}(hErrors:h]hErrors:}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hX====== ============================================================ ENOENT no such register EINVAL invalid register ID, or no such register or used with VMs in protected virtualization mode on s390 EPERM (arm64) register access not allowed before vcpu finalization EBUSY (riscv) changing register value not allowed after the vcpu has run at least once ====== ============================================================ h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj]ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKaubah}(h]h ]h"]h$]h&]uh1johj;aubjp)}(hhh]h)}(hKVM_REG_PPC_DAC1h]hKVM_REG_PPC_DAC1}(hjXahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM' hjUaubah}(h]h ]h"]h$]h&]uh1johj;aubjp)}(hhh]h)}(h64h]h64}(hjoahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM' hjlaubah}(h]h ]h"]h$]h&]uh1johj;aubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hjaubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h)}(hKVM_REG_PPC_DAC2h]hKVM_REG_PPC_DAC2}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hjaubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h)}(h64h]h64}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hjaubah}(h]h ]h"]h$]h&]uh1johjaubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM) hjaubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h)}(hKVM_REG_PPC_DABRh]hKVM_REG_PPC_DABR}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM) hjaubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h)}(h64h]h64}(hj bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM) hjbubah}(h]h ]h"]h$]h&]uh1johjaubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj+bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM* hj(bubah}(h]h ]h"]h$]h&]uh1johj%bubjp)}(hhh]h)}(hKVM_REG_PPC_DSCRh]hKVM_REG_PPC_DSCR}(hjBbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM* hj?bubah}(h]h ]h"]h$]h&]uh1johj%bubjp)}(hhh]h)}(h64h]h64}(hjYbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM* hjVbubah}(h]h ]h"]h$]h&]uh1johj%bubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjybhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+ hjvbubah}(h]h ]h"]h$]h&]uh1johjsbubjp)}(hhh]h)}(hKVM_REG_PPC_PURRh]hKVM_REG_PPC_PURR}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+ hjbubah}(h]h ]h"]h$]h&]uh1johjsbubjp)}(hhh]h)}(h64h]h64}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+ hjbubah}(h]h ]h"]h$]h&]uh1johjsbubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM, hjbubah}(h]h ]h"]h$]h&]uh1johjbubjp)}(hhh]h)}(hKVM_REG_PPC_SPURRh]hKVM_REG_PPC_SPURR}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM, hjbubah}(h]h ]h"]h$]h&]uh1johjbubjp)}(hhh]h)}(h64h]h64}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM, hjbubah}(h]h ]h"]h$]h&]uh1johjbubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM- hjcubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(hKVM_REG_PPC_DARh]hKVM_REG_PPC_DAR}(hj,chhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM- hj)cubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(h64h]h64}(hjCchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM- hj@cubah}(h]h ]h"]h$]h&]uh1johjcubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjcchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM. hj`cubah}(h]h ]h"]h$]h&]uh1johj]cubjp)}(hhh]h)}(hKVM_REG_PPC_DSISRh]hKVM_REG_PPC_DSISR}(hjzchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM. hjwcubah}(h]h ]h"]h$]h&]uh1johj]cubjp)}(hhh]h)}(h32h]h32}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM. hjcubah}(h]h ]h"]h$]h&]uh1johj]cubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/ hjcubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(hKVM_REG_PPC_AMRh]hKVM_REG_PPC_AMR}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/ hjcubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(h64h]h64}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/ hjcubah}(h]h ]h"]h$]h&]uh1johjcubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0 hjcubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(hKVM_REG_PPC_UAMORh]hKVM_REG_PPC_UAMOR}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0 hjdubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(h64h]h64}(hj-dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0 hj*dubah}(h]h ]h"]h$]h&]uh1johjcubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjMdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1 hjJdubah}(h]h ]h"]h$]h&]uh1johjGdubjp)}(hhh]h)}(hKVM_REG_PPC_MMCR0h]hKVM_REG_PPC_MMCR0}(hjddhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1 hjadubah}(h]h ]h"]h$]h&]uh1johjGdubjp)}(hhh]h)}(h64h]h64}(hj{dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1 hjxdubah}(h]h ]h"]h$]h&]uh1johjGdubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hjdubah}(h]h ]h"]h$]h&]uh1johjdubjp)}(hhh]h)}(hKVM_REG_PPC_MMCR1h]hKVM_REG_PPC_MMCR1}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hjdubah}(h]h ]h"]h$]h&]uh1johjdubjp)}(hhh]h)}(h64h]h64}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hjdubah}(h]h ]h"]h$]h&]uh1johjdubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3 hjdubah}(h]h ]h"]h$]h&]uh1johjdubjp)}(hhh]h)}(hKVM_REG_PPC_MMCRAh]hKVM_REG_PPC_MMCRA}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3 hjdubah}(h]h ]h"]h$]h&]uh1johjdubjp)}(hhh]h)}(h64h]h64}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3 hjeubah}(h]h ]h"]h$]h&]uh1johjdubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj7ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4 hj4eubah}(h]h ]h"]h$]h&]uh1johj1eubjp)}(hhh]h)}(hKVM_REG_PPC_MMCR2h]hKVM_REG_PPC_MMCR2}(hjNehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4 hjKeubah}(h]h ]h"]h$]h&]uh1johj1eubjp)}(hhh]h)}(h64h]h64}(hjeehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4 hjbeubah}(h]h ]h"]h$]h&]uh1johj1eubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5 hjeubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh]h)}(hKVM_REG_PPC_MMCRSh]hKVM_REG_PPC_MMCRS}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5 hjeubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh]h)}(h64h]h64}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5 hjeubah}(h]h ]h"]h$]h&]uh1johjeubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6 hjeubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh]h)}(hKVM_REG_PPC_MMCR3h]hKVM_REG_PPC_MMCR3}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6 hjeubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh]h)}(h64h]h64}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6 hjeubah}(h]h ]h"]h$]h&]uh1johjeubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj!fhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7 hjfubah}(h]h ]h"]h$]h&]uh1johjfubjp)}(hhh]h)}(hKVM_REG_PPC_SIARh]hKVM_REG_PPC_SIAR}(hj8fhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7 hj5fubah}(h]h ]h"]h$]h&]uh1johjfubjp)}(hhh]h)}(h64h]h64}(hjOfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7 hjLfubah}(h]h ]h"]h$]h&]uh1johjfubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjofhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8 hjlfubah}(h]h ]h"]h$]h&]uh1johjifubjp)}(hhh]h)}(hKVM_REG_PPC_SDARh]hKVM_REG_PPC_SDAR}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8 hjfubah}(h]h ]h"]h$]h&]uh1johjifubjp)}(hhh]h)}(h64h]h64}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8 hjfubah}(h]h ]h"]h$]h&]uh1johjifubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9 hjfubah}(h]h ]h"]h$]h&]uh1johjfubjp)}(hhh]h)}(hKVM_REG_PPC_SIERh]hKVM_REG_PPC_SIER}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9 hjfubah}(h]h ]h"]h$]h&]uh1johjfubjp)}(hhh]h)}(h64h]h64}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9 hjfubah}(h]h ]h"]h$]h&]uh1johjfubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM: hjgubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(hKVM_REG_PPC_SIER2h]hKVM_REG_PPC_SIER2}(hj"ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM: hjgubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(h64h]h64}(hj9ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM: hj6gubah}(h]h ]h"]h$]h&]uh1johjgubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjYghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM; hjVgubah}(h]h ]h"]h$]h&]uh1johjSgubjp)}(hhh]h)}(hKVM_REG_PPC_SIER3h]hKVM_REG_PPC_SIER3}(hjpghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM; hjmgubah}(h]h ]h"]h$]h&]uh1johjSgubjp)}(hhh]h)}(h64h]h64}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM; hjgubah}(h]h ]h"]h$]h&]uh1johjSgubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjgubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(hKVM_REG_PPC_PMC1h]hKVM_REG_PPC_PMC1}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjgubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(h32h]h32}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjgubah}(h]h ]h"]h$]h&]uh1johjgubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hjgubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(hKVM_REG_PPC_PMC2h]hKVM_REG_PPC_PMC2}(hj hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hj hubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(h32h]h32}(hj#hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hj hubah}(h]h ]h"]h$]h&]uh1johjgubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjChhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM> hj@hubah}(h]h ]h"]h$]h&]uh1johj=hubjp)}(hhh]h)}(hKVM_REG_PPC_PMC3h]hKVM_REG_PPC_PMC3}(hjZhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM> hjWhubah}(h]h ]h"]h$]h&]uh1johj=hubjp)}(hhh]h)}(h32h]h32}(hjqhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM> hjnhubah}(h]h ]h"]h$]h&]uh1johj=hubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM? hjhubah}(h]h ]h"]h$]h&]uh1johjhubjp)}(hhh]h)}(hKVM_REG_PPC_PMC4h]hKVM_REG_PPC_PMC4}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM? hjhubah}(h]h ]h"]h$]h&]uh1johjhubjp)}(hhh]h)}(h32h]h32}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM? hjhubah}(h]h ]h"]h$]h&]uh1johjhubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hjhubah}(h]h ]h"]h$]h&]uh1johjhubjp)}(hhh]h)}(hKVM_REG_PPC_PMC5h]hKVM_REG_PPC_PMC5}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hjhubah}(h]h ]h"]h$]h&]uh1johjhubjp)}(hhh]h)}(h32h]h32}(hj ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hj iubah}(h]h ]h"]h$]h&]uh1johjhubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj-ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMA hj*iubah}(h]h ]h"]h$]h&]uh1johj'iubjp)}(hhh]h)}(hKVM_REG_PPC_PMC6h]hKVM_REG_PPC_PMC6}(hjDihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMA hjAiubah}(h]h ]h"]h$]h&]uh1johj'iubjp)}(hhh]h)}(h32h]h32}(hj[ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMA hjXiubah}(h]h ]h"]h$]h&]uh1johj'iubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj{ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hjxiubah}(h]h ]h"]h$]h&]uh1johjuiubjp)}(hhh]h)}(hKVM_REG_PPC_PMC7h]hKVM_REG_PPC_PMC7}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hjiubah}(h]h ]h"]h$]h&]uh1johjuiubjp)}(hhh]h)}(h32h]h32}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hjiubah}(h]h ]h"]h$]h&]uh1johjuiubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hjiubah}(h]h ]h"]h$]h&]uh1johjiubjp)}(hhh]h)}(hKVM_REG_PPC_PMC8h]hKVM_REG_PPC_PMC8}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hjiubah}(h]h ]h"]h$]h&]uh1johjiubjp)}(hhh]h)}(h32h]h32}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hjiubah}(h]h ]h"]h$]h&]uh1johjiubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjjubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(hKVM_REG_PPC_FPR0h]hKVM_REG_PPC_FPR0}(hj.jhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hj+jubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(h64h]h64}(hjEjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjBjubah}(h]h ]h"]h$]h&]uh1johjjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjejhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME hjbjubah}(h]h ]h"]h$]h&]uh1johj_jubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj_jubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj_jubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF hjjubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(hKVM_REG_PPC_FPR31h]hKVM_REG_PPC_FPR31}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF hjjubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(h64h]h64}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF hjjubah}(h]h ]h"]h$]h&]uh1johjjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMG hjjubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(hKVM_REG_PPC_VR0h]hKVM_REG_PPC_VR0}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMG hjjubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(h128h]h128}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMG hjkubah}(h]h ]h"]h$]h&]uh1johjjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hj3khhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH hj0kubah}(h]h ]h"]h$]h&]uh1johj-kubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj-kubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj-kubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjekhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI hjbkubah}(h]h ]h"]h$]h&]uh1johj_kubjp)}(hhh]h)}(hKVM_REG_PPC_VR31h]hKVM_REG_PPC_VR31}(hj|khhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI hjykubah}(h]h ]h"]h$]h&]uh1johj_kubjp)}(hhh]h)}(h128h]h128}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI hjkubah}(h]h ]h"]h$]h&]uh1johj_kubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjkubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(hKVM_REG_PPC_VSR0h]hKVM_REG_PPC_VSR0}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjkubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(h128h]h128}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjkubah}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMK hjkubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj3lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hj0lubah}(h]h ]h"]h$]h&]uh1johj-lubjp)}(hhh]h)}(hKVM_REG_PPC_VSR31h]hKVM_REG_PPC_VSR31}(hjJlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hjGlubah}(h]h ]h"]h$]h&]uh1johj-lubjp)}(hhh]h)}(h128h]h128}(hjalhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hj^lubah}(h]h ]h"]h$]h&]uh1johj-lubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM hj~lubah}(h]h ]h"]h$]h&]uh1johj{lubjp)}(hhh]h)}(hKVM_REG_PPC_FPSCRh]hKVM_REG_PPC_FPSCR}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM hjlubah}(h]h ]h"]h$]h&]uh1johj{lubjp)}(hhh]h)}(h64h]h64}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM hjlubah}(h]h ]h"]h$]h&]uh1johj{lubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjlubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(hKVM_REG_PPC_VSCRh]hKVM_REG_PPC_VSCR}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjlubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(h32h]h32}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjlubah}(h]h ]h"]h$]h&]uh1johjlubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hjmubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(hKVM_REG_PPC_VPA_ADDRh]hKVM_REG_PPC_VPA_ADDR}(hj4mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hj1mubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(h64h]h64}(hjKmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hjHmubah}(h]h ]h"]h$]h&]uh1johjmubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjkmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hjhmubah}(h]h ]h"]h$]h&]uh1johjemubjp)}(hhh]h)}(hKVM_REG_PPC_VPA_SLBh]hKVM_REG_PPC_VPA_SLB}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hjmubah}(h]h ]h"]h$]h&]uh1johjemubjp)}(hhh]h)}(h128h]h128}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hjmubah}(h]h ]h"]h$]h&]uh1johjemubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ hjmubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(hKVM_REG_PPC_VPA_DTLh]hKVM_REG_PPC_VPA_DTL}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ hjmubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(h128h]h128}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ hjmubah}(h]h ]h"]h$]h&]uh1johjmubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMR hjnubah}(h]h ]h"]h$]h&]uh1johjnubjp)}(hhh]h)}(hKVM_REG_PPC_EPCRh]hKVM_REG_PPC_EPCR}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMR hjnubah}(h]h ]h"]h$]h&]uh1johjnubjp)}(hhh]h)}(h32h]h32}(hj5nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMR hj2nubah}(h]h ]h"]h$]h&]uh1johjnubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjUnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hjRnubah}(h]h ]h"]h$]h&]uh1johjOnubjp)}(hhh]h)}(hKVM_REG_PPC_EPRh]hKVM_REG_PPC_EPR}(hjlnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hjinubah}(h]h ]h"]h$]h&]uh1johjOnubjp)}(hhh]h)}(h32h]h32}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hjnubah}(h]h ]h"]h$]h&]uh1johjOnubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMT hjnubah}(h]h ]h"]h$]h&]uh1johjnubjp)}(hhh]h)}(hKVM_REG_PPC_TCRh]hKVM_REG_PPC_TCR}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMT hjnubah}(h]h ]h"]h$]h&]uh1johjnubjp)}(hhh]h)}(h32h]h32}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMT hjnubah}(h]h ]h"]h$]h&]uh1johjnubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMU hjnubah}(h]h ]h"]h$]h&]uh1johjnubjp)}(hhh]h)}(hKVM_REG_PPC_TSRh]hKVM_REG_PPC_TSR}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMU hjoubah}(h]h ]h"]h$]h&]uh1johjnubjp)}(hhh]h)}(h32h]h32}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMU hjoubah}(h]h ]h"]h$]h&]uh1johjnubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj?ohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMV hjqubah}(h]h ]h"]h$]h&]uh1johj qubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjaqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hj^qubah}(h]h ]h"]h$]h&]uh1johj[qubjp)}(hhh]h)}(hKVM_REG_PPC_MAS6h]hKVM_REG_PPC_MAS6}(hjxqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hjuqubah}(h]h ]h"]h$]h&]uh1johj[qubjp)}(hhh]h)}(h32h]h32}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hjqubah}(h]h ]h"]h$]h&]uh1johj[qubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^ hjqubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(hKVM_REG_PPC_MMUCFGh]hKVM_REG_PPC_MMUCFG}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^ hjqubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(h32h]h32}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^ hjqubah}(h]h ]h"]h$]h&]uh1johjqubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_ hjqubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(hKVM_REG_PPC_TLB0CFGh]hKVM_REG_PPC_TLB0CFG}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_ hjrubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(h32h]h32}(hj+rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_ hj(rubah}(h]h ]h"]h$]h&]uh1johjqubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjKrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM` hjHrubah}(h]h ]h"]h$]h&]uh1johjErubjp)}(hhh]h)}(hKVM_REG_PPC_TLB1CFGh]hKVM_REG_PPC_TLB1CFG}(hjbrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM` hj_rubah}(h]h ]h"]h$]h&]uh1johjErubjp)}(hhh]h)}(h32h]h32}(hjyrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM` hjvrubah}(h]h ]h"]h$]h&]uh1johjErubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa hjrubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(hKVM_REG_PPC_TLB2CFGh]hKVM_REG_PPC_TLB2CFG}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa hjrubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(h32h]h32}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa hjrubah}(h]h ]h"]h$]h&]uh1johjrubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMb hjrubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(hKVM_REG_PPC_TLB3CFGh]hKVM_REG_PPC_TLB3CFG}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMb hjrubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(h32h]h32}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMb hjsubah}(h]h ]h"]h$]h&]uh1johjrubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj5shhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc hj2subah}(h]h ]h"]h$]h&]uh1johj/subjp)}(hhh]h)}(hKVM_REG_PPC_TLB0PSh]hKVM_REG_PPC_TLB0PS}(hjLshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc hjIsubah}(h]h ]h"]h$]h&]uh1johj/subjp)}(hhh]h)}(h32h]h32}(hjcshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc hj`subah}(h]h ]h"]h$]h&]uh1johj/subeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hjsubah}(h]h ]h"]h$]h&]uh1johj}subjp)}(hhh]h)}(hKVM_REG_PPC_TLB1PSh]hKVM_REG_PPC_TLB1PS}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hjsubah}(h]h ]h"]h$]h&]uh1johj}subjp)}(hhh]h)}(h32h]h32}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hjsubah}(h]h ]h"]h$]h&]uh1johj}subeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMe hjsubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(hKVM_REG_PPC_TLB2PSh]hKVM_REG_PPC_TLB2PS}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMe hjsubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(h32h]h32}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMe hjsubah}(h]h ]h"]h$]h&]uh1johjsubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMf hjtubah}(h]h ]h"]h$]h&]uh1johjtubjp)}(hhh]h)}(hKVM_REG_PPC_TLB3PSh]hKVM_REG_PPC_TLB3PS}(hj6thhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMf hj3tubah}(h]h ]h"]h$]h&]uh1johjtubjp)}(hhh]h)}(h32h]h32}(hjMthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMf hjJtubah}(h]h ]h"]h$]h&]uh1johjtubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjmthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjjtubah}(h]h ]h"]h$]h&]uh1johjgtubjp)}(hhh]h)}(hKVM_REG_PPC_EPTCFGh]hKVM_REG_PPC_EPTCFG}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjtubah}(h]h ]h"]h$]h&]uh1johjgtubjp)}(hhh]h)}(h32h]h32}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjtubah}(h]h ]h"]h$]h&]uh1johjgtubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh hjtubah}(h]h ]h"]h$]h&]uh1johjtubjp)}(hhh]h)}(hKVM_REG_PPC_ICP_STATEh]hKVM_REG_PPC_ICP_STATE}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh hjtubah}(h]h ]h"]h$]h&]uh1johjtubjp)}(hhh]h)}(h64h]h64}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh hjtubah}(h]h ]h"]h$]h&]uh1johjtubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj uhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hjuubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(hKVM_REG_PPC_VP_STATEh]hKVM_REG_PPC_VP_STATE}(hj uhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hjuubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(h128h]h128}(hj7uhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hj4uubah}(h]h ]h"]h$]h&]uh1johjuubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjWuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMj hjTuubah}(h]h ]h"]h$]h&]uh1johjQuubjp)}(hhh]h)}(hKVM_REG_PPC_TB_OFFSETh]hKVM_REG_PPC_TB_OFFSET}(hjnuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMj hjkuubah}(h]h ]h"]h$]h&]uh1johjQuubjp)}(hhh]h)}(h64h]h64}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMj hjuubah}(h]h ]h"]h$]h&]uh1johjQuubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk hjuubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(hKVM_REG_PPC_SPMC1h]hKVM_REG_PPC_SPMC1}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk hjuubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(h32h]h32}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk hjuubah}(h]h ]h"]h$]h&]uh1johjuubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl hjuubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(hKVM_REG_PPC_SPMC2h]hKVM_REG_PPC_SPMC2}(hj vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl hjvubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(h32h]h32}(hj!vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl hjvubah}(h]h ]h"]h$]h&]uh1johjuubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjAvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm hj>vubah}(h]h ]h"]h$]h&]uh1johj;vubjp)}(hhh]h)}(hKVM_REG_PPC_IAMRh]hKVM_REG_PPC_IAMR}(hjXvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm hjUvubah}(h]h ]h"]h$]h&]uh1johj;vubjp)}(hhh]h)}(h64h]h64}(hjovhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm hjlvubah}(h]h ]h"]h$]h&]uh1johj;vubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn hjvubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(hKVM_REG_PPC_TFHARh]hKVM_REG_PPC_TFHAR}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn hjvubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(h64h]h64}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn hjvubah}(h]h ]h"]h$]h&]uh1johjvubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo hjvubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(hKVM_REG_PPC_TFIARh]hKVM_REG_PPC_TFIAR}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo hjvubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(h64h]h64}(hj whhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo hjwubah}(h]h ]h"]h$]h&]uh1johjvubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj+whhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp hj(wubah}(h]h ]h"]h$]h&]uh1johj%wubjp)}(hhh]h)}(hKVM_REG_PPC_TEXASRh]hKVM_REG_PPC_TEXASR}(hjBwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp hj?wubah}(h]h ]h"]h$]h&]uh1johj%wubjp)}(hhh]h)}(h64h]h64}(hjYwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp hjVwubah}(h]h ]h"]h$]h&]uh1johj%wubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjywhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMq hjvwubah}(h]h ]h"]h$]h&]uh1johjswubjp)}(hhh]h)}(hKVM_REG_PPC_FSCRh]hKVM_REG_PPC_FSCR}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMq hjwubah}(h]h ]h"]h$]h&]uh1johjswubjp)}(hhh]h)}(h64h]h64}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMq hjwubah}(h]h ]h"]h$]h&]uh1johjswubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr hjwubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(hKVM_REG_PPC_PSPBh]hKVM_REG_PPC_PSPB}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr hjwubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(h32h]h32}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr hjwubah}(h]h ]h"]h$]h&]uh1johjwubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMs hjxubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(hKVM_REG_PPC_EBBHRh]hKVM_REG_PPC_EBBHR}(hj,xhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMs hj)xubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(h64h]h64}(hjCxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMs hj@xubah}(h]h ]h"]h$]h&]uh1johjxubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjcxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hj`xubah}(h]h ]h"]h$]h&]uh1johj]xubjp)}(hhh]h)}(hKVM_REG_PPC_EBBRRh]hKVM_REG_PPC_EBBRR}(hjzxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjwxubah}(h]h ]h"]h$]h&]uh1johj]xubjp)}(hhh]h)}(h64h]h64}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjxubah}(h]h ]h"]h$]h&]uh1johj]xubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hjxubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(hKVM_REG_PPC_BESCRh]hKVM_REG_PPC_BESCR}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hjxubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(h64h]h64}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hjxubah}(h]h ]h"]h$]h&]uh1johjxubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMv hjxubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(hKVM_REG_PPC_TARh]hKVM_REG_PPC_TAR}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMv hjyubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(h64h]h64}(hj-yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMv hj*yubah}(h]h ]h"]h$]h&]uh1johjxubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjMyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMw hjJyubah}(h]h ]h"]h$]h&]uh1johjGyubjp)}(hhh]h)}(hKVM_REG_PPC_DPDESh]hKVM_REG_PPC_DPDES}(hjdyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMw hjayubah}(h]h ]h"]h$]h&]uh1johjGyubjp)}(hhh]h)}(h64h]h64}(hj{yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMw hjxyubah}(h]h ]h"]h$]h&]uh1johjGyubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMx hjyubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(hKVM_REG_PPC_DAWRh]hKVM_REG_PPC_DAWR}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMx hjyubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(h64h]h64}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMx hjyubah}(h]h ]h"]h$]h&]uh1johjyubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMy hjyubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(hKVM_REG_PPC_DAWRXh]hKVM_REG_PPC_DAWRX}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMy hjyubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(h64h]h64}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMy hjzubah}(h]h ]h"]h$]h&]uh1johjyubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj7zhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz hj4zubah}(h]h ]h"]h$]h&]uh1johj1zubjp)}(hhh]h)}(hKVM_REG_PPC_CIABRh]hKVM_REG_PPC_CIABR}(hjNzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz hjKzubah}(h]h ]h"]h$]h&]uh1johj1zubjp)}(hhh]h)}(h64h]h64}(hjezhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz hjbzubah}(h]h ]h"]h$]h&]uh1johj1zubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{ hjzubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(hKVM_REG_PPC_ICh]hKVM_REG_PPC_IC}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{ hjzubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(h64h]h64}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{ hjzubah}(h]h ]h"]h$]h&]uh1johjzubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM| hjzubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(hKVM_REG_PPC_VTBh]hKVM_REG_PPC_VTB}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM| hjzubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(h64h]h64}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM| hjzubah}(h]h ]h"]h$]h&]uh1johjzubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj!{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM} hj{ubah}(h]h ]h"]h$]h&]uh1johj{ubjp)}(hhh]h)}(hKVM_REG_PPC_CSIGRh]hKVM_REG_PPC_CSIGR}(hj8{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM} hj5{ubah}(h]h ]h"]h$]h&]uh1johj{ubjp)}(hhh]h)}(h64h]h64}(hjO{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM} hjL{ubah}(h]h ]h"]h$]h&]uh1johj{ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjo{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hjl{ubah}(h]h ]h"]h$]h&]uh1johji{ubjp)}(hhh]h)}(hKVM_REG_PPC_TACRh]hKVM_REG_PPC_TACR}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hj{ubah}(h]h ]h"]h$]h&]uh1johji{ubjp)}(hhh]h)}(h64h]h64}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hj{ubah}(h]h ]h"]h$]h&]uh1johji{ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj{ubah}(h]h ]h"]h$]h&]uh1johj{ubjp)}(hhh]h)}(hKVM_REG_PPC_TCSCRh]hKVM_REG_PPC_TCSCR}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj{ubah}(h]h ]h"]h$]h&]uh1johj{ubjp)}(hhh]h)}(h64h]h64}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj{ubah}(h]h ]h"]h$]h&]uh1johj{ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj |hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johj|ubjp)}(hhh]h)}(hKVM_REG_PPC_PIDh]hKVM_REG_PPC_PID}(hj"|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johj|ubjp)}(hhh]h)}(h64h]h64}(hj9|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj6|ubah}(h]h ]h"]h$]h&]uh1johj|ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjY|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjV|ubah}(h]h ]h"]h$]h&]uh1johjS|ubjp)}(hhh]h)}(hKVM_REG_PPC_ACOPh]hKVM_REG_PPC_ACOP}(hjp|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjm|ubah}(h]h ]h"]h$]h&]uh1johjS|ubjp)}(hhh]h)}(h64h]h64}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johjS|ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johj|ubjp)}(hhh]h)}(hKVM_REG_PPC_VRSAVEh]hKVM_REG_PPC_VRSAVE}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johj|ubjp)}(hhh]h)}(h32h]h32}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johj|ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johj|ubjp)}(hhh]h)}(hKVM_REG_PPC_LPCRh]hKVM_REG_PPC_LPCR}(hj }hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj }ubah}(h]h ]h"]h$]h&]uh1johj|ubjp)}(hhh]h)}(h32h]h32}(hj#}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj }ubah}(h]h ]h"]h$]h&]uh1johj|ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjC}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj@}ubah}(h]h ]h"]h$]h&]uh1johj=}ubjp)}(hhh]h)}(hKVM_REG_PPC_LPCR_64h]hKVM_REG_PPC_LPCR_64}(hjZ}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjW}ubah}(h]h ]h"]h$]h&]uh1johj=}ubjp)}(hhh]h)}(h64h]h64}(hjq}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjn}ubah}(h]h ]h"]h$]h&]uh1johj=}ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(hKVM_REG_PPC_PPRh]hKVM_REG_PPC_PPR}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(h64h]h64}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johj}ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(hKVM_REG_PPC_ARCH_COMPATh]hKVM_REG_PPC_ARCH_COMPAT}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(h32h]h32}(hj ~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ~ubah}(h]h ]h"]h$]h&]uh1johj}ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj-~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj*~ubah}(h]h ]h"]h$]h&]uh1johj'~ubjp)}(hhh]h)}(hKVM_REG_PPC_DABRXh]hKVM_REG_PPC_DABRX}(hjD~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjA~ubah}(h]h ]h"]h$]h&]uh1johj'~ubjp)}(hhh]h)}(h32h]h32}(hj[~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjX~ubah}(h]h ]h"]h$]h&]uh1johj'~ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj{~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjx~ubah}(h]h ]h"]h$]h&]uh1johju~ubjp)}(hhh]h)}(hKVM_REG_PPC_WORTh]hKVM_REG_PPC_WORT}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johju~ubjp)}(hhh]h)}(h64h]h64}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johju~ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johj~ubjp)}(hhh]h)}(hKVM_REG_PPC_SPRG9h]hKVM_REG_PPC_SPRG9}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johj~ubjp)}(hhh]h)}(h64h]h64}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johj~ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_DBSRh]hKVM_REG_PPC_DBSR}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj+ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjbubah}(h]h ]h"]h$]h&]uh1johj_ubjp)}(hhh]h)}(hKVM_REG_PPC_TIDRh]hKVM_REG_PPC_TIDR}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjyubah}(h]h ]h"]h$]h&]uh1johj_ubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj_ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_PSSCRh]hKVM_REG_PPC_PSSCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_DEC_EXPIRYh]hKVM_REG_PPC_DEC_EXPIRY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj,ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjLubah}(h]h ]h"]h$]h&]uh1johjIubjp)}(hhh]h)}(hKVM_REG_PPC_PTCRh]hKVM_REG_PPC_PTCR}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjcubah}(h]h ]h"]h$]h&]uh1johjIubjp)}(hhh]h)}(h64h]h64}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjzubah}(h]h ]h"]h$]h&]uh1johjIubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_HASHKEYRh]hKVM_REG_PPC_HASHKEYR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjˀhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjȀubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_HASHPKEYRh]hKVM_REG_PPC_HASHPKEYR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj6ubah}(h]h ]h"]h$]h&]uh1johj3ubjp)}(hhh]h)}(hKVM_REG_PPC_DAWR1h]hKVM_REG_PPC_DAWR1}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjMubah}(h]h ]h"]h$]h&]uh1johj3ubjp)}(hhh]h)}(h64h]h64}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdubah}(h]h ]h"]h$]h&]uh1johj3ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_DAWRX1h]hKVM_REG_PPC_DAWRX1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjՁhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjҁubah}(h]h ]h"]h$]h&]uh1johjρubjp)}(hhh]h)}(hKVM_REG_PPC_DEXCRh]hKVM_REG_PPC_DEXCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjρubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjρubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_GPR0h]hKVM_REG_PPC_TM_GPR0}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj7ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjNubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjnubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_GPR31h]hKVM_REG_PPC_TM_GPR31}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjтhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj΂ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_VSR0h]hKVM_REG_PPC_TM_VSR0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h128h]h128}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj<ubah}(h]h ]h"]h$]h&]uh1johj9ubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj9ubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj9ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjnubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(hKVM_REG_PPC_TM_VSR63h]hKVM_REG_PPC_TM_VSR63}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(h128h]h128}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_CRh]hKVM_REG_PPC_TM_CR}(hjփhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjӃubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_LRh]hKVM_REG_PPC_TM_LR}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj!ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj8ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXubah}(h]h ]h"]h$]h&]uh1johjUubjp)}(hhh]h)}(hKVM_REG_PPC_TM_CTRh]hKVM_REG_PPC_TM_CTR}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjoubah}(h]h ]h"]h$]h&]uh1johjUubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjUubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_FPSCRh]hKVM_REG_PPC_TM_FPSCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjׄhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjԄubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_AMRh]hKVM_REG_PPC_TM_AMR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj"ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1johj?ubjp)}(hhh]h)}(hKVM_REG_PPC_TM_PPRh]hKVM_REG_PPC_TM_PPR}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjYubah}(h]h ]h"]h$]h&]uh1johj?ubjp)}(hhh]h)}(h64h]h64}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjpubah}(h]h ]h"]h$]h&]uh1johj?ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_VRSAVEh]hKVM_REG_PPC_TM_VRSAVE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjޅubah}(h]h ]h"]h$]h&]uh1johjۅubjp)}(hhh]h)}(hKVM_REG_PPC_TM_VSCRh]hKVM_REG_PPC_TM_VSCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjۅubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjۅubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj,ubah}(h]h ]h"]h$]h&]uh1johj)ubjp)}(hhh]h)}(hKVM_REG_PPC_TM_DSCRh]hKVM_REG_PPC_TM_DSCR}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjCubah}(h]h ]h"]h$]h&]uh1johj)ubjp)}(hhh]h)}(h64h]h64}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjZubah}(h]h ]h"]h$]h&]uh1johj)ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjzubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(hKVM_REG_PPC_TM_TARh]hKVM_REG_PPC_TM_TAR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjwubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjˆhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjȆubah}(h]h ]h"]h$]h&]uh1johjņubjp)}(hhh]h)}(hKVM_REG_PPC_TM_XERh]hKVM_REG_PPC_TM_XER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj߆ubah}(h]h ]h"]h$]h&]uh1johjņubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjņubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_R0h]hKVM_REG_MIPS_R0}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj-ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjDubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjaubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_R31h]hKVM_REG_MIPS_R31}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjLJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjćubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_HIh]hKVM_REG_MIPS_HI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj2ubah}(h]h ]h"]h$]h&]uh1johj/ubjp)}(hhh]h)}(hKVM_REG_MIPS_LOh]hKVM_REG_MIPS_LO}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjIubah}(h]h ]h"]h$]h&]uh1johj/ubjp)}(hhh]h)}(h64h]h64}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj`ubah}(h]h ]h"]h$]h&]uh1johj/ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(hKVM_REG_MIPS_PCh]hKVM_REG_MIPS_PC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj}ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjшhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjΈubah}(h]h ]h"]h$]h&]uh1johjˈubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_INDEXh]hKVM_REG_MIPS_CP0_INDEX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjˈubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjˈubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_ENTRYLO0h]hKVM_REG_MIPS_CP0_ENTRYLO0}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj3ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjJubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjjubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_ENTRYLO1h]hKVM_REG_MIPS_CP0_ENTRYLO1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjgubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONTEXTh]hKVM_REG_MIPS_CP0_CONTEXT}(hj҉hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjωubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONTEXTCONFIGh]hKVM_REG_MIPS_CP0_CONTEXTCONFIG}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjTubah}(h]h ]h"]h$]h&]uh1johjQubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_USERLOCALh]hKVM_REG_MIPS_CP0_USERLOCAL}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjkubah}(h]h ]h"]h$]h&]uh1johjQubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjQubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_XCONTEXTCONFIGh]hKVM_REG_MIPS_CP0_XCONTEXTCONFIG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjӊhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjЊubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_PAGEMASKh]hKVM_REG_MIPS_CP0_PAGEMASK}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj>ubah}(h]h ]h"]h$]h&]uh1johj;ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_PAGEGRAINh]hKVM_REG_MIPS_CP0_PAGEGRAIN}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjUubah}(h]h ]h"]h$]h&]uh1johj;ubjp)}(hhh]h)}(h32h]h32}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjlubah}(h]h ]h"]h$]h&]uh1johj;ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_SEGCTL0h]hKVM_REG_MIPS_CP0_SEGCTL0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj݋hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjڋubah}(h]h ]h"]h$]h&]uh1johj׋ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_SEGCTL1h]hKVM_REG_MIPS_CP0_SEGCTL1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj׋ubjp)}(hhh]h)}(h64h]h64}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj׋ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj(ubah}(h]h ]h"]h$]h&]uh1johj%ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_SEGCTL2h]hKVM_REG_MIPS_CP0_SEGCTL2}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj?ubah}(h]h ]h"]h$]h&]uh1johj%ubjp)}(hhh]h)}(h64h]h64}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjVubah}(h]h ]h"]h$]h&]uh1johj%ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjvubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_PWBASEh]hKVM_REG_MIPS_CP0_PWBASE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjsubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjnjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjČubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_PWFIELDh]hKVM_REG_MIPS_CP0_PWFIELD}(hjތhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjیubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_PWSIZEh]hKVM_REG_MIPS_CP0_PWSIZE}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj)ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj@ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj`ubah}(h]h ]h"]h$]h&]uh1johj]ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_WIREDh]hKVM_REG_MIPS_CP0_WIRED}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjwubah}(h]h ]h"]h$]h&]uh1johj]ubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj]ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_PWCTLh]hKVM_REG_MIPS_CP0_PWCTL}(hjȍhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjōubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjߍhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj܍ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_HWRENAh]hKVM_REG_MIPS_CP0_HWRENA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj*ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjJubah}(h]h ]h"]h$]h&]uh1johjGubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_BADVADDRh]hKVM_REG_MIPS_CP0_BADVADDR}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjaubah}(h]h ]h"]h$]h&]uh1johjGubjp)}(hhh]h)}(h64h]h64}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjxubah}(h]h ]h"]h$]h&]uh1johjGubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_BADINSTRh]hKVM_REG_MIPS_CP0_BADINSTR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjɎhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjƎubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_BADINSTRPh]hKVM_REG_MIPS_CP0_BADINSTRP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4ubah}(h]h ]h"]h$]h&]uh1johj1ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_COUNTh]hKVM_REG_MIPS_CP0_COUNT}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjKubah}(h]h ]h"]h$]h&]uh1johj1ubjp)}(hhh]h)}(h32h]h32}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjbubah}(h]h ]h"]h$]h&]uh1johj1ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_ENTRYHIh]hKVM_REG_MIPS_CP0_ENTRYHI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjӏhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjЏubah}(h]h ]h"]h$]h&]uh1johj͏ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_COMPAREh]hKVM_REG_MIPS_CP0_COMPARE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj͏ubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj͏ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_STATUSh]hKVM_REG_MIPS_CP0_STATUS}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj5ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjLubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjlubah}(h]h ]h"]h$]h&]uh1johjiubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_INTCTLh]hKVM_REG_MIPS_CP0_INTCTL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjiubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjiubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CAUSEh]hKVM_REG_MIPS_CP0_CAUSE}(hjԐhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjѐubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_EPCh]hKVM_REG_MIPS_CP0_EPC}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj6ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjVubah}(h]h ]h"]h$]h&]uh1johjSubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_PRIDh]hKVM_REG_MIPS_CP0_PRID}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjmubah}(h]h ]h"]h$]h&]uh1johjSubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjSubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_EBASEh]hKVM_REG_MIPS_CP0_EBASE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjՑhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjґubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIGh]hKVM_REG_MIPS_CP0_CONFIG}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj@ubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG1h]hKVM_REG_MIPS_CP0_CONFIG1}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjWubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h)}(h32h]h32}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjnubah}(h]h ]h"]h$]h&]uh1johj=ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG2h]hKVM_REG_MIPS_CP0_CONFIG2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjߒhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjܒubah}(h]h ]h"]h$]h&]uh1johjْubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG3h]hKVM_REG_MIPS_CP0_CONFIG3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjْubjp)}(hhh]h)}(h32h]h32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjْubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj*ubah}(h]h ]h"]h$]h&]uh1johj'ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG4h]hKVM_REG_MIPS_CP0_CONFIG4}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjAubah}(h]h ]h"]h$]h&]uh1johj'ubjp)}(hhh]h)}(h32h]h32}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXubah}(h]h ]h"]h$]h&]uh1johj'ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjxubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG5h]hKVM_REG_MIPS_CP0_CONFIG5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjuubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjɓhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjƓubah}(h]h ]h"]h$]h&]uh1johjÓubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG7h]hKVM_REG_MIPS_CP0_CONFIG7}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjݓubah}(h]h ]h"]h$]h&]uh1johjÓubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjÓubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_XCONTEXTh]hKVM_REG_MIPS_CP0_XCONTEXT}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj+ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjbubah}(h]h ]h"]h$]h&]uh1johj_ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_ERROREPCh]hKVM_REG_MIPS_CP0_ERROREPC}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjyubah}(h]h ]h"]h$]h&]uh1johj_ubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj_ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_KSCRATCH1h]hKVM_REG_MIPS_CP0_KSCRATCH1}(hjʔhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjǔubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjޔubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_KSCRATCH2h]hKVM_REG_MIPS_CP0_KSCRATCH2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj,ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjLubah}(h]h ]h"]h$]h&]uh1johjIubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_KSCRATCH3h]hKVM_REG_MIPS_CP0_KSCRATCH3}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjcubah}(h]h ]h"]h$]h&]uh1johjIubjp)}(hhh]h)}(h64h]h64}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjzubah}(h]h ]h"]h$]h&]uh1johjIubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_KSCRATCH4h]hKVM_REG_MIPS_CP0_KSCRATCH4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj˕hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjȕubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_KSCRATCH5h]hKVM_REG_MIPS_CP0_KSCRATCH5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj6ubah}(h]h ]h"]h$]h&]uh1johj3ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_KSCRATCH6h]hKVM_REG_MIPS_CP0_KSCRATCH6}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjMubah}(h]h ]h"]h$]h&]uh1johj3ubjp)}(hhh]h)}(h64h]h64}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdubah}(h]h ]h"]h$]h&]uh1johj3ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_MAAR(0..63)h]hKVM_REG_MIPS_CP0_MAAR(0..63)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjՖhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjҖubah}(h]h ]h"]h$]h&]uh1johjϖubjp)}(hhh]h)}(hKVM_REG_MIPS_COUNT_CTLh]hKVM_REG_MIPS_COUNT_CTL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjϖubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjϖubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_COUNT_RESUMEh]hKVM_REG_MIPS_COUNT_RESUME}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj7ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjNubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjnubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(hKVM_REG_MIPS_COUNT_HZh]hKVM_REG_MIPS_COUNT_HZ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_FPR_32(0..31)h]hKVM_REG_MIPS_FPR_32(0..31)}(hj֗hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjӗubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_FPR_64(0..31)h]hKVM_REG_MIPS_FPR_64(0..31)}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj!ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj8ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXubah}(h]h ]h"]h$]h&]uh1johjUubjp)}(hhh]h)}(hKVM_REG_MIPS_VEC_128(0..31)h]hKVM_REG_MIPS_VEC_128(0..31)}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjoubah}(h]h ]h"]h$]h&]uh1johjUubjp)}(hhh]h)}(h128h]h128}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjUubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_FCR_IRh]hKVM_REG_MIPS_FCR_IR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjטhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjԘubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_FCR_CSRh]hKVM_REG_MIPS_FCR_CSR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj"ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1johj?ubjp)}(hhh]h)}(hKVM_REG_MIPS_MSA_IRh]hKVM_REG_MIPS_MSA_IR}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjYubah}(h]h ]h"]h$]h&]uh1johj?ubjp)}(hhh]h)}(h32h]h32}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjpubah}(h]h ]h"]h$]h&]uh1johj?ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_MSA_CSRh]hKVM_REG_MIPS_MSA_CSR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubeh}(h]h ]h"]h$]h&]uh1jehj8_ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj5_ubah}(h]h ]h"]h$]h&]uh1jEhj1_ubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hzARM registers are mapped using the lower 32 bits. The upper 16 of that is the register group type, or coprocessor number:h]hzARM registers are mapped using the lower 32 bits. The upper 16 of that is the register group type, or coprocessor number:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(h7ARM core registers have the following id bit patterns::h]h6ARM core registers have the following id bit patterns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h40x4020 0000 0010 h]h40x4020 0000 0010 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h>ARM 32-bit CP15 registers have the following id bit patterns::h]h=ARM 32-bit CP15 registers have the following id bit patterns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h;0x4020 0000 000F h]h;0x4020 0000 000F }hj,sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h>ARM 64-bit CP15 registers have the following id bit patterns::h]h=ARM 64-bit CP15 registers have the following id bit patterns:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h<0x4030 0000 000F h]h<0x4030 0000 000F }hjHsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h8ARM CCSIDR registers are demultiplexed by CSSELR value::h]h7ARM CCSIDR registers are demultiplexed by CSSELR value:}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x4020 0000 0011 00 h]h0x4020 0000 0011 00 }hjdsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hEARM 32-bit VFP control registers have the following id bit patterns::h]hDARM 32-bit VFP control registers have the following id bit patterns:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x4020 0000 0012 1 h]h0x4020 0000 0012 1 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hh]h0x4030 0000 0012 0 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h>ARM firmware pseudo-registers have the following bit pattern::h]h=ARM firmware pseudo-registers have the following bit pattern:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x4030 0000 0014 h]h0x4030 0000 0014 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h{arm64 registers are mapped using the lower 32 bits. The upper 16 of that is the register group type, or coprocessor number:h]h{arm64 registers are mapped using the lower 32 bits. The upper 16 of that is the register group type, or coprocessor number:}(hjƚhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hXarm64 core/FP-SIMD registers have the following id bit patterns. Note that the size of the access is variable, as the kvm_regs structure contains elements ranging from 32 to 128 bits. The index is a 32bit value in the kvm_regs structure seen as a 32bit array::h]hXarm64 core/FP-SIMD registers have the following id bit patterns. Note that the size of the access is variable, as the kvm_regs structure contains elements ranging from 32 to 128 bits. The index is a 32bit value in the kvm_regs structure seen as a 32bit array:}(hjԚhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h40x60x0 0000 0010 h]h40x60x0 0000 0010 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h Specifically:h]h Specifically:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jOhjubjZ_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj2ubah}(h]h ]h"]h$]h&]uh1johj/ubjp)}(hhh]h)}(hRegisterh]hRegister}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjIubah}(h]h ]h"]h$]h&]uh1johj/ubjp)}(hhh]h)}(hBitsh]hBits}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj`ubah}(h]h ]h"]h$]h&]uh1johj/ubjp)}(hhh]h)}(hkvm_regs memberh]hkvm_regs member}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjwubah}(h]h ]h"]h$]h&]uh1johj/ubeh}(h]h ]h"]h$]h&]uh1jjhj,ubah}(h]h ]h"]h$]h&]uh1jY_hjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0000h]h0x6030 0000 0010 0000}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hX0h]hX0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjћhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjΛubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h regs.regs[0]h]h regs.regs[0]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0002h]h0x6030 0000 0010 0002}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hX1h]hX1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj3ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h regs.regs[1]h]h regs.regs[1]}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjJubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjjubah}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjgubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjgubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 003ch]h0x6030 0000 0010 003c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hX30h]hX30}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj֜hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjӜubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h regs.regs[30]h]h regs.regs[30]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 003eh]h0x6030 0000 0010 003e}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSPh]hSP}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj!ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj8ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.sph]hregs.sp}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjOubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0040h]h0x6030 0000 0010 0040}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjoubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(hPCh]hPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(hregs.pch]hregs.pc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjlubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0042h]h0x6030 0000 0010 0042}(hjםhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjԝubah}(h]h ]h"]h$]h&]uh1johjѝubjp)}(hhh]h)}(hPSTATEh]hPSTATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjѝubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjѝubjp)}(hhh]h)}(h regs.pstateh]h regs.pstate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjѝubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0044h]h0x6030 0000 0010 0044}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj9ubah}(h]h ]h"]h$]h&]uh1johj6ubjp)}(hhh]h)}(hSP_EL1h]hSP_EL1}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1johj6ubjp)}(hhh]h)}(h64h]h64}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjgubah}(h]h ]h"]h$]h&]uh1johj6ubjp)}(hhh]h)}(hsp_el1h]hsp_el1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johj6ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0046h]h0x6030 0000 0010 0046}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hELR_EL1h]hELR_EL1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjϞhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj̞ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(helr_el1h]helr_el1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0048h]h0x6030 0000 0010 0048}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSPSR_EL1h]hSPSR_EL1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj1ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h#spsr[KVM_SPSR_EL1] (alias SPSR_SVC)h]h#spsr[KVM_SPSR_EL1] (alias SPSR_SVC)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjHubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 004ah]h0x6030 0000 0010 004a}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh]h)}(hSPSR_ABTh]hSPSR_ABT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh]h)}(hspsr[KVM_SPSR_ABT]h]hspsr[KVM_SPSR_ABT]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjeubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 004ch]h0x6030 0000 0010 004c}(hjПhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj͟ubah}(h]h ]h"]h$]h&]uh1johjʟubjp)}(hhh]h)}(hSPSR_UNDh]hSPSR_UND}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjʟubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjʟubjp)}(hhh]h)}(hspsr[KVM_SPSR_UND]h]hspsr[KVM_SPSR_UND]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjʟubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 004eh]h0x6030 0000 0010 004e}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM! hj2ubah}(h]h ]h"]h$]h&]uh1johj/ubjp)}(hhh]h)}(hSPSR_IRQh]hSPSR_IRQ}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM! hjIubah}(h]h ]h"]h$]h&]uh1johj/ubjp)}(hhh]h)}(h64h]h64}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM! hj`ubah}(h]h ]h"]h$]h&]uh1johj/ubjp)}(hhh]h)}(hspsr[KVM_SPSR_IRQ]h]hspsr[KVM_SPSR_IRQ]}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM! hjwubah}(h]h ]h"]h$]h&]uh1johj/ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0050h]h0x6030 0000 0010 0050}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM" hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSPSR_FIQh]hSPSR_FIQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM" hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjȠhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM" hjŠubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hspsr[KVM_SPSR_FIQ]h]hspsr[KVM_SPSR_FIQ]}(hjߠhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM" hjܠubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6040 0000 0010 0054h]h0x6040 0000 0010 0054}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM# hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hV0h]hV0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM# hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h128h]h128}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM# hj*ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hfp_regs.vregs[0] [1]_h](hfp_regs.vregs[0] }(hjDhhhNhNubhfootnote_reference)}(h[1]_h]h1}(hjNhhhNhNubah}(h]id11ah ]h"]h$]h&]jKid14docnamejuh1jLhjDresolvedKubeh}(h]h ]h"]h$]h&]uh1hhhhM# hjAubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6040 0000 0010 0058h]h0x6040 0000 0010 0058}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$ hjuubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(hV1h]hV1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$ hjubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(h128h]h128}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$ hjubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(hfp_regs.vregs[1] [1]_h](hfp_regs.vregs[1] }(hjhhhNhNubjM)}(h[1]_h]h1}(hjšhhhNhNubah}(h]id12ah ]h"]h$]h&]jKj]j^juh1jLhjj_Kubeh}(h]h ]h"]h$]h&]uh1hhhhM$ hjubah}(h]h ]h"]h$]h&]uh1johjrubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM% hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6040 0000 0010 00d0h]h0x6040 0000 0010 00d0}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM& hj$ubah}(h]h ]h"]h$]h&]uh1johj!ubjp)}(hhh]h)}(hV31h]hV31}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM& hj;ubah}(h]h ]h"]h$]h&]uh1johj!ubjp)}(hhh]h)}(h128h]h128}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM& hjRubah}(h]h ]h"]h$]h&]uh1johj!ubjp)}(hhh]h)}(hfp_regs.vregs[31] [1]_h](hfp_regs.vregs[31] }(hjlhhhNhNubjM)}(h[1]_h]h1}(hjthhhNhNubah}(h]id13ah ]h"]h$]h&]jKj]j^juh1jLhjlj_Kubeh}(h]h ]h"]h$]h&]uh1hhhhM& hjiubah}(h]h ]h"]h$]h&]uh1johj!ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6020 0000 0010 00d4h]h0x6020 0000 0010 00d4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM' hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFPSRh]hFPSR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM' hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjɢhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM' hjƢubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h fp_regs.fpsrh]h fp_regs.fpsr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM' hjݢubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x6020 0000 0010 00d5h]h0x6020 0000 0010 00d5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFPCRh]hFPCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hj+ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h fp_regs.fpcrh]h fp_regs.fpcr}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hjBubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhj\hhhhhNubhfootnote)}(hThese encodings are not accepted for SVE-enabled vcpus. See :ref:`KVM_ARM_VCPU_INIT`. The equivalent register content can be accessed via bits [127:0] of the corresponding SVE Zn registers instead for vcpus that have SVE enabled (see below). h](hlabel)}(h1h]h1}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjtubh)}(hVThese encodings are not accepted for SVE-enabled vcpus. See :ref:`KVM_ARM_VCPU_INIT`.h](h=These encodings are not accepted for SVE-enabled vcpus. See }(hjhhhNhNubh)}(h:ref:`KVM_ARM_VCPU_INIT`h]j)}(hjh]hKVM_ARM_VCPU_INIT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjkvm_arm_vcpu_inituh1hhhhM+ hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM+ hjtubh)}(hThe equivalent register content can be accessed via bits [127:0] of the corresponding SVE Zn registers instead for vcpus that have SVE enabled (see below).h]hThe equivalent register content can be accessed via bits [127:0] of the corresponding SVE Zn registers instead for vcpus that have SVE enabled (see below).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM. hjtubeh}(h]j]ah ]h"]1ah$]h&](jXjϡj~ej^juh1jrhhhM+ hj\hhj_Kubh)}(h:arm64 CCSIDR registers are demultiplexed by CSSELR value::h]h9arm64 CCSIDR registers are demultiplexed by CSSELR value:}(hjϣhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hj\hhubj$)}(h0x6020 0000 0011 00 h]h0x6020 0000 0011 00 }hjݣsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM4 hj\hhubh)}(h;arm64 system registers have the following id bit patterns::h]h:arm64 system registers have the following id bit patterns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6 hj\hhubj$)}(h80x6030 0000 0013 h]h80x6030 0000 0013 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM8 hj\hhubj?)}(hXTwo system register IDs do not follow the specified pattern. These are KVM_REG_ARM_TIMER_CVAL and KVM_REG_ARM_TIMER_CNT, which map to system registers CNTV_CVAL_EL0 and CNTVCT_EL0 respectively. These two had their values accidentally swapped, which means TIMER_CVAL is derived from the register encoding for CNTVCT_EL0 and TIMER_CNT is derived from the register encoding for CNTV_CVAL_EL0. As this is API, it must remain this way.h]h)}(hXTwo system register IDs do not follow the specified pattern. These are KVM_REG_ARM_TIMER_CVAL and KVM_REG_ARM_TIMER_CNT, which map to system registers CNTV_CVAL_EL0 and CNTVCT_EL0 respectively. These two had their values accidentally swapped, which means TIMER_CVAL is derived from the register encoding for CNTVCT_EL0 and TIMER_CNT is derived from the register encoding for CNTV_CVAL_EL0. As this is API, it must remain this way.h]hXTwo system register IDs do not follow the specified pattern. These are KVM_REG_ARM_TIMER_CVAL and KVM_REG_ARM_TIMER_CNT, which map to system registers CNTV_CVAL_EL0 and CNTVCT_EL0 respectively. These two had their values accidentally swapped, which means TIMER_CVAL is derived from the register encoding for CNTVCT_EL0 and TIMER_CNT is derived from the register encoding for CNTV_CVAL_EL0. As this is API, it must remain this way.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjubah}(h]h ]h"]h$]h&]uh1j?hj\hhhhhNubh)}(h@arm64 firmware pseudo-registers have the following bit pattern::h]h?arm64 firmware pseudo-registers have the following bit pattern:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hj\hhubj$)}(h0x6030 0000 0014 h]h0x6030 0000 0014 }hj-sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMF hj\hhubh)}(h5arm64 SVE registers have the following bit patterns::h]h4arm64 SVE registers have the following bit patterns:}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH hj\hhubj$)}(hX00x6080 0000 0015 00 Zn bits[2048*slice + 2047 : 2048*slice] 0x6050 0000 0015 04 Pn bits[256*slice + 255 : 256*slice] 0x6050 0000 0015 060 FFR bits[256*slice + 255 : 256*slice] 0x6060 0000 0015 ffff KVM_REG_ARM64_SVE_VLS pseudo-registerh]hX00x6080 0000 0015 00 Zn bits[2048*slice + 2047 : 2048*slice] 0x6050 0000 0015 04 Pn bits[256*slice + 255 : 256*slice] 0x6050 0000 0015 060 FFR bits[256*slice + 255 : 256*slice] 0x6060 0000 0015 ffff KVM_REG_ARM64_SVE_VLS pseudo-register}hjIsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMJ hj\hhubh)}(hAccess to register IDs where 2048 * slice >= 128 * max_vq will fail with ENOENT. max_vq is the vcpu's maximum supported vector length in 128-bit quadwords: see [2]_ below.h](hAccess to register IDs where 2048 * slice >= 128 * max_vq will fail with ENOENT. max_vq is the vcpu’s maximum supported vector length in 128-bit quadwords: see }(hjWhhhNhNubjM)}(h[2]_h]h2}(hj_hhhNhNubah}(h]id15ah ]h"]h$]h&]jKid16j^juh1jLhjWj_Kubh below.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMO hj\hhubh)}(hiThese registers are only accessible on vcpus for which SVE is enabled. See KVM_ARM_VCPU_INIT for details.h]hiThese registers are only accessible on vcpus for which SVE is enabled. See KVM_ARM_VCPU_INIT for details.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hj\hhubh)}(hXIn addition, except for KVM_REG_ARM64_SVE_VLS, these registers are not accessible until the vcpu's SVE configuration has been finalized using KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE). See KVM_ARM_VCPU_INIT and KVM_ARM_VCPU_FINALIZE for more information about this procedure.h]hXIn addition, except for KVM_REG_ARM64_SVE_VLS, these registers are not accessible until the vcpu’s SVE configuration has been finalized using KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE). See KVM_ARM_VCPU_INIT and KVM_ARM_VCPU_FINALIZE for more information about this procedure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMV hj\hhubh)}(hX^KVM_REG_ARM64_SVE_VLS is a pseudo-register that allows the set of vector lengths supported by the vcpu to be discovered and configured by userspace. When transferred to or from user memory via KVM_GET_ONE_REG or KVM_SET_ONE_REG, the value of this register is of type __u64[KVM_ARM64_SVE_VLS_WORDS], and encodes the set of vector lengths as follows::h]hX]KVM_REG_ARM64_SVE_VLS is a pseudo-register that allows the set of vector lengths supported by the vcpu to be discovered and configured by userspace. When transferred to or from user memory via KVM_GET_ONE_REG or KVM_SET_ONE_REG, the value of this register is of type __u64[KVM_ARM64_SVE_VLS_WORDS], and encodes the set of vector lengths as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[ hj\hhubj$)}(hX:__u64 vector_lengths[KVM_ARM64_SVE_VLS_WORDS]; if (vq >= SVE_VQ_MIN && vq <= SVE_VQ_MAX && ((vector_lengths[(vq - KVM_ARM64_SVE_VQ_MIN) / 64] >> ((vq - KVM_ARM64_SVE_VQ_MIN) % 64)) & 1)) /* Vector length vq * 16 bytes supported */ else /* Vector length vq * 16 bytes not supported */h]hX:__u64 vector_lengths[KVM_ARM64_SVE_VLS_WORDS]; if (vq >= SVE_VQ_MIN && vq <= SVE_VQ_MAX && ((vector_lengths[(vq - KVM_ARM64_SVE_VQ_MIN) / 64] >> ((vq - KVM_ARM64_SVE_VQ_MIN) % 64)) & 1)) /* Vector length vq * 16 bytes supported */ else /* Vector length vq * 16 bytes not supported */}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMb hj\hhubjs)}(hThe maximum value vq for which the above condition is true is max_vq. This is the maximum vector length available to the guest on this vcpu, and determines which register slices are visible through this ioctl interface. h](jy)}(h2h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjubh)}(hThe maximum value vq for which the above condition is true is max_vq. This is the maximum vector length available to the guest on this vcpu, and determines which register slices are visible through this ioctl interface.h]hThe maximum value vq for which the above condition is true is max_vq. This is the maximum vector length available to the guest on this vcpu, and determines which register slices are visible through this ioctl interface.}(hjähhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk hjubeh}(h]jnah ]h"]2ah$]h&]jiaj^juh1jrhhhMk hj\hhj_Kubh)}(hS(See Documentation/arch/arm64/sve.rst for an explanation of the "vq" nomenclature.)h]hW(See Documentation/arch/arm64/sve.rst for an explanation of the “vq” nomenclature.)}(hjؤhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp hj\hhubh)}(hKVM_REG_ARM64_SVE_VLS is only accessible after KVM_ARM_VCPU_INIT. KVM_ARM_VCPU_INIT initialises it to the best set of vector lengths that the host supports.h]hKVM_REG_ARM64_SVE_VLS is only accessible after KVM_ARM_VCPU_INIT. KVM_ARM_VCPU_INIT initialises it to the best set of vector lengths that the host supports.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMs hj\hhubh)}(hUserspace may subsequently modify it if desired until the vcpu's SVE configuration is finalized using KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE).h]hUserspace may subsequently modify it if desired until the vcpu’s SVE configuration is finalized using KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMw hj\hhubh)}(hX"Apart from simply removing all vector lengths from the host set that exceed some value, support for arbitrarily chosen sets of vector lengths is hardware-dependent and may not be available. Attempting to configure an invalid set of vector lengths via KVM_SET_ONE_REG will fail with EINVAL.h]hX"Apart from simply removing all vector lengths from the host set that exceed some value, support for arbitrarily chosen sets of vector lengths is hardware-dependent and may not be available. Attempting to configure an invalid set of vector lengths via KVM_SET_ONE_REG will fail with EINVAL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz hj\hhubh)}(hnAfter the vcpu's SVE configuration is finalized, further attempts to write this register will fail with EPERM.h]hpAfter the vcpu’s SVE configuration is finalized, further attempts to write this register will fail with EPERM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hOarm64 bitmap feature firmware pseudo-registers have the following bit pattern::h]hNarm64 bitmap feature firmware pseudo-registers have the following bit pattern:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x6030 0000 0016 h]h0x6030 0000 0016 }hj,sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hXThe bitmap feature firmware registers exposes the hypercall services that are available for userspace to configure. The set bits corresponds to the services that are available for the guests to access. By default, KVM sets all the supported bits during VM initialization. The userspace can discover the available services via KVM_GET_ONE_REG, and write back the bitmap corresponding to the features that it wishes guests to see via KVM_SET_ONE_REG.h]hXThe bitmap feature firmware registers exposes the hypercall services that are available for userspace to configure. The set bits corresponds to the services that are available for the guests to access. By default, KVM sets all the supported bits during VM initialization. The userspace can discover the available services via KVM_GET_ONE_REG, and write back the bitmap corresponding to the features that it wishes guests to see via KVM_SET_ONE_REG.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hNote: These registers are immutable once any of the vCPUs of the VM has run at least once. A KVM_SET_ONE_REG in such a scenario will return a -EBUSY to userspace.h]hNote: These registers are immutable once any of the vCPUs of the VM has run at least once. A KVM_SET_ONE_REG in such a scenario will return a -EBUSY to userspace.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hA(See Documentation/virt/kvm/arm/hypercalls.rst for more details.)h]hA(See Documentation/virt/kvm/arm/hypercalls.rst for more details.)}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hdMIPS registers are mapped using the lower 32 bits. The upper 16 of that is the register group type:h]hdMIPS registers are mapped using the lower 32 bits. The upper 16 of that is the register group type:}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hDMIPS core registers (see above) have the following id bit patterns::h]hCMIPS core registers (see above) have the following id bit patterns:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x7030 0000 0000 h]h0x7030 0000 0000 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hMIPS CP0 registers (see KVM_REG_MIPS_CP0_* above) have the following id bit patterns depending on whether they're 32-bit or 64-bit registers::h]hMIPS CP0 registers (see KVM_REG_MIPS_CP0_* above) have the following id bit patterns depending on whether they’re 32-bit or 64-bit registers:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h]0x7020 0000 0001 00 (32-bit) 0x7030 0000 0001 00 (64-bit)h]h]0x7020 0000 0001 00 (32-bit) 0x7030 0000 0001 00 (64-bit)}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hXQNote: KVM_REG_MIPS_CP0_ENTRYLO0 and KVM_REG_MIPS_CP0_ENTRYLO1 are the MIPS64 versions of the EntryLo registers regardless of the word size of the host hardware, host kernel, guest, and whether XPA is present in the guest, i.e. with the RI and XI bits (if they exist) in bits 63 and 62 respectively, and the PFNX field starting at bit 30.h]hXQNote: KVM_REG_MIPS_CP0_ENTRYLO0 and KVM_REG_MIPS_CP0_ENTRYLO1 are the MIPS64 versions of the EntryLo registers regardless of the word size of the host hardware, host kernel, guest, and whether XPA is present in the guest, i.e. with the RI and XI bits (if they exist) in bits 63 and 62 respectively, and the PFNX field starting at bit 30.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hTMIPS MAARs (see KVM_REG_MIPS_CP0_MAAR(*) above) have the following id bit patterns::h]hSMIPS MAARs (see KVM_REG_MIPS_CP0_MAAR(*) above) have the following id bit patterns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x7030 0000 0001 01 h]h0x7030 0000 0001 01 }hjƥsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hKMIPS KVM control registers (see above) have the following id bit patterns::h]hJMIPS KVM control registers (see above) have the following id bit patterns:}(hjԥhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x7030 0000 0002 h]h0x7030 0000 0002 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hXMIPS FPU registers (see KVM_REG_MIPS_FPR_{32,64}() above) have the following id bit patterns depending on the size of the register being accessed. They are always accessed according to the current guest FPU mode (Status.FR and Config5.FRE), i.e. as the guest would see them, and they become unpredictable if the guest FPU mode is changed. MIPS SIMD Architecture (MSA) vector registers (see KVM_REG_MIPS_VEC_128() above) have similar patterns as they overlap the FPU registers::h]hXMIPS FPU registers (see KVM_REG_MIPS_FPR_{32,64}() above) have the following id bit patterns depending on the size of the register being accessed. They are always accessed according to the current guest FPU mode (Status.FR and Config5.FRE), i.e. as the guest would see them, and they become unpredictable if the guest FPU mode is changed. MIPS SIMD Architecture (MSA) vector registers (see KVM_REG_MIPS_VEC_128() above) have similar patterns as they overlap the FPU registers:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x7020 0000 0003 00 <0:3> (32-bit FPU registers) 0x7030 0000 0003 00 <0:3> (64-bit FPU registers) 0x7040 0000 0003 00 <0:3> (128-bit MSA vector registers)h]h0x7020 0000 0003 00 <0:3> (32-bit FPU registers) 0x7030 0000 0003 00 <0:3> (64-bit FPU registers) 0x7040 0000 0003 00 <0:3> (128-bit MSA vector registers)}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(heMIPS FPU control registers (see KVM_REG_MIPS_FCR_{IR,CSR} above) have the following id bit patterns::h]hdMIPS FPU control registers (see KVM_REG_MIPS_FCR_{IR,CSR} above) have the following id bit patterns:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h!0x7020 0000 0003 01 <0:3> h]h!0x7020 0000 0003 01 <0:3> }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(heMIPS MSA control registers (see KVM_REG_MIPS_MSA_{IR,CSR} above) have the following id bit patterns::h]hdMIPS MSA control registers (see KVM_REG_MIPS_MSA_{IR,CSR} above) have the following id bit patterns:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h!0x7020 0000 0003 02 <0:3> h]h!0x7020 0000 0003 02 <0:3> }hj6sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hiRISC-V registers are mapped using the lower 32 bits. The upper 8 bits of that is the register group type.h]hiRISC-V registers are mapped using the lower 32 bits. The upper 8 bits of that is the register group type.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hiRISC-V config registers are meant for configuring a Guest VCPU and it has the following id bit patterns::h]hhRISC-V config registers are meant for configuring a Guest VCPU and it has the following id bit patterns:}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x8020 0000 01 (32bit Host) 0x8030 0000 01 (64bit Host)h]h0x8020 0000 01 (32bit Host) 0x8030 0000 01 (64bit Host)}hj`sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h*Following are the RISC-V config registers:h]h*Following are the RISC-V config registers:}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhjubjZ_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hRegisterh]hRegister}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Descriptionh]h Description}(hjצhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjԦubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jY_hjubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0100 0000h]h0x80x0 0000 0100 0000}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hisah]hisa}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h ISA feature bitmap of Guest VCPUh]h ISA feature bitmap of Guest VCPU}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj+ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhj|ubah}(h]h ]h"]h$]h&]uh1jEhj\hhhhhNubh)}(hThe isa config register can be read anytime but can only be written before a Guest VCPU runs. It will have ISA feature bits matching underlying host set by default.h]hThe isa config register can be read anytime but can only be written before a Guest VCPU runs. It will have ISA feature bits matching underlying host set by default.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubh)}(hvRISC-V core registers represent the general execution state of a Guest VCPU and it has the following id bit patterns::h]huRISC-V core registers represent the general execution state of a Guest VCPU and it has the following id bit patterns:}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x8020 0000 02 (32bit Host) 0x8030 0000 02 (64bit Host)h]h0x8020 0000 02 (32bit Host) 0x8030 0000 02 (64bit Host)}hjwsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h(Following are the RISC-V core registers:h]h(Following are the RISC-V core registers:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhjubjZ_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hRegisterh]hRegister}(hjקhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjԧubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jY_hjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0000h]h0x80x0 0000 0200 0000}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.pch]hregs.pc}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj+ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hProgram counterh]hProgram counter}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0001h]h0x80x0 0000 0200 0001}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjbubah}(h]h ]h"]h$]h&]uh1johj_ubjp)}(hhh]h)}(hregs.rah]hregs.ra}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjyubah}(h]h ]h"]h$]h&]uh1johj_ubjp)}(hhh]h)}(hReturn addressh]hReturn address}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj_ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0002h]h0x80x0 0000 0200 0002}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.sph]hregs.sp}(hjʨhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjǨubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Stack pointerh]h Stack pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjިubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0003h]h0x80x0 0000 0200 0003}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.gph]hregs.gp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hGlobal pointerh]hGlobal pointer}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj,ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0004h]h0x80x0 0000 0200 0004}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjLubah}(h]h ]h"]h$]h&]uh1johjIubjp)}(hhh]h)}(hregs.tph]hregs.tp}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjcubah}(h]h ]h"]h$]h&]uh1johjIubjp)}(hhh]h)}(h Task pointerh]h Task pointer}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjzubah}(h]h ]h"]h$]h&]uh1johjIubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0005h]h0x80x0 0000 0200 0005}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.t0h]hregs.t0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCaller saved register 0h]hCaller saved register 0}(hj˩hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjȩubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0006h]h0x80x0 0000 0200 0006}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.t1h]hregs.t1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCaller saved register 1h]hCaller saved register 1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0007h]h0x80x0 0000 0200 0007}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj6ubah}(h]h ]h"]h$]h&]uh1johj3ubjp)}(hhh]h)}(hregs.t2h]hregs.t2}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjMubah}(h]h ]h"]h$]h&]uh1johj3ubjp)}(hhh]h)}(hCaller saved register 2h]hCaller saved register 2}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdubah}(h]h ]h"]h$]h&]uh1johj3ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0008h]h0x80x0 0000 0200 0008}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s0h]hregs.s0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 0h]hCallee saved register 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0009h]h0x80x0 0000 0200 0009}(hjժhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjҪubah}(h]h ]h"]h$]h&]uh1johjϪubjp)}(hhh]h)}(hregs.s1h]hregs.s1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjϪubjp)}(hhh]h)}(hCallee saved register 1h]hCallee saved register 1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjϪubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 000ah]h0x80x0 0000 0200 000a}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.a0h]hregs.a0}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj7ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h%Function argument (or return value) 0h]h%Function argument (or return value) 0}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjNubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 000bh]h0x80x0 0000 0200 000b}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjnubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(hregs.a1h]hregs.a1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(h%Function argument (or return value) 1h]h%Function argument (or return value) 1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 000ch]h0x80x0 0000 0200 000c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.a2h]hregs.a2}(hj֫hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjӫubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFunction argument 2h]hFunction argument 2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 000dh]h0x80x0 0000 0200 000d}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.a3h]hregs.a3}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj!ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFunction argument 3h]hFunction argument 3}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj8ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 000eh]h0x80x0 0000 0200 000e}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXubah}(h]h ]h"]h$]h&]uh1johjUubjp)}(hhh]h)}(hregs.a4h]hregs.a4}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjoubah}(h]h ]h"]h$]h&]uh1johjUubjp)}(hhh]h)}(hFunction argument 4h]hFunction argument 4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjUubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 000fh]h0x80x0 0000 0200 000f}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.a5h]hregs.a5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFunction argument 5h]hFunction argument 5}(hj׬hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjԬubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0010h]h0x80x0 0000 0200 0010}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.a6h]hregs.a6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFunction argument 6h]hFunction argument 6}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj"ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0011h]h0x80x0 0000 0200 0011}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1johj?ubjp)}(hhh]h)}(hregs.a7h]hregs.a7}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjYubah}(h]h ]h"]h$]h&]uh1johj?ubjp)}(hhh]h)}(hFunction argument 7h]hFunction argument 7}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjpubah}(h]h ]h"]h$]h&]uh1johj?ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0012h]h0x80x0 0000 0200 0012}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s2h]hregs.s2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 2h]hCallee saved register 2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0013h]h0x80x0 0000 0200 0013}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjޭubah}(h]h ]h"]h$]h&]uh1johjۭubjp)}(hhh]h)}(hregs.s3h]hregs.s3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjۭubjp)}(hhh]h)}(hCallee saved register 3h]hCallee saved register 3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjۭubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0014h]h0x80x0 0000 0200 0014}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj,ubah}(h]h ]h"]h$]h&]uh1johj)ubjp)}(hhh]h)}(hregs.s4h]hregs.s4}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjCubah}(h]h ]h"]h$]h&]uh1johj)ubjp)}(hhh]h)}(hCallee saved register 4h]hCallee saved register 4}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjZubah}(h]h ]h"]h$]h&]uh1johj)ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0015h]h0x80x0 0000 0200 0015}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjzubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(hregs.s5h]hregs.s5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(hCallee saved register 5h]hCallee saved register 5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjwubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0016h]h0x80x0 0000 0200 0016}(hjˮhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjȮubah}(h]h ]h"]h$]h&]uh1johjŮubjp)}(hhh]h)}(hregs.s6h]hregs.s6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj߮ubah}(h]h ]h"]h$]h&]uh1johjŮubjp)}(hhh]h)}(hCallee saved register 6h]hCallee saved register 6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjŮubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0017h]h0x80x0 0000 0200 0017}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s7h]hregs.s7}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj-ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 7h]hCallee saved register 7}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjDubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0018h]h0x80x0 0000 0200 0018}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h)}(hregs.s8h]hregs.s8}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj{ubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h)}(hCallee saved register 8h]hCallee saved register 8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjaubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0019h]h0x80x0 0000 0200 0019}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s9h]hregs.s9}(hj̯hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjɯubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 9h]hCallee saved register 9}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 001ah]h0x80x0 0000 0200 001a}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s10h]hregs.s10}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 10h]hCallee saved register 10}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 001bh]h0x80x0 0000 0200 001b}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjNubah}(h]h ]h"]h$]h&]uh1johjKubjp)}(hhh]h)}(hregs.s11h]hregs.s11}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjeubah}(h]h ]h"]h$]h&]uh1johjKubjp)}(hhh]h)}(hCallee saved register 11h]hCallee saved register 11}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johjKubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 001ch]h0x80x0 0000 0200 001c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.t3h]hregs.t3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCaller saved register 3h]hCaller saved register 3}(hjͰhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjʰubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 001dh]h0x80x0 0000 0200 001d}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.t4h]hregs.t4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCaller saved register 4h]hCaller saved register 4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 001eh]h0x80x0 0000 0200 001e}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj8ubah}(h]h ]h"]h$]h&]uh1johj5ubjp)}(hhh]h)}(hregs.t5h]hregs.t5}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjOubah}(h]h ]h"]h$]h&]uh1johj5ubjp)}(hhh]h)}(hCaller saved register 5h]hCaller saved register 5}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjfubah}(h]h ]h"]h$]h&]uh1johj5ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 001fh]h0x80x0 0000 0200 001f}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.t6h]hregs.t6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCaller saved register 6h]hCaller saved register 6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0020h]h0x80x0 0000 0200 0020}(hjױhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjԱubah}(h]h ]h"]h$]h&]uh1johjѱubjp)}(hhh]h)}(hmodeh]hmode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjѱubjp)}(hhh]h)}(h)Privilege mode (1 = S-mode or 0 = U-mode)h]h)Privilege mode (1 = S-mode or 0 = U-mode)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjѱubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhj\hhhhhNubh)}(hRISC-V csr registers represent the supervisor mode control/status registers of a Guest VCPU and it has the following id bit patterns::h]hRISC-V csr registers represent the supervisor mode control/status registers of a Guest VCPU and it has the following id bit patterns:}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x8020 0000 03 (32bit Host) 0x8030 0000 03 (64bit Host)h]h0x8020 0000 03 (32bit Host) 0x8030 0000 03 (64bit Host)}hj@sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(h'Following are the RISC-V csr registers:h]h'Following are the RISC-V csr registers:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj_ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhj_ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhj_ubjZ_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hRegisterh]hRegister}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jY_hj_ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0000h]h0x80x0 0000 0300 0000}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjݲubah}(h]h ]h"]h$]h&]uh1johjڲubjp)}(hhh]h)}(hsstatush]hsstatus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjڲubjp)}(hhh]h)}(hSupervisor statush]hSupervisor status}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjڲubeh}(h]h ]h"]h$]h&]uh1jjhjײubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0001h]h0x80x0 0000 0300 0001}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj+ubah}(h]h ]h"]h$]h&]uh1johj(ubjp)}(hhh]h)}(hsieh]hsie}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1johj(ubjp)}(hhh]h)}(hSupervisor interrupt enableh]hSupervisor interrupt enable}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjYubah}(h]h ]h"]h$]h&]uh1johj(ubeh}(h]h ]h"]h$]h&]uh1jjhjײubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0002h]h0x80x0 0000 0300 0002}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjyubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(hstvech]hstvec}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(hSupervisor trap vector baseh]hSupervisor trap vector base}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjvubeh}(h]h ]h"]h$]h&]uh1jjhjײubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0003h]h0x80x0 0000 0300 0003}(hjʳhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdzubah}(h]h ]h"]h$]h&]uh1johjijubjp)}(hhh]h)}(hsscratchh]hsscratch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj޳ubah}(h]h ]h"]h$]h&]uh1johjijubjp)}(hhh]h)}(hSupervisor scratch registerh]hSupervisor scratch register}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjijubeh}(h]h ]h"]h$]h&]uh1jjhjײubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0004h]h0x80x0 0000 0300 0004}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hsepch]hsepc}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj,ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h$Supervisor exception program counterh]h$Supervisor exception program counter}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjCubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjײubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0005h]h0x80x0 0000 0300 0005}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjcubah}(h]h ]h"]h$]h&]uh1johj`ubjp)}(hhh]h)}(hscauseh]hscause}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjzubah}(h]h ]h"]h$]h&]uh1johj`ubjp)}(hhh]h)}(hSupervisor trap causeh]hSupervisor trap cause}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj`ubeh}(h]h ]h"]h$]h&]uh1jjhjײubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0006h]h0x80x0 0000 0300 0006}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hstvalh]hstval}(hj˴hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjȴubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h%Supervisor bad address or instructionh]h%Supervisor bad address or instruction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjߴubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjײubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0007h]h0x80x0 0000 0300 0007}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hsiph]hsip}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSupervisor interrupt pendingh]hSupervisor interrupt pending}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj-ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjײubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0008h]h0x80x0 0000 0300 0008}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjMubah}(h]h ]h"]h$]h&]uh1johjJubjp)}(hhh]h)}(hsatph]hsatp}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdubah}(h]h ]h"]h$]h&]uh1johjJubjp)}(hhh]h)}(h-Supervisor address translation and protectionh]h-Supervisor address translation and protection}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj{ubah}(h]h ]h"]h$]h&]uh1johjJubeh}(h]h ]h"]h$]h&]uh1jjhjײubeh}(h]h ]h"]h$]h&]uh1jehj_ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj\ubah}(h]h ]h"]h$]h&]uh1jEhj\hhhhhNubh)}(hkRISC-V timer registers represent the timer state of a Guest VCPU and it has the following id bit patterns::h]hjRISC-V timer registers represent the timer state of a Guest VCPU and it has the following id bit patterns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM! hj\hhubj$)}(h90x8030 0000 04 h]h90x8030 0000 04 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM$ hj\hhubh)}(h)Following are the RISC-V timer registers:h]h)Following are the RISC-V timer registers:}(hjǵhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM& hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjصubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjصubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhjصubjZ_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM) hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hRegisterh]hRegister}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM) hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Descriptionh]h Description}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM) hj-ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jY_hjصubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0400 0000h]h0x8030 0000 0400 0000}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+ hjVubah}(h]h ]h"]h$]h&]uh1johjSubjp)}(hhh]h)}(h frequencyh]h frequency}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+ hjmubah}(h]h ]h"]h$]h&]uh1johjSubjp)}(hhh]h)}(hTime base frequency (read-only)h]hTime base frequency (read-only)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+ hjubah}(h]h ]h"]h$]h&]uh1johjSubeh}(h]h ]h"]h$]h&]uh1jjhjPubjk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0400 0001h]h0x8030 0000 0400 0001}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM, hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(htimeh]htime}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM, hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hTime value visible to Guesth]hTime value visible to Guest}(hjնhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM, hjҶubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjPubjk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0400 0002h]h0x8030 0000 0400 0002}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM- hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hcompareh]hcompare}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM- hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Time compare programmed by Guesth]h Time compare programmed by Guest}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM- hj ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjPubjk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0400 0003h]h0x8030 0000 0400 0003}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM. hj@ubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h)}(hstateh]hstate}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM. hjWubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h)}(h&Time compare state (1 = ON or 0 = OFF)h]h&Time compare state (1 = ON or 0 = OFF)}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM. hjnubah}(h]h ]h"]h$]h&]uh1johj=ubeh}(h]h ]h"]h$]h&]uh1jjhjPubeh}(h]h ]h"]h$]h&]uh1jehjصubeh}(h]h ]h"]h$]h&]colsKuh1jJhjյubah}(h]h ]h"]h$]h&]uh1jEhj\hhhhhNubh)}(hRISC-V F-extension registers represent the single precision floating point state of a Guest VCPU and it has the following id bit patterns::h]hRISC-V F-extension registers represent the single precision floating point state of a Guest VCPU and it has the following id bit patterns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1 hj\hhubj$)}(h=0x8020 0000 05 h]h=0x8020 0000 05 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM4 hj\hhubh)}(h/Following are the RISC-V F-extension registers:h]h/Following are the RISC-V F-extension registers:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6 hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj˷ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhj˷ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhj˷ubjZ_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9 hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hRegisterh]hRegister}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9 hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Descriptionh]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9 hj ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jY_hj˷ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x8020 0000 0500 0000h]h0x8020 0000 0500 0000}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM; hjIubah}(h]h ]h"]h$]h&]uh1johjFubjp)}(hhh]h)}(hf[0]h]hf[0]}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM; hj`ubah}(h]h ]h"]h$]h&]uh1johjFubjp)}(hhh]h)}(hFloating point register 0h]hFloating point register 0}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM; hjwubah}(h]h ]h"]h$]h&]uh1johjFubeh}(h]h ]h"]h$]h&]uh1jjhjCubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjCubjk)}(hhh](jp)}(hhh]h)}(h0x8020 0000 0500 001fh]h0x8020 0000 0500 001f}(hj̸hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hjɸubah}(h]h ]h"]h$]h&]uh1johjƸubjp)}(hhh]h)}(hf[31]h]hf[31]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hjubah}(h]h ]h"]h$]h&]uh1johjƸubjp)}(hhh]h)}(hFloating point register 31h]hFloating point register 31}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hjubah}(h]h ]h"]h$]h&]uh1johjƸubeh}(h]h ]h"]h$]h&]uh1jjhjCubjk)}(hhh](jp)}(hhh]h)}(h0x8020 0000 0500 0020h]h0x8020 0000 0500 0020}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM> hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hfcsrh]hfcsr}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM> hj.ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h*Floating point control and status registerh]h*Floating point control and status register}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM> hjEubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjCubeh}(h]h ]h"]h$]h&]uh1jehj˷ubeh}(h]h ]h"]h$]h&]colsKuh1jJhjȷubah}(h]h ]h"]h$]h&]uh1jEhj\hhhhhNubh)}(hRISC-V D-extension registers represent the double precision floating point state of a Guest VCPU and it has the following id bit patterns::h]hRISC-V D-extension registers represent the double precision floating point state of a Guest VCPU and it has the following id bit patterns:}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMA hj\hhubj$)}(h0x8020 0000 06 (fcsr) 0x8030 0000 06 (non-fcsr)h]h0x8020 0000 06 (fcsr) 0x8030 0000 06 (non-fcsr)}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMD hj\hhubh)}(h/Following are the RISC-V D-extension registers:h]h/Following are the RISC-V D-extension registers:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMG hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhjubjZ_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hj̹hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjɹubah}(h]h ]h"]h$]h&]uh1johjƹubjp)}(hhh]h)}(hRegisterh]hRegister}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjubah}(h]h ]h"]h$]h&]uh1johjƹubjp)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjubah}(h]h ]h"]h$]h&]uh1johjƹubeh}(h]h ]h"]h$]h&]uh1jjhjùubah}(h]h ]h"]h$]h&]uh1jY_hjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0600 0000h]h0x8030 0000 0600 0000}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hf[0]h]hf[0]}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hj7ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFloating point register 0h]hFloating point register 0}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hjNubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM hjnubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0600 001fh]h0x8030 0000 0600 001f}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hf[31]h]hf[31]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFloating point register 31h]hFloating point register 31}(hjѺhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjκubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x8020 0000 0600 0020h]h0x8020 0000 0600 0020}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hfcsrh]hfcsr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h*Floating point control and status registerh]h*Floating point control and status register}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhj\hhhhhNubh)}(hmLoongArch registers are mapped using the lower 32 bits. The upper 16 bits of that is the register group type.h]hmLoongArch registers are mapped using the lower 32 bits. The upper 16 bits of that is the register group type.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMR hj\hhubh)}(hLoongArch csr registers are used to control guest cpu or get status of guest cpu, and they have the following id bit patterns::h]h~LoongArch csr registers are used to control guest cpu or get status of guest cpu, and they have the following id bit patterns:}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMU hj\hhubj$)}(h.0x9030 0000 0001 00 (64-bit)h]h.0x9030 0000 0001 00 (64-bit)}hjhsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMX hj\hhubh)}(hLoongArch KVM control registers are used to implement some new defined functions such as set vcpu counter or reset vcpu, and they have the following id bit patterns::h]hLoongArch KVM control registers are used to implement some new defined functions such as set vcpu counter or reset vcpu, and they have the following id bit patterns:}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ hj\hhubj$)}(h0x9030 0000 0002 h]h0x9030 0000 0002 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM] hj\hhubeh}(h]kvm-set-one-regah ]h"]4.68 kvm_set_one_regah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.69 KVM_GET_ONE_REGh]h4.69 KVM_GET_ONE_REG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMa ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_ONE_REGh]h)}(hjh]hKVM_CAP_ONE_REG}(hjûhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMc hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj߻hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjܻhhhKubjy)}(hallh]h)}(hjh]hall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hjubah}(h]h ]h"]h$]h&]uh1jxhjܻubeh}(h]h ]h"]h$]h&]uh1jchhhMd hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMe hjubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMe hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8hhhKubjy)}(hstruct kvm_one_reg (in and out)h]h)}(hjKh]hstruct kvm_one_reg (in and out)}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMf hjIubah}(h]h ]h"]h$]h&]uh1jxhj8ubeh}(h]h ]h"]h$]h&]uh1jchhhMf hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(h(0 on success, negative value on failure h]h)}(h'0 on success, negative value on failureh]h'0 on success, negative value on failure}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjwubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhMg hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMc ubh)}(hErrors include:h]hErrors include:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hjhhubh)}(hXa======== ============================================================ ENOENT no such register EINVAL invalid register ID, or no such register or used with VMs in protected virtualization mode on s390 EPERM (arm64) register access not allowed before vcpu finalization ======== ============================================================ h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo hj;ubah}(h]h ]h"]h$]h&]uh1johj8ubjp)}(hhh]h)}(h<(arm64) register access not allowed before vcpu finalizationh]h<(arm64) register access not allowed before vcpu finalization}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo hjRubah}(h]h ]h"]h$]h&]uh1johj8ubeh}(h]h ]h"]h$]h&]uh1jjhjǼubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMk hjhhubh)}(hu(These error codes are indicative only: do not rely on a specific error code being returned in a specific situation.)h]hu(These error codes are indicative only: do not rely on a specific error code being returned in a specific situation.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr hjhhubh)}(hXThis ioctl allows to receive the value of a single register implemented in a vcpu. The register to read is indicated by the "id" field of the kvm_one_reg struct passed in. On success, the register value can be found at the memory location pointed to by "addr".h]hX This ioctl allows to receive the value of a single register implemented in a vcpu. The register to read is indicated by the “id” field of the kvm_one_reg struct passed in. On success, the register value can be found at the memory location pointed to by “addr”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hjhhubh)}(hWThe list of registers accessible using this interface is identical to the list in 4.68.h]hWThe list of registers accessible using this interface is identical to the list in 4.68.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz hjhhubeh}(h]kvm-get-one-regah ]h"]4.69 kvm_get_one_regah$]h&]uh1hhjhhhhhMa ubh)}(hhh](h)}(h4.70 KVM_KVMCLOCK_CTRLh]h4.70 KVM_KVMCLOCK_CTRL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjѽhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjνhhhKubjy)}(hKVM_CAP_KVMCLOCK_CTRLh]h)}(hjh]hKVM_CAP_KVMCLOCK_CTRL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj߽ubah}(h]h ]h"]h$]h&]uh1jxhjνubeh}(h]h ]h"]h$]h&]uh1jchhhM hj˽hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0Any that implement pvclocks (currently x86 only)h]h)}(hjh]h0Any that implement pvclocks (currently x86 only)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj˽hhubjd)}(hhh](ji)}(hTypeh]hType}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj*hhhKubjy)}(h vcpu ioctlh]h)}(hj=h]h vcpu ioctl}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj;ubah}(h]h ]h"]h$]h&]uh1jxhj*ubeh}(h]h ]h"]h$]h&]uh1jchhhM hj˽hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjXhhhKubjy)}(hNoneh]h)}(hjkh]hNone}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjiubah}(h]h ]h"]h$]h&]uh1jxhjXubeh}(h]h ]h"]h$]h&]uh1jchhhM hj˽hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj˽hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(hxThis ioctl sets a flag accessible to the guest indicating that the specified vCPU has been paused by the host userspace.h]hxThis ioctl sets a flag accessible to the guest indicating that the specified vCPU has been paused by the host userspace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hXThe host will set a flag in the pvclock structure that is checked from the soft lockup watchdog. The flag is part of the pvclock structure that is shared between guest and host, specifically the second bit of the flags field of the pvclock_vcpu_time_info structure. It will be set exclusively by the host and read/cleared exclusively by the guest. The guest operation of checking and clearing the flag must be an atomic operation so load-link/store-conditional, or equivalent must be used. There are two cases where the guest will clear the flag: when the soft lockup watchdog timer resets itself or when a soft lockup is detected. This ioctl can be called any time after pausing the vcpu, but before it is resumed.h]hXThe host will set a flag in the pvclock structure that is checked from the soft lockup watchdog. The flag is part of the pvclock structure that is shared between guest and host, specifically the second bit of the flags field of the pvclock_vcpu_time_info structure. It will be set exclusively by the host and read/cleared exclusively by the guest. The guest operation of checking and clearing the flag must be an atomic operation so load-link/store-conditional, or equivalent must be used. There are two cases where the guest will clear the flag: when the soft lockup watchdog timer resets itself or when a soft lockup is detected. This ioctl can be called any time after pausing the vcpu, but before it is resumed.}(hjɾhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h]kvm-kvmclock-ctrlah ]h"]4.70 kvm_kvmclock_ctrlah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.71 KVM_SIGNAL_MSIh]h4.71 KVM_SIGNAL_MSI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj߾hhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_SIGNAL_MSIh]h)}(hjh]hKVM_CAP_SIGNAL_MSI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(h x86 arm64h]h)}(hj4h]h x86 arm64}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj2ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjOhhhKubjy)}(hvm ioctlh]h)}(hjbh]hvm ioctl}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj`ubah}(h]h ]h"]h$]h&]uh1jxhjOubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}hhhKubjy)}(hstruct kvm_msi (in)h]h)}(hjh]hstruct kvm_msi (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhj}ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h<>0 on delivery, 0 if guest blocked the MSI, and -1 on error h]h)}(h;>0 on delivery, 0 if guest blocked the MSI, and -1 on errorh]h;>0 on delivery, 0 if guest blocked the MSI, and -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hj߾hhhhhM ubh)}(h[Directly inject a MSI message. Only valid with in-kernel irqchip that handles MSI messages.h]h[Directly inject a MSI message. Only valid with in-kernel irqchip that handles MSI messages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj߾hhubj$)}(hstruct kvm_msi { __u32 address_lo; __u32 address_hi; __u32 data; __u32 flags; __u32 devid; __u8 pad[12]; };h]hstruct kvm_msi { __u32 address_lo; __u32 address_hi; __u32 data; __u32 flags; __u32 devid; __u8 pad[12]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj߾hhubj)}(hhh]j)}(hXflags: KVM_MSI_VALID_DEVID: devid contains a valid value. The per-VM KVM_CAP_MSI_DEVID capability advertises the requirement to provide the device ID. If this capability is not available, userspace should never set the KVM_MSI_VALID_DEVID flag as the ioctl might fail. h](j)}(hflags:h]hflags:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hXKVM_MSI_VALID_DEVID: devid contains a valid value. The per-VM KVM_CAP_MSI_DEVID capability advertises the requirement to provide the device ID. If this capability is not available, userspace should never set the KVM_MSI_VALID_DEVID flag as the ioctl might fail.h]hXKVM_MSI_VALID_DEVID: devid contains a valid value. The per-VM KVM_CAP_MSI_DEVID capability advertises the requirement to provide the device ID. If this capability is not available, userspace should never set the KVM_MSI_VALID_DEVID flag as the ioctl might fail.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjubah}(h]h ]h"]h$]h&]uh1jhj߾hhhhhNubh)}(hIf KVM_MSI_VALID_DEVID is set, devid contains a unique device identifier for the device that wrote the MSI message. For PCI, this is usually a BDF identifier in the lower 16 bits.h]hIf KVM_MSI_VALID_DEVID is set, devid contains a unique device identifier for the device that wrote the MSI message. For PCI, this is usually a BDF identifier in the lower 16 bits.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj߾hhubh)}(hOn x86, address_hi is ignored unless the KVM_X2APIC_API_USE_32BIT_IDS feature of KVM_CAP_X2APIC_API capability is enabled. If it is enabled, address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of address_hi must be zero.h]hOn x86, address_hi is ignored unless the KVM_X2APIC_API_USE_32BIT_IDS feature of KVM_CAP_X2APIC_API capability is enabled. If it is enabled, address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of address_hi must be zero.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj߾hhubeh}(h]kvm-signal-msiah ]h"]4.71 kvm_signal_msiah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.71 KVM_CREATE_PIT2h]h4.71 KVM_CREATE_PIT2}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjlhhhKubjy)}(h KVM_CAP_PIT2h]h)}(hjh]h KVM_CAP_PIT2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1jxhjlubeh}(h]h ]h"]h$]h&]uh1jchhhM hjihhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjihhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjihhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_pit_config (in)h]h)}(hj h]hstruct kvm_pit_config (in)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjihhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj5ubah}(h]h ]h"]h$]h&]uh1jxhj$ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjihhubeh}(h]h ]h"]h$]h&]uh1j^hjXhhhhhM ubh)}(hCreates an in-kernel device model for the i8254 PIT. This call is only valid after enabling in-kernel irqchip support via KVM_CREATE_IRQCHIP. The following parameters have to be passed::h]hCreates an in-kernel device model for the i8254 PIT. This call is only valid after enabling in-kernel irqchip support via KVM_CREATE_IRQCHIP. The following parameters have to be passed:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXhhubj$)}(hBstruct kvm_pit_config { __u32 flags; __u32 pad[15]; };h]hBstruct kvm_pit_config { __u32 flags; __u32 pad[15]; };}hjgsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjXhhubh)}(hValid flags are::h]hValid flags are:}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXhhubj$)}(hC#define KVM_PIT_SPEAKER_DUMMY 1 /* emulate speaker port stub */h]hC#define KVM_PIT_SPEAKER_DUMMY 1 /* emulate speaker port stub */}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjXhhubh)}(hPIT timer interrupts may use a per-VM kernel thread for injection. If it exists, this thread will have a name of the following pattern::h]hPIT timer interrupts may use a per-VM kernel thread for injection. If it exists, this thread will have a name of the following pattern:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXhhubj$)}(hkvm-pit/h]hkvm-pit/}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjXhhubh)}(h|When running a guest with elevated priorities, the scheduling parameters of this thread may have to be adjusted accordingly.h]h|When running a guest with elevated priorities, the scheduling parameters of this thread may have to be adjusted accordingly.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXhhubh)}(h0This IOCTL replaces the obsolete KVM_CREATE_PIT.h]h0This IOCTL replaces the obsolete KVM_CREATE_PIT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXhhubeh}(h]kvm-create-pit2ah ]h"]4.71 kvm_create_pit2ah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.72 KVM_GET_PIT2h]h4.72 KVM_GET_PIT2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_PIT_STATE2h]h)}(hjh]hKVM_CAP_PIT_STATE2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hj&h]hx86}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj$ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hvm ioctlh]h)}(hjTh]hvm ioctl}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjRubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjohhhKubjy)}(hstruct kvm_pit_state2 (out)h]h)}(hjh]hstruct kvm_pit_state2 (out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjoubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(hRetrieves the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2. The state is returned in the following structure::h]hRetrieves the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2. The state is returned in the following structure:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(hvstruct kvm_pit_state2 { struct kvm_pit_channel_state channels[3]; __u32 flags; __u32 reserved[9]; };h]hvstruct kvm_pit_state2 { struct kvm_pit_channel_state channels[3]; __u32 flags; __u32 reserved[9]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(hValid flags are::h]hValid flags are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(h/* disable PIT in HPET legacy mode */ #define KVM_PIT_FLAGS_HPET_LEGACY 0x00000001 /* speaker port data bit enabled */ #define KVM_PIT_FLAGS_SPEAKER_DATA_ON 0x00000002h]h/* disable PIT in HPET legacy mode */ #define KVM_PIT_FLAGS_HPET_LEGACY 0x00000001 /* speaker port data bit enabled */ #define KVM_PIT_FLAGS_SPEAKER_DATA_ON 0x00000002}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(h-This IOCTL replaces the obsolete KVM_GET_PIT.h]h-This IOCTL replaces the obsolete KVM_GET_PIT.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h] kvm-get-pit2ah ]h"]4.72 kvm_get_pit2ah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.73 KVM_SET_PIT2h]h4.73 KVM_SET_PIT2}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hKVM_CAP_PIT_STATE2h]h)}(hjGh]hKVM_CAP_PIT_STATE2}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjEubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhM hj1hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjbhhhKubjy)}(hx86h]h)}(hjuh]hx86}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjsubah}(h]h ]h"]h$]h&]uh1jxhjbubeh}(h]h ]h"]h$]h&]uh1jchhhM hj1hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj1hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_pit_state2 (in)h]h)}(hjh]hstruct kvm_pit_state2 (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj1hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj1hhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhM ubh)}(hSets the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2. See KVM_GET_PIT2 for details on struct kvm_pit_state2.h]hSets the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2. See KVM_GET_PIT2 for details on struct kvm_pit_state2.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj hhubh)}(h-This IOCTL replaces the obsolete KVM_SET_PIT.h]h-This IOCTL replaces the obsolete KVM_SET_PIT.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj hhubeh}(h] kvm-set-pit2ah ]h"]4.73 kvm_set_pit2ah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.74 KVM_PPC_GET_SMMU_INFOh]h4.74 KVM_PPC_GET_SMMU_INFO}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjYhhhKubjy)}(hKVM_CAP_PPC_GET_SMMU_INFOh]h)}(hjlh]hKVM_CAP_PPC_GET_SMMU_INFO}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjjubah}(h]h ]h"]h$]h&]uh1jxhjYubeh}(h]h ]h"]h$]h&]uh1jchhhM hjVhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjVhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjVhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hNoneh]h)}(hjh]hNone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjVhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj"ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjVhhubeh}(h]h ]h"]h$]h&]uh1j^hjEhhhhhM ubh)}(hThis populates and returns a structure describing the features of the "Server" class MMU emulation supported by KVM. This can in turn be used by userspace to generate the appropriate device-tree properties for the guest operating system.h]hThis populates and returns a structure describing the features of the “Server” class MMU emulation supported by KVM. This can in turn be used by userspace to generate the appropriate device-tree properties for the guest operating system.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjEhhubh)}(hfThe structure contains some global information, followed by an array of supported segment page sizes::h]heThe structure contains some global information, followed by an array of supported segment page sizes:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjEhhubj$)}(hstruct kvm_ppc_smmu_info { __u64 flags; __u32 slb_size; __u32 pad; struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ]; };h]hstruct kvm_ppc_smmu_info { __u64 flags; __u32 slb_size; __u32 pad; struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ]; };}hjbsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjEhhubh)}(hThe supported flags are:h]hThe supported flags are:}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM! hjEhhubh)}(hX- KVM_PPC_PAGE_SIZES_REAL: When that flag is set, guest page sizes must "fit" the backing store page sizes. When not set, any page size in the list can be used regardless of how they are backed by userspace. - KVM_PPC_1T_SEGMENTS The emulated MMU supports 1T segments in addition to the standard 256M ones. - KVM_PPC_NO_HASH This flag indicates that HPT guests are not supported by KVM, thus all guests must use radix MMU mode. h]h)}(hhh](j)}(hKVM_PPC_PAGE_SIZES_REAL: When that flag is set, guest page sizes must "fit" the backing store page sizes. When not set, any page size in the list can be used regardless of how they are backed by userspace. h]j)}(hhh]j)}(hKVM_PPC_PAGE_SIZES_REAL: When that flag is set, guest page sizes must "fit" the backing store page sizes. When not set, any page size in the list can be used regardless of how they are backed by userspace. h](j)}(hKVM_PPC_PAGE_SIZES_REAL:h]hKVM_PPC_PAGE_SIZES_REAL:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM& hjubj)}(hhh]h)}(hWhen that flag is set, guest page sizes must "fit" the backing store page sizes. When not set, any page size in the list can be used regardless of how they are backed by userspace.h]hWhen that flag is set, guest page sizes must “fit” the backing store page sizes. When not set, any page size in the list can be used regardless of how they are backed by userspace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$ hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM& hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(heKVM_PPC_1T_SEGMENTS The emulated MMU supports 1T segments in addition to the standard 256M ones. h]j)}(hhh]j)}(haKVM_PPC_1T_SEGMENTS The emulated MMU supports 1T segments in addition to the standard 256M ones. h](j)}(hKVM_PPC_1T_SEGMENTSh]hKVM_PPC_1T_SEGMENTS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM* hjubj)}(hhh]h)}(hLThe emulated MMU supports 1T segments in addition to the standard 256M ones.h]hLThe emulated MMU supports 1T segments in addition to the standard 256M ones.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM) hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM* hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h{KVM_PPC_NO_HASH This flag indicates that HPT guests are not supported by KVM, thus all guests must use radix MMU mode. h]j)}(hhh]j)}(hwKVM_PPC_NO_HASH This flag indicates that HPT guests are not supported by KVM, thus all guests must use radix MMU mode. h](j)}(hKVM_PPC_NO_HASHh]hKVM_PPC_NO_HASH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM. hjubj)}(hhh]h)}(hfThis flag indicates that HPT guests are not supported by KVM, thus all guests must use radix MMU mode.h]hfThis flag indicates that HPT guests are not supported by KVM, thus all guests must use radix MMU mode.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM- hj"ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM. hj ubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhM# hj~ubah}(h]h ]h"]h$]h&]uh1hhhhM# hjEhhubh)}(hAThe "slb_size" field indicates how many SLB entries are supportedh]hEThe “slb_size” field indicates how many SLB entries are supported}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0 hjEhhubh)}(hThe "sps" array contains 8 entries indicating the supported base page sizes for a segment in increasing order. Each entry is defined as follow::h]hThe “sps” array contains 8 entries indicating the supported base page sizes for a segment in increasing order. Each entry is defined as follow:}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hjEhhubj$)}(hstruct kvm_ppc_one_seg_page_size { __u32 page_shift; /* Base page shift of segment (or 0) */ __u32 slb_enc; /* SLB encoding for BookS */ struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ]; };h]hstruct kvm_ppc_one_seg_page_size { __u32 page_shift; /* Base page shift of segment (or 0) */ __u32 slb_enc; /* SLB encoding for BookS */ struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ]; };}hjssbah}(h]h ]h"]h$]h&]hhuh1j#hhhM6 hjEhhubh)}(hAn entry with a "page_shift" of 0 is unused. Because the array is organized in increasing order, a lookup can stop when encountering such an entry.h]hAn entry with a “page_shift” of 0 is unused. Because the array is organized in increasing order, a lookup can stop when encountering such an entry.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjEhhubh)}(hThe "slb_enc" field provides the encoding to use in the SLB for the page size. The bits are in positions such as the value can directly be OR'ed into the "vsid" argument of the slbmte instruction.h]hThe “slb_enc” field provides the encoding to use in the SLB for the page size. The bits are in positions such as the value can directly be OR’ed into the “vsid” argument of the slbmte instruction.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hjEhhubh)}(hXkThe "enc" array is a list which for each of those segment base page size provides the list of supported actual page sizes (which can be only larger or equal to the base page size), along with the corresponding encoding in the hash PTE. Similarly, the array is 8 entries sorted by increasing sizes and an entry with a "0" shift is an empty entry and a terminator::h]hXrThe “enc” array is a list which for each of those segment base page size provides the list of supported actual page sizes (which can be only larger or equal to the base page size), along with the corresponding encoding in the hash PTE. Similarly, the array is 8 entries sorted by increasing sizes and an entry with a “0” shift is an empty entry and a terminator:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjEhhubj$)}(hstruct kvm_ppc_one_page_size { __u32 page_shift; /* Page shift (or 0) */ __u32 pte_enc; /* Encoding in the HPTE (>>12) */ };h]hstruct kvm_ppc_one_page_size { __u32 page_shift; /* Page shift (or 0) */ __u32 pte_enc; /* Encoding in the HPTE (>>12) */ };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMK hjEhhubh)}(hThe "pte_enc" field provides a value that can OR'ed into the hash PTE's RPN field (ie, it needs to be shifted left by 12 to OR it into the hash PTE second double word).h]hThe “pte_enc” field provides a value that can OR’ed into the hash PTE’s RPN field (ie, it needs to be shifted left by 12 to OR it into the hash PTE second double word).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hjEhhubeh}(h]kvm-ppc-get-smmu-infoah ]h"]4.74 kvm_ppc_get_smmu_infoah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.75 KVM_IRQFDh]h4.75 KVM_IRQFD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMU ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h KVM_CAP_IRQFDh]h)}(hjh]h KVM_CAP_IRQFD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMW hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMW hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86 s390 arm64h]h)}(hj$h]hx86 s390 arm64}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMX hj"ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMX hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(hvm ioctlh]h)}(hjRh]hvm ioctl}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMY hjPubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhMY hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjmhhhKubjy)}(hstruct kvm_irqfd (in)h]h)}(hjh]hstruct kvm_irqfd (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ hj~ubah}(h]h ]h"]h$]h&]uh1jxhjmubeh}(h]h ]h"]h$]h&]uh1jchhhMZ hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[ hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM[ hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMW ubh)}(hXAllows setting an eventfd to directly trigger a guest interrupt. kvm_irqfd.fd specifies the file descriptor to use as the eventfd and kvm_irqfd.gsi specifies the irqchip pin toggled by this event. When an event is triggered on the eventfd, an interrupt is injected into the guest using the specified gsi pin. The irqfd is removed using the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd and kvm_irqfd.gsi.h]hXAllows setting an eventfd to directly trigger a guest interrupt. kvm_irqfd.fd specifies the file descriptor to use as the eventfd and kvm_irqfd.gsi specifies the irqchip pin toggled by this event. When an event is triggered on the eventfd, an interrupt is injected into the guest using the specified gsi pin. The irqfd is removed using the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd and kvm_irqfd.gsi.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hjhhubh)}(hX&With KVM_CAP_IRQFD_RESAMPLE, KVM_IRQFD supports a de-assert and notify mechanism allowing emulation of level-triggered, irqfd-based interrupts. When KVM_IRQFD_FLAG_RESAMPLE is set the user must pass an additional eventfd in the kvm_irqfd.resamplefd field. When operating in resample mode, posting of an interrupt through kvm_irq.fd asserts the specified gsi in the irqchip. When the irqchip is resampled, such as from an EOI, the gsi is de-asserted and the user is notified via kvm_irqfd.resamplefd. It is the user's responsibility to re-queue the interrupt if the device making use of it still requires service. Note that closing the resamplefd is not sufficient to disable the irqfd. The KVM_IRQFD_FLAG_RESAMPLE is only necessary on assignment and need not be specified with KVM_IRQFD_FLAG_DEASSIGN.h]hX(With KVM_CAP_IRQFD_RESAMPLE, KVM_IRQFD supports a de-assert and notify mechanism allowing emulation of level-triggered, irqfd-based interrupts. When KVM_IRQFD_FLAG_RESAMPLE is set the user must pass an additional eventfd in the kvm_irqfd.resamplefd field. When operating in resample mode, posting of an interrupt through kvm_irq.fd asserts the specified gsi in the irqchip. When the irqchip is resampled, such as from an EOI, the gsi is de-asserted and the user is notified via kvm_irqfd.resamplefd. It is the user’s responsibility to re-queue the interrupt if the device making use of it still requires service. Note that closing the resamplefd is not sufficient to disable the irqfd. The KVM_IRQFD_FLAG_RESAMPLE is only necessary on assignment and need not be specified with KVM_IRQFD_FLAG_DEASSIGN.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMe hjhhubh)}(h@On arm64, gsi routing being supported, the following can happen:h]h@On arm64, gsi routing being supported, the following can happen:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr hjhhubh)}(hhh](j)}(hCin case no routing entry is associated to this gsi, injection failsh]h)}(hjh]hCin case no routing entry is associated to this gsi, injection fails}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hoin case the gsi is associated to an irqchip routing entry, irqchip.pin + 32 corresponds to the injected SPI ID.h]h)}(hoin case the gsi is associated to an irqchip routing entry, irqchip.pin + 32 corresponds to the injected SPI ID.h]hoin case the gsi is associated to an irqchip routing entry, irqchip.pin + 32 corresponds to the injected SPI ID.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hin case the gsi is associated to an MSI routing entry, the MSI message and device ID are translated into an LPI (support restricted to GICv3 ITS in-kernel emulation). h]h)}(hin case the gsi is associated to an MSI routing entry, the MSI message and device ID are translated into an LPI (support restricted to GICv3 ITS in-kernel emulation).h]hin case the gsi is associated to an MSI routing entry, the MSI message and device ID are translated into an LPI (support restricted to GICv3 ITS in-kernel emulation).}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMw hj,ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMt hjhhubeh}(h] kvm-irqfdah ]h"]4.75 kvm_irqfdah$]h&]uh1hhjhhhhhMU ubh)}(hhh](h)}(h4.76 KVM_PPC_ALLOCATE_HTABh]h4.76 KVM_PPC_ALLOCATE_HTAB}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhhhhhM| ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(hKVM_CAP_PPC_ALLOC_HTABh]h)}(hjyh]hKVM_CAP_PPC_ALLOC_HTAB}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hjwubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhM~ hjchhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjchhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjchhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h3Pointer to u32 containing hash table order (in/out)h]h)}(hjh]h3Pointer to u32 containing hash table order (in/out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjchhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj/ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjchhubeh}(h]h ]h"]h$]h&]uh1j^hjRhhhhhM~ ubh)}(hXYThis requests the host kernel to allocate an MMU hash table for a guest using the PAPR paravirtualization interface. This only does anything if the kernel is configured to use the Book 3S HV style of virtualization. Otherwise the capability doesn't exist and the ioctl returns an ENOTTY error. The rest of this description assumes Book 3S HV.h]hX[This requests the host kernel to allocate an MMU hash table for a guest using the PAPR paravirtualization interface. This only does anything if the kernel is configured to use the Book 3S HV style of virtualization. Otherwise the capability doesn’t exist and the ioctl returns an ENOTTY error. The rest of this description assumes Book 3S HV.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjRhhubh)}(huThere must be no vcpus running when this ioctl is called; if there are, it will do nothing and return an EBUSY error.h]huThere must be no vcpus running when this ioctl is called; if there are, it will do nothing and return an EBUSY error.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjRhhubh)}(hThe parameter is a pointer to a 32-bit unsigned integer variable containing the order (log base 2) of the desired size of the hash table, which must be between 18 and 46. On successful return from the ioctl, the value will not be changed by the kernel.h]hThe parameter is a pointer to a 32-bit unsigned integer variable containing the order (log base 2) of the desired size of the hash table, which must be between 18 and 46. On successful return from the ioctl, the value will not be changed by the kernel.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjRhhubh)}(hIf no hash table has been allocated when any vcpu is asked to run (with the KVM_RUN ioctl), the host kernel will allocate a default-sized hash table (16 MB).h]hIf no hash table has been allocated when any vcpu is asked to run (with the KVM_RUN ioctl), the host kernel will allocate a default-sized hash table (16 MB).}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjRhhubh)}(hXIf this ioctl is called when a hash table has already been allocated, with a different order from the existing hash table, the existing hash table will be freed and a new one allocated. If this is ioctl is called when a hash table has already been allocated of the same order as specified, the kernel will clear out the existing hash table (zero all HPTEs). In either case, if the guest is using the virtualized real-mode area (VRMA) facility, the kernel will re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.h]hXIf this ioctl is called when a hash table has already been allocated, with a different order from the existing hash table, the existing hash table will be freed and a new one allocated. If this is ioctl is called when a hash table has already been allocated of the same order as specified, the kernel will clear out the existing hash table (zero all HPTEs). In either case, if the guest is using the virtualized real-mode area (VRMA) facility, the kernel will re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjRhhubeh}(h]kvm-ppc-allocate-htabah ]h"]4.76 kvm_ppc_allocate_htabah$]h&]uh1hhjhhhhhM| ubh)}(hhh](h)}(h4.77 KVM_S390_INTERRUPTh]h4.77 KVM_S390_INTERRUPT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctl, vcpu ioctlh]h)}(hj$h]hvm ioctl, vcpu ioctl}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj"ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(hstruct kvm_s390_interrupt (in)h]h)}(hjRh]hstruct kvm_s390_interrupt (in)}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjmhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1jxhjmubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(hAllows to inject an interrupt to the guest. Interrupts can be floating (vm ioctl) or per cpu (vcpu ioctl), depending on the interrupt type.h]hAllows to inject an interrupt to the guest. Interrupts can be floating (vm ioctl) or per cpu (vcpu ioctl), depending on the interrupt type.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(h8Interrupt parameters are passed via kvm_s390_interrupt::h]h7Interrupt parameters are passed via kvm_s390_interrupt:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(hVstruct kvm_s390_interrupt { __u32 type; __u32 parm; __u64 parm64; };h]hVstruct kvm_s390_interrupt { __u32 type; __u32 parm; __u64 parm64; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(h!type can be one of the following:h]h!type can be one of the following:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj)}(hhh](j)}(h=KVM_S390_SIGP_STOP (vcpu) - sigp stop; optional flags in parmh](j)}(hKVM_S390_SIGP_STOP (vcpu)h]hKVM_S390_SIGP_STOP (vcpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(h!sigp stop; optional flags in parmh]h)}(hjh]h!sigp stop; optional flags in parm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(h9KVM_S390_PROGRAM_INT (vcpu) - program check; code in parmh](j)}(hKVM_S390_PROGRAM_INT (vcpu)h]hKVM_S390_PROGRAM_INT (vcpu)}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(hprogram check; code in parmh]h)}(hj8h]hprogram check; code in parm}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj6ubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]jjuh1hhhhM hj0ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hIKVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parmh](j)}(hKVM_S390_SIGP_SET_PREFIX (vcpu)h]hKVM_S390_SIGP_SET_PREFIX (vcpu)}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj_ubj)}(hhh]h)}(hhh]j)}(h'sigp set prefix; prefix address in parmh]h)}(hjyh]h'sigp set prefix; prefix address in parm}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjwubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjqubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(h!KVM_S390_RESTART (vcpu) - restarth](j)}(hKVM_S390_RESTART (vcpu)h]hKVM_S390_RESTART (vcpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(hrestarth]h)}(hjh]hrestart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(h;KVM_S390_INT_CLOCK_COMP (vcpu) - clock comparator interrupth](j)}(hKVM_S390_INT_CLOCK_COMP (vcpu)h]hKVM_S390_INT_CLOCK_COMP (vcpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(hclock comparator interrupth]h)}(hjh]hclock comparator interrupt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(h3KVM_S390_INT_CPU_TIMER (vcpu) - CPU timer interrupth](j)}(hKVM_S390_INT_CPU_TIMER (vcpu)h]hKVM_S390_INT_CPU_TIMER (vcpu)}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj"ubj)}(hhh]h)}(hhh]j)}(hCPU timer interrupth]h)}(hj<h]hCPU timer interrupt}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj:ubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]jjuh1hhhhM hj4ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hhKVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt parameters in parm and parm64h](j)}(hKVM_S390_INT_VIRTIO (vm)h]hKVM_S390_INT_VIRTIO (vm)}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjcubj)}(hhh]h)}(hhh]j)}(hKvirtio external interrupt; external interrupt parameters in parm and parm64h]h)}(hKvirtio external interrupt; external interrupt parameters in parm and parm64h]hKvirtio external interrupt; external interrupt parameters in parm and parm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj{ubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjuubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hKKVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parmh](j)}(hKVM_S390_INT_SERVICE (vm)h]hKVM_S390_INT_SERVICE (vm)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(h/sclp external interrupt; sclp parameter in parmh]h)}(hjh]h/sclp external interrupt; sclp parameter in parm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hBKVM_S390_INT_EMERGENCY (vcpu) - sigp emergency; source cpu in parmh](j)}(hKVM_S390_INT_EMERGENCY (vcpu)h]hKVM_S390_INT_EMERGENCY (vcpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(h"sigp emergency; source cpu in parmh]h)}(hjh]h"sigp emergency; source cpu in parm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hJKVM_S390_INT_EXTERNAL_CALL (vcpu) - sigp external call; source cpu in parmh](j)}(h!KVM_S390_INT_EXTERNAL_CALL (vcpu)h]h!KVM_S390_INT_EXTERNAL_CALL (vcpu)}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj'ubj)}(hhh]h)}(hhh]j)}(h&sigp external call; source cpu in parmh]h)}(hjAh]h&sigp external call; source cpu in parm}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj?ubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]jjuh1hhhhM hj9ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hKVM_S390_INT_IO(ai,cssid,ssid,schid) (vm) - compound value to indicate an I/O interrupt (ai - adapter interrupt; cssid,ssid,schid - subchannel); I/O interruption parameters in parm (subchannel) and parm64 (intparm, interruption subclass)h](j)}(h)KVM_S390_INT_IO(ai,cssid,ssid,schid) (vm)h]h)KVM_S390_INT_IO(ai,cssid,ssid,schid) (vm)}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjhubj)}(hhh]h)}(hhh]j)}(hcompound value to indicate an I/O interrupt (ai - adapter interrupt; cssid,ssid,schid - subchannel); I/O interruption parameters in parm (subchannel) and parm64 (intparm, interruption subclass)h]h)}(hcompound value to indicate an I/O interrupt (ai - adapter interrupt; cssid,ssid,schid - subchannel); I/O interruption parameters in parm (subchannel) and parm64 (intparm, interruption subclass)h]hcompound value to indicate an I/O interrupt (ai - adapter interrupt; cssid,ssid,schid - subchannel); I/O interruption parameters in parm (subchannel) and parm64 (intparm, interruption subclass)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjzubah}(h]h ]h"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(hKVM_S390_MCHK (vm, vcpu) - machine check interrupt; cr 14 bits in parm, machine check interrupt code in parm64 (note that machine checks needing further payload are not supported by this ioctl) h](j)}(hKVM_S390_MCHK (vm, vcpu)h]hKVM_S390_MCHK (vm, vcpu)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(hmachine check interrupt; cr 14 bits in parm, machine check interrupt code in parm64 (note that machine checks needing further payload are not supported by this ioctl) h]h)}(hmachine check interrupt; cr 14 bits in parm, machine check interrupt code in parm64 (note that machine checks needing further payload are not supported by this ioctl)h]hmachine check interrupt; cr 14 bits in parm, machine check interrupt code in parm64 (note that machine checks needing further payload are not supported by this ioctl)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.h]hFThis is an asynchronous vcpu ioctl and can be invoked from any thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h]kvm-s390-interruptah ]h"]4.77 kvm_s390_interruptah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.78 KVM_PPC_GET_HTAB_FDh]h4.78 KVM_PPC_GET_HTAB_FD}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_PPC_HTAB_FDh]h)}(hj/h]hKVM_CAP_PPC_HTAB_FD}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj-ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjJhhhKubjy)}(hpowerpch]h)}(hj]h]hpowerpc}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj[ubah}(h]h ]h"]h$]h&]uh1jxhjJubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjxhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjxubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h&Pointer to struct kvm_get_htab_fd (in)h]h)}(hjh]h&Pointer to struct kvm_get_htab_fd (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h6file descriptor number (>= 0) on success, -1 on error h]h)}(h5file descriptor number (>= 0) on success, -1 on errorh]h5file descriptor number (>= 0) on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(hXdThis returns a file descriptor that can be used either to read out the entries in the guest's hashed page table (HPT), or to write entries to initialize the HPT. The returned fd can only be written to if the KVM_GET_HTAB_WRITE bit is set in the flags field of the argument, and can only be read if that bit is clear. The argument struct looks like this::h]hXeThis returns a file descriptor that can be used either to read out the entries in the guest’s hashed page table (HPT), or to write entries to initialize the HPT. The returned fd can only be written to if the KVM_GET_HTAB_WRITE bit is set in the flags field of the argument, and can only be read if that bit is clear. The argument struct looks like this:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(hX/* For KVM_PPC_GET_HTAB_FD */ struct kvm_get_htab_fd { __u64 flags; __u64 start_index; __u64 reserved[2]; }; /* Values for kvm_get_htab_fd.flags */ #define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1) #define KVM_GET_HTAB_WRITE ((__u64)0x2)h]hX/* For KVM_PPC_GET_HTAB_FD */ struct kvm_get_htab_fd { __u64 flags; __u64 start_index; __u64 reserved[2]; }; /* Values for kvm_get_htab_fd.flags */ #define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1) #define KVM_GET_HTAB_WRITE ((__u64)0x2)}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(hwThe 'start_index' field gives the index in the HPT of the entry at which to start reading. It is ignored when writing.h]h{The ‘start_index’ field gives the index in the HPT of the entry at which to start reading. It is ignored when writing.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hXReads on the fd will initially supply information about all "interesting" HPT entries. Interesting entries are those with the bolted bit set, if the KVM_GET_HTAB_BOLTED_ONLY bit is set, otherwise all entries. When the end of the HPT is reached, the read() will return. If read() is called again on the fd, it will start again from the beginning of the HPT, but will only return HPT entries that have changed since they were last read.h]hXReads on the fd will initially supply information about all “interesting” HPT entries. Interesting entries are those with the bolted bit set, if the KVM_GET_HTAB_BOLTED_ONLY bit is set, otherwise all entries. When the end of the HPT is reached, the read() will return. If read() is called again on the fd, it will start again from the beginning of the HPT, but will only return HPT entries that have changed since they were last read.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hX@Data read or written is structured as a header (8 bytes) followed by a series of valid HPT entries (16 bytes) each. The header indicates how many valid HPT entries there are and how many invalid entries follow the valid entries. The invalid entries are not represented explicitly in the stream. The header format is::h]hX?Data read or written is structured as a header (8 bytes) followed by a series of valid HPT entries (16 bytes) each. The header indicates how many valid HPT entries there are and how many invalid entries follow the valid entries. The invalid entries are not represented explicitly in the stream. The header format is:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(hdstruct kvm_get_htab_header { __u32 index; __u16 n_valid; __u16 n_invalid; };h]hdstruct kvm_get_htab_header { __u32 index; __u16 n_valid; __u16 n_invalid; };}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(hWrites to the fd create HPT entries starting at the index given in the header; first 'n_valid' valid entries with contents from the data written, then 'n_invalid' invalid entries, invalidating any previously valid entries found.h]hWrites to the fd create HPT entries starting at the index given in the header; first ‘n_valid’ valid entries with contents from the data written, then ‘n_invalid’ invalid entries, invalidating any previously valid entries found.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h]kvm-ppc-get-htab-fdah ]h"]4.78 kvm_ppc_get_htab_fdah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.79 KVM_CREATE_DEVICEh]h4.79 KVM_CREATE_DEVICE}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_DEVICE_CTRLh]h)}(hjh]hKVM_CAP_DEVICE_CTRL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hallh]h)}(hjh]hall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h!struct kvm_create_device (in/out)h]h)}(hj$h]h!struct kvm_create_device (in/out)}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj"ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjshhhhhM ubh)}(hErrors:h]hErrors:}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjshhubh)}(hX|====== ======================================================= ENODEV The device type is unknown or unsupported EEXIST Device already created, and this type of device may not be instantiated multiple times ====== ======================================================= Other error conditions may be defined by individual device types or have their standard meanings. h](jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK7uh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hENODEVh]hENODEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h)The device type is unknown or unsupportedh]h)The device type is unknown or unsupported}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hEEXISTh]hEEXIST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hVDevice already created, and this type of device may not be instantiated multiple timesh]hVDevice already created, and this type of device may not be instantiated multiple times}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubh)}(haOther error conditions may be defined by individual device types or have their standard meanings.h]haOther error conditions may be defined by individual device types or have their standard meanings.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubeh}(h]h ]h"]h$]h&]uh1hhhhM hjshhubh)}(h{Creates an emulated device in the kernel. The file descriptor returned in fd can be used with KVM_SET/GET/HAS_DEVICE_ATTR.h]h{Creates an emulated device in the kernel. The file descriptor returned in fd can be used with KVM_SET/GET/HAS_DEVICE_ATTR.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM" hjshhubh)}(hIf the KVM_CREATE_DEVICE_TEST flag is set, only test whether the device type is supported (not necessarily whether it can be created in the current vm).h]hIf the KVM_CREATE_DEVICE_TEST flag is set, only test whether the device type is supported (not necessarily whether it can be created in the current vm).}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM% hjshhubh)}(hIndividual devices should not define flags. Attributes should be used for specifying any behavior that is not implied by the device type number.h]hIndividual devices should not define flags. Attributes should be used for specifying any behavior that is not implied by the device type number.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM) hjshhubj$)}(hstruct kvm_create_device { __u32 type; /* in: KVM_DEV_TYPE_xxx */ __u32 fd; /* out: device handle */ __u32 flags; /* in: KVM_CREATE_DEVICE_xxx */ };h]hstruct kvm_create_device { __u32 type; /* in: KVM_DEV_TYPE_xxx */ __u32 fd; /* out: device handle */ __u32 flags; /* in: KVM_CREATE_DEVICE_xxx */ };}hjbsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM/ hjshhubeh}(h]kvm-create-deviceah ]h"]4.79 kvm_create_deviceah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h,4.80 KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTRh]h,4.80 KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhhhhhM6 ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device, KVM_CAP_VCPU_ATTRIBUTES for vcpu device KVM_CAP_SYS_ATTRIBUTES for system (/dev/kvm) device (no set)h]h)}(hKVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device, KVM_CAP_VCPU_ATTRIBUTES for vcpu device KVM_CAP_SYS_ATTRIBUTES for system (/dev/kvm) device (no set)h]hKVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device, KVM_CAP_VCPU_ATTRIBUTES for vcpu device KVM_CAP_SYS_ATTRIBUTES for system (/dev/kvm) device (no set)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8 hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM8 hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86, arm64, s390h]h)}(hjh]hx86, arm64, s390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM; hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM; hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h"device ioctl, vm ioctl, vcpu ioctlh]h)}(hjh]h"device ioctl, vm ioctl, vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM< hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_device_attrh]h)}(hj*h]hstruct kvm_device_attr}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hj(ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM= hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM> hjVubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhM> hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjxhhhhhM8 ubh)}(hErrors:h]hErrors:}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hjxhhubh)}(hX===== ============================================================= ENXIO The group or attribute is unknown/unsupported for this device or hardware support is missing. EPERM The attribute cannot (currently) be accessed this way (e.g. read-only attribute, or attribute that only makes sense when the device is in a different state) ===== ============================================================= Other error conditions may be defined by individual device types. h](jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hENXIOh]hENXIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h]The group or attribute is unknown/unsupported for this device or hardware support is missing.h]h]The group or attribute is unknown/unsupported for this device or hardware support is missing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hEPERMh]hEPERM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hThe attribute cannot (currently) be accessed this way (e.g. read-only attribute, or attribute that only makes sense when the device is in a different state)h]hThe attribute cannot (currently) be accessed this way (e.g. read-only attribute, or attribute that only makes sense when the device is in a different state)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubh)}(hAOther error conditions may be defined by individual device types.h]hAOther error conditions may be defined by individual device types.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjubeh}(h]h ]h"]h$]h&]uh1hhhhMB hjxhhubh)}(hXGets/sets a specified piece of device configuration and/or state. The semantics are device-specific. See individual device documentation in the "devices" directory. As with ONE_REG, the size of the data transferred is defined by the particular attribute.h]hXGets/sets a specified piece of device configuration and/or state. The semantics are device-specific. See individual device documentation in the “devices” directory. As with ONE_REG, the size of the data transferred is defined by the particular attribute.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hjxhhubj$)}(hXstruct kvm_device_attr { __u32 flags; /* no flags currently defined */ __u32 group; /* device-defined */ __u64 attr; /* group-defined */ __u64 addr; /* userspace address of attr data */ };h]hXstruct kvm_device_attr { __u32 flags; /* no flags currently defined */ __u32 group; /* device-defined */ __u64 attr; /* group-defined */ __u64 addr; /* userspace address of attr data */ };}hjLsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMS hjxhhubeh}(h]'kvm-set-device-attr-kvm-get-device-attrah ]h"],4.80 kvm_set_device_attr/kvm_get_device_attrah$]h&]uh1hhjhhhhhM6 ubh)}(hhh](h)}(h4.81 KVM_HAS_DEVICE_ATTRh]h4.81 KVM_HAS_DEVICE_ATTR}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhhhhhM[ ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvhhhKubjy)}(hKVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device, KVM_CAP_VCPU_ATTRIBUTES for vcpu device KVM_CAP_SYS_ATTRIBUTES for system (/dev/kvm) deviceh]h)}(hKVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device, KVM_CAP_VCPU_ATTRIBUTES for vcpu device KVM_CAP_SYS_ATTRIBUTES for system (/dev/kvm) deviceh]hKVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device, KVM_CAP_VCPU_ATTRIBUTES for vcpu device KVM_CAP_SYS_ATTRIBUTES for system (/dev/kvm) device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hjubah}(h]h ]h"]h$]h&]uh1jxhjvubeh}(h]h ]h"]h$]h&]uh1jchhhM] hjshhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h"device ioctl, vm ioctl, vcpu ioctlh]h)}(hjh]h"device ioctl, vm ioctl, vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM` hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM` hjshhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_device_attrh]h)}(hjh]hstruct kvm_device_attr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMa hjshhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMb hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMb hjshhubeh}(h]h ]h"]h$]h&]uh1j^hjbhhhhhM] ubh)}(hErrors:h]hErrors:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hjbhhubh)}(h===== ============================================================= ENXIO The group or attribute is unknown/unsupported for this device or hardware support is missing. ===== ============================================================= h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjKubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1jOhjKubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hENXIOh]hENXIO}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjhubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh]h)}(h]The group or attribute is unknown/unsupported for this device or hardware support is missing.h]h]The group or attribute is unknown/unsupported for this device or hardware support is missing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjubah}(h]h ]h"]h$]h&]uh1johjeubeh}(h]h ]h"]h$]h&]uh1jjhjbubah}(h]h ]h"]h$]h&]uh1jehjKubeh}(h]h ]h"]h$]h&]colsKuh1jJhjHubah}(h]h ]h"]h$]h&]uh1jEhjDubah}(h]h ]h"]h$]h&]uh1hhhhMf hjbhhubh)}(hTests whether a device supports a particular attribute. A successful return indicates the attribute is implemented. It does not necessarily indicate that the attribute can be read or written in the device's current state. "addr" is ignored.h]hTests whether a device supports a particular attribute. A successful return indicates the attribute is implemented. It does not necessarily indicate that the attribute can be read or written in the device’s current state. “addr” is ignored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk hjbhhubj@)}(h.. _KVM_ARM_VCPU_INIT:h]h}(h]h ]h"]h$]h&]jKkvm-arm-vcpu-inituh1j?hMp hjbhhhhubeh}(h]kvm-has-device-attrah ]h"]4.81 kvm_has_device_attrah$]h&]uh1hhjhhhhhM[ ubh)}(hhh](h)}(h4.82 KVM_ARM_VCPU_INITh]h4.82 KVM_ARM_VCPU_INIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMs ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMu hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(harm64h]h)}(hj+h]harm64}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMv hj)ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMv hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjFhhhKubjy)}(h vcpu ioctlh]h)}(hjYh]h vcpu ioctl}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMw hjWubah}(h]h ]h"]h$]h&]uh1jxhjFubeh}(h]h ]h"]h$]h&]uh1jchhhMw hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjthhhKubjy)}(hstruct kvm_vcpu_init (in)h]h)}(hjh]hstruct kvm_vcpu_init (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMx hjubah}(h]h ]h"]h$]h&]uh1jxhjtubeh}(h]h ]h"]h$]h&]uh1jchhhMx hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMy hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMy hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMu ubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{ hjhhubh)}(hX====== ================================================================= EINVAL the target is unknown, or the combination of features is invalid. ENOENT a features bit specified is unknown. ====== ================================================================= h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKAuh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEINVALh]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hAthe target is unknown, or the combination of features is invalid.h]hAthe target is unknown, or the combination of features is invalid.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hj ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hENOENTh]hENOENT}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj@ubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h)}(h$a features bit specified is unknown.h]h$a features bit specified is unknown.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjWubah}(h]h ]h"]h$]h&]uh1johj=ubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhM} hjhhubh)}(hThis tells KVM what type of CPU to present to the guest, and what optional features it should have. This will cause a reset of the cpu registers to their initial values. If this is not called, KVM_RUN will return ENOEXEC for that vcpu.h]hThis tells KVM what type of CPU to present to the guest, and what optional features it should have. This will cause a reset of the cpu registers to their initial values. If this is not called, KVM_RUN will return ENOEXEC for that vcpu.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj)}(hhh]j)}(hXThe initial values are defined as: - Processor state: * AArch64: EL1h, D, A, I and F bits set. All other bits are cleared. * AArch32: SVC, A, I and F bits set. All other bits are cleared. - General Purpose registers, including PC and SP: set to 0 - FPSIMD/NEON registers: set to 0 - SVE registers: set to 0 - System registers: Reset to their architecturally defined values as for a warm reset to EL1 (resp. SVC) or EL2 (in the case of EL2 being enabled). h](j)}(h"The initial values are defined as:h]h"The initial values are defined as:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh](j)}(hProcessor state: * AArch64: EL1h, D, A, I and F bits set. All other bits are cleared. * AArch32: SVC, A, I and F bits set. All other bits are cleared.h]j)}(hhh]j)}(hProcessor state: * AArch64: EL1h, D, A, I and F bits set. All other bits are cleared. * AArch32: SVC, A, I and F bits set. All other bits are cleared.h](j)}(hProcessor state:h]hProcessor state:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh](j)}(hBAArch64: EL1h, D, A, I and F bits set. All other bits are cleared.h]h)}(hBAArch64: EL1h, D, A, I and F bits set. All other bits are cleared.h]hBAArch64: EL1h, D, A, I and F bits set. All other bits are cleared.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h>AArch32: SVC, A, I and F bits set. All other bits are cleared.h]h)}(h>AArch32: SVC, A, I and F bits set. All other bits are cleared.h]h>AArch32: SVC, A, I and F bits set. All other bits are cleared.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j*uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h8General Purpose registers, including PC and SP: set to 0h]h)}(hj&h]h8General Purpose registers, including PC and SP: set to 0}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj$ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hFPSIMD/NEON registers: set to 0h]h)}(hj=h]hFPSIMD/NEON registers: set to 0}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj;ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hSVE registers: set to 0h]h)}(hjTh]hSVE registers: set to 0}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjRubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hSystem registers: Reset to their architecturally defined values as for a warm reset to EL1 (resp. SVC) or EL2 (in the case of EL2 being enabled). h]h)}(hSystem registers: Reset to their architecturally defined values as for a warm reset to EL1 (resp. SVC) or EL2 (in the case of EL2 being enabled).h]hSystem registers: Reset to their architecturally defined values as for a warm reset to EL1 (resp. SVC) or EL2 (in the case of EL2 being enabled).}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjiubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(htNote that because some registers reflect machine topology, all vcpus should be created before this ioctl is invoked.h]htNote that because some registers reflect machine topology, all vcpus should be created before this ioctl is invoked.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hX$Userspace can call this function multiple times for a given vcpu, including after the vcpu has been run. This will reset the vcpu to its initial state. All calls to this function after the initial call must use the same target and same set of feature flags, otherwise EINVAL will be returned.h]hX$Userspace can call this function multiple times for a given vcpu, including after the vcpu has been run. This will reset the vcpu to its initial state. All calls to this function after the initial call must use the same target and same set of feature flags, otherwise EINVAL will be returned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hPossible features:h]hPossible features:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hX] - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. Depends on KVM_CAP_ARM_PSCI. If not set, the CPU will be powered on and execute guest code when KVM_RUN is called. - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only). - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 (or a future revision backward compatible with v0.2) for the CPU. Depends on KVM_CAP_ARM_PSCI_0_2. - KVM_ARM_VCPU_PMU_V3: Emulate PMUv3 for the CPU. Depends on KVM_CAP_ARM_PMU_V3. - KVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication for arm64 only. Depends on KVM_CAP_ARM_PTRAUTH_ADDRESS. If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be requested. - KVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication for arm64 only. Depends on KVM_CAP_ARM_PTRAUTH_GENERIC. If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be requested. - KVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only). Depends on KVM_CAP_ARM_SVE. Requires KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): * After KVM_ARM_VCPU_INIT: - KVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the initial value of this pseudo-register indicates the best set of vector lengths possible for a vcpu on this host. * Before KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): - KVM_RUN and KVM_GET_REG_LIST are not available; - KVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access the scalable architectural SVE registers KVM_REG_ARM64_SVE_ZREG(), KVM_REG_ARM64_SVE_PREG() or KVM_REG_ARM64_SVE_FFR; - KVM_REG_ARM64_SVE_VLS may optionally be written using KVM_SET_ONE_REG, to modify the set of vector lengths available for the vcpu. * After KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): - the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can no longer be written using KVM_SET_ONE_REG. - KVM_ARM_VCPU_HAS_EL2: Enable Nested Virtualisation support, booting the guest from EL2 instead of EL1. Depends on KVM_CAP_ARM_EL2. The VM is running with HCR_EL2.E2H being RES1 (VHE) unless KVM_ARM_VCPU_HAS_EL2_E2H0 is also set. - KVM_ARM_VCPU_HAS_EL2_E2H0: Restrict Nested Virtualisation support to HCR_EL2.E2H being RES0 (non-VHE). Depends on KVM_CAP_ARM_EL2_E2H0. KVM_ARM_VCPU_HAS_EL2 must also be set. h]h)}(hhh](j)}(hKVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. Depends on KVM_CAP_ARM_PSCI. If not set, the CPU will be powered on and execute guest code when KVM_RUN is called.h]h)}(hKVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. Depends on KVM_CAP_ARM_PSCI. If not set, the CPU will be powered on and execute guest code when KVM_RUN is called.h]hKVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. Depends on KVM_CAP_ARM_PSCI. If not set, the CPU will be powered on and execute guest code when KVM_RUN is called.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hfKVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).h]h)}(hfKVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).h]hfKVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hKVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 (or a future revision backward compatible with v0.2) for the CPU. Depends on KVM_CAP_ARM_PSCI_0_2.h]h)}(hKVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 (or a future revision backward compatible with v0.2) for the CPU. Depends on KVM_CAP_ARM_PSCI_0_2.h]hKVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 (or a future revision backward compatible with v0.2) for the CPU. Depends on KVM_CAP_ARM_PSCI_0_2.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hOKVM_ARM_VCPU_PMU_V3: Emulate PMUv3 for the CPU. Depends on KVM_CAP_ARM_PMU_V3. h]h)}(hNKVM_ARM_VCPU_PMU_V3: Emulate PMUv3 for the CPU. Depends on KVM_CAP_ARM_PMU_V3.h]hNKVM_ARM_VCPU_PMU_V3: Emulate PMUv3 for the CPU. Depends on KVM_CAP_ARM_PMU_V3.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXFKVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication for arm64 only. Depends on KVM_CAP_ARM_PTRAUTH_ADDRESS. If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be requested. h]h)}(hXEKVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication for arm64 only. Depends on KVM_CAP_ARM_PTRAUTH_ADDRESS. If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be requested.h]hXEKVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication for arm64 only. Depends on KVM_CAP_ARM_PTRAUTH_ADDRESS. If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be requested.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj*ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXFKVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication for arm64 only. Depends on KVM_CAP_ARM_PTRAUTH_GENERIC. If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be requested. h]h)}(hXEKVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication for arm64 only. Depends on KVM_CAP_ARM_PTRAUTH_GENERIC. If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be requested.h]hXEKVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication for arm64 only. Depends on KVM_CAP_ARM_PTRAUTH_GENERIC. If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be requested.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXKVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only). Depends on KVM_CAP_ARM_SVE. Requires KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): * After KVM_ARM_VCPU_INIT: - KVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the initial value of this pseudo-register indicates the best set of vector lengths possible for a vcpu on this host. * Before KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): - KVM_RUN and KVM_GET_REG_LIST are not available; - KVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access the scalable architectural SVE registers KVM_REG_ARM64_SVE_ZREG(), KVM_REG_ARM64_SVE_PREG() or KVM_REG_ARM64_SVE_FFR; - KVM_REG_ARM64_SVE_VLS may optionally be written using KVM_SET_ONE_REG, to modify the set of vector lengths available for the vcpu. * After KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): - the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can no longer be written using KVM_SET_ONE_REG. h](h)}(hKVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only). Depends on KVM_CAP_ARM_SVE. Requires KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE):h]hKVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only). Depends on KVM_CAP_ARM_SVE. Requires KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE):}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjZubh)}(hXF* After KVM_ARM_VCPU_INIT: - KVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the initial value of this pseudo-register indicates the best set of vector lengths possible for a vcpu on this host. * Before KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): - KVM_RUN and KVM_GET_REG_LIST are not available; - KVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access the scalable architectural SVE registers KVM_REG_ARM64_SVE_ZREG(), KVM_REG_ARM64_SVE_PREG() or KVM_REG_ARM64_SVE_FFR; - KVM_REG_ARM64_SVE_VLS may optionally be written using KVM_SET_ONE_REG, to modify the set of vector lengths available for the vcpu. * After KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): - the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can no longer be written using KVM_SET_ONE_REG. h]h)}(hhh](j)}(hAfter KVM_ARM_VCPU_INIT: - KVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the initial value of this pseudo-register indicates the best set of vector lengths possible for a vcpu on this host. h](h)}(hAfter KVM_ARM_VCPU_INIT:h]hAfter KVM_ARM_VCPU_INIT:}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjsubh)}(h- KVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the initial value of this pseudo-register indicates the best set of vector lengths possible for a vcpu on this host. h]h)}(hhh]j)}(hKVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the initial value of this pseudo-register indicates the best set of vector lengths possible for a vcpu on this host. h]h)}(hKVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the initial value of this pseudo-register indicates the best set of vector lengths possible for a vcpu on this host.h]hKVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the initial value of this pseudo-register indicates the best set of vector lengths possible for a vcpu on this host.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1hhhhM hjsubeh}(h]h ]h"]h$]h&]uh1jhjpubj)}(hXBefore KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): - KVM_RUN and KVM_GET_REG_LIST are not available; - KVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access the scalable architectural SVE registers KVM_REG_ARM64_SVE_ZREG(), KVM_REG_ARM64_SVE_PREG() or KVM_REG_ARM64_SVE_FFR; - KVM_REG_ARM64_SVE_VLS may optionally be written using KVM_SET_ONE_REG, to modify the set of vector lengths available for the vcpu. h](h)}(h/Before KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE):h]h/Before KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubh)}(hXx- KVM_RUN and KVM_GET_REG_LIST are not available; - KVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access the scalable architectural SVE registers KVM_REG_ARM64_SVE_ZREG(), KVM_REG_ARM64_SVE_PREG() or KVM_REG_ARM64_SVE_FFR; - KVM_REG_ARM64_SVE_VLS may optionally be written using KVM_SET_ONE_REG, to modify the set of vector lengths available for the vcpu. h]h)}(hhh](j)}(h0KVM_RUN and KVM_GET_REG_LIST are not available; h]h)}(h/KVM_RUN and KVM_GET_REG_LIST are not available;h]h/KVM_RUN and KVM_GET_REG_LIST are not available;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hKVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access the scalable architectural SVE registers KVM_REG_ARM64_SVE_ZREG(), KVM_REG_ARM64_SVE_PREG() or KVM_REG_ARM64_SVE_FFR; h]h)}(hKVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access the scalable architectural SVE registers KVM_REG_ARM64_SVE_ZREG(), KVM_REG_ARM64_SVE_PREG() or KVM_REG_ARM64_SVE_FFR;h]hKVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access the scalable architectural SVE registers KVM_REG_ARM64_SVE_ZREG(), KVM_REG_ARM64_SVE_PREG() or KVM_REG_ARM64_SVE_FFR;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hKVM_REG_ARM64_SVE_VLS may optionally be written using KVM_SET_ONE_REG, to modify the set of vector lengths available for the vcpu. h]h)}(hKVM_REG_ARM64_SVE_VLS may optionally be written using KVM_SET_ONE_REG, to modify the set of vector lengths available for the vcpu.h]hKVM_REG_ARM64_SVE_VLS may optionally be written using KVM_SET_ONE_REG, to modify the set of vector lengths available for the vcpu.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1hhhhM hjubeh}(h]h ]h"]h$]h&]uh1jhjpubj)}(hAfter KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE): - the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can no longer be written using KVM_SET_ONE_REG. h](h)}(h.After KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE):h]h.After KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_SVE):}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj)ubh)}(hp- the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can no longer be written using KVM_SET_ONE_REG. h]h)}(hhh]j)}(hlthe KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can no longer be written using KVM_SET_ONE_REG. h]h)}(hkthe KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can no longer be written using KVM_SET_ONE_REG.h]hkthe KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can no longer be written using KVM_SET_ONE_REG.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]jjuh1hhhhM hj;ubah}(h]h ]h"]h$]h&]uh1hhhhM hj)ubeh}(h]h ]h"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]jj uh1hhhhM hjlubah}(h]h ]h"]h$]h&]uh1hhhhM hjZubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hKVM_ARM_VCPU_HAS_EL2: Enable Nested Virtualisation support, booting the guest from EL2 instead of EL1. Depends on KVM_CAP_ARM_EL2. The VM is running with HCR_EL2.E2H being RES1 (VHE) unless KVM_ARM_VCPU_HAS_EL2_E2H0 is also set. h]h)}(hKVM_ARM_VCPU_HAS_EL2: Enable Nested Virtualisation support, booting the guest from EL2 instead of EL1. Depends on KVM_CAP_ARM_EL2. The VM is running with HCR_EL2.E2H being RES1 (VHE) unless KVM_ARM_VCPU_HAS_EL2_E2H0 is also set.h]hKVM_ARM_VCPU_HAS_EL2: Enable Nested Virtualisation support, booting the guest from EL2 instead of EL1. Depends on KVM_CAP_ARM_EL2. The VM is running with HCR_EL2.E2H being RES1 (VHE) unless KVM_ARM_VCPU_HAS_EL2_E2H0 is also set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hKVM_ARM_VCPU_HAS_EL2_E2H0: Restrict Nested Virtualisation support to HCR_EL2.E2H being RES0 (non-VHE). Depends on KVM_CAP_ARM_EL2_E2H0. KVM_ARM_VCPU_HAS_EL2 must also be set. h]h)}(hKVM_ARM_VCPU_HAS_EL2_E2H0: Restrict Nested Virtualisation support to HCR_EL2.E2H being RES0 (non-VHE). Depends on KVM_CAP_ARM_EL2_E2H0. KVM_ARM_VCPU_HAS_EL2 must also be set.h]hKVM_ARM_VCPU_HAS_EL2_E2H0: Restrict Nested Virtualisation support to HCR_EL2.E2H being RES0 (non-VHE). Depends on KVM_CAP_ARM_EL2_E2H0. KVM_ARM_VCPU_HAS_EL2 must also be set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h](jid17eh ]h"](4.82 kvm_arm_vcpu_initkvm_arm_vcpu_initeh$]h&]uh1hhjhhhhhMs jm}jjsjo}jjsubh)}(hhh](h)}(h4.83 KVM_ARM_PREFERRED_TARGETh]h4.83 KVM_ARM_PREFERRED_TARGET}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(harm64h]h)}(hjh]harm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(hvm ioctlh]h)}(hjHh]hvm ioctl}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjFubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjchhhKubjy)}(hstruct kvm_vcpu_init (out)h]h)}(hjvh]hstruct kvm_vcpu_init (out)}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjtubah}(h]h ]h"]h$]h&]uh1jxhjcubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(h====== ========================================== ENODEV no preferred target available for the host ====== ========================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK*uh1jOhjubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hENODEVh]hENODEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h*no preferred target available for the hosth]h*no preferred target available for the host}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(h_This queries KVM for preferred CPU target type which can be emulated by KVM on underlying host.h]h_This queries KVM for preferred CPU target type which can be emulated by KVM on underlying host.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hX%The ioctl returns struct kvm_vcpu_init instance containing information about preferred CPU target type and recommended features for it. The kvm_vcpu_init->features bitmap returned will have feature bits set if the preferred target recommends setting these features, but this is not mandatory.h]hX%The ioctl returns struct kvm_vcpu_init instance containing information about preferred CPU target type and recommended features for it. The kvm_vcpu_init->features bitmap returned will have feature bits set if the preferred target recommends setting these features, but this is not mandatory.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hThe information returned by this ioctl can be used to prepare an instance of struct kvm_vcpu_init for KVM_ARM_VCPU_INIT ioctl which will result in VCPU matching underlying host.h]hThe information returned by this ioctl can be used to prepare an instance of struct kvm_vcpu_init for KVM_ARM_VCPU_INIT ioctl which will result in VCPU matching underlying host.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h]kvm-arm-preferred-targetah ]h"]4.83 kvm_arm_preferred_targetah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h4.84 KVM_GET_REG_LISTh]h4.84 KVM_GET_REG_LIST}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(harm64, mips, riscvh]h)}(hjh]harm64, mips, riscv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_reg_list (in/out)h]h)}(hj(h]hstruct kvm_reg_list (in/out)}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjwhhhhhMubh)}(hErrors:h]hErrors:}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwhhubh)}(hX ===== ============================================================== E2BIG the reg index list is too big to fit in the array specified by the user (the number required will be written into n). ===== ============================================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK>uh1jOhjubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hE2BIGh]hE2BIG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(huthe reg index list is too big to fit in the array specified by the user (the number required will be written into n).h]huthe reg index list is too big to fit in the array specified by the user (the number required will be written into n).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjwhhubj$)}(h^struct kvm_reg_list { __u64 n; /* number of registers in reg[] */ __u64 reg[0]; };h]h^struct kvm_reg_list { __u64 n; /* number of registers in reg[] */ __u64 reg[0]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjwhhubh)}(hhThis ioctl returns the guest registers that are supported for the KVM_GET_ONE_REG/KVM_SET_ONE_REG calls.h]hhThis ioctl returns the guest registers that are supported for the KVM_GET_ONE_REG/KVM_SET_ONE_REG calls.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwhhubh)}(hNote that s390 does not support KVM_GET_REG_LIST for historical reasons (read: nobody cared). The set of registers in kernels 4.x and newer is:h]hNote that s390 does not support KVM_GET_REG_LIST for historical reasons (read: nobody cared). The set of registers in kernels 4.x and newer is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwhhubh)}(hhh](j)}(hKVM_REG_S390_TODPR h]h)}(hKVM_REG_S390_TODPRh]hKVM_REG_S390_TODPR}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubj)}(hKVM_REG_S390_EPOCHDIFF h]h)}(hKVM_REG_S390_EPOCHDIFFh]hKVM_REG_S390_EPOCHDIFF}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubj)}(hKVM_REG_S390_CPU_TIMER h]h)}(hKVM_REG_S390_CPU_TIMERh]hKVM_REG_S390_CPU_TIMER}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubj)}(hKVM_REG_S390_CLOCK_COMP h]h)}(hKVM_REG_S390_CLOCK_COMPh]hKVM_REG_S390_CLOCK_COMP}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjlubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubj)}(hKVM_REG_S390_PFTOKEN h]h)}(hKVM_REG_S390_PFTOKENh]hKVM_REG_S390_PFTOKEN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubj)}(hKVM_REG_S390_PFCOMPARE h]h)}(hKVM_REG_S390_PFCOMPAREh]hKVM_REG_S390_PFCOMPARE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubj)}(hKVM_REG_S390_PFSELECT h]h)}(hKVM_REG_S390_PFSELECTh]hKVM_REG_S390_PFSELECT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubj)}(hKVM_REG_S390_PP h]h)}(hKVM_REG_S390_PPh]hKVM_REG_S390_PP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubj)}(hKVM_REG_S390_GBEA h]h)}(hKVM_REG_S390_GBEAh]hKVM_REG_S390_GBEA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjubah}(h]h ]h"]h$]h&]uh1jhj!hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjwhhubeh}(h]kvm-get-reg-listah ]h"]4.84 kvm_get_reg_listah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h)4.85 KVM_ARM_SET_DEVICE_ADDR (deprecated)h]h)4.85 KVM_ARM_SET_DEVICE_ADDR (deprecated)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM.ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_ARM_SET_DEVICE_ADDRh]h)}(hj1h]hKVM_CAP_ARM_SET_DEVICE_ADDR}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj/ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM0hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjLhhhKubjy)}(harm64h]h)}(hj_h]harm64}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj]ubah}(h]h ]h"]h$]h&]uh1jxhjLubeh}(h]h ]h"]h$]h&]uh1jchhhM1hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjzhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjubah}(h]h ]h"]h$]h&]uh1jxhjzubeh}(h]h ]h"]h$]h&]uh1jchhhM2hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h"struct kvm_arm_device_address (in)h]h)}(hjh]h"struct kvm_arm_device_address (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM3hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM4hjhhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhM0ubh)}(hErrors:h]hErrors:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj hhubh)}(hX<====== ============================================ ENODEV The device id is unknown ENXIO Device not supported on current system EEXIST Address already set E2BIG Address outside guest physical address space EBUSY Address overlaps with other device range ====== ============================================ h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK,uh1jOhj ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hENODEVh]hENODEV}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj=ubah}(h]h ]h"]h$]h&]uh1johj:ubjp)}(hhh]h)}(hThe device id is unknownh]hThe device id is unknown}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjTubah}(h]h ]h"]h$]h&]uh1johj:ubeh}(h]h ]h"]h$]h&]uh1jjhj7ubjk)}(hhh](jp)}(hhh]h)}(hENXIOh]hENXIO}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjtubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(h&Device not supported on current systemh]h&Device not supported on current system}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjubah}(h]h ]h"]h$]h&]uh1johjqubeh}(h]h ]h"]h$]h&]uh1jjhj7ubjk)}(hhh](jp)}(hhh]h)}(hEEXISTh]hEEXIST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hAddress already seth]hAddress already set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj7ubjk)}(hhh](jp)}(hhh]h)}(hE2BIGh]hE2BIG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h,Address outside guest physical address spaceh]h,Address outside guest physical address space}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj7ubjk)}(hhh](jp)}(hhh]h)}(hEBUSYh]hEBUSY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h(Address overlaps with other device rangeh]h(Address overlaps with other device range}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj0ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj7ubeh}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhM8hj hhubj$)}(hAstruct kvm_arm_device_addr { __u64 id; __u64 addr; };h]hAstruct kvm_arm_device_addr { __u64 id; __u64 addr; };}hjfsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMBhj hhubh)}(hSpecify a device address in the guest's physical address space where guests can access emulated or directly exposed devices, which the host kernel needs to know about. The id field is an architecture specific identifier for a specific device.h]hSpecify a device address in the guest’s physical address space where guests can access emulated or directly exposed devices, which the host kernel needs to know about. The id field is an architecture specific identifier for a specific device.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj hhubh)}(hqarm64 divides the id field into two parts, a device id and an address type id specific to the individual device::h]hparm64 divides the id field into two parts, a device id and an address type id specific to the individual device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj hhubj$)}(hbits: | 63 ... 32 | 31 ... 16 | 15 ... 0 | field: | 0x00000000 | device id | addr type id |h]hbits: | 63 ... 32 | 31 ... 16 | 15 ... 0 | field: | 0x00000000 | device id | addr type id |}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMOhj hhubh)}(hXarm64 currently only require this when using the in-kernel GIC support for the hardware VGIC features, using KVM_ARM_DEVICE_VGIC_V2 as the device id. When setting the base address for the guest's mapping of the VGIC virtual CPU and distributor interface, the ioctl must be called after calling KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs. Calling this ioctl twice for any of the base addresses will return -EEXIST.h]hXarm64 currently only require this when using the in-kernel GIC support for the hardware VGIC features, using KVM_ARM_DEVICE_VGIC_V2 as the device id. When setting the base address for the guest’s mapping of the VGIC virtual CPU and distributor interface, the ioctl must be called after calling KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs. Calling this ioctl twice for any of the base addresses will return -EEXIST.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj hhubh)}(hdNote, this IOCTL is deprecated and the more flexible SET/GET_DEVICE_ATTR API should be used instead.h]hdNote, this IOCTL is deprecated and the more flexible SET/GET_DEVICE_ATTR API should be used instead.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj hhubeh}(h]"kvm-arm-set-device-addr-deprecatedah ]h"])4.85 kvm_arm_set_device_addr (deprecated)ah$]h&]uh1hhjhhhhhM.ubh)}(hhh](h)}(h4.86 KVM_PPC_RTAS_DEFINE_TOKENh]h4.86 KVM_PPC_RTAS_DEFINE_TOKEN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM_ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_PPC_RTASh]h)}(hjh]hKVM_CAP_PPC_RTAS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMahjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hppch]h)}(hjh]hppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMbhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj2hhhKubjy)}(hvm ioctlh]h)}(hjEh]hvm ioctl}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchjCubah}(h]h ]h"]h$]h&]uh1jxhj2ubeh}(h]h ]h"]h$]h&]uh1jchhhMchjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj`hhhKubjy)}(hstruct kvm_rtas_token_argsh]h)}(hjsh]hstruct kvm_rtas_token_args}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjqubah}(h]h ]h"]h$]h&]uh1jxhj`ubeh}(h]h ]h"]h$]h&]uh1jchhhMdhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMehjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMaubh)}(hXZDefines a token value for a RTAS (Run Time Abstraction Services) service in order to allow it to be handled in the kernel. The argument struct gives the name of the service, which must be the name of a service that has a kernel-side implementation. If the token value is non-zero, it will be associated with that service, and subsequent RTAS calls by the guest specifying that token will be handled by the kernel. If the token value is 0, then any token associated with the service will be forgotten, and subsequent RTAS calls by the guest for that service will be passed to userspace to be handled.h]hXZDefines a token value for a RTAS (Run Time Abstraction Services) service in order to allow it to be handled in the kernel. The argument struct gives the name of the service, which must be the name of a service that has a kernel-side implementation. If the token value is non-zero, it will be associated with that service, and subsequent RTAS calls by the guest specifying that token will be handled by the kernel. If the token value is 0, then any token associated with the service will be forgotten, and subsequent RTAS calls by the guest for that service will be passed to userspace to be handled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjhhubeh}(h]kvm-ppc-rtas-define-tokenah ]h"]4.86 kvm_ppc_rtas_define_tokenah$]h&]uh1hhjhhhhhM_ubh)}(hhh](h)}(h4.87 KVM_SET_GUEST_DEBUGh]h4.87 KVM_SET_GUEST_DEBUG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMsubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_SET_GUEST_DEBUGh]h)}(hjh]hKVM_CAP_SET_GUEST_DEBUG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMuhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86, s390, ppc, arm64h]h)}(hj.h]hx86, s390, ppc, arm64}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj,ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMvhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjIhhhKubjy)}(h vcpu ioctlh]h)}(hj\h]h vcpu ioctl}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjZubah}(h]h ]h"]h$]h&]uh1jxhjIubeh}(h]h ]h"]h$]h&]uh1jchhhMwhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwhhhKubjy)}(hstruct kvm_guest_debug (in)h]h)}(hjh]hstruct kvm_guest_debug (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjubah}(h]h ]h"]h$]h&]uh1jxhjwubeh}(h]h ]h"]h$]h&]uh1jchhhMxhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMyhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMuubj$)}(hfstruct kvm_guest_debug { __u32 control; __u32 pad; struct kvm_guest_debug_arch arch; };h]hfstruct kvm_guest_debug { __u32 control; __u32 pad; struct kvm_guest_debug_arch arch; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM}hjhhubh)}(hSet up the processor specific debug registers and configure vcpu for handling guest debug events. There are two parts to the structure, the first a control bitfield indicates the type of debug events to handle when running. Common control bits are:h]hSet up the processor specific debug registers and configure vcpu for handling guest debug events. There are two parts to the structure, the first a control bitfield indicates the type of debug events to handle when running. Common control bits are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hw- KVM_GUESTDBG_ENABLE: guest debugging is enabled - KVM_GUESTDBG_SINGLESTEP: the next run should single-step h]h)}(hhh](j)}(h6KVM_GUESTDBG_ENABLE: guest debugging is enabledh]h)}(hjh]h6KVM_GUESTDBG_ENABLE: guest debugging is enabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhhhM2hj)ubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hhh](h)}(hLogical read/write:h]hLogical read/write:}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhM5ubh)}(hXmAccess logical memory, i.e. translate the given guest address to an absolute address given the state of the VCPU and use the absolute address as target of the access. "ar" designates the access register number to be used; the valid range is 0..15. Logical accesses are permitted for the VCPU ioctl only. Logical accesses are permitted for non-protected guests only.h]hXqAccess logical memory, i.e. translate the given guest address to an absolute address given the state of the VCPU and use the absolute address as target of the access. “ar” designates the access register number to be used; the valid range is 0..15. Logical accesses are permitted for the VCPU ioctl only. Logical accesses are permitted for non-protected guests only.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj=hhubj)}(hhh]j)}(hSupported flags: * ``KVM_S390_MEMOP_F_CHECK_ONLY`` * ``KVM_S390_MEMOP_F_INJECT_EXCEPTION`` * ``KVM_S390_MEMOP_F_SKEY_PROTECTION`` h](j)}(hSupported flags:h]hSupported flags:}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMAhj_ubj)}(hhh]h)}(hhh](j)}(h``KVM_S390_MEMOP_F_CHECK_ONLY``h]h)}(hjyh]j)}(hjyh]hKVM_S390_MEMOP_F_CHECK_ONLY}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1hhhhM?hjwubah}(h]h ]h"]h$]h&]uh1jhjtubj)}(h%``KVM_S390_MEMOP_F_INJECT_EXCEPTION``h]h)}(hjh]j)}(hjh]h!KVM_S390_MEMOP_F_INJECT_EXCEPTION}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM@hjubah}(h]h ]h"]h$]h&]uh1jhjtubj)}(h%``KVM_S390_MEMOP_F_SKEY_PROTECTION`` h]h)}(h$``KVM_S390_MEMOP_F_SKEY_PROTECTION``h]j)}(hjh]h KVM_S390_MEMOP_F_SKEY_PROTECTION}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMAhjubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]jj uh1hhhhM?hjqubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhhhMAhj\ubah}(h]h ]h"]h$]h&]uh1jhj=hhhNhNubh)}(hXThe KVM_S390_MEMOP_F_CHECK_ONLY flag can be set to check whether the corresponding memory access would cause an access exception; however, no actual access to the data in memory at the destination is performed. In this case, "buf" is unused and can be NULL.h]hXThe KVM_S390_MEMOP_F_CHECK_ONLY flag can be set to check whether the corresponding memory access would cause an access exception; however, no actual access to the data in memory at the destination is performed. In this case, “buf” is unused and can be NULL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj=hhubh)}(hXIn case an access exception occurred during the access (or would occur in case of KVM_S390_MEMOP_F_CHECK_ONLY), the ioctl returns a positive error number indicating the type of exception. This exception is also raised directly at the corresponding VCPU if the flag KVM_S390_MEMOP_F_INJECT_EXCEPTION is set. On protection exceptions, unless specified otherwise, the injected translation-exception identifier (TEID) indicates suppression.h]hXIn case an access exception occurred during the access (or would occur in case of KVM_S390_MEMOP_F_CHECK_ONLY), the ioctl returns a positive error number indicating the type of exception. This exception is also raised directly at the corresponding VCPU if the flag KVM_S390_MEMOP_F_INJECT_EXCEPTION is set. On protection exceptions, unless specified otherwise, the injected translation-exception identifier (TEID) indicates suppression.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj=hhubh)}(hX7If the KVM_S390_MEMOP_F_SKEY_PROTECTION flag is set, storage key protection is also in effect and may cause exceptions if accesses are prohibited given the access key designated by "key"; the valid range is 0..15. KVM_S390_MEMOP_F_SKEY_PROTECTION is available if KVM_CAP_S390_MEM_OP_EXTENSION is > 0. Since the accessed memory may span multiple pages and those pages might have different storage keys, it is possible that a protection exception occurs after memory has been modified. In this case, if the exception is injected, the TEID does not indicate suppression.h]hX;If the KVM_S390_MEMOP_F_SKEY_PROTECTION flag is set, storage key protection is also in effect and may cause exceptions if accesses are prohibited given the access key designated by “key”; the valid range is 0..15. KVM_S390_MEMOP_F_SKEY_PROTECTION is available if KVM_CAP_S390_MEM_OP_EXTENSION is > 0. Since the accessed memory may span multiple pages and those pages might have different storage keys, it is possible that a protection exception occurs after memory has been modified. In this case, if the exception is injected, the TEID does not indicate suppression.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj=hhubeh}(h]logical-read-writeah ]h"]logical read/write:ah$]h&]uh1hhjhhhhhM5ubh)}(hhh](h)}(hAbsolute read/write:h]hAbsolute read/write:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhM[ubh)}(hX|Access absolute memory. This operation is intended to be used with the KVM_S390_MEMOP_F_SKEY_PROTECTION flag, to allow accessing memory and performing the checks required for storage key protection as one operation (as opposed to user space getting the storage keys, performing the checks, and accessing memory thereafter, which could lead to a delay between check and access). Absolute accesses are permitted for the VM ioctl if KVM_CAP_S390_MEM_OP_EXTENSION has the KVM_S390_MEMOP_EXTENSION_CAP_BASE bit set. Currently absolute accesses are not permitted for VCPU ioctls. Absolute accesses are permitted for non-protected guests only.h]hX|Access absolute memory. This operation is intended to be used with the KVM_S390_MEMOP_F_SKEY_PROTECTION flag, to allow accessing memory and performing the checks required for storage key protection as one operation (as opposed to user space getting the storage keys, performing the checks, and accessing memory thereafter, which could lead to a delay between check and access). Absolute accesses are permitted for the VM ioctl if KVM_CAP_S390_MEM_OP_EXTENSION has the KVM_S390_MEMOP_EXTENSION_CAP_BASE bit set. Currently absolute accesses are not permitted for VCPU ioctls. Absolute accesses are permitted for non-protected guests only.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hj"hhubj)}(hhh]j)}(hZSupported flags: * ``KVM_S390_MEMOP_F_CHECK_ONLY`` * ``KVM_S390_MEMOP_F_SKEY_PROTECTION`` h](j)}(hSupported flags:h]hSupported flags:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMihjDubj)}(hhh]h)}(hhh](j)}(h``KVM_S390_MEMOP_F_CHECK_ONLY``h]h)}(hj^h]j)}(hj^h]hKVM_S390_MEMOP_F_CHECK_ONLY}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1hhhhMhhj\ubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(h%``KVM_S390_MEMOP_F_SKEY_PROTECTION`` h]h)}(h$``KVM_S390_MEMOP_F_SKEY_PROTECTION``h]j)}(hjh]h KVM_S390_MEMOP_F_SKEY_PROTECTION}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMihj|ubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]jj uh1hhhhMhhjVubah}(h]h ]h"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]uh1jhhhMihjAubah}(h]h ]h"]h$]h&]uh1jhj"hhhNhNubh)}(hTThe semantics of the flags common with logical accesses are as for logical accesses.h]hTThe semantics of the flags common with logical accesses are as for logical accesses.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj"hhubeh}(h]absolute-read-writeah ]h"]absolute read/write:ah$]h&]uh1hhjhhhhhM[ubh)}(hhh](h)}(hAbsolute cmpxchg:h]hAbsolute cmpxchg:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMoubh)}(hXPerform cmpxchg on absolute guest memory. Intended for use with the KVM_S390_MEMOP_F_SKEY_PROTECTION flag. Instead of doing an unconditional write, the access occurs only if the target location contains the value pointed to by "old_addr". This is performed as an atomic cmpxchg with the length specified by the "size" parameter. "size" must be a power of two up to and including 16. If the exchange did not take place because the target value doesn't match the old value, the value "old_addr" points to is replaced by the target value. User space can tell if an exchange took place by checking if this replacement occurred. The cmpxchg op is permitted for the VM ioctl if KVM_CAP_S390_MEM_OP_EXTENSION has flag KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG set.h]hXPerform cmpxchg on absolute guest memory. Intended for use with the KVM_S390_MEMOP_F_SKEY_PROTECTION flag. Instead of doing an unconditional write, the access occurs only if the target location contains the value pointed to by “old_addr”. This is performed as an atomic cmpxchg with the length specified by the “size” parameter. “size” must be a power of two up to and including 16. If the exchange did not take place because the target value doesn’t match the old value, the value “old_addr” points to is replaced by the target value. User space can tell if an exchange took place by checking if this replacement occurred. The cmpxchg op is permitted for the VM ioctl if KVM_CAP_S390_MEM_OP_EXTENSION has flag KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjhhubj)}(hhh]j)}(h8Supported flags: * ``KVM_S390_MEMOP_F_SKEY_PROTECTION`` h](j)}(hSupported flags:h]hSupported flags:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM~hjubj)}(hhh]h)}(hhh]j)}(h%``KVM_S390_MEMOP_F_SKEY_PROTECTION`` h]h)}(h$``KVM_S390_MEMOP_F_SKEY_PROTECTION``h]j)}(hj h]h KVM_S390_MEMOP_F_SKEY_PROTECTION}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhM~hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jj uh1hhhhM~hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM~hjubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubeh}(h]absolute-cmpxchgah ]h"]absolute cmpxchg:ah$]h&]uh1hhjhhhhhMoubh)}(hhh](h)}(hSIDA read/write:h]hSIDA read/write:}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhMubh)}(hX?Access the secure instruction data area which contains memory operands necessary for instruction emulation for protected guests. SIDA accesses are available if the KVM_CAP_S390_PROTECTED capability is available. SIDA accesses are permitted for the VCPU ioctl only. SIDA accesses are permitted for protected guests only.h]hX?Access the secure instruction data area which contains memory operands necessary for instruction emulation for protected guests. SIDA accesses are available if the KVM_CAP_S390_PROTECTED capability is available. SIDA accesses are permitted for the VCPU ioctl only. SIDA accesses are permitted for protected guests only.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubh)}(hNo flags are supported.h]hNo flags are supported.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubeh}(h]sida-read-writeah ]h"]sida read/write:ah$]h&]uh1hhjhhhhhMubeh}(h]kvm-s390-mem-opah ]h"]4.89 kvm_s390_mem_opah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.90 KVM_S390_GET_SKEYSh]h4.90 KVM_S390_GET_SKEYS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_S390_SKEYSh]h)}(hjh]hKVM_CAP_S390_SKEYS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(hstruct kvm_s390_skeysh]h)}(hj4h]hstruct kvm_s390_skeys}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjOhhhKubjy)}(hb0 on success, KVM_S390_GET_SKEYS_NONE if guest is not using storage keys, negative value on error h]h)}(ha0 on success, KVM_S390_GET_SKEYS_NONE if guest is not using storage keys, negative value on errorh]ha0 on success, KVM_S390_GET_SKEYS_NONE if guest is not using storage keys, negative value on error}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`ubah}(h]h ]h"]h$]h&]uh1jxhjOubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hThis ioctl is used to get guest storage key values on the s390 architecture. The ioctl takes parameters via the kvm_s390_skeys struct::h]hThis ioctl is used to get guest storage key values on the s390 architecture. The ioctl takes parameters via the kvm_s390_skeys struct:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(hstruct kvm_s390_skeys { __u64 start_gfn; __u64 count; __u64 skeydata_addr; __u32 flags; __u32 reserved[9]; };h]hstruct kvm_s390_skeys { __u64 start_gfn; __u64 count; __u64 skeydata_addr; __u32 flags; __u32 reserved[9]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(h^The start_gfn field is the number of the first guest frame whose storage keys you want to get.h]h^The start_gfn field is the number of the first guest frame whose storage keys you want to get.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX The count field is the number of consecutive frames (starting from start_gfn) whose storage keys to get. The count field must be at least 1 and the maximum allowed value is defined as KVM_S390_SKEYS_MAX. Values outside this range will cause the ioctl to return -EINVAL.h]hX The count field is the number of consecutive frames (starting from start_gfn) whose storage keys to get. The count field must be at least 1 and the maximum allowed value is defined as KVM_S390_SKEYS_MAX. Values outside this range will cause the ioctl to return -EINVAL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe skeydata_addr field is the address to a buffer large enough to hold count bytes. This buffer will be filled with storage key data by the ioctl.h]hThe skeydata_addr field is the address to a buffer large enough to hold count bytes. This buffer will be filled with storage key data by the ioctl.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-s390-get-skeysah ]h"]4.90 kvm_s390_get_skeysah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.91 KVM_S390_SET_SKEYSh]h4.91 KVM_S390_SET_SKEYS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_S390_SKEYSh]h)}(hjh]hKVM_CAP_S390_SKEYS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390h]h)}(hj'h]hs390}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hvm ioctlh]h)}(hjUh]hvm ioctl}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(hstruct kvm_s390_skeysh]h)}(hjh]hstruct kvm_s390_skeys}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h&0 on success, negative value on error h]h)}(h%0 on success, negative value on errorh]h%0 on success, negative value on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hThis ioctl is used to set guest storage key values on the s390 architecture. The ioctl takes parameters via the kvm_s390_skeys struct. See section on KVM_S390_GET_SKEYS for struct definition.h]hThis ioctl is used to set guest storage key values on the s390 architecture. The ioctl takes parameters via the kvm_s390_skeys struct. See section on KVM_S390_GET_SKEYS for struct definition.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h^The start_gfn field is the number of the first guest frame whose storage keys you want to set.h]h^The start_gfn field is the number of the first guest frame whose storage keys you want to set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX The count field is the number of consecutive frames (starting from start_gfn) whose storage keys to get. The count field must be at least 1 and the maximum allowed value is defined as KVM_S390_SKEYS_MAX. Values outside this range will cause the ioctl to return -EINVAL.h]hX The count field is the number of consecutive frames (starting from start_gfn) whose storage keys to get. The count field must be at least 1 and the maximum allowed value is defined as KVM_S390_SKEYS_MAX. Values outside this range will cause the ioctl to return -EINVAL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe skeydata_addr field is the address to a buffer containing count bytes of storage keys. Each byte in the buffer will be set as the storage key for a single frame starting at start_gfn for count frames.h]hThe skeydata_addr field is the address to a buffer containing count bytes of storage keys. Each byte in the buffer will be set as the storage key for a single frame starting at start_gfn for count frames.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hmNote: If any architecturally invalid key value is found in the given data then the ioctl will return -EINVAL.h]hmNote: If any architecturally invalid key value is found in the given data then the ioctl will return -EINVAL.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-s390-set-skeysah ]h"]4.91 kvm_s390_set_skeysah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.92 KVM_S390_IRQh]h4.92 KVM_S390_IRQ}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(hKVM_CAP_S390_INJECT_IRQh]h)}(hjHh]hKVM_CAP_S390_INJECT_IRQ}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjchhhKubjy)}(hs390h]h)}(hjvh]hs390}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjtubah}(h]h ]h"]h$]h&]uh1jxhjcubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_s390_irq (in)h]h)}(hjh]hstruct kvm_s390_irq (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubeh}(h]h ]h"]h$]h&]uh1j^hj!hhhhhMubh)}(hErrors:h]hErrors:}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!hhubh)}(hXK====== ================================================================= EINVAL interrupt type is invalid type is KVM_S390_SIGP_STOP and flag parameter is invalid value, type is KVM_S390_INT_EXTERNAL_CALL and code is bigger than the maximum of VCPUs EBUSY type is KVM_S390_SIGP_SET_PREFIX and vcpu is not stopped, type is KVM_S390_SIGP_STOP and a stop irq is already pending, type is KVM_S390_INT_EXTERNAL_CALL and an external call interrupt is already pending ====== ================================================================= h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj7ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKAuh1jOhj7ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEINVALh]hEINVAL}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1johjQubjp)}(hhh]h)}(hinterrupt type is invalid type is KVM_S390_SIGP_STOP and flag parameter is invalid value, type is KVM_S390_INT_EXTERNAL_CALL and code is bigger than the maximum of VCPUsh]hinterrupt type is invalid type is KVM_S390_SIGP_STOP and flag parameter is invalid value, type is KVM_S390_INT_EXTERNAL_CALL and code is bigger than the maximum of VCPUs}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjkubah}(h]h ]h"]h$]h&]uh1johjQubeh}(h]h ]h"]h$]h&]uh1jjhjNubjk)}(hhh](jp)}(hhh]h)}(hEBUSYh]hEBUSY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(htype is KVM_S390_SIGP_SET_PREFIX and vcpu is not stopped, type is KVM_S390_SIGP_STOP and a stop irq is already pending, type is KVM_S390_INT_EXTERNAL_CALL and an external call interrupt is already pendingh]htype is KVM_S390_SIGP_SET_PREFIX and vcpu is not stopped, type is KVM_S390_SIGP_STOP and a stop irq is already pending, type is KVM_S390_INT_EXTERNAL_CALL and an external call interrupt is already pending}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjNubeh}(h]h ]h"]h$]h&]uh1jehj7ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj4ubah}(h]h ]h"]h$]h&]uh1jEhj0ubah}(h]h ]h"]h$]h&]uh1hhhhMhj!hhubh)}(h+Allows to inject an interrupt to the guest.h]h+Allows to inject an interrupt to the guest.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!hhubh)}(hzUsing struct kvm_s390_irq as a parameter allows to inject additional payload which is not possible via KVM_S390_INTERRUPT.h]hzUsing struct kvm_s390_irq as a parameter allows to inject additional payload which is not possible via KVM_S390_INTERRUPT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!hhubh)}(h2Interrupt parameters are passed via kvm_s390_irq::h]h1Interrupt parameters are passed via kvm_s390_irq:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!hhubj$)}(hXstruct kvm_s390_irq { __u64 type; union { struct kvm_s390_io_info io; struct kvm_s390_ext_info ext; struct kvm_s390_pgm_info pgm; struct kvm_s390_emerg_info emerg; struct kvm_s390_extcall_info extcall; struct kvm_s390_prefix_info prefix; struct kvm_s390_stop_info stop; struct kvm_s390_mchk_info mchk; char reserved[64]; } u; };h]hXstruct kvm_s390_irq { __u64 type; union { struct kvm_s390_io_info io; struct kvm_s390_ext_info ext; struct kvm_s390_pgm_info pgm; struct kvm_s390_emerg_info emerg; struct kvm_s390_extcall_info extcall; struct kvm_s390_prefix_info prefix; struct kvm_s390_stop_info stop; struct kvm_s390_mchk_info mchk; char reserved[64]; } u; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj!hhubh)}(h!type can be one of the following:h]h!type can be one of the following:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!hhubh)}(hhh](j)}(h2KVM_S390_SIGP_STOP - sigp stop; parameter in .stoph]h)}(hj#h]h2KVM_S390_SIGP_STOP - sigp stop; parameter in .stop}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h8KVM_S390_PROGRAM_INT - program check; parameters in .pgmh]h)}(hj:h]h8KVM_S390_PROGRAM_INT - program check; parameters in .pgm}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hAKVM_S390_SIGP_SET_PREFIX - sigp set prefix; parameters in .prefixh]h)}(hjQh]hAKVM_S390_SIGP_SET_PREFIX - sigp set prefix; parameters in .prefix}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h)KVM_S390_RESTART - restart; no parametersh]h)}(hjhh]h)KVM_S390_RESTART - restart; no parameters}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hCKVM_S390_INT_CLOCK_COMP - clock comparator interrupt; no parametersh]h)}(hjh]hCKVM_S390_INT_CLOCK_COMP - clock comparator interrupt; no parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h;KVM_S390_INT_CPU_TIMER - CPU timer interrupt; no parametersh]h)}(hjh]h;KVM_S390_INT_CPU_TIMER - CPU timer interrupt; no parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h=KVM_S390_INT_EMERGENCY - sigp emergency; parameters in .emergh]h)}(hjh]h=KVM_S390_INT_EMERGENCY - sigp emergency; parameters in .emerg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hGKVM_S390_INT_EXTERNAL_CALL - sigp external call; parameters in .extcallh]h)}(hjh]hGKVM_S390_INT_EXTERNAL_CALL - sigp external call; parameters in .extcall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h=KVM_S390_MCHK - machine check interrupt; parameters in .mchk h]h)}(h= number of bytes copied into buffer, -EINVAL if buffer size is 0, -ENOBUFS if buffer size is too small to fit all pending interrupts, -EFAULT if the buffer address was invalid h]h)}(h>= number of bytes copied into buffer, -EINVAL if buffer size is 0, -ENOBUFS if buffer size is too small to fit all pending interrupts, -EFAULT if the buffer address was invalidh]h>= number of bytes copied into buffer, -EINVAL if buffer size is 0, -ENOBUFS if buffer size is too small to fit all pending interrupts, -EFAULT if the buffer address was invalid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhMubh)}(hThis ioctl allows userspace to retrieve the complete state of all currently pending interrupts in a single buffer. Use cases include migration and introspection. The parameter structure contains the address of a userspace buffer and its length::h]hThis ioctl allows userspace to retrieve the complete state of all currently pending interrupts in a single buffer. Use cases include migration and introspection. The parameter structure contains the address of a userspace buffer and its length:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj$)}(hstruct kvm_s390_irq_state { __u64 buf; __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; __u32 reserved[4]; /* will stay unused for compatibility reasons */ };h]hstruct kvm_s390_irq_state { __u64 buf; __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; __u32 reserved[4]; /* will stay unused for compatibility reasons */ };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj hhubh)}(h{Userspace passes in the above struct and for each pending interrupt a struct kvm_s390_irq is copied to the provided buffer.h]h{Userspace passes in the above struct and for each pending interrupt a struct kvm_s390_irq is copied to the provided buffer.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hThe structure contains a flags and a reserved field for future extensions. As the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and reserved, these fields can not be used in the future without breaking compatibility.h]hThe structure contains a flags and a reserved field for future extensions. As the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and reserved, these fields can not be used in the future without breaking compatibility.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hgIf -ENOBUFS is returned the buffer provided was too small and userspace may retry with a bigger buffer.h]hgIf -ENOBUFS is returned the buffer provided was too small and userspace may retry with a bigger buffer.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj hhubeh}(h]kvm-s390-get-irq-stateah ]h"]4.94 kvm_s390_get_irq_stateah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.95 KVM_S390_SET_IRQ_STATEh]h4.95 KVM_S390_SET_IRQ_STATE}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hhhhhM'ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(hKVM_CAP_S390_IRQ_STATEh]h)}(hjh]hKVM_CAP_S390_IRQ_STATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhM)hjmhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM*hjmhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM+hjmhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_s390_irq_state (in)h]h)}(hj h]hstruct kvm_s390_irq_state (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM,hjmhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(hhhKubjy)}(h0 on success, -EFAULT if the buffer address was invalid, -EINVAL for an invalid buffer length (see below), -EBUSY if there were already interrupts pending, errors occurring when actually injecting the interrupt. See KVM_S390_IRQ. h]h)}(h0 on success, -EFAULT if the buffer address was invalid, -EINVAL for an invalid buffer length (see below), -EBUSY if there were already interrupts pending, errors occurring when actually injecting the interrupt. See KVM_S390_IRQ.h]h0 on success, -EFAULT if the buffer address was invalid, -EINVAL for an invalid buffer length (see below), -EBUSY if there were already interrupts pending, errors occurring when actually injecting the interrupt. See KVM_S390_IRQ.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj9ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhM-hjmhhubeh}(h]h ]h"]h$]h&]uh1j^hj\hhhhhM)ubh)}(hXThis ioctl allows userspace to set the complete state of all cpu-local interrupts currently pending for the vcpu. It is intended for restoring interrupt state after a migration. The input parameter is a userspace buffer containing a struct kvm_s390_irq_state::h]hXThis ioctl allows userspace to set the complete state of all cpu-local interrupts currently pending for the vcpu. It is intended for restoring interrupt state after a migration. The input parameter is a userspace buffer containing a struct kvm_s390_irq_state:}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj\hhubj$)}(hstruct kvm_s390_irq_state { __u64 buf; __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; __u32 reserved[4]; /* will stay unused for compatibility reasons */ };h]hstruct kvm_s390_irq_state { __u64 buf; __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; __u32 reserved[4]; /* will stay unused for compatibility reasons */ };}hjksbah}(h]h ]h"]h$]h&]hhuh1j#hhhM9hj\hhubh)}(hSThe restrictions for flags and reserved apply as well. (see KVM_S390_GET_IRQ_STATE)h]hSThe restrictions for flags and reserved apply as well. (see KVM_S390_GET_IRQ_STATE)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj\hhubh)}(hThe userspace memory referenced by buf contains a struct kvm_s390_irq for each interrupt to be injected into the guest. If one of the interrupts could not be injected for some reason the ioctl aborts.h]hThe userspace memory referenced by buf contains a struct kvm_s390_irq for each interrupt to be injected into the guest. If one of the interrupts could not be injected for some reason the ioctl aborts.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj\hhubh)}(hlen must be a multiple of sizeof(struct kvm_s390_irq). It must be > 0 and it must not exceed (max_vcpus + 32) * sizeof(struct kvm_s390_irq), which is the maximum number of possibly pending cpu-local interrupts.h]hlen must be a multiple of sizeof(struct kvm_s390_irq). It must be > 0 and it must not exceed (max_vcpus + 32) * sizeof(struct kvm_s390_irq), which is the maximum number of possibly pending cpu-local interrupts.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj\hhubeh}(h]kvm-s390-set-irq-stateah ]h"]4.95 kvm_s390_set_irq_stateah$]h&]uh1hhjhhhhhM'ubh)}(hhh](h)}(h 4.96 KVM_SMIh]h 4.96 KVM_SMI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_X86_SMMh]h)}(hjh]hKVM_CAP_X86_SMM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMOhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMPhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hj.h]h vcpu ioctl}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj,ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMQhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjIhhhKubjy)}(hnoneh]h)}(hj\h]hnone}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjZubah}(h]h ]h"]h$]h&]uh1jxhjIubeh}(h]h ]h"]h$]h&]uh1jchhhMRhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjubah}(h]h ]h"]h$]h&]uh1jxhjwubeh}(h]h ]h"]h$]h&]uh1jchhhMShjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMOubh)}(h#Queues an SMI on the thread's vcpu.h]h%Queues an SMI on the thread’s vcpu.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjhhubeh}(h]kvm-smiah ]h"] 4.96 kvm_smiah$]h&]uh1hhjhhhhhMMubh)}(hhh](h)}(h4.97 KVM_X86_SET_MSR_FILTERh]h4.97 KVM_X86_SET_MSR_FILTER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMXubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_X86_MSR_FILTERh]h)}(hjh]hKVM_CAP_X86_MSR_FILTER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMZhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM[hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj2hhhKubjy)}(hvm ioctlh]h)}(hjEh]hvm ioctl}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjCubah}(h]h ]h"]h$]h&]uh1jxhj2ubeh}(h]h ]h"]h$]h&]uh1jchhhM\hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj`hhhKubjy)}(hstruct kvm_msr_filterh]h)}(hjsh]hstruct kvm_msr_filter}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjqubah}(h]h ]h"]h$]h&]uh1jxhj`ubeh}(h]h ]h"]h$]h&]uh1jchhhM]hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM^hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMZubj$)}(hX)struct kvm_msr_filter_range { #define KVM_MSR_FILTER_READ (1 << 0) #define KVM_MSR_FILTER_WRITE (1 << 1) __u32 flags; __u32 nmsrs; /* number of msrs in bitmap */ __u32 base; /* MSR index the bitmap starts at */ __u8 *bitmap; /* a 1 bit allows the operations in flags, 0 denies */ }; #define KVM_MSR_FILTER_MAX_RANGES 16 struct kvm_msr_filter { #define KVM_MSR_FILTER_DEFAULT_ALLOW (0 << 0) #define KVM_MSR_FILTER_DEFAULT_DENY (1 << 0) __u32 flags; struct kvm_msr_filter_range ranges[KVM_MSR_FILTER_MAX_RANGES]; };h]hX)struct kvm_msr_filter_range { #define KVM_MSR_FILTER_READ (1 << 0) #define KVM_MSR_FILTER_WRITE (1 << 1) __u32 flags; __u32 nmsrs; /* number of msrs in bitmap */ __u32 base; /* MSR index the bitmap starts at */ __u8 *bitmap; /* a 1 bit allows the operations in flags, 0 denies */ }; #define KVM_MSR_FILTER_MAX_RANGES 16 struct kvm_msr_filter { #define KVM_MSR_FILTER_DEFAULT_ALLOW (0 << 0) #define KVM_MSR_FILTER_DEFAULT_DENY (1 << 0) __u32 flags; struct kvm_msr_filter_range ranges[KVM_MSR_FILTER_MAX_RANGES]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMbhjhhubh)}(h1flags values for ``struct kvm_msr_filter_range``:h](hflags values for }(hjhhhNhNubj)}(h``struct kvm_msr_filter_range``h]hstruct kvm_msr_filter_range}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshjhhubh)}(h``KVM_MSR_FILTER_READ``h]j)}(hjh]hKVM_MSR_FILTER_READ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMuhjhhubh)}(hFilter read accesses to MSRs using the given bitmap. A 0 in the bitmap indicates that read accesses should be denied, while a 1 indicates that a read for a particular MSR should be allowed regardless of the default filter action. h]h)}(hFilter read accesses to MSRs using the given bitmap. A 0 in the bitmap indicates that read accesses should be denied, while a 1 indicates that a read for a particular MSR should be allowed regardless of the default filter action.h]hFilter read accesses to MSRs using the given bitmap. A 0 in the bitmap indicates that read accesses should be denied, while a 1 indicates that a read for a particular MSR should be allowed regardless of the default filter action.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjubah}(h]h ]h"]h$]h&]uh1hhhhMwhjhhubh)}(h``KVM_MSR_FILTER_WRITE``h]j)}(hj"h]hKVM_MSR_FILTER_WRITE}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhM|hjhhubh)}(hFilter write accesses to MSRs using the given bitmap. A 0 in the bitmap indicates that write accesses should be denied, while a 1 indicates that a write for a particular MSR should be allowed regardless of the default filter action. h]h)}(hFilter write accesses to MSRs using the given bitmap. A 0 in the bitmap indicates that write accesses should be denied, while a 1 indicates that a write for a particular MSR should be allowed regardless of the default filter action.h]hFilter write accesses to MSRs using the given bitmap. A 0 in the bitmap indicates that write accesses should be denied, while a 1 indicates that a write for a particular MSR should be allowed regardless of the default filter action.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hj7ubah}(h]h ]h"]h$]h&]uh1hhhhM~hjhhubh)}(h+flags values for ``struct kvm_msr_filter``:h](hflags values for }(hjOhhhNhNubj)}(h``struct kvm_msr_filter``h]hstruct kvm_msr_filter}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubh:}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h ``KVM_MSR_FILTER_DEFAULT_ALLOW``h]j)}(hjqh]hKVM_MSR_FILTER_DEFAULT_ALLOW}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hrIf no filter range matches an MSR index that is getting accessed, KVM will allow accesses to all MSRs by default. h]h)}(hqIf no filter range matches an MSR index that is getting accessed, KVM will allow accesses to all MSRs by default.h]hqIf no filter range matches an MSR index that is getting accessed, KVM will allow accesses to all MSRs by default.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h``KVM_MSR_FILTER_DEFAULT_DENY``h]j)}(hjh]hKVM_MSR_FILTER_DEFAULT_DENY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hqIf no filter range matches an MSR index that is getting accessed, KVM will deny accesses to all MSRs by default. h]h)}(hpIf no filter range matches an MSR index that is getting accessed, KVM will deny accesses to all MSRs by default.h]hpIf no filter range matches an MSR index that is getting accessed, KVM will deny accesses to all MSRs by default.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXThis ioctl allows userspace to define up to 16 bitmaps of MSR ranges to deny guest MSR accesses that would normally be allowed by KVM. If an MSR is not covered by a specific range, the "default" filtering behavior applies. Each bitmap range covers MSRs from [base .. base+nmsrs).h]hXThis ioctl allows userspace to define up to 16 bitmaps of MSR ranges to deny guest MSR accesses that would normally be allowed by KVM. If an MSR is not covered by a specific range, the “default” filtering behavior applies. Each bitmap range covers MSRs from [base .. base+nmsrs).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXGIf an MSR access is denied by userspace, the resulting KVM behavior depends on whether or not KVM_CAP_X86_USER_SPACE_MSR's KVM_MSR_EXIT_REASON_FILTER is enabled. If KVM_MSR_EXIT_REASON_FILTER is enabled, KVM will exit to userspace on denied accesses, i.e. userspace effectively intercepts the MSR access. If KVM_MSR_EXIT_REASON_FILTER is not enabled, KVM will inject a #GP into the guest on denied accesses. Note, if an MSR access is denied during emulation of MSR load/stores during VMX transitions, KVM ignores KVM_MSR_EXIT_REASON_FILTER. See the below warning for full details.h]hXIIf an MSR access is denied by userspace, the resulting KVM behavior depends on whether or not KVM_CAP_X86_USER_SPACE_MSR’s KVM_MSR_EXIT_REASON_FILTER is enabled. If KVM_MSR_EXIT_REASON_FILTER is enabled, KVM will exit to userspace on denied accesses, i.e. userspace effectively intercepts the MSR access. If KVM_MSR_EXIT_REASON_FILTER is not enabled, KVM will inject a #GP into the guest on denied accesses. Note, if an MSR access is denied during emulation of MSR load/stores during VMX transitions, KVM ignores KVM_MSR_EXIT_REASON_FILTER. See the below warning for full details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX#If an MSR access is allowed by userspace, KVM will emulate and/or virtualize the access in accordance with the vCPU model. Note, KVM may still ultimately inject a #GP if an access is allowed by userspace, e.g. if KVM doesn't support the MSR, or to follow architectural behavior for the MSR.h]hX%If an MSR access is allowed by userspace, KVM will emulate and/or virtualize the access in accordance with the vCPU model. Note, KVM may still ultimately inject a #GP if an access is allowed by userspace, e.g. if KVM doesn’t support the MSR, or to follow architectural behavior for the MSR.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXBy default, KVM operates in KVM_MSR_FILTER_DEFAULT_ALLOW mode with no MSR range filters.h]hXBy default, KVM operates in KVM_MSR_FILTER_DEFAULT_ALLOW mode with no MSR range filters.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hCalling this ioctl with an empty set of ranges (all nmsrs == 0) disables MSR filtering. In that mode, ``KVM_MSR_FILTER_DEFAULT_DENY`` is invalid and causes an error.h](hfCalling this ioctl with an empty set of ranges (all nmsrs == 0) disables MSR filtering. In that mode, }(hjhhhNhNubj)}(h``KVM_MSR_FILTER_DEFAULT_DENY``h]hKVM_MSR_FILTER_DEFAULT_DENY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is invalid and causes an error.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj?)}(hX MSR accesses that are side effects of instruction execution (emulated or native) are not filtered as hardware does not honor MSR bitmaps outside of RDMSR and WRMSR, and KVM mimics that behavior when emulating instructions to avoid pointless divergence from hardware. E.g. RDPID reads MSR_TSC_AUX, SYSENTER reads the SYSENTER MSRs, etc. MSRs that are loaded/stored via dedicated VMCS fields are not filtered as part of VM-Enter/VM-Exit emulation. MSRs that are loaded/store via VMX's load/store lists _are_ filtered as part of VM-Enter/VM-Exit emulation. If an MSR access is denied on VM-Enter, KVM synthesizes a consistency check VM-Exit(EXIT_REASON_MSR_LOAD_FAIL). If an MSR access is denied on VM-Exit, KVM synthesizes a VM-Abort. In short, KVM extends Intel's architectural list of MSRs that cannot be loaded/saved via the VM-Enter/VM-Exit MSR list. It is platform owner's responsibility to to communicate any such restrictions to their end users. x2APIC MSR accesses cannot be filtered (KVM silently ignores filters that cover any x2APIC MSRs).h](h)}(hXPMSR accesses that are side effects of instruction execution (emulated or native) are not filtered as hardware does not honor MSR bitmaps outside of RDMSR and WRMSR, and KVM mimics that behavior when emulating instructions to avoid pointless divergence from hardware. E.g. RDPID reads MSR_TSC_AUX, SYSENTER reads the SYSENTER MSRs, etc.h]hXPMSR accesses that are side effects of instruction execution (emulated or native) are not filtered as hardware does not honor MSR bitmaps outside of RDMSR and WRMSR, and KVM mimics that behavior when emulating instructions to avoid pointless divergence from hardware. E.g. RDPID reads MSR_TSC_AUX, SYSENTER reads the SYSENTER MSRs, etc.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubh)}(hmMSRs that are loaded/stored via dedicated VMCS fields are not filtered as part of VM-Enter/VM-Exit emulation.h]hmMSRs that are loaded/stored via dedicated VMCS fields are not filtered as part of VM-Enter/VM-Exit emulation.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubh)}(hXMSRs that are loaded/store via VMX's load/store lists _are_ filtered as part of VM-Enter/VM-Exit emulation. If an MSR access is denied on VM-Enter, KVM synthesizes a consistency check VM-Exit(EXIT_REASON_MSR_LOAD_FAIL). If an MSR access is denied on VM-Exit, KVM synthesizes a VM-Abort. In short, KVM extends Intel's architectural list of MSRs that cannot be loaded/saved via the VM-Enter/VM-Exit MSR list. It is platform owner's responsibility to to communicate any such restrictions to their end users.h]hXMSRs that are loaded/store via VMX’s load/store lists _are_ filtered as part of VM-Enter/VM-Exit emulation. If an MSR access is denied on VM-Enter, KVM synthesizes a consistency check VM-Exit(EXIT_REASON_MSR_LOAD_FAIL). If an MSR access is denied on VM-Exit, KVM synthesizes a VM-Abort. In short, KVM extends Intel’s architectural list of MSRs that cannot be loaded/saved via the VM-Enter/VM-Exit MSR list. It is platform owner’s responsibility to to communicate any such restrictions to their end users.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubh)}(hax2APIC MSR accesses cannot be filtered (KVM silently ignores filters that cover any x2APIC MSRs).h]hax2APIC MSR accesses cannot be filtered (KVM silently ignores filters that cover any x2APIC MSRs).}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubeh}(h]h ]h"]h$]h&]uh1j?hjhhhhhNubh)}(hXNote, invoking this ioctl while a vCPU is running is inherently racy. However, KVM does guarantee that vCPUs will see either the previous filter or the new filter, e.g. MSRs with identical settings in both the old and new filter will have deterministic behavior.h]hXNote, invoking this ioctl while a vCPU is running is inherently racy. However, KVM does guarantee that vCPUs will see either the previous filter or the new filter, e.g. MSRs with identical settings in both the old and new filter will have deterministic behavior.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXSimilarly, if userspace wishes to intercept on denied accesses, KVM_MSR_EXIT_REASON_FILTER must be enabled before activating any filters, and left enabled until after all filters are deactivated. Failure to do so may result in KVM injecting a #GP instead of exiting to userspace.h]hXSimilarly, if userspace wishes to intercept on denied accesses, KVM_MSR_EXIT_REASON_FILTER must be enabled before activating any filters, and left enabled until after all filters are deactivated. Failure to do so may result in KVM injecting a #GP instead of exiting to userspace.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-x86-set-msr-filterah ]h"]4.97 kvm_x86_set_msr_filterah$]h&]uh1hhjhhhhhMXubh)}(hhh](h)}(h4.98 KVM_CREATE_SPAPR_TCE_64h]h4.98 KVM_CREATE_SPAPR_TCE_64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_SPAPR_TCE_64h]h)}(hjh]hKVM_CAP_SPAPR_TCE_64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)hhhKubjy)}(h#struct kvm_create_spapr_tce_64 (in)h]h)}(hj<h]h#struct kvm_create_spapr_tce_64 (in)}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:ubah}(h]h ]h"]h$]h&]uh1jxhj)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjWhhhKubjy)}(h7file descriptor for manipulating the created TCE table h]h)}(h6file descriptor for manipulating the created TCE tableh]h6file descriptor for manipulating the created TCE table}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhubah}(h]h ]h"]h$]h&]uh1jxhjWubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(htThis is an extension for KVM_CAP_SPAPR_TCE which only supports 32bit windows, described in 4.62 KVM_CREATE_SPAPR_TCEh]htThis is an extension for KVM_CAP_SPAPR_TCE which only supports 32bit windows, described in 4.62 KVM_CREATE_SPAPR_TCE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h9This capability uses extended struct in ioctl interface::h]h8This capability uses extended struct in ioctl interface:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(h/* for KVM_CAP_SPAPR_TCE_64 */ struct kvm_create_spapr_tce_64 { __u64 liobn; __u32 page_shift; __u32 flags; __u64 offset; /* in pages */ __u64 size; /* in pages */ };h]h/* for KVM_CAP_SPAPR_TCE_64 */ struct kvm_create_spapr_tce_64 { __u64 liobn; __u32 page_shift; __u32 flags; __u64 offset; /* in pages */ __u64 size; /* in pages */ };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(hXThe aim of extension is to support an additional bigger DMA window with a variable page size. KVM_CREATE_SPAPR_TCE_64 receives a 64bit window size, an IOMMU page shift and a bus offset of the corresponding DMA window, @size and @offset are numbers of IOMMU pages.h]hXThe aim of extension is to support an additional bigger DMA window with a variable page size. KVM_CREATE_SPAPR_TCE_64 receives a 64bit window size, an IOMMU page shift and a bus offset of the corresponding DMA window, @size and @offset are numbers of IOMMU pages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h"@flags are not used at the moment.h]h"@flags are not used at the moment.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h?The rest of functionality is identical to KVM_CREATE_SPAPR_TCE.h]h?The rest of functionality is identical to KVM_CREATE_SPAPR_TCE.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-create-spapr-tce-64ah ]h"]4.98 kvm_create_spapr_tce_64ah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.99 KVM_REINJECT_CONTROLh]h4.99 KVM_REINJECT_CONTROL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_REINJECT_CONTROLh]h)}(hjh]hKVM_CAP_REINJECT_CONTROL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj*hhhKubjy)}(hx86h]h)}(hj=h]hx86}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1jxhj*ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjXhhhKubjy)}(hvm ioctlh]h)}(hjkh]hvm ioctl}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjiubah}(h]h ]h"]h$]h&]uh1jxhjXubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h struct kvm_reinject_control (in)h]h)}(hjh]h struct kvm_reinject_control (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -EFAULT if struct kvm_reinject_control cannot be read, -ENXIO if KVM_CREATE_PIT or KVM_CREATE_PIT2 didn't succeed earlier. h]h)}(h0 on success, -EFAULT if struct kvm_reinject_control cannot be read, -ENXIO if KVM_CREATE_PIT or KVM_CREATE_PIT2 didn't succeed earlier.h]h0 on success, -EFAULT if struct kvm_reinject_control cannot be read, -ENXIO if KVM_CREATE_PIT or KVM_CREATE_PIT2 didn’t succeed earlier.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hXfi8254 (PIT) has two modes, reinject and !reinject. The default is reinject, where KVM queues elapsed i8254 ticks and monitors completion of interrupt from vector(s) that i8254 injects. Reinject mode dequeues a tick and injects its interrupt whenever there isn't a pending interrupt from i8254. !reinject mode injects an interrupt as soon as a tick arrives.h]hXhi8254 (PIT) has two modes, reinject and !reinject. The default is reinject, where KVM queues elapsed i8254 ticks and monitors completion of interrupt from vector(s) that i8254 injects. Reinject mode dequeues a tick and injects its interrupt whenever there isn’t a pending interrupt from i8254. !reinject mode injects an interrupt as soon as a tick arrives.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(hRstruct kvm_reinject_control { __u8 pit_reinject; __u8 reserved[31]; };h]hRstruct kvm_reinject_control { __u8 pit_reinject; __u8 reserved[31]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(hpit_reinject = 0 (!reinject mode) is recommended, unless running an old operating system that uses the PIT for timing (e.g. Linux 2.4.x).h]hpit_reinject = 0 (!reinject mode) is recommended, unless running an old operating system that uses the PIT for timing (e.g. Linux 2.4.x).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-reinject-controlah ]h"]4.99 kvm_reinject_controlah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.100 KVM_PPC_CONFIGURE_V3_MMUh]h4.100 KVM_PPC_CONFIGURE_V3_MMU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj/hhhKubjy)}(h0KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3h]h)}(hjBh]h0KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ubah}(h]h ]h"]h$]h&]uh1jxhj/ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj,hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj]hhhKubjy)}(hppch]h)}(hjph]hppc}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjnubah}(h]h ]h"]h$]h&]uh1jxhj]ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj,hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj,hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_ppc_mmuv3_cfg (in)h]h)}(hjh]hstruct kvm_ppc_mmuv3_cfg (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj,hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hj0 on success, -EFAULT if struct kvm_ppc_mmuv3_cfg cannot be read, -EINVAL if the configuration is invalid h]h)}(hi0 on success, -EFAULT if struct kvm_ppc_mmuv3_cfg cannot be read, -EINVAL if the configuration is invalidh]hi0 on success, -EFAULT if struct kvm_ppc_mmuv3_cfg cannot be read, -EINVAL if the configuration is invalid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj,hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hThis ioctl controls whether the guest will use radix or HPT (hashed page table) translation, and sets the pointer to the process table for the guest.h]hThis ioctl controls whether the guest will use radix or HPT (hashed page table) translation, and sets the pointer to the process table for the guest.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(hOstruct kvm_ppc_mmuv3_cfg { __u64 flags; __u64 process_table; };h]hOstruct kvm_ppc_mmuv3_cfg { __u64 flags; __u64 process_table; };}hj*sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(hXThere are two bits that can be set in flags; KVM_PPC_MMUV3_RADIX and KVM_PPC_MMUV3_GTSE. KVM_PPC_MMUV3_RADIX, if set, configures the guest to use radix tree translation, and if clear, to use HPT translation. KVM_PPC_MMUV3_GTSE, if set and if KVM permits it, configures the guest to be able to use the global TLB and SLB invalidation instructions; if clear, the guest may not use these instructions.h]hXThere are two bits that can be set in flags; KVM_PPC_MMUV3_RADIX and KVM_PPC_MMUV3_GTSE. KVM_PPC_MMUV3_RADIX, if set, configures the guest to use radix tree translation, and if clear, to use HPT translation. KVM_PPC_MMUV3_GTSE, if set and if KVM permits it, configures the guest to be able to use the global TLB and SLB invalidation instructions; if clear, the guest may not use these instructions.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe process_table field specifies the address and size of the guest process table, which is in the guest's space. This field is formatted as the second doubleword of the partition table entry, as defined in the Power ISA V3.00, Book III section 5.7.6.1.h]hXThe process_table field specifies the address and size of the guest process table, which is in the guest’s space. This field is formatted as the second doubleword of the partition table entry, as defined in the Power ISA V3.00, Book III section 5.7.6.1.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-ppc-configure-v3-mmuah ]h"]4.100 kvm_ppc_configure_v3_mmuah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.101 KVM_PPC_GET_RMMU_INFOh]h4.101 KVM_PPC_GET_RMMU_INFO}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hhhhhM'ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(hKVM_CAP_PPC_MMU_RADIXh]h)}(hjh]hKVM_CAP_PPC_MMU_RADIX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhM)hjmhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hppch]h)}(hjh]hppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM*hjmhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM+hjmhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_ppc_rmmu_info (out)h]h)}(hj h]hstruct kvm_ppc_rmmu_info (out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM,hjmhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(hhhKubjy)}(hv0 on success, -EFAULT if struct kvm_ppc_rmmu_info cannot be written, -EINVAL if no useful information can be returned h]h)}(hu0 on success, -EFAULT if struct kvm_ppc_rmmu_info cannot be written, -EINVAL if no useful information can be returnedh]hu0 on success, -EFAULT if struct kvm_ppc_rmmu_info cannot be written, -EINVAL if no useful information can be returned}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj9ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhM-hjmhhubeh}(h]h ]h"]h$]h&]uh1j^hj\hhhhhM)ubh)}(hThis ioctl returns a structure containing two things: (a) a list containing supported radix tree geometries, and (b) a list that maps page sizes to put in the "AP" (actual page size) field for the tlbie (TLB invalidate entry) instruction.h]hThis ioctl returns a structure containing two things: (a) a list containing supported radix tree geometries, and (b) a list that maps page sizes to put in the “AP” (actual page size) field for the tlbie (TLB invalidate entry) instruction.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj\hhubj$)}(hstruct kvm_ppc_rmmu_info { struct kvm_ppc_radix_geom { __u8 page_shift; __u8 level_bits[4]; __u8 pad[3]; } geometries[8]; __u32 ap_encodings[8]; };h]hstruct kvm_ppc_rmmu_info { struct kvm_ppc_radix_geom { __u8 page_shift; __u8 level_bits[4]; __u8 pad[3]; } geometries[8]; __u32 ap_encodings[8]; };}hjksbah}(h]h ]h"]h$]h&]hhuh1j#hhhM8hj\hhubh)}(hX2The geometries[] field gives up to 8 supported geometries for the radix page table, in terms of the log base 2 of the smallest page size, and the number of bits indexed at each level of the tree, from the PTE level up to the PGD level in that order. Any unused entries will have 0 in the page_shift field.h]hX2The geometries[] field gives up to 8 supported geometries for the radix page table, in terms of the log base 2 of the smallest page size, and the number of bits indexed at each level of the tree, from the PTE level up to the PGD level in that order. Any unused entries will have 0 in the page_shift field.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj\hhubh)}(hThe ap_encodings gives the supported page sizes and their AP field encodings, encoded with the AP value in the top 3 bits and the log base 2 of the page size in the bottom 6 bits.h]hThe ap_encodings gives the supported page sizes and their AP field encodings, encoded with the AP value in the top 3 bits and the log base 2 of the page size in the bottom 6 bits.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj\hhubeh}(h]kvm-ppc-get-rmmu-infoah ]h"]4.101 kvm_ppc_get_rmmu_infoah$]h&]uh1hhjhhhhhM'ubh)}(hhh](h)}(h 4.102 KVM_PPC_RESIZE_HPT_PREPAREh]h 4.102 KVM_PPC_RESIZE_HPT_PREPARE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMLubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_SPAPR_RESIZE_HPTh]h)}(hjh]hKVM_CAP_SPAPR_RESIZE_HPT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMNhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMOhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hvm ioctlh]h)}(hj h]hvm ioctl}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMPhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj;hhhKubjy)}(hstruct kvm_ppc_resize_hpt (in)h]h)}(hjNh]hstruct kvm_ppc_resize_hpt (in)}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjLubah}(h]h ]h"]h$]h&]uh1jxhj;ubeh}(h]h ]h"]h$]h&]uh1jchhhMQhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjihhhKubjy)}(hX%0 on successful completion, >0 if a new HPT is being prepared, the value is an estimated number of milliseconds until preparation is complete, -EFAULT if struct kvm_reinject_control cannot be read, -EINVAL if the supplied shift or flags are invalid, -ENOMEM if unable to allocate the new HPT, h]h)}(hX$0 on successful completion, >0 if a new HPT is being prepared, the value is an estimated number of milliseconds until preparation is complete, -EFAULT if struct kvm_reinject_control cannot be read, -EINVAL if the supplied shift or flags are invalid, -ENOMEM if unable to allocate the new HPT,h]hX$0 on successful completion, >0 if a new HPT is being prepared, the value is an estimated number of milliseconds until preparation is complete, -EFAULT if struct kvm_reinject_control cannot be read, -EINVAL if the supplied shift or flags are invalid, -ENOMEM if unable to allocate the new HPT,}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjzubah}(h]h ]h"]h$]h&]uh1jxhjiubeh}(h]h ]h"]h$]h&]uh1jchhhMRhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMNubh)}(hUsed to implement the PAPR extension for runtime resizing of a guest's Hashed Page Table (HPT). Specifically this starts, stops or monitors the preparation of a new potential HPT for the guest, essentially implementing the H_RESIZE_HPT_PREPARE hypercall.h]hXUsed to implement the PAPR extension for runtime resizing of a guest’s Hashed Page Table (HPT). Specifically this starts, stops or monitors the preparation of a new potential HPT for the guest, essentially implementing the H_RESIZE_HPT_PREPARE hypercall.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjhhubj$)}(hUstruct kvm_ppc_resize_hpt { __u64 flags; __u32 shift; __u32 pad; };h]hUstruct kvm_ppc_resize_hpt { __u64 flags; __u32 shift; __u32 pad; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM`hjhhubh)}(hIf called with shift > 0 when there is no pending HPT for the guest, this begins preparation of a new pending HPT of size 2^(shift) bytes. It then returns a positive integer with the estimated number of milliseconds until preparation is complete.h]hIf called with shift > 0 when there is no pending HPT for the guest, this begins preparation of a new pending HPT of size 2^(shift) bytes. It then returns a positive integer with the estimated number of milliseconds until preparation is complete.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjhhubh)}(hIf called when there is a pending HPT whose size does not match that requested in the parameters, discards the existing pending HPT and creates a new one as above.h]hIf called when there is a pending HPT whose size does not match that requested in the parameters, discards the existing pending HPT and creates a new one as above.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjhhubh)}(hBIf called when there is a pending HPT of the size requested, will:h]hBIf called when there is a pending HPT of the size requested, will:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjhhubh)}(hX.* If preparation of the pending HPT is already complete, return 0 * If preparation of the pending HPT has failed, return an error code, then discard the pending HPT. * If preparation of the pending HPT is still in progress, return an estimated number of milliseconds until preparation is complete. h]h)}(hhh](j)}(h?If preparation of the pending HPT is already complete, return 0h]h)}(hjh]h?If preparation of the pending HPT is already complete, return 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(haIf preparation of the pending HPT has failed, return an error code, then discard the pending HPT.h]h)}(haIf preparation of the pending HPT has failed, return an error code, then discard the pending HPT.h]haIf preparation of the pending HPT has failed, return an error code, then discard the pending HPT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hIf preparation of the pending HPT is still in progress, return an estimated number of milliseconds until preparation is complete. h]h)}(hIf preparation of the pending HPT is still in progress, return an estimated number of milliseconds until preparation is complete.h]hIf preparation of the pending HPT is still in progress, return an estimated number of milliseconds until preparation is complete.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jj uh1hhhhMqhjubah}(h]h ]h"]h$]h&]uh1hhhhMqhjhhubh)}(hwIf called with shift == 0, discards any currently pending HPT and returns 0 (i.e. cancels any in-progress preparation).h]hwIf called with shift == 0, discards any currently pending HPT and returns 0 (i.e. cancels any in-progress preparation).}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjhhubh)}(hfflags is reserved for future expansion, currently setting any bits in flags will result in an -EINVAL.h]hfflags is reserved for future expansion, currently setting any bits in flags will result in an -EINVAL.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjhhubh)}(hNormally this will be called repeatedly with the same parameters until it returns <= 0. The first call will initiate preparation, subsequent ones will monitor preparation until it completes or fails.h]hNormally this will be called repeatedly with the same parameters until it returns <= 0. The first call will initiate preparation, subsequent ones will monitor preparation until it completes or fails.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjhhubeh}(h]kvm-ppc-resize-hpt-prepareah ]h"] 4.102 kvm_ppc_resize_hpt_prepareah$]h&]uh1hhjhhhhhMLubh)}(hhh](h)}(h4.103 KVM_PPC_RESIZE_HPT_COMMITh]h4.103 KVM_PPC_RESIZE_HPT_COMMIT}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_SPAPR_RESIZE_HPTh]h)}(hjh]hKVM_CAP_SPAPR_RESIZE_HPT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_ppc_resize_hpt (in)h]h)}(hj!h]hstruct kvm_ppc_resize_hpt (in)}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<hhhKubjy)}(hX0 on successful completion, -EFAULT if struct kvm_reinject_control cannot be read, -EINVAL if the supplied shift or flags are invalid, -ENXIO is there is no pending HPT, or the pending HPT doesn't have the requested size, -EBUSY if the pending HPT is not fully prepared, -ENOSPC if there was a hash collision when moving existing HPT entries to the new HPT, -EIO on other error conditions h]h)}(hX0 on successful completion, -EFAULT if struct kvm_reinject_control cannot be read, -EINVAL if the supplied shift or flags are invalid, -ENXIO is there is no pending HPT, or the pending HPT doesn't have the requested size, -EBUSY if the pending HPT is not fully prepared, -ENOSPC if there was a hash collision when moving existing HPT entries to the new HPT, -EIO on other error conditionsh]hX0 on successful completion, -EFAULT if struct kvm_reinject_control cannot be read, -EINVAL if the supplied shift or flags are invalid, -ENXIO is there is no pending HPT, or the pending HPT doesn’t have the requested size, -EBUSY if the pending HPT is not fully prepared, -ENOSPC if there was a hash collision when moving existing HPT entries to the new HPT, -EIO on other error conditions}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMubah}(h]h ]h"]h$]h&]uh1jxhj<ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjphhhhhMubh)}(hUsed to implement the PAPR extension for runtime resizing of a guest's Hashed Page Table (HPT). Specifically this requests that the guest be transferred to working with the new HPT, essentially implementing the H_RESIZE_HPT_COMMIT hypercall.h]hUsed to implement the PAPR extension for runtime resizing of a guest’s Hashed Page Table (HPT). Specifically this requests that the guest be transferred to working with the new HPT, essentially implementing the H_RESIZE_HPT_COMMIT hypercall.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjphhubj$)}(hUstruct kvm_ppc_resize_hpt { __u64 flags; __u32 shift; __u32 pad; };h]hUstruct kvm_ppc_resize_hpt { __u64 flags; __u32 shift; __u32 pad; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjphhubh)}(hX This should only be called after KVM_PPC_RESIZE_HPT_PREPARE has returned 0 with the same parameters. In other cases KVM_PPC_RESIZE_HPT_COMMIT will return an error (usually -ENXIO or -EBUSY, though others may be possible if the preparation was started, but failed).h]hX This should only be called after KVM_PPC_RESIZE_HPT_PREPARE has returned 0 with the same parameters. In other cases KVM_PPC_RESIZE_HPT_COMMIT will return an error (usually -ENXIO or -EBUSY, though others may be possible if the preparation was started, but failed).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjphhubh)}(hThis will have undefined effects on the guest if it has not already placed itself in a quiescent state where no vcpu will make MMU enabled memory accesses.h]hThis will have undefined effects on the guest if it has not already placed itself in a quiescent state where no vcpu will make MMU enabled memory accesses.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjphhubh)}(htOn successful completion, the pending HPT will become the guest's active HPT and the previous HPT will be discarded.h]hvOn successful completion, the pending HPT will become the guest’s active HPT and the previous HPT will be discarded.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjphhubh)}(hBOn failure, the guest will still be operating on its previous HPT.h]hBOn failure, the guest will still be operating on its previous HPT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjphhubeh}(h]kvm-ppc-resize-hpt-commitah ]h"]4.103 kvm_ppc_resize_hpt_commitah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h#4.104 KVM_X86_GET_MCE_CAP_SUPPORTEDh]h#4.104 KVM_X86_GET_MCE_CAP_SUPPORTED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h KVM_CAP_MCEh]h)}(hjh]h KVM_CAP_MCE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hj"h]hx86}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=hhhKubjy)}(h system ioctlh]h)}(hjPh]h system ioctl}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubah}(h]h ]h"]h$]h&]uh1jxhj=ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjkhhhKubjy)}(hu64 mce_cap (out)h]h)}(hj~h]hu64 mce_cap (out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj|ubah}(h]h ]h"]h$]h&]uh1jxhjkubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hReturns supported MCE capabilities. The u64 mce_cap parameter has the same format as the MSR_IA32_MCG_CAP register. Supported capabilities will have the corresponding bits set.h]hReturns supported MCE capabilities. The u64 mce_cap parameter has the same format as the MSR_IA32_MCG_CAP register. Supported capabilities will have the corresponding bits set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-x86-get-mce-cap-supportedah ]h"]#4.104 kvm_x86_get_mce_cap_supportedah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.105 KVM_X86_SETUP_MCEh]h4.105 KVM_X86_SETUP_MCE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h KVM_CAP_MCEh]h)}(hj h]h KVM_CAP_MCE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj&hhhKubjy)}(hx86h]h)}(hj9h]hx86}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jxhj&ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjThhhKubjy)}(h vcpu ioctlh]h)}(hjgh]h vcpu ioctl}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjeubah}(h]h ]h"]h$]h&]uh1jxhjTubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hu64 mcg_cap (in)h]h)}(hjh]hu64 mcg_cap (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -EFAULT if u64 mcg_cap cannot be read, -EINVAL if the requested number of banks is invalid, -EINVAL if requested MCE capability is not supported. h]h)}(h0 on success, -EFAULT if u64 mcg_cap cannot be read, -EINVAL if the requested number of banks is invalid, -EINVAL if requested MCE capability is not supported.h]h0 on success, -EFAULT if u64 mcg_cap cannot be read, -EINVAL if the requested number of banks is invalid, -EINVAL if requested MCE capability is not supported.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hXYInitializes MCE support for use. The u64 mcg_cap parameter has the same format as the MSR_IA32_MCG_CAP register and specifies which capabilities should be enabled. The maximum supported number of error-reporting banks can be retrieved when checking for KVM_CAP_MCE. The supported capabilities can be retrieved with KVM_X86_GET_MCE_CAP_SUPPORTED.h]hXYInitializes MCE support for use. The u64 mcg_cap parameter has the same format as the MSR_IA32_MCG_CAP register and specifies which capabilities should be enabled. The maximum supported number of error-reporting banks can be retrieved when checking for KVM_CAP_MCE. The supported capabilities can be retrieved with KVM_X86_GET_MCE_CAP_SUPPORTED.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-x86-setup-mceah ]h"]4.105 kvm_x86_setup_mceah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.106 KVM_X86_SET_MCEh]h4.106 KVM_X86_SET_MCE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h KVM_CAP_MCEh]h)}(hj"h]h KVM_CAP_MCE}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=hhhKubjy)}(hx86h]h)}(hjPh]hx86}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubah}(h]h ]h"]h$]h&]uh1jxhj=ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(hTypeh]hType}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjkhhhKubjy)}(h vcpu ioctlh]h)}(hj~h]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj|ubah}(h]h ]h"]h$]h&]uh1jxhjkubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_x86_mce (in)h]h)}(hjh]hstruct kvm_x86_mce (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -EFAULT if struct kvm_x86_mce cannot be read, -EINVAL if the bank number is invalid, -EINVAL if VAL bit is not set in status field. h]h)}(h0 on success, -EFAULT if struct kvm_x86_mce cannot be read, -EINVAL if the bank number is invalid, -EINVAL if VAL bit is not set in status field.h]h0 on success, -EFAULT if struct kvm_x86_mce cannot be read, -EINVAL if the bank number is invalid, -EINVAL if VAL bit is not set in status field.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hKInject a machine check error (MCE) into the guest. The input parameter is::h]hJInject a machine check error (MCE) into the guest. The input parameter is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(hstruct kvm_x86_mce { __u64 status; __u64 addr; __u64 misc; __u64 mcg_status; __u8 bank; __u8 pad1[7]; __u64 pad2[3]; };h]hstruct kvm_x86_mce { __u64 status; __u64 addr; __u64 misc; __u64 mcg_status; __u8 bank; __u8 pad1[7]; __u64 pad2[3]; };}hj sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(hIf the MCE being reported is an uncorrected error, KVM will inject it as an MCE exception into the guest. If the guest MCG_STATUS register reports that an MCE is in progress, KVM causes an KVM_EXIT_SHUTDOWN vmexit.h]hIf the MCE being reported is an uncorrected error, KVM will inject it as an MCE exception into the guest. If the guest MCG_STATUS register reports that an MCE is in progress, KVM causes an KVM_EXIT_SHUTDOWN vmexit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hOtherwise, if the MCE is a corrected error, KVM will just store it in the corresponding bank (provided this bank is not holding a previously reported uncorrected error).h]hOtherwise, if the MCE is a corrected error, KVM will just store it in the corresponding bank (provided this bank is not holding a previously reported uncorrected error).}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-x86-set-mceah ]h"]4.106 kvm_x86_set_mceah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.107 KVM_S390_GET_CMMA_BITSh]h4.107 KVM_S390_GET_CMMA_BITS}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjPhhhKubjy)}(hKVM_CAP_S390_CMMA_MIGRATIONh]h)}(hjch]hKVM_CAP_S390_CMMA_MIGRATION}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaubah}(h]h ]h"]h$]h&]uh1jxhjPubeh}(h]h ]h"]h$]h&]uh1jchhhMhjMhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj~hhhKubjy)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhj~ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjMhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjMhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h"struct kvm_s390_cmma_log (in, out)h]h)}(hjh]h"struct kvm_s390_cmma_log (in, out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjMhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h(0 on success, a negative value on error h]h)}(h'0 on success, a negative value on errorh]h'0 on success, a negative value on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjMhhubeh}(h]h ]h"]h$]h&]uh1j^hj<hhhhhMubh)}(hErrors:h]hErrors:}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubh)}(hX_====== ============================================================= ENOMEM not enough memory can be allocated to complete the task ENXIO if CMMA is not enabled EINVAL if KVM_S390_CMMA_PEEK is not set but migration mode was not enabled EINVAL if KVM_S390_CMMA_PEEK is not set but dirty tracking has been disabled (and thus migration mode was automatically disabled) EFAULT if the userspace address is invalid or if no page table is present for the addresses (e.g. when using hugepages). ====== ============================================================= h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjRubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKCuh1jOhjRubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hENOMEMh]hENOMEM}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjoubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(h7not enough memory can be allocated to complete the taskh]h7not enough memory can be allocated to complete the task}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjlubeh}(h]h ]h"]h$]h&]uh1jjhjiubjk)}(hhh](jp)}(hhh]h)}(hENXIOh]hENXIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hif CMMA is not enabledh]hif CMMA is not enabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjiubjk)}(hhh](jp)}(hhh]h)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCif KVM_S390_CMMA_PEEK is not set but migration mode was not enabledh]hCif KVM_S390_CMMA_PEEK is not set but migration mode was not enabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjiubjk)}(hhh](jp)}(hhh]h)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hzif KVM_S390_CMMA_PEEK is not set but dirty tracking has been disabled (and thus migration mode was automatically disabled)h]hzif KVM_S390_CMMA_PEEK is not set but dirty tracking has been disabled (and thus migration mode was automatically disabled)}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjiubjk)}(hhh](jp)}(hhh]h)}(hEFAULTh]hEFAULT}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubah}(h]h ]h"]h$]h&]uh1johjHubjp)}(hhh]h)}(hqif the userspace address is invalid or if no page table is present for the addresses (e.g. when using hugepages).h]hqif the userspace address is invalid or if no page table is present for the addresses (e.g. when using hugepages).}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1johjHubeh}(h]h ]h"]h$]h&]uh1jjhjiubeh}(h]h ]h"]h$]h&]uh1jehjRubeh}(h]h ]h"]h$]h&]colsKuh1jJhjOubah}(h]h ]h"]h$]h&]uh1jEhjKubah}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubh)}(hxThis ioctl is used to get the values of the CMMA bits on the s390 architecture. It is meant to be used in two scenarios:h]hxThis ioctl is used to get the values of the CMMA bits on the s390 architecture. It is meant to be used in two scenarios:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubh)}(hhh](j)}(h~During live migration to save the CMMA values. Live migration needs to be enabled via the KVM_REQ_START_MIGRATION VM property.h]h)}(h~During live migration to save the CMMA values. Live migration needs to be enabled via the KVM_REQ_START_MIGRATION VM property.h]h~During live migration to save the CMMA values. Live migration needs to be enabled via the KVM_REQ_START_MIGRATION VM property.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hTTo non-destructively peek at the CMMA values, with the flag KVM_S390_CMMA_PEEK set. h]h)}(hSTo non-destructively peek at the CMMA values, with the flag KVM_S390_CMMA_PEEK set.h]hSTo non-destructively peek at the CMMA values, with the flag KVM_S390_CMMA_PEEK set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj<hhubh)}(hThe ioctl takes parameters via the kvm_s390_cmma_log struct. The desired values are written to a buffer whose location is indicated via the "values" member in the kvm_s390_cmma_log struct. The values in the input struct are also updated as needed.h]hThe ioctl takes parameters via the kvm_s390_cmma_log struct. The desired values are written to a buffer whose location is indicated via the “values” member in the kvm_s390_cmma_log struct. The values in the input struct are also updated as needed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj<hhubh)}(h"Each CMMA value takes up one byte.h]h"Each CMMA value takes up one byte.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubj$)}(hstruct kvm_s390_cmma_log { __u64 start_gfn; __u32 count; __u32 flags; union { __u64 remaining; __u64 mask; }; __u64 values; };h]hstruct kvm_s390_cmma_log { __u64 start_gfn; __u32 count; __u32 flags; union { __u64 remaining; __u64 mask; }; __u64 values; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj<hhubh)}(hWstart_gfn is the number of the first guest frame whose CMMA values are to be retrieved,h]hWstart_gfn is the number of the first guest frame whose CMMA values are to be retrieved,}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj<hhubh)}(h+count is the length of the buffer in bytes,h]h+count is the length of the buffer in bytes,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hj<hhubh)}(h@values points to the buffer where the result will be written to.h]h@values points to the buffer where the result will be written to.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hj<hhubh)}(hIf count is greater than KVM_S390_SKEYS_MAX, then it is considered to be KVM_S390_SKEYS_MAX. KVM_S390_SKEYS_MAX is re-used for consistency with other ioctls.h]hIf count is greater than KVM_S390_SKEYS_MAX, then it is considered to be KVM_S390_SKEYS_MAX. KVM_S390_SKEYS_MAX is re-used for consistency with other ioctls.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hj<hhubh)}(hThe result is written in the buffer pointed to by the field values, and the values of the input parameter are updated as follows.h]hThe result is written in the buffer pointed to by the field values, and the values of the input parameter are updated as follows.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj<hhubh)}(hnDepending on the flags, different actions are performed. The only supported flag so far is KVM_S390_CMMA_PEEK.h]hnDepending on the flags, different actions are performed. The only supported flag so far is KVM_S390_CMMA_PEEK.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj<hhubh)}(hThe default behaviour if KVM_S390_CMMA_PEEK is not set is: start_gfn will indicate the first page frame whose CMMA bits were dirty. It is not necessarily the same as the one passed as input, as clean pages are skipped.h]hThe default behaviour if KVM_S390_CMMA_PEEK is not set is: start_gfn will indicate the first page frame whose CMMA bits were dirty. It is not necessarily the same as the one passed as input, as clean pages are skipped.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hj<hhubh)}(hXcount will indicate the number of bytes actually written in the buffer. It can (and very often will) be smaller than the input value, since the buffer is only filled until 16 bytes of clean values are found (which are then not copied in the buffer). Since a CMMA migration block needs the base address and the length, for a total of 16 bytes, we will send back some clean data if there is some dirty data afterwards, as long as the size of the clean data does not exceed the size of the header. This allows to minimize the amount of data to be saved or transferred over the network at the expense of more roundtrips to userspace. The next invocation of the ioctl will skip over all the clean values, saving potentially more than just the 16 bytes we found.h]hXcount will indicate the number of bytes actually written in the buffer. It can (and very often will) be smaller than the input value, since the buffer is only filled until 16 bytes of clean values are found (which are then not copied in the buffer). Since a CMMA migration block needs the base address and the length, for a total of 16 bytes, we will send back some clean data if there is some dirty data afterwards, as long as the size of the clean data does not exceed the size of the header. This allows to minimize the amount of data to be saved or transferred over the network at the expense of more roundtrips to userspace. The next invocation of the ioctl will skip over all the clean values, saving potentially more than just the 16 bytes we found.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj<hhubh)}(hIf KVM_S390_CMMA_PEEK is set: the existing storage attributes are read even when not in migration mode, and no other action is performed;h]hIf KVM_S390_CMMA_PEEK is set: the existing storage attributes are read even when not in migration mode, and no other action is performed;}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj<hhubh)}(h:the output start_gfn will be equal to the input start_gfn,h]h:the output start_gfn will be equal to the input start_gfn,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj<hhubh)}(h`the output count will be equal to the input count, except if the end of memory has been reached.h]h`the output count will be equal to the input count, except if the end of memory has been reached.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj<hhubh)}(hIn both cases: the field "remaining" will indicate the total number of dirty CMMA values still remaining, or 0 if KVM_S390_CMMA_PEEK is set and migration mode is not enabled.h]hIn both cases: the field “remaining” will indicate the total number of dirty CMMA values still remaining, or 0 if KVM_S390_CMMA_PEEK is set and migration mode is not enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj<hhubh)}(hmask is unused.h]hmask is unused.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj<hhubh)}(hFvalues points to the userspace buffer where the result will be stored.h]hFvalues points to the userspace buffer where the result will be stored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj<hhubeh}(h]kvm-s390-get-cmma-bitsah ]h"]4.107 kvm_s390_get_cmma_bitsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.108 KVM_S390_SET_CMMA_BITSh]h4.108 KVM_S390_SET_CMMA_BITS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMVubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_S390_CMMA_MIGRATIONh]h)}(hjh]hKVM_CAP_S390_CMMA_MIGRATION}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMXhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390h]h)}(hj*h]hs390}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhj(ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMYhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(hvm ioctlh]h)}(hjXh]hvm ioctl}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjVubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMZhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjshhhKubjy)}(hstruct kvm_s390_cmma_log (in)h]h)}(hjh]hstruct kvm_s390_cmma_log (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjubah}(h]h ]h"]h$]h&]uh1jxhjsubeh}(h]h ]h"]h$]h&]uh1jchhhM[hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h(0 on success, a negative value on error h]h)}(h'0 on success, a negative value on errorh]h'0 on success, a negative value on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM\hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMXubh)}(hX%This ioctl is used to set the values of the CMMA bits on the s390 architecture. It is meant to be used during live migration to restore the CMMA values, but there are no restrictions on its use. The ioctl takes parameters via the kvm_s390_cmma_values struct. Each CMMA value takes up one byte.h]hX%This ioctl is used to set the values of the CMMA bits on the s390 architecture. It is meant to be used during live migration to restore the CMMA values, but there are no restrictions on its use. The ioctl takes parameters via the kvm_s390_cmma_values struct. Each CMMA value takes up one byte.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjhhubj$)}(hstruct kvm_s390_cmma_log { __u64 start_gfn; __u32 count; __u32 flags; union { __u64 remaining; __u64 mask; }; __u64 values; };h]hstruct kvm_s390_cmma_log { __u64 start_gfn; __u32 count; __u32 flags; union { __u64 remaining; __u64 mask; }; __u64 values; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMfhjhhubh)}(h4start_gfn indicates the starting guest frame number,h]h4start_gfn indicates the starting guest frame number,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjhhubh)}(hCcount indicates how many values are to be considered in the buffer,h]hCcount indicates how many values are to be considered in the buffer,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjhhubh)}(h flags is not used and must be 0.h]h flags is not used and must be 0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjhhubh)}(h5mask indicates which PGSTE bits are to be considered.h]h5mask indicates which PGSTE bits are to be considered.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjhhubh)}(hremaining is not used.h]hremaining is not used.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjhhubh)}(hCvalues points to the buffer in userspace where to store the values.h]hCvalues points to the buffer in userspace where to store the values.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjhhubh)}(hXThis ioctl can fail with -ENOMEM if not enough memory can be allocated to complete the task, with -ENXIO if CMMA is not enabled, with -EINVAL if the count field is too large (e.g. more than KVM_S390_CMMA_SIZE_MAX) or if the flags field was not 0, with -EFAULT if the userspace address is invalid, if invalid pages are written to (e.g. after the end of memory) or if no page table is present for the addresses (e.g. when using hugepages).h]hXThis ioctl can fail with -ENOMEM if not enough memory can be allocated to complete the task, with -ENXIO if CMMA is not enabled, with -EINVAL if the count field is too large (e.g. more than KVM_S390_CMMA_SIZE_MAX) or if the flags field was not 0, with -EFAULT if the userspace address is invalid, if invalid pages are written to (e.g. after the end of memory) or if no page table is present for the addresses (e.g. when using hugepages).}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjhhubeh}(h]kvm-s390-set-cmma-bitsah ]h"]4.108 kvm_s390_set_cmma_bitsah$]h&]uh1hhjhhhhhMVubh)}(hhh](h)}(h4.109 KVM_PPC_GET_CPU_CHARh]h4.109 KVM_PPC_GET_CPU_CHAR}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(hKVM_CAP_PPC_GET_CPU_CHARh]h)}(hjh]hKVM_CAP_PPC_GET_CPU_CHAR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhMhjmhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjmhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjmhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_ppc_cpu_char (out)h]h)}(hj h]hstruct kvm_ppc_cpu_char (out)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjmhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj( hhhKubjy)}(hQ0 on successful completion, -EFAULT if struct kvm_ppc_cpu_char cannot be written h]h)}(hP0 on successful completion, -EFAULT if struct kvm_ppc_cpu_char cannot be writtenh]hP0 on successful completion, -EFAULT if struct kvm_ppc_cpu_char cannot be written}(hj= hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9 ubah}(h]h ]h"]h$]h&]uh1jxhj( ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjmhhubeh}(h]h ]h"]h$]h&]uh1j^hj\hhhhhMubh)}(hXNThis ioctl gives userspace information about certain characteristics of the CPU relating to speculative execution of instructions and possible information leakage resulting from speculative execution (see CVE-2017-5715, CVE-2017-5753 and CVE-2017-5754). The information is returned in struct kvm_ppc_cpu_char, which looks like this::h]hXMThis ioctl gives userspace information about certain characteristics of the CPU relating to speculative execution of instructions and possible information leakage resulting from speculative execution (see CVE-2017-5715, CVE-2017-5753 and CVE-2017-5754). The information is returned in struct kvm_ppc_cpu_char, which looks like this:}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\hhubj$)}(hX6struct kvm_ppc_cpu_char { __u64 character; /* characteristics of the CPU */ __u64 behaviour; /* recommended software behaviour */ __u64 character_mask; /* valid bits in character */ __u64 behaviour_mask; /* valid bits in behaviour */ };h]hX6struct kvm_ppc_cpu_char { __u64 character; /* characteristics of the CPU */ __u64 behaviour; /* recommended software behaviour */ __u64 character_mask; /* valid bits in character */ __u64 behaviour_mask; /* valid bits in behaviour */ };}hjk sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj\hhubh)}(hX(For extensibility, the character_mask and behaviour_mask fields indicate which bits of character and behaviour have been filled in by the kernel. If the set of defined bits is extended in future then userspace will be able to tell whether it is running on a kernel that knows about the new bits.h]hX(For extensibility, the character_mask and behaviour_mask fields indicate which bits of character and behaviour have been filled in by the kernel. If the set of defined bits is extended in future then userspace will be able to tell whether it is running on a kernel that knows about the new bits.}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\hhubh)}(hXThe character field describes attributes of the CPU which can help with preventing inadvertent information disclosure - specifically, whether there is an instruction to flash-invalidate the L1 data cache (ori 30,30,0 or mtspr SPRN_TRIG2,rN), whether the L1 data cache is set to a mode where entries can only be used by the thread that created them, whether the bcctr[l] instruction prevents speculation, and whether a speculation barrier instruction (ori 31,31,0) is provided.h]hXThe character field describes attributes of the CPU which can help with preventing inadvertent information disclosure - specifically, whether there is an instruction to flash-invalidate the L1 data cache (ori 30,30,0 or mtspr SPRN_TRIG2,rN), whether the L1 data cache is set to a mode where entries can only be used by the thread that created them, whether the bcctr[l] instruction prevents speculation, and whether a speculation barrier instruction (ori 31,31,0) is provided.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\hhubh)}(hXThe behaviour field describes actions that software should take to prevent inadvertent information disclosure, and thus describes which vulnerabilities the hardware is subject to; specifically whether the L1 data cache should be flushed when returning to user mode from the kernel, and whether a speculation barrier should be placed between an array bounds check and the array access.h]hXThe behaviour field describes actions that software should take to prevent inadvertent information disclosure, and thus describes which vulnerabilities the hardware is subject to; specifically whether the L1 data cache should be flushed when returning to user mode from the kernel, and whether a speculation barrier should be placed between an array bounds check and the array access.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\hhubh)}(hYThese fields use the same bit definitions as the new H_GET_CPU_CHARACTERISTICS hypercall.h]hYThese fields use the same bit definitions as the new H_GET_CPU_CHARACTERISTICS hypercall.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\hhubeh}(h]kvm-ppc-get-cpu-charah ]h"]4.109 kvm_ppc_get_cpu_charah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.110 KVM_MEMORY_ENCRYPT_OPh]h4.110 KVM_MEMORY_ENCRYPT_OP}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hbasich]h)}(hj h]hbasic}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hx86h]h)}(hj h]hx86}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(hTypeh]hType}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj) hhhKubjy)}(hvm ioctl, vcpu ioctlh]h)}(hj< h]hvm ioctl, vcpu ioctl}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj: ubah}(h]h ]h"]h$]h&]uh1jxhj) ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjW hhhKubjy)}(h.an opaque platform specific structure (in/out)h]h)}(hjj h]h.an opaque platform specific structure (in/out)}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh ubah}(h]h ]h"]h$]h&]uh1jxhjW ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhMubh)}(hIf the platform supports creating encrypted VMs then this ioctl can be used for issuing platform-specific memory encryption commands to manage those encrypted VMs.h]hIf the platform supports creating encrypted VMs then this ioctl can be used for issuing platform-specific memory encryption commands to manage those encrypted VMs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hX:Currently, this ioctl is used for issuing both Secure Encrypted Virtualization (SEV) commands on AMD Processors and Trusted Domain Extensions (TDX) commands on Intel Processors. The detailed commands are defined in Documentation/virt/kvm/x86/amd-memory-encryption.rst and Documentation/virt/kvm/x86/intel-tdx.rst.h]hX:Currently, this ioctl is used for issuing both Secure Encrypted Virtualization (SEV) commands on AMD Processors and Trusted Domain Extensions (TDX) commands on Intel Processors. The detailed commands are defined in Documentation/virt/kvm/x86/amd-memory-encryption.rst and Documentation/virt/kvm/x86/intel-tdx.rst.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]kvm-memory-encrypt-opah ]h"]4.110 kvm_memory_encrypt_opah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h#4.111 KVM_MEMORY_ENCRYPT_REG_REGIONh]h#4.111 KVM_MEMORY_ENCRYPT_REG_REGION}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hbasich]h)}(hj h]hbasic}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hx86h]h)}(hj3 h]hx86}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1 ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(hTypeh]hType}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjN hhhKubjy)}(hsystemh]h)}(hja h]hsystem}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ ubah}(h]h ]h"]h$]h&]uh1jxhjN ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj| hhhKubjy)}(hstruct kvm_enc_region (in)h]h)}(hj h]hstruct kvm_enc_region (in)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj| ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhMubh)}(hvThis ioctl can be used to register a guest memory region which may contain encrypted data (e.g. guest RAM, SMRAM etc).h]hvThis ioctl can be used to register a guest memory region which may contain encrypted data (e.g. guest RAM, SMRAM etc).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXIt is used in the SEV-enabled guest. When encryption is enabled, a guest memory region may contain encrypted data. The SEV memory encryption engine uses a tweak such that two identical plaintext pages, each at different locations will have differing ciphertexts. So swapping or moving ciphertext of those pages will not result in plaintext being swapped. So relocating (or migrating) physical backing pages for the SEV guest will require some additional steps.h]hXIt is used in the SEV-enabled guest. When encryption is enabled, a guest memory region may contain encrypted data. The SEV memory encryption engine uses a tweak such that two identical plaintext pages, each at different locations will have differing ciphertexts. So swapping or moving ciphertext of those pages will not result in plaintext being swapped. So relocating (or migrating) physical backing pages for the SEV guest will require some additional steps.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hNote: The current SEV key management spec does not provide commands to swap or migrate (move) ciphertext pages. Hence, for now we pin the guest memory region registered with the ioctl.h]hNote: The current SEV key management spec does not provide commands to swap or migrate (move) ciphertext pages. Hence, for now we pin the guest memory region registered with the ioctl.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]kvm-memory-encrypt-reg-regionah ]h"]#4.111 kvm_memory_encrypt_reg_regionah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h%4.112 KVM_MEMORY_ENCRYPT_UNREG_REGIONh]h%4.112 KVM_MEMORY_ENCRYPT_UNREG_REGION}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj% hhhKubjy)}(hbasich]h)}(hj8 h]hbasic}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6 ubah}(h]h ]h"]h$]h&]uh1jxhj% ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj" hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjS hhhKubjy)}(hx86h]h)}(hjf h]hx86}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjd ubah}(h]h ]h"]h$]h&]uh1jxhjS ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj" hhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hsystemh]h)}(hj h]hsystem}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj" hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hstruct kvm_enc_region (in)h]h)}(hj h]hstruct kvm_enc_region (in)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj" hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj" hhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhMubh)}(hwThis ioctl can be used to unregister the guest memory region registered with KVM_MEMORY_ENCRYPT_REG_REGION ioctl above.h]hwThis ioctl can be used to unregister the guest memory region registered with KVM_MEMORY_ENCRYPT_REG_REGION ioctl above.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]kvm-memory-encrypt-unreg-regionah ]h"]%4.112 kvm_memory_encrypt_unreg_regionah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.113 KVM_HYPERV_EVENTFDh]h4.113 KVM_HYPERV_EVENTFD}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj( hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj< hhhKubjy)}(hKVM_CAP_HYPERV_EVENTFDh]h)}(hjO h]hKVM_CAP_HYPERV_EVENTFD}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjM ubah}(h]h ]h"]h$]h&]uh1jxhj< ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9 hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjj hhhKubjy)}(hx86h]h)}(hj} h]hx86}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{ ubah}(h]h ]h"]h$]h&]uh1jxhjj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9 hhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hvm ioctlh]h)}(hj h]hvm ioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9 hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hstruct kvm_hyperv_eventfd (in) h]h)}(hstruct kvm_hyperv_eventfd (in)h]hstruct kvm_hyperv_eventfd (in)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj9 hhubeh}(h]h ]h"]h$]h&]uh1j^hj( hhhhhMubh)}(hX*This ioctl (un)registers an eventfd to receive notifications from the guest on the specified Hyper-V connection id through the SIGNAL_EVENT hypercall, without causing a user exit. SIGNAL_EVENT hypercall with non-zero event flag number (bits 24-31) still triggers a KVM_EXIT_HYPERV_HCALL user exit.h]hX*This ioctl (un)registers an eventfd to receive notifications from the guest on the specified Hyper-V connection id through the SIGNAL_EVENT hypercall, without causing a user exit. SIGNAL_EVENT hypercall with non-zero event flag number (bits 24-31) still triggers a KVM_EXIT_HYPERV_HCALL user exit.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj( hhubj$)}(hnstruct kvm_hyperv_eventfd { __u32 conn_id; __s32 fd; __u32 flags; __u32 padding[3]; };h]hnstruct kvm_hyperv_eventfd { __u32 conn_id; __s32 fd; __u32 flags; __u32 padding[3]; };}hj sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj( hhubh)}(h-The conn_id field should fit within 24 bits::h]h,The conn_id field should fit within 24 bits:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj( hhubj$)}(h8#define KVM_HYPERV_CONN_ID_MASK 0x00ffffffh]h8#define KVM_HYPERV_CONN_ID_MASK 0x00ffffff}hj%sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj( hhubh)}(h/The acceptable values for the flags field are::h]h.The acceptable values for the flags field are:}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj( hhubj$)}(h.#define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)h]h.#define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)}hjAsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj( hhubj_)}(hhh]jd)}(hhh](ji)}(hReturnsh]hReturns}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRhhhKubjy)}(h0 on success, -EINVAL if conn_id or flags is outside the allowed range, -ENOENT on deassign if the conn_id isn't registered, -EEXIST on assign if the conn_id is already registered h]h)}(h0 on success, -EINVAL if conn_id or flags is outside the allowed range, -ENOENT on deassign if the conn_id isn't registered, -EEXIST on assign if the conn_id is already registeredh]h0 on success, -EINVAL if conn_id or flags is outside the allowed range, -ENOENT on deassign if the conn_id isn’t registered, -EEXIST on assign if the conn_id is already registered}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjcubah}(h]h ]h"]h$]h&]uh1jxhjRubeh}(h]h ]h"]h$]h&]uh1jchhhM hjOhhubah}(h]h ]h"]h$]h&]uh1j^hj( hhhhhM ubeh}(h]kvm-hyperv-eventfdah ]h"]4.113 kvm_hyperv_eventfdah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.114 KVM_GET_NESTED_STATEh]h4.114 KVM_GET_NESTED_STATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_NESTED_STATEh]h)}(hjh]hKVM_CAP_NESTED_STATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj-hhhKubjy)}(h struct kvm_nested_state (in/out)h]h)}(hj@h]h struct kvm_nested_state (in/out)}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jxhj-ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj[hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlubah}(h]h ]h"]h$]h&]uh1jxhj[ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX===== ============================================================= E2BIG the total state size exceeds the value of 'size' specified by the user; the size required will be written into size. ===== ============================================================= h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1jOhjubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hE2BIGh]hE2BIG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(htthe total state size exceeds the value of 'size' specified by the user; the size required will be written into size.h]hxthe total state size exceeds the value of ‘size’ specified by the user; the size required will be written into size.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(hXstruct kvm_nested_state { __u16 flags; __u16 format; __u32 size; union { struct kvm_vmx_nested_state_hdr vmx; struct kvm_svm_nested_state_hdr svm; /* Pad the header to 128 bytes. */ __u8 pad[120]; } hdr; union { struct kvm_vmx_nested_state_data vmx[0]; struct kvm_svm_nested_state_data svm[0]; } data; }; #define KVM_STATE_NESTED_GUEST_MODE 0x00000001 #define KVM_STATE_NESTED_RUN_PENDING 0x00000002 #define KVM_STATE_NESTED_EVMCS 0x00000004 #define KVM_STATE_NESTED_FORMAT_VMX 0 #define KVM_STATE_NESTED_FORMAT_SVM 1 #define KVM_STATE_NESTED_VMX_VMCS_SIZE 0x1000 #define KVM_STATE_NESTED_VMX_SMM_GUEST_MODE 0x00000001 #define KVM_STATE_NESTED_VMX_SMM_VMXON 0x00000002 #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001 struct kvm_vmx_nested_state_hdr { __u64 vmxon_pa; __u64 vmcs12_pa; struct { __u16 flags; } smm; __u32 flags; __u64 preemption_timer_deadline; }; struct kvm_vmx_nested_state_data { __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; __u8 shadow_vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; };h]hXstruct kvm_nested_state { __u16 flags; __u16 format; __u32 size; union { struct kvm_vmx_nested_state_hdr vmx; struct kvm_svm_nested_state_hdr svm; /* Pad the header to 128 bytes. */ __u8 pad[120]; } hdr; union { struct kvm_vmx_nested_state_data vmx[0]; struct kvm_svm_nested_state_data svm[0]; } data; }; #define KVM_STATE_NESTED_GUEST_MODE 0x00000001 #define KVM_STATE_NESTED_RUN_PENDING 0x00000002 #define KVM_STATE_NESTED_EVMCS 0x00000004 #define KVM_STATE_NESTED_FORMAT_VMX 0 #define KVM_STATE_NESTED_FORMAT_SVM 1 #define KVM_STATE_NESTED_VMX_VMCS_SIZE 0x1000 #define KVM_STATE_NESTED_VMX_SMM_GUEST_MODE 0x00000001 #define KVM_STATE_NESTED_VMX_SMM_VMXON 0x00000002 #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001 struct kvm_vmx_nested_state_hdr { __u64 vmxon_pa; __u64 vmcs12_pa; struct { __u16 flags; } smm; __u32 flags; __u64 preemption_timer_deadline; }; struct kvm_vmx_nested_state_data { __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; __u8 shadow_vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(hVThis ioctl copies the vcpu's nested virtualization state from the kernel to userspace.h]hXThis ioctl copies the vcpu’s nested virtualization state from the kernel to userspace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjhhubh)}(hrThe maximum size of the state can be retrieved by passing KVM_CAP_NESTED_STATE to the KVM_CHECK_EXTENSION ioctl().h]hrThe maximum size of the state can be retrieved by passing KVM_CAP_NESTED_STATE to the KVM_CHECK_EXTENSION ioctl().}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjhhubeh}(h]kvm-get-nested-stateah ]h"]4.114 kvm_get_nested_stateah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.115 KVM_SET_NESTED_STATEh]h4.115 KVM_SET_NESTED_STATE}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhMYubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjUhhhKubjy)}(hKVM_CAP_NESTED_STATEh]h)}(hjhh]hKVM_CAP_NESTED_STATE}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjfubah}(h]h ]h"]h$]h&]uh1jxhjUubeh}(h]h ]h"]h$]h&]uh1jchhhM[hjRhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM\hjRhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM]hjRhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_nested_state (in)h]h)}(hjh]hstruct kvm_nested_state (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM^hjRhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM_hjRhhubeh}(h]h ]h"]h$]h&]uh1j^hjAhhhhhM[ubh)}(hThis copies the vcpu's kvm_nested_state struct from userspace to the kernel. For the definition of struct kvm_nested_state, see KVM_GET_NESTED_STATE.h]hThis copies the vcpu’s kvm_nested_state struct from userspace to the kernel. For the definition of struct kvm_nested_state, see KVM_GET_NESTED_STATE.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjAhhubeh}(h]kvm-set-nested-stateah ]h"]4.115 kvm_set_nested_stateah$]h&]uh1hhjhhhhhMYubh)}(hhh](h)}(h%4.116 KVM_(UN)REGISTER_COALESCED_MMIOh]h%4.116 KVM_(UN)REGISTER_COALESCED_MMIO}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhhhhhMeubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjlhhhKubjy)}(hUKVM_CAP_COALESCED_MMIO (for coalesced mmio) KVM_CAP_COALESCED_PIO (for coalesced pio)h]h)}(hUKVM_CAP_COALESCED_MMIO (for coalesced mmio) KVM_CAP_COALESCED_PIO (for coalesced pio)h]hUKVM_CAP_COALESCED_MMIO (for coalesced mmio) KVM_CAP_COALESCED_PIO (for coalesced pio)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj}ubah}(h]h ]h"]h$]h&]uh1jxhjlubeh}(h]h ]h"]h$]h&]uh1jchhhMghjihhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hallh]h)}(hjh]hall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMihjihhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMjhjihhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_coalesced_mmio_zoneh]h)}(hj h]hstruct kvm_coalesced_mmio_zone}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMkhjihhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj%hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhj6ubah}(h]h ]h"]h$]h&]uh1jxhj%ubeh}(h]h ]h"]h$]h&]uh1jchhhMlhjihhubeh}(h]h ]h"]h$]h&]uh1j^hjXhhhhhMgubh)}(hCoalesced I/O is a performance optimization that defers hardware register write emulation so that userspace exits are avoided. It is typically used to reduce the overhead of emulating frequently accessed hardware registers.h]hCoalesced I/O is a performance optimization that defers hardware register write emulation so that userspace exits are avoided. It is typically used to reduce the overhead of emulating frequently accessed hardware registers.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjXhhubh)}(hWhen a hardware register is configured for coalesced I/O, write accesses do not exit to userspace and their value is recorded in a ring buffer that is shared between kernel and userspace.h]hWhen a hardware register is configured for coalesced I/O, write accesses do not exit to userspace and their value is recorded in a ring buffer that is shared between kernel and userspace.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjXhhubh)}(hXPCoalesced I/O is used if one or more write accesses to a hardware register can be deferred until a read or a write to another hardware register on the same device. This last access will cause a vmexit and userspace will process accesses from the ring buffer before emulating it. That will avoid exiting to userspace on repeated writes.h]hXPCoalesced I/O is used if one or more write accesses to a hardware register can be deferred until a read or a write to another hardware register on the same device. This last access will cause a vmexit and userspace will process accesses from the ring buffer before emulating it. That will avoid exiting to userspace on repeated writes.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjXhhubh)}(hCoalesced pio is based on coalesced mmio. There is little difference between coalesced mmio and pio except that coalesced pio records accesses to I/O ports.h]hCoalesced pio is based on coalesced mmio. There is little difference between coalesced mmio and pio except that coalesced pio records accesses to I/O ports.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjXhhubeh}(h]kvm-un-register-coalesced-mmioah ]h"]%4.116 kvm_(un)register_coalesced_mmioah$]h&]uh1hhjhhhhhMeubh)}(hhh](h)}(h4.117 KVM_CLEAR_DIRTY_LOGh]h4.117 KVM_CLEAR_DIRTY_LOG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h!KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2h]h)}(hjh]h!KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86, arm64, mipsh]h)}(hjh]hx86, arm64, mips}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8hhhKubjy)}(hstruct kvm_clear_dirty_log (in)h]h)}(hjKh]hstruct kvm_clear_dirty_log (in)}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIubah}(h]h ]h"]h$]h&]uh1jxhj8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubj$)}(h/* for KVM_CLEAR_DIRTY_LOG */ struct kvm_clear_dirty_log { __u32 slot; __u32 num_pages; __u64 first_page; union { void __user *dirty_bitmap; /* one bit per page */ __u64 padding; }; };h]h/* for KVM_CLEAR_DIRTY_LOG */ struct kvm_clear_dirty_log { __u32 slot; __u32 num_pages; __u64 first_page; union { void __user *dirty_bitmap; /* one bit per page */ __u64 padding; }; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(hXThe ioctl clears the dirty status of pages in a memory slot, according to the bitmap that is passed in struct kvm_clear_dirty_log's dirty_bitmap field. Bit 0 of the bitmap corresponds to page "first_page" in the memory slot, and num_pages is the size in bits of the input bitmap. first_page must be a multiple of 64; num_pages must also be a multiple of 64 unless first_page + num_pages is the size of the memory slot. For each bit that is set in the input bitmap, the corresponding page is marked "clean" in KVM's dirty bitmap, and dirty tracking is re-enabled for that page (for example via write-protection, or by clearing the dirty bit in a page table entry).h]hXThe ioctl clears the dirty status of pages in a memory slot, according to the bitmap that is passed in struct kvm_clear_dirty_log’s dirty_bitmap field. Bit 0 of the bitmap corresponds to page “first_page” in the memory slot, and num_pages is the size in bits of the input bitmap. first_page must be a multiple of 64; num_pages must also be a multiple of 64 unless first_page + num_pages is the size of the memory slot. For each bit that is set in the input bitmap, the corresponding page is marked “clean” in KVM’s dirty bitmap, and dirty tracking is re-enabled for that page (for example via write-protection, or by clearing the dirty bit in a page table entry).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hIf KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of slot field specifies the address space for which you want to clear the dirty status. See KVM_SET_USER_MEMORY_REGION for details on the usage of slot field.h]hIf KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of slot field specifies the address space for which you want to clear the dirty status. See KVM_SET_USER_MEMORY_REGION for details on the usage of slot field.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXThis ioctl is mostly useful when KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is enabled; for more information, see the description of the capability. However, it can always be used as long as KVM_CHECK_EXTENSION confirms that KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is present.h]hXThis ioctl is mostly useful when KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is enabled; for more information, see the description of the capability. However, it can always be used as long as KVM_CHECK_EXTENSION confirms that KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is present.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-clear-dirty-logah ]h"]4.117 kvm_clear_dirty_logah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h 4.118 KVM_GET_SUPPORTED_HV_CPUIDh]h 4.118 KVM_GET_SUPPORTED_HV_CPUID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h>KVM_CAP_HYPERV_CPUID (vcpu), KVM_CAP_SYS_HYPERV_CPUID (system)h]h)}(hjh]h>KVM_CAP_HYPERV_CPUID (vcpu), KVM_CAP_SYS_HYPERV_CPUID (system)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hj0h]hx86}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjKhhhKubjy)}(hsystem ioctl, vcpu ioctlh]h)}(hj^h]hsystem ioctl, vcpu ioctl}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\ubah}(h]h ]h"]h$]h&]uh1jxhjKubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjyhhhKubjy)}(hstruct kvm_cpuid2 (in/out)h]h)}(hjh]hstruct kvm_cpuid2 (in/out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjyubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubj$)}(hXstruct kvm_cpuid2 { __u32 nent; __u32 padding; struct kvm_cpuid_entry2 entries[0]; }; struct kvm_cpuid_entry2 { __u32 function; __u32 index; __u32 flags; __u32 eax; __u32 ebx; __u32 ecx; __u32 edx; __u32 padding[3]; };h]hXstruct kvm_cpuid2 { __u32 nent; __u32 padding; struct kvm_cpuid_entry2 entries[0]; }; struct kvm_cpuid_entry2 { __u32 function; __u32 index; __u32 flags; __u32 eax; __u32 ebx; __u32 ecx; __u32 edx; __u32 padding[3]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(hXThis ioctl returns x86 cpuid features leaves related to Hyper-V emulation in KVM. Userspace can use the information returned by this ioctl to construct cpuid information presented to guests consuming Hyper-V enlightenments (e.g. Windows or Hyper-V guests).h]hXThis ioctl returns x86 cpuid features leaves related to Hyper-V emulation in KVM. Userspace can use the information returned by this ioctl to construct cpuid information presented to guests consuming Hyper-V enlightenments (e.g. Windows or Hyper-V guests).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXCPUID feature leaves returned by this ioctl are defined by Hyper-V Top Level Functional Specification (TLFS). These leaves can't be obtained with KVM_GET_SUPPORTED_CPUID ioctl because some of them intersect with KVM feature leaves (0x40000000, 0x40000001).h]hXCPUID feature leaves returned by this ioctl are defined by Hyper-V Top Level Functional Specification (TLFS). These leaves can’t be obtained with KVM_GET_SUPPORTED_CPUID ioctl because some of them intersect with KVM feature leaves (0x40000000, 0x40000001).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h;Currently, the following list of CPUID leaves are returned:h]h;Currently, the following list of CPUID leaves are returned:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXJ- HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS - HYPERV_CPUID_INTERFACE - HYPERV_CPUID_VERSION - HYPERV_CPUID_FEATURES - HYPERV_CPUID_ENLIGHTMENT_INFO - HYPERV_CPUID_IMPLEMENT_LIMITS - HYPERV_CPUID_NESTED_FEATURES - HYPERV_CPUID_SYNDBG_VENDOR_AND_MAX_FUNCTIONS - HYPERV_CPUID_SYNDBG_INTERFACE - HYPERV_CPUID_SYNDBG_PLATFORM_CAPABILITIES h]h)}(hhh](j)}(h%HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONSh]h)}(hjh]h%HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_INTERFACEh]h)}(hj4h]hHYPERV_CPUID_INTERFACE}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_VERSIONh]h)}(hjKh]hHYPERV_CPUID_VERSION}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_FEATURESh]h)}(hjbh]hHYPERV_CPUID_FEATURES}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_ENLIGHTMENT_INFOh]h)}(hjyh]hHYPERV_CPUID_ENLIGHTMENT_INFO}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_IMPLEMENT_LIMITSh]h)}(hjh]hHYPERV_CPUID_IMPLEMENT_LIMITS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_NESTED_FEATURESh]h)}(hjh]hHYPERV_CPUID_NESTED_FEATURES}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h,HYPERV_CPUID_SYNDBG_VENDOR_AND_MAX_FUNCTIONSh]h)}(hjh]h,HYPERV_CPUID_SYNDBG_VENDOR_AND_MAX_FUNCTIONS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_SYNDBG_INTERFACEh]h)}(hjh]hHYPERV_CPUID_SYNDBG_INTERFACE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h*HYPERV_CPUID_SYNDBG_PLATFORM_CAPABILITIES h]h)}(h)HYPERV_CPUID_SYNDBG_PLATFORM_CAPABILITIESh]h)HYPERV_CPUID_SYNDBG_PLATFORM_CAPABILITIES}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXUserspace invokes KVM_GET_SUPPORTED_HV_CPUID by passing a kvm_cpuid2 structure with the 'nent' field indicating the number of entries in the variable-size array 'entries'. If the number of entries is too low to describe all Hyper-V feature leaves, an error (E2BIG) is returned. If the number is more or equal to the number of Hyper-V feature leaves, the 'nent' field is adjusted to the number of valid entries in the 'entries' array, which is then filled.h]hXUserspace invokes KVM_GET_SUPPORTED_HV_CPUID by passing a kvm_cpuid2 structure with the ‘nent’ field indicating the number of entries in the variable-size array ‘entries’. If the number of entries is too low to describe all Hyper-V feature leaves, an error (E2BIG) is returned. If the number is more or equal to the number of Hyper-V feature leaves, the ‘nent’ field is adjusted to the number of valid entries in the ‘entries’ array, which is then filled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h'index' and 'flags' fields in 'struct kvm_cpuid_entry2' are currently reserved, userspace should not expect to get any particular value there.h]h‘index’ and ‘flags’ fields in ‘struct kvm_cpuid_entry2’ are currently reserved, userspace should not expect to get any particular value there.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hNote, vcpu version of KVM_GET_SUPPORTED_HV_CPUID is currently deprecated. Unlike system ioctl which exposes all supported feature bits unconditionally, vcpu version has the following quirks:h]hNote, vcpu version of KVM_GET_SUPPORTED_HV_CPUID is currently deprecated. Unlike system ioctl which exposes all supported feature bits unconditionally, vcpu version has the following quirks:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hhh](j)}(hHYPERV_CPUID_NESTED_FEATURES leaf and HV_X64_ENLIGHTENED_VMCS_RECOMMENDED feature bit are only exposed when Enlightened VMCS was previously enabled on the corresponding vCPU (KVM_CAP_HYPERV_ENLIGHTENED_VMCS).h]h)}(hHYPERV_CPUID_NESTED_FEATURES leaf and HV_X64_ENLIGHTENED_VMCS_RECOMMENDED feature bit are only exposed when Enlightened VMCS was previously enabled on the corresponding vCPU (KVM_CAP_HYPERV_ENLIGHTENED_VMCS).h]hHYPERV_CPUID_NESTED_FEATURES leaf and HV_X64_ENLIGHTENED_VMCS_RECOMMENDED feature bit are only exposed when Enlightened VMCS was previously enabled on the corresponding vCPU (KVM_CAP_HYPERV_ENLIGHTENED_VMCS).}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1jhj8hhhhhNubj)}(hHV_STIMER_DIRECT_MODE_AVAILABLE bit is only exposed with in-kernel LAPIC. (presumes KVM_CREATE_IRQCHIP has already been called). h]h)}(hHV_STIMER_DIRECT_MODE_AVAILABLE bit is only exposed with in-kernel LAPIC. (presumes KVM_CREATE_IRQCHIP has already been called).h]hHV_STIMER_DIRECT_MODE_AVAILABLE bit is only exposed with in-kernel LAPIC. (presumes KVM_CREATE_IRQCHIP has already been called).}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhj8hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjhhubeh}(h]kvm-get-supported-hv-cpuidah ]h"] 4.118 kvm_get_supported_hv_cpuidah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.119 KVM_ARM_VCPU_FINALIZEh]h4.119 KVM_ARM_VCPU_FINALIZE}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(harm64h]h)}(hjh]harm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hint feature (in)h]h)}(hjh]hint feature (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjyhhhhhMubh)}(hErrors:h]hErrors:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyhhubh)}(hX====== ============================================================== EPERM feature not enabled, needs configuration, or already finalized EINVAL feature unknown or not present ====== ============================================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjaubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK>uh1jOhjaubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEPERMh]hEPERM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1johj{ubjp)}(hhh]h)}(h>feature not enabled, needs configuration, or already finalizedh]h>feature not enabled, needs configuration, or already finalized}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johj{ubeh}(h]h ]h"]h$]h&]uh1jjhjxubjk)}(hhh](jp)}(hhh]h)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hfeature unknown or not presenth]hfeature unknown or not present}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjxubeh}(h]h ]h"]h$]h&]uh1jehjaubeh}(h]h ]h"]h$]h&]colsKuh1jJhj^ubah}(h]h ]h"]h$]h&]uh1jEhjZubah}(h]h ]h"]h$]h&]uh1hhhhMhjyhhubh)}(hRecognised values for feature:h]hRecognised values for feature:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyhhubh)}(h===== =========================================== arm64 KVM_ARM_VCPU_SVE (requires KVM_CAP_ARM_SVE) ===== =========================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK+uh1jOhjubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(harm64h]harm64}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1johj1ubjp)}(hhh]h)}(h+KVM_ARM_VCPU_SVE (requires KVM_CAP_ARM_SVE)h]h+KVM_ARM_VCPU_SVE (requires KVM_CAP_ARM_SVE)}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubah}(h]h ]h"]h$]h&]uh1johj1ubeh}(h]h ]h"]h$]h&]uh1jjhj.ubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjyhhubh)}(h:Finalizes the configuration of the specified vcpu feature.h]h:Finalizes the configuration of the specified vcpu feature.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyhhubh)}(hThe vcpu must already have been initialised, enabling the affected feature, by means of a successful :ref:`KVM_ARM_VCPU_INIT ` call with the appropriate flag set in features[].h](heThe vcpu must already have been initialised, enabling the affected feature, by means of a successful }(hjhhhNhNubh)}(h,:ref:`KVM_ARM_VCPU_INIT `h]j)}(hjh]hKVM_ARM_VCPU_INIT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjkvm_arm_vcpu_inituh1hhhhM hjubh2 call with the appropriate flag set in features[].}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjyhhubh)}(hlFor affected vcpu features, this is a mandatory step that must be performed before the vcpu is fully usable.h]hlFor affected vcpu features, this is a mandatory step that must be performed before the vcpu is fully usable.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjyhhubh)}(hBetween KVM_ARM_VCPU_INIT and KVM_ARM_VCPU_FINALIZE, the feature may be configured by use of ioctls such as KVM_SET_ONE_REG. The exact configuration that should be performed and how to do it are feature-dependent.h]hBetween KVM_ARM_VCPU_INIT and KVM_ARM_VCPU_FINALIZE, the feature may be configured by use of ioctls such as KVM_SET_ONE_REG. The exact configuration that should be performed and how to do it are feature-dependent.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyhhubh)}(hOther calls that depend on a particular feature being finalized, such as KVM_RUN, KVM_GET_REG_LIST, KVM_GET_ONE_REG and KVM_SET_ONE_REG, will fail with -EPERM unless the feature has already been finalized by means of a KVM_ARM_VCPU_FINALIZE call.h]hOther calls that depend on a particular feature being finalized, such as KVM_RUN, KVM_GET_REG_LIST, KVM_GET_ONE_REG and KVM_SET_ONE_REG, will fail with -EPERM unless the feature has already been finalized by means of a KVM_ARM_VCPU_FINALIZE call.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyhhubh)}(h^See KVM_ARM_VCPU_INIT for details of vcpu features that require finalization using this ioctl.h]h^See KVM_ARM_VCPU_INIT for details of vcpu features that require finalization using this ioctl.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyhhubeh}(h]kvm-arm-vcpu-finalizeah ]h"]4.119 kvm_arm_vcpu_finalizeah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.120 KVM_SET_PMU_EVENT_FILTERh]h4.120 KVM_SET_PMU_EVENT_FILTER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_PMU_EVENT_FILTERh]h)}(hj(h]hKVM_CAP_PMU_EVENT_FILTER}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(hx86h]h)}(hjVh]hx86}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjTubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjqhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhjqubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h struct kvm_pmu_event_filter (in)h]h)}(hjh]h struct kvm_pmu_event_filter (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM#hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjhhubh)}(hXR====== ============================================================ EFAULT args[0] cannot be accessed EINVAL args[0] contains invalid data in the filter or filter events E2BIG nevents is too large EBUSY not enough memory to allocate the filter ====== ============================================================ h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKhjhhubh)}(hValid values for 'flags'::h]hValid values for ‘flags’:}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjhhubj$)}(h``0``h]h``0``}hjlsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMChjhhubh)}(h*To use this mode, clear the 'flags' field.h]h.To use this mode, clear the ‘flags’ field.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjhhubh)}(hAIn this mode each event will contain an event select + unit mask.h]hAIn this mode each event will contain an event select + unit mask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjhhubh)}(hWhen the guest attempts to program the PMU the guest's event select + unit mask is compared against the filter events to determine whether the guest should have access.h]hWhen the guest attempts to program the PMU the guest’s event select + unit mask is compared against the filter events to determine whether the guest should have access.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjhhubh)}(hQ``KVM_PMU_EVENT_FLAG_MASKED_EVENTS`` :Capability: KVM_CAP_PMU_EVENT_MASKED_EVENTSh](j)}(h$``KVM_PMU_EVENT_FLAG_MASKED_EVENTS``h]h KVM_PMU_EVENT_FLAG_MASKED_EVENTS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh- :Capability: KVM_CAP_PMU_EVENT_MASKED_EVENTS}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMMhjhhubh)}(h|In this mode each filter event will contain an event select, mask, match, and exclude value. To encode a masked event use::h]h{In this mode each filter event will contain an event select, mask, match, and exclude value. To encode a masked event use:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjhhubj$)}(hKVM_PMU_ENCODE_MASKED_ENTRY()h]hKVM_PMU_ENCODE_MASKED_ENTRY()}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMShjhhubh)}(h*An encoded event will follow this layout::h]h)An encoded event will follow this layout:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjhhubj$)}(hBits Description ---- ----------- 7:0 event select (low bits) 15:8 umask match 31:16 unused 35:32 event select (high bits) 36:54 unused 55 exclude bit 63:56 umask maskh]hBits Description ---- ----------- 7:0 event select (low bits) 15:8 umask match 31:16 unused 35:32 event select (high bits) 36:54 unused 55 exclude bit 63:56 umask mask}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMWhjhhubh)}(htWhen the guest attempts to program the PMU, these steps are followed in determining if the guest should have access:h]htWhen the guest attempts to program the PMU, these steps are followed in determining if the guest should have access:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjhhubh)}(hX1. Match the event select from the guest against the filter events. 2. If a match is found, match the guest's unit mask to the mask and match values of the included filter events. I.e. (unit mask & mask) == match && !exclude. 3. If a match is found, match the guest's unit mask to the mask and match values of the excluded filter events. I.e. (unit mask & mask) == match && exclude. 4. a. If an included match is found and an excluded match is not found, filter the event. b. For everything else, do not filter the event. 5. a. If the event is filtered and it's an allow list, allow the guest to program the event. b. If the event is filtered and it's a deny list, do not allow the guest to program the event. h]jf)}(hhh](j)}(h@Match the event select from the guest against the filter events.h]h)}(hjh]h@Match the event select from the guest against the filter events.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hIf a match is found, match the guest's unit mask to the mask and match values of the included filter events. I.e. (unit mask & mask) == match && !exclude.h]h)}(hIf a match is found, match the guest's unit mask to the mask and match values of the included filter events. I.e. (unit mask & mask) == match && !exclude.h]hIf a match is found, match the guest’s unit mask to the mask and match values of the included filter events. I.e. (unit mask & mask) == match && !exclude.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehj$ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hIf a match is found, match the guest's unit mask to the mask and match values of the excluded filter events. I.e. (unit mask & mask) == match && exclude.h]h)}(hIf a match is found, match the guest's unit mask to the mask and match values of the excluded filter events. I.e. (unit mask & mask) == match && exclude.h]hIf a match is found, match the guest’s unit mask to the mask and match values of the excluded filter events. I.e. (unit mask & mask) == match && exclude.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhj<ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(ha. If an included match is found and an excluded match is not found, filter the event. b. For everything else, do not filter the event.h]jf)}(hhh](j)}(hSIf an included match is found and an excluded match is not found, filter the event.h]h)}(hSIf an included match is found and an excluded match is not found, filter the event.h]hSIf an included match is found and an excluded match is not found, filter the event.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhj[ubah}(h]h ]h"]h$]h&]uh1jhjXubj)}(h-For everything else, do not filter the event.h]h)}(hjuh]h-For everything else, do not filter the event.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjsubah}(h]h ]h"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]jjjhj.uh1jehjTubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(ha. If the event is filtered and it's an allow list, allow the guest to program the event. b. If the event is filtered and it's a deny list, do not allow the guest to program the event. h]jf)}(hhh](j)}(hVIf the event is filtered and it's an allow list, allow the guest to program the event.h]h)}(hVIf the event is filtered and it's an allow list, allow the guest to program the event.h]hXIf the event is filtered and it’s an allow list, allow the guest to program the event.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h\If the event is filtered and it's a deny list, do not allow the guest to program the event. h]h)}(h[If the event is filtered and it's a deny list, do not allow the guest to program the event.h]h]If the event is filtered and it’s a deny list, do not allow the guest to program the event.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjjhjjuh1jehjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]jarabicjhjjuh1jehjubah}(h]h ]h"]h$]h&]uh1hhhhMdhjhhubh)}(hWhen setting a new pmu event filter, -EINVAL will be returned if any of the unused fields are set or if any of the high bits (35:32) in the event select are set when called on Intel.h]hWhen setting a new pmu event filter, -EINVAL will be returned if any of the unused fields are set or if any of the high bits (35:32) in the event select are set when called on Intel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjhhubh)}(hValid values for 'action'::h]hValid values for ‘action’:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjhhubj$)}(h:#define KVM_PMU_EVENT_ALLOW 0 #define KVM_PMU_EVENT_DENY 1h]h:#define KVM_PMU_EVENT_ALLOW 0 #define KVM_PMU_EVENT_DENY 1}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM{hjhhubh)}(hVia this API, KVM userspace can also control the behavior of the VM's fixed counters (if any) by configuring the "action" and "fixed_counter_bitmap" fields.h]hVia this API, KVM userspace can also control the behavior of the VM’s fixed counters (if any) by configuring the “action” and “fixed_counter_bitmap” fields.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hjhhubh)}(hSpecifically, KVM follows the following pseudo-code when determining whether to allow the guest FixCtr[i] to count its pre-defined fixed event::h]hSpecifically, KVM follows the following pseudo-code when determining whether to allow the guest FixCtr[i] to count its pre-defined fixed event:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(hFixCtr[i]_is_allowed = (action == ALLOW) && (bitmap & BIT(i)) || (action == DENY) && !(bitmap & BIT(i)); FixCtr[i]_is_denied = !FixCtr[i]_is_allowed;h]hFixCtr[i]_is_allowed = (action == ALLOW) && (bitmap & BIT(i)) || (action == DENY) && !(bitmap & BIT(i)); FixCtr[i]_is_denied = !FixCtr[i]_is_allowed;}hj-sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(hKVM always consumes fixed_counter_bitmap, it's userspace's responsibility to ensure fixed_counter_bitmap is set correctly, e.g. if userspace wants to define a filter that only affects general purpose counters.h]hKVM always consumes fixed_counter_bitmap, it’s userspace’s responsibility to ensure fixed_counter_bitmap is set correctly, e.g. if userspace wants to define a filter that only affects general purpose counters.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hNote, the "events" field also applies to fixed counters' hardcoded event_select and unit_mask values. "fixed_counter_bitmap" has higher priority than "events" if there is a contradiction between the two.h]hNote, the “events” field also applies to fixed counters’ hardcoded event_select and unit_mask values. “fixed_counter_bitmap” has higher priority than “events” if there is a contradiction between the two.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-set-pmu-event-filterah ]h"]4.120 kvm_set_pmu_event_filterah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.121 KVM_PPC_SVM_OFFh]h4.121 KVM_PPC_SVM_OFF}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjshhhKubjy)}(hbasich]h)}(hjh]hbasic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjsubeh}(h]h ]h"]h$]h&]uh1jchhhMhjphhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjphhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjphhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hnoneh]h)}(hjh]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjphhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+hhhKubjy)}(h0 on successful completion, h]h)}(h0 on successful completion,h]h0 on successful completion,}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jxhj+ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjphhubeh}(h]h ]h"]h$]h&]uh1j^hj_hhhhhMubh)}(hErrors:h]hErrors:}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_hhubh)}(hX"====== ================================================================ EINVAL if ultravisor failed to terminate the secure guest ENOMEM if hypervisor failed to allocate new radix page tables for guest ====== ================================================================ h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjuubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK@uh1jOhjuubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h2if ultravisor failed to terminate the secure guesth]h2if ultravisor failed to terminate the secure guest}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hENOMEMh]hENOMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h@if hypervisor failed to allocate new radix page tables for guesth]h@if hypervisor failed to allocate new radix page tables for guest}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjuubeh}(h]h ]h"]h$]h&]colsKuh1jJhjrubah}(h]h ]h"]h$]h&]uh1jEhjnubah}(h]h ]h"]h$]h&]uh1hhhhMhj_hhubh)}(hThis ioctl is used to turn off the secure mode of the guest or transition the guest from secure mode to normal mode. This is invoked when the guest is reset. This has no effect if called for a normal guest.h]hThis ioctl is used to turn off the secure mode of the guest or transition the guest from secure mode to normal mode. This is invoked when the guest is reset. This has no effect if called for a normal guest.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_hhubh)}(hThis ioctl issues an ultravisor call to terminate the secure guest, unpins the VPA pages and releases all the device pages that are used to track the secure pages by hypervisor.h]hThis ioctl issues an ultravisor call to terminate the secure guest, unpins the VPA pages and releases all the device pages that are used to track the secure pages by hypervisor.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_hhubeh}(h]kvm-ppc-svm-offah ]h"]4.121 kvm_ppc_svm_offah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.122 KVM_S390_NORMAL_RESETh]h4.122 KVM_S390_NORMAL_RESET}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNhhhKubjy)}(hKVM_CAP_S390_VCPU_RESETSh]h)}(hjah]hKVM_CAP_S390_VCPU_RESETS}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jxhjNubeh}(h]h ]h"]h$]h&]uh1jchhhMhjKhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|hhhKubjy)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjKhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjKhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hnoneh]h)}(hjh]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjKhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h0 h]h)}(hjvh]h0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjKhhubeh}(h]h ]h"]h$]h&]uh1j^hj:hhhhhMubh)}(hThis ioctl resets VCPU registers and control structures according to the cpu reset definition in the POP (Principles Of Operation).h]hThis ioctl resets VCPU registers and control structures according to the cpu reset definition in the POP (Principles Of Operation).}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:hhubeBh}(h]kvm-s390-normal-resetah ]h"]4.122 kvm_s390_normal_resetah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.123 KVM_S390_INITIAL_RESETh]h4.123 KVM_S390_INITIAL_RESET}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjd hhhKubjy)}(hbasich]h)}(hjw h]hbasic}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhju ubah}(h]h ]h"]h$]h&]uh1jxhjd ubeh}(h]h ]h"]h$]h&]uh1jchhhMhja hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hs390h]h)}(hj h]hs390}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhja hhubjd)}(hhh](ji)}(hTypeh]hType}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h vcpu ioctlh]h)}(hj h]h vcpu ioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhja hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hnoneh]h)}(hj!h]hnone}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhja hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(h0 h]h)}(hjvh]h0}(hj1!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-!ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhja hhubeh}(h]h ]h"]h$]h&]uh1j^hjP hhhhhMubh)}(hThis ioctl resets VCPU registers and control structures according to the initial cpu reset definition in the POP. However, the cpu is not put into ESA mode. This reset is a superset of the normal reset.h]hThis ioctl resets VCPU registers and control structures according to the initial cpu reset definition in the POP. However, the cpu is not put into ESA mode. This reset is a superset of the normal reset.}(hjP!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjP hhubeh}(h]kvm-s390-initial-resetah ]h"]4.123 kvm_s390_initial_resetah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.124 KVM_S390_CLEAR_RESETh]h4.124 KVM_S390_CLEAR_RESET}(hji!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf!hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj}!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjz!hhhKubjy)}(hKVM_CAP_S390_VCPU_RESETSh]h)}(hj!h]hKVM_CAP_S390_VCPU_RESETS}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jxhjz!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjw!hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(hs390h]h)}(hj!h]hs390}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjw!hhubjd)}(hhh](ji)}(hTypeh]hType}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(h vcpu ioctlh]h)}(hj!h]h vcpu ioctl}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjw!hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(hnoneh]h)}(hj"h]hnone}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjw!hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj5"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj2"hhhKubjy)}(h0 h]h)}(hjvh]h0}(hjG"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjC"ubah}(h]h ]h"]h$]h&]uh1jxhj2"ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjw!hhubeh}(h]h ]h"]h$]h&]uh1j^hjf!hhhhhMubh)}(hThis ioctl resets VCPU registers and control structures according to the clear cpu reset definition in the POP. However, the cpu is not put into ESA mode. This reset is a superset of the initial reset.h]hThis ioctl resets VCPU registers and control structures according to the clear cpu reset definition in the POP. However, the cpu is not put into ESA mode. This reset is a superset of the initial reset.}(hjf"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf!hhubeh}(h]kvm-s390-clear-resetah ]h"]4.124 kvm_s390_clear_resetah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.125 KVM_S390_PV_COMMANDh]h4.125 KVM_S390_PV_COMMAND}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|"hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(hKVM_CAP_S390_PROTECTEDh]h)}(hj"h]hKVM_CAP_S390_PROTECTED}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj"hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(hs390h]h)}(hj"h]hs390}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj"hhubjd)}(hhh](ji)}(hTypeh]hType}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(hvm ioctlh]h)}(hj"h]hvm ioctl}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj"hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj#hhhKubjy)}(hstruct kvm_pv_cmdh]h)}(hj-#h]hstruct kvm_pv_cmd}(hj/#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+#ubah}(h]h ]h"]h$]h&]uh1jxhj#ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj"hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjK#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjH#hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hj]#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjY#ubah}(h]h ]h"]h$]h&]uh1jxhjH#ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj"hhubeh}(h]h ]h"]h$]h&]uh1j^hj|"hhhhhMubj$)}(hXFstruct kvm_pv_cmd { __u32 cmd; /* Command to be executed */ __u16 rc; /* Ultravisor return code */ __u16 rrc; /* Ultravisor return reason code */ __u64 data; /* Data or address */ __u32 flags; /* flags for future extensions. Must be 0 for now */ __u32 reserved[3]; };h]hXFstruct kvm_pv_cmd { __u32 cmd; /* Command to be executed */ __u16 rc; /* Ultravisor return code */ __u16 rrc; /* Ultravisor return reason code */ __u64 data; /* Data or address */ __u32 flags; /* flags for future extensions. Must be 0 for now */ __u32 reserved[3]; };}hj}#sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj|"hhubh)}(hX**Ultravisor return codes** The Ultravisor return (reason) codes are provided by the kernel if a Ultravisor call has been executed to achieve the results expected by the command. Therefore they are independent of the IOCTL return code. If KVM changes `rc`, its value will always be greater than 0 hence setting it to 0 before issuing a PV command is advised to be able to detect a change of `rc`.h](hstrong)}(h**Ultravisor return codes**h]hUltravisor return codes}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j#hj#ubh The Ultravisor return (reason) codes are provided by the kernel if a Ultravisor call has been executed to achieve the results expected by the command. Therefore they are independent of the IOCTL return code. If KVM changes }(hj#hhhNhNubjz,)}(h`rc`h]hrc}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj#ubh, its value will always be greater than 0 hence setting it to 0 before issuing a PV command is advised to be able to detect a change of }(hj#hhhNhNubjz,)}(h`rc`h]hrc}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj#ubh.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj|"hhubh)}(h**cmd values:**h]j#)}(hj#h]h cmd values:}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j#hj#ubah}(h]h ]h"]h$]h&]uh1hhhhMhj|"hhubj)}(hhh](j)}(hXKVM_PV_ENABLE Allocate memory and register the VM with the Ultravisor, thereby donating memory to the Ultravisor that will become inaccessible to KVM. All existing CPUs are converted to protected ones. After this command has succeeded, any CPU added via hotplug will become protected during its creation as well. Errors: ===== ============================= EINTR an unmasked signal is pending ===== ============================= h](j)}(h KVM_PV_ENABLEh]h KVM_PV_ENABLE}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj#ubj)}(hhh](h)}(hX*Allocate memory and register the VM with the Ultravisor, thereby donating memory to the Ultravisor that will become inaccessible to KVM. All existing CPUs are converted to protected ones. After this command has succeeded, any CPU added via hotplug will become protected during its creation as well.h]hX*Allocate memory and register the VM with the Ultravisor, thereby donating memory to the Ultravisor that will become inaccessible to KVM. All existing CPUs are converted to protected ones. After this command has succeeded, any CPU added via hotplug will become protected during its creation as well.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubh)}(hErrors:h]hErrors:}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj$ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj$ubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEINTRh]hEINTR}(hj;$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8$ubah}(h]h ]h"]h$]h&]uh1johj5$ubjp)}(hhh]h)}(han unmasked signal is pendingh]han unmasked signal is pending}(hjR$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjO$ubah}(h]h ]h"]h$]h&]uh1johj5$ubeh}(h]h ]h"]h$]h&]uh1jjhj2$ubah}(h]h ]h"]h$]h&]uh1jehj$ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj$ubah}(h]h ]h"]h$]h&]uh1jEhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj#ubj)}(hXKVM_PV_DISABLE Deregister the VM from the Ultravisor and reclaim the memory that had been donated to the Ultravisor, making it usable by the kernel again. All registered VCPUs are converted back to non-protected ones. If a previous protected VM had been prepared for asynchronous teardown with KVM_PV_ASYNC_CLEANUP_PREPARE and not subsequently torn down with KVM_PV_ASYNC_CLEANUP_PERFORM, it will be torn down in this call together with the current protected VM. h](j)}(hKVM_PV_DISABLEh]hKVM_PV_DISABLE}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj$ubj)}(hhh]h)}(hXDeregister the VM from the Ultravisor and reclaim the memory that had been donated to the Ultravisor, making it usable by the kernel again. All registered VCPUs are converted back to non-protected ones. If a previous protected VM had been prepared for asynchronous teardown with KVM_PV_ASYNC_CLEANUP_PREPARE and not subsequently torn down with KVM_PV_ASYNC_CLEANUP_PERFORM, it will be torn down in this call together with the current protected VM.h]hXDeregister the VM from the Ultravisor and reclaim the memory that had been donated to the Ultravisor, making it usable by the kernel again. All registered VCPUs are converted back to non-protected ones. If a previous protected VM had been prepared for asynchronous teardown with KVM_PV_ASYNC_CLEANUP_PREPARE and not subsequently torn down with KVM_PV_ASYNC_CLEANUP_PERFORM, it will be torn down in this call together with the current protected VM.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj#hhubj)}(hKVM_PV_VM_SET_SEC_PARMS Pass the image header from VM memory to the Ultravisor in preparation of image unpacking and verification. h](j)}(hKVM_PV_VM_SET_SEC_PARMSh]hKVM_PV_VM_SET_SEC_PARMS}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj$ubj)}(hhh]h)}(hjPass the image header from VM memory to the Ultravisor in preparation of image unpacking and verification.h]hjPass the image header from VM memory to the Ultravisor in preparation of image unpacking and verification.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj#hhubj)}(hRKVM_PV_VM_UNPACK Unpack (protect and decrypt) a page of the encrypted boot image. h](j)}(hKVM_PV_VM_UNPACKh]hKVM_PV_VM_UNPACK}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj$ubj)}(hhh]h)}(h@Unpack (protect and decrypt) a page of the encrypted boot image.h]h@Unpack (protect and decrypt) a page of the encrypted boot image.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj#hhubj)}(h}KVM_PV_VM_VERIFY Verify the integrity of the unpacked image. Only if this succeeds, KVM is allowed to start protected VCPUs. h](j)}(hKVM_PV_VM_VERIFYh]hKVM_PV_VM_VERIFY}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj%ubj)}(hhh]h)}(hkVerify the integrity of the unpacked image. Only if this succeeds, KVM is allowed to start protected VCPUs.h]hkVerify the integrity of the unpacked image. Only if this succeeds, KVM is allowed to start protected VCPUs.}(hj-%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj*%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhhhM hj#hhubj)}(hXKVM_PV_INFO :Capability: KVM_CAP_S390_PROTECTED_DUMP Presents an API that provides Ultravisor related data to userspace via subcommands. len_max is the size of the user space buffer, len_written is KVM's indication of how much bytes of that buffer were actually written to. len_written can be used to determine the valid fields if more response fields are added in the future. :: enum pv_cmd_info_id { KVM_PV_INFO_VM, KVM_PV_INFO_DUMP, }; struct kvm_s390_pv_info_header { __u32 id; __u32 len_max; __u32 len_written; __u32 reserved; }; struct kvm_s390_pv_info { struct kvm_s390_pv_info_header header; struct kvm_s390_pv_info_dump dump; struct kvm_s390_pv_info_vm vm; }; h](j)}(h KVM_PV_INFOh]h KVM_PV_INFO}(hjK%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM)hjG%ubj)}(hhh](j_)}(hhh]jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjb%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_%hhhKubjy)}(hKVM_CAP_S390_PROTECTED_DUMP h]h)}(hKVM_CAP_S390_PROTECTED_DUMPh]hKVM_CAP_S390_PROTECTED_DUMP}(hjt%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjp%ubah}(h]h ]h"]h$]h&]uh1jxhj_%ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj\%ubah}(h]h ]h"]h$]h&]uh1j^hjY%ubh)}(hXCPresents an API that provides Ultravisor related data to userspace via subcommands. len_max is the size of the user space buffer, len_written is KVM's indication of how much bytes of that buffer were actually written to. len_written can be used to determine the valid fields if more response fields are added in the future.h]hXEPresents an API that provides Ultravisor related data to userspace via subcommands. len_max is the size of the user space buffer, len_written is KVM’s indication of how much bytes of that buffer were actually written to. len_written can be used to determine the valid fields if more response fields are added in the future.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjY%ubj$)}(hX=enum pv_cmd_info_id { KVM_PV_INFO_VM, KVM_PV_INFO_DUMP, }; struct kvm_s390_pv_info_header { __u32 id; __u32 len_max; __u32 len_written; __u32 reserved; }; struct kvm_s390_pv_info { struct kvm_s390_pv_info_header header; struct kvm_s390_pv_info_dump dump; struct kvm_s390_pv_info_vm vm; };h]hX=enum pv_cmd_info_id { KVM_PV_INFO_VM, KVM_PV_INFO_DUMP, }; struct kvm_s390_pv_info_header { __u32 id; __u32 len_max; __u32 len_written; __u32 reserved; }; struct kvm_s390_pv_info { struct kvm_s390_pv_info_header header; struct kvm_s390_pv_info_dump dump; struct kvm_s390_pv_info_vm vm; };}hj%sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjY%ubeh}(h]h ]h"]h$]h&]uh1jhjG%ubeh}(h]h ]h"]h$]h&]uh1jhhhM)hj#hhubeh}(h]h ]h"]h$]h&]uh1jhj|"hhhhhNubh)}(h**subcommands:**h]j#)}(hj%h]h subcommands:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j#hj%ubah}(h]h ]h"]h$]h&]uh1hhhhM+hj|"hhubh)}(hXKVM_PV_INFO_VM This subcommand provides basic Ultravisor information for PV hosts. These values are likely also exported as files in the sysfs firmware UV query interface but they are more easily available to programs in this API. The installed calls and feature_indication members provide the installed UV calls and the UV's other feature indications. The max_* members provide information about the maximum number of PV vcpus, PV guests and PV guest memory size. :: struct kvm_s390_pv_info_vm { __u64 inst_calls_list[4]; __u64 max_cpus; __u64 max_guests; __u64 max_guest_addr; __u64 feature_indication; }; KVM_PV_INFO_DUMP This subcommand provides information related to dumping PV guests. :: struct kvm_s390_pv_info_dump { __u64 dump_cpu_buffer_len; __u64 dump_config_mem_buffer_per_1m; __u64 dump_config_finalize_len; }; h]j)}(hhh](j)}(hX}KVM_PV_INFO_VM This subcommand provides basic Ultravisor information for PV hosts. These values are likely also exported as files in the sysfs firmware UV query interface but they are more easily available to programs in this API. The installed calls and feature_indication members provide the installed UV calls and the UV's other feature indications. The max_* members provide information about the maximum number of PV vcpus, PV guests and PV guest memory size. :: struct kvm_s390_pv_info_vm { __u64 inst_calls_list[4]; __u64 max_cpus; __u64 max_guests; __u64 max_guest_addr; __u64 feature_indication; }; h](j)}(hKVM_PV_INFO_VMh]hKVM_PV_INFO_VM}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMBhj%ubj)}(hhh](h)}(hThis subcommand provides basic Ultravisor information for PV hosts. These values are likely also exported as files in the sysfs firmware UV query interface but they are more easily available to programs in this API.h]hThis subcommand provides basic Ultravisor information for PV hosts. These values are likely also exported as files in the sysfs firmware UV query interface but they are more easily available to programs in this API.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hj%ubh)}(hyThe installed calls and feature_indication members provide the installed UV calls and the UV's other feature indications.h]h{The installed calls and feature_indication members provide the installed UV calls and the UV’s other feature indications.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj%ubh)}(hoThe max_* members provide information about the maximum number of PV vcpus, PV guests and PV guest memory size.h]hoThe max_* members provide information about the maximum number of PV vcpus, PV guests and PV guest memory size.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj%ubj$)}(hstruct kvm_s390_pv_info_vm { __u64 inst_calls_list[4]; __u64 max_cpus; __u64 max_guests; __u64 max_guest_addr; __u64 feature_indication; };h]hstruct kvm_s390_pv_info_vm { __u64 inst_calls_list[4]; __u64 max_cpus; __u64 max_guests; __u64 max_guest_addr; __u64 feature_indication; };}hj&sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM;hj%ubeh}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhhhMBhj%ubj)}(hKVM_PV_INFO_DUMP This subcommand provides information related to dumping PV guests. :: struct kvm_s390_pv_info_dump { __u64 dump_cpu_buffer_len; __u64 dump_config_mem_buffer_per_1m; __u64 dump_config_finalize_len; }; h](j)}(hKVM_PV_INFO_DUMPh]hKVM_PV_INFO_DUMP}(hj=&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMMhj9&ubj)}(hhh](h)}(hBThis subcommand provides information related to dumping PV guests.h]hBThis subcommand provides information related to dumping PV guests.}(hjN&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjK&ubj$)}(hstruct kvm_s390_pv_info_dump { __u64 dump_cpu_buffer_len; __u64 dump_config_mem_buffer_per_1m; __u64 dump_config_finalize_len; };h]hstruct kvm_s390_pv_info_dump { __u64 dump_cpu_buffer_len; __u64 dump_config_mem_buffer_per_1m; __u64 dump_config_finalize_len; };}hj\&sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMIhjK&ubeh}(h]h ]h"]h$]h&]uh1jhj9&ubeh}(h]h ]h"]h$]h&]uh1jhhhMMhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hhhhM-hj|"hhubj)}(hhh](j)}(hXKVM_PV_DUMP :Capability: KVM_CAP_S390_PROTECTED_DUMP Presents an API that provides calls which facilitate dumping a protected VM. :: struct kvm_s390_pv_dmp { __u64 subcmd; __u64 buff_addr; __u64 buff_len; __u64 gaddr; /* For dump storage state */ }; **subcommands:** KVM_PV_DUMP_INIT Initializes the dump process of a protected VM. If this call does not succeed all other subcommands will fail with -EINVAL. This subcommand will return -EINVAL if a dump process has not yet been completed. Not all PV vms can be dumped, the owner needs to set `dump allowed` PCF bit 34 in the SE header to allow dumping. KVM_PV_DUMP_CONFIG_STOR_STATE Stores `buff_len` bytes of tweak component values starting with the 1MB block specified by the absolute guest address (`gaddr`). `buff_len` needs to be `conf_dump_storage_state_len` aligned and at least >= the `conf_dump_storage_state_len` value provided by the dump uv_info data. buff_user might be written to even if an error rc is returned. For instance if we encounter a fault after writing the first page of data. KVM_PV_DUMP_COMPLETE If the subcommand succeeds it completes the dump process and lets KVM_PV_DUMP_INIT be called again. On success `conf_dump_finalize_len` bytes of completion data will be stored to the `buff_addr`. The completion data contains a key derivation seed, IV, tweak nonce and encryption keys as well as an authentication tag all of which are needed to decrypt the dump at a later time. h](j)}(h KVM_PV_DUMPh]h KVM_PV_DUMP}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMzhj&ubj)}(hhh](j_)}(hhh]jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj&hhhKubjy)}(hKVM_CAP_S390_PROTECTED_DUMP h]h)}(hKVM_CAP_S390_PROTECTED_DUMPh]hKVM_CAP_S390_PROTECTED_DUMP}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj&ubah}(h]h ]h"]h$]h&]uh1jxhj&ubeh}(h]h ]h"]h$]h&]uh1jchhhMPhj&ubah}(h]h ]h"]h$]h&]uh1j^hj&ubh)}(hLPresents an API that provides calls which facilitate dumping a protected VM.h]hLPresents an API that provides calls which facilitate dumping a protected VM.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj&ubj$)}(hstruct kvm_s390_pv_dmp { __u64 subcmd; __u64 buff_addr; __u64 buff_len; __u64 gaddr; /* For dump storage state */ };h]hstruct kvm_s390_pv_dmp { __u64 subcmd; __u64 buff_addr; __u64 buff_len; __u64 gaddr; /* For dump storage state */ };}hj&sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMWhj&ubh)}(h**subcommands:**h]j#)}(hj&h]h subcommands:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j#hj&ubah}(h]h ]h"]h$]h&]uh1hhhhM^hj&ubj)}(hhh](j)}(hXRKVM_PV_DUMP_INIT Initializes the dump process of a protected VM. If this call does not succeed all other subcommands will fail with -EINVAL. This subcommand will return -EINVAL if a dump process has not yet been completed. Not all PV vms can be dumped, the owner needs to set `dump allowed` PCF bit 34 in the SE header to allow dumping. h](j)}(hKVM_PV_DUMP_INITh]hKVM_PV_DUMP_INIT}(hj 'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMghj'ubj)}(hhh](h)}(hInitializes the dump process of a protected VM. If this call does not succeed all other subcommands will fail with -EINVAL. This subcommand will return -EINVAL if a dump process has not yet been completed.h]hInitializes the dump process of a protected VM. If this call does not succeed all other subcommands will fail with -EINVAL. This subcommand will return -EINVAL if a dump process has not yet been completed.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahj'ubh)}(hqNot all PV vms can be dumped, the owner needs to set `dump allowed` PCF bit 34 in the SE header to allow dumping.h](h5Not all PV vms can be dumped, the owner needs to set }(hj+'hhhNhNubjz,)}(h`dump allowed`h]h dump allowed}(hj3'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj+'ubh. PCF bit 34 in the SE header to allow dumping.}(hj+'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMfhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhMghj'ubj)}(hXKVM_PV_DUMP_CONFIG_STOR_STATE Stores `buff_len` bytes of tweak component values starting with the 1MB block specified by the absolute guest address (`gaddr`). `buff_len` needs to be `conf_dump_storage_state_len` aligned and at least >= the `conf_dump_storage_state_len` value provided by the dump uv_info data. buff_user might be written to even if an error rc is returned. For instance if we encounter a fault after writing the first page of data. h](j)}(hKVM_PV_DUMP_CONFIG_STOR_STATEh]hKVM_PV_DUMP_CONFIG_STOR_STATE}(hj['hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMphjW'ubj)}(hhh]h)}(hXStores `buff_len` bytes of tweak component values starting with the 1MB block specified by the absolute guest address (`gaddr`). `buff_len` needs to be `conf_dump_storage_state_len` aligned and at least >= the `conf_dump_storage_state_len` value provided by the dump uv_info data. buff_user might be written to even if an error rc is returned. For instance if we encounter a fault after writing the first page of data.h](hStores }(hjl'hhhNhNubjz,)}(h `buff_len`h]hbuff_len}(hjt'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjl'ubhf bytes of tweak component values starting with the 1MB block specified by the absolute guest address (}(hjl'hhhNhNubjz,)}(h`gaddr`h]hgaddr}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjl'ubh). }(hjl'hhhNhNubjz,)}(h `buff_len`h]hbuff_len}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjl'ubh needs to be }(hjl'hhhNhNubjz,)}(h`conf_dump_storage_state_len`h]hconf_dump_storage_state_len}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjl'ubh aligned and at least >= the }(hjl'hhhNhNubjz,)}(h`conf_dump_storage_state_len`h]hconf_dump_storage_state_len}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjl'ubh value provided by the dump uv_info data. buff_user might be written to even if an error rc is returned. For instance if we encounter a fault after writing the first page of data.}(hjl'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMjhji'ubah}(h]h ]h"]h$]h&]uh1jhjW'ubeh}(h]h ]h"]h$]h&]uh1jhhhMphj'ubj)}(hXKVM_PV_DUMP_COMPLETE If the subcommand succeeds it completes the dump process and lets KVM_PV_DUMP_INIT be called again. On success `conf_dump_finalize_len` bytes of completion data will be stored to the `buff_addr`. The completion data contains a key derivation seed, IV, tweak nonce and encryption keys as well as an authentication tag all of which are needed to decrypt the dump at a later time. h](j)}(hKVM_PV_DUMP_COMPLETEh]hKVM_PV_DUMP_COMPLETE}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMzhj'ubj)}(hhh](h)}(hcIf the subcommand succeeds it completes the dump process and lets KVM_PV_DUMP_INIT be called again.h]hcIf the subcommand succeeds it completes the dump process and lets KVM_PV_DUMP_INIT be called again.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj'ubh)}(hXOn success `conf_dump_finalize_len` bytes of completion data will be stored to the `buff_addr`. The completion data contains a key derivation seed, IV, tweak nonce and encryption keys as well as an authentication tag all of which are needed to decrypt the dump at a later time.h](h On success }(hj(hhhNhNubjz,)}(h`conf_dump_finalize_len`h]hconf_dump_finalize_len}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj(ubh0 bytes of completion data will be stored to the }(hj(hhhNhNubjz,)}(h `buff_addr`h]h buff_addr}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj(ubh. The completion data contains a key derivation seed, IV, tweak nonce and encryption keys as well as an authentication tag all of which are needed to decrypt the dump at a later time.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMvhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhMzhj'ubeh}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhMzhj&ubj)}(hXKVM_PV_ASYNC_CLEANUP_PREPARE :Capability: KVM_CAP_S390_PROTECTED_ASYNC_DISABLE Prepare the current protected VM for asynchronous teardown. Most resources used by the current protected VM will be set aside for a subsequent asynchronous teardown. The current protected VM will then resume execution immediately as non-protected. There can be at most one protected VM prepared for asynchronous teardown at any time. If a protected VM had already been prepared for teardown without subsequently calling KVM_PV_ASYNC_CLEANUP_PERFORM, this call will fail. In that case, the userspace process should issue a normal KVM_PV_DISABLE. The resources set aside with this call will need to be cleaned up with a subsequent call to KVM_PV_ASYNC_CLEANUP_PERFORM or KVM_PV_DISABLE, otherwise they will be cleaned up when KVM terminates. KVM_PV_ASYNC_CLEANUP_PREPARE can be called again as soon as cleanup starts, i.e. before KVM_PV_ASYNC_CLEANUP_PERFORM finishes. h](j)}(hKVM_PV_ASYNC_CLEANUP_PREPAREh]hKVM_PV_ASYNC_CLEANUP_PREPARE}(hjW(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjS(ubj)}(hhh](j_)}(hhh]jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjn(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjk(hhhKubjy)}(h%KVM_CAP_S390_PROTECTED_ASYNC_DISABLE h]h)}(h$KVM_CAP_S390_PROTECTED_ASYNC_DISABLEh]h$KVM_CAP_S390_PROTECTED_ASYNC_DISABLE}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hj|(ubah}(h]h ]h"]h$]h&]uh1jxhjk(ubeh}(h]h ]h"]h$]h&]uh1jchhhM}hjh(ubah}(h]h ]h"]h$]h&]uh1j^hje(ubh)}(hXbPrepare the current protected VM for asynchronous teardown. Most resources used by the current protected VM will be set aside for a subsequent asynchronous teardown. The current protected VM will then resume execution immediately as non-protected. There can be at most one protected VM prepared for asynchronous teardown at any time. If a protected VM had already been prepared for teardown without subsequently calling KVM_PV_ASYNC_CLEANUP_PERFORM, this call will fail. In that case, the userspace process should issue a normal KVM_PV_DISABLE. The resources set aside with this call will need to be cleaned up with a subsequent call to KVM_PV_ASYNC_CLEANUP_PERFORM or KVM_PV_DISABLE, otherwise they will be cleaned up when KVM terminates. KVM_PV_ASYNC_CLEANUP_PREPARE can be called again as soon as cleanup starts, i.e. before KVM_PV_ASYNC_CLEANUP_PERFORM finishes.h]hXbPrepare the current protected VM for asynchronous teardown. Most resources used by the current protected VM will be set aside for a subsequent asynchronous teardown. The current protected VM will then resume execution immediately as non-protected. There can be at most one protected VM prepared for asynchronous teardown at any time. If a protected VM had already been prepared for teardown without subsequently calling KVM_PV_ASYNC_CLEANUP_PERFORM, this call will fail. In that case, the userspace process should issue a normal KVM_PV_DISABLE. The resources set aside with this call will need to be cleaned up with a subsequent call to KVM_PV_ASYNC_CLEANUP_PERFORM or KVM_PV_DISABLE, otherwise they will be cleaned up when KVM terminates. KVM_PV_ASYNC_CLEANUP_PREPARE can be called again as soon as cleanup starts, i.e. before KVM_PV_ASYNC_CLEANUP_PERFORM finishes.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhje(ubeh}(h]h ]h"]h$]h&]uh1jhjS(ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj&hhubj)}(hXKVM_PV_ASYNC_CLEANUP_PERFORM :Capability: KVM_CAP_S390_PROTECTED_ASYNC_DISABLE Tear down the protected VM previously prepared for teardown with KVM_PV_ASYNC_CLEANUP_PREPARE. The resources that had been set aside will be freed during the execution of this command. This PV command should ideally be issued by userspace from a separate thread. If a fatal signal is received (or the process terminates naturally), the command will terminate immediately without completing, and the normal KVM shutdown procedure will take care of cleaning up all remaining protected VMs, including the ones whose teardown was interrupted by process termination. h](j)}(hKVM_PV_ASYNC_CLEANUP_PERFORMh]hKVM_PV_ASYNC_CLEANUP_PERFORM}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj(ubj)}(hhh](j_)}(hhh]jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj(hhhKubjy)}(h%KVM_CAP_S390_PROTECTED_ASYNC_DISABLE h]h)}(h$KVM_CAP_S390_PROTECTED_ASYNC_DISABLEh]h$KVM_CAP_S390_PROTECTED_ASYNC_DISABLE}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj(ubah}(h]h ]h"]h$]h&]uh1j^hj(ubh)}(hX1Tear down the protected VM previously prepared for teardown with KVM_PV_ASYNC_CLEANUP_PREPARE. The resources that had been set aside will be freed during the execution of this command. This PV command should ideally be issued by userspace from a separate thread. If a fatal signal is received (or the process terminates naturally), the command will terminate immediately without completing, and the normal KVM shutdown procedure will take care of cleaning up all remaining protected VMs, including the ones whose teardown was interrupted by process termination.h]hX1Tear down the protected VM previously prepared for teardown with KVM_PV_ASYNC_CLEANUP_PREPARE. The resources that had been set aside will be freed during the execution of this command. This PV command should ideally be issued by userspace from a separate thread. If a fatal signal is received (or the process terminates naturally), the command will terminate immediately without completing, and the normal KVM shutdown procedure will take care of cleaning up all remaining protected VMs, including the ones whose teardown was interrupted by process termination.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj&hhubeh}(h]h ]h"]h$]h&]uh1jhj|"hhhNhNubeh}(h]kvm-s390-pv-commandah ]h"]4.125 kvm_s390_pv_commandah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.126 KVM_XEN_HVM_SET_ATTRh]h4.126 KVM_XEN_HVM_SET_ATTR}(hj2)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/)hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjF)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjC)hhhKubjy)}(h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFOh]h)}(hjV)h]h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO}(hjX)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjT)ubah}(h]h ]h"]h$]h&]uh1jxhjC)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@)hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjt)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjq)hhhKubjy)}(hx86h]h)}(hj)h]hx86}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubah}(h]h ]h"]h$]h&]uh1jxhjq)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@)hhubjd)}(hhh](ji)}(hTypeh]hType}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)hhhKubjy)}(hvm ioctlh]h)}(hj)h]hvm ioctl}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubah}(h]h ]h"]h$]h&]uh1jxhj)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@)hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)hhhKubjy)}(hstruct kvm_xen_hvm_attrh]h)}(hj)h]hstruct kvm_xen_hvm_attr}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubah}(h]h ]h"]h$]h&]uh1jxhj)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@)hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj *ubah}(h]h ]h"]h$]h&]uh1jxhj)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@)hhubeh}(h]h ]h"]h$]h&]uh1j^hj/)hhhhhMubj$)}(hXWstruct kvm_xen_hvm_attr { __u16 type; __u16 pad[3]; union { __u8 long_mode; __u8 vector; __u8 runstate_update_flag; union { __u64 gfn; __u64 hva; } shared_info; struct { __u32 send_port; __u32 type; /* EVTCHNSTAT_ipi / EVTCHNSTAT_interdomain */ __u32 flags; union { struct { __u32 port; __u32 vcpu; __u32 priority; } port; struct { __u32 port; /* Zero for eventfd */ __s32 fd; } eventfd; __u32 padding[4]; } deliver; } evtchn; __u32 xen_version; __u64 pad[8]; } u; };h]hXWstruct kvm_xen_hvm_attr { __u16 type; __u16 pad[3]; union { __u8 long_mode; __u8 vector; __u8 runstate_update_flag; union { __u64 gfn; __u64 hva; } shared_info; struct { __u32 send_port; __u32 type; /* EVTCHNSTAT_ipi / EVTCHNSTAT_interdomain */ __u32 flags; union { struct { __u32 port; __u32 vcpu; __u32 priority; } port; struct { __u32 port; /* Zero for eventfd */ __s32 fd; } eventfd; __u32 padding[4]; } deliver; } evtchn; __u32 xen_version; __u64 pad[8]; } u; };}hj0*sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj/)hhubh)}(h type values:h]h type values:}(hj>*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/)hhubj)}(hhh](j)}(hKVM_XEN_ATTR_TYPE_LONG_MODE Sets the ABI mode of the VM to 32-bit or 64-bit (long mode). This determines the layout of the shared_info page exposed to the VM. h](j)}(hKVM_XEN_ATTR_TYPE_LONG_MODEh]hKVM_XEN_ATTR_TYPE_LONG_MODE}(hjS*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjO*ubj)}(hhh]h)}(hSets the ABI mode of the VM to 32-bit or 64-bit (long mode). This determines the layout of the shared_info page exposed to the VM.h]hSets the ABI mode of the VM to 32-bit or 64-bit (long mode). This determines the layout of the shared_info page exposed to the VM.}(hjd*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhja*ubah}(h]h ]h"]h$]h&]uh1jhjO*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjL*ubj)}(hXKVM_XEN_ATTR_TYPE_SHARED_INFO Sets the guest physical frame number at which the Xen shared_info page resides. Note that although Xen places vcpu_info for the first 32 vCPUs in the shared_info page, KVM does not automatically do so and instead requires that KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO or KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA be used explicitly even when the vcpu_info for a given vCPU resides at the "default" location in the shared_info page. This is because KVM may not be aware of the Xen CPU id which is used as the index into the vcpu_info[] array, so may know the correct default location. Note that the shared_info page may be constantly written to by KVM; it contains the event channel bitmap used to deliver interrupts to a Xen guest, amongst other things. It is exempt from dirty tracking mechanisms — KVM will not explicitly mark the page as dirty each time an event channel interrupt is delivered to the guest! Thus, userspace should always assume that the designated GFN is dirty if any vCPU has been running or any event channel interrupts can be routed to the guest. Setting the gfn to KVM_XEN_INVALID_GFN will disable the shared_info page. h](j)}(hKVM_XEN_ATTR_TYPE_SHARED_INFOh]hKVM_XEN_ATTR_TYPE_SHARED_INFO}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj~*ubj)}(hhh](h)}(hX:Sets the guest physical frame number at which the Xen shared_info page resides. Note that although Xen places vcpu_info for the first 32 vCPUs in the shared_info page, KVM does not automatically do so and instead requires that KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO or KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA be used explicitly even when the vcpu_info for a given vCPU resides at the "default" location in the shared_info page. This is because KVM may not be aware of the Xen CPU id which is used as the index into the vcpu_info[] array, so may know the correct default location.h]hX>Sets the guest physical frame number at which the Xen shared_info page resides. Note that although Xen places vcpu_info for the first 32 vCPUs in the shared_info page, KVM does not automatically do so and instead requires that KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO or KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA be used explicitly even when the vcpu_info for a given vCPU resides at the “default” location in the shared_info page. This is because KVM may not be aware of the Xen CPU id which is used as the index into the vcpu_info[] array, so may know the correct default location.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubh)}(hXNote that the shared_info page may be constantly written to by KVM; it contains the event channel bitmap used to deliver interrupts to a Xen guest, amongst other things. It is exempt from dirty tracking mechanisms — KVM will not explicitly mark the page as dirty each time an event channel interrupt is delivered to the guest! Thus, userspace should always assume that the designated GFN is dirty if any vCPU has been running or any event channel interrupts can be routed to the guest.h]hXNote that the shared_info page may be constantly written to by KVM; it contains the event channel bitmap used to deliver interrupts to a Xen guest, amongst other things. It is exempt from dirty tracking mechanisms — KVM will not explicitly mark the page as dirty each time an event channel interrupt is delivered to the guest! Thus, userspace should always assume that the designated GFN is dirty if any vCPU has been running or any event channel interrupts can be routed to the guest.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubh)}(hISetting the gfn to KVM_XEN_INVALID_GFN will disable the shared_info page.h]hISetting the gfn to KVM_XEN_INVALID_GFN will disable the shared_info page.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubeh}(h]h ]h"]h$]h&]uh1jhj~*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjL*hhubj)}(hXBKVM_XEN_ATTR_TYPE_SHARED_INFO_HVA If the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA flag is also set in the Xen capabilities, then this attribute may be used to set the userspace address at which the shared_info page resides, which will always be fixed in the VMM regardless of where it is mapped in guest physical address space. This attribute should be used in preference to KVM_XEN_ATTR_TYPE_SHARED_INFO as it avoids unnecessary invalidation of an internal cache when the page is re-mapped in guest physical address space. Setting the hva to zero will disable the shared_info page. h](j)}(h!KVM_XEN_ATTR_TYPE_SHARED_INFO_HVAh]h!KVM_XEN_ATTR_TYPE_SHARED_INFO_HVA}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj*ubj)}(hhh](h)}(hXIf the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA flag is also set in the Xen capabilities, then this attribute may be used to set the userspace address at which the shared_info page resides, which will always be fixed in the VMM regardless of where it is mapped in guest physical address space. This attribute should be used in preference to KVM_XEN_ATTR_TYPE_SHARED_INFO as it avoids unnecessary invalidation of an internal cache when the page is re-mapped in guest physical address space.h]hXIf the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA flag is also set in the Xen capabilities, then this attribute may be used to set the userspace address at which the shared_info page resides, which will always be fixed in the VMM regardless of where it is mapped in guest physical address space. This attribute should be used in preference to KVM_XEN_ATTR_TYPE_SHARED_INFO as it avoids unnecessary invalidation of an internal cache when the page is re-mapped in guest physical address space.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubh)}(h:Setting the hva to zero will disable the shared_info page.h]h:Setting the hva to zero will disable the shared_info page.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjL*hhubj)}(hXVKVM_XEN_ATTR_TYPE_UPCALL_VECTOR Sets the exception vector used to deliver Xen event channel upcalls. This is the HVM-wide vector injected directly by the hypervisor (not through the local APIC), typically configured by a guest via HVM_PARAM_CALLBACK_IRQ. This can be disabled again (e.g. for guest SHUTDOWN_soft_reset) by setting it to zero. h](j)}(hKVM_XEN_ATTR_TYPE_UPCALL_VECTORh]hKVM_XEN_ATTR_TYPE_UPCALL_VECTOR}(hj +hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj+ubj)}(hhh]h)}(hX5Sets the exception vector used to deliver Xen event channel upcalls. This is the HVM-wide vector injected directly by the hypervisor (not through the local APIC), typically configured by a guest via HVM_PARAM_CALLBACK_IRQ. This can be disabled again (e.g. for guest SHUTDOWN_soft_reset) by setting it to zero.h]hX5Sets the exception vector used to deliver Xen event channel upcalls. This is the HVM-wide vector injected directly by the hypervisor (not through the local APIC), typically configured by a guest via HVM_PARAM_CALLBACK_IRQ. This can be disabled again (e.g. for guest SHUTDOWN_soft_reset) by setting it to zero.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjL*hhubj)}(hX-KVM_XEN_ATTR_TYPE_EVTCHN This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It configures an outbound port number for interception of EVTCHNOP_send requests from the guest. A given sending port number may be directed back to a specified vCPU (by APIC ID) / port / priority on the guest, or to trigger events on an eventfd. The vCPU and priority can be changed by setting KVM_XEN_EVTCHN_UPDATE in a subsequent call, but other fields cannot change for a given sending port. A port mapping is removed by using KVM_XEN_EVTCHN_DEASSIGN in the flags field. Passing KVM_XEN_EVTCHN_RESET in the flags field removes all interception of outbound event channels. The values of the flags field are mutually exclusive and cannot be combined as a bitmask. h](j)}(hKVM_XEN_ATTR_TYPE_EVTCHNh]hKVM_XEN_ATTR_TYPE_EVTCHN}(hj9+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj5+ubj)}(hhh]h)}(hXThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It configures an outbound port number for interception of EVTCHNOP_send requests from the guest. A given sending port number may be directed back to a specified vCPU (by APIC ID) / port / priority on the guest, or to trigger events on an eventfd. The vCPU and priority can be changed by setting KVM_XEN_EVTCHN_UPDATE in a subsequent call, but other fields cannot change for a given sending port. A port mapping is removed by using KVM_XEN_EVTCHN_DEASSIGN in the flags field. Passing KVM_XEN_EVTCHN_RESET in the flags field removes all interception of outbound event channels. The values of the flags field are mutually exclusive and cannot be combined as a bitmask.h]hXThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It configures an outbound port number for interception of EVTCHNOP_send requests from the guest. A given sending port number may be directed back to a specified vCPU (by APIC ID) / port / priority on the guest, or to trigger events on an eventfd. The vCPU and priority can be changed by setting KVM_XEN_EVTCHN_UPDATE in a subsequent call, but other fields cannot change for a given sending port. A port mapping is removed by using KVM_XEN_EVTCHN_DEASSIGN in the flags field. Passing KVM_XEN_EVTCHN_RESET in the flags field removes all interception of outbound event channels. The values of the flags field are mutually exclusive and cannot be combined as a bitmask.}(hjJ+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjG+ubah}(h]h ]h"]h$]h&]uh1jhj5+ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjL*hhubj)}(hXKVM_XEN_ATTR_TYPE_XEN_VERSION This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It configures the 32-bit version code returned to the guest when it invokes the XENVER_version call; typically (XEN_MAJOR << 16 | XEN_MINOR). PV Xen guests will often use this to as a dummy hypercall to trigger event channel delivery, so responding within the kernel without exiting to userspace is beneficial. h](j)}(hKVM_XEN_ATTR_TYPE_XEN_VERSIONh]hKVM_XEN_ATTR_TYPE_XEN_VERSION}(hjh+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjd+ubj)}(hhh]h)}(hXThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It configures the 32-bit version code returned to the guest when it invokes the XENVER_version call; typically (XEN_MAJOR << 16 | XEN_MINOR). PV Xen guests will often use this to as a dummy hypercall to trigger event channel delivery, so responding within the kernel without exiting to userspace is beneficial.h]hXThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It configures the 32-bit version code returned to the guest when it invokes the XENVER_version call; typically (XEN_MAJOR << 16 | XEN_MINOR). PV Xen guests will often use this to as a dummy hypercall to trigger event channel delivery, so responding within the kernel without exiting to userspace is beneficial.}(hjy+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv+ubah}(h]h ]h"]h$]h&]uh1jhjd+ubeh}(h]h ]h"]h$]h&]uh1jhhhM hjL*hhubj)}(hXKVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG. It enables the XEN_RUNSTATE_UPDATE flag which allows guest vCPUs to safely read other vCPUs' vcpu_runstate_info. Xen guests enable this feature via the VMASST_TYPE_runstate_update_flag of the HYPERVISOR_vm_assist hypercall. h](j)}(h&KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAGh]h&KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj+ubj)}(hhh]h)}(hXYThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG. It enables the XEN_RUNSTATE_UPDATE flag which allows guest vCPUs to safely read other vCPUs' vcpu_runstate_info. Xen guests enable this feature via the VMASST_TYPE_runstate_update_flag of the HYPERVISOR_vm_assist hypercall.h]hX[This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG. It enables the XEN_RUNSTATE_UPDATE flag which allows guest vCPUs to safely read other vCPUs’ vcpu_runstate_info. Xen guests enable this feature via the VMASST_TYPE_runstate_update_flag of the HYPERVISOR_vm_assist hypercall.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjL*hhubeh}(h]h ]h"]h$]h&]uh1jhj/)hhhhhNubeh}(h]kvm-xen-hvm-set-attrah ]h"]4.126 kvm_xen_hvm_set_attrah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.127 KVM_XEN_HVM_GET_ATTRh]h4.127 KVM_XEN_HVM_GET_ATTR}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+hhhKubjy)}(h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFOh]h)}(hj+h]h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jxhj+ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,hhhKubjy)}(hx86h]h)}(hj%,h]hx86}(hj',hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#,ubah}(h]h ]h"]h$]h&]uh1jxhj,ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubjd)}(hhh](ji)}(hTypeh]hType}(hjC,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@,hhhKubjy)}(hvm ioctlh]h)}(hjS,h]hvm ioctl}(hjU,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQ,ubah}(h]h ]h"]h$]h&]uh1jxhj@,ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjq,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjn,hhhKubjy)}(hstruct kvm_xen_hvm_attrh]h)}(hj,h]hstruct kvm_xen_hvm_attr}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jxhjn,ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jxhj,ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubeh}(h]h ]h"]h$]h&]uh1j^hj+hhhhhMubh)}(hAllows Xen VM attributes to be read. For the structure and types, see KVM_XEN_HVM_SET_ATTR above. The KVM_XEN_ATTR_TYPE_EVTCHN attribute cannot be read.h]hAllows Xen VM attributes to be read. For the structure and types, see KVM_XEN_HVM_SET_ATTR above. The KVM_XEN_ATTR_TYPE_EVTCHN attribute cannot be read.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+hhubeh}(h]kvm-xen-hvm-get-attrah ]h"]4.127 kvm_xen_hvm_get_attrah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.128 KVM_XEN_VCPU_SET_ATTRh]h4.128 KVM_XEN_VCPU_SET_ATTR}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hhhhhM#ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,hhhKubjy)}(h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFOh]h)}(hj-h]h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj -ubah}(h]h ]h"]h$]h&]uh1jxhj,ubeh}(h]h ]h"]h$]h&]uh1jchhhM%hj,hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj,-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)-hhhKubjy)}(hx86h]h)}(hj<-h]hx86}(hj>-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hj:-ubah}(h]h ]h"]h$]h&]uh1jxhj)-ubeh}(h]h ]h"]h$]h&]uh1jchhhM&hj,hhubjd)}(hhh](ji)}(hTypeh]hType}(hjZ-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjW-hhhKubjy)}(h vcpu ioctlh]h)}(hjj-h]h vcpu ioctl}(hjl-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjh-ubah}(h]h ]h"]h$]h&]uh1jxhjW-ubeh}(h]h ]h"]h$]h&]uh1jchhhM'hj,hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj-hhhKubjy)}(hstruct kvm_xen_vcpu_attrh]h)}(hj-h]hstruct kvm_xen_vcpu_attr}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hj-ubah}(h]h ]h"]h$]h&]uh1jxhj-ubeh}(h]h ]h"]h$]h&]uh1jchhhM(hj,hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj-hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj-ubah}(h]h ]h"]h$]h&]uh1jxhj-ubeh}(h]h ]h"]h$]h&]uh1jchhhM)hj,hhubeh}(h]h ]h"]h$]h&]uh1j^hj,hhhhhM%ubj$)}(hXstruct kvm_xen_vcpu_attr { __u16 type; __u16 pad[3]; union { __u64 gpa; __u64 pad[4]; struct { __u64 state; __u64 state_entry_time; __u64 time_running; __u64 time_runnable; __u64 time_blocked; __u64 time_offline; } runstate; __u32 vcpu_id; struct { __u32 port; __u32 priority; __u64 expires_ns; } timer; __u8 vector; } u; };h]hXstruct kvm_xen_vcpu_attr { __u16 type; __u16 pad[3]; union { __u64 gpa; __u64 pad[4]; struct { __u64 state; __u64 state_entry_time; __u64 time_running; __u64 time_runnable; __u64 time_blocked; __u64 time_offline; } runstate; __u32 vcpu_id; struct { __u32 port; __u32 priority; __u64 expires_ns; } timer; __u8 vector; } u; };}hj-sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM-hj,hhubh)}(h type values:h]h type values:}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj,hhubj)}(hhh](j)}(hXKVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO Sets the guest physical address of the vcpu_info for a given vCPU. As with the shared_info page for the VM, the corresponding page may be dirtied at any time if event channel interrupt delivery is enabled, so userspace should always assume that the page is dirty without relying on dirty logging. Setting the gpa to KVM_XEN_INVALID_GPA will disable the vcpu_info. h](j)}(h KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFOh]h KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMMhj.ubj)}(hhh]h)}(hXkSets the guest physical address of the vcpu_info for a given vCPU. As with the shared_info page for the VM, the corresponding page may be dirtied at any time if event channel interrupt delivery is enabled, so userspace should always assume that the page is dirty without relying on dirty logging. Setting the gpa to KVM_XEN_INVALID_GPA will disable the vcpu_info.h]hXkSets the guest physical address of the vcpu_info for a given vCPU. As with the shared_info page for the VM, the corresponding page may be dirtied at any time if event channel interrupt delivery is enabled, so userspace should always assume that the page is dirty without relying on dirty logging. Setting the gpa to KVM_XEN_INVALID_GPA will disable the vcpu_info.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhhhMMhj.ubj)}(hXKKVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA If the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA flag is also set in the Xen capabilities, then this attribute may be used to set the userspace address of the vcpu_info for a given vCPU. It should only be used when the vcpu_info resides at the "default" location in the shared_info page. In this case it is safe to assume the userspace address will not change, because the shared_info page is an overlay on guest memory and remains at a fixed host address regardless of where it is mapped in guest physical address space and hence unnecessary invalidation of an internal cache may be avoided if the guest memory layout is modified. If the vcpu_info does not reside at the "default" location then it is not guaranteed to remain at the same host address and hence the aforementioned cache invalidation is required. h](j)}(h$KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVAh]h$KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA}(hj:.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM\hj6.ubj)}(hhh]h)}(hX%If the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA flag is also set in the Xen capabilities, then this attribute may be used to set the userspace address of the vcpu_info for a given vCPU. It should only be used when the vcpu_info resides at the "default" location in the shared_info page. In this case it is safe to assume the userspace address will not change, because the shared_info page is an overlay on guest memory and remains at a fixed host address regardless of where it is mapped in guest physical address space and hence unnecessary invalidation of an internal cache may be avoided if the guest memory layout is modified. If the vcpu_info does not reside at the "default" location then it is not guaranteed to remain at the same host address and hence the aforementioned cache invalidation is required.h]hX-If the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA flag is also set in the Xen capabilities, then this attribute may be used to set the userspace address of the vcpu_info for a given vCPU. It should only be used when the vcpu_info resides at the “default” location in the shared_info page. In this case it is safe to assume the userspace address will not change, because the shared_info page is an overlay on guest memory and remains at a fixed host address regardless of where it is mapped in guest physical address space and hence unnecessary invalidation of an internal cache may be avoided if the guest memory layout is modified. If the vcpu_info does not reside at the “default” location then it is not guaranteed to remain at the same host address and hence the aforementioned cache invalidation is required.}(hjK.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjH.ubah}(h]h ]h"]h$]h&]uh1jhj6.ubeh}(h]h ]h"]h$]h&]uh1jhhhM\hj.hhubj)}(hKVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO Sets the guest physical address of an additional pvclock structure for a given vCPU. This is typically used for guest vsyscall support. Setting the gpa to KVM_XEN_INVALID_GPA will disable the structure. h](j)}(h%KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFOh]h%KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO}(hji.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMahje.ubj)}(hhh]h)}(hSets the guest physical address of an additional pvclock structure for a given vCPU. This is typically used for guest vsyscall support. Setting the gpa to KVM_XEN_INVALID_GPA will disable the structure.h]hSets the guest physical address of an additional pvclock structure for a given vCPU. This is typically used for guest vsyscall support. Setting the gpa to KVM_XEN_INVALID_GPA will disable the structure.}(hjz.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjw.ubah}(h]h ]h"]h$]h&]uh1jhje.ubeh}(h]h ]h"]h$]h&]uh1jhhhMahj.hhubj)}(hKVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR Sets the guest physical address of the vcpu_runstate_info for a given vCPU. This is how a Xen guest tracks CPU state such as steal time. Setting the gpa to KVM_XEN_INVALID_GPA will disable the runstate area. h](j)}(h$KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDRh]h$KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMfhj.ubj)}(hhh]h)}(hSets the guest physical address of the vcpu_runstate_info for a given vCPU. This is how a Xen guest tracks CPU state such as steal time. Setting the gpa to KVM_XEN_INVALID_GPA will disable the runstate area.h]hSets the guest physical address of the vcpu_runstate_info for a given vCPU. This is how a Xen guest tracks CPU state such as steal time. Setting the gpa to KVM_XEN_INVALID_GPA will disable the runstate area.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhhhMfhj.hhubj)}(hX KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT Sets the runstate (RUNSTATE_running/_runnable/_blocked/_offline) of the given vCPU from the .u.runstate.state member of the structure. KVM automatically accounts running and runnable time but blocked and offline states are only entered explicitly. h](j)}(h'KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENTh]h'KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMlhj.ubj)}(hhh]h)}(hSets the runstate (RUNSTATE_running/_runnable/_blocked/_offline) of the given vCPU from the .u.runstate.state member of the structure. KVM automatically accounts running and runnable time but blocked and offline states are only entered explicitly.h]hSets the runstate (RUNSTATE_running/_runnable/_blocked/_offline) of the given vCPU from the .u.runstate.state member of the structure. KVM automatically accounts running and runnable time but blocked and offline states are only entered explicitly.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhhhMlhj.hhubj)}(hKVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_DATA Sets all fields of the vCPU runstate data from the .u.runstate member of the structure, including the current runstate. The state_entry_time must equal the sum of the other four times. h](j)}(h$KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_DATAh]h$KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_DATA}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMqhj.ubj)}(hhh]h)}(hSets all fields of the vCPU runstate data from the .u.runstate member of the structure, including the current runstate. The state_entry_time must equal the sum of the other four times.h]hSets all fields of the vCPU runstate data from the .u.runstate member of the structure, including the current runstate. The state_entry_time must equal the sum of the other four times.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohj/ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhhhMqhj.hhubj)}(hX KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST This *adds* the contents of the .u.runstate members of the structure to the corresponding members of the given vCPU's runstate data, thus permitting atomic adjustments to the runstate times. The adjustment to the state_entry_time must equal the sum of the adjustments to the other four times. The state field must be set to -1, or to a valid runstate value (RUNSTATE_running, RUNSTATE_runnable, RUNSTATE_blocked or RUNSTATE_offline) to set the current accounted state as of the adjusted state_entry_time. h](j)}(h&KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUSTh]h&KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST}(hj%/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM{hj!/ubj)}(hhh]h)}(hXThis *adds* the contents of the .u.runstate members of the structure to the corresponding members of the given vCPU's runstate data, thus permitting atomic adjustments to the runstate times. The adjustment to the state_entry_time must equal the sum of the adjustments to the other four times. The state field must be set to -1, or to a valid runstate value (RUNSTATE_running, RUNSTATE_runnable, RUNSTATE_blocked or RUNSTATE_offline) to set the current accounted state as of the adjusted state_entry_time.h](hThis }(hj6/hhhNhNubjn)}(h*adds*h]hadds}(hj>/hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj6/ubhX the contents of the .u.runstate members of the structure to the corresponding members of the given vCPU’s runstate data, thus permitting atomic adjustments to the runstate times. The adjustment to the state_entry_time must equal the sum of the adjustments to the other four times. The state field must be set to -1, or to a valid runstate value (RUNSTATE_running, RUNSTATE_runnable, RUNSTATE_blocked or RUNSTATE_offline) to set the current accounted state as of the adjusted state_entry_time.}(hj6/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMthj3/ubah}(h]h ]h"]h$]h&]uh1jhj!/ubeh}(h]h ]h"]h$]h&]uh1jhhhM{hj.hhubj)}(hXKVM_XEN_VCPU_ATTR_TYPE_VCPU_ID This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the Xen vCPU ID of the given vCPU, to allow timer-related VCPU operations to be intercepted by KVM. h](j)}(hKVM_XEN_VCPU_ATTR_TYPE_VCPU_IDh]hKVM_XEN_VCPU_ATTR_TYPE_VCPU_ID}(hjf/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjb/ubj)}(hhh]h)}(hThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the Xen vCPU ID of the given vCPU, to allow timer-related VCPU operations to be intercepted by KVM.h]hThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the Xen vCPU ID of the given vCPU, to allow timer-related VCPU operations to be intercepted by KVM.}(hjw/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hjt/ubah}(h]h ]h"]h$]h&]uh1jhjb/ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj.hhubj)}(hXjKVM_XEN_VCPU_ATTR_TYPE_TIMER This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the event channel port/priority for the VIRQ_TIMER of the vCPU, as well as allowing a pending timer to be saved/restored. Setting the timer port to zero disables kernel handling of the singleshot timer. h](j)}(hKVM_XEN_VCPU_ATTR_TYPE_TIMERh]hKVM_XEN_VCPU_ATTR_TYPE_TIMER}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj/ubj)}(hhh]h)}(hXLThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the event channel port/priority for the VIRQ_TIMER of the vCPU, as well as allowing a pending timer to be saved/restored. Setting the timer port to zero disables kernel handling of the singleshot timer.h]hXLThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the event channel port/priority for the VIRQ_TIMER of the vCPU, as well as allowing a pending timer to be saved/restored. Setting the timer port to zero disables kernel handling of the singleshot timer.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj.hhubj)}(hXKVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the per-vCPU local APIC upcall vector, configured by a Xen guest with the HVMOP_set_evtchn_upcall_vector hypercall. This is typically used by Windows guests, and is distinct from the HVM-wide upcall vector configured with HVM_PARAM_CALLBACK_IRQ. It is disabled by setting the vector to zero. h](j)}(h$KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTORh]h$KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj/ubj)}(hhh]h)}(hXThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the per-vCPU local APIC upcall vector, configured by a Xen guest with the HVMOP_set_evtchn_upcall_vector hypercall. This is typically used by Windows guests, and is distinct from the HVM-wide upcall vector configured with HVM_PARAM_CALLBACK_IRQ. It is disabled by setting the vector to zero.h]hXThis attribute is available when the KVM_CAP_XEN_HVM ioctl indicates support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the per-vCPU local APIC upcall vector, configured by a Xen guest with the HVMOP_set_evtchn_upcall_vector hypercall. This is typically used by Windows guests, and is distinct from the HVM-wide upcall vector configured with HVM_PARAM_CALLBACK_IRQ. It is disabled by setting the vector to zero.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj.hhubeh}(h]h ]h"]h$]h&]uh1jhj,hhhhhNubeh}(h]kvm-xen-vcpu-set-attrah ]h"]4.128 kvm_xen_vcpu_set_attrah$]h&]uh1hhjhhhhhM#ubh)}(hhh](h)}(h4.129 KVM_XEN_VCPU_GET_ATTRh]h4.129 KVM_XEN_VCPU_GET_ATTR}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0hhhKubjy)}(h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFOh]h)}(hj$0h]h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO}(hj&0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"0ubah}(h]h ]h"]h$]h&]uh1jxhj0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjB0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?0hhhKubjy)}(hx86h]h)}(hjR0h]hx86}(hjT0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjP0ubah}(h]h ]h"]h$]h&]uh1jxhj?0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(hhh](ji)}(hTypeh]hType}(hjp0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjm0hhhKubjy)}(h vcpu ioctlh]h)}(hj0h]h vcpu ioctl}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~0ubah}(h]h ]h"]h$]h&]uh1jxhjm0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0hhhKubjy)}(hstruct kvm_xen_vcpu_attrh]h)}(hj0h]hstruct kvm_xen_vcpu_attr}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jxhj0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jxhj0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubeh}(h]h ]h"]h$]h&]uh1j^hj/hhhhhMubh)}(hdAllows Xen vCPU attributes to be read. For the structure and types, see KVM_XEN_VCPU_SET_ATTR above.h]hdAllows Xen vCPU attributes to be read. For the structure and types, see KVM_XEN_VCPU_SET_ATTR above.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubh)}(heThe KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST type may not be used with the KVM_XEN_VCPU_GET_ATTR ioctl.h]heThe KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST type may not be used with the KVM_XEN_VCPU_GET_ATTR ioctl.}(hj 1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubeh}(h]kvm-xen-vcpu-get-attrah ]h"]4.129 kvm_xen_vcpu_get_attrah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.130 KVM_ARM_MTE_COPY_TAGSh]h4.130 KVM_ARM_MTE_COPY_TAGS}(hj%1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"1hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj91hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj61hhhKubjy)}(hKVM_CAP_ARM_MTEh]h)}(hjI1h]hKVM_CAP_ARM_MTE}(hjK1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjG1ubah}(h]h ]h"]h$]h&]uh1jxhj61ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj31hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjg1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjd1hhhKubjy)}(harm64h]h)}(hjw1h]harm64}(hjy1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhju1ubah}(h]h ]h"]h$]h&]uh1jxhjd1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj31hhubjd)}(hhh](ji)}(hTypeh]hType}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(hvm ioctlh]h)}(hj1h]hvm ioctl}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj31hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(hstruct kvm_arm_copy_mte_tagsh]h)}(hj1h]hstruct kvm_arm_copy_mte_tags}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj31hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(hnnumber of bytes copied, < 0 on error (-EINVAL for incorrect arguments, -EFAULT if memory cannot be accessed). h]h)}(hmnumber of bytes copied, < 0 on error (-EINVAL for incorrect arguments, -EFAULT if memory cannot be accessed).h]hmnumber of bytes copied, < 0 on error (-EINVAL for incorrect arguments, -EFAULT if memory cannot be accessed).}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj31hhubeh}(h]h ]h"]h$]h&]uh1j^hj"1hhhhhMubj$)}(hstruct kvm_arm_copy_mte_tags { __u64 guest_ipa; __u64 length; void __user *addr; __u64 flags; __u64 reserved[2]; };h]hstruct kvm_arm_copy_mte_tags { __u64 guest_ipa; __u64 length; void __user *addr; __u64 flags; __u64 reserved[2]; };}hj#2sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj"1hhubh)}(hXCopies Memory Tagging Extension (MTE) tags to/from guest tag memory. The ``guest_ipa`` and ``length`` fields must be ``PAGE_SIZE`` aligned. ``length`` must not be bigger than 2^31 - PAGE_SIZE bytes. The ``addr`` field must point to a buffer which the tags will be copied to or from.h](hICopies Memory Tagging Extension (MTE) tags to/from guest tag memory. The }(hj12hhhNhNubj)}(h ``guest_ipa``h]h guest_ipa}(hj92hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj12ubh and }(hj12hhhNhNubj)}(h ``length``h]hlength}(hjK2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj12ubh fields must be }(hj12hhhNhNubj)}(h ``PAGE_SIZE``h]h PAGE_SIZE}(hj]2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj12ubh aligned. }(hj12hhhNhNubj)}(h ``length``h]hlength}(hjo2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj12ubh5 must not be bigger than 2^31 - PAGE_SIZE bytes. The }(hj12hhhNhNubj)}(h``addr``h]haddr}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj12ubhG field must point to a buffer which the tags will be copied to or from.}(hj12hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj"1hhubh)}(hk``flags`` specifies the direction of copy, either ``KVM_ARM_TAGS_TO_GUEST`` or ``KVM_ARM_TAGS_FROM_GUEST``.h](j)}(h ``flags``h]hflags}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh) specifies the direction of copy, either }(hj2hhhNhNubj)}(h``KVM_ARM_TAGS_TO_GUEST``h]hKVM_ARM_TAGS_TO_GUEST}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh or }(hj2hhhNhNubj)}(h``KVM_ARM_TAGS_FROM_GUEST``h]hKVM_ARM_TAGS_FROM_GUEST}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj"1hhubh)}(hThe size of the buffer to store the tags is ``(length / 16)`` bytes (granules in MTE are 16 bytes long). Each byte contains a single tag value. This matches the format of ``PTRACE_PEEKMTETAGS`` and ``PTRACE_POKEMTETAGS``.h](h,The size of the buffer to store the tags is }(hj2hhhNhNubj)}(h``(length / 16)``h]h (length / 16)}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubhn bytes (granules in MTE are 16 bytes long). Each byte contains a single tag value. This matches the format of }(hj2hhhNhNubj)}(h``PTRACE_PEEKMTETAGS``h]hPTRACE_PEEKMTETAGS}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh and }(hj2hhhNhNubj)}(h``PTRACE_POKEMTETAGS``h]hPTRACE_POKEMTETAGS}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj"1hhubh)}(hXIf an error occurs before any data is copied then a negative error code is returned. If some tags have been copied before an error occurs then the number of bytes successfully copied is returned. If the call completes successfully then ``length`` is returned.h](hIf an error occurs before any data is copied then a negative error code is returned. If some tags have been copied before an error occurs then the number of bytes successfully copied is returned. If the call completes successfully then }(hj3hhhNhNubj)}(h ``length``h]hlength}(hj%3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh is returned.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj"1hhubeh}(h]kvm-arm-mte-copy-tagsah ]h"]4.130 kvm_arm_mte_copy_tagsah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.131 KVM_GET_SREGS2h]h4.131 KVM_GET_SREGS2}(hjH3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE3hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj\3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjY3hhhKubjy)}(hKVM_CAP_SREGS2h]h)}(hjl3h]hKVM_CAP_SREGS2}(hjn3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj3ubah}(h]h ]h"]h$]h&]uh1jxhjY3ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjV3hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3hhhKubjy)}(hx86h]h)}(hj3h]hx86}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jxhj3ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjV3hhubjd)}(hhh](ji)}(hTypeh]hType}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3hhhKubjy)}(h vcpu ioctlh]h)}(hj3h]h vcpu ioctl}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jxhj3ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjV3hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3hhhKubjy)}(hstruct kvm_sregs2 (out)h]h)}(hj3h]hstruct kvm_sregs2 (out)}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jxhj3ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjV3hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj&4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"4ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjV3hhubeh}(h]h ]h"]h$]h&]uh1j^hjE3hhhhhMubh)}(h^Reads special registers from the vcpu. This ioctl (when supported) replaces the KVM_GET_SREGS.h]h^Reads special registers from the vcpu. This ioctl (when supported) replaces the KVM_GET_SREGS.}(hjF4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjE3hhubj$)}(hXLstruct kvm_sregs2 { /* out (KVM_GET_SREGS2) / in (KVM_SET_SREGS2) */ struct kvm_segment cs, ds, es, fs, gs, ss; struct kvm_segment tr, ldt; struct kvm_dtable gdt, idt; __u64 cr0, cr2, cr3, cr4, cr8; __u64 efer; __u64 apic_base; __u64 flags; __u64 pdptrs[4]; };h]hXLstruct kvm_sregs2 { /* out (KVM_GET_SREGS2) / in (KVM_SET_SREGS2) */ struct kvm_segment cs, ds, es, fs, gs, ss; struct kvm_segment tr, ldt; struct kvm_dtable gdt, idt; __u64 cr0, cr2, cr3, cr4, cr8; __u64 efer; __u64 apic_base; __u64 flags; __u64 pdptrs[4]; };}hjT4sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjE3hhubh)}(h flags values for ``kvm_sregs2``:h](hflags values for }(hjb4hhhNhNubj)}(h``kvm_sregs2``h]h kvm_sregs2}(hjj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb4ubh:}(hjb4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjE3hhubh)}(h!``KVM_SREGS2_FLAGS_PDPTRS_VALID``h]j)}(hj4h]hKVM_SREGS2_FLAGS_PDPTRS_VALID}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hhhhMhjE3hhubh)}(h8Indicates that the struct contains valid PDPTR values. h]h)}(h6Indicates that the struct contains valid PDPTR values.h]h6Indicates that the struct contains valid PDPTR values.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1hhhhMhjE3hhubeh}(h]kvm-get-sregs2ah ]h"]4.131 kvm_get_sregs2ah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.132 KVM_SET_SREGS2h]h4.132 KVM_SET_SREGS2}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hKVM_CAP_SREGS2h]h)}(hj4h]hKVM_CAP_SREGS2}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj4hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hx86h]h)}(hj5h]hx86}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj 5ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj4hhubjd)}(hhh](ji)}(hTypeh]hType}(hj,5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)5hhhKubjy)}(h vcpu ioctlh]h)}(hj<5h]h vcpu ioctl}(hj>5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:5ubah}(h]h ]h"]h$]h&]uh1jxhj)5ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj4hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjZ5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjW5hhhKubjy)}(hstruct kvm_sregs2 (in)h]h)}(hjj5h]hstruct kvm_sregs2 (in)}(hjl5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh5ubah}(h]h ]h"]h$]h&]uh1jxhjW5ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj4hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5ubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj4hhubeh}(h]h ]h"]h$]h&]uh1j^hj4hhhhhMubh)}(hWrites special registers into the vcpu. See KVM_GET_SREGS2 for the data structures. This ioctl (when supported) replaces the KVM_SET_SREGS.h]hWrites special registers into the vcpu. See KVM_GET_SREGS2 for the data structures. This ioctl (when supported) replaces the KVM_SET_SREGS.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4hhubeh}(h]kvm-set-sregs2ah ]h"]4.132 kvm_set_sregs2ah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.133 KVM_GET_STATS_FDh]h4.133 KVM_GET_STATS_FD}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(hKVM_CAP_STATS_BINARY_FDh]h)}(hj5h]hKVM_CAP_STATS_BINARY_FD}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5ubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj6hhhKubjy)}(hallh]h)}(hj%6h]hall}(hj'6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#6ubah}(h]h ]h"]h$]h&]uh1jxhj6ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubjd)}(hhh](ji)}(hTypeh]hType}(hjC6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@6hhhKubjy)}(hvm ioctl, vcpu ioctlh]h)}(hjS6h]hvm ioctl, vcpu ioctl}(hjU6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQ6ubah}(h]h ]h"]h$]h&]uh1jxhj@6ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjq6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjn6hhhKubjy)}(hnoneh]h)}(hj6h]hnone}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jxhjn6ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj6hhhKubjy)}(h4statistics file descriptor on success, < 0 on error h]h)}(h3statistics file descriptor on success, < 0 on errorh]h3statistics file descriptor on success, < 0 on error}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jxhj6ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubeh}(h]h ]h"]h$]h&]uh1j^hj5hhhhhMubh)}(hErrors:h]hErrors:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(h====== ====================================================== ENOMEM if the fd could not be created due to lack of memory EMFILE if the number of opened files exceeds the limit ====== ====================================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj6ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK6uh1jOhj6ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hENOMEMh]hENOMEM}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1johj7ubjp)}(hhh]h)}(h4if the fd could not be created due to lack of memoryh]h4if the fd could not be created due to lack of memory}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1johj7ubeh}(h]h ]h"]h$]h&]uh1jjhj6ubjk)}(hhh](jp)}(hhh]h)}(hEMFILEh]hEMFILE}(hj=7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:7ubah}(h]h ]h"]h$]h&]uh1johj77ubjp)}(hhh]h)}(h/if the number of opened files exceeds the limith]h/if the number of opened files exceeds the limit}(hjT7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQ7ubah}(h]h ]h"]h$]h&]uh1johj77ubeh}(h]h ]h"]h$]h&]uh1jjhj6ubeh}(h]h ]h"]h$]h&]uh1jehj6ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj6ubah}(h]h ]h"]h$]h&]uh1jEhj6ubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hThe returned file descriptor can be used to read VM/vCPU statistics data in binary format. The data in the file descriptor consists of four blocks organized as follows:h]hThe returned file descriptor can be used to read VM/vCPU statistics data in binary format. The data in the file descriptor consists of four blocks organized as follows:}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhj7ubjf)}(hhh](jk)}(hhh]jp)}(hhh]h)}(hHeaderh]hHeader}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj7ubah}(h]h ]h"]h$]h&]uh1johj7ubah}(h]h ]h"]h$]h&]uh1jjhj7ubjk)}(hhh]jp)}(hhh]h)}(h id stringh]h id string}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1johj7ubah}(h]h ]h"]h$]h&]uh1jjhj7ubjk)}(hhh]jp)}(hhh]h)}(h Descriptorsh]h Descriptors}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1johj7ubah}(h]h ]h"]h$]h&]uh1jjhj7ubjk)}(hhh]jp)}(hhh]h)}(h Stats Datah]h Stats Data}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj 8ubah}(h]h ]h"]h$]h&]uh1johj8ubah}(h]h ]h"]h$]h&]uh1jjhj7ubeh}(h]h ]h"]h$]h&]uh1jehj7ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj7ubah}(h]h ]h"]h$]h&]uh1jEhj5hhhhhNubh)}(hX7Apart from the header starting at offset 0, please be aware that it is not guaranteed that the four blocks are adjacent or in the above order; the offsets of the id, descriptors and data blocks are found in the header. However, all four blocks are aligned to 64 bit offsets in the file and they do not overlap.h]hX7Apart from the header starting at offset 0, please be aware that it is not guaranteed that the four blocks are adjacent or in the above order; the offsets of the id, descriptors and data blocks are found in the header. However, all four blocks are aligned to 64 bit offsets in the file and they do not overlap.}(hj;8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hAll blocks except the data block are immutable. Userspace can read them only one time after retrieving the file descriptor, and then use ``pread`` or ``lseek`` to read the statistics repeatedly.h](hAll blocks except the data block are immutable. Userspace can read them only one time after retrieving the file descriptor, and then use }(hjI8hhhNhNubj)}(h ``pread``h]hpread}(hjQ8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjI8ubh or }(hjI8hhhNhNubj)}(h ``lseek``h]hlseek}(hjc8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjI8ubh# to read the statistics repeatedly.}(hjI8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(h!All data is in system endianness.h]h!All data is in system endianness.}(hj{8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(h(The format of the header is as follows::h]h'The format of the header is as follows:}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj5hhubj$)}(hstruct kvm_stats_header { __u32 flags; __u32 name_size; __u32 num_desc; __u32 id_offset; __u32 desc_offset; __u32 data_offset; };h]hstruct kvm_stats_header { __u32 flags; __u32 name_size; __u32 num_desc; __u32 id_offset; __u32 desc_offset; __u32 data_offset; };}hj8sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM#hj5hhubh)}(hFThe ``flags`` field is not used at the moment. It is always read as 0.h](hThe }(hj8hhhNhNubj)}(h ``flags``h]hflags}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh9 field is not used at the moment. It is always read as 0.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM,hj5hhubh)}(hThe ``name_size`` field is the size (in byte) of the statistics name string (including trailing '\0') which is contained in the "id string" block and appended at the end of every descriptor.h](hThe }(hj8hhhNhNubj)}(h ``name_size``h]h name_size}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh field is the size (in byte) of the statistics name string (including trailing ‘0’) which is contained in the “id string” block and appended at the end of every descriptor.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM.hj5hhubh)}(hThe ``num_desc`` field is the number of descriptors that are included in the descriptor block. (The actual number of values in the data block may be larger, since each descriptor may comprise more than one value).h](hThe }(hj8hhhNhNubj)}(h ``num_desc``h]hnum_desc}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh field is the number of descriptors that are included in the descriptor block. (The actual number of values in the data block may be larger, since each descriptor may comprise more than one value).}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM2hj5hhubh)}(hThe ``id_offset`` field is the offset of the id string from the start of the file indicated by the file descriptor. It is a multiple of 8.h](hThe }(hj9hhhNhNubj)}(h ``id_offset``h]h id_offset}(hj 9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubhy field is the offset of the id string from the start of the file indicated by the file descriptor. It is a multiple of 8.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM6hj5hhubh)}(hThe ``desc_offset`` field is the offset of the Descriptors block from the start of the file indicated by the file descriptor. It is a multiple of 8.h](hThe }(hj%9hhhNhNubj)}(h``desc_offset``h]h desc_offset}(hj-9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%9ubh field is the offset of the Descriptors block from the start of the file indicated by the file descriptor. It is a multiple of 8.}(hj%9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM9hj5hhubh)}(hThe ``data_offset`` field is the offset of the Stats Data block from the start of the file indicated by the file descriptor. It is a multiple of 8.h](hThe }(hjE9hhhNhNubj)}(h``data_offset``h]h data_offset}(hjM9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE9ubh field is the offset of the Stats Data block from the start of the file indicated by the file descriptor. It is a multiple of 8.}(hjE9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM<hj5hhubh)}(hThe id string block contains a string which identifies the file descriptor on which KVM_GET_STATS_FD was invoked. The size of the block, including the trailing ``'\0'``, is indicated by the ``name_size`` field in the header.h](hThe id string block contains a string which identifies the file descriptor on which KVM_GET_STATS_FD was invoked. The size of the block, including the trailing }(hje9hhhNhNubj)}(h``'\0'``h]h'\0'}(hjm9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje9ubh, is indicated by the }(hje9hhhNhNubj)}(h ``name_size``h]h name_size}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje9ubh field in the header.}(hje9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM?hj5hhubh)}(hThe descriptors block is only needed to be read once for the lifetime of the file descriptor contains a sequence of ``struct kvm_stats_desc``, each followed by a string of size ``name_size``. ::h](htThe descriptors block is only needed to be read once for the lifetime of the file descriptor contains a sequence of }(hj9hhhNhNubj)}(h``struct kvm_stats_desc``h]hstruct kvm_stats_desc}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh$, each followed by a string of size }(hj9hhhNhNubj)}(h ``name_size``h]h name_size}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMChj5hhubj$)}(hX#define KVM_STATS_TYPE_SHIFT 0 #define KVM_STATS_TYPE_MASK (0xF << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_CUMULATIVE (0x0 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_INSTANT (0x1 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_PEAK (0x2 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_LINEAR_HIST (0x3 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_LOG_HIST (0x4 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_MAX KVM_STATS_TYPE_LOG_HIST #define KVM_STATS_UNIT_SHIFT 4 #define KVM_STATS_UNIT_MASK (0xF << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_NONE (0x0 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_BYTES (0x1 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_SECONDS (0x2 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_CYCLES (0x3 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_BOOLEAN (0x4 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_MAX KVM_STATS_UNIT_BOOLEAN #define KVM_STATS_BASE_SHIFT 8 #define KVM_STATS_BASE_MASK (0xF << KVM_STATS_BASE_SHIFT) #define KVM_STATS_BASE_POW10 (0x0 << KVM_STATS_BASE_SHIFT) #define KVM_STATS_BASE_POW2 (0x1 << KVM_STATS_BASE_SHIFT) #define KVM_STATS_BASE_MAX KVM_STATS_BASE_POW2 struct kvm_stats_desc { __u32 flags; __s16 exponent; __u16 size; __u32 offset; __u32 bucket_size; char name[]; };h]hX#define KVM_STATS_TYPE_SHIFT 0 #define KVM_STATS_TYPE_MASK (0xF << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_CUMULATIVE (0x0 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_INSTANT (0x1 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_PEAK (0x2 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_LINEAR_HIST (0x3 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_LOG_HIST (0x4 << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_MAX KVM_STATS_TYPE_LOG_HIST #define KVM_STATS_UNIT_SHIFT 4 #define KVM_STATS_UNIT_MASK (0xF << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_NONE (0x0 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_BYTES (0x1 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_SECONDS (0x2 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_CYCLES (0x3 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_BOOLEAN (0x4 << KVM_STATS_UNIT_SHIFT) #define KVM_STATS_UNIT_MAX KVM_STATS_UNIT_BOOLEAN #define KVM_STATS_BASE_SHIFT 8 #define KVM_STATS_BASE_MASK (0xF << KVM_STATS_BASE_SHIFT) #define KVM_STATS_BASE_POW10 (0x0 << KVM_STATS_BASE_SHIFT) #define KVM_STATS_BASE_POW2 (0x1 << KVM_STATS_BASE_SHIFT) #define KVM_STATS_BASE_MAX KVM_STATS_BASE_POW2 struct kvm_stats_desc { __u32 flags; __s16 exponent; __u16 size; __u32 offset; __u32 bucket_size; char name[]; };}hj9sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMHhj5hhubh)}(hThe ``flags`` field contains the type and unit of the statistics data described by this descriptor. Its endianness is CPU native. The following flags are supported:h](hThe }(hj9hhhNhNubj)}(h ``flags``h]hflags}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh field contains the type and unit of the statistics data described by this descriptor. Its endianness is CPU native. The following flags are supported:}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMihj5hhubh)}(h&Bits 0-3 of ``flags`` encode the type:h](h Bits 0-3 of }(hj9hhhNhNubj)}(h ``flags``h]hflags}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh encode the type:}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMmhj5hhubh)}(hX* ``KVM_STATS_TYPE_CUMULATIVE`` The statistics reports a cumulative count. The value of data can only be increased. Most of the counters used in KVM are of this type. The corresponding ``size`` field for this type is always 1. All cumulative statistics data are read/write. * ``KVM_STATS_TYPE_INSTANT`` The statistics reports an instantaneous value. Its value can be increased or decreased. This type is usually used as a measurement of some resources, like the number of dirty pages, the number of large pages, etc. All instant statistics are read only. The corresponding ``size`` field for this type is always 1. * ``KVM_STATS_TYPE_PEAK`` The statistics data reports a peak value, for example the maximum number of items in a hash table bucket, the longest time waited and so on. The value of data can only be increased. The corresponding ``size`` field for this type is always 1. * ``KVM_STATS_TYPE_LINEAR_HIST`` The statistic is reported as a linear histogram. The number of buckets is specified by the ``size`` field. The size of buckets is specified by the ``hist_param`` field. The range of the Nth bucket (1 <= N < ``size``) is [``hist_param``*(N-1), ``hist_param``*N), while the range of the last bucket is [``hist_param``*(``size``-1), +INF). (+INF means positive infinity value.) * ``KVM_STATS_TYPE_LOG_HIST`` The statistic is reported as a logarithmic histogram. The number of buckets is specified by the ``size`` field. The range of the first bucket is [0, 1), while the range of the last bucket is [pow(2, ``size``-2), +INF). Otherwise, The Nth bucket (1 < N < ``size``) covers [pow(2, N-2), pow(2, N-1)). h]h)}(hhh](j)}(hX``KVM_STATS_TYPE_CUMULATIVE`` The statistics reports a cumulative count. The value of data can only be increased. Most of the counters used in KVM are of this type. The corresponding ``size`` field for this type is always 1. All cumulative statistics data are read/write.h]h)}(hX``KVM_STATS_TYPE_CUMULATIVE`` The statistics reports a cumulative count. The value of data can only be increased. Most of the counters used in KVM are of this type. The corresponding ``size`` field for this type is always 1. All cumulative statistics data are read/write.h](j)}(h``KVM_STATS_TYPE_CUMULATIVE``h]hKVM_STATS_TYPE_CUMULATIVE}(hj&:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj":ubh The statistics reports a cumulative count. The value of data can only be increased. Most of the counters used in KVM are of this type. The corresponding }(hj":hhhNhNubj)}(h``size``h]hsize}(hj8:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj":ubhP field for this type is always 1. All cumulative statistics data are read/write.}(hj":hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMohj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hXR``KVM_STATS_TYPE_INSTANT`` The statistics reports an instantaneous value. Its value can be increased or decreased. This type is usually used as a measurement of some resources, like the number of dirty pages, the number of large pages, etc. All instant statistics are read only. The corresponding ``size`` field for this type is always 1.h]h)}(hXR``KVM_STATS_TYPE_INSTANT`` The statistics reports an instantaneous value. Its value can be increased or decreased. This type is usually used as a measurement of some resources, like the number of dirty pages, the number of large pages, etc. All instant statistics are read only. The corresponding ``size`` field for this type is always 1.h](j)}(h``KVM_STATS_TYPE_INSTANT``h]hKVM_STATS_TYPE_INSTANT}(hj^:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ:ubhX The statistics reports an instantaneous value. Its value can be increased or decreased. This type is usually used as a measurement of some resources, like the number of dirty pages, the number of large pages, etc. All instant statistics are read only. The corresponding }(hjZ:hhhNhNubj)}(h``size``h]hsize}(hjp:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ:ubh! field for this type is always 1.}(hjZ:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMthjV:ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hX ``KVM_STATS_TYPE_PEAK`` The statistics data reports a peak value, for example the maximum number of items in a hash table bucket, the longest time waited and so on. The value of data can only be increased. The corresponding ``size`` field for this type is always 1.h]h)}(hX ``KVM_STATS_TYPE_PEAK`` The statistics data reports a peak value, for example the maximum number of items in a hash table bucket, the longest time waited and so on. The value of data can only be increased. The corresponding ``size`` field for this type is always 1.h](j)}(h``KVM_STATS_TYPE_PEAK``h]hKVM_STATS_TYPE_PEAK}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh The statistics data reports a peak value, for example the maximum number of items in a hash table bucket, the longest time waited and so on. The value of data can only be increased. The corresponding }(hj:hhhNhNubj)}(h``size``h]hsize}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh! field for this type is always 1.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMzhj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hX``KVM_STATS_TYPE_LINEAR_HIST`` The statistic is reported as a linear histogram. The number of buckets is specified by the ``size`` field. The size of buckets is specified by the ``hist_param`` field. The range of the Nth bucket (1 <= N < ``size``) is [``hist_param``*(N-1), ``hist_param``*N), while the range of the last bucket is [``hist_param``*(``size``-1), +INF). (+INF means positive infinity value.)h]h)}(hX``KVM_STATS_TYPE_LINEAR_HIST`` The statistic is reported as a linear histogram. The number of buckets is specified by the ``size`` field. The size of buckets is specified by the ``hist_param`` field. The range of the Nth bucket (1 <= N < ``size``) is [``hist_param``*(N-1), ``hist_param``*N), while the range of the last bucket is [``hist_param``*(``size``-1), +INF). (+INF means positive infinity value.)h](j)}(h``KVM_STATS_TYPE_LINEAR_HIST``h]hKVM_STATS_TYPE_LINEAR_HIST}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh\ The statistic is reported as a linear histogram. The number of buckets is specified by the }(hj:hhhNhNubj)}(h``size``h]hsize}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh0 field. The size of buckets is specified by the }(hj:hhhNhNubj)}(h``hist_param``h]h hist_param}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh. field. The range of the Nth bucket (1 <= N < }(hj:hhhNhNubj)}(h``size``h]hsize}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh) is [}(hj:hhhNhNubj)}(hh``hist_param``*(N-1), ``hist_param``*N), while the range of the last bucket is [``hist_param``*(``size``h]hdhist_param``*(N-1), ``hist_param``*N), while the range of the last bucket is [``hist_param``*(``size}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh1-1), +INF). (+INF means positive infinity value.)}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hXG``KVM_STATS_TYPE_LOG_HIST`` The statistic is reported as a logarithmic histogram. The number of buckets is specified by the ``size`` field. The range of the first bucket is [0, 1), while the range of the last bucket is [pow(2, ``size``-2), +INF). Otherwise, The Nth bucket (1 < N < ``size``) covers [pow(2, N-2), pow(2, N-1)). h]h)}(hXF``KVM_STATS_TYPE_LOG_HIST`` The statistic is reported as a logarithmic histogram. The number of buckets is specified by the ``size`` field. The range of the first bucket is [0, 1), while the range of the last bucket is [pow(2, ``size``-2), +INF). Otherwise, The Nth bucket (1 < N < ``size``) covers [pow(2, N-2), pow(2, N-1)).h](j)}(h``KVM_STATS_TYPE_LOG_HIST``h]hKVM_STATS_TYPE_LOG_HIST}(hj<;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8;ubha The statistic is reported as a logarithmic histogram. The number of buckets is specified by the }(hj8;hhhNhNubj)}(h``size``h]hsize}(hjN;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8;ubh_ field. The range of the first bucket is [0, 1), while the range of the last bucket is [pow(2, }(hj8;hhhNhNubj)}(h``size``h]hsize}(hj`;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8;ubh/-2), +INF). Otherwise, The Nth bucket (1 < N < }(hj8;hhhNhNubj)}(h``size``h]hsize}(hjr;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8;ubh$) covers [pow(2, N-2), pow(2, N-1)).}(hj8;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj4;ubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]jj uh1hhhhMohj:ubah}(h]h ]h"]h$]h&]uh1hhhhMohj5hhubh)}(h&Bits 4-7 of ``flags`` encode the unit:h](h Bits 4-7 of }(hj;hhhNhNubj)}(h ``flags``h]hflags}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh encode the unit:}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hXU* ``KVM_STATS_UNIT_NONE`` There is no unit for the value of statistics data. This usually means that the value is a simple counter of an event. * ``KVM_STATS_UNIT_BYTES`` It indicates that the statistics data is used to measure memory size, in the unit of Byte, KiByte, MiByte, GiByte, etc. The unit of the data is determined by the ``exponent`` field in the descriptor. * ``KVM_STATS_UNIT_SECONDS`` It indicates that the statistics data is used to measure time or latency. * ``KVM_STATS_UNIT_CYCLES`` It indicates that the statistics data is used to measure CPU clock cycles. * ``KVM_STATS_UNIT_BOOLEAN`` It indicates that the statistic will always be either 0 or 1. Boolean statistics of "peak" type will never go back from 1 to 0. Boolean statistics can be linear histograms (with two buckets) but not logarithmic histograms. h]h)}(hhh](j)}(h``KVM_STATS_UNIT_NONE`` There is no unit for the value of statistics data. This usually means that the value is a simple counter of an event.h]h)}(h``KVM_STATS_UNIT_NONE`` There is no unit for the value of statistics data. This usually means that the value is a simple counter of an event.h](j)}(h``KVM_STATS_UNIT_NONE``h]hKVM_STATS_UNIT_NONE}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubhv There is no unit for the value of statistics data. This usually means that the value is a simple counter of an event.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(h``KVM_STATS_UNIT_BYTES`` It indicates that the statistics data is used to measure memory size, in the unit of Byte, KiByte, MiByte, GiByte, etc. The unit of the data is determined by the ``exponent`` field in the descriptor.h]h)}(h``KVM_STATS_UNIT_BYTES`` It indicates that the statistics data is used to measure memory size, in the unit of Byte, KiByte, MiByte, GiByte, etc. The unit of the data is determined by the ``exponent`` field in the descriptor.h](j)}(h``KVM_STATS_UNIT_BYTES``h]hKVM_STATS_UNIT_BYTES}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh It indicates that the statistics data is used to measure memory size, in the unit of Byte, KiByte, MiByte, GiByte, etc. The unit of the data is determined by the }(hj;hhhNhNubj)}(h ``exponent``h]hexponent}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh field in the descriptor.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(hd``KVM_STATS_UNIT_SECONDS`` It indicates that the statistics data is used to measure time or latency.h]h)}(hd``KVM_STATS_UNIT_SECONDS`` It indicates that the statistics data is used to measure time or latency.h](j)}(h``KVM_STATS_UNIT_SECONDS``h]hKVM_STATS_UNIT_SECONDS}(hj)<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%<ubhJ It indicates that the statistics data is used to measure time or latency.}(hj%<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj!<ubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(hd``KVM_STATS_UNIT_CYCLES`` It indicates that the statistics data is used to measure CPU clock cycles.h]h)}(hd``KVM_STATS_UNIT_CYCLES`` It indicates that the statistics data is used to measure CPU clock cycles.h](j)}(h``KVM_STATS_UNIT_CYCLES``h]hKVM_STATS_UNIT_CYCLES}(hjO<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK<ubhK It indicates that the statistics data is used to measure CPU clock cycles.}(hjK<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjG<ubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(h``KVM_STATS_UNIT_BOOLEAN`` It indicates that the statistic will always be either 0 or 1. Boolean statistics of "peak" type will never go back from 1 to 0. Boolean statistics can be linear histograms (with two buckets) but not logarithmic histograms. h]h)}(h``KVM_STATS_UNIT_BOOLEAN`` It indicates that the statistic will always be either 0 or 1. Boolean statistics of "peak" type will never go back from 1 to 0. Boolean statistics can be linear histograms (with two buckets) but not logarithmic histograms.h](j)}(h``KVM_STATS_UNIT_BOOLEAN``h]hKVM_STATS_UNIT_BOOLEAN}(hju<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjq<ubh It indicates that the statistic will always be either 0 or 1. Boolean statistics of “peak” type will never go back from 1 to 0. Boolean statistics can be linear histograms (with two buckets) but not logarithmic histograms.}(hjq<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjm<ubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]jj uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hNote that, in the case of histograms, the unit applies to the bucket ranges, while the bucket value indicates how many samples fell in the bucket's range.h]hNote that, in the case of histograms, the unit applies to the bucket ranges, while the bucket value indicates how many samples fell in the bucket’s range.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hQBits 8-11 of ``flags``, together with ``exponent``, encode the scale of the unit:h](h Bits 8-11 of }(hj<hhhNhNubj)}(h ``flags``h]hflags}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh, together with }(hj<hhhNhNubj)}(h ``exponent``h]hexponent}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh, encode the scale of the unit:}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hX* ``KVM_STATS_BASE_POW10`` The scale is based on power of 10. It is used for measurement of time and CPU clock cycles. For example, an exponent of -9 can be used with ``KVM_STATS_UNIT_SECONDS`` to express that the unit is nanoseconds. * ``KVM_STATS_BASE_POW2`` The scale is based on power of 2. It is used for measurement of memory size. For example, an exponent of 20 can be used with ``KVM_STATS_UNIT_BYTES`` to express that the unit is MiB. h]h)}(hhh](j)}(h``KVM_STATS_BASE_POW10`` The scale is based on power of 10. It is used for measurement of time and CPU clock cycles. For example, an exponent of -9 can be used with ``KVM_STATS_UNIT_SECONDS`` to express that the unit is nanoseconds.h]h)}(h``KVM_STATS_BASE_POW10`` The scale is based on power of 10. It is used for measurement of time and CPU clock cycles. For example, an exponent of -9 can be used with ``KVM_STATS_UNIT_SECONDS`` to express that the unit is nanoseconds.h](j)}(h``KVM_STATS_BASE_POW10``h]hKVM_STATS_BASE_POW10}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh The scale is based on power of 10. It is used for measurement of time and CPU clock cycles. For example, an exponent of -9 can be used with }(hj<hhhNhNubj)}(h``KVM_STATS_UNIT_SECONDS``h]hKVM_STATS_UNIT_SECONDS}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh) to express that the unit is nanoseconds.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&|]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jhj<ubj)}(h``KVM_STATS_BASE_POW2`` The scale is based on power of 2. It is used for measurement of memory size. For example, an exponent of 20 can be used with ``KVM_STATS_UNIT_BYTES`` to express that the unit is MiB. h]h)}(h``KVM_STATS_BASE_POW2`` The scale is based on power of 2. It is used for measurement of memory size. For example, an exponent of 20 can be used with ``KVM_STATS_UNIT_BYTES`` to express that the unit is MiB.h](j)}(h``KVM_STATS_BASE_POW2``h]hKVM_STATS_BASE_POW2}(hj&=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"=ubh~ The scale is based on power of 2. It is used for measurement of memory size. For example, an exponent of 20 can be used with }(hj"=hhhNhNubj)}(h``KVM_STATS_UNIT_BYTES``h]hKVM_STATS_UNIT_BYTES}(hj8=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"=ubh! to express that the unit is MiB.}(hj"=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]jj uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hThe ``size`` field is the number of values of this statistics data. Its value is usually 1 for most of simple statistics. 1 means it contains an unsigned 64bit data.h](hThe }(hjb=hhhNhNubj)}(h``size``h]hsize}(hjj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb=ubh field is the number of values of this statistics data. Its value is usually 1 for most of simple statistics. 1 means it contains an unsigned 64bit data.}(hjb=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hrThe ``offset`` field is the offset from the start of Data Block to the start of the corresponding statistics data.h](hThe }(hj=hhhNhNubj)}(h ``offset``h]hoffset}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubhd field is the offset from the start of Data Block to the start of the corresponding statistics data.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hThe ``bucket_size`` field is used as a parameter for histogram statistics data. It is only used by linear histogram statistics data, specifying the size of a bucket in the unit expressed by bits 4-11 of ``flags`` together with ``exponent``.h](hThe }(hj=hhhNhNubj)}(h``bucket_size``h]h bucket_size}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh field is used as a parameter for histogram statistics data. It is only used by linear histogram statistics data, specifying the size of a bucket in the unit expressed by bits 4-11 of }(hj=hhhNhNubj)}(h ``flags``h]hflags}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh together with }(hj=hhhNhNubj)}(h ``exponent``h]hexponent}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hThe ``name`` field is the name string of the statistics data. The name string starts at the end of ``struct kvm_stats_desc``. The maximum length including the trailing ``'\0'``, is indicated by ``name_size`` in the header.h](hThe }(hj=hhhNhNubj)}(h``name``h]hname}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubhW field is the name string of the statistics data. The name string starts at the end of }(hj=hhhNhNubj)}(h``struct kvm_stats_desc``h]hstruct kvm_stats_desc}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh-. The maximum length including the trailing }(hj=hhhNhNubj)}(h``'\0'``h]h'\0'}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh, is indicated by }(hj=hhhNhNubj)}(h ``name_size``h]h name_size}(hj$>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh in the header.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(hrThe Stats Data block contains an array of 64-bit values in the same order as the descriptors in Descriptors block.h]hrThe Stats Data block contains an array of 64-bit values in the same order as the descriptors in Descriptors block.}(hj<>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubeh}(h]kvm-get-stats-fdah ]h"]4.133 kvm_get_stats_fdah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.134 KVM_GET_XSAVE2h]h4.134 KVM_GET_XSAVE2}(hjU>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR>hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hji>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjf>hhhKubjy)}(hKVM_CAP_XSAVE2h]h)}(hjy>h]hKVM_CAP_XSAVE2}(hj{>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw>ubah}(h]h ]h"]h$]h&]uh1jxhjf>ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjc>hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj>hhhKubjy)}(hx86h]h)}(hj>h]hx86}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jxhj>ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjc>hhubjd)}(hhh](ji)}(hTypeh]hType}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj>hhhKubjy)}(h vcpu ioctlh]h)}(hj>h]h vcpu ioctl}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jxhj>ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjc>hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj>hhhKubjy)}(hstruct kvm_xsave (out)h]h)}(hj?h]hstruct kvm_xsave (out)}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jxhj>ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjc>hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj!?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj3?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/?ubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjc>hhubeh}(h]h ]h"]h$]h&]uh1j^hjR>hhhhhMubj$)}(hEstruct kvm_xsave { __u32 region[1024]; __u32 extra[0]; };h]hEstruct kvm_xsave { __u32 region[1024]; __u32 extra[0]; };}hjS?sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjR>hhubh)}(hXThis ioctl would copy current vcpu's xsave struct to the userspace. It copies as many bytes as are returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) when invoked on the vm file descriptor. The size value returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) will always be at least 4096. Currently, it is only greater than 4096 if a dynamic feature has been enabled with ``arch_prctl()``, but this may change in the future.h](hXmThis ioctl would copy current vcpu’s xsave struct to the userspace. It copies as many bytes as are returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) when invoked on the vm file descriptor. The size value returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) will always be at least 4096. Currently, it is only greater than 4096 if a dynamic feature has been enabled with }(hja?hhhNhNubj)}(h``arch_prctl()``h]h arch_prctl()}(hji?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja?ubh$, but this may change in the future.}(hja?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjR>hhubh)}(hjThe offsets of the state save areas in struct kvm_xsave follow the contents of CPUID leaf 0xD on the host.h]hjThe offsets of the state save areas in struct kvm_xsave follow the contents of CPUID leaf 0xD on the host.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjR>hhubeh}(h]kvm-get-xsave2ah ]h"]4.134 kvm_get_xsave2ah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.135 KVM_XEN_HVM_EVTCHN_SENDh]h4.135 KVM_XEN_HVM_EVTCHN_SEND}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SENDh]h)}(hj?h]h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj?hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(hx86h]h)}(hj?h]hx86}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj?hhubjd)}(hhh](ji)}(hTypeh]hType}(hj @hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@hhhKubjy)}(hvm ioctlh]h)}(hj@h]hvm ioctl}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ubah}(h]h ]h"]h$]h&]uh1jxhj@ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj?hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj8@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5@hhhKubjy)}(h!struct kvm_irq_routing_xen_evtchnh]h)}(hjH@h]h!struct kvm_irq_routing_xen_evtchn}(hjJ@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjF@ubah}(h]h ]h"]h$]h&]uh1jxhj5@ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj?hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjf@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjc@hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjx@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjt@ubah}(h]h ]h"]h$]h&]uh1jxhjc@ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj?hhubeh}(h]h ]h"]h$]h&]uh1j^hj?hhhhhMubj$)}(h]struct kvm_irq_routing_xen_evtchn { __u32 port; __u32 vcpu; __u32 priority; };h]h]struct kvm_irq_routing_xen_evtchn { __u32 port; __u32 vcpu; __u32 priority; };}hj@sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj?hhubh)}(hIThis ioctl injects an event channel interrupt directly to the guest vCPU.h]hIThis ioctl injects an event channel interrupt directly to the guest vCPU.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?hhubeh}(h]kvm-xen-hvm-evtchn-sendah ]h"]4.135 kvm_xen_hvm_evtchn_sendah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.136 KVM_S390_PV_CPU_COMMANDh]h4.136 KVM_S390_PV_CPU_COMMAND}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@hhhKubjy)}(hKVM_CAP_S390_PROTECTED_DUMPh]h)}(hj@h]hKVM_CAP_S390_PROTECTED_DUMP}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ubah}(h]h ]h"]h$]h&]uh1jxhj@ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@hhhKubjy)}(hs390h]h)}(hjAh]hs390}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jxhj@ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@hhubjd)}(hhh](ji)}(hTypeh]hType}(hj/AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,AhhhKubjy)}(h vcpu ioctlh]h)}(hj?Ah]h vcpu ioctl}(hjAAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=Aubah}(h]h ]h"]h$]h&]uh1jxhj,Aubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj]AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjZAhhhKubjy)}(hnoneh]h)}(hjmAh]hnone}(hjoAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjkAubah}(h]h ]h"]h$]h&]uh1jxhjZAubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMhj@hhubeh}(h]h ]h"]h$]h&]uh1j^hj@hhhhhMubh)}(hThis ioctl closely mirrors `KVM_S390_PV_COMMAND` but handles requests for vcpus. It re-uses the kvm_s390_pv_dmp struct and hence also shares the command ids.h](hThis ioctl closely mirrors }(hjAhhhNhNubjz,)}(h`KVM_S390_PV_COMMAND`h]hKVM_S390_PV_COMMAND}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjAubhm but handles requests for vcpus. It re-uses the kvm_s390_pv_dmp struct and hence also shares the command ids.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj@hhubh)}(h **command:**h]j#)}(hjAh]hcommand:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j#hjAubah}(h]h ]h"]h$]h&]uh1hhhhMhj@hhubj)}(hhh]j)}(hcKVM_PV_DUMP Presents an API that provides calls which facilitate dumping a vcpu of a protected VM. h](j)}(h KVM_PV_DUMPh]h KVM_PV_DUMP}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjAubj)}(hhh]h)}(hVPresents an API that provides calls which facilitate dumping a vcpu of a protected VM.h]hVPresents an API that provides calls which facilitate dumping a vcpu of a protected VM.}(hj BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj Bubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1jhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhj@hhhhhNubh)}(h**subcommand:**h]j#)}(hj.Bh]h subcommand:}(hj0BhhhNhNubah}(h]h ]h"]h$]h&]uh1j#hj,Bubah}(h]h ]h"]h$]h&]uh1hhhhMhj@hhubj)}(hhh]j)}(hKVM_PV_DUMP_CPU Provides encrypted dump data like register values. The length of the returned data is provided by uv_info.guest_cpu_stor_len. h](j)}(hKVM_PV_DUMP_CPUh]hKVM_PV_DUMP_CPU}(hjJBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjFBubj)}(hhh]h)}(h}Provides encrypted dump data like register values. The length of the returned data is provided by uv_info.guest_cpu_stor_len.h]h}Provides encrypted dump data like register values. The length of the returned data is provided by uv_info.guest_cpu_stor_len.}(hj[BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXBubah}(h]h ]h"]h$]h&]uh1jhjFBubeh}(h]h ]h"]h$]h&]uh1jhhhMhjCBubah}(h]h ]h"]h$]h&]uh1jhj@hhhhhNubeh}(h]kvm-s390-pv-cpu-commandah ]h"]4.136 kvm_s390_pv_cpu_commandah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.137 KVM_S390_ZPCI_OPh]h4.137 KVM_S390_ZPCI_OP}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hKVM_CAP_S390_ZPCI_OPh]h)}(hjBh]hKVM_CAP_S390_ZPCI_OP}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhM hjBhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hs390h]h)}(hjBh]hs390}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMhjBhhubjd)}(hhh](ji)}(hTypeh]hType}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hvm ioctlh]h)}(hjCh]hvm ioctl}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMhjBhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj$ChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!ChhhKubjy)}(hstruct kvm_s390_zpci_op (in)h]h)}(hj4Ch]hstruct kvm_s390_zpci_op (in)}(hj6ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2Cubah}(h]h ]h"]h$]h&]uh1jxhj!Cubeh}(h]h ]h"]h$]h&]uh1jchhhMhjBhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjRChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjOChhhKubjy)}(h0 on success, <0 on error h]h)}(h0 on success, <0 on errorh]h0 on success, <0 on error}(hjdChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`Cubah}(h]h ]h"]h$]h&]uh1jxhjOCubeh}(h]h ]h"]h$]h&]uh1jchhhMhjBhhubeh}(h]h ]h"]h$]h&]uh1j^hjBhhhhhM ubh)}(hJUsed to manage hardware-assisted virtualization features for zPCI devices.h]hJUsed to manage hardware-assisted virtualization features for zPCI devices.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBhhubh)}(h6Parameters are specified via the following structure::h]h5Parameters are specified via the following structure:}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBhhubj$)}(hXstruct kvm_s390_zpci_op { /* in */ __u32 fh; /* target device */ __u8 op; /* operation to perform */ __u8 pad[3]; union { /* for KVM_S390_ZPCIOP_REG_AEN */ struct { __u64 ibv; /* Guest addr of interrupt bit vector */ __u64 sb; /* Guest addr of summary bit */ __u32 flags; __u32 noi; /* Number of interrupts */ __u8 isc; /* Guest interrupt subclass */ __u8 sbo; /* Offset of guest summary bit vector */ __u16 pad; } reg_aen; __u64 reserved[8]; } u; };h]hXstruct kvm_s390_zpci_op { /* in */ __u32 fh; /* target device */ __u8 op; /* operation to perform */ __u8 pad[3]; union { /* for KVM_S390_ZPCIOP_REG_AEN */ struct { __u64 ibv; /* Guest addr of interrupt bit vector */ __u64 sb; /* Guest addr of summary bit */ __u32 flags; __u32 noi; /* Number of interrupts */ __u8 isc; /* Guest interrupt subclass */ __u8 sbo; /* Offset of guest summary bit vector */ __u16 pad; } reg_aen; __u64 reserved[8]; } u; };}hjCsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjBhhubh)}(hXyThe type of operation is specified in the "op" field. KVM_S390_ZPCIOP_REG_AEN is used to register the VM for adapter event notification interpretation, which will allow firmware delivery of adapter events directly to the vm, with KVM providing a backup delivery mechanism; KVM_S390_ZPCIOP_DEREG_AEN is used to subsequently disable interpretation of adapter event notifications.h]hX}The type of operation is specified in the “op” field. KVM_S390_ZPCIOP_REG_AEN is used to register the VM for adapter event notification interpretation, which will allow firmware delivery of adapter events directly to the vm, with KVM providing a backup delivery mechanism; KVM_S390_ZPCIOP_DEREG_AEN is used to subsequently disable interpretation of adapter event notifications.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjBhhubh)}(hThe target zPCI function must also be specified via the "fh" field. For the KVM_S390_ZPCIOP_REG_AEN operation, additional information to establish firmware delivery must be provided via the "reg_aen" struct.h]hThe target zPCI function must also be specified via the “fh” field. For the KVM_S390_ZPCIOP_REG_AEN operation, additional information to establish firmware delivery must be provided via the “reg_aen” struct.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjBhhubh)}(hgThe "pad" and "reserved" fields may be used for future extensions and should be set to 0s by userspace.h]hoThe “pad” and “reserved” fields may be used for future extensions and should be set to 0s by userspace.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjBhhubeh}(h]kvm-s390-zpci-opah ]h"]4.137 kvm_s390_zpci_opah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(h 4.138 KVM_ARM_SET_COUNTER_OFFSETh]h 4.138 KVM_ARM_SET_COUNTER_OFFSET}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhM:ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(hKVM_CAP_COUNTER_OFFSETh]h)}(hjDh]hKVM_CAP_COUNTER_OFFSET}(hj DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjDubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhM<hjChhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj%DhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"DhhhKubjy)}(harm64h]h)}(hj5Dh]harm64}(hj7DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj3Dubah}(h]h ]h"]h$]h&]uh1jxhj"Dubeh}(h]h ]h"]h$]h&]uh1jchhhM=hjChhubjd)}(hhh](ji)}(hTypeh]hType}(hjSDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjPDhhhKubjy)}(hvm ioctlh]h)}(hjcDh]hvm ioctl}(hjeDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjaDubah}(h]h ]h"]h$]h&]uh1jxhjPDubeh}(h]h ]h"]h$]h&]uh1jchhhM>hjChhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj~DhhhKubjy)}(h"struct kvm_arm_counter_offset (in)h]h)}(hjDh]h"struct kvm_arm_counter_offset (in)}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjDubah}(h]h ]h"]h$]h&]uh1jxhj~Dubeh}(h]h ]h"]h$]h&]uh1jchhhM?hjChhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hjDubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhM@hjChhubeh}(h]h ]h"]h$]h&]uh1j^hjChhhhhM<ubh)}(hThis capability indicates that userspace is able to apply a single VM-wide offset to both the virtual and physical counters as viewed by the guest using the KVM_ARM_SET_CNT_OFFSET ioctl and the following data structure:h]hThis capability indicates that userspace is able to apply a single VM-wide offset to both the virtual and physical counters as viewed by the guest using the KVM_ARM_SET_CNT_OFFSET ioctl and the following data structure:}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjChhubj$)}(hXstruct kvm_arm_counter_offset { __u64 counter_offset; __u64 reserved; };h]hXstruct kvm_arm_counter_offset { __u64 counter_offset; __u64 reserved; };}hjDsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMHhjChhubh)}(hX1The offset describes a number of counter cycles that are subtracted from both virtual and physical counter views (similar to the effects of the CNTVOFF_EL2 and CNTPOFF_EL2 system registers, but only global). The offset always applies to all vcpus (already created or created after this ioctl) for this VM.h]hX1The offset describes a number of counter cycles that are subtracted from both virtual and physical counter views (similar to the effects of the CNTVOFF_EL2 and CNTPOFF_EL2 system registers, but only global). The offset always applies to all vcpus (already created or created after this ioctl) for this VM.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjChhubh)}(htIt is userspace's responsibility to compute the offset based, for example, on previous values of the guest counters.h]hvIt is userspace’s responsibility to compute the offset based, for example, on previous values of the guest counters.}(hj EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjChhubh)}(hAny value other than 0 for the "reserved" field may result in an error (-EINVAL) being returned. This ioctl can also return -EBUSY if any vcpu ioctl is issued concurrently.h]hAny value other than 0 for the “reserved” field may result in an error (-EINVAL) being returned. This ioctl can also return -EBUSY if any vcpu ioctl is issued concurrently.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjChhubh)}(hNote that using this ioctl results in KVM ignoring subsequent userspace writes to the CNTVCT_EL0 and CNTPCT_EL0 registers using the SET_ONE_REG interface. No error will be returned, but the resulting offset will not be applied.h]hNote that using this ioctl results in KVM ignoring subsequent userspace writes to the CNTVCT_EL0 and CNTPCT_EL0 registers using the SET_ONE_REG interface. No error will be returned, but the resulting offset will not be applied.}(hj'EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjChhubj@)}(h#.. _KVM_ARM_GET_REG_WRITABLE_MASKS:h]h}(h]h ]h"]h$]h&]jKkvm-arm-get-reg-writable-masksuh1j?hM_hjChhhhubeh}(h]kvm-arm-set-counter-offsetah ]h"] 4.138 kvm_arm_set_counter_offsetah$]h&]uh1hhjhhhhhM:ubh)}(hhh](h)}(h$4.139 KVM_ARM_GET_REG_WRITABLE_MASKSh]h$4.139 KVM_ARM_GET_REG_WRITABLE_MASKS}(hjKEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHEhhhhhMbubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj_EhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj\EhhhKubjy)}(h%KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGESh]h)}(hjoEh]h%KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES}(hjqEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjmEubah}(h]h ]h"]h$]h&]uh1jxhj\Eubeh}(h]h ]h"]h$]h&]uh1jchhhMdhjYEhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(harm64h]h)}(hjEh]harm64}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjEubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMehjYEhhubjd)}(hhh](ji)}(hTypeh]hType}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(hvm ioctlh]h)}(hjEh]hvm ioctl}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjEubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMfhjYEhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(hstruct reg_mask_range (in/out)h]h)}(hjEh]hstruct reg_mask_range (in/out)}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjEubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMghjYEhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjFhhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hj)FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhj%Fubah}(h]h ]h"]h$]h&]uh1jxhjFubeh}(h]h ]h"]h$]h&]uh1jchhhMhhjYEhhubeh}(h]h ]h"]h$]h&]uh1j^hjHEhhhhhMdubj$)}(hX#define KVM_ARM_FEATURE_ID_RANGE 0 #define KVM_ARM_FEATURE_ID_RANGE_SIZE (3 * 8 * 8) struct reg_mask_range { __u64 addr; /* Pointer to mask array */ __u32 range; /* Requested range */ __u32 reserved[13]; };h]hX#define KVM_ARM_FEATURE_ID_RANGE 0 #define KVM_ARM_FEATURE_ID_RANGE_SIZE (3 * 8 * 8) struct reg_mask_range { __u64 addr; /* Pointer to mask array */ __u32 range; /* Requested range */ __u32 reserved[13]; };}hjIFsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMmhjHEhhubh)}(hTThis ioctl copies the writable masks for a selected range of registers to userspace.h]hTThis ioctl copies the writable masks for a selected range of registers to userspace.}(hjWFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjHEhhubh)}(h]The ``addr`` field is a pointer to the destination array where KVM copies the writable masks.h](hThe }(hjeFhhhNhNubj)}(h``addr``h]haddr}(hjmFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeFubhQ field is a pointer to the destination array where KVM copies the writable masks.}(hjeFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMyhjHEhhubh)}(hXdThe ``range`` field indicates the requested range of registers. ``KVM_CHECK_EXTENSION`` for the ``KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES`` capability returns the supported ranges, expressed as a set of flags. Each flag's bit index represents a possible value for the ``range`` field. All other values are reserved for future use and KVM may return an error.h](hThe }(hjFhhhNhNubj)}(h ``range``h]hrange}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh3 field indicates the requested range of registers. }(hjFhhhNhNubj)}(h``KVM_CHECK_EXTENSION``h]hKVM_CHECK_EXTENSION}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh for the }(hjFhhhNhNubj)}(h)``KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES``h]h%KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh capability returns the supported ranges, expressed as a set of flags. Each flag’s bit index represents a possible value for the }(hjFhhhNhNubj)}(h ``range``h]hrange}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubhQ field. All other values are reserved for future use and KVM may return an error.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM|hjHEhhubh)}(hbThe ``reserved[13]`` array is reserved for future use and should be 0, or KVM may return an error.h](hThe }(hjFhhhNhNubj)}(h``reserved[13]``h]h reserved[13]}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubhN array is reserved for future use and should be 0, or KVM may return an error.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjHEhhubh)}(hhh](h)}(hKVM_ARM_FEATURE_ID_RANGE (0)h]hKVM_ARM_FEATURE_ID_RANGE (0)}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhMubh)}(hThe Feature ID range is defined as the AArch64 System register space with op0==3, op1=={0, 1, 3}, CRn==0, CRm=={0-7}, op2=={0-7}.h]hThe Feature ID range is defined as the AArch64 System register space with op0==3, op1=={0, 1, 3}, CRn==0, CRm=={0-7}, op2=={0-7}.}(hj GhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubh)}(hXXThe mask returned array pointed to by ``addr`` is indexed by the macro ``ARM64_FEATURE_ID_RANGE_IDX(op0, op1, crn, crm, op2)``, allowing userspace to know what fields can be changed for the system register described by ``op0, op1, crn, crm, op2``. KVM rejects ID register values that describe a superset of the features supported by the system.h](h&The mask returned array pointed to by }(hjGhhhNhNubj)}(h``addr``h]haddr}(hj"GhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh is indexed by the macro }(hjGhhhNhNubj)}(h7``ARM64_FEATURE_ID_RANGE_IDX(op0, op1, crn, crm, op2)``h]h3ARM64_FEATURE_ID_RANGE_IDX(op0, op1, crn, crm, op2)}(hj4GhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh], allowing userspace to know what fields can be changed for the system register described by }(hjGhhhNhNubj)}(h``op0, op1, crn, crm, op2``h]hop0, op1, crn, crm, op2}(hjFGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubhb. KVM rejects ID register values that describe a superset of the features supported by the system.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjFhhubeh}(h]kvm-arm-feature-id-range-0ah ]h"]kvm_arm_feature_id_range (0)ah$]h&]uh1hhjHEhhhhhMubeh}(h](j?Eid18eh ]h"]($4.139 kvm_arm_get_reg_writable_maskskvm_arm_get_reg_writable_maskseh$]h&]uh1hhjhhhhhMbjm}jlGj5Esjo}j?Ej5Esubh)}(hhh](h)}(h!4.140 KVM_SET_USER_MEMORY_REGION2h]h!4.140 KVM_SET_USER_MEMORY_REGION2}(hjtGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqGhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjGhhhKubjy)}(hKVM_CAP_USER_MEMORY2h]h)}(hjGh]hKVM_CAP_USER_MEMORY2}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1jxhjGubeh}(h]h ]h"]h$]h&]uh1jchhhMhjGhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjGhhhKubjy)}(hallh]h)}(hjGh]hall}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1jxhjGubeh}(h]h ]h"]h$]h&]uh1jchhhMhjGhhubjd)}(hhh](ji)}(hTypeh]hType}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjGhhhKubjy)}(hvm ioctlh]h)}(hjGh]hvm ioctl}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1jxhjGubeh}(h]h ]h"]h$]h&]uh1jchhhMhjGhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjHhhhKubjy)}(h(struct kvm_userspace_memory_region2 (in)h]h)}(hj"Hh]h(struct kvm_userspace_memory_region2 (in)}(hj$HhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj Hubah}(h]h ]h"]h$]h&]uh1jxhjHubeh}(h]h ]h"]h$]h&]uh1jchhhMhjGhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj@HhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=HhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjRHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNHubah}(h]h ]h"]h$]h&]uh1jxhj=Hubeh}(h]h ]h"]h$]h&]uh1jchhhMhjGhhubeh}(h]h ]h"]h$]h&]uh1j^hjqGhhhhhMubh)}(hXEKVM_SET_USER_MEMORY_REGION2 is an extension to KVM_SET_USER_MEMORY_REGION that allows mapping guest_memfd memory into a guest. All fields shared with KVM_SET_USER_MEMORY_REGION identically. Userspace can set KVM_MEM_GUEST_MEMFD in flags to have KVM bind the memory region to a given guest_memfd range of [guest_memfd_offset, guest_memfd_offset + memory_size]. The target guest_memfd must point at a file created via KVM_CREATE_GUEST_MEMFD on the current VM, and the target range must not be bound to any other memory region. All standard bounds checks apply (use common sense).h]hXEKVM_SET_USER_MEMORY_REGION2 is an extension to KVM_SET_USER_MEMORY_REGION that allows mapping guest_memfd memory into a guest. All fields shared with KVM_SET_USER_MEMORY_REGION identically. Userspace can set KVM_MEM_GUEST_MEMFD in flags to have KVM bind the memory region to a given guest_memfd range of [guest_memfd_offset, guest_memfd_offset + memory_size]. The target guest_memfd must point at a file created via KVM_CREATE_GUEST_MEMFD on the current VM, and the target range must not be bound to any other memory region. All standard bounds checks apply (use common sense).}(hjrHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjqGhhubj$)}(hX:struct kvm_userspace_memory_region2 { __u32 slot; __u32 flags; __u64 guest_phys_addr; __u64 memory_size; /* bytes */ __u64 userspace_addr; /* start of the userspace allocated memory */ __u64 guest_memfd_offset; __u32 guest_memfd; __u32 pad1; __u64 pad2[14]; };h]hX:struct kvm_userspace_memory_region2 { __u32 slot; __u32 flags; __u64 guest_phys_addr; __u64 memory_size; /* bytes */ __u64 userspace_addr; /* start of the userspace allocated memory */ __u64 guest_memfd_offset; __u32 guest_memfd; __u32 pad1; __u64 pad2[14]; };}hjHsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjqGhhubh)}(hXA KVM_MEM_GUEST_MEMFD region _must_ have a valid guest_memfd (private memory) and userspace_addr (shared memory). However, "valid" for userspace_addr simply means that the address itself must be a legal userspace address. The backing mapping for userspace_addr is not required to be valid/populated at the time of KVM_SET_USER_MEMORY_REGION2, e.g. shared memory can be lazily mapped/allocated on-demand.h]hXA KVM_MEM_GUEST_MEMFD region _must_ have a valid guest_memfd (private memory) and userspace_addr (shared memory). However, “valid” for userspace_addr simply means that the address itself must be a legal userspace address. The backing mapping for userspace_addr is not required to be valid/populated at the time of KVM_SET_USER_MEMORY_REGION2, e.g. shared memory can be lazily mapped/allocated on-demand.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjqGhhubh)}(hXWhen mapping a gfn into the guest, KVM selects shared vs. private, i.e consumes userspace_addr vs. guest_memfd, based on the gfn's KVM_MEMORY_ATTRIBUTE_PRIVATE state. At VM creation time, all memory is shared, i.e. the PRIVATE attribute is '0' for all gfns. Userspace can control whether memory is shared/private by toggling KVM_MEMORY_ATTRIBUTE_PRIVATE via KVM_SET_MEMORY_ATTRIBUTES as needed.h]hXWhen mapping a gfn into the guest, KVM selects shared vs. private, i.e consumes userspace_addr vs. guest_memfd, based on the gfn’s KVM_MEMORY_ATTRIBUTE_PRIVATE state. At VM creation time, all memory is shared, i.e. the PRIVATE attribute is ‘0’ for all gfns. Userspace can control whether memory is shared/private by toggling KVM_MEMORY_ATTRIBUTE_PRIVATE via KVM_SET_MEMORY_ATTRIBUTES as needed.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjqGhhubh)}(hhh](h)}(hS390:h]hS390:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhMubh)}(hmReturns -EINVAL if the VM has the KVM_VM_S390_UCONTROL flag set. Returns -EINVAL if called on a protected VM.h]hmReturns -EINVAL if the VM has the KVM_VM_S390_UCONTROL flag set. Returns -EINVAL if called on a protected VM.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubeh}(h]id19ah ]h"]h$]s390:ah&]uh1hhjqGhhhhhMjKubeh}(h]kvm-set-user-memory-region2ah ]h"]!4.140 kvm_set_user_memory_region2ah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.141 KVM_SET_MEMORY_ATTRIBUTESh]h4.141 KVM_SET_MEMORY_ATTRIBUTES}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjHhhhKubjy)}(hKVM_CAP_MEMORY_ATTRIBUTESh]h)}(hjIh]hKVM_CAP_MEMORY_ATTRIBUTES}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHubah}(h]h ]h"]h$]h&]uh1jxhjHubeh}(h]h ]h"]h$]h&]uh1jchhhMhjHhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjIhhhKubjy)}(hx86h]h)}(hj.Ih]hx86}(hj0IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,Iubah}(h]h ]h"]h$]h&]uh1jxhjIubeh}(h]h ]h"]h$]h&]uh1jchhhMhjHhhubjd)}(hhh](ji)}(hTypeh]hType}(hjLIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjIIhhhKubjy)}(hvm ioctlh]h)}(hj\Ih]hvm ioctl}(hj^IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZIubah}(h]h ]h"]h$]h&]uh1jxhjIIubeh}(h]h ]h"]h$]h&]uh1jchhhMhjHhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjzIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwIhhhKubjy)}(h!struct kvm_memory_attributes (in)h]h)}(hjIh]h!struct kvm_memory_attributes (in)}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIubah}(h]h ]h"]h$]h&]uh1jxhjwIubeh}(h]h ]h"]h$]h&]uh1jchhhMhjHhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjIhhhKubjy)}(h0 on success, <0 on error h]h)}(h0 on success, <0 on errorh]h0 on success, <0 on error}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIubah}(h]h ]h"]h$]h&]uh1jxhjIubeh}(h]h ]h"]h$]h&]uh1jchhhMhjHhhubeh}(h]h ]h"]h$]h&]uh1j^hjHhhhhhMubh)}(hiKVM_SET_MEMORY_ATTRIBUTES allows userspace to set memory attributes for a range of guest physical memory.h]hiKVM_SET_MEMORY_ATTRIBUTES allows userspace to set memory attributes for a range of guest physical memory.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubj$)}(hstruct kvm_memory_attributes { __u64 address; __u64 size; __u64 attributes; __u64 flags; }; #define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3)h]hstruct kvm_memory_attributes { __u64 address; __u64 size; __u64 attributes; __u64 flags; }; #define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3)}hjIsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjHhhubh)}(hXThe address and size must be page aligned. The supported attributes can be retrieved via ioctl(KVM_CHECK_EXTENSION) on KVM_CAP_MEMORY_ATTRIBUTES. If executed on a VM, KVM_CAP_MEMORY_ATTRIBUTES precisely returns the attributes supported by that VM. If executed at system scope, KVM_CAP_MEMORY_ATTRIBUTES returns all attributes supported by KVM. The only attribute defined at this time is KVM_MEMORY_ATTRIBUTE_PRIVATE, which marks the associated gfn as being guest private memory.h]hXThe address and size must be page aligned. The supported attributes can be retrieved via ioctl(KVM_CHECK_EXTENSION) on KVM_CAP_MEMORY_ATTRIBUTES. If executed on a VM, KVM_CAP_MEMORY_ATTRIBUTES precisely returns the attributes supported by that VM. If executed at system scope, KVM_CAP_MEMORY_ATTRIBUTES returns all attributes supported by KVM. The only attribute defined at this time is KVM_MEMORY_ATTRIBUTE_PRIVATE, which marks the associated gfn as being guest private memory.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubh)}(hqNote, there is no "get" API. Userspace is responsible for explicitly tracking the state of a gfn/page as needed.h]huNote, there is no “get” API. Userspace is responsible for explicitly tracking the state of a gfn/page as needed.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubh)}(hDThe "flags" field is reserved for future extensions and must be '0'.h]hLThe “flags” field is reserved for future extensions and must be ‘0’.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubeh}(h]kvm-set-memory-attributesah ]h"]4.141 kvm_set_memory_attributesah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.142 KVM_CREATE_GUEST_MEMFDh]h4.142 KVM_CREATE_GUEST_MEMFD}(hj+JhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(JhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj?JhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj 0 on return, the caller can just issue the ioctl again with the same `struct kvm_map_memory` argument.h](hZWhen the ioctl returns, the input values are updated to point to the remaining range. If }(hjxNhhhNhNubjz,)}(h`size`h]hsize}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjxNubhH > 0 on return, the caller can just issue the ioctl again with the same }(hjxNhhhNhNubjz,)}(h`struct kvm_map_memory`h]hstruct kvm_map_memory}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjxNubh argument.}(hjxNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMBhjwKhhubh)}(hXcShadow page tables cannot support this ioctl because they are indexed by virtual address or nested guest physical address. Calling this ioctl when the guest is using shadow page tables (for example because it is running a nested guest with nested page tables) will fail with `EOPNOTSUPP` even if `KVM_CHECK_EXTENSION` reports the capability to be present.h](hXShadow page tables cannot support this ioctl because they are indexed by virtual address or nested guest physical address. Calling this ioctl when the guest is using shadow page tables (for example because it is running a nested guest with nested page tables) will fail with }(hjNhhhNhNubjz,)}(h `EOPNOTSUPP`h]h EOPNOTSUPP}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjNubh even if }(hjNhhhNhNubjz,)}(h`KVM_CHECK_EXTENSION`h]hKVM_CHECK_EXTENSION}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjNubh& reports the capability to be present.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMFhjwKhhubh)}(h`flags` must currently be zero.h](jz,)}(h`flags`h]hflags}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjNubh must currently be zero.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMMhjwKhhubj@)}(h .. _kvm_run:h]h}(h]h ]h"]h$]h&]jKid20uh1j?hMPhjwKhhhhubeh}(h]kvm-pre-fault-memoryah ]h"]4.143 kvm_pre_fault_memoryah$]h&]uh1hhjhhhhhMubeh}(h]api-descriptionah ]h"]4. api descriptionah$]h&]uh1hhhhhhhhKfubh)}(hhh](h)}(h5. The kvm_run structureh]h5. The kvm_run structure}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhhhhhMSubh)}(hX(Application code obtains a pointer to the kvm_run structure by mmap()ing a vcpu fd. From that point, application code can control execution by changing fields in kvm_run prior to calling the KVM_RUN ioctl, and obtain information about the reason KVM_RUN returned by looking up structure members.h]hX(Application code obtains a pointer to the kvm_run structure by mmap()ing a vcpu fd. From that point, application code can control execution by changing fields in kvm_run prior to calling the KVM_RUN ioctl, and obtain information about the reason KVM_RUN returned by looking up structure members.}(hj$OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjOhhubj$)}(hDstruct kvm_run { /* in */ __u8 request_interrupt_window;h]hDstruct kvm_run { /* in */ __u8 request_interrupt_window;}hj2Osbah}(h]h ]h"]h$]h&]hhuh1j#hhhM]hjOhhubh)}(hRequest that KVM_RUN return when it becomes possible to inject external interrupts into the guest. Useful in conjunction with KVM_INTERRUPT.h]hRequest that KVM_RUN return when it becomes possible to inject external interrupts into the guest. Useful in conjunction with KVM_INTERRUPT.}(hj@OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjOhhubj$)}(h__u8 immediate_exit;h]h__u8 immediate_exit;}hjNOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMfhjOhhubh)}(hXThis field is polled once when KVM_RUN starts; if non-zero, KVM_RUN exits immediately, returning -EINTR. In the common scenario where a signal is used to "kick" a VCPU out of KVM_RUN, this field can be used to avoid usage of KVM_SET_SIGNAL_MASK, which has worse scalability. Rather than blocking the signal outside KVM_RUN, userspace can set up a signal handler that sets run->immediate_exit to a non-zero value.h]hXThis field is polled once when KVM_RUN starts; if non-zero, KVM_RUN exits immediately, returning -EINTR. In the common scenario where a signal is used to “kick” a VCPU out of KVM_RUN, this field can be used to avoid usage of KVM_SET_SIGNAL_MASK, which has worse scalability. Rather than blocking the signal outside KVM_RUN, userspace can set up a signal handler that sets run->immediate_exit to a non-zero value.}(hj\OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhjOhhubh)}(hAThis field is ignored if KVM_CAP_IMMEDIATE_EXIT is not available.h]hAThis field is ignored if KVM_CAP_IMMEDIATE_EXIT is not available.}(hjjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjOhhubj$)}(h/__u8 padding1[6]; /* out */ __u32 exit_reason;h]h/__u8 padding1[6]; /* out */ __u32 exit_reason;}hjxOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMshjOhhubh)}(hWhen KVM_RUN has returned successfully (return value 0), this informs application code why KVM_RUN has returned. Allowable values for this field are detailed below.h]hWhen KVM_RUN has returned successfully (return value 0), this informs application code why KVM_RUN has returned. Allowable values for this field are detailed below.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjOhhubj$)}(h#__u8 ready_for_interrupt_injection;h]h#__u8 ready_for_interrupt_injection;}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM~hjOhhubh)}(hyIf request_interrupt_window has been specified, this field indicates an interrupt can be injected now with KVM_INTERRUPT.h]hyIf request_interrupt_window has been specified, this field indicates an interrupt can be injected now with KVM_INTERRUPT.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubj$)}(h __u8 if_flag;h]h __u8 if_flag;}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjOhhubh)}(hYThe value of the current interrupt flag. Only valid if in-kernel local APIC is not used.h]hYThe value of the current interrupt flag. Only valid if in-kernel local APIC is not used.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubj$)}(h __u16 flags;h]h __u16 flags;}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjOhhubh)}(h{More architecture-specific flags detailing state of the VCPU that may affect the device's behavior. Current defined flags::h]h|More architecture-specific flags detailing state of the VCPU that may affect the device’s behavior. Current defined flags:}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubj$)}(hXp/* x86, set if the VCPU is in system management mode */ #define KVM_RUN_X86_SMM (1 << 0) /* x86, set if bus lock detected in VM */ #define KVM_RUN_X86_BUS_LOCK (1 << 1) /* x86, set if the VCPU is executing a nested (L2) guest */ #define KVM_RUN_X86_GUEST_MODE (1 << 2) /* arm64, set for KVM_EXIT_DEBUG */ #define KVM_DEBUG_ARCH_HSR_HIGH_VALID (1 << 0)h]hXp/* x86, set if the VCPU is in system management mode */ #define KVM_RUN_X86_SMM (1 << 0) /* x86, set if bus lock detected in VM */ #define KVM_RUN_X86_BUS_LOCK (1 << 1) /* x86, set if the VCPU is executing a nested (L2) guest */ #define KVM_RUN_X86_GUEST_MODE (1 << 2) /* arm64, set for KVM_EXIT_DEBUG */ #define KVM_DEBUG_ARCH_HSR_HIGH_VALID (1 << 0)}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjOhhubj$)}(h5/* in (pre_kvm_run), out (post_kvm_run) */ __u64 cr8;h]h5/* in (pre_kvm_run), out (post_kvm_run) */ __u64 cr8;}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjOhhubh)}(hgThe value of the cr8 register. Only valid if in-kernel local APIC is not used. Both input and output.h]hgThe value of the cr8 register. Only valid if in-kernel local APIC is not used. Both input and output.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubj$)}(h__u64 apic_base;h]h__u64 apic_base;}hjPsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjOhhubh)}(hhThe value of the APIC BASE msr. Only valid if in-kernel local APIC is not used. Both input and output.h]hhThe value of the APIC BASE msr. Only valid if in-kernel local APIC is not used. Both input and output.}(hj PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubj$)}(hqunion { /* KVM_EXIT_UNKNOWN */ struct { __u64 hardware_exit_reason; } hw;h]hqunion { /* KVM_EXIT_UNKNOWN */ struct { __u64 hardware_exit_reason; } hw;}hj.Psbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjOhhubh)}(hIf exit_reason is KVM_EXIT_UNKNOWN, the vcpu has exited due to unknown reasons. Further architecture-specific information is available in hardware_exit_reason.h]hIf exit_reason is KVM_EXIT_UNKNOWN, the vcpu has exited due to unknown reasons. Further architecture-specific information is available in hardware_exit_reason.}(hj ioctl to retrieve the call parameters from the vCPU’s GPRs.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM$hjaQhhubj)}(hhh]j)}(hXDefinition of ``flags``: - ``KVM_HYPERCALL_EXIT_SMC``: Indicates that the guest used the SMC conduit to initiate the SMCCC call. If this bit is 0 then the guest used the HVC conduit for the SMCCC call. - ``KVM_HYPERCALL_EXIT_16BIT``: Indicates that the guest used a 16bit instruction to initiate the SMCCC call. If this bit is 0 then the guest used a 32bit instruction. An AArch64 guest always has this bit set to 0. h](j)}(hDefinition of ``flags``:h](hDefinition of }(hjQhhhNhNubj)}(h ``flags``h]hflags}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubh:}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM0hjQubj)}(hhh]h)}(hhh](j)}(h``KVM_HYPERCALL_EXIT_SMC``: Indicates that the guest used the SMC conduit to initiate the SMCCC call. If this bit is 0 then the guest used the HVC conduit for the SMCCC call. h]h)}(h``KVM_HYPERCALL_EXIT_SMC``: Indicates that the guest used the SMC conduit to initiate the SMCCC call. If this bit is 0 then the guest used the HVC conduit for the SMCCC call.h](j)}(h``KVM_HYPERCALL_EXIT_SMC``h]hKVM_HYPERCALL_EXIT_SMC}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubh: Indicates that the guest used the SMC conduit to initiate the SMCCC call. If this bit is 0 then the guest used the HVC conduit for the SMCCC call.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM)hjQubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(h``KVM_HYPERCALL_EXIT_16BIT``: Indicates that the guest used a 16bit instruction to initiate the SMCCC call. If this bit is 0 then the guest used a 32bit instruction. An AArch64 guest always has this bit set to 0. h]h)}(h``KVM_HYPERCALL_EXIT_16BIT``: Indicates that the guest used a 16bit instruction to initiate the SMCCC call. If this bit is 0 then the guest used a 32bit instruction. An AArch64 guest always has this bit set to 0.h](j)}(h``KVM_HYPERCALL_EXIT_16BIT``h]hKVM_HYPERCALL_EXIT_16BIT}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh: Indicates that the guest used a 16bit instruction to initiate the SMCCC call. If this bit is 0 then the guest used a 32bit instruction. An AArch64 guest always has this bit set to 0.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM-hjRubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]jjuh1hhhhM)hjQubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhhhM0hjQubah}(h]h ]h"]h$]h&]uh1jhjaQhhhNhNubh)}(hbAt the point of exit, PC points to the instruction immediately following the trapping instruction.h]hbAt the point of exit, PC points to the instruction immediately following the trapping instruction.}(hjQRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjaQhhubj$)}(hn/* KVM_EXIT_TPR_ACCESS */ struct { __u64 rip; __u32 is_write; __u32 pad; } tpr_access;h]hn/* KVM_EXIT_TPR_ACCESS */ struct { __u64 rip; __u32 is_write; __u32 pad; } tpr_access;}hj_Rsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM7hjaQhhubh)}(h,To be documented (KVM_TPR_ACCESS_REPORTING).h]h,To be documented (KVM_TPR_ACCESS_REPORTING).}(hjmRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjaQhhubj$)}(h/* KVM_EXIT_S390_SIEIC */ struct { __u8 icptcode; __u64 mask; /* psw upper half */ __u64 addr; /* psw lower half */ __u16 ipa; __u32 ipb; } s390_sieic;h]h/* KVM_EXIT_S390_SIEIC */ struct { __u8 icptcode; __u64 mask; /* psw upper half */ __u64 addr; /* psw lower half */ __u16 ipa; __u32 ipb; } s390_sieic;}hj{Rsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMBhjaQhhubh)}(hs390 specific.h]hs390 specific.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjaQhhubj$)}(h /* KVM_EXIT_S390_RESET */ #define KVM_S390_RESET_POR 1 #define KVM_S390_RESET_CLEAR 2 #define KVM_S390_RESET_SUBSYSTEM 4 #define KVM_S390_RESET_CPU_INIT 8 #define KVM_S390_RESET_IPL 16 __u64 s390_reset_flags;h]h /* KVM_EXIT_S390_RESET */ #define KVM_S390_RESET_POR 1 #define KVM_S390_RESET_CLEAR 2 #define KVM_S390_RESET_SUBSYSTEM 4 #define KVM_S390_RESET_CPU_INIT 8 #define KVM_S390_RESET_IPL 16 __u64 s390_reset_flags;}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMOhjaQhhubh)}(hs390 specific.h]hs390 specific.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjaQhhubj$)}(hl/* KVM_EXIT_S390_UCONTROL */ struct { __u64 trans_exc_code; __u32 pgm_code; } s390_ucontrol;h]hl/* KVM_EXIT_S390_UCONTROL */ struct { __u64 trans_exc_code; __u32 pgm_code; } s390_ucontrol;}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM[hjaQhhubh)}(hXs390 specific. A page fault has occurred for a user controlled virtual machine (KVM_VM_S390_UNCONTROL) on its host page table that cannot be resolved by the kernel. The program code and the translation exception code that were placed in the cpu's lowcore are presented here as defined by the z Architecture Principles of Operation Book in the Chapter for Dynamic Address Translation (DAT)h]hXs390 specific. A page fault has occurred for a user controlled virtual machine (KVM_VM_S390_UNCONTROL) on its host page table that cannot be resolved by the kernel. The program code and the translation exception code that were placed in the cpu’s lowcore are presented here as defined by the z Architecture Principles of Operation Book in the Chapter for Dynamic Address Translation (DAT)}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjaQhhubj$)}(hb/* KVM_EXIT_DCR */ struct { __u32 dcrn; __u32 data; __u8 is_write; } dcr;h]hb/* KVM_EXIT_DCR */ struct { __u32 dcrn; __u32 data; __u8 is_write; } dcr;}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMkhjaQhhubh)}(h"Deprecated - was used for 440 KVM.h]h"Deprecated - was used for 440 KVM.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjaQhhubj$)}(h:/* KVM_EXIT_OSI */ struct { __u64 gprs[32]; } osi;h]h:/* KVM_EXIT_OSI */ struct { __u64 gprs[32]; } osi;}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMvhjaQhhubh)}(hMOL uses a special hypercall interface it calls 'OSI'. To enable it, we catch hypercalls and exit with this exit struct that contains all the guest gprs.h]hMOL uses a special hypercall interface it calls ‘OSI’. To enable it, we catch hypercalls and exit with this exit struct that contains all the guest gprs.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjaQhhubh)}(hIf exit_reason is KVM_EXIT_OSI, then the vcpu has triggered such a hypercall. Userspace can now handle the hypercall and when it's done modify the gprs as necessary. Upon guest entry all guest GPRs will then be replaced by the values in this struct.h]hIf exit_reason is KVM_EXIT_OSI, then the vcpu has triggered such a hypercall. Userspace can now handle the hypercall and when it’s done modify the gprs as necessary. Upon guest entry all guest GPRs will then be replaced by the values in this struct.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hjaQhhubj$)}(hl/* KVM_EXIT_PAPR_HCALL */ struct { __u64 nr; __u64 ret; __u64 args[9]; } papr_hcall;h]hl/* KVM_EXIT_PAPR_HCALL */ struct { __u64 nr; __u64 ret; __u64 args[9]; } papr_hcall;}hjSsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjaQhhubh)}(hXGThis is used on 64-bit PowerPC when emulating a pSeries partition, e.g. with the 'pseries' machine type in qemu. It occurs when the guest does a hypercall using the 'sc 1' instruction. The 'nr' field contains the hypercall number (from the guest R3), and 'args' contains the arguments (from the guest R4 - R12). Userspace should put the return code in 'ret' and any extra returned values in args[]. The possible hypercalls are defined in the Power Architecture Platform Requirements (PAPR) document available from www.power.org (free developer registration required to access it).h]hX[This is used on 64-bit PowerPC when emulating a pSeries partition, e.g. with the ‘pseries’ machine type in qemu. It occurs when the guest does a hypercall using the ‘sc 1’ instruction. The ‘nr’ field contains the hypercall number (from the guest R3), and ‘args’ contains the arguments (from the guest R4 - R12). Userspace should put the return code in ‘ret’ and any extra returned values in args[]. The possible hypercalls are defined in the Power Architecture Platform Requirements (PAPR) document available from www.power.org (free developer registration required to access it).}(hj#ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubj$)}(h/* KVM_EXIT_S390_TSCH */ struct { __u16 subchannel_id; __u16 subchannel_nr; __u32 io_int_parm; __u32 io_int_word; __u32 ipb; __u8 dequeued; } s390_tsch;h]h/* KVM_EXIT_S390_TSCH */ struct { __u16 subchannel_id; __u16 subchannel_nr; __u32 io_int_parm; __u32 io_int_word; __u32 ipb; __u8 dequeued; } s390_tsch;}hj1Ssbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjaQhhubh)}(hXfs390 specific. This exit occurs when KVM_CAP_S390_CSS_SUPPORT has been enabled and TEST SUBCHANNEL was intercepted. If dequeued is set, a pending I/O interrupt for the target subchannel has been dequeued and subchannel_id, subchannel_nr, io_int_parm and io_int_word contain the parameters for that interrupt. ipb is needed for instruction parameter decoding.h]hXfs390 specific. This exit occurs when KVM_CAP_S390_CSS_SUPPORT has been enabled and TEST SUBCHANNEL was intercepted. If dequeued is set, a pending I/O interrupt for the target subchannel has been dequeued and subchannel_id, subchannel_nr, io_int_parm and io_int_word contain the parameters for that interrupt. ipb is needed for instruction parameter decoding.}(hj?ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubj$)}(h5/* KVM_EXIT_EPR */ struct { __u32 epr; } epr;h]h5/* KVM_EXIT_EPR */ struct { __u32 epr; } epr;}hjMSsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjaQhhubh)}(hX,On FSL BookE PowerPC chips, the interrupt controller has a fast patch interrupt acknowledge path to the core. When the core successfully delivers an interrupt, it automatically populates the EPR register with the interrupt vector number and acknowledges the interrupt inside the interrupt controller.h]hX,On FSL BookE PowerPC chips, the interrupt controller has a fast patch interrupt acknowledge path to the core. When the core successfully delivers an interrupt, it automatically populates the EPR register with the interrupt vector number and acknowledges the interrupt inside the interrupt controller.}(hj[ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubh)}(hIn case the interrupt controller lives in user space, we need to do the interrupt acknowledge cycle through it to fetch the next to be delivered interrupt vector using this exit.h]hIn case the interrupt controller lives in user space, we need to do the interrupt acknowledge cycle through it to fetch the next to be delivered interrupt vector using this exit.}(hjiShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubh)}(hIt gets triggered whenever both KVM_CAP_PPC_EPR are enabled and an external interrupt has just been delivered into the guest. User space should put the acknowledged interrupt vector into the 'epr' field.h]hIt gets triggered whenever both KVM_CAP_PPC_EPR are enabled and an external interrupt has just been delivered into the guest. User space should put the acknowledged interrupt vector into the ‘epr’ field.}(hjwShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubj$)}(hX /* KVM_EXIT_SYSTEM_EVENT */ struct { #define KVM_SYSTEM_EVENT_SHUTDOWN 1 #define KVM_SYSTEM_EVENT_RESET 2 #define KVM_SYSTEM_EVENT_CRASH 3 #define KVM_SYSTEM_EVENT_WAKEUP 4 #define KVM_SYSTEM_EVENT_SUSPEND 5 #define KVM_SYSTEM_EVENT_SEV_TERM 6 #define KVM_SYSTEM_EVENT_TDX_FATAL 7 __u32 type; __u32 ndata; __u64 data[16]; } system_event;h]hX /* KVM_EXIT_SYSTEM_EVENT */ struct { #define KVM_SYSTEM_EVENT_SHUTDOWN 1 #define KVM_SYSTEM_EVENT_RESET 2 #define KVM_SYSTEM_EVENT_CRASH 3 #define KVM_SYSTEM_EVENT_WAKEUP 4 #define KVM_SYSTEM_EVENT_SUSPEND 5 #define KVM_SYSTEM_EVENT_SEV_TERM 6 #define KVM_SYSTEM_EVENT_TDX_FATAL 7 __u32 type; __u32 ndata; __u64 data[16]; } system_event;}hjSsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjaQhhubh)}(hXIf exit_reason is KVM_EXIT_SYSTEM_EVENT then the vcpu has triggered a system-level event using some architecture specific mechanism (hypercall or some special instruction). In case of ARM64, this is triggered using HVC instruction based PSCI call from the vcpu.h]hXIf exit_reason is KVM_EXIT_SYSTEM_EVENT then the vcpu has triggered a system-level event using some architecture specific mechanism (hypercall or some special instruction). In case of ARM64, this is triggered using HVC instruction based PSCI call from the vcpu.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubh)}(hTThe 'type' field describes the system-level event type. Valid values for 'type' are:h]h\The ‘type’ field describes the system-level event type. Valid values for ‘type’ are:}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubh)}(hX- KVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the VM. Userspace is not obliged to honour this, and if it does honour this does not need to destroy the VM synchronously (ie it may call KVM_RUN again before shutdown finally occurs). - KVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM. As with SHUTDOWN, userspace can choose to ignore the request, or to schedule the reset to occur in the future and may call KVM_RUN again. - KVM_SYSTEM_EVENT_CRASH -- the guest crash occurred and the guest has requested a crash condition maintenance. Userspace can choose to ignore the request, or to gather VM memory core dump and/or reset/shutdown of the VM. - KVM_SYSTEM_EVENT_SEV_TERM -- an AMD SEV guest requested termination. The guest physical address of the guest's GHCB is stored in `data[0]`. - KVM_SYSTEM_EVENT_TDX_FATAL -- a TDX guest reported a fatal error state. KVM doesn't do any parsing or conversion, it just dumps 16 general-purpose registers to userspace, in ascending order of the 4-bit indices for x86-64 general-purpose registers in instruction encoding, as defined in the Intel SDM. - KVM_SYSTEM_EVENT_WAKEUP -- the exiting vCPU is in a suspended state and KVM has recognized a wakeup event. Userspace may honor this event by marking the exiting vCPU as runnable, or deny it and call KVM_RUN again. - KVM_SYSTEM_EVENT_SUSPEND -- the guest has requested a suspension of the VM. h]h)}(hhh](j)}(hKVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the VM. Userspace is not obliged to honour this, and if it does honour this does not need to destroy the VM synchronously (ie it may call KVM_RUN again before shutdown finally occurs).h]h)}(hKVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the VM. Userspace is not obliged to honour this, and if it does honour this does not need to destroy the VM synchronously (ie it may call KVM_RUN again before shutdown finally occurs).h]hKVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the VM. Userspace is not obliged to honour this, and if it does honour this does not need to destroy the VM synchronously (ie it may call KVM_RUN again before shutdown finally occurs).}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hKVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM. As with SHUTDOWN, userspace can choose to ignore the request, or to schedule the reset to occur in the future and may call KVM_RUN again.h]h)}(hKVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM. As with SHUTDOWN, userspace can choose to ignore the request, or to schedule the reset to occur in the future and may call KVM_RUN again.h]hKVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM. As with SHUTDOWN, userspace can choose to ignore the request, or to schedule the reset to occur in the future and may call KVM_RUN again.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hKVM_SYSTEM_EVENT_CRASH -- the guest crash occurred and the guest has requested a crash condition maintenance. Userspace can choose to ignore the request, or to gather VM memory core dump and/or reset/shutdown of the VM.h]h)}(hKVM_SYSTEM_EVENT_CRASH -- the guest crash occurred and the guest has requested a crash condition maintenance. Userspace can choose to ignore the request, or to gather VM memory core dump and/or reset/shutdown of the VM.h]hKVM_SYSTEM_EVENT_CRASH -- the guest crash occurred and the guest has requested a crash condition maintenance. Userspace can choose to ignore the request, or to gather VM memory core dump and/or reset/shutdown of the VM.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hKVM_SYSTEM_EVENT_SEV_TERM -- an AMD SEV guest requested termination. The guest physical address of the guest's GHCB is stored in `data[0]`.h]h)}(hKVM_SYSTEM_EVENT_SEV_TERM -- an AMD SEV guest requested termination. The guest physical address of the guest's GHCB is stored in `data[0]`.h](hKVM_SYSTEM_EVENT_SEV_TERM -- an AMD SEV guest requested termination. The guest physical address of the guest’s GHCB is stored in }(hjThhhNhNubjz,)}(h `data[0]`h]hdata[0]}(hj ThhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjTubh.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hX-KVM_SYSTEM_EVENT_TDX_FATAL -- a TDX guest reported a fatal error state. KVM doesn't do any parsing or conversion, it just dumps 16 general-purpose registers to userspace, in ascending order of the 4-bit indices for x86-64 general-purpose registers in instruction encoding, as defined in the Intel SDM.h]h)}(hX-KVM_SYSTEM_EVENT_TDX_FATAL -- a TDX guest reported a fatal error state. KVM doesn't do any parsing or conversion, it just dumps 16 general-purpose registers to userspace, in ascending order of the 4-bit indices for x86-64 general-purpose registers in instruction encoding, as defined in the Intel SDM.h]hX/KVM_SYSTEM_EVENT_TDX_FATAL -- a TDX guest reported a fatal error state. KVM doesn’t do any parsing or conversion, it just dumps 16 general-purpose registers to userspace, in ascending order of the 4-bit indices for x86-64 general-purpose registers in instruction encoding, as defined in the Intel SDM.}(hj,ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(Tubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hKVM_SYSTEM_EVENT_WAKEUP -- the exiting vCPU is in a suspended state and KVM has recognized a wakeup event. Userspace may honor this event by marking the exiting vCPU as runnable, or deny it and call KVM_RUN again.h]h)}(hKVM_SYSTEM_EVENT_WAKEUP -- the exiting vCPU is in a suspended state and KVM has recognized a wakeup event. Userspace may honor this event by marking the exiting vCPU as runnable, or deny it and call KVM_RUN again.h]hKVM_SYSTEM_EVENT_WAKEUP -- the exiting vCPU is in a suspended state and KVM has recognized a wakeup event. Userspace may honor this event by marking the exiting vCPU as runnable, or deny it and call KVM_RUN again.}(hjDThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@Tubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hLKVM_SYSTEM_EVENT_SUSPEND -- the guest has requested a suspension of the VM. h]h)}(hKKVM_SYSTEM_EVENT_SUSPEND -- the guest has requested a suspension of the VM.h]hKKVM_SYSTEM_EVENT_SUSPEND -- the guest has requested a suspension of the VM.}(hj\ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXTubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubh)}(hIf KVM_CAP_SYSTEM_EVENT_DATA is present, the 'data' field can contain architecture specific information for the system-level event. Only the first `ndata` items (possibly zero) of the data array are valid.h](hIf KVM_CAP_SYSTEM_EVENT_DATA is present, the ‘data’ field can contain architecture specific information for the system-level event. Only the first }(hj|ThhhNhNubjz,)}(h`ndata`h]hndata}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj|Tubh3 items (possibly zero) of the data array are valid.}(hj|ThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubh)}(hX- for arm64, data[0] is set to KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 if the guest issued a SYSTEM_RESET2 call according to v1.1 of the PSCI specification. - for arm64, data[0] is set to KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2 if the guest issued a SYSTEM_OFF2 call according to v1.3 of the PSCI specification. - for RISC-V, data[0] is set to the value of the second argument of the ``sbi_system_reset`` call. h]h)}(hhh](j)}(hfor arm64, data[0] is set to KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 if the guest issued a SYSTEM_RESET2 call according to v1.1 of the PSCI specification. h]h)}(hfor arm64, data[0] is set to KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 if the guest issued a SYSTEM_RESET2 call according to v1.1 of the PSCI specification.h]hfor arm64, data[0] is set to KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 if the guest issued a SYSTEM_RESET2 call according to v1.1 of the PSCI specification.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jhjTubj)}(hfor arm64, data[0] is set to KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2 if the guest issued a SYSTEM_OFF2 call according to v1.3 of the PSCI specification. h]h)}(hfor arm64, data[0] is set to KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2 if the guest issued a SYSTEM_OFF2 call according to v1.3 of the PSCI specification.h]hfor arm64, data[0] is set to KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2 if the guest issued a SYSTEM_OFF2 call according to v1.3 of the PSCI specification.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jhjTubj)}(hafor RISC-V, data[0] is set to the value of the second argument of the ``sbi_system_reset`` call. h]h)}(h`for RISC-V, data[0] is set to the value of the second argument of the ``sbi_system_reset`` call.h](hFfor RISC-V, data[0] is set to the value of the second argument of the }(hjThhhNhNubj)}(h``sbi_system_reset``h]hsbi_system_reset}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubh call.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubh)}(hPrevious versions of Linux defined a `flags` member in this struct. The field is now aliased to `data[0]`. Userspace can assume that it is only written if ndata is greater than 0.h](h%Previous versions of Linux defined a }(hj UhhhNhNubjz,)}(h`flags`h]hflags}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj Uubh5 member in this struct. The field is now aliased to }(hj UhhhNhNubjz,)}(h `data[0]`h]hdata[0]}(hj#UhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj UubhK. Userspace can assume that it is only written if ndata is greater than 0.}(hj UhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjaQhhubeh}(h]id21ah ]h"]h$]j?ah&]uh1hhjOhhhhhMjKubh)}(hhh](h)}(hFor arm/arm64:h]hFor arm/arm64:}(hjEUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBUhhhhhMubh)}(hKVM_SYSTEM_EVENT_SUSPEND exits are enabled with the KVM_CAP_ARM_SYSTEM_SUSPEND VM capability. If a guest invokes the PSCI SYSTEM_SUSPEND function, KVM will exit to userspace with this event type.h]hKVM_SYSTEM_EVENT_SUSPEND exits are enabled with the KVM_CAP_ARM_SYSTEM_SUSPEND VM capability. If a guest invokes the PSCI SYSTEM_SUSPEND function, KVM will exit to userspace with this event type.}(hjSUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hX It is the sole responsibility of userspace to implement the PSCI SYSTEM_SUSPEND call according to ARM DEN0022D.b 5.19 "SYSTEM_SUSPEND". KVM does not change the vCPU's state before exiting to userspace, so the call parameters are left in-place in the vCPU registers.h]hXIt is the sole responsibility of userspace to implement the PSCI SYSTEM_SUSPEND call according to ARM DEN0022D.b 5.19 “SYSTEM_SUSPEND”. KVM does not change the vCPU’s state before exiting to userspace, so the call parameters are left in-place in the vCPU registers.}(hjaUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hHUserspace is _required_ to take action for such an exit. It must either:h]hHUserspace is _required_ to take action for such an exit. It must either:}(hjoUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBUhhubh)}(hX- Honor the guest request to suspend the VM. Userspace can request in-kernel emulation of suspension by setting the calling vCPU's state to KVM_MP_STATE_SUSPENDED. Userspace must configure the vCPU's state according to the parameters passed to the PSCI function when the calling vCPU is resumed. See ARM DEN0022D.b 5.19.1 "Intended use" for details on the function parameters. - Deny the guest request to suspend the VM. See ARM DEN0022D.b 5.19.2 "Caller responsibilities" for possible return values. h]h)}(hhh](j)}(hXwHonor the guest request to suspend the VM. Userspace can request in-kernel emulation of suspension by setting the calling vCPU's state to KVM_MP_STATE_SUSPENDED. Userspace must configure the vCPU's state according to the parameters passed to the PSCI function when the calling vCPU is resumed. See ARM DEN0022D.b 5.19.1 "Intended use" for details on the function parameters. h]h)}(hXvHonor the guest request to suspend the VM. Userspace can request in-kernel emulation of suspension by setting the calling vCPU's state to KVM_MP_STATE_SUSPENDED. Userspace must configure the vCPU's state according to the parameters passed to the PSCI function when the calling vCPU is resumed. See ARM DEN0022D.b 5.19.1 "Intended use" for details on the function parameters.h]hX~Honor the guest request to suspend the VM. Userspace can request in-kernel emulation of suspension by setting the calling vCPU’s state to KVM_MP_STATE_SUSPENDED. Userspace must configure the vCPU’s state according to the parameters passed to the PSCI function when the calling vCPU is resumed. See ARM DEN0022D.b 5.19.1 “Intended use” for details on the function parameters.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjUubah}(h]h ]h"]h$]h&]uh1jhjUubj)}(hzDeny the guest request to suspend the VM. See ARM DEN0022D.b 5.19.2 "Caller responsibilities" for possible return values. h]h)}(hyDeny the guest request to suspend the VM. See ARM DEN0022D.b 5.19.2 "Caller responsibilities" for possible return values.h]h}Deny the guest request to suspend the VM. See ARM DEN0022D.b 5.19.2 “Caller responsibilities” for possible return values.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjUubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj}Uubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hX_Hibernation using the PSCI SYSTEM_OFF2 call is enabled when PSCI v1.3 is enabled. If a guest invokes the PSCI SYSTEM_OFF2 function, KVM will exit to userspace with the KVM_SYSTEM_EVENT_SHUTDOWN event type and with data[0] set to KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2. The only supported hibernate type for the SYSTEM_OFF2 function is HIBERNATE_OFF.h]hX_Hibernation using the PSCI SYSTEM_OFF2 call is enabled when PSCI v1.3 is enabled. If a guest invokes the PSCI SYSTEM_OFF2 function, KVM will exit to userspace with the KVM_SYSTEM_EVENT_SHUTDOWN event type and with data[0] set to KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2. The only supported hibernate type for the SYSTEM_OFF2 function is HIBERNATE_OFF.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubj$)}(h>/* KVM_EXIT_IOAPIC_EOI */ struct { __u8 vector; } eoi;h]h>/* KVM_EXIT_IOAPIC_EOI */ struct { __u8 vector; } eoi;}hjUsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM"hjBUhhubh)}(hX{Indicates that the VCPU's in-kernel local APIC received an EOI for a level-triggered IOAPIC interrupt. This exit only triggers when the IOAPIC is implemented in userspace (i.e. KVM_CAP_SPLIT_IRQCHIP is enabled); the userspace IOAPIC should process the EOI and retrigger the interrupt if it is still asserted. Vector is the LAPIC interrupt vector for which the EOI was received.h]hX}Indicates that the VCPU’s in-kernel local APIC received an EOI for a level-triggered IOAPIC interrupt. This exit only triggers when the IOAPIC is implemented in userspace (i.e. KVM_CAP_SPLIT_IRQCHIP is enabled); the userspace IOAPIC should process the EOI and retrigger the interrupt if it is still asserted. Vector is the LAPIC interrupt vector for which the EOI was received.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjBUhhubj$)}(hX struct kvm_hyperv_exit { #define KVM_EXIT_HYPERV_SYNIC 1 #define KVM_EXIT_HYPERV_HCALL 2 #define KVM_EXIT_HYPERV_SYNDBG 3 __u32 type; __u32 pad1; union { struct { __u32 msr; __u32 pad2; __u64 control; __u64 evt_page; __u64 msg_page; } synic; struct { __u64 input; __u64 result; __u64 params[2]; } hcall; struct { __u32 msr; __u32 pad2; __u64 control; __u64 status; __u64 send_page; __u64 recv_page; __u64 pending_page; } syndbg; } u; }; /* KVM_EXIT_HYPERV */ struct kvm_hyperv_exit hyperv;h]hX struct kvm_hyperv_exit { #define KVM_EXIT_HYPERV_SYNIC 1 #define KVM_EXIT_HYPERV_HCALL 2 #define KVM_EXIT_HYPERV_SYNDBG 3 __u32 type; __u32 pad1; union { struct { __u32 msr; __u32 pad2; __u64 control; __u64 evt_page; __u64 msg_page; } synic; struct { __u64 input; __u64 result; __u64 params[2]; } hcall; struct { __u32 msr; __u32 pad2; __u64 control; __u64 status; __u64 send_page; __u64 recv_page; __u64 pending_page; } syndbg; } u; }; /* KVM_EXIT_HYPERV */ struct kvm_hyperv_exit hyperv;}hjUsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM0hjBUhhubh)}(h`Indicates that the VCPU exits into userspace to process some tasks related to Hyper-V emulation.h]h`Indicates that the VCPU exits into userspace to process some tasks related to Hyper-V emulation.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjBUhhubh)}(hValid values for 'type' are:h]h Valid values for ‘type’ are:}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjBUhhubh)}(hA- KVM_EXIT_HYPERV_SYNIC -- synchronously notify user-space about h]h)}(hhh]j)}(h?KVM_EXIT_HYPERV_SYNIC -- synchronously notify user-space about h]h)}(h>KVM_EXIT_HYPERV_SYNIC -- synchronously notify user-space abouth]h>KVM_EXIT_HYPERV_SYNIC -- synchronously notify user-space about}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjVubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]jjuh1hhhhMVhjVubah}(h]h ]h"]h$]h&]uh1hhhhMVhjBUhhubh)}(hHyper-V SynIC state change. Notification is used to remap SynIC event/message pages and to enable/disable SynIC messages/events processing in userspace.h]hHyper-V SynIC state change. Notification is used to remap SynIC event/message pages and to enable/disable SynIC messages/events processing in userspace.}(hj?VhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjBUhhubh)}(hB- KVM_EXIT_HYPERV_SYNDBG -- synchronously notify user-space about h]h)}(hhh]j)}(h@KVM_EXIT_HYPERV_SYNDBG -- synchronously notify user-space about h]h)}(h?KVM_EXIT_HYPERV_SYNDBG -- synchronously notify user-space abouth]h?KVM_EXIT_HYPERV_SYNDBG -- synchronously notify user-space about}(hjXVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjTVubah}(h]h ]h"]h$]h&]uh1jhjQVubah}(h]h ]h"]h$]h&]jjuh1hhhhM\hjMVubah}(h]h ]h"]h$]h&]uh1hhhhM\hjBUhhubh)}(hHyper-V Synthetic debugger state change. Notification is used to either update the pending_page location or to send a control command (send the buffer located in send_page or recv a buffer to recv_page).h]hHyper-V Synthetic debugger state change. Notification is used to either update the pending_page location or to send a control command (send the buffer located in send_page or recv a buffer to recv_page).}(hjxVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjBUhhubj$)}(h\/* KVM_EXIT_ARM_NISV */ struct { __u64 esr_iss; __u64 fault_ipa; } arm_nisv;h]h\/* KVM_EXIT_ARM_NISV */ struct { __u64 esr_iss; __u64 fault_ipa; } arm_nisv;}hjVsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMdhjBUhhubh)}(hXrUsed on arm64 systems. If a guest accesses memory not in a memslot, KVM will typically return to userspace and ask it to do MMIO emulation on its behalf. However, for certain classes of instructions, no instruction decode (direction, length of memory access) is provided, and fetching and decoding the instruction from the VM is overly complicated to live in the kernel.h]hXrUsed on arm64 systems. If a guest accesses memory not in a memslot, KVM will typically return to userspace and ask it to do MMIO emulation on its behalf. However, for certain classes of instructions, no instruction decode (direction, length of memory access) is provided, and fetching and decoding the instruction from the VM is overly complicated to live in the kernel.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjBUhhubh)}(hXHistorically, when this situation occurred, KVM would print a warning and kill the VM. KVM assumed that if the guest accessed non-memslot memory, it was trying to do I/O, which just couldn't be emulated, and the warning message was phrased accordingly. However, what happened more often was that a guest bug caused access outside the guest memory areas which should lead to a more meaningful warning message and an external abort in the guest, if the access did not fall within an I/O window.h]hXHistorically, when this situation occurred, KVM would print a warning and kill the VM. KVM assumed that if the guest accessed non-memslot memory, it was trying to do I/O, which just couldn’t be emulated, and the warning message was phrased accordingly. However, what happened more often was that a guest bug caused access outside the guest memory areas which should lead to a more meaningful warning message and an external abort in the guest, if the access did not fall within an I/O window.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjBUhhubh)}(hXUserspace implementations can query for KVM_CAP_ARM_NISV_TO_USER, and enable this capability at VM creation. Once this is done, these types of errors will instead return to userspace with KVM_EXIT_ARM_NISV, with the valid bits from the ESR_EL2 in the esr_iss field, and the faulting IPA in the fault_ipa field. Userspace can either fix up the access if it's actually an I/O access by decoding the instruction from guest memory (if it's very brave) and continue executing the guest, or it can decide to suspend, dump, or restart the guest.h]hXUserspace implementations can query for KVM_CAP_ARM_NISV_TO_USER, and enable this capability at VM creation. Once this is done, these types of errors will instead return to userspace with KVM_EXIT_ARM_NISV, with the valid bits from the ESR_EL2 in the esr_iss field, and the faulting IPA in the fault_ipa field. Userspace can either fix up the access if it’s actually an I/O access by decoding the instruction from guest memory (if it’s very brave) and continue executing the guest, or it can decide to suspend, dump, or restart the guest.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjBUhhubh)}(hNote that KVM does not skip the faulting instruction as it does for KVM_EXIT_MMIO, but userspace has to emulate any change to the processing state if it decides to decode and emulate the instruction.h]hNote that KVM does not skip the faulting instruction as it does for KVM_EXIT_MMIO, but userspace has to emulate any change to the processing state if it decides to decode and emulate the instruction.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hXThis feature isn't available to protected VMs, as userspace does not have access to the state that is required to perform the emulation. Instead, a data abort exception is directly injected in the guest. Note that although KVM_CAP_ARM_NISV_TO_USER will be reported if queried outside of a protected VM context, the feature will not be exposed if queried on a protected VM file descriptor.h]hXThis feature isn’t available to protected VMs, as userspace does not have access to the state that is required to perform the emulation. Instead, a data abort exception is directly injected in the guest. Note that although KVM_CAP_ARM_NISV_TO_USER will be reported if queried outside of a protected VM context, the feature will not be exposed if queried on a protected VM file descriptor.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubj$)}(h/* KVM_EXIT_X86_RDMSR / KVM_EXIT_X86_WRMSR */ struct { __u8 error; /* user -> kernel */ __u8 pad[7]; __u32 reason; /* kernel -> user */ __u32 index; /* kernel -> user */ __u64 data; /* kernel <-> user */ } msr;h]h/* KVM_EXIT_X86_RDMSR / KVM_EXIT_X86_WRMSR */ struct { __u8 error; /* user -> kernel */ __u8 pad[7]; __u32 reason; /* kernel -> user */ __u32 index; /* kernel -> user */ __u64 data; /* kernel <-> user */ } msr;}hjVsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjBUhhubh)}(hUsed on x86 systems. When the VM capability KVM_CAP_X86_USER_SPACE_MSR is enabled, MSR accesses to registers that would invoke a #GP by KVM kernel code may instead trigger a KVM_EXIT_X86_RDMSR exit for reads and KVM_EXIT_X86_WRMSR exit for writes.h]hUsed on x86 systems. When the VM capability KVM_CAP_X86_USER_SPACE_MSR is enabled, MSR accesses to registers that would invoke a #GP by KVM kernel code may instead trigger a KVM_EXIT_X86_RDMSR exit for reads and KVM_EXIT_X86_WRMSR exit for writes.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hThe "reason" field specifies why the MSR interception occurred. Userspace will only receive MSR exits when a particular reason was requested during through ENABLE_CAP. Currently valid exit reasons are:h]hThe “reason” field specifies why the MSR interception occurred. Userspace will only receive MSR exits when a particular reason was requested during through ENABLE_CAP. Currently valid exit reasons are:}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjWubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK(uh1jOhjWubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_UNKNOWNh]hKVM_MSR_EXIT_REASON_UNKNOWN}(hj'WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$Wubah}(h]h ]h"]h$]h&]uh1johj!Wubjp)}(hhh]h)}(h$access to MSR that is unknown to KVMh]h$access to MSR that is unknown to KVM}(hj>WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;Wubah}(h]h ]h"]h$]h&]uh1johj!Wubeh}(h]h ]h"]h$]h&]uh1jjhjWubjk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_INVALh]hKVM_MSR_EXIT_REASON_INVAL}(hj^WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[Wubah}(h]h ]h"]h$]h&]uh1johjXWubjp)}(hhh]h)}(h'access to invalid MSRs or reserved bitsh]h'access to invalid MSRs or reserved bits}(hjuWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrWubah}(h]h ]h"]h$]h&]uh1johjXWubeh}(h]h ]h"]h$]h&]uh1jjhjWubjk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_FILTERh]hKVM_MSR_EXIT_REASON_FILTER}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjWubah}(h]h ]h"]h$]h&]uh1johjWubjp)}(hhh]h)}(h(access blocked by KVM_X86_SET_MSR_FILTERh]h(access blocked by KVM_X86_SET_MSR_FILTER}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjWubah}(h]h ]h"]h$]h&]uh1johjWubeh}(h]h ]h"]h$]h&]uh1jjhjWubeh}(h]h ]h"]h$]h&]uh1jehjWubeh}(h]h ]h"]h$]h&]colsKuh1jJhjWubah}(h]h ]h"]h$]h&]uh1jEhjBUhhhhhNubh)}(hX.For KVM_EXIT_X86_RDMSR, the "index" field tells userspace which MSR the guest wants to read. To respond to this request with a successful read, userspace writes the respective data into the "data" field and must continue guest execution to ensure the read data is transferred into guest register state.h]hX6For KVM_EXIT_X86_RDMSR, the “index” field tells userspace which MSR the guest wants to read. To respond to this request with a successful read, userspace writes the respective data into the “data” field and must continue guest execution to ensure the read data is transferred into guest register state.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hIf the RDMSR request was unsuccessful, userspace indicates that with a "1" in the "error" field. This will inject a #GP into the guest when the VCPU is executed again.h]hIf the RDMSR request was unsuccessful, userspace indicates that with a “1” in the “error” field. This will inject a #GP into the guest when the VCPU is executed again.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hFor KVM_EXIT_X86_WRMSR, the "index" field tells userspace which MSR the guest wants to write. Once finished processing the event, userspace must continue vCPU execution. If the MSR write was unsuccessful, userspace also sets the "error" field to "1".h]hXFor KVM_EXIT_X86_WRMSR, the “index” field tells userspace which MSR the guest wants to write. Once finished processing the event, userspace must continue vCPU execution. If the MSR write was unsuccessful, userspace also sets the “error” field to “1”.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hMSee KVM_X86_SET_MSR_FILTER for details on the interaction with MSR filtering.h]hMSee KVM_X86_SET_MSR_FILTER for details on the interaction with MSR filtering.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubj$)}(hXS struct kvm_xen_exit { #define KVM_EXIT_XEN_HCALL 1 __u32 type; union { struct { __u32 longmode; __u32 cpl; __u64 input; __u64 result; __u64 params[6]; } hcall; } u; }; /* KVM_EXIT_XEN */ struct kvm_hyperv_exit xen;h]hXS struct kvm_xen_exit { #define KVM_EXIT_XEN_HCALL 1 __u32 type; union { struct { __u32 longmode; __u32 cpl; __u64 input; __u64 result; __u64 params[6]; } hcall; } u; }; /* KVM_EXIT_XEN */ struct kvm_hyperv_exit xen;}hjXsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjBUhhubh)}(h\Indicates that the VCPU exits into userspace to process some tasks related to Xen emulation.h]h\Indicates that the VCPU exits into userspace to process some tasks related to Xen emulation.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hValid values for 'type' are:h]h Valid values for ‘type’ are:}(hj-XhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(h- KVM_EXIT_XEN_HCALL -- synchronously notify user-space about Xen hypercall. Userspace is expected to place the hypercall result into the appropriate field before invoking KVM_RUN again. h]h)}(hhh]j)}(hKVM_EXIT_XEN_HCALL -- synchronously notify user-space about Xen hypercall. Userspace is expected to place the hypercall result into the appropriate field before invoking KVM_RUN again. h]h)}(hKVM_EXIT_XEN_HCALL -- synchronously notify user-space about Xen hypercall. Userspace is expected to place the hypercall result into the appropriate field before invoking KVM_RUN again.h]hKVM_EXIT_XEN_HCALL -- synchronously notify user-space about Xen hypercall. Userspace is expected to place the hypercall result into the appropriate field before invoking KVM_RUN again.}(hjFXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBXubah}(h]h ]h"]h$]h&]uh1jhj?Xubah}(h]h ]h"]h$]h&]jjuh1hhhhMhj;Xubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubj$)}(h/* KVM_EXIT_RISCV_SBI */ struct { unsigned long extension_id; unsigned long function_id; unsigned long args[6]; unsigned long ret[2]; } riscv_sbi;h]h/* KVM_EXIT_RISCV_SBI */ struct { unsigned long extension_id; unsigned long function_id; unsigned long args[6]; unsigned long ret[2]; } riscv_sbi;}hjfXsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjBUhhubh)}(hXIf exit reason is KVM_EXIT_RISCV_SBI then it indicates that the VCPU has done a SBI call which is not handled by KVM RISC-V kernel module. The details of the SBI call are available in 'riscv_sbi' member of kvm_run structure. The 'extension_id' field of 'riscv_sbi' represents SBI extension ID whereas the 'function_id' field represents function ID of given SBI extension. The 'args' array field of 'riscv_sbi' represents parameters for the SBI call and 'ret' array field represents return values. The userspace should update the return values of SBI call before resuming the VCPU. For more details on RISC-V SBI spec refer, https://github.com/riscv/riscv-sbi-doc.h](hXIf exit reason is KVM_EXIT_RISCV_SBI then it indicates that the VCPU has done a SBI call which is not handled by KVM RISC-V kernel module. The details of the SBI call are available in ‘riscv_sbi’ member of kvm_run structure. The ‘extension_id’ field of ‘riscv_sbi’ represents SBI extension ID whereas the ‘function_id’ field represents function ID of given SBI extension. The ‘args’ array field of ‘riscv_sbi’ represents parameters for the SBI call and ‘ret’ array field represents return values. The userspace should update the return values of SBI call before resuming the VCPU. For more details on RISC-V SBI spec refer, }(hjtXhhhNhNubh reference)}(h&https://github.com/riscv/riscv-sbi-doch]h&https://github.com/riscv/riscv-sbi-doc}(hj~XhhhNhNubah}(h]h ]h"]h$]h&]refurijXuh1j|XhjtXubh.}(hjtXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubj$)}(h /* KVM_EXIT_MEMORY_FAULT */ struct { #define KVM_MEMORY_EXIT_FLAG_PRIVATE (1ULL << 3) __u64 flags; __u64 gpa; __u64 size; } memory_fault;h]h /* KVM_EXIT_MEMORY_FAULT */ struct { #define KVM_MEMORY_EXIT_FLAG_PRIVATE (1ULL << 3) __u64 flags; __u64 gpa; __u64 size; } memory_fault;}hjXsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjBUhhubh)}(hX/KVM_EXIT_MEMORY_FAULT indicates the vCPU has encountered a memory fault that could not be resolved by KVM. The 'gpa' and 'size' (in bytes) describe the guest physical address range [gpa, gpa + size) of the fault. The 'flags' field describes properties of the faulting access that are likely pertinent:h]hX;KVM_EXIT_MEMORY_FAULT indicates the vCPU has encountered a memory fault that could not be resolved by KVM. The ‘gpa’ and ‘size’ (in bytes) describe the guest physical address range [gpa, gpa + size) of the fault. The ‘flags’ field describes properties of the faulting access that are likely pertinent:}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(h- KVM_MEMORY_EXIT_FLAG_PRIVATE - When set, indicates the memory fault occurred on a private memory access. When clear, indicates the fault occurred on a shared access. h]h)}(hhh]j)}(hKVM_MEMORY_EXIT_FLAG_PRIVATE - When set, indicates the memory fault occurred on a private memory access. When clear, indicates the fault occurred on a shared access. h]h)}(hKVM_MEMORY_EXIT_FLAG_PRIVATE - When set, indicates the memory fault occurred on a private memory access. When clear, indicates the fault occurred on a shared access.h]hKVM_MEMORY_EXIT_FLAG_PRIVATE - When set, indicates the memory fault occurred on a private memory access. When clear, indicates the fault occurred on a shared access.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]jjuh1hhhhMhjXubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hX0Note! KVM_EXIT_MEMORY_FAULT is unique among all KVM exit reasons in that it accompanies a return code of '-1', not '0'! errno will always be set to EFAULT or EHWPOISON when KVM exits with KVM_EXIT_MEMORY_FAULT, userspace should assume kvm_run.exit_reason is stale/undefined for all other error numbers.h]hX8Note! KVM_EXIT_MEMORY_FAULT is unique among all KVM exit reasons in that it accompanies a return code of ‘-1’, not ‘0’! errno will always be set to EFAULT or EHWPOISON when KVM exits with KVM_EXIT_MEMORY_FAULT, userspace should assume kvm_run.exit_reason is stale/undefined for all other error numbers.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubj$)}(hn /* KVM_EXIT_NOTIFY */ struct { #define KVM_NOTIFY_CONTEXT_INVALID (1 << 0) __u32 flags; } notify;h]hn /* KVM_EXIT_NOTIFY */ struct { #define KVM_NOTIFY_CONTEXT_INVALID (1 << 0) __u32 flags; } notify;}hjXsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjBUhhubh)}(hXvUsed on x86 systems. When the VM capability KVM_CAP_X86_NOTIFY_VMEXIT is enabled, a VM exit generated if no event window occurs in VM non-root mode for a specified amount of time. Once KVM_X86_NOTIFY_VMEXIT_USER is set when enabling the cap, it would exit to userspace with the exit reason KVM_EXIT_NOTIFY for further handling. The "flags" field contains more detailed info.h]hXzUsed on x86 systems. When the VM capability KVM_CAP_X86_NOTIFY_VMEXIT is enabled, a VM exit generated if no event window occurs in VM non-root mode for a specified amount of time. Once KVM_X86_NOTIFY_VMEXIT_USER is set when enabling the cap, it would exit to userspace with the exit reason KVM_EXIT_NOTIFY for further handling. The “flags” field contains more detailed info.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubh)}(hThe valid value for 'flags' is:h]h#The valid value for ‘flags’ is:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBUhhubh)}(h- KVM_NOTIFY_CONTEXT_INVALID -- the VM context is corrupted and not valid in VMCS. It would run into unknown result if resume the target VM. h]h)}(hhh]j)}(hKVM_NOTIFY_CONTEXT_INVALID -- the VM context is corrupted and not valid in VMCS. It would run into unknown result if resume the target VM. h]h)}(hKVM_NOTIFY_CONTEXT_INVALID -- the VM context is corrupted and not valid in VMCS. It would run into unknown result if resume the target VM.h]hKVM_NOTIFY_CONTEXT_INVALID -- the VM context is corrupted and not valid in VMCS. It would run into unknown result if resume the target VM.}(hj!YhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]jjuh1hhhhMhjYubah}(h]h ]h"]h$]h&]uh1hhhhMhjBUhhubj$)}(hX/* KVM_EXIT_TDX */ struct { __u64 flags; __u64 nr; union { struct { u64 ret; u64 data[5]; } unknown; struct { u64 ret; u64 gpa; u64 size; } get_quote; struct { u64 ret; u64 leaf; u64 r11, r12, r13, r14; } get_tdvmcall_info; struct { u64 ret; u64 vector; } setup_event_notify; }; } tdx;h]hX/* KVM_EXIT_TDX */ struct { __u64 flags; __u64 nr; union { struct { u64 ret; u64 data[5]; } unknown; struct { u64 ret; u64 gpa; u64 size; } get_quote; struct { u64 ret; u64 leaf; u64 r11, r12, r13, r14; } get_tdvmcall_info; struct { u64 ret; u64 vector; } setup_event_notify; }; } tdx;}hjAYsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjBUhhubh)}(hX"Process a TDVMCALL from the guest. KVM forwards select TDVMCALL based on the Guest-Hypervisor Communication Interface (GHCI) specification; KVM bridges these requests to the userspace VMM with minimal changes, placing the inputs in the union and copying them back to the guest on re-entry.h]hX"Process a TDVMCALL from the guest. KVM forwards select TDVMCALL based on the Guest-Hypervisor Communication Interface (GHCI) specification; KVM bridges these requests to the userspace VMM with minimal changes, placing the inputs in the union and copying them back to the guest on re-entry.}(hjOYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjBUhhubh)}(hFlags are currently always zero, whereas ``nr`` contains the TDVMCALL number from register R11. The remaining field of the union provide the inputs and outputs of the TDVMCALL. Currently the following values of ``nr`` are defined:h](h)Flags are currently always zero, whereas }(hj]YhhhNhNubj)}(h``nr``h]hnr}(hjeYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]Yubh contains the TDVMCALL number from register R11. The remaining field of the union provide the inputs and outputs of the TDVMCALL. Currently the following values of }(hj]YhhhNhNubj)}(h``nr``h]hnr}(hjwYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]Yubh are defined:}(hj]YhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM3hjBUhhubh)}(hXF* ``TDVMCALL_GET_QUOTE``: the guest has requested to generate a TD-Quote signed by a service hosting TD-Quoting Enclave operating on the host. Parameters and return value are in the ``get_quote`` field of the union. The ``gpa`` field and ``size`` specify the guest physical address (without the shared bit set) and the size of a shared-memory buffer, in which the TDX guest passes a TD Report. The ``ret`` field represents the return value of the GetQuote request. When the request has been queued successfully, the TDX guest can poll the status field in the shared-memory area to check whether the Quote generation is completed or not. When completed, the generated Quote is returned via the same buffer. * ``TDVMCALL_GET_TD_VM_CALL_INFO``: the guest has requested the support status of TDVMCALLs. The output values for the given leaf should be placed in fields from ``r11`` to ``r14`` of the ``get_tdvmcall_info`` field of the union. * ``TDVMCALL_SETUP_EVENT_NOTIFY_INTERRUPT``: the guest has requested to set up a notification interrupt for vector ``vector``. h]h)}(hhh](j)}(hX``TDVMCALL_GET_QUOTE``: the guest has requested to generate a TD-Quote signed by a service hosting TD-Quoting Enclave operating on the host. Parameters and return value are in the ``get_quote`` field of the union. The ``gpa`` field and ``size`` specify the guest physical address (without the shared bit set) and the size of a shared-memory buffer, in which the TDX guest passes a TD Report. The ``ret`` field represents the return value of the GetQuote request. When the request has been queued successfully, the TDX guest can poll the status field in the shared-memory area to check whether the Quote generation is completed or not. When completed, the generated Quote is returned via the same buffer. h]h)}(hX``TDVMCALL_GET_QUOTE``: the guest has requested to generate a TD-Quote signed by a service hosting TD-Quoting Enclave operating on the host. Parameters and return value are in the ``get_quote`` field of the union. The ``gpa`` field and ``size`` specify the guest physical address (without the shared bit set) and the size of a shared-memory buffer, in which the TDX guest passes a TD Report. The ``ret`` field represents the return value of the GetQuote request. When the request has been queued successfully, the TDX guest can poll the status field in the shared-memory area to check whether the Quote generation is completed or not. When completed, the generated Quote is returned via the same buffer.h](j)}(h``TDVMCALL_GET_QUOTE``h]hTDVMCALL_GET_QUOTE}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh: the guest has requested to generate a TD-Quote signed by a service hosting TD-Quoting Enclave operating on the host. Parameters and return value are in the }(hjYhhhNhNubj)}(h ``get_quote``h]h get_quote}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh field of the union. The }(hjYhhhNhNubj)}(h``gpa``h]hgpa}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh field and }(hjYhhhNhNubj)}(h``size``h]hsize}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh specify the guest physical address (without the shared bit set) and the size of a shared-memory buffer, in which the TDX guest passes a TD Report. The }(hjYhhhNhNubj)}(h``ret``h]hret}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubhX- field represents the return value of the GetQuote request. When the request has been queued successfully, the TDX guest can poll the status field in the shared-memory area to check whether the Quote generation is completed or not. When completed, the generated Quote is returned via the same buffer.}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM8hjYubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(h``TDVMCALL_GET_TD_VM_CALL_INFO``: the guest has requested the support status of TDVMCALLs. The output values for the given leaf should be placed in fields from ``r11`` to ``r14`` of the ``get_tdvmcall_info`` field of the union. h]h)}(h``TDVMCALL_GET_TD_VM_CALL_INFO``: the guest has requested the support status of TDVMCALLs. The output values for the given leaf should be placed in fields from ``r11`` to ``r14`` of the ``get_tdvmcall_info`` field of the union.h](j)}(h ``TDVMCALL_GET_TD_VM_CALL_INFO``h]hTDVMCALL_GET_TD_VM_CALL_INFO}(hj ZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh: the guest has requested the support status of TDVMCALLs. The output values for the given leaf should be placed in fields from }(hjZhhhNhNubj)}(h``r11``h]hr11}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh to }(hjZhhhNhNubj)}(h``r14``h]hr14}(hj0ZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh of the }(hjZhhhNhNubj)}(h``get_tdvmcall_info``h]hget_tdvmcall_info}(hjBZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh field of the union.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMChjZubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(h}``TDVMCALL_SETUP_EVENT_NOTIFY_INTERRUPT``: the guest has requested to set up a notification interrupt for vector ``vector``. h]h)}(h|``TDVMCALL_SETUP_EVENT_NOTIFY_INTERRUPT``: the guest has requested to set up a notification interrupt for vector ``vector``.h](j)}(h)``TDVMCALL_SETUP_EVENT_NOTIFY_INTERRUPT``h]h%TDVMCALL_SETUP_EVENT_NOTIFY_INTERRUPT}(hjhZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdZubhH: the guest has requested to set up a notification interrupt for vector }(hjdZhhhNhNubj)}(h ``vector``h]hvector}(hjzZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdZubh.}(hjdZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMHhj`Zubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]jj uh1hhhhM8hjYubah}(h]h ]h"]h$]h&]uh1hhhhM8hjBUhhubh)}(hXKVM may add support for more values in the future that may cause a userspace exit, even without calls to ``KVM_ENABLE_CAP`` or similar. In this case, it will enter with output fields already valid; in the common case, the ``unknown.ret`` field of the union will be ``TDVMCALL_STATUS_SUBFUNC_UNSUPPORTED``. Userspace need not do anything if it does not wish to support a TDVMCALL. ::h](hiKVM may add support for more values in the future that may cause a userspace exit, even without calls to }(hjZhhhNhNubj)}(h``KVM_ENABLE_CAP``h]hKVM_ENABLE_CAP}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubhd or similar. In this case, it will enter with output fields already valid; in the common case, the }(hjZhhhNhNubj)}(h``unknown.ret``h]h unknown.ret}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh field of the union will be }(hjZhhhNhNubj)}(h'``TDVMCALL_STATUS_SUBFUNC_UNSUPPORTED``h]h#TDVMCALL_STATUS_SUBFUNC_UNSUPPORTED}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubhK. Userspace need not do anything if it does not wish to support a TDVMCALL.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMKhjBUhhubj$)}(hX /* Fix the size of the union. */ char padding[256]; }; /* * shared registers between kvm and userspace. * kvm_valid_regs specifies the register classes set by the host * kvm_dirty_regs specified the register classes dirtied by userspace * struct kvm_sync_regs is architecture specific, as well as the * bits for kvm_valid_regs and kvm_dirty_regs */ __u64 kvm_valid_regs; __u64 kvm_dirty_regs; union { struct kvm_sync_regs regs; char padding[SYNC_REGS_SIZE_BYTES]; } s;h]hX /* Fix the size of the union. */ char padding[256]; }; /* * shared registers between kvm and userspace. * kvm_valid_regs specifies the register classes set by the host * kvm_dirty_regs specified the register classes dirtied by userspace * struct kvm_sync_regs is architecture specific, as well as the * bits for kvm_valid_regs and kvm_dirty_regs */ __u64 kvm_valid_regs; __u64 kvm_dirty_regs; union { struct kvm_sync_regs regs; char padding[SYNC_REGS_SIZE_BYTES]; } s;}hjZsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMRhjBUhhubh)}(hXIf KVM_CAP_SYNC_REGS is defined, these fields allow userspace to access certain guest registers without having to call SET/GET_*REGS. Thus we can avoid some system call overhead if userspace has to handle the exit. Userspace can query the validity of the structure by checking kvm_valid_regs for specific bits. These bits are architecture specific and usually define the validity of a groups of registers. (e.g. one bit for general purpose registers)h]hXIf KVM_CAP_SYNC_REGS is defined, these fields allow userspace to access certain guest registers without having to call SET/GET_*REGS. Thus we can avoid some system call overhead if userspace has to handle the exit. Userspace can query the validity of the structure by checking kvm_valid_regs for specific bits. These bits are architecture specific and usually define the validity of a groups of registers. (e.g. one bit for general purpose registers)}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjBUhhubh)}(hPlease note that the kernel is allowed to use the kvm_run structure as the primary storage for certain register types. Therefore, the kernel may use the values in kvm_run even if the corresponding bit in kvm_dirty_regs is not set.h]hPlease note that the kernel is allowed to use the kvm_run structure as the primary storage for certain register types. Therefore, the kernel may use the values in kvm_run even if the corresponding bit in kvm_dirty_regs is not set.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjBUhhubj@)}(h.. _cap_enable:h]h}(h]h ]h"]h$]h&]jK cap-enableuh1j?hMqhjBUhhhhubeh}(h] for-arm-arm64ah ]h"]for arm/arm64:ah$]h&]uh1hhjOhhhhhMubeh}(h](the-kvm-run-structurejOeh ]h"](5. the kvm_run structurekvm_runeh$]h&]uh1hhhhhhhhMSjm}j+[jNsjo}jOjNsubh)}(hhh](h)}(h,6. Capabilities that can be enabled on vCPUsh]h,6. Capabilities that can be enabled on vCPUs}(hj3[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0[hhhhhMtubh)}(hThere are certain capabilities that change the behavior of the virtual CPU or the virtual machine when enabled. To enable them, please see :ref:`KVM_ENABLE_CAP`.h](hThere are certain capabilities that change the behavior of the virtual CPU or the virtual machine when enabled. To enable them, please see }(hjA[hhhNhNubh)}(h:ref:`KVM_ENABLE_CAP`h]j)}(hjK[h]hKVM_ENABLE_CAP}(hjM[hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjI[ubah}(h]h ]h"]h$]h&]refdocj refdomainjW[reftyperef refexplicitrefwarnjkvm_enable_capuh1hhhhMvhjA[ubh.}(hjA[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMvhj0[hhubh)}(hyBelow you can find a list of capabilities and what their effect on the vCPU or the virtual machine is when enabling them.h]hyBelow you can find a list of capabilities and what their effect on the vCPU or the virtual machine is when enabling them.}(hjs[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhj0[hhubh)}(hAThe following information is provided along with the description:h]hAThe following information is provided along with the description:}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hj0[hhubh)}(hX~Architectures: which instruction set architectures provide this ioctl. x86 includes both i386 and x86_64. Target: whether this is a per-vcpu or per-vm capability. Parameters: what parameters are accepted by the capability. Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) are not detailed, but errors with specific meanings are. h]j)}(hhh](j)}(hjArchitectures: which instruction set architectures provide this ioctl. x86 includes both i386 and x86_64. h](j)}(hArchitectures:h]hArchitectures:}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj[ubj)}(hhh]h)}(hZwhich instruction set architectures provide this ioctl. x86 includes both i386 and x86_64.h]hZwhich instruction set architectures provide this ioctl. x86 includes both i386 and x86_64.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj[ubj)}(h9Target: whether this is a per-vcpu or per-vm capability. h](j)}(hTarget:h]hTarget:}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj[ubj)}(hhh]h)}(h0whether this is a per-vcpu or per-vm capability.h]h0whether this is a per-vcpu or per-vm capability.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj[ubj)}(hFor mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV:h]h>For mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV:}(hjs_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh^hhubh)}(hX- The "params" field is of type "struct kvm_book3e_206_tlb_params". - The "array" field points to an array of type "struct kvm_book3e_206_tlb_entry". - The array consists of all entries in the first TLB, followed by all entries in the second TLB. - Within a TLB, entries are ordered first by increasing set number. Within a set, entries are ordered by way (increasing ESEL). - The hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1) where "num_sets" is the tlb_sizes[] value divided by the tlb_ways[] value. - The tsize field of mas1 shall be set to 4K on TLB0, even though the hardware ignores this value for TLB0. h]h)}(hhh](j)}(hAThe "params" field is of type "struct kvm_book3e_206_tlb_params".h]h)}(hj_h]hIThe “params” field is of type “struct kvm_book3e_206_tlb_params”.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hOThe "array" field points to an array of type "struct kvm_book3e_206_tlb_entry".h]h)}(hOThe "array" field points to an array of type "struct kvm_book3e_206_tlb_entry".h]hWThe “array” field points to an array of type “struct kvm_book3e_206_tlb_entry”.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(h^The array consists of all entries in the first TLB, followed by all entries in the second TLB.h]h)}(h^The array consists of all entries in the first TLB, followed by all entries in the second TLB.h]h^The array consists of all entries in the first TLB, followed by all entries in the second TLB.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(h~Within a TLB, entries are ordered first by increasing set number. Within a set, entries are ordered by way (increasing ESEL).h]h)}(h~Within a TLB, entries are ordered first by increasing set number. Within a set, entries are ordered by way (increasing ESEL).h]h~Within a TLB, entries are ordered first by increasing set number. Within a set, entries are ordered by way (increasing ESEL).}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hThe hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1) where "num_sets" is the tlb_sizes[] value divided by the tlb_ways[] value.h]h)}(hThe hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1) where "num_sets" is the tlb_sizes[] value divided by the tlb_ways[] value.h]hThe hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1) where “num_sets” is the tlb_sizes[] value divided by the tlb_ways[] value.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hjThe tsize field of mas1 shall be set to 4K on TLB0, even though the hardware ignores this value for TLB0. h]h)}(hiThe tsize field of mas1 shall be set to 4K on TLB0, even though the hardware ignores this value for TLB0.h]hiThe tsize field of mas1 shall be set to 4K on TLB0, even though the hardware ignores this value for TLB0.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1hhhhMhjh^hhubeh}(h]kvm-cap-sw-tlbah ]h"]6.3 kvm_cap_sw_tlbah$]h&]uh1hhj0[hhhhhMubh)}(hhh](h)}(h6.4 KVM_CAP_S390_CSS_SUPPORTh]h6.4 KVM_CAP_S390_CSS_SUPPORT}(hj.`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+`hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjB`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?`hhhKubjy)}(hs390h]h)}(hjR`h]hs390}(hjT`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjP`ubah}(h]h ]h"]h$]h&]uh1jxhj?`ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj<`hhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjp`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjm`hhhKubjy)}(hvcpuh]h)}(hj`h]hvcpu}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~`ubah}(h]h ]h"]h$]h&]uh1jxhjm`ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj<`hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj`hhhKubjy)}(hnoneh]h)}(hj`h]hnone}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`ubah}(h]h ]h"]h$]h&]uh1jxhj`ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj<`hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj`hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`ubah}(h]h ]h"]h$]h&]uh1jxhj`ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj<`hhubeh}(h]h ]h"]h$]h&]uh1j^hj+`hhhhhMubh)}(hIThis capability enables support for handling of channel I/O instructions.h]hIThis capability enables support for handling of channel I/O instructions.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+`hhubh)}(hTEST PENDING INTERRUPTION and the interrupt portion of TEST SUBCHANNEL are handled in-kernel, while the other I/O instructions are passed to userspace.h]hTEST PENDING INTERRUPTION and the interrupt portion of TEST SUBCHANNEL are handled in-kernel, while the other I/O instructions are passed to userspace.}(hj ahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+`hhubh)}(h]When this capability is enabled, KVM_EXIT_S390_TSCH will occur on TEST SUBCHANNEL intercepts.h]h]When this capability is enabled, KVM_EXIT_S390_TSCH will occur on TEST SUBCHANNEL intercepts.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+`hhubh)}(hdNote that even though this capability is enabled per-vcpu, the complete virtual machine is affected.h]hdNote that even though this capability is enabled per-vcpu, the complete virtual machine is affected.}(hj(ahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+`hhubeh}(h]kvm-cap-s390-css-supportah ]h"]6.4 kvm_cap_s390_css_supportah$]h&]uh1hhj0[hhhhhMubh)}(hhh](h)}(h6.5 KVM_CAP_PPC_EPRh]h6.5 KVM_CAP_PPC_EPR}(hjAahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>ahhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjUahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRahhhKubjy)}(hppch]h)}(hjeah]hppc}(hjgahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcaubah}(h]h ]h"]h$]h&]uh1jxhjRaubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOahhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjahhhKubjy)}(hvcpuh]h)}(hjah]hvcpu}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaubah}(h]h ]h"]h$]h&]uh1jxhjaubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOahhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjahhhKubjy)}(h4args[0] defines whether the proxy facility is activeh]h)}(hjah]h4args[0] defines whether the proxy facility is active}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaubah}(h]h ]h"]h$]h&]uh1jxhjaubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOahhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjahhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaubah}(h]h ]h"]h$]h&]uh1jxhjaubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOahhubeh}(h]h ]h"]h$]h&]uh1j^hj>ahhhhhMubh)}(hcThis capability enables or disables the delivery of interrupts through the external proxy facility.h]hcThis capability enables or disables the delivery of interrupts through the external proxy facility.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ahhubh)}(hWhen enabled (args[0] != 0), every time the guest gets an external interrupt delivered, it automatically exits into user space with a KVM_EXIT_EPR exit to receive the topmost interrupt vector.h]hWhen enabled (args[0] != 0), every time the guest gets an external interrupt delivered, it automatically exits into user space with a KVM_EXIT_EPR exit to receive the topmost interrupt vector.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ahhubh)}(hMWhen disabled (args[0] == 0), behavior is as if this facility is unsupported.h]hMWhen disabled (args[0] == 0), behavior is as if this facility is unsupported.}(hj-bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ahhubh)}(h8When this capability is enabled, KVM_EXIT_EPR can occur.h]h8When this capability is enabled, KVM_EXIT_EPR can occur.}(hj;bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ahhubeh}(h]kvm-cap-ppc-eprah ]h"]6.5 kvm_cap_ppc_eprah$]h&]uh1hhj0[hhhhhMubh)}(hhh](h)}(h6.6 KVM_CAP_IRQ_MPICh]h6.6 KVM_CAP_IRQ_MPIC}(hjTbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQbhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjebhhhKubjy)}(hppch]h)}(hjxbh]hppc}(hjzbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjvbubah}(h]h ]h"]h$]h&]uh1jxhjebubeh}(h]h ]h"]h$]h&]uh1jchhhM hjbbhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjbhhhKubjy)}(hLargs[0] is the MPIC device fd; args[1] is the MPIC CPU number for this vcpu h]h)}(hKargs[0] is the MPIC device fd; args[1] is the MPIC CPU number for this vcpuh]hKargs[0] is the MPIC device fd; args[1] is the MPIC CPU number for this vcpu}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjbubah}(h]h ]h"]h$]h&]uh1jxhjbubeh}(h]h ]h"]h$]h&]uh1jchhhM hjbbhhubeh}(h]h ]h"]h$]h&]uh1j^hjQbhhhhhM ubh)}(h>This capability connects the vcpu to an in-kernel MPIC device.h]h>This capability connects the vcpu to an in-kernel MPIC device.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQbhhubeh}(h]kvm-cap-irq-mpicah ]h"]6.6 kvm_cap_irq_mpicah$]h&]uh1hhj0[hhhhhM ubh)}(hhh](h)}(h6.7 KVM_CAP_IRQ_XICSh]h6.7 KVM_CAP_IRQ_XICS}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjbhhhKubjy)}(hppch]h)}(hjch]hppc}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubah}(h]h ]h"]h$]h&]uh1jxhjbubeh}(h]h ]h"]h$]h&]uh1jchhhMhjbhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hj#chhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj chhhKubjy)}(hvcpuh]h)}(hj3ch]hvcpu}(hj5chhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1cubah}(h]h ]h"]h$]h&]uh1jxhj cubeh}(h]h ]h"]h$]h&]uh1jchhhMhjbhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjQchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNchhhKubjy)}(hXargs[0] is the XICS device fd; args[1] is the XICS CPU number (server ID) for this vcpu h]h)}(hWargs[0] is the XICS device fd; args[1] is the XICS CPU number (server ID) for this vcpuh]hWargs[0] is the XICS device fd; args[1] is the XICS CPU number (server ID) for this vcpu}(hjcchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_cubah}(h]h ]h"]h$]h&]uh1jxhjNcubeh}(h]h ]h"]h$]h&]uh1jchhhMhjbhhubeh}(h]h ]h"]h$]h&]uh1j^hjbhhhhhMubh)}(h>This capability connects the vcpu to an in-kernel XICS device.h]h>This capability connects the vcpu to an in-kernel XICS device.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbhhubeh}(h]kvm-cap-irq-xicsah ]h"]6.7 kvm_cap_irq_xicsah$]h&]uh1hhj0[hhhhhMubh)}(hhh](h)}(h6.8 KVM_CAP_S390_IRQCHIPh]h6.8 KVM_CAP_S390_IRQCHIP}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjchhhKubjy)}(hs390h]h)}(hjch]hs390}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubah}(h]h ]h"]h$]h&]uh1jxhjcubeh}(h]h ]h"]h$]h&]uh1jchhhMhjchhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjchhhKubjy)}(hvmh]h)}(hjch]hvm}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubah}(h]h ]h"]h$]h&]uh1jxhjcubeh}(h]h ]h"]h$]h&]uh1jchhhMhjchhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj dhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj dhhhKubjy)}(hnone h]h)}(hnoneh]hnone}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdubah}(h]h ]h"]h$]h&]uh1jxhj dubeh}(h]h ]h"]h$]h&]uh1jchhhM hjchhubeh}(h]h ]h"]h$]h&]uh1j^hjchhhhhMubh)}(hnThis capability enables the in-kernel irqchip for s390. Please refer to "4.24 KVM_CREATE_IRQCHIP" for details.h]hrThis capability enables the in-kernel irqchip for s390. Please refer to “4.24 KVM_CREATE_IRQCHIP” for details.}(hj>dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjchhubeh}(h]kvm-cap-s390-irqchipah ]h"]6.8 kvm_cap_s390_irqchipah$]h&]uh1hhj0[hhhhhMubh)}(hhh](h)}(h6.9 KVM_CAP_MIPS_FPUh]h6.9 KVM_CAP_MIPS_FPU}(hjWdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTdhhhhhM&ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjkdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhdhhhKubjy)}(hmipsh]h)}(hj{dh]hmips}(hj}dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjydubah}(h]h ]h"]h$]h&]uh1jxhjhdubeh}(h]h ]h"]h$]h&]uh1jchhhM(hjedhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjdhhhKubjy)}(hvcpuh]h)}(hjdh]hvcpu}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjdubah}(h]h ]h"]h$]h&]uh1jxhjdubeh}(h]h ]h"]h$]h&]uh1jchhhM)hjedhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjdhhhKubjy)}(h2args[0] is reserved for future use (should be 0). h]h)}(h1args[0] is reserved for future use (should be 0).h]h1args[0] is reserved for future use (should be 0).}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjdubah}(h]h ]h"]h$]h&]uh1jxhjdubeh}(h]h ]h"]h$]h&]uh1jchhhM*hjedhhubeh}(h]h ]h"]h$]h&]uh1j^hjTdhhhhhM(ubh)}(hXThis capability allows the use of the host Floating Point Unit by the guest. It allows the Config1.FP bit to be set to enable the FPU in the guest. Once this is done the ``KVM_REG_MIPS_FPR_*`` and ``KVM_REG_MIPS_FCR_*`` registers can be accessed (depending on the current guest FPU register mode), and the Status.FR, Config5.FRE bits are accessible via the KVM API and also from the guest, depending on them being supported by the FPU.h](hThis capability allows the use of the host Floating Point Unit by the guest. It allows the Config1.FP bit to be set to enable the FPU in the guest. Once this is done the }(hjdhhhNhNubj)}(h``KVM_REG_MIPS_FPR_*``h]hKVM_REG_MIPS_FPR_*}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubh and }(hjdhhhNhNubj)}(h``KVM_REG_MIPS_FCR_*``h]hKVM_REG_MIPS_FCR_*}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubh registers can be accessed (depending on the current guest FPU register mode), and the Status.FR, Config5.FRE bits are accessible via the KVM API and also from the guest, depending on them being supported by the FPU.}(hjdhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM,hjTdhhubeh}(h]kvm-cap-mips-fpuah ]h"]6.9 kvm_cap_mips_fpuah$]h&]uh1hhj0[hhhhhM&ubh)}(hhh](h)}(h6.10 KVM_CAP_MIPS_MSAh]h6.10 KVM_CAP_MIPS_MSA}(hj6ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ehhhhhM4ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjJehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjGehhhKubjy)}(hmipsh]h)}(hjZeh]hmips}(hj\ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjXeubah}(h]h ]h"]h$]h&]uh1jxhjGeubeh}(h]h ]h"]h$]h&]uh1jchhhM6hjDehhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjxehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjuehhhKubjy)}(hvcpuh]h)}(hjeh]hvcpu}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjeubah}(h]h ]h"]h$]h&]uh1jxhjueubeh}(h]h ]h"]h$]h&]uh1jchhhM7hjDehhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjehhhKubjy)}(h2args[0] is reserved for future use (should be 0). h]h)}(h1args[0] is reserved for future use (should be 0).h]h1args[0] is reserved for future use (should be 0).}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjeubah}(h]h ]h"]h$]h&]uh1jxhjeubeh}(h]h ]h"]h$]h&]uh1jchhhM8hjDehhubeh}(h]h ]h"]h$]h&]uh1j^hj3ehhhhhM6ubh)}(hXTThis capability allows the use of the MIPS SIMD Architecture (MSA) by the guest. It allows the Config3.MSAP bit to be set to enable the use of MSA by the guest. Once this is done the ``KVM_REG_MIPS_VEC_*`` and ``KVM_REG_MIPS_MSA_*`` registers can be accessed, and the Config5.MSAEn bit is accessible via the KVM API and also from the guest.h](hThis capability allows the use of the MIPS SIMD Architecture (MSA) by the guest. It allows the Config3.MSAP bit to be set to enable the use of MSA by the guest. Once this is done the }(hjehhhNhNubj)}(h``KVM_REG_MIPS_VEC_*``h]hKVM_REG_MIPS_VEC_*}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh and }(hjehhhNhNubj)}(h``KVM_REG_MIPS_MSA_*``h]hKVM_REG_MIPS_MSA_*}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubhl registers can be accessed, and the Config5.MSAEn bit is accessible via the KVM API and also from the guest.}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM:hj3ehhubeh}(h]kvm-cap-mips-msaah ]h"]6.10 kvm_cap_mips_msaah$]h&]uh1hhj0[hhhhhM4ubh)}(hhh](h)}(h6.74 KVM_CAP_SYNC_REGSh]h6.74 KVM_CAP_SYNC_REGS}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhhhhhMAubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj)fhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj&fhhhKubjy)}(h s390, x86h]h)}(hj9fh]h s390, x86}(hj;fhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj7fubah}(h]h ]h"]h$]h&]uh1jxhj&fubeh}(h]h ]h"]h$]h&]uh1jchhhMChj#fhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjWfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjTfhhhKubjy)}(hs390: always enabled, x86: vcpuh]h)}(hjgfh]hs390: always enabled, x86: vcpu}(hjifhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjefubah}(h]h ]h"]h$]h&]uh1jxhjTfubeh}(h]h ]h"]h$]h&]uh1jchhhMDhj#fhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(hnoneh]h)}(hjfh]hnone}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjfubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhMEhj#fhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(hx86: KVM_CHECK_EXTENSION returns a bit-array indicating which register sets are supported (bitfields defined in arch/x86/include/uapi/asm/kvm.h). h]h)}(hx86: KVM_CHECK_EXTENSION returns a bit-array indicating which register sets are supported (bitfields defined in arch/x86/include/uapi/asm/kvm.h).h]hx86: KVM_CHECK_EXTENSION returns a bit-array indicating which register sets are supported (bitfields defined in arch/x86/include/uapi/asm/kvm.h).}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhjfubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhMFhj#fhhubeh}(h]h ]h"]h$]h&]uh1j^hjfhhhhhMCubh)}(hXAs described above in the kvm_sync_regs struct info in section :ref:`kvm_run`, KVM_CAP_SYNC_REGS "allow[s] userspace to access certain guest registers without having to call SET/GET_*REGS". This reduces overhead by eliminating repeated ioctl calls for setting and/or getting register values. This is particularly important when userspace is making synchronous guest state modifications, e.g. when emulating and/or intercepting instructions in userspace.h](h?As described above in the kvm_sync_regs struct info in section }(hjfhhhNhNubh)}(h:ref:`kvm_run`h]j)}(hjfh]hkvm_run}(hjfhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]refdocj refdomainjfreftyperef refexplicitrefwarnjkvm_runuh1hhhhMJhjfubhX|, KVM_CAP_SYNC_REGS “allow[s] userspace to access certain guest registers without having to call SET/GET_*REGS”. This reduces overhead by eliminating repeated ioctl calls for setting and/or getting register values. This is particularly important when userspace is making synchronous guest state modifications, e.g. when emulating and/or intercepting instructions in userspace.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMJhjfhhubh)}(h4For s390 specifics, please refer to the source code.h]h4For s390 specifics, please refer to the source code.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjfhhubh)}(hFor x86:h]hFor x86:}(hj%ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjfhhubh)}(hhh](j)}(hthe register sets to be copied out to kvm_run are selectable by userspace (rather that all sets being copied out for every exit).h]h)}(hthe register sets to be copied out to kvm_run are selectable by userspace (rather that all sets being copied out for every exit).h]hthe register sets to be copied out to kvm_run are selectable by userspace (rather that all sets being copied out for every exit).}(hj:ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj6gubah}(h]h ]h"]h$]h&]uh1jhj3ghhhhhNubj)}(h9vcpu_events are available in addition to regs and sregs. h]h)}(h8vcpu_events are available in addition to regs and sregs.h]h8vcpu_events are available in addition to regs and sregs.}(hjRghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjNgubah}(h]h ]h"]h$]h&]uh1jhj3ghhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMVhjfhhubh)}(hFor x86, the 'kvm_valid_regs' field of struct kvm_run is overloaded to function as an input bit-array field set by userspace to indicate the specific register sets to be copied out on the next exit.h]hFor x86, the ‘kvm_valid_regs’ field of struct kvm_run is overloaded to function as an input bit-array field set by userspace to indicate the specific register sets to be copied out on the next exit.}(hjlghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjfhhubh)}(hXXTo indicate when userspace has modified values that should be copied into the vCPU, the all architecture bitarray field, 'kvm_dirty_regs' must be set. This is done using the same bitflags as for the 'kvm_valid_regs' field. If the dirty bit is not set, then the register set values will not be copied into the vCPU even if they've been modified.h]hXbTo indicate when userspace has modified values that should be copied into the vCPU, the all architecture bitarray field, ‘kvm_dirty_regs’ must be set. This is done using the same bitflags as for the ‘kvm_valid_regs’ field. If the dirty bit is not set, then the register set values will not be copied into the vCPU even if they’ve been modified.}(hjzghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjfhhubh)}(h6Unused bitfields in the bitarrays must be set to zero.h]h6Unused bitfields in the bitarrays must be set to zero.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjfhhubj$)}(hxstruct kvm_sync_regs { struct kvm_regs regs; struct kvm_sregs sregs; struct kvm_vcpu_events events; };h]hxstruct kvm_sync_regs { struct kvm_regs regs; struct kvm_sregs sregs; struct kvm_vcpu_events events; };}hjgsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhhjfhhubeh}(h]kvm-cap-sync-regsah ]h"]6.74 kvm_cap_sync_regsah$]h&]uh1hhj0[hhhhhMAubh)}(hhh](h)}(h6.75 KVM_CAP_PPC_IRQ_XIVEh]h6.75 KVM_CAP_PPC_IRQ_XIVE}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghhhhhMoubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjghhhKubjy)}(hppch]h)}(hjgh]hppc}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjgubah}(h]h ]h"]h$]h&]uh1jxhjgubeh}(h]h ]h"]h$]h&]uh1jchhhMqhjghhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjghhhKubjy)}(hvcpuh]h)}(hjhh]hvcpu}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjgubah}(h]h ]h"]h$]h&]uh1jxhjgubeh}(h]h ]h"]h$]h&]uh1jchhhMrhjghhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhhKubjy)}(hXargs[0] is the XIVE device fd; args[1] is the XIVE CPU number (server ID) for this vcpu h]h)}(hWargs[0] is the XIVE device fd; args[1] is the XIVE CPU number (server ID) for this vcpuh]hWargs[0] is the XIVE device fd; args[1] is the XIVE CPU number (server ID) for this vcpu}(hj1hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj-hubah}(h]h ]h"]h$]h&]uh1jxhjhubeh}(h]h ]h"]h$]h&]uh1jchhhMshjghhubeh}(h]h ]h"]h$]h&]uh1j^hjghhhhhMqubh)}(h>This capability connects the vcpu to an in-kernel XIVE device.h]h>This capability connects the vcpu to an in-kernel XIVE device.}(hjQhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjghhubeh}(h]kvm-cap-ppc-irq-xiveah ]h"]6.75 kvm_cap_ppc_irq_xiveah$]h&]uh1hhj0[hhhhhMoubh)}(hhh](h)}(h6.76 KVM_CAP_HYPERV_SYNICh]h6.76 KVM_CAP_HYPERV_SYNIC}(hjjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghhhhhhMyubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj~hhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj{hhhhKubjy)}(hx86h]h)}(hjhh]hx86}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjhubah}(h]h ]h"]h$]h&]uh1jxhj{hubeh}(h]h ]h"]h$]h&]uh1jchhhM{hjxhhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhhKubjy)}(hvcpu h]h)}(hvcpuh]hvcpu}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjhubah}(h]h ]h"]h$]h&]uh1jxhjhubeh}(h]h ]h"]h$]h&]uh1jchhhM|hjxhhhubeh}(h]h ]h"]h$]h&]uh1j^hjghhhhhhM{ubh)}(hThis capability, if KVM_CHECK_EXTENSION indicates that it is available, means that the kernel has an implementation of the Hyper-V Synthetic interrupt controller(SynIC). Hyper-V SynIC is used to support Windows Hyper-V based guest paravirt drivers(VMBus).h]hThis capability, if KVM_CHECK_EXTENSION indicates that it is available, means that the kernel has an implementation of the Hyper-V Synthetic interrupt controller(SynIC). Hyper-V SynIC is used to support Windows Hyper-V based guest paravirt drivers(VMBus).}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hjghhhubh)}(hXIn order to use SynIC, it has to be activated by setting this capability via KVM_ENABLE_CAP ioctl on the vcpu fd. Note that this will disable the use of APIC hardware virtualization even if supported by the CPU, as it's incompatible with SynIC auto-EOI behavior.h]hXIn order to use SynIC, it has to be activated by setting this capability via KVM_ENABLE_CAP ioctl on the vcpu fd. Note that this will disable the use of APIC hardware virtualization even if supported by the CPU, as it’s incompatible with SynIC auto-EOI behavior.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjghhhubeh}(h]kvm-cap-hyperv-synicah ]h"]6.76 kvm_cap_hyperv_synicah$]h&]uh1hhj0[hhhhhMyubh)}(hhh](h)}(h6.77 KVM_CAP_HYPERV_SYNIC2h]h6.77 KVM_CAP_HYPERV_SYNIC2}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjihhhKubjy)}(hx86h]h)}(hj)ih]hx86}(hj+ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'iubah}(h]h ]h"]h$]h&]uh1jxhjiubeh}(h]h ]h"]h$]h&]uh1jchhhMhjihhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjGihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDihhhKubjy)}(hvcpu h]h)}(hvcpuh]hvcpu}(hjYihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjUiubah}(h]h ]h"]h$]h&]uh1jxhjDiubeh}(h]h ]h"]h$]h&]uh1jchhhMhjihhubeh}(h]h ]h"]h$]h&]uh1j^hjihhhhhMubh)}(hXThis capability enables a newer version of Hyper-V Synthetic interrupt controller (SynIC). The only difference with KVM_CAP_HYPERV_SYNIC is that KVM doesn't clear SynIC message and event flags pages when they are enabled by writing to the respective MSRs.h]hXThis capability enables a newer version of Hyper-V Synthetic interrupt controller (SynIC). The only difference with KVM_CAP_HYPERV_SYNIC is that KVM doesn’t clear SynIC message and event flags pages when they are enabled by writing to the respective MSRs.}(hjyihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjihhubeh}(h]kvm-cap-hyperv-synic2ah ]h"]6.77 kvm_cap_hyperv_synic2ah$]h&]uh1hhj0[hhhhhMubh)}(hhh](h)}(h#6.78 KVM_CAP_HYPERV_DIRECT_TLBFLUSHh]h#6.78 KVM_CAP_HYPERV_DIRECT_TLBFLUSH}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjihhhKubjy)}(hx86h]h)}(hjih]hx86}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjiubah}(h]h ]h"]h$]h&]uh1jxhjiubeh}(h]h ]h"]h$]h&]uh1jchhhMhjihhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjihhhKubjy)}(hvcpu h]h)}(hvcpuh]hvcpu}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjiubah}(h]h ]h"]h$]h&]uh1jxhjiubeh}(h]h ]h"]h$]h&]uh1jchhhMhjihhubeh}(h]h ]h"]h$]h&]uh1j^hjihhhhhMubh)}(hXmThis capability indicates that KVM running on top of Hyper-V hypervisor enables Direct TLB flush for its guests meaning that TLB flush hypercalls are handled by Level 0 hypervisor (Hyper-V) bypassing KVM. Due to the different ABI for hypercall parameters between Hyper-V and KVM, enabling this capability effectively disables all hypercall handling by KVM (as some KVM hypercall may be mistakenly treated as TLB flush hypercalls by Hyper-V) so userspace should disable KVM identification in CPUID and only exposes Hyper-V identification. In this case, guest thinks it's running on Hyper-V and only use Hyper-V hypercalls.h]hXoThis capability indicates that KVM running on top of Hyper-V hypervisor enables Direct TLB flush for its guests meaning that TLB flush hypercalls are handled by Level 0 hypervisor (Hyper-V) bypassing KVM. Due to the different ABI for hypercall parameters between Hyper-V and KVM, enabling this capability effectively disables all hypercall handling by KVM (as some KVM hypercall may be mistakenly treated as TLB flush hypercalls by Hyper-V) so userspace should disable KVM identification in CPUID and only exposes Hyper-V identification. In this case, guest thinks it’s running on Hyper-V and only use Hyper-V hypercalls.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjihhubeh}(h]kvm-cap-hyperv-direct-tlbflushah ]h"]#6.78 kvm_cap_hyperv_direct_tlbflushah$]h&]uh1hhj0[hhhhhMubh)}(hhh](h)}(h!6.79 KVM_CAP_HYPERV_ENFORCE_CPUIDh]h!6.79 KVM_CAP_HYPERV_ENFORCE_CPUID}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj3jhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0jhhhKubjy)}(hx86h]h)}(hjCjh]hx86}(hjEjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAjubah}(h]h ]h"]h$]h&]uh1jxhj0jubeh}(h]h ]h"]h$]h&]uh1jchhhMhj-jhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjajhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj^jhhhKubjy)}(hvcpu h]h)}(hvcpuh]hvcpu}(hjsjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjojubah}(h]h ]h"]h$]h&]uh1jxhj^jubeh}(h]h ]h"]h$]h&]uh1jchhhMhj-jhhubeh}(h]h ]h"]h$]h&]uh1j^hjjhhhhhMubh)}(hX)When enabled, KVM will disable emulated Hyper-V features provided to the guest according to the bits Hyper-V CPUID feature leaves. Otherwise, all currently implemented Hyper-V features are provided unconditionally when Hyper-V identification is set in the HYPERV_CPUID_INTERFACE (0x40000001) leaf.h]hX)When enabled, KVM will disable emulated Hyper-V features provided to the guest according to the bits Hyper-V CPUID feature leaves. Otherwise, all currently implemented Hyper-V features are provided unconditionally when Hyper-V identification is set in the HYPERV_CPUID_INTERFACE (0x40000001) leaf.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjjhhubeh}(h]kvm-cap-hyperv-enforce-cpuidah ]h"]!6.79 kvm_cap_hyperv_enforce_cpuidah$]h&]uh1hhj0[hhhhhMubh)}(hhh](h)}(h%6.80 KVM_CAP_ENFORCE_PV_FEATURE_CPUIDh]h%6.80 KVM_CAP_ENFORCE_PV_FEATURE_CPUID}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjhhhKubjy)}(hx86h]h)}(hjjh]hx86}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjjubah}(h]h ]h"]h$]h&]uh1jxhjjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjjhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjhhhKubjy)}(hvcpu h]h)}(hvcpuh]hvcpu}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjjubah}(h]h ]h"]h$]h&]uh1jxhjjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjjhhubeh}(h]h ]h"]h$]h&]uh1j^hjjhhhhhMubh)}(hX When enabled, KVM will disable paravirtual features provided to the guest according to the bits in the KVM_CPUID_FEATURES CPUID leaf (0x40000001). Otherwise, a guest may use the paravirtual features regardless of what has actually been exposed through the CPUID leaf.h]hX When enabled, KVM will disable paravirtual features provided to the guest according to the bits in the KVM_CPUID_FEATURES CPUID leaf (0x40000001). Otherwise, a guest may use the paravirtual features regardless of what has actually been exposed through the CPUID leaf.}(hj khhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjjhhubj@)}(h.. _KVM_CAP_DIRTY_LOG_RING:h]h}(h]h ]h"]h$]h&]jKkvm-cap-dirty-log-ringuh1j?hMhjjhhhhubj@)}(h.. _cap_enable_vm:h]h}(h]h ]h"]h$]h&]jK cap-enable-vmuh1j?hMhjjhhhhjm}kvm_cap_dirty_log_ringj.ksjo}j8kj.ksubeh}(h] kvm-cap-enforce-pv-feature-cpuidah ]h"]%6.80 kvm_cap_enforce_pv_feature_cpuidah$]h&]uh1hhj0[hhhhhMubeh}(h]()capabilities-that-can-be-enabled-on-vcpusj[eh ]h"](,6. capabilities that can be enabled on vcpus cap_enableeh$]h&]uh1hhhhhhhhMtjm}jUkj[sjo}j[j[subh)}(hhh](h)}(h*7. Capabilities that can be enabled on VMsh]h*7. Capabilities that can be enabled on VMs}(hj]khhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZkhhhhhMubh)}(hThere are certain capabilities that change the behavior of the virtual machine when enabled. To enable them, please see section :ref:`KVM_ENABLE_CAP`. Below you can find a list of capabilities and what their effect on the VM is when enabling them.h](hThere are certain capabilities that change the behavior of the virtual machine when enabled. To enable them, please see section }(hjkkhhhNhNubh)}(h:ref:`KVM_ENABLE_CAP`h]j)}(hjukh]hKVM_ENABLE_CAP}(hjwkhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjskubah}(h]h ]h"]h$]h&]refdocj refdomainjkreftyperef refexplicitrefwarnjkvm_enable_capuh1hhhhMhjkkubhb. Below you can find a list of capabilities and what their effect on the VM is when enabling them.}(hjkkhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjZkhhubh)}(hAThe following information is provided along with the description:h]hAThe following information is provided along with the description:}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZkhhubh)}(hX@Architectures: which instruction set architectures provide this ioctl. x86 includes both i386 and x86_64. Parameters: what parameters are accepted by the capability. Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) are not detailed, but errors with specific meanings are. h]j)}(hhh](j)}(hjArchitectures: which instruction set architectures provide this ioctl. x86 includes both i386 and x86_64. h](j)}(hArchitectures:h]hArchitectures:}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjkubj)}(hhh]h)}(hZwhich instruction set architectures provide this ioctl. x86 includes both i386 and x86_64.h]hZwhich instruction set architectures provide this ioctl. x86 includes both i386 and x86_64.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjkubah}(h]h ]h"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1jhhhMhjkubj)}(hohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjnhhubh)}(hWBefore exiting to userspace, kvm handlers should fill in s390_stsi field of vcpu->run::h]hVBefore exiting to userspace, kvm handlers should fill in s390_stsi field of vcpu->run:}(hjLohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjnhhubj$)}(hstruct { __u64 addr; __u8 ar; __u8 reserved; __u8 fc; __u8 sel1; __u16 sel2; } s390_stsi; @addr - guest address of STSI SYSIB @fc - function code @sel1 - selector 1 @sel2 - selector 2 @ar - access register numberh]hstruct { __u64 addr; __u8 ar; __u8 reserved; __u8 fc; __u8 sel1; __u16 sel2; } s390_stsi; @addr - guest address of STSI SYSIB @fc - function code @sel1 - selector 1 @sel2 - selector 2 @ar - access register number}hjZosbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjnhhubh)}(h9KVM handlers should exit to userspace with rc = -EREMOTE.h]h9KVM handlers should exit to userspace with rc = -EREMOTE.}(hjhohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjnhhubeh}(h]kvm-cap-s390-user-stsiah ]h"]7.4 kvm_cap_s390_user_stsiah$]h&]uh1hhjZkhhhhhM ubh)}(hhh](h)}(h7.5 KVM_CAP_SPLIT_IRQCHIPh]h7.5 KVM_CAP_SPLIT_IRQCHIP}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ohhhhhM+ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjohhhKubjy)}(hx86h]h)}(hjoh]hx86}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjoubah}(h]h ]h"]h$]h&]uh1jxhjoubeh}(h]h ]h"]h$]h&]uh1jchhhM-hjohhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjohhhKubjy)}(h9args[0] - number of routes reserved for userspace IOAPICsh]h)}(hjoh]h9args[0] - number of routes reserved for userspace IOAPICs}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hjoubah}(h]h ]h"]h$]h&]uh1jxhjoubeh}(h]h ]h"]h$]h&]uh1jchhhM.hjohhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjohhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjoubah}(h]h ]h"]h$]h&]uh1jxhjoubeh}(h]h ]h"]h$]h&]uh1jchhhM/hjohhubeh}(h]h ]h"]h$]h&]uh1j^hj~ohhhhhM-ubh)}(hCreate a local apic for each processor in the kernel. This can be used instead of KVM_CREATE_IRQCHIP if the userspace VMM wishes to emulate the IOAPIC and PIC (and also the PIT, even though this has to be enabled separately).h]hCreate a local apic for each processor in the kernel. This can be used instead of KVM_CREATE_IRQCHIP if the userspace VMM wishes to emulate the IOAPIC and PIC (and also the PIT, even though this has to be enabled separately).}(hj#phhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj~ohhubh)}(hX]This capability also enables in kernel routing of interrupt requests; when KVM_CAP_SPLIT_IRQCHIP only routes of KVM_IRQ_ROUTING_MSI type are used in the IRQ routing table. The first args[0] MSI routes are reserved for the IOAPIC pins. Whenever the LAPIC receives an EOI for these routes, a KVM_EXIT_IOAPIC_EOI vmexit will be reported to userspace.h]hX]This capability also enables in kernel routing of interrupt requests; when KVM_CAP_SPLIT_IRQCHIP only routes of KVM_IRQ_ROUTING_MSI type are used in the IRQ routing table. The first args[0] MSI routes are reserved for the IOAPIC pins. Whenever the LAPIC receives an EOI for these routes, a KVM_EXIT_IOAPIC_EOI vmexit will be reported to userspace.}(hj1phhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj~ohhubh)}(hFails if VCPU has already been created, or if the irqchip is already in the kernel (i.e. KVM_CREATE_IRQCHIP has already been called).h]hFails if VCPU has already been created, or if the irqchip is already in the kernel (i.e. KVM_CREATE_IRQCHIP has already been called).}(hj?phhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj~ohhubeh}(h]kvm-cap-split-irqchipah ]h"]7.5 kvm_cap_split_irqchipah$]h&]uh1hhjZkhhhhhM+ubh)}(hhh](h)}(h7.6 KVM_CAP_S390_RIh]h7.6 KVM_CAP_S390_RI}(hjXphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUphhhhhM@ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjlphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjiphhhKubjy)}(hs390h]h)}(hj|ph]hs390}(hj~phhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjzpubah}(h]h ]h"]h$]h&]uh1jxhjipubeh}(h]h ]h"]h$]h&]uh1jchhhMBhjfphhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(hnone h]h)}(hnoneh]hnone}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjpubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhMChjfphhubeh}(h]h ]h"]h$]h&]uh1j^hjUphhhhhMBubh)}(hAllows use of runtime-instrumentation introduced with zEC12 processor. Will return -EINVAL if the machine does not support runtime-instrumentation. Will return -EBUSY if a VCPU has already been created.h]hAllows use of runtime-instrumentation introduced with zEC12 processor. Will return -EINVAL if the machine does not support runtime-instrumentation. Will return -EBUSY if a VCPU has already been created.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjUphhubeh}(h]kvm-cap-s390-riah ]h"]7.6 kvm_cap_s390_riah$]h&]uh1hhjZkhhhhhM@ubh)}(hhh](h)}(h7.7 KVM_CAP_X2APIC_APIh]h7.7 KVM_CAP_X2APIC_API}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphhhhhMJubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(hx86h]h)}(hj qh]hx86}(hj qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjqubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhMLhjphhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj'qhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$qhhhKubjy)}(h)args[0] - features that should be enabledh]h)}(hj7qh]h)args[0] - features that should be enabled}(hj9qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj5qubah}(h]h ]h"]h$]h&]uh1jxhj$qubeh}(h]h ]h"]h$]h&]uh1jchhhMMhjphhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjUqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRqhhhKubjy)}(h=0 on success, -EINVAL when args[0] contains invalid features h]h)}(h<0 on success, -EINVAL when args[0] contains invalid featuresh]h<0 on success, -EINVAL when args[0] contains invalid features}(hjgqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjcqubah}(h]h ]h"]h$]h&]uh1jxhjRqubeh}(h]h ]h"]h$]h&]uh1jchhhMNhjphhubeh}(h]h ]h"]h$]h&]uh1j^hjphhhhhMLubh)}(h$Valid feature flags in args[0] are::h]h#Valid feature flags in args[0] are:}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjphhubj$)}(hw#define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0) #define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1)h]hw#define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0) #define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1)}hjqsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMRhjphhubh)}(hEnabling KVM_X2APIC_API_USE_32BIT_IDS changes the behavior of KVM_SET_GSI_ROUTING, KVM_SIGNAL_MSI, KVM_SET_LAPIC, and KVM_GET_LAPIC, allowing the use of 32-bit APIC IDs. See KVM_CAP_X2APIC_API in their respective sections.h]hEnabling KVM_X2APIC_API_USE_32BIT_IDS changes the behavior of KVM_SET_GSI_ROUTING, KVM_SIGNAL_MSI, KVM_SET_LAPIC, and KVM_GET_LAPIC, allowing the use of 32-bit APIC IDs. See KVM_CAP_X2APIC_API in their respective sections.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjphhubh)}(hXIKVM_X2APIC_API_DISABLE_BROADCAST_QUIRK must be enabled for x2APIC to work in logical mode or with more than 255 VCPUs. Otherwise, KVM treats 0xff as a broadcast even in x2APIC mode in order to support physical x2APIC without interrupt remapping. This is undesirable in logical mode, where 0xff represents CPUs 0-7 in cluster 0.h]hXIKVM_X2APIC_API_DISABLE_BROADCAST_QUIRK must be enabled for x2APIC to work in logical mode or with more than 255 VCPUs. Otherwise, KVM treats 0xff as a broadcast even in x2APIC mode in order to support physical x2APIC without interrupt remapping. This is undesirable in logical mode, where 0xff represents CPUs 0-7 in cluster 0.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjphhubeh}(h]kvm-cap-x2apic-apiah ]h"]7.7 kvm_cap_x2apic_apiah$]h&]uh1hhjZkhhhhhMJubh)}(hhh](h)}(h7.8 KVM_CAP_S390_USER_INSTR0h]h7.8 KVM_CAP_S390_USER_INSTR0}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhhhhhMaubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjqhhhKubjy)}(hs390h]h)}(hjqh]hs390}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchjqubah}(h]h ]h"]h$]h&]uh1jxhjqubeh}(h]h ]h"]h$]h&]uh1jchhhMchjqhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj rhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj rhhhKubjy)}(hnone h]h)}(hnoneh]hnone}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjrubah}(h]h ]h"]h$]h&]uh1jxhj rubeh}(h]h ]h"]h$]h&]uh1jchhhMdhjqhhubeh}(h]h ]h"]h$]h&]uh1j^hjqhhhhhMcubh)}(hX6With this capability enabled, all illegal instructions 0x0000 (2 bytes) will be intercepted and forwarded to user space. User space can use this mechanism e.g. to realize 2-byte software breakpoints. The kernel will not inject an operating exception for these instructions, user space has to take care of that.h]hX6With this capability enabled, all illegal instructions 0x0000 (2 bytes) will be intercepted and forwarded to user space. User space can use this mechanism e.g. to realize 2-byte software breakpoints. The kernel will not inject an operating exception for these instructions, user space has to take care of that.}(hj>rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjqhhubh)}(h^This capability can be enabled dynamically even if VCPUs were already created and are running.h]h^This capability can be enabled dynamically even if VCPUs were already created and are running.}(hjLrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjqhhubeh}(h]kvm-cap-s390-user-instr0ah ]h"]7.8 kvm_cap_s390_user_instr0ah$]h&]uh1hhjZkhhhhhMaubh)}(hhh](h)}(h7.9 KVM_CAP_S390_GSh]h7.9 KVM_CAP_S390_GS}(hjerhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbrhhhhhMpubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjyrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvrhhhKubjy)}(hs390h]h)}(hjrh]hs390}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjrubah}(h]h ]h"]h$]h&]uh1jxhjvrubeh}(h]h ]h"]h$]h&]uh1jchhhMrhjsrhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrhhhKubjy)}(hnoneh]h)}(hjrh]hnone}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjrubah}(h]h ]h"]h$]h&]uh1jxhjrubeh}(h]h ]h"]h$]h&]uh1jchhhMshjsrhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrhhhKubjy)}(hr0 on success; -EINVAL if the machine does not support guarded storage; -EBUSY if a VCPU has already been created. h]h)}(hq0 on success; -EINVAL if the machine does not support guarded storage; -EBUSY if a VCPU has already been created.h]hq0 on success; -EINVAL if the machine does not support guarded storage; -EBUSY if a VCPU has already been created.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjrubah}(h]h ]h"]h$]h&]uh1jxhjrubeh}(h]h ]h"]h$]h&]uh1jchhhMthjsrhhubeh}(h]h ]h"]h$]h&]uh1j^hjbrhhhhhMrubh)}(h0Allows use of guarded storage for the KVM guest.h]h0Allows use of guarded storage for the KVM guest.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjbrhhubeh}(h]kvm-cap-s390-gsah ]h"]7.9 kvm_cap_s390_gsah$]h&]uh1hhjZkhhhhhMpubh)}(hhh](h)}(h7.10 KVM_CAP_S390_AISh]h7.10 KVM_CAP_S390_AIS}(hj shhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshhhhhMzubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj4shhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1shhhKubjy)}(hs390h]h)}(hjDsh]hs390}(hjFshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjBsubah}(h]h ]h"]h$]h&]uh1jxhj1subeh}(h]h ]h"]h$]h&]uh1jchhhM|hj.shhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjbshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_shhhKubjy)}(hnone h]h)}(hnoneh]hnone}(hjtshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjpsubah}(h]h ]h"]h$]h&]uh1jxhj_subeh}(h]h ]h"]h$]h&]uh1jchhhM}hj.shhubeh}(h]h ]h"]h$]h&]uh1j^hjshhhhhM|ubh)}(hqAllow use of adapter-interruption suppression. :Returns: 0 on success; -EBUSY if a VCPU has already been created.h]hqAllow use of adapter-interruption suppression. :Returns: 0 on success; -EBUSY if a VCPU has already been created.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjshhubeh}(h]kvm-cap-s390-aisah ]h"]7.10 kvm_cap_s390_aisah$]h&]uh1hhjZkhhhhhMzubh)}(hhh](h)}(h7.11 KVM_CAP_PPC_SMTh]h7.11 KVM_CAP_PPC_SMT}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjshhhKubjy)}(hppch]h)}(hjsh]hppc}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjsubah}(h]h ]h"]h$]h&]uh1jxhjsubeh}(h]h ]h"]h$]h&]uh1jchhhMhjshhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjshhhKubjy)}(hvsmt_mode, flags h]h)}(hvsmt_mode, flagsh]hvsmt_mode, flags}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjsubah}(h]h ]h"]h$]h&]uh1jxhjsubeh}(h]h ]h"]h$]h&]uh1jchhhMhjshhubeh}(h]h ]h"]h$]h&]uh1j^hjshhhhhMubh)}(hXEnabling this capability on a VM provides userspace with a way to set the desired virtual SMT mode (i.e. the number of virtual CPUs per virtual core). The virtual SMT mode, vsmt_mode, must be a power of 2 between 1 and 8. On POWER8, vsmt_mode must also be no greater than the number of threads per subcore for the host. Currently flags must be 0. A successful call to enable this capability will result in vsmt_mode being returned when the KVM_CAP_PPC_SMT capability is subsequently queried for the VM. This capability is only supported by HV KVM, and can only be set before any VCPUs have been created. The KVM_CAP_PPC_SMT_POSSIBLE capability indicates which virtual SMT modes are available.h]hXEnabling this capability on a VM provides userspace with a way to set the desired virtual SMT mode (i.e. the number of virtual CPUs per virtual core). The virtual SMT mode, vsmt_mode, must be a power of 2 between 1 and 8. On POWER8, vsmt_mode must also be no greater than the number of threads per subcore for the host. Currently flags must be 0. A successful call to enable this capability will result in vsmt_mode being returned when the KVM_CAP_PPC_SMT capability is subsequently queried for the VM. This capability is only supported by HV KVM, and can only be set before any VCPUs have been created. The KVM_CAP_PPC_SMT_POSSIBLE capability indicates which virtual SMT modes are available.}(hj!thhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjshhubeh}(h]kvm-cap-ppc-smtah ]h"]7.11 kvm_cap_ppc_smtah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.12 KVM_CAP_PPC_FWNMIh]h7.12 KVM_CAP_PPC_FWNMI}(hj:thhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7thhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjNthhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjKthhhKubjy)}(hppch]h)}(hj^th]hppc}(hj`thhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\tubah}(h]h ]h"]h$]h&]uh1jxhjKtubeh}(h]h ]h"]h$]h&]uh1jchhhMhjHthhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj|thhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjythhhKubjy)}(hnone h]h)}(hnoneh]hnone}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjtubah}(h]h ]h"]h$]h&]uh1jxhjytubeh}(h]h ]h"]h$]h&]uh1jchhhMhjHthhubeh}(h]h ]h"]h$]h&]uh1j^hj7thhhhhMubh)}(hX6With this capability a machine check exception in the guest address space will cause KVM to exit the guest with NMI exit reason. This enables QEMU to build error log and branch to guest kernel registered machine check handling routine. Without this capability KVM will branch to guests' 0x200 interrupt vector.h]hX8With this capability a machine check exception in the guest address space will cause KVM to exit the guest with NMI exit reason. This enables QEMU to build error log and branch to guest kernel registered machine check handling routine. Without this capability KVM will branch to guests’ 0x200 interrupt vector.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7thhubeh}(h]kvm-cap-ppc-fwnmiah ]h"]7.12 kvm_cap_ppc_fwnmiah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.13 KVM_CAP_X86_DISABLE_EXITSh]h7.13 KVM_CAP_X86_DISABLE_EXITS}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjthhhKubjy)}(hx86h]h)}(hjth]hx86}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjtubah}(h]h ]h"]h$]h&]uh1jxhjtubeh}(h]h ]h"]h$]h&]uh1jchhhMhjthhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj uhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjuhhhKubjy)}(h(args[0] defines which exits are disabledh]h)}(hjuh]h(args[0] defines which exits are disabled}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuubah}(h]h ]h"]h$]h&]uh1jxhjuubeh}(h]h ]h"]h$]h&]uh1jchhhMhjthhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj7uhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4uhhhKubjy)}(hd0 on success, -EINVAL when args[0] contains invalid exits or if any vCPUs have already been created h]h)}(hc0 on success, -EINVAL when args[0] contains invalid exits or if any vCPUs have already been createdh]hc0 on success, -EINVAL when args[0] contains invalid exits or if any vCPUs have already been created}(hjIuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEuubah}(h]h ]h"]h$]h&]uh1jxhj4uubeh}(h]h ]h"]h$]h&]uh1jchhhMhjthhubeh}(h]h ]h"]h$]h&]uh1j^hjthhhhhMubh)}(hValid bits in args[0] are::h]hValid bits in args[0] are:}(hjiuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjthhubj$)}(h#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) #define KVM_X86_DISABLE_EXITS_HLT (1 << 1) #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) #define KVM_X86_DISABLE_EXITS_CSTATE (1 << 3)h]h#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) #define KVM_X86_DISABLE_EXITS_HLT (1 << 1) #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) #define KVM_X86_DISABLE_EXITS_CSTATE (1 << 3)}hjwusbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjthhubh)}(hXcEnabling this capability on a VM provides userspace with a way to no longer intercept some instructions for improved latency in some workloads, and is suggested when vCPUs are associated to dedicated physical CPUs. More bits can be added in the future; userspace can just pass the KVM_CHECK_EXTENSION result to KVM_ENABLE_CAP to disable all such vmexits.h]hXcEnabling this capability on a VM provides userspace with a way to no longer intercept some instructions for improved latency in some workloads, and is suggested when vCPUs are associated to dedicated physical CPUs. More bits can be added in the future; userspace can just pass the KVM_CHECK_EXTENSION result to KVM_ENABLE_CAP to disable all such vmexits.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjthhubh)}(h=Do not enable KVM_FEATURE_PV_UNHALT if you disable HLT exits.h]h=Do not enable KVM_FEATURE_PV_UNHALT if you disable HLT exits.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjthhubeh}(h]kvm-cap-x86-disable-exitsah ]h"]7.13 kvm_cap_x86_disable_exitsah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.14 KVM_CAP_S390_HPAGE_1Mh]h7.14 KVM_CAP_S390_HPAGE_1M}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjuhhhKubjy)}(hs390h]h)}(hjuh]hs390}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuubah}(h]h ]h"]h$]h&]uh1jxhjuubeh}(h]h ]h"]h$]h&]uh1jchhhMhjuhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjuhhhKubjy)}(hnoneh]h)}(hjuh]hnone}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuubah}(h]h ]h"]h$]h&]uh1jxhjuubeh}(h]h ]h"]h$]h&]uh1jchhhMhjuhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvhhhKubjy)}(h0 on success, -EINVAL if hpage module parameter was not set or cmma is enabled, or the VM has the KVM_VM_S390_UCONTROL flag set h]h)}(h0 on success, -EINVAL if hpage module parameter was not set or cmma is enabled, or the VM has the KVM_VM_S390_UCONTROL flag seth]h0 on success, -EINVAL if hpage module parameter was not set or cmma is enabled, or the VM has the KVM_VM_S390_UCONTROL flag set}(hj.vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*vubah}(h]h ]h"]h$]h&]uh1jxhjvubeh}(h]h ]h"]h$]h&]uh1jchhhMhjuhhubeh}(h]h ]h"]h$]h&]uh1j^hjuhhhhhMubh)}(hXOWith this capability the KVM support for memory backing with 1m pages through hugetlbfs can be enabled for a VM. After the capability is enabled, cmma can't be enabled anymore and pfmfi and the storage key interpretation are disabled. If cmma has already been enabled or the hpage module parameter is not set to 1, -EINVAL is returned.h]hXQWith this capability the KVM support for memory backing with 1m pages through hugetlbfs can be enabled for a VM. After the capability is enabled, cmma can’t be enabled anymore and pfmfi and the storage key interpretation are disabled. If cmma has already been enabled or the hpage module parameter is not set to 1, -EINVAL is returned.}(hjNvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuhhubh)}(hwWhile it is generally possible to create a huge page backed VM without this capability, the VM will not be able to run.h]hwWhile it is generally possible to create a huge page backed VM without this capability, the VM will not be able to run.}(hj\vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuhhubeh}(h]kvm-cap-s390-hpage-1mah ]h"]7.14 kvm_cap_s390_hpage_1mah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.15 KVM_CAP_MSR_PLATFORM_INFOh]h7.15 KVM_CAP_MSR_PLATFORM_INFO}(hjuvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrvhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvhhhKubjy)}(hx86h]h)}(hjvh]hx86}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjvubah}(h]h ]h"]h$]h&]uh1jxhjvubeh}(h]h ]h"]h$]h&]uh1jchhhMhjvhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvhhhKubjy)}(h1args[0] whether feature should be enabled or not h]h)}(h0args[0] whether feature should be enabled or noth]h0args[0] whether feature should be enabled or not}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjvubah}(h]h ]h"]h$]h&]uh1jxhjvubeh}(h]h ]h"]h$]h&]uh1jchhhMhjvhhubeh}(h]h ]h"]h$]h&]uh1j^hjrvhhhhhMubh)}(hWith this capability, a guest may read the MSR_PLATFORM_INFO MSR. Otherwise, a #GP would be raised when the guest tries to access. Currently, this capability does not enable write permissions of this MSR for the guest.h]hWith this capability, a guest may read the MSR_PLATFORM_INFO MSR. Otherwise, a #GP would be raised when the guest tries to access. Currently, this capability does not enable write permissions of this MSR for the guest.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrvhhubeh}(h]kvm-cap-msr-platform-infoah ]h"]7.15 kvm_cap_msr_platform_infoah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.16 KVM_CAP_PPC_NESTED_HVh]h7.16 KVM_CAP_PPC_NESTED_HV}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwhhhKubjy)}(hppch]h)}(hj&wh]hppc}(hj(whhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$wubah}(h]h ]h"]h$]h&]uh1jxhjwubeh}(h]h ]h"]h$]h&]uh1jchhhMhjwhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjDwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAwhhhKubjy)}(hnoneh]h)}(hjTwh]hnone}(hjVwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjRwubah}(h]h ]h"]h$]h&]uh1jxhjAwubeh}(h]h ]h"]h$]h&]uh1jchhhMhjwhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjrwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjowhhhKubjy)}(hX0 on success, -EINVAL when the implementation doesn't support nested-HV virtualization. h]h)}(hW0 on success, -EINVAL when the implementation doesn't support nested-HV virtualization.h]hY0 on success, -EINVAL when the implementation doesn’t support nested-HV virtualization.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwubah}(h]h ]h"]h$]h&]uh1jxhjowubeh}(h]h ]h"]h$]h&]uh1jchhhMhjwhhubeh}(h]h ]h"]h$]h&]uh1j^hjvhhhhhMubh)}(hXeHV-KVM on POWER9 and later systems allows for "nested-HV" virtualization, which provides a way for a guest VM to run guests that can run using the CPU's supervisor mode (privileged non-hypervisor state). Enabling this capability on a VM depends on the CPU having the necessary functionality and on the facility being enabled with a kvm-hv module parameter.h]hXkHV-KVM on POWER9 and later systems allows for “nested-HV” virtualization, which provides a way for a guest VM to run guests that can run using the CPU’s supervisor mode (privileged non-hypervisor state). Enabling this capability on a VM depends on the CPU having the necessary functionality and on the facility being enabled with a kvm-hv module parameter.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjvhhubeh}(h]kvm-cap-ppc-nested-hvah ]h"]7.16 kvm_cap_ppc_nested_hvah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.17 KVM_CAP_EXCEPTION_PAYLOADh]h7.17 KVM_CAP_EXCEPTION_PAYLOAD}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwhhhKubjy)}(hx86h]h)}(hjwh]hx86}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwubah}(h]h ]h"]h$]h&]uh1jxhjwubeh}(h]h ]h"]h$]h&]uh1jchhhMhjwhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwhhhKubjy)}(h1args[0] whether feature should be enabled or not h]h)}(h0args[0] whether feature should be enabled or noth]h0args[0] whether feature should be enabled or not}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj xubah}(h]h ]h"]h$]h&]uh1jxhjwubeh}(h]h ]h"]h$]h&]uh1jchhhMhjwhhubeh}(h]h ]h"]h$]h&]uh1j^hjwhhhhhMubh)}(hXWith this capability enabled, CR2 will not be modified prior to the emulated VM-exit when L1 intercepts a #PF exception that occurs in L2. Similarly, for kvm-intel only, DR6 will not be modified prior to the emulated VM-exit when L1 intercepts a #DB exception that occurs in L2. As a result, when KVM_GET_VCPU_EVENTS reports a pending #PF (or #DB) exception for L2, exception.has_payload will be set and the faulting address (or the new DR6 bits*) will be reported in the exception_payload field. Similarly, when userspace injects a #PF (or #DB) into L2 using KVM_SET_VCPU_EVENTS, it is expected to set exception.has_payload and to put the faulting address - or the new DR6 bits\ [#]_ - in the exception_payload field.h](hXWith this capability enabled, CR2 will not be modified prior to the emulated VM-exit when L1 intercepts a #PF exception that occurs in L2. Similarly, for kvm-intel only, DR6 will not be modified prior to the emulated VM-exit when L1 intercepts a #DB exception that occurs in L2. As a result, when KVM_GET_VCPU_EVENTS reports a pending #PF (or #DB) exception for L2, exception.has_payload will be set and the faulting address (or the new DR6 bits*) will be reported in the exception_payload field. Similarly, when userspace injects a #PF (or #DB) into L2 using KVM_SET_VCPU_EVENTS, it is expected to set exception.has_payload and to put the faulting address - or the new DR6 bits }(hj1xhhhNhNubjM)}(h[#]_h]h3}(hj9xhhhNhNubah}(h]id22ah ]h"]h$]h&]autoKjKid23j^juh1jLhj1xj_Kubh" - in the exception_payload field.}(hj1xhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjwhhubh)}(hThis capability also enables exception.pending in struct kvm_vcpu_events, which allows userspace to distinguish between pending and injected exceptions.h]hThis capability also enables exception.pending in struct kvm_vcpu_events, which allows userspace to distinguish between pending and injected exceptions.}(hjTxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwhhubjs)}(hXFor the new DR6 bits, note that bit 16 is set iff the #DB exception will clear DR6.RTM. h](jy)}(hhh]h3}(hjfxhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjbxhhhNhNubh)}(hWFor the new DR6 bits, note that bit 16 is set iff the #DB exception will clear DR6.RTM.h]hWFor the new DR6 bits, note that bit 16 is set iff the #DB exception will clear DR6.RTM.}(hjsxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbxubeh}(h]jIxah ]h"]3ah$]h&]jCxajHxKj^juh1jrhhhMhjwhhubeh}(h]kvm-cap-exception-payloadah ]h"]7.17 kvm_cap_exception_payloadah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h&7.18 KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2h]h&7.18 KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjxhhhKubjy)}(hx86, arm64, mipsh]h)}(hjxh]hx86, arm64, mips}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxubah}(h]h ]h"]h$]h&]uh1jxhjxubeh}(h]h ]h"]h$]h&]uh1jchhhMhjxhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjxhhhKubjy)}(h1args[0] whether feature should be enabled or not h]h)}(h0args[0] whether feature should be enabled or noth]h0args[0] whether feature should be enabled or not}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxubah}(h]h ]h"]h$]h&]uh1jxhjxubeh}(h]h ]h"]h$]h&]uh1jchhhMhjxhhubeh}(h]h ]h"]h$]h&]uh1j^hjxhhhhhMubh)}(hValid flags are::h]hValid flags are:}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxhhubj$)}(hm#define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0) #define KVM_DIRTY_LOG_INITIALLY_SET (1 << 1)h]hm#define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0) #define KVM_DIRTY_LOG_INITIALLY_SET (1 << 1)}hjysbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjxhhubh)}(hWith KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE is set, KVM_GET_DIRTY_LOG will not automatically clear and write-protect all pages that are returned as dirty. Rather, userspace will have to do this operation separately using KVM_CLEAR_DIRTY_LOG.h]hWith KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE is set, KVM_GET_DIRTY_LOG will not automatically clear and write-protect all pages that are returned as dirty. Rather, userspace will have to do this operation separately using KVM_CLEAR_DIRTY_LOG.}(hj#yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxhhubh)}(hX(At the cost of a slightly more complicated operation, this provides better scalability and responsiveness for two reasons. First, KVM_CLEAR_DIRTY_LOG ioctl can operate on a 64-page granularity rather than requiring to sync a full memslot; this ensures that KVM does not take spinlocks for an extended period of time. Second, in some cases a large amount of time can pass between a call to KVM_GET_DIRTY_LOG and userspace actually using the data in the page. Pages can be modified during this time, which is inefficient for both the guest and userspace: the guest will incur a higher penalty due to write protection faults, while userspace can see false reports of dirty pages. Manual reprotection helps reducing this time, improving guest performance and reducing the number of dirty log false positives.h]hX(At the cost of a slightly more complicated operation, this provides better scalability and responsiveness for two reasons. First, KVM_CLEAR_DIRTY_LOG ioctl can operate on a 64-page granularity rather than requiring to sync a full memslot; this ensures that KVM does not take spinlocks for an extended period of time. Second, in some cases a large amount of time can pass between a call to KVM_GET_DIRTY_LOG and userspace actually using the data in the page. Pages can be modified during this time, which is inefficient for both the guest and userspace: the guest will incur a higher penalty due to write protection faults, while userspace can see false reports of dirty pages. Manual reprotection helps reducing this time, improving guest performance and reducing the number of dirty log false positives.}(hj1yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjxhhubh)}(hXxWith KVM_DIRTY_LOG_INITIALLY_SET set, all the bits of the dirty bitmap will be initialized to 1 when created. This also improves performance because dirty logging can be enabled gradually in small chunks on the first call to KVM_CLEAR_DIRTY_LOG. KVM_DIRTY_LOG_INITIALLY_SET depends on KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (it is also only available on x86 and arm64 for now).h]hXxWith KVM_DIRTY_LOG_INITIALLY_SET set, all the bits of the dirty bitmap will be initialized to 1 when created. This also improves performance because dirty logging can be enabled gradually in small chunks on the first call to KVM_CLEAR_DIRTY_LOG. KVM_DIRTY_LOG_INITIALLY_SET depends on KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (it is also only available on x86 and arm64 for now).}(hj?yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxhhubh)}(hX\KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 was previously available under the name KVM_CAP_MANUAL_DIRTY_LOG_PROTECT, but the implementation had bugs that make it hard or impossible to use it correctly. The availability of KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 signals that those bugs are fixed. Userspace should not try to use KVM_CAP_MANUAL_DIRTY_LOG_PROTECT.h]hX\KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 was previously available under the name KVM_CAP_MANUAL_DIRTY_LOG_PROTECT, but the implementation had bugs that make it hard or impossible to use it correctly. The availability of KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 signals that those bugs are fixed. Userspace should not try to use KVM_CAP_MANUAL_DIRTY_LOG_PROTECT.}(hjMyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjxhhubeh}(h]!kvm-cap-manual-dirty-log-protect2ah ]h"]&7.18 kvm_cap_manual_dirty_log_protect2ah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.19 KVM_CAP_PPC_SECURE_GUESTh]h7.19 KVM_CAP_PPC_SECURE_GUEST}(hjfyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcy/hhhhhM(ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjzyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwyhhhKubjy)}(hppc h]h)}(hppch]hppc}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjyubah}(h]h ]h"]h$]h&]uh1jxhjwyubeh}(h]h ]h"]h$]h&]uh1jchhhM*hjtyhhubah}(h]h ]h"]h$]h&]uh1j^hjcyhhhhhM*ubh)}(hXThis capability indicates that KVM is running on a host that has ultravisor firmware and thus can support a secure guest. On such a system, a guest can ask the ultravisor to make it a secure guest, one whose memory is inaccessible to the host except for pages which are explicitly requested to be shared with the host. The ultravisor notifies KVM when a guest requests to become a secure guest, and KVM has the opportunity to veto the transition.h]hXThis capability indicates that KVM is running on a host that has ultravisor firmware and thus can support a secure guest. On such a system, a guest can ask the ultravisor to make it a secure guest, one whose memory is inaccessible to the host except for pages which are explicitly requested to be shared with the host. The ultravisor notifies KVM when a guest requests to become a secure guest, and KVM has the opportunity to veto the transition.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjcyhhubh)}(hIf present, this capability can be enabled for a VM, meaning that KVM will allow the transition to secure guest mode. Otherwise KVM will veto the transition.h]hIf present, this capability can be enabled for a VM, meaning that KVM will allow the transition to secure guest mode. Otherwise KVM will veto the transition.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hjcyhhubeh}(h]kvm-cap-ppc-secure-guestah ]h"]7.19 kvm_cap_ppc_secure_guestah$]h&]uh1hhjZkhhhhhM(ubh)}(hhh](h)}(h7.20 KVM_CAP_HALT_POLLh]h7.20 KVM_CAP_HALT_POLL}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhhhhhM9ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjyhhhKubjy)}(hallh]h)}(hjyh]hall}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjyubah}(h]h ]h"]h$]h&]uh1jxhjyubeh}(h]h ]h"]h$]h&]uh1jchhhM;hjyhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjzhhhKubjy)}(hVMh]h)}(hj%zh]hVM}(hj'zhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj#zubah}(h]h ]h"]h$]h&]uh1jxhjzubeh}(h]h ]h"]h$]h&]uh1jchhhM<hjyhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjCzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj@zhhhKubjy)}(h/args[0] is the maximum poll time in nanosecondsh]h)}(hjSzh]h/args[0] is the maximum poll time in nanoseconds}(hjUzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjQzubah}(h]h ]h"]h$]h&]uh1jxhj@zubeh}(h]h ]h"]h$]h&]uh1jchhhM=hjyhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjqzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjnzhhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjzubah}(h]h ]h"]h$]h&]uh1jxhjnzubeh}(h]h ]h"]h$]h&]uh1jchhhM>hjyhhubeh}(h]h ]h"]h$]h&]uh1j^hjyhhhhhM;ubh)}(hKVM_CAP_HALT_POLL overrides the kvm.halt_poll_ns module parameter to set the maximum halt-polling time for all vCPUs in the target VM. This capability can be invoked at any time and any number of times to dynamically change the maximum halt-polling time.h]hKVM_CAP_HALT_POLL overrides the kvm.halt_poll_ns module parameter to set the maximum halt-polling time for all vCPUs in the target VM. This capability can be invoked at any time and any number of times to dynamically change the maximum halt-polling time.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hjyhhubh)}(hQSee Documentation/virt/kvm/halt-polling.rst for more information on halt polling.h]hQSee Documentation/virt/kvm/halt-polling.rst for more information on halt polling.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjyhhubeh}(h]kvm-cap-halt-pollah ]h"]7.20 kvm_cap_halt_pollah$]h&]uh1hhjZkhhhhhM9ubh)}(hhh](h)}(h7.21 KVM_CAP_X86_USER_SPACE_MSRh]h7.21 KVM_CAP_X86_USER_SPACE_MSR}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhhhhhMIubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjzhhhKubjy)}(hx86h]h)}(hjzh]hx86}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjzubah}(h]h ]h"]h$]h&]uh1jxhjzubeh}(h]h ]h"]h$]h&]uh1jchhhMKhjzhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hj {hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj {hhhKubjy)}(hVMh]h)}(hj{h]hVM}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj{ubah}(h]h ]h"]h$]h&]uh1jxhj {ubeh}(h]h ]h"]h$]h&]uh1jchhhMLhjzhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj:{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj7{hhhKubjy)}(hCargs[0] contains the mask of KVM_MSR_EXIT_REASON_* events to reporth]h)}(hjJ{h]hCargs[0] contains the mask of KVM_MSR_EXIT_REASON_* events to report}(hjL{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjH{ubah}(h]h ]h"]h$]h&]uh1jxhj7{ubeh}(h]h ]h"]h$]h&]uh1jchhhMMhjzhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjh{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhje{hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hjz{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjv{ubah}(h]h ]h"]h$]h&]uh1jxhje{ubeh}(h]h ]h"]h$]h&]uh1jchhhMNhjzhhubeh}(h]h ]h"]h$]h&]uh1j^hjzhhhhhMKubh)}(hThis capability allows userspace to intercept RDMSR and WRMSR instructions if access to an MSR is denied. By default, KVM injects #GP on denied accesses.h]hThis capability allows userspace to intercept RDMSR and WRMSR instructions if access to an MSR is denied. By default, KVM injects #GP on denied accesses.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjzhhubh)}(hWhen a guest requests to read or write an MSR, KVM may not implement all MSRs that are relevant to a respective system. It also does not differentiate by CPU type.h]hWhen a guest requests to read or write an MSR, KVM may not implement all MSRs that are relevant to a respective system. It also does not differentiate by CPU type.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjzhhubh)}(hXTo allow more fine grained control over MSR handling, userspace may enable this capability. With it enabled, MSR accesses that match the mask specified in args[0] and would trigger a #GP inside the guest will instead trigger KVM_EXIT_X86_RDMSR and KVM_EXIT_X86_WRMSR exit notifications. Userspace can then implement model specific MSR handling and/or user notifications to inform a user that an MSR was not emulated/virtualized by KVM.h]hXTo allow more fine grained control over MSR handling, userspace may enable this capability. With it enabled, MSR accesses that match the mask specified in args[0] and would trigger a #GP inside the guest will instead trigger KVM_EXIT_X86_RDMSR and KVM_EXIT_X86_WRMSR exit notifications. Userspace can then implement model specific MSR handling and/or user notifications to inform a user that an MSR was not emulated/virtualized by KVM.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjzhhubh)}(hThe valid mask flags are:h]hThe valid mask flags are:}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjzhhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj{ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jOhj{ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_UNKNOWNh]hKVM_MSR_EXIT_REASON_UNKNOWN}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahj{ubah}(h]h ]h"]h$]h&]uh1johj{ubjp)}(hhh]h)}(h+intercept accesses to unknown (to KVM) MSRsh]h+intercept accesses to unknown (to KVM) MSRs}(hj |hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahj |ubah}(h]h ]h"]h$]h&]uh1johj{ubeh}(h]h ]h"]h$]h&]uh1jjhj{ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_INVALh]hKVM_MSR_EXIT_REASON_INVAL}(hj,|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj)|ubah}(h]h ]h"]h$]h&]uh1johj&|ubjp)}(hhh]h)}(h[intercept accesses that are architecturally invalid according to the vCPU model and/or modeh]h[intercept accesses that are architecturally invalid according to the vCPU model and/or mode}(hjC|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj@|ubah}(h]h ]h"]h$]h&]uh1johj&|ubeh}(h]h ]h"]h$]h&]uh1jjhj{ubjk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_FILTERh]hKVM_MSR_EXIT_REASON_FILTER}(hjc|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj`|ubah}(h]h ]h"]h$]h&]uh1johj]|ubjp)}(hhh]h)}(hJintercept accesses that are denied by userspace via KVM_X86_SET_MSR_FILTERh]hJintercept accesses that are denied by userspace via KVM_X86_SET_MSR_FILTER}(hjz|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjw|ubah}(h]h ]h"]h$]h&]uh1johj]|ubeh}(h]h ]h"]h$]h&]uh1jjhj{ubeh}(h]h ]h"]h$]h&]uh1jehj{ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj{ubah}(h]h ]h"]h$]h&]uh1jEhjzhhhhhNubeh}(h]kvm-cap-x86-user-space-msrah ]h"]7.21 kvm_cap_x86_user_space_msrah$]h&]uh1hhjZkhhhhhMIubh)}(hhh](h)}(h7.22 KVM_CAP_X86_BUS_LOCK_EXITh]h7.22 KVM_CAP_X86_BUS_LOCK_EXIT}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hhhhhMiubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|hhhKubjy)}(hx86h]h)}(hj|h]hx86}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj|ubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhMkhj|hhubjd)}(hhh](ji)}(hTargeth]hTarget}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|hhhKubjy)}(hVMh]h)}(hj}h]hVM}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhj}ubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhMlhj|hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj"}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}hhhKubjy)}(h@args[0] defines the policy used when bus locks detected in guesth]h)}(hj2}h]h@args[0] defines the policy used when bus locks detected in guest}(hj4}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhj0}ubah}(h]h ]h"]h$]h&]uh1jxhj}ubeh}(h]h ]h"]h$]h&]uh1jchhhMmhj|hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjP}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjM}hhhKubjy)}(h90 on success, -EINVAL when args[0] contains invalid bits h]h)}(h80 on success, -EINVAL when args[0] contains invalid bitsh]h80 on success, -EINVAL when args[0] contains invalid bits}(hjb}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj^}ubah}(h]h ]h"]h$]h&]uh1jxhjM}ubeh}(h]h ]h"]h$]h&]uh1jchhhMnhj|hhubeh}(h]h ]h"]h$]h&]uh1j^hj|hhhhhMkubh)}(hValid bits in args[0] are::h]hValid bits in args[0] are:}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj|hhubj$)}(ha#define KVM_BUS_LOCK_DETECTION_OFF (1 << 0) #define KVM_BUS_LOCK_DETECTION_EXIT (1 << 1)h]ha#define KVM_BUS_LOCK_DETECTION_OFF (1 << 0) #define KVM_BUS_LOCK_DETECTION_EXIT (1 << 1)}hj}sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMrhj|hhubh)}(hX"Enabling this capability on a VM provides userspace with a way to select a policy to handle the bus locks detected in guest. Userspace can obtain the supported modes from the result of KVM_CHECK_EXTENSION and define it through the KVM_ENABLE_CAP. The supported modes are mutually-exclusive.h]hX"Enabling this capability on a VM provides userspace with a way to select a policy to handle the bus locks detected in guest. Userspace can obtain the supported modes from the result of KVM_CHECK_EXTENSION and define it through the KVM_ENABLE_CAP. The supported modes are mutually-exclusive.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj|hhubh)}(hXgThis capability allows userspace to force VM exits on bus locks detected in the guest, irrespective whether or not the host has enabled split-lock detection (which triggers an #AC exception that KVM intercepts). This capability is intended to mitigate attacks where a malicious/buggy guest can exploit bus locks to degrade the performance of the whole system.h]hXgThis capability allows userspace to force VM exits on bus locks detected in the guest, irrespective whether or not the host has enabled split-lock detection (which triggers an #AC exception that KVM intercepts). This capability is intended to mitigate attacks where a malicious/buggy guest can exploit bus locks to degrade the performance of the whole system.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhj|hhubh)}(hIf KVM_BUS_LOCK_DETECTION_OFF is set, KVM doesn't force guest bus locks to VM exit, although the host kernel's split-lock #AC detection still applies, if enabled.h]hIf KVM_BUS_LOCK_DETECTION_OFF is set, KVM doesn’t force guest bus locks to VM exit, although the host kernel’s split-lock #AC detection still applies, if enabled.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj|hhubh)}(hXIf KVM_BUS_LOCK_DETECTION_EXIT is set, KVM enables a CPU feature that ensures bus locks in the guest trigger a VM exit, and KVM exits to userspace for all such VM exits, e.g. to allow userspace to throttle the offending guest and/or apply some other policy-based mitigation. When exiting to userspace, KVM sets KVM_RUN_X86_BUS_LOCK in vcpu-run->flags, and conditionally sets the exit_reason to KVM_EXIT_X86_BUS_LOCK.h]hXIf KVM_BUS_LOCK_DETECTION_EXIT is set, KVM enables a CPU feature that ensures bus locks in the guest trigger a VM exit, and KVM exits to userspace for all such VM exits, e.g. to allow userspace to throttle the offending guest and/or apply some other policy-based mitigation. When exiting to userspace, KVM sets KVM_RUN_X86_BUS_LOCK in vcpu-run->flags, and conditionally sets the exit_reason to KVM_EXIT_X86_BUS_LOCK.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj|hhubh)}(hX&Due to differences in the underlying hardware implementation, the vCPU's RIP at the time of exit diverges between Intel and AMD. On Intel hosts, RIP points at the next instruction, i.e. the exit is trap-like. On AMD hosts, RIP points at the offending instruction, i.e. the exit is fault-like.h]hX(Due to differences in the underlying hardware implementation, the vCPU’s RIP at the time of exit diverges between Intel and AMD. On Intel hosts, RIP points at the next instruction, i.e. the exit is trap-like. On AMD hosts, RIP points at the offending instruction, i.e. the exit is fault-like.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj|hhubh)}(hNote! Detected bus locks may be coincident with other exits to userspace, i.e. KVM_RUN_X86_BUS_LOCK should be checked regardless of the primary exit reason if userspace wants to take action on all detected bus locks.h]hNote! Detected bus locks may be coincident with other exits to userspace, i.e. KVM_RUN_X86_BUS_LOCK should be checked regardless of the primary exit reason if userspace wants to take action on all detected bus locks.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj|hhubeh}(h]kvm-cap-x86-bus-lock-exitah ]h"]7.22 kvm_cap_x86_bus_lock_exitah$]h&]uh1hhjZkhhhhhMiubh)}(hhh](h)}(h7.23 KVM_CAP_PPC_DAWR1h]h7.23 KVM_CAP_PPC_DAWR1}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj~hhhKubjy)}(hppch]h)}(hj!~h]hppc}(hj#~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1jxhj~ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj ~hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj?~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<~hhhKubjy)}(hnoneh]h)}(hjO~h]hnone}(hjQ~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjM~ubah}(h]h ]h"]h$]h&]uh1jxhj<~ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj ~hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjm~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjj~hhhKubjy)}(h80 on success, -EINVAL when CPU doesn't support 2nd DAWR h]h)}(h70 on success, -EINVAL when CPU doesn't support 2nd DAWRh]h90 on success, -EINVAL when CPU doesn’t support 2nd DAWR}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{~ubah}(h]h ]h"]h$]h&]uh1jxhjj~ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj ~hhubeh}(h]h ]h"]h$]h&]uh1j^hj}hhhhhMubh)}(h]This capability can be used to check / enable 2nd DAWR feature provided by POWER10 processor.h]h]This capability can be used to check / enable 2nd DAWR feature provided by POWER10 processor.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}hhubeh}(h]kvm-cap-ppc-dawr1ah ]h"]7.23 kvm_cap_ppc_dawr1ah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h%7.24 KVM_CAP_VM_COPY_ENC_CONTEXT_FROMh]h%7.24 KVM_CAP_VM_COPY_ENC_CONTEXT_FROM}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj~hhhKubjy)}(hx86 SEV enabledh]h)}(hj~h]hx86 SEV enabled}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1jxhj~ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj~hhubjd)}(hhh](ji)}(hTypeh]hType}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj~hhhKubjy)}(hvmh]h)}(hj h]hvm}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhj~ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj~hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj%hhhKubjy)}(h"args[0] is the fd of the source vmh]h)}(hj8h]h"args[0] is the fd of the source vm}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jxhj%ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj~hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjShhhKubjy)}(h0 on success; ENOTTY on error h]h)}(h0 on success; ENOTTY on errorh]h0 on success; ENOTTY on error}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjdubah}(h]h ]h"]h$]h&]uh1jxhjSubeh}(h]h ]h"]h$]h&]uh1jchhhMhj~hhubeh}(h]h ]h"]h$]h&]uh1j^hj~hhhhhMubh)}(hyThis capability enables userspace to copy encryption context from the vm indicated by the fd to the vm this is called on.h]hyThis capability enables userspace to copy encryption context from the vm indicated by the fd to the vm this is called on.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~hhubh)}(hThis is intended to support in-guest workloads scheduled by the host. This allows the in-guest workload to maintain its own NPTs and keeps the two vms from accidentally clobbering each other with interrupts and the like (separate APIC/MSRs/etc).h]hThis is intended to support in-guest workloads scheduled by the host. This allows the in-guest workload to maintain its own NPTs and keeps the two vms from accidentally clobbering each other with interrupts and the like (separate APIC/MSRs/etc).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~hhubeh}(h] kvm-cap-vm-copy-enc-context-fromah ]h"]%7.24 kvm_cap_vm_copy_enc_context_fromah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.25 KVM_CAP_SGX_ATTRIBUTEh]h7.25 KVM_CAP_SGX_ATTRIBUTE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hVMh]h)}(hjh]hVM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h>args[0] is a file handle of a SGX attribute file in securityfsh]h)}(hj/h]h>args[0] is a file handle of a SGX attribute file in securityfs}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjJhhhKubjy)}(hi0 on success, -EINVAL if the file handle is invalid or if a requested attribute is not supported by KVM. h]h)}(hh0 on success, -EINVAL if the file handle is invalid or if a requested attribute is not supported by KVM.h]hh0 on success, -EINVAL if the file handle is invalid or if a requested attribute is not supported by KVM.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ubah}(h]h ]h"]h$]h&]uh1jxhjJubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hXKVM_CAP_SGX_ATTRIBUTE enables a userspace VMM to grant a VM access to one or more privileged enclave attributes. args[0] must hold a file handle to a valid SGX attribute file corresponding to an attribute that is supported/restricted by KVM (currently only PROVISIONKEY).h]hXKVM_CAP_SGX_ATTRIBUTE enables a userspace VMM to grant a VM access to one or more privileged enclave attributes. args[0] must hold a file handle to a valid SGX attribute file corresponding to an attribute that is supported/restricted by KVM (currently only PROVISIONKEY).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXThe SGX subsystem restricts access to a subset of enclave attributes to provide additional security for an uncompromised kernel, e.g. use of the PROVISIONKEY is restricted to deter malware from using the PROVISIONKEY to obtain a stable system fingerprint. To prevent userspace from circumventing such restrictions by running an enclave in a VM, KVM prevents access to privileged attributes by default.h]hXThe SGX subsystem restricts access to a subset of enclave attributes to provide additional security for an uncompromised kernel, e.g. use of the PROVISIONKEY is restricted to deter malware from using the PROVISIONKEY to obtain a stable system fingerprint. To prevent userspace from circumventing such restrictions by running an enclave in a VM, KVM prevents access to privileged attributes by default.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h4See Documentation/arch/x86/sgx.rst for more details.h]h4See Documentation/arch/x86/sgx.rst for more details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-cap-sgx-attributeah ]h"]7.25 kvm_cap_sgx_attributeah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h&7.27 KVM_CAP_EXIT_ON_EMULATION_FAILUREh]h&7.27 KVM_CAP_EXIT_ON_EMULATION_FAILURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjȀhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjŀhhhKubjy)}(hx86h]h)}(hj؀h]hx86}(hjڀhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjրubah}(h]h ]h"]h$]h&]uh1jxhjŀubeh}(h]h ]h"]h$]h&]uh1jchhhMhj€hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h5args[0] whether the feature should be enabled or not h]h)}(h4args[0] whether the feature should be enabled or noth]h4args[0] whether the feature should be enabled or not}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj€hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hX When this capability is enabled, an emulation failure will result in an exit to userspace with KVM_INTERNAL_ERROR (except when the emulator was invoked to handle a VMware backdoor instruction). Furthermore, KVM will now provide up to 15 instruction bytes for any exit to userspace resulting from an emulation failure. When these exits to userspace occur use the emulation_failure struct instead of the internal struct. They both have the same layout, but the emulation_failure struct matches the content better. It also explicitly defines the 'flags' field which is used to describe the fields in the struct that are valid (ie: if KVM_INTERNAL_ERROR_EMULATION_FLAG_INSTRUCTION_BYTES is set in the 'flags' field then both 'insn_size' and 'insn_bytes' have valid data in them.)h]hXWhen this capability is enabled, an emulation failure will result in an exit to userspace with KVM_INTERNAL_ERROR (except when the emulator was invoked to handle a VMware backdoor instruction). Furthermore, KVM will now provide up to 15 instruction bytes for any exit to userspace resulting from an emulation failure. When these exits to userspace occur use the emulation_failure struct instead of the internal struct. They both have the same layout, but the emulation_failure struct matches the content better. It also explicitly defines the ‘flags’ field which is used to describe the fields in the struct that are valid (ie: if KVM_INTERNAL_ERROR_EMULATION_FLAG_INSTRUCTION_BYTES is set in the ‘flags’ field then both ‘insn_size’ and ‘insn_bytes’ have valid data in them.)}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]!kvm-cap-exit-on-emulation-failureah ]h"]&7.27 kvm_cap_exit_on_emulation_failureah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.28 KVM_CAP_ARM_MTEh]h7.28 KVM_CAP_ARM_MTE}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRhhhKubjy)}(harm64h]h)}(hjeh]harm64}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubah}(h]h ]h"]h$]h&]uh1jxhjRubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hnone h]h)}(hnoneh]hnone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOhhubeh}(h]h ]h"]h$]h&]uh1j^hj>hhhhhMubh)}(hXfThis capability indicates that KVM (and the hardware) supports exposing the Memory Tagging Extensions (MTE) to the guest. It must also be enabled by the VMM before creating any VCPUs to allow the guest access. Note that MTE is only available to a guest running in AArch64 mode and enabling this capability will cause attempts to create AArch32 VCPUs to fail.h]hXfThis capability indicates that KVM (and the hardware) supports exposing the Memory Tagging Extensions (MTE) to the guest. It must also be enabled by the VMM before creating any VCPUs to allow the guest access. Note that MTE is only available to a guest running in AArch64 mode and enabling this capability will cause attempts to create AArch32 VCPUs to fail.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>hhubh)}(hXWhen enabled the guest is able to access tags associated with any memory given to the guest. KVM will ensure that the tags are maintained during swap or hibernation of the host; however the VMM needs to manually save/restore the tags as appropriate if the VM is migrated.h]hXWhen enabled the guest is able to access tags associated with any memory given to the guest. KVM will ensure that the tags are maintained during swap or hibernation of the host; however the VMM needs to manually save/restore the tags as appropriate if the VM is migrated.}(hjÁhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>hhubh)}(hWhen this capability is enabled all memory in memslots must be mapped as ``MAP_ANONYMOUS`` or with a RAM-based file mapping (``tmpfs``, ``memfd``), attempts to create a memslot with an invalid mmap will result in an -EINVAL return.h](hIWhen this capability is enabled all memory in memslots must be mapped as }(hjсhhhNhNubj)}(h``MAP_ANONYMOUS``h]h MAP_ANONYMOUS}(hjفhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjсubh# or with a RAM-based file mapping (}(hjсhhhNhNubj)}(h ``tmpfs``h]htmpfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjсubh, }(hjсhhhNhNubj)}(h ``memfd``h]hmemfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjсubhV), attempts to create a memslot with an invalid mmap will result in an -EINVAL return.}(hjсhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj>hhubh)}(hzWhen enabled the VMM may make use of the ``KVM_ARM_MTE_COPY_TAGS`` ioctl to perform a bulk copy of tags to/from the guest.h](h)When enabled the VMM may make use of the }(hjhhhNhNubj)}(h``KVM_ARM_MTE_COPY_TAGS``h]hKVM_ARM_MTE_COPY_TAGS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh8 ioctl to perform a bulk copy of tags to/from the guest.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj>hhubeh}(h]kvm-cap-arm-mteah ]h"]7.28 kvm_cap_arm_mteah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h%7.29 KVM_CAP_VM_MOVE_ENC_CONTEXT_FROMh]h%7.29 KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQhhhKubjy)}(hx86 SEV enabledh]h)}(hjdh]hx86 SEV enabled}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1jxhjQubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvmh]h)}(hjh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h"args[0] is the fd of the source vmh]h)}(hjh]h"args[0] is the fd of the source vm}(hj‚hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjނhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjۂhhhKubjy)}(h 0 on success h]h)}(h 0 on successh]h 0 on success}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjۂubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubeh}(h]h ]h"]h$]h&]uh1j^hj=hhhhhMubh)}(hThis capability enables userspace to migrate the encryption context from the VM indicated by the fd to the VM this is called on.h]hThis capability enables userspace to migrate the encryption context from the VM indicated by the fd to the VM this is called on.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=hhubh)}(hThis is intended to support intra-host migration of VMs between userspace VMMs, upgrading the VMM process without interrupting the guest.h]hThis is intended to support intra-host migration of VMs between userspace VMMs, upgrading the VMM process without interrupting the guest.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=hhubeh}(h] kvm-cap-vm-move-enc-context-fromah ]h"]%7.29 kvm_cap_vm_move_enc_context_fromah$]h&]uh1hhjZkhhhhhMubh)}(hhh](h)}(h7.31 KVM_CAP_DISABLE_QUIRKS2h]h7.31 KVM_CAP_DISABLE_QUIRKS2}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Parametersh]h Parameters}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjHhhhKubjy)}(h&args[0] - set of KVM quirks to disableh]h)}(hj[h]h&args[0] - set of KVM quirks to disable}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjYubah}(h]h ]h"]h$]h&]uh1jxhjHubeh}(h]h ]h"]h$]h&]uh1jchhhM hjEhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjvubeh}(h]h ]h"]h$]h&]uh1jchhhM hjEhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjEhhubeh}(h]h ]h"]h$]h&]uh1j^hj4hhhhhM ubh)}(hLThis capability, if enabled, will cause KVM to disable some behavior quirks.h]hLThis capability, if enabled, will cause KVM to disable some behavior quirks.}(hjكhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4hhubh)}(hhCalling KVM_CHECK_EXTENSION for this capability returns a bitmask of quirks that can be disabled in KVM.h]hhCalling KVM_CHECK_EXTENSION for this capability returns a bitmask of quirks that can be disabled in KVM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4hhubh)}(hThe argument to KVM_ENABLE_CAP for this capability is a bitmask of quirks to disable, and must be a subset of the bitmask returned by KVM_CHECK_EXTENSION.h]hThe argument to KVM_ENABLE_CAP for this capability is a bitmask of quirks to disable, and must be a subset of the bitmask returned by KVM_CHECK_EXTENSION.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4hhubh)}(h"The valid bits in cap.args[0] are:h]h"The valid bits in cap.args[0] are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK#uh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK.uh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_LINT0_REENABLEDh]hKVM_X86_QUIRK_LINT0_REENABLED}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj1ubah}(h]h ]h"]h$]h&]uh1johj.ubjp)}(hhh]h)}(hBy default, the reset value for the LVT LINT0 register is 0x700 (APIC_MODE_EXTINT). When this quirk is disabled, the reset value is 0x10000 (APIC_LVT_MASKED).h]hBy default, the reset value for the LVT LINT0 register is 0x700 (APIC_MODE_EXTINT). When this quirk is disabled, the reset value is 0x10000 (APIC_LVT_MASKED).}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjHubah}(h]h ]h"]h$]h&]uh1johj.ubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_CD_NW_CLEAREDh]hKVM_X86_QUIRK_CD_NW_CLEARED}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(hhh](h)}(hBy default, KVM clears CR0.CD and CR0.NW on AMD CPUs to workaround buggy guest firmware that runs in perpetuity with CR0.CD, i.e. with caches in "no fill" mode.h]hBy default, KVM clears CR0.CD and CR0.NW on AMD CPUs to workaround buggy guest firmware that runs in perpetuity with CR0.CD, i.e. with caches in “no fill” mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubh)}(hPWhen this quirk is disabled, KVM does not change the value of CR0.CD and CR0.NW.h]hPWhen this quirk is disabled, KVM does not change the value of CR0.CD and CR0.NW.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubeh}(h]h ]h"]h$]h&]uh1johjeubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_LAPIC_MMIO_HOLEh]hKVM_X86_QUIRK_LAPIC_MMIO_HOLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hBy default, the MMIO LAPIC interface is available even when configured for x2APIC mode. When this quirk is disabled, KVM disables the MMIO LAPIC interface if the LAPIC is in x2APIC mode.h]hBy default, the MMIO LAPIC interface is available even when configured for x2APIC mode. When this quirk is disabled, KVM disables the MMIO LAPIC interface if the LAPIC is in x2APIC mode.}(hjDŽhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjĄubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_OUT_7E_INC_RIPh]hKVM_X86_QUIRK_OUT_7E_INC_RIP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM& hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hBy default, KVM pre-increments %rip before exiting to userspace for an OUT instruction to port 0x7e. When this quirk is disabled, KVM does not pre-increment %rip before exiting to userspace.h]hBy default, KVM pre-increments %rip before exiting to userspace for an OUT instruction to port 0x7e. When this quirk is disabled, KVM does not pre-increment %rip before exiting to userspace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM& hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(h"KVM_X86_QUIRK_MISC_ENABLE_NO_MWAITh]h"KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM, hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hWhen this quirk is disabled, KVM sets CPUID.01H:ECX[bit 3] (MONITOR/MWAIT) if IA32_MISC_ENABLE[bit 18] (MWAIT) is set. Additionally, when this quirk is disabled, KVM clears CPUID.01H:ECX[bit 3] if IA32_MISC_ENABLE[bit 18] is cleared.h]hWhen this quirk is disabled, KVM sets CPUID.01H:ECX[bit 3] (MONITOR/MWAIT) if IA32_MISC_ENABLE[bit 18] (MWAIT) is set. Additionally, when this quirk is disabled, KVM clears CPUID.01H:ECX[bit 3] if IA32_MISC_ENABLE[bit 18] is cleared.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM, hj2ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(h KVM_X86_QUIRK_FIX_HYPERCALL_INSNh]h KVM_X86_QUIRK_FIX_HYPERCALL_INSN}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3 hjRubah}(h]h ]h"]h$]h&]uh1johjOubjp)}(hhh]h)}(hX(By default, KVM rewrites guest VMMCALL/VMCALL instructions to match the vendor's hypercall instruction for the system. When this quirk is disabled, KVM will no longer rewrite invalid guest hypercall instructions. Executing the incorrect hypercall instruction will generate a #UD within the guest.h]hX*By default, KVM rewrites guest VMMCALL/VMCALL instructions to match the vendor’s hypercall instruction for the system. When this quirk is disabled, KVM will no longer rewrite invalid guest hypercall instructions. Executing the incorrect hypercall instruction will generate a #UD within the guest.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3 hjiubah}(h]h ]h"]h$]h&]uh1johjOubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(h#KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTSh]h#KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hXBy default, KVM emulates MONITOR/MWAIT (if they are intercepted) as NOPs regardless of whether or not MONITOR/MWAIT are supported according to guest CPUID. When this quirk is disabled and KVM_X86_DISABLE_EXITS_MWAIT is not set (MONITOR/MWAIT are intercepted), KVM will inject a #UD on MONITOR/MWAIT if they're unsupported per guest CPUID. Note, KVM will modify MONITOR/MWAIT support in guest CPUID on writes to MISC_ENABLE if KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT is disabled.h]hXBy default, KVM emulates MONITOR/MWAIT (if they are intercepted) as NOPs regardless of whether or not MONITOR/MWAIT are supported according to guest CPUID. When this quirk is disabled and KVM_X86_DISABLE_EXITS_MWAIT is not set (MONITOR/MWAIT are intercepted), KVM will inject a #UD on MONITOR/MWAIT if they’re unsupported per guest CPUID. Note, KVM will modify MONITOR/MWAIT support in guest CPUID on writes to MISC_ENABLE if KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT is disabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_SLOT_ZAP_ALLh]hKVM_X86_QUIRK_SLOT_ZAP_ALL}(hjÅhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hXaBy default, for KVM_X86_DEFAULT_VM VMs, KVM invalidates all SPTEs in all memslots and address spaces when a memslot is deleted or moved. When this quirk is disabled (or the VM type isn't KVM_X86_DEFAULT_VM), KVM only ensures the backing memory of the deleted or moved memslot isn't reachable, i.e KVM _may_ invalidate only SPTEs related to the memslot.h]hXeBy default, for KVM_X86_DEFAULT_VM VMs, KVM invalidates all SPTEs in all memslots and address spaces when a memslot is deleted or moved. When this quirk is disabled (or the VM type isn’t KVM_X86_DEFAULT_VM), KVM only ensures the backing memory of the deleted or moved memslot isn’t reachable, i.e KVM _may_ invalidate only SPTEs related to the memslot.}(hjڅhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI hjׅubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(h KVM_X86_QUIRK_STUFF_FEATURE_MSRSh]h KVM_X86_QUIRK_STUFF_FEATURE_MSRS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hX`By default, at vCPU creation, KVM sets the vCPU's MSR_IA32_PERF_CAPABILITIES (0x345), MSR_IA32_ARCH_CAPABILITIES (0x10a), MSR_PLATFORM_INFO (0xce), and all VMX MSRs (0x480..0x492) to the maximal capabilities supported by KVM. KVM also sets MSR_IA32_UCODE_REV (0x8b) to an arbitrary value (which is different for Intel vs. AMD). Lastly, when guest CPUID is set (by userspace), KVM modifies select VMX MSR fields to force consistency between guest CPUID and L2's effective ISA. When this quirk is disabled, KVM zeroes the vCPU's MSR values (with two exceptions, see below), i.e. treats the feature MSRs like CPUID leaves and gives userspace full control of the vCPU model definition. This quirk does not affect VMX MSRs CR0/CR4_FIXED1 (0x487 and 0x489), as KVM does now allow them to be set by userspace (KVM sets them based on guest CPUID, for safety purposes).h]hXfBy default, at vCPU creation, KVM sets the vCPU’s MSR_IA32_PERF_CAPABILITIES (0x345), MSR_IA32_ARCH_CAPABILITIES (0x10a), MSR_PLATFORM_INFO (0xce), and all VMX MSRs (0x480..0x492) to the maximal capabilities supported by KVM. KVM also sets MSR_IA32_UCODE_REV (0x8b) to an arbitrary value (which is different for Intel vs. AMD). Lastly, when guest CPUID is set (by userspace), KVM modifies select VMX MSR fields to force consistency between guest CPUID and L2’s effective ISA. When this quirk is disabled, KVM zeroes the vCPU’s MSR values (with two exceptions, see below), i.e. treats the feature MSRs like CPUID leaves and gives userspace full control of the vCPU model definition. This quirk does not affect VMX MSRs CR0/CR4_FIXED1 (0x487 and 0x489), as KVM does now allow them to be set by userspace (KVM sets them based on guest CPUID, for safety purposes).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj+ubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_IGNORE_GUEST_PATh]hKVM_X86_QUIRK_IGNORE_GUEST_PAT}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hj.ubah}(h]h ]h"]h$]h&]uh1johj+ubjp)}(hhh]h)}(hXqBy default, on Intel platforms, KVM ignores guest PAT and forces the effective memory type to WB in EPT. The quirk is not available on Intel platforms which are incapable of safely honoring guest PAT (i.e., without CPU self-snoop, KVM always ignores guest PAT and forces effective memory type to WB). It is also ignored on AMD platforms or, on Intel, when a VM has non-coherent DMA devices assigned; KVM always honors guest PAT in such case. The quirk is needed to avoid slowdowns on certain Intel Xeon platforms (e.g. ICX, SPR) where self-snoop feature is supported but UC is slow enough to cause issues with some older guests that use UC instead of WC to map the video RAM. Userspace can disable the quirk to honor guest PAT if it knows that there is no such guest software, for example if it does not expose a bochs graphics device (which is known to have had a buggy driver).h]hXqBy default, on Intel platforms, KVM ignores guest PAT and forces the effective memory type to WB in EPT. The quirk is not available on Intel platforms which are incapable of safely honoring guest PAT (i.e., without CPU self-snoop, KVM always ignores guest PAT and forces effective memory type to WB). It is also ignored on AMD platforms or, on Intel, when a VM has non-coherent DMA devices assigned; KVM always honors guest PAT in such case. The quirk is needed to avoid slowdowns on certain Intel Xeon platforms (e.g. ICX, SPR) where self-snoop feature is supported but UC is slow enough to cause issues with some older guests that use UC instead of WC to map the video RAM. Userspace can disable the quirk to honor guest PAT if it knows that there is no such guest software, for example if it does not expose a bochs graphics device (which is known to have had a buggy driver).}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hjEubah}(h]h ]h"]h$]h&]uh1johj+ubeh}(h]h ]h"]h$]h&]uh1jjhj+ubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhj4hhhhhNubeh}(h]kvm-cap-disable-quirks2ah ]h"]7.31 kvm_cap_disable_quirks2ah$]h&]uh1hhjZkhhhhhM ubh)}(hhh](h)}(h7.32 KVM_CAP_MAX_VCPU_IDh]h7.32 KVM_CAP_MAX_VCPU_ID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hj†hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hVMh]h)}(hj҆h]hVM}(hjԆhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjІubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h2args[0] - maximum APIC ID value set for current VMh]h)}(hjh]h2args[0] - maximum APIC ID value set for current VM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hd0 on success, -EINVAL if args[0] is beyond KVM_MAX_VCPU_IDS supported in KVM or if it has been set. h]h)}(hc0 on success, -EINVAL if args[0] is beyond KVM_MAX_VCPU_IDS supported in KVM or if it has been set.h]hc0 on success, -EINVAL if args[0] is beyond KVM_MAX_VCPU_IDS supported in KVM or if it has been set.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj,ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hj}hhhhhM ubh)}(hXThis capability allows userspace to specify maximum possible APIC ID assigned for current VM session prior to the creation of vCPUs, saving memory for data structures indexed by the APIC ID. Userspace is able to calculate the limit to APIC ID values from designated CPU topology.h]hXThis capability allows userspace to specify maximum possible APIC ID assigned for current VM session prior to the creation of vCPUs, saving memory for data structures indexed by the APIC ID. Userspace is able to calculate the limit to APIC ID values from designated CPU topology.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}hhubh)}(hX(The value can be changed only until KVM_ENABLE_CAP is set to a nonzero value or until a vCPU is created. Upon creation of the first vCPU, if the value was set to zero or KVM_ENABLE_CAP was not invoked, KVM uses the return value of KVM_CHECK_EXTENSION(KVM_CAP_MAX_VCPU_ID) as the maximum APIC ID.h]hX(The value can be changed only until KVM_ENABLE_CAP is set to a nonzero value or until a vCPU is created. Upon creation of the first vCPU, if the value was set to zero or KVM_ENABLE_CAP was not invoked, KVM uses the return value of KVM_CHECK_EXTENSION(KVM_CAP_MAX_VCPU_ID) as the maximum APIC ID.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}hhubeh}(h]kvm-cap-max-vcpu-idah ]h"]7.32 kvm_cap_max_vcpu_idah$]h&]uh1hhjZkhhhhhM ubh)}(hhh](h)}(h7.33 KVM_CAP_X86_NOTIFY_VMEXITh]h7.33 KVM_CAP_X86_NOTIFY_VMEXIT}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hVMh]h)}(hjɇh]hVM}(hjˇhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjLJubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h;args[0] is the value of notify window as well as some flagsh]h)}(hjh]h;args[0] is the value of notify window as well as some flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hZ0 on success, -EINVAL if args[0] contains invalid flags or notify VM exit is unsupported. h]h)}(hY0 on success, -EINVAL if args[0] contains invalid flags or notify VM exit is unsupported.h]hY0 on success, -EINVAL if args[0] contains invalid flags or notify VM exit is unsupported.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj#ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjthhhhhM ubh)}(hkBits 63:32 of args[0] are used for notify window. Bits 31:0 of args[0] are for some flags. Valid bits are::h]hjBits 63:32 of args[0] are used for notify window. Bits 31:0 of args[0] are for some flags. Valid bits are:}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjthhubj$)}(hc#define KVM_X86_NOTIFY_VMEXIT_ENABLED (1 << 0) #define KVM_X86_NOTIFY_VMEXIT_USER (1 << 1)h]hc#define KVM_X86_NOTIFY_VMEXIT_ENABLED (1 << 0) #define KVM_X86_NOTIFY_VMEXIT_USER (1 << 1)}hjUsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjthhubh)}(hXThis capability allows userspace to configure the notify VM exit on/off in per-VM scope during VM creation. Notify VM exit is disabled by default. When userspace sets KVM_X86_NOTIFY_VMEXIT_ENABLED bit in args[0], VMM will enable this feature with the notify window provided, which will generate a VM exit if no event window occurs in VM non-root mode for a specified of time (notify window).h]hXThis capability allows userspace to configure the notify VM exit on/off in per-VM scope during VM creation. Notify VM exit is disabled by default. When userspace sets KVM_X86_NOTIFY_VMEXIT_ENABLED bit in args[0], VMM will enable this feature with the notify window provided, which will generate a VM exit if no event window occurs in VM non-root mode for a specified of time (notify window).}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjthhubh)}(hwIf KVM_X86_NOTIFY_VMEXIT_USER is set in args[0], upon notify VM exits happen, KVM would exit to userspace for handling.h]hwIf KVM_X86_NOTIFY_VMEXIT_USER is set in args[0], upon notify VM exits happen, KVM would exit to userspace for handling.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjthhubh)}(hThis capability is aimed to mitigate the threat that malicious VMs can cause CPU stuck (due to event windows don't open up) and make the CPU unavailable to host or other VMs.h]hThis capability is aimed to mitigate the threat that malicious VMs can cause CPU stuck (due to event windows don’t open up) and make the CPU unavailable to host or other VMs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjthhubeh}(h]kvm-cap-x86-notify-vmexitah ]h"]7.33 kvm_cap_x86_notify_vmexitah$]h&]uh1hhjZkhhhhhM ubh)}(hhh](h)}(h#7.35 KVM_CAP_X86_APIC_BUS_CYCLES_NSh]h#7.35 KVM_CAP_X86_APIC_BUS_CYCLES_NS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjڈhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj׈hhhKubjy)}(hVMh]h)}(hjh]hVM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhj׈ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h:args[0] is the desired APIC bus clock rate, in nanosecondsh]h)}(hjh]h:args[0] is the desired APIC bus clock rate, in nanoseconds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3hhhKubjy)}(h0 on success, -EINVAL if args[0] contains an invalid value for the frequency or if any vCPUs have been created, -ENXIO if a virtual local APIC has not been created using KVM_CREATE_IRQCHIP. h]h)}(h0 on success, -EINVAL if args[0] contains an invalid value for the frequency or if any vCPUs have been created, -ENXIO if a virtual local APIC has not been created using KVM_CREATE_IRQCHIP.h]h0 on success, -EINVAL if args[0] contains an invalid value for the frequency or if any vCPUs have been created, -ENXIO if a virtual local APIC has not been created using KVM_CREATE_IRQCHIP.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjDubah}(h]h ]h"]h$]h&]uh1jxhj3ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(hThis capability sets the VM's APIC bus clock frequency, used by KVM's in-kernel virtual APIC when emulating APIC timers. KVM's default value can be retrieved by KVM_CHECK_EXTENSION.h]hThis capability sets the VM’s APIC bus clock frequency, used by KVM’s in-kernel virtual APIC when emulating APIC timers. KVM’s default value can be retrieved by KVM_CHECK_EXTENSION.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hNote: Userspace is responsible for correctly configuring CPUID 0x15, a.k.a. the core crystal clock frequency, if a non-zero CPUID 0x15 is exposed to the guest.h]hNote: Userspace is responsible for correctly configuring CPUID 0x15, a.k.a. the core crystal clock frequency, if a non-zero CPUID 0x15 is exposed to the guest.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h]kvm-cap-x86-apic-bus-cycles-nsah ]h"]#7.35 kvm_cap_x86_apic_bus_cycles_nsah$]h&]uh1hhjZkhhhhhM ubh)}(hhh](h)}(h:7.36 KVM_CAP_DIRTY_LOG_RING/KVM_CAP_DIRTY_LOG_RING_ACQ_RELh]h:7.36 KVM_CAP_DIRTY_LOG_RING/KVM_CAP_DIRTY_LOG_RING_ACQ_REL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h x86, arm64h]h)}(hjh]h x86, arm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjщhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjΉhhhKubjy)}(hvmh]h)}(hjh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj߉ubah}(h]h ]h"]h$]h&]uh1jxhjΉubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h%args[0] - size of the dirty log ring h]h)}(h$args[0] - size of the dirty log ringh]h$args[0] - size of the dirty log ring}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(h}KVM is capable of tracking dirty memory using ring buffers that are mmapped into userspace; there is one dirty ring per vcpu.h]h}KVM is capable of tracking dirty memory using ring buffers that are mmapped into userspace; there is one dirty ring per vcpu.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hsThe dirty ring is available to userspace as an array of ``struct kvm_dirty_gfn``. Each dirty entry is defined as::h](h8The dirty ring is available to userspace as an array of }(hj?hhhNhNubj)}(h``struct kvm_dirty_gfn``h]hstruct kvm_dirty_gfn}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh". Each dirty entry is defined as:}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(hnstruct kvm_dirty_gfn { __u32 flags; __u32 slot; /* as_id | slot_id */ __u64 offset; };h]hnstruct kvm_dirty_gfn { __u32 flags; __u32 slot; /* as_id | slot_id */ __u64 offset; };}hj_sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(h_The following values are defined for the flags field to define the current state of the entry::#h]h^The following values are defined for the flags field to define the current state of the entry:}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(h#define KVM_DIRTY_GFN_F_DIRTY BIT(0) #define KVM_DIRTY_GFN_F_RESET BIT(1) #define KVM_DIRTY_GFN_F_MASK 0x3h]h#define KVM_DIRTY_GFN_F_DIRTY BIT(0) #define KVM_DIRTY_GFN_F_RESET BIT(1) #define KVM_DIRTY_GFN_F_MASK 0x3}hj{sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(hXUserspace should call KVM_ENABLE_CAP ioctl right after KVM_CREATE_VM ioctl to enable this capability for the new guest and set the size of the rings. Enabling the capability is only allowed before creating any vCPU, and the size of the ring must be a power of two. The larger the ring buffer, the less likely the ring is full and the VM is forced to exit to userspace. The optimal size depends on the workload, but it is recommended that it be at least 64 KiB (4096 entries).h]hXUserspace should call KVM_ENABLE_CAP ioctl right after KVM_CREATE_VM ioctl to enable this capability for the new guest and set the size of the rings. Enabling the capability is only allowed before creating any vCPU, and the size of the ring must be a power of two. The larger the ring buffer, the less likely the ring is full and the VM is forced to exit to userspace. The optimal size depends on the workload, but it is recommended that it be at least 64 KiB (4096 entries).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hXJust like for dirty page bitmaps, the buffer tracks writes to all user memory regions for which the KVM_MEM_LOG_DIRTY_PAGES flag was set in KVM_SET_USER_MEMORY_REGION. Once a memory region is registered with the flag set, userspace can start harvesting dirty pages from the ring buffer.h]hXJust like for dirty page bitmaps, the buffer tracks writes to all user memory regions for which the KVM_MEM_LOG_DIRTY_PAGES flag was set in KVM_SET_USER_MEMORY_REGION. Once a memory region is registered with the flag set, userspace can start harvesting dirty pages from the ring buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hAn entry in the ring buffer can be unused (flag bits ``00``), dirty (flag bits ``01``) or harvested (flag bits ``1X``). The state machine for the entry is as follows::h](h5An entry in the ring buffer can be unused (flag bits }(hjhhhNhNubj)}(h``00``h]h00}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh), dirty (flag bits }(hjhhhNhNubj)}(h``01``h]h01}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) or harvested (flag bits }(hjhhhNhNubj)}(h``1X``h]h1X}(hjъhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh2). The state machine for the entry is as follows:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(h dirtied harvested reset 00 -----------> 01 -------------> 1X -------+ ^ | | | +------------------------------------------+h]h dirtied harvested reset 00 -----------> 01 -------------> 1X -------+ ^ | | | +------------------------------------------+}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(hXcTo harvest the dirty pages, userspace accesses the mmapped ring buffer to read the dirty GFNs. If the flags has the DIRTY bit set (at this stage the RESET bit must be cleared), then it means this GFN is a dirty GFN. The userspace should harvest this GFN and mark the flags from state ``01b`` to ``1Xb`` (bit 0 will be ignored by KVM, but bit 1 must be set to show that this GFN is harvested and waiting for a reset), and move on to the next GFN. The userspace should continue to do this until the flags of a GFN have the DIRTY bit cleared, meaning that it has harvested all the dirty GFNs that were available.h](hXTo harvest the dirty pages, userspace accesses the mmapped ring buffer to read the dirty GFNs. If the flags has the DIRTY bit set (at this stage the RESET bit must be cleared), then it means this GFN is a dirty GFN. The userspace should harvest this GFN and mark the flags from state }(hjhhhNhNubj)}(h``01b``h]h01b}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``1Xb``h]h1Xb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX4 (bit 0 will be ignored by KVM, but bit 1 must be set to show that this GFN is harvested and waiting for a reset), and move on to the next GFN. The userspace should continue to do this until the flags of a GFN have the DIRTY bit cleared, meaning that it has harvested all the dirty GFNs that were available.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hXNote that on weakly ordered architectures, userspace accesses to the ring buffer (and more specifically the 'flags' field) must be ordered, using load-acquire/store-release accessors when available, or any other memory barrier that will ensure this ordering.h]hXNote that on weakly ordered architectures, userspace accesses to the ring buffer (and more specifically the ‘flags’ field) must be ordered, using load-acquire/store-release accessors when available, or any other memory barrier that will ensure this ordering.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hIt's not necessary for userspace to harvest the all dirty GFNs at once. However it must collect the dirty GFNs in sequence, i.e., the userspace program cannot skip one dirty GFN to collect the one next to it.h]hIt’s not necessary for userspace to harvest the all dirty GFNs at once. However it must collect the dirty GFNs in sequence, i.e., the userspace program cannot skip one dirty GFN to collect the one next to it.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(hXAfter processing one or more entries in the ring buffer, userspace calls the VM ioctl KVM_RESET_DIRTY_RINGS to notify the kernel about it, so that the kernel will reprotect those collected GFNs. Therefore, the ioctl must be called *before* reading the content of the dirty pages.h](hAfter processing one or more entries in the ring buffer, userspace calls the VM ioctl KVM_RESET_DIRTY_RINGS to notify the kernel about it, so that the kernel will reprotect those collected GFNs. Therefore, the ioctl must be called }(hjEhhhNhNubjn)}(h*before*h]hbefore}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjEubh( reading the content of the dirty pages.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(h|The dirty ring can get full. When it happens, the KVM_RUN of the vcpu will return with exit reason KVM_EXIT_DIRTY_LOG_FULL.h]h|The dirty ring can get full. When it happens, the KVM_RUN of the vcpu will return with exit reason KVM_EXIT_DIRTY_LOG_FULL.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(hXThe dirty ring interface has a major difference comparing to the KVM_GET_DIRTY_LOG interface in that, when reading the dirty ring from userspace, it's still possible that the kernel has not yet flushed the processor's dirty page buffers into the kernel buffer (with dirty bitmaps, the flushing is done by the KVM_GET_DIRTY_LOG ioctl). To achieve that, one needs to kick the vcpu out of KVM_RUN using a signal. The resulting vmexit ensures that all dirty GFNs are flushed to the dirty rings.h]hXThe dirty ring interface has a major difference comparing to the KVM_GET_DIRTY_LOG interface in that, when reading the dirty ring from userspace, it’s still possible that the kernel has not yet flushed the processor’s dirty page buffers into the kernel buffer (with dirty bitmaps, the flushing is done by the KVM_GET_DIRTY_LOG ioctl). To achieve that, one needs to kick the vcpu out of KVM_RUN using a signal. The resulting vmexit ensures that all dirty GFNs are flushed to the dirty rings.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(hXNOTE: KVM_CAP_DIRTY_LOG_RING_ACQ_REL is the only capability that should be exposed by weakly ordered architecture, in order to indicate the additional memory ordering requirements imposed on userspace when reading the state of an entry and mutating it from DIRTY to HARVESTED. Architecture with TSO-like ordering (such as x86) are allowed to expose both KVM_CAP_DIRTY_LOG_RING and KVM_CAP_DIRTY_LOG_RING_ACQ_REL to userspace.h]hXNOTE: KVM_CAP_DIRTY_LOG_RING_ACQ_REL is the only capability that should be exposed by weakly ordered architecture, in order to indicate the additional memory ordering requirements imposed on userspace when reading the state of an entry and mutating it from DIRTY to HARVESTED. Architecture with TSO-like ordering (such as x86) are allowed to expose both KVM_CAP_DIRTY_LOG_RING and KVM_CAP_DIRTY_LOG_RING_ACQ_REL to userspace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(hXAfter enabling the dirty rings, the userspace needs to detect the capability of KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP to see whether the ring structures can be backed by per-slot bitmaps. With this capability advertised, it means the architecture can dirty guest pages without vcpu/ring context, so that some of the dirty information will still be maintained in the bitmap structure. KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP can't be enabled if the capability of KVM_CAP_DIRTY_LOG_RING_ACQ_REL hasn't been enabled, or any memslot has been existing.h]hXAfter enabling the dirty rings, the userspace needs to detect the capability of KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP to see whether the ring structures can be backed by per-slot bitmaps. With this capability advertised, it means the architecture can dirty guest pages without vcpu/ring context, so that some of the dirty information will still be maintained in the bitmap structure. KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP can’t be enabled if the capability of KVM_CAP_DIRTY_LOG_RING_ACQ_REL hasn’t been enabled, or any memslot has been existing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!!hjhhubh)}(hX%Note that the bitmap here is only a backup of the ring structure. The use of the ring and bitmap combination is only beneficial if there is only a very small amount of memory that is dirtied out of vcpu/ring context. Otherwise, the stand-alone per-slot bitmap mechanism needs to be considered.h]hX%Note that the bitmap here is only a backup of the ring structure. The use of the ring and bitmap combination is only beneficial if there is only a very small amount of memory that is dirtied out of vcpu/ring context. Otherwise, the stand-alone per-slot bitmap mechanism needs to be considered.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*!hjhhubh)}(hXTo collect dirty bits in the backup bitmap, userspace can use the same KVM_GET_DIRTY_LOG ioctl. KVM_CLEAR_DIRTY_LOG isn't needed as long as all the generation of the dirty bits is done in a single pass. Collecting the dirty bitmap should be the very last thing that the VMM does before considering the state as complete. VMM needs to ensure that the dirty state is final and avoid missing dirty pages from another ioctl ordered after the bitmap collection.h]hXTo collect dirty bits in the backup bitmap, userspace can use the same KVM_GET_DIRTY_LOG ioctl. KVM_CLEAR_DIRTY_LOG isn’t needed as long as all the generation of the dirty bits is done in a single pass. Collecting the dirty bitmap should be the very last thing that the VMM does before considering the state as complete. VMM needs to ensure that the dirty state is final and avoid missing dirty pages from another ioctl ordered after the bitmap collection.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0!hjhhubh)}(hXNOTE: Multiple examples of using the backup bitmap: (1) save vgic/its tables through command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} on KVM device "kvm-arm-vgic-its". (2) restore vgic/its tables through command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} on KVM device "kvm-arm-vgic-its". VGICv3 LPI pending status is restored. (3) save vgic3 pending table through KVM_DEV_ARM_VGIC_{GRP_CTRL, SAVE_PENDING_TABLES} command on KVM device "kvm-arm-vgic-v3".h]hXNOTE: Multiple examples of using the backup bitmap: (1) save vgic/its tables through command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} on KVM device “kvm-arm-vgic-its”. (2) restore vgic/its tables through command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} on KVM device “kvm-arm-vgic-its”. VGICv3 LPI pending status is restored. (3) save vgic3 pending table through KVM_DEV_ARM_VGIC_{GRP_CTRL, SAVE_PENDING_TABLES} command on KVM device “kvm-arm-vgic-v3”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8!hjhhubeh}(h]5kvm-cap-dirty-log-ring-kvm-cap-dirty-log-ring-acq-relah ]h"]:7.36 kvm_cap_dirty_log_ring/kvm_cap_dirty_log_ring_acq_relah$]h&]uh1hhjZkhhhhhM ubh)}(hhh](h)}(h7.37 KVM_CAP_PMU_CAPABILITYh]h7.37 KVM_CAP_PMU_CAPABILITY}(hjҋhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjϋhhhhhMA!ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMC!hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvmh]h)}(hj$h]hvm}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD!hj"ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMD!hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(h5arg[0] is bitmask of PMU virtualization capabilities.h]h)}(hjRh]h5arg[0] is bitmask of PMU virtualization capabilities.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME!hjPubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhME!hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjmhhhKubjy)}(h80 on success, -EINVAL when arg[0] contains invalid bits h]h)}(h70 on success, -EINVAL when arg[0] contains invalid bitsh]h70 on success, -EINVAL when arg[0] contains invalid bits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF!hj~ubah}(h]h ]h"]h$]h&]uh1jxhjmubeh}(h]h ]h"]h$]h&]uh1jchhhMF!hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjϋhhhhhMC!ubh)}(h1This capability alters PMU virtualization in KVM.h]h1This capability alters PMU virtualization in KVM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH!hjϋhhubh)}(hCalling KVM_CHECK_EXTENSION for this capability returns a bitmask of PMU virtualization capabilities that can be adjusted on a VM.h]hCalling KVM_CHECK_EXTENSION for this capability returns a bitmask of PMU virtualization capabilities that can be adjusted on a VM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ!hjϋhhubh)}(hThe argument to KVM_ENABLE_CAP is also a bitmask and selects specific PMU virtualization capabilities to be applied to the VM. This can only be invoked on a VM prior to the creation of VCPUs.h]hThe argument to KVM_ENABLE_CAP is also a bitmask and selects specific PMU virtualization capabilities to be applied to the VM. This can only be invoked on a VM prior to the creation of VCPUs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM!hjϋhhubh)}(hAt this time, KVM_PMU_CAP_DISABLE is the only capability. Setting this capability will disable PMU virtualization for that VM. Usermode should adjust CPUID leaf 0xA to reflect that the PMU is disabled.h]hAt this time, KVM_PMU_CAP_DISABLE is the only capability. Setting this capability will disable PMU virtualization for that VM. Usermode should adjust CPUID leaf 0xA to reflect that the PMU is disabled.}(hǰhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ!hjϋhhubeh}(h]kvm-cap-pmu-capabilityah ]h"]7.37 kvm_cap_pmu_capabilityah$]h&]uh1hhjZkhhhhhMA!ubh)}(hhh](h)}(h%7.38 KVM_CAP_VM_DISABLE_NX_HUGE_PAGESh]h%7.38 KVM_CAP_VM_DISABLE_NX_HUGE_PAGES}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMV!ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hj h]hx86}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMX!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMX!hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$hhhKubjy)}(hvmh]h)}(hj7h]hvm}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMY!hj5ubah}(h]h ]h"]h$]h&]uh1jxhj$ubeh}(h]h ]h"]h$]h&]uh1jchhhMY!hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRhhhKubjy)}(harg[0] must be 0.h]h)}(hjeh]harg[0] must be 0.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ!hjcubah}(h]h ]h"]h$]h&]uh1jxhjRubeh}(h]h ]h"]h$]h&]uh1jchhhMZ!hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0 on success, -EPERM if the userspace process does not have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been created. h]h)}(h0 on success, -EPERM if the userspace process does not have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been created.h]h0 on success, -EPERM if the userspace process does not have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been created.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM[!hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMX!ubh)}(hHThis capability disables the NX huge pages mitigation for iTLB MULTIHIT.h]hHThis capability disables the NX huge pages mitigation for iTLB MULTIHIT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_!hjhhubh)}(hNThe capability has no effect if the nx_huge_pages module parameter is not set.h]hNThe capability has no effect if the nx_huge_pages module parameter is not set.}(hjÍhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa!hjhhubh)}(h=This capability may only be set before any vCPUs are created.h]h=This capability may only be set before any vCPUs are created.}(hjэhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc!hjhhubeh}(h] kvm-cap-vm-disable-nx-huge-pagesah ]h"]%7.38 kvm_cap_vm_disable_nx_huge_pagesah$]h&]uh1hhjZkhhhhhMV!ubh)}(hhh](h)}(h'7.39 KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZEh]h'7.39 KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMf!ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(harm64h]h)}(hjh]harm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh!hj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMh!hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj)hhhKubjy)}(hvmh]h)}(hj<h]hvm}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi!hj:ubah}(h]h ]h"]h$]h&]uh1jxhj)ubeh}(h]h ]h"]h$]h&]uh1jchhhMi!hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjWhhhKubjy)}(h#arg[0] is the new split chunk size.h]h)}(hjjh]h#arg[0] is the new split chunk size.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMj!hjhubah}(h]h ]h"]h$]h&]uh1jxhjWubeh}(h]h ]h"]h$]h&]uh1jchhhMj!hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h:0 on success, -EINVAL if any memslot was already created. h]h)}(h90 on success, -EINVAL if any memslot was already created.h]h90 on success, -EINVAL if any memslot was already created.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMk!hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMh!ubh)}(hAThis capability sets the chunk size used in Eager Page Splitting.h]hAThis capability sets the chunk size used in Eager Page Splitting.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm!hjhhubh)}(hXTEager Page Splitting improves the performance of dirty-logging (used in live migrations) when guest memory is backed by huge-pages. It avoids splitting huge-pages (into PAGE_SIZE pages) on fault, by doing it eagerly when enabling dirty logging (with the KVM_MEM_LOG_DIRTY_PAGES flag for a memory region), or when using KVM_CLEAR_DIRTY_LOG.h]hXTEager Page Splitting improves the performance of dirty-logging (used in live migrations) when guest memory is backed by huge-pages. It avoids splitting huge-pages (into PAGE_SIZE pages) on fault, by doing it eagerly when enabling dirty logging (with the KVM_MEM_LOG_DIRTY_PAGES flag for a memory region), or when using KVM_CLEAR_DIRTY_LOG.}(hjȎhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo!hjhhubh)}(hThe chunk size specifies how many pages to break at a time, using a single allocation for each chunk. Bigger the chunk size, more pages need to be allocated ahead of time.h]hThe chunk size specifies how many pages to break at a time, using a single allocation for each chunk. Bigger the chunk size, more pages need to be allocated ahead of time.}(hj֎hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMv!hjhhubh)}(hThe chunk size needs to be a valid block size. The list of acceptable block sizes is exposed in KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES as a 64-bit bitmap (each bit describing a block size). The default value is 0, to disable the eager page splitting.h]hThe chunk size needs to be a valid block size. The list of acceptable block sizes is exposed in KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES as a 64-bit bitmap (each bit describing a block size). The default value is 0, to disable the eager page splitting.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz!hjhhubeh}(h]"kvm-cap-arm-eager-split-chunk-sizeah ]h"]'7.39 kvm_cap_arm_eager_split_chunk_sizeah$]h&]uh1hhjZkhhhhhMf!ubh)}(hhh](h)}(h7.40 KVM_CAP_EXIT_HYPERCALLh]h7.40 KVM_CAP_EXIT_HYPERCALL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM!ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hj!h]hx86}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM!hj hhubjd)}(hhh](ji)}(hTypeh]hType}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<hhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjMubah}(h]h ]h"]h$]h&]uh1jxhj<ubeh}(h]h ]h"]h$]h&]uh1jchhhM!hj hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM!ubh)}(hThis capability, if enabled, will cause KVM to exit to userspace with KVM_EXIT_HYPERCALL exit reason to process some hypercalls.h]hThis capability, if enabled, will cause KVM to exit to userspace with KVM_EXIT_HYPERCALL exit reason to process some hypercalls.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(hCalling KVM_CHECK_EXTENSION for this capability will return a bitmask of hypercalls that can be configured to exit to userspace. Right now, the only such hypercall is KVM_HC_MAP_GPA_RANGE.h]hCalling KVM_CHECK_EXTENSION for this capability will return a bitmask of hypercalls that can be configured to exit to userspace. Right now, the only such hypercall is KVM_HC_MAP_GPA_RANGE.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(hThe argument to KVM_ENABLE_CAP is also a bitmask, and must be a subset of the result of KVM_CHECK_EXTENSION. KVM will forward to userspace the hypercalls whose corresponding bit is in the argument, and return ENOSYS for the others.h]hThe argument to KVM_ENABLE_CAP is also a bitmask, and must be a subset of the result of KVM_CHECK_EXTENSION. KVM will forward to userspace the hypercalls whose corresponding bit is in the argument, and return ENOSYS for the others.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-exit-hypercallah ]h"]7.40 kvm_cap_exit_hypercallah$]h&]uh1hhjZkhhhhhM!ubh)}(hhh](h)}(h7.41 KVM_CAP_ARM_SYSTEM_SUSPENDh]h7.41 KVM_CAP_ARM_SYSTEM_SUSPEND}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM!ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(harm64h]h)}(hjʏh]harm64}(hj̏hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjȏubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM!ubh)}(hWhen enabled, KVM will exit to userspace with KVM_EXIT_SYSTEM_EVENT of type KVM_SYSTEM_EVENT_SUSPEND to process the guest suspend request.h]hWhen enabled, KVM will exit to userspace with KVM_EXIT_SYSTEM_EVENT of type KVM_SYSTEM_EVENT_SUSPEND to process the guest suspend request.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-arm-system-suspendah ]h"]7.41 kvm_cap_arm_system_suspendah$]h&]uh1hhjZkhhhhhM!ubh)}(hhh](h)}(h%7.37 KVM_CAP_ARM_WRITABLE_IMP_ID_REGSh]h%7.37 KVM_CAP_ARM_WRITABLE_IMP_ID_REGS}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhM!ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(harm64h]h)}(hjWh]harm64}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjUubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjAhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrhhhKubjy)}(hVMh]h)}(hjh]hVM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhjrubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjAhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hNoneh]h)}(hjh]hNone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjAhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjѐhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjΐhhhKubjy)}(hR0 on success, -EINVAL if vCPUs have been created before enabling this capability. h]h)}(hQ0 on success, -EINVAL if vCPUs have been created before enabling this capability.h]hQ0 on success, -EINVAL if vCPUs have been created before enabling this capability.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjߐubah}(h]h ]h"]h$]h&]uh1jxhjΐubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjAhhubeh}(h]h ]h"]h$]h&]uh1j^hj0hhhhhM!ubh)}(hThis capability changes the behavior of the registers that identify a PE implementation of the Arm architecture: MIDR_EL1, REVIDR_EL1, and AIDR_EL1. By default, these registers are visible to userspace but treated as invariant.h]hThis capability changes the behavior of the registers that identify a PE implementation of the Arm architecture: MIDR_EL1, REVIDR_EL1, and AIDR_EL1. By default, these registers are visible to userspace but treated as invariant.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj0hhubh)}(hWhen this capability is enabled, KVM allows userspace to change the aforementioned registers before the first KVM_RUN. These registers are VM scoped, meaning that the same set of values are presented on all vCPUs in a given VM.h]hWhen this capability is enabled, KVM allows userspace to change the aforementioned registers before the first KVM_RUN. These registers are VM scoped, meaning that the same set of values are presented on all vCPUs in a given VM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj0hhubeh}(h] kvm-cap-arm-writable-imp-id-regsah ]h"]%7.37 kvm_cap_arm_writable_imp_id_regsah$]h&]uh1hhjZkhhhhhM!ubh)}(hhh](h)}(h!7.43 KVM_CAP_RISCV_MP_STATE_RESETh]h!7.43 KVM_CAP_RISCV_MP_STATE_RESET}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hhhhhM!ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj;hhhKubjy)}(hriscvh]h)}(hjNh]hriscv}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjLubah}(h]h ]h"]h$]h&]uh1jxhj;ubeh}(h]h ]h"]h$]h&]uh1jchhhM!hj8hhubjd)}(hhh](ji)}(hTypeh]hType}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjihhhKubjy)}(hVMh]h)}(hj|h]hVM}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjzubah}(h]h ]h"]h$]h&]uh1jxhjiubeh}(h]h ]h"]h$]h&]uh1jchhhM!hj8hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hNoneh]h)}(hjh]hNone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM!hj8hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjȑhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjőhhhKubjy)}(h,0 on success, -EINVAL if arg[0] is not zero h]h)}(h+0 on success, -EINVAL if arg[0] is not zeroh]h+0 on success, -EINVAL if arg[0] is not zero}(hjڑhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj֑ubah}(h]h ]h"]h$]h&]uh1jxhjőubeh}(h]h ]h"]h$]h&]uh1jchhhM!hj8hhubeh}(h]h ]h"]h$]h&]uh1j^hj'hhhhhM!ubh)}(hWhen this capability is enabled, KVM resets the VCPU when setting MP_STATE_INIT_RECEIVED through IOCTL. The original MP_STATE is preserved.h]hWhen this capability is enabled, KVM resets the VCPU when setting MP_STATE_INIT_RECEIVED through IOCTL. The original MP_STATE is preserved.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj'hhubeh}(h]kvm-cap-riscv-mp-state-resetah ]h"]!7.43 kvm_cap_riscv_mp_state_resetah$]h&]uh1hhjZkhhhhhM!ubeh}(h]('capabilities-that-can-be-enabled-on-vmsjCkj8keh ]h"](*7. capabilities that can be enabled on vms cap_enable_vmjEkeh$]h&]uh1hhhhhhhhMjm}(jj9kjEkj.kujo}(jCkj9kj8kj.kuubh)}(hhh](h)}(h8. Other capabilities.h]h8. Other capabilities.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM!ubh)}(heThis section lists capabilities that give information about other features of the KVM implementation.h]heThis section lists capabilities that give information about other features of the KVM implementation.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(hhh](h)}(h8.1 KVM_CAP_PPC_HWRNGh]h8.1 KVM_CAP_PPC_HWRNG}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNhhhKubjy)}(hppc h]h)}(hppch]hppc}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj_ubah}(h]h ]h"]h$]h&]uh1jxhjNubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjKhhubah}(h]h ]h"]h$]h&]uh1j^hj:hhhhhM!ubh)}(hX.This capability, if KVM_CHECK_EXTENSION indicates that it is available, means that the kernel has an implementation of the H_RANDOM hypercall backed by a hardware random-number generator. If present, the kernel H_RANDOM handler can be enabled for guest use with the KVM_CAP_PPC_ENABLE_HCALL capability.h]hX.This capability, if KVM_CHECK_EXTENSION indicates that it is available, means that the kernel has an implementation of the H_RANDOM hypercall backed by a hardware random-number generator. If present, the kernel H_RANDOM handler can be enabled for guest use with the KVM_CAP_PPC_ENABLE_HCALL capability.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj:hhubeh}(h]kvm-cap-ppc-hwrngah ]h"]8.1 kvm_cap_ppc_hwrngah$]h&]uh1hhjhhhhhM!ubh)}(hhh](h)}(h8.3 KVM_CAP_PPC_MMU_RADIXh]h8.3 KVM_CAP_PPC_MMU_RADIX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hppc h]h)}(hppch]hppc}(hj’hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM!ubh)}(hThis capability, if KVM_CHECK_EXTENSION indicates that it is available, means that the kernel can support guests using the radix MMU defined in Power ISA V3.00 (as implemented in the POWER9 processor).h]hThis capability, if KVM_CHECK_EXTENSION indicates that it is available, means that the kernel can support guests using the radix MMU defined in Power ISA V3.00 (as implemented in the POWER9 processor).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-ppc-mmu-radixah ]h"]8.3 kvm_cap_ppc_mmu_radixah$]h&]uh1hhjhhhhhM!ubh)}(hhh](h)}(h8.4 KVM_CAP_PPC_MMU_HASH_V3h]h8.4 KVM_CAP_PPC_MMU_HASH_V3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hppc h]h)}(hppch]hppc}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM!hj hhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM!ubh)}(hThis capability, if KVM_CHECK_EXTENSION indicates that it is available, means that the kernel can support guests using the hashed page table MMU defined in Power ISA V3.00 (as implemented in the POWER9 processor), including in-memory segment tables.h]hThis capability, if KVM_CHECK_EXTENSION indicates that it is available, means that the kernel can support guests using the hashed page table MMU defined in Power ISA V3.00 (as implemented in the POWER9 processor), including in-memory segment tables.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-ppc-mmu-hash-v3ah ]h"]8.4 kvm_cap_ppc_mmu_hash_v3ah$]h&]uh1hhjhhhhhM!ubh)}(hhh](h)}(h8.5 KVM_CAP_MIPS_VZh]h8.5 KVM_CAP_MIPS_VZ}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjkhhhKubjy)}(hmips h]h)}(hmipsh]hmips}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj|ubah}(h]h ]h"]h$]h&]uh1jxhjkubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjhhhubah}(h]h ]h"]h$]h&]uh1j^hjWhhhhhM!ubh)}(hX3This capability, if KVM_CHECK_EXTENSION on the main kvm handle indicates that it is available, means that full hardware assisted virtualization capabilities of the hardware are available for use through KVM. An appropriate KVM_VM_MIPS_* type must be passed to KVM_CREATE_VM to create a VM which utilises it.h]hX3This capability, if KVM_CHECK_EXTENSION on the main kvm handle indicates that it is available, means that full hardware assisted virtualization capabilities of the hardware are available for use through KVM. An appropriate KVM_VM_MIPS_* type must be passed to KVM_CREATE_VM to create a VM which utilises it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjWhhubh)}(hIf KVM_CHECK_EXTENSION on a kvm VM handle indicates that this capability is available, it means that the VM is using full hardware assisted virtualization capabilities of the hardware. This is useful to check after creating a VM with KVM_VM_MIPS_DEFAULT.h]hIf KVM_CHECK_EXTENSION on a kvm VM handle indicates that this capability is available, it means that the VM is using full hardware assisted virtualization capabilities of the hardware. This is useful to check after creating a VM with KVM_VM_MIPS_DEFAULT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjWhhubh)}(hX The value returned by KVM_CHECK_EXTENSION should be compared against known values (see below). All other values are reserved. This is to allow for the possibility of other hardware assisted virtualization implementations which may be incompatible with the MIPS VZ ASE.h]hX The value returned by KVM_CHECK_EXTENSION should be compared against known values (see below). All other values are reserved. This is to allow for the possibility of other hardware assisted virtualization implementations which may be incompatible with the MIPS VZ ASE.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjWhhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj͓ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKJuh1jOhj͓ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hjvh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hThe trap & emulate implementation is in use to run guest code in user mode. Guest virtual memory segments are rearranged to fit the guest in the user mode address space.h]hThe trap & emulate implementation is in use to run guest code in user mode. Guest virtual memory segments are rearranged to fit the guest in the user mode address space.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h1h]h1}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h}The MIPS VZ ASE is in use, providing full hardware assisted virtualization, including standard guest virtual memory segments.h]h}The MIPS VZ ASE is in use, providing full hardware assisted virtualization, including standard guest virtual memory segments.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj7ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj͓ubeh}(h]h ]h"]h$]h&]colsKuh1jJhjʓubah}(h]h ]h"]h$]h&]uh1jEhjWhhhhhNubeh}(h]kvm-cap-mips-vzah ]h"]8.5 kvm_cap_mips_vzah$]h&]uh1hhjhhhhhM!ubh)}(hhh](h)}(h8.7 KVM_CAP_MIPS_64BITh]h8.7 KVM_CAP_MIPS_64BIT}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hmips h]h)}(hmipsh]hmips}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjhhubah}(h]h ]h"]h$]h&]uh1j^hjohhhhhM!ubh)}(hvThis capability indicates the supported architecture type of the guest, i.e. the supported register and address width.h]hvThis capability indicates the supported architecture type of the guest, i.e. the supported register and address width.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjohhubh)}(hThe values returned when this capability is checked by KVM_CHECK_EXTENSION on a kvm VM handle correspond roughly to the CP0_Config.AT register field, and should be checked specifically against known values (see below). All other values are reserved.h]hThe values returned when this capability is checked by KVM_CHECK_EXTENSION on a kvm VM handle correspond roughly to the CP0_Config.AT register field, and should be checked specifically against known values (see below). All other values are reserved.}(hjƔhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjohhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjהubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKHuh1jOhjהubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hjvh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hxMIPS32 or microMIPS32. Both registers and addresses are 32-bits wide. It will only be possible to run 32-bit guest code.h]hxMIPS32 or microMIPS32. Both registers and addresses are 32-bits wide. It will only be possible to run 32-bit guest code.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hj%h]h1}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM "hj*ubah}(h]h ]h"]h$]h&]uh1johj'ubjp)}(hhh]h)}(hMIPS64 or microMIPS64 with access only to 32-bit compatibility segments. Registers are 64-bits wide, but addresses are 32-bits wide. 64-bit guest code may run but cannot access MIPS64 memory segments. It will also be possible to run 32-bit guest code.h]hMIPS64 or microMIPS64 with access only to 32-bit compatibility segments. Registers are 64-bits wide, but addresses are 32-bits wide. 64-bit guest code may run but cannot access MIPS64 memory segments. It will also be possible to run 32-bit guest code.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM "hj@ubah}(h]h ]h"]h$]h&]uh1johj'ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h2h]h2}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj`ubah}(h]h ]h"]h$]h&]uh1johj]ubjp)}(hhh]h)}(hMIPS64 or microMIPS64 with access to all address segments. Both registers and addresses are 64-bits wide. It will be possible to run 64-bit or 32-bit guest code.h]hMIPS64 or microMIPS64 with access to all address segments. Both registers and addresses are 64-bits wide. It will be possible to run 64-bit or 32-bit guest code.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjwubah}(h]h ]h"]h$]h&]uh1johj]ubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjהubeh}(h]h ]h"]h$]h&]colsKuh1jJhjԔubah}(h]h ]h"]h$]h&]uh1jEhjohhhhhNubeh}(h]kvm-cap-mips-64bitah ]h"]8.7 kvm_cap_mips_64bitah$]h&]uh1hhjhhhhhM!ubh)}(hhh](h)}(h8.9 KVM_CAP_ARM_USER_IRQh]h8.9 KVM_CAP_ARM_USER_IRQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjƕhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjÕhhhKubjy)}(harm64 h]h)}(harm64h]harm64}(hjؕhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjԕubah}(h]h ]h"]h$]h&]uh1jxhjÕubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM"ubh)}(hXThis capability, if KVM_CHECK_EXTENSION indicates that it is available, means that if userspace creates a VM without an in-kernel interrupt controller, it will be notified of changes to the output level of in-kernel emulated devices, which can generate virtual interrupts, presented to the VM. For such VMs, on every return to userspace, the kernel updates the vcpu's run->s.regs.device_irq_level field to represent the actual output level of the device.h]hXThis capability, if KVM_CHECK_EXTENSION indicates that it is available, means that if userspace creates a VM without an in-kernel interrupt controller, it will be notified of changes to the output level of in-kernel emulated devices, which can generate virtual interrupts, presented to the VM. For such VMs, on every return to userspace, the kernel updates the vcpu’s run->s.regs.device_irq_level field to represent the actual output level of the device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubh)}(hXWhenever kvm detects a change in the device output level, kvm guarantees at least one return to userspace before running the VM. This exit could either be a KVM_EXIT_INTR or any other exit event, like KVM_EXIT_MMIO. This way, userspace can always sample the device output level and re-compute the state of the userspace interrupt controller. Userspace should always check the state of run->s.regs.device_irq_level on every kvm exit. The value in run->s.regs.device_irq_level can represent both level and edge triggered interrupt signals, depending on the device. Edge triggered interrupt signals will exit to userspace with the bit in run->s.regs.device_irq_level set exactly once per edge signal.h]hXWhenever kvm detects a change in the device output level, kvm guarantees at least one return to userspace before running the VM. This exit could either be a KVM_EXIT_INTR or any other exit event, like KVM_EXIT_MMIO. This way, userspace can always sample the device output level and re-compute the state of the userspace interrupt controller. Userspace should always check the state of run->s.regs.device_irq_level on every kvm exit. The value in run->s.regs.device_irq_level can represent both level and edge triggered interrupt signals, depending on the device. Edge triggered interrupt signals will exit to userspace with the bit in run->s.regs.device_irq_level set exactly once per edge signal.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#"hjhhubh)}(hsThe field run->s.regs.device_irq_level is available independent of run->kvm_valid_regs or run->kvm_dirty_regs bits.h]hsThe field run->s.regs.device_irq_level is available independent of run->kvm_valid_regs or run->kvm_dirty_regs bits.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM."hjhhubh)}(hIf KVM_CAP_ARM_USER_IRQ is supported, the KVM_CHECK_EXTENSION ioctl returns a number larger than 0 indicating the version of this capability is implemented and thereby which bits in run->s.regs.device_irq_level can signal values.h]hIf KVM_CAP_ARM_USER_IRQ is supported, the KVM_CHECK_EXTENSION ioctl returns a number larger than 0 indicating the version of this capability is implemented and thereby which bits in run->s.regs.device_irq_level can signal values.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1"hjhhubh)}(hJCurrently the following bits are defined for the device_irq_level bitmap::h]hICurrently the following bits are defined for the device_irq_level bitmap:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5"hjhhubj$)}(hKVM_CAP_ARM_USER_IRQ >= 1: KVM_ARM_DEV_EL1_VTIMER - EL1 virtual timer KVM_ARM_DEV_EL1_PTIMER - EL1 physical timer KVM_ARM_DEV_PMU - ARM PMU overflow interrupt signalh]hKVM_CAP_ARM_USER_IRQ >= 1: KVM_ARM_DEV_EL1_VTIMER - EL1 virtual timer KVM_ARM_DEV_EL1_PTIMER - EL1 physical timer KVM_ARM_DEV_PMU - ARM PMU overflow interrupt signal}hj>sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM7"hjhhubh)}(hFuture versions of kvm may implement additional events. These will get indicated by returning a higher number from KVM_CHECK_EXTENSION and will be listed above.h]hFuture versions of kvm may implement additional events. These will get indicated by returning a higher number from KVM_CHECK_EXTENSION and will be listed above.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM="hjhhubeh}(h]kvm-cap-arm-user-irqah ]h"]8.9 kvm_cap_arm_user_irqah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.10 KVM_CAP_PPC_SMT_POSSIBLEh]h8.10 KVM_CAP_PPC_SMT_POSSIBLE}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhhhhhMB"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjvhhhKubjy)}(hppc h]h)}(hppch]hppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD"hjubah}(h]h ]h"]h$]h&]uh1jxhjvubeh}(h]h ]h"]h$]h&]uh1jchhhMD"hjshhubah}(h]h ]h"]h$]h&]uh1j^hjbhhhhhMD"ubh)}(hQuerying this capability returns a bitmap indicating the possible virtual SMT modes that can be set using KVM_CAP_PPC_SMT. If bit N (counting from the right) is set, then a virtual SMT mode of 2^N is available.h]hQuerying this capability returns a bitmap indicating the possible virtual SMT modes that can be set using KVM_CAP_PPC_SMT. If bit N (counting from the right) is set, then a virtual SMT mode of 2^N is available.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF"hjbhhubeh}(h]kvm-cap-ppc-smt-possibleah ]h"]8.10 kvm_cap_ppc_smt_possibleah$]h&]uh1hhjhhhhhMB"ubh)}(hhh](h)}(h8.12 KVM_CAP_HYPERV_VP_INDEXh]h8.12 KVM_CAP_HYPERV_VP_INDEX}(hjĖhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhML"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjؖhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjՖhhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN"hjubah}(h]h ]h"]h$]h&]uh1jxhjՖubeh}(h]h ]h"]h$]h&]uh1jchhhMN"hjҖhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhMN"ubh)}(hX&This capability indicates that userspace can load HV_X64_MSR_VP_INDEX msr. Its value is used to denote the target vcpu for a SynIC interrupt. For compatibility, KVM initializes this msr to KVM's internal vcpu index. When this capability is absent, userspace can still query this msr's value.h]hX*This capability indicates that userspace can load HV_X64_MSR_VP_INDEX msr. Its value is used to denote the target vcpu for a SynIC interrupt. For compatibility, KVM initializes this msr to KVM’s internal vcpu index. When this capability is absent, userspace can still query this msr’s value.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP"hjhhubeh}(h]kvm-cap-hyperv-vp-indexah ]h"]8.12 kvm_cap_hyperv_vp_indexah$]h&]uh1hhjhhhhhML"ubh)}(hhh](h)}(h8.13 KVM_CAP_S390_AIS_MIGRATIONh]h8.13 KVM_CAP_S390_AIS_MIGRATION}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMV"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMX"hjEubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMX"hj1hhubah}(h]h ]h"]h$]h&]uh1j^hj hhhhhMX"ubh)}(hThis capability indicates if the flic device will be able to get/set the AIS states for migration via the KVM_DEV_FLIC_AISM_ALL attribute and allows to discover this without having to create a flic device.h]hThis capability indicates if the flic device will be able to get/set the AIS states for migration via the KVM_DEV_FLIC_AISM_ALL attribute and allows to discover this without having to create a flic device.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ"hj hhubeh}(h]kvm-cap-s390-ais-migrationah ]h"]8.13 kvm_cap_s390_ais_migrationah$]h&]uh1hhjhhhhhMV"ubh)}(hhh](h)}(h8.14 KVM_CAP_S390_PSWh]h8.14 KVM_CAP_S390_PSW}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM_"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa"hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMa"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhMa"ubh)}(hLThis capability indicates that the PSW is exposed via the kvm_run structure.h]hLThis capability indicates that the PSW is exposed via the kvm_run structure.}(hjȗhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc"hjhhubeh}(h]kvm-cap-s390-pswah ]h"]8.14 kvm_cap_s390_pswah$]h&]uh1hhjhhhhhM_"ubh)}(hhh](h)}(h8.15 KVM_CAP_S390_GMAPh]h8.15 KVM_CAP_S390_GMAP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjޗhhhhhMf"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh"hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMh"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjޗhhhhhMh"ubh)}(hThis capability indicates that the user space memory used as guest mapping can be anywhere in the user memory address space, as long as the memory slots are aligned and sized to a segment (1MB) boundary.h]hThis capability indicates that the user space memory used as guest mapping can be anywhere in the user memory address space, as long as the memory slots are aligned and sized to a segment (1MB) boundary.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMj"hjޗhhubeh}(h]kvm-cap-s390-gmapah ]h"]8.15 kvm_cap_s390_gmapah$]h&]uh1hhjhhhhhMf"ubh)}(hhh](h)}(h8.16 KVM_CAP_S390_COWh]h8.16 KVM_CAP_S390_COW}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhMo"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQhhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMq"hjbubah}(h]h ]h"]h$]h&]uh1jxhjQubeh}(h]h ]h"]h$]h&]uh1jchhhMq"hjNhhubah}(h]h ]h"]h$]h&]uh1j^hj=hhhhhMq"ubh)}(hThis capability indicates that the user space memory used as guest mapping can use copy-on-write semantics as well as dirty pages tracking via read-only page tables.h]hThis capability indicates that the user space memory used as guest mapping can use copy-on-write semantics as well as dirty pages tracking via read-only page tables.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMs"hj=hhubeh}(h]kvm-cap-s390-cowah ]h"]8.16 kvm_cap_s390_cowah$]h&]uh1hhjhhhhhMo"ubh)}(hhh](h)}(h8.17 KVM_CAP_S390_BPBh]h8.17 KVM_CAP_S390_BPB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMx"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjŘhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz"hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMz"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhMz"ubh)}(hThis capability indicates that kvm will implement the interfaces to handle reset, migration and nested KVM for branch prediction blocking. The stfle facility 82 should not be provided to the guest without this capability.h]hThis capability indicates that kvm will implement the interfaces to handle reset, migration and nested KVM for branch prediction blocking. The stfle facility 82 should not be provided to the guest without this capability.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|"hjhhubeh}(h]kvm-cap-s390-bpbah ]h"]8.17 kvm_cap_s390_bpbah$]h&]uh1hhjhhhhhMx"ubh)}(hhh](h)}(h8.18 KVM_CAP_HYPERV_TLBFLUSHh]h8.18 KVM_CAP_HYPERV_TLBFLUSH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM"hj hhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM"ubh)}(hThis capability indicates that KVM supports paravirtualized Hyper-V TLB Flush hypercalls: HvFlushVirtualAddressSpace, HvFlushVirtualAddressSpaceEx, HvFlushVirtualAddressList, HvFlushVirtualAddressListEx.h]hThis capability indicates that KVM supports paravirtualized Hyper-V TLB Flush hypercalls: HvFlushVirtualAddressSpace, HvFlushVirtualAddressSpaceEx, HvFlushVirtualAddressList, HvFlushVirtualAddressListEx.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubeh}(h]kvm-cap-hyperv-tlbflushah ]h"]8.18 kvm_cap_hyperv_tlbflushah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h"8.19 KVM_CAP_ARM_INJECT_SERROR_ESRh]h"8.19 KVM_CAP_ARM_INJECT_SERROR_ESR}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjnhhhKubjy)}(harm64 h]h)}(harm64h]harm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jxhjnubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjkhhubah}(h]h ]h"]h$]h&]uh1j^hjZhhhhhM"ubh)}(hXThis capability indicates that userspace can specify (via the KVM_SET_VCPU_EVENTS ioctl) the syndrome value reported to the guest when it takes a virtual SError interrupt exception. If KVM advertises this capability, userspace can only specify the ISS field for the ESR syndrome. Other parts of the ESR, such as the EC are generated by the CPU when the exception is taken. If this virtual SError is taken to EL1 using AArch64, this value will be reported in the ISS field of ESR_ELx.h]hXThis capability indicates that userspace can specify (via the KVM_SET_VCPU_EVENTS ioctl) the syndrome value reported to the guest when it takes a virtual SError interrupt exception. If KVM advertises this capability, userspace can only specify the ISS field for the ESR syndrome. Other parts of the ESR, such as the EC are generated by the CPU when the exception is taken. If this virtual SError is taken to EL1 using AArch64, this value will be reported in the ISS field of ESR_ELx.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjZhhubh)}(h)See KVM_CAP_VCPU_EVENTS for more details.h]h)See KVM_CAP_VCPU_EVENTS for more details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjZhhubeh}(h]kvm-cap-arm-inject-serror-esrah ]h"]"8.19 kvm_cap_arm_inject_serror_esrah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.20 KVM_CAP_HYPERV_SEND_IPIh]h8.20 KVM_CAP_HYPERV_SEND_IPI}(hjʙhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjǙhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjޙhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjۙhhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jxhjۙubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjؙhhubah}(h]h ]h"]h$]h&]uh1j^hjǙhhhhhM"ubh)}(hThis capability indicates that KVM supports paravirtualized Hyper-V IPI send hypercalls: HvCallSendSyntheticClusterIpi, HvCallSendSyntheticClusterIpiEx.h]hThis capability indicates that KVM supports paravirtualized Hyper-V IPI send hypercalls: HvCallSendSyntheticClusterIpi, HvCallSendSyntheticClusterIpiEx.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjǙhhubeh}(h]kvm-cap-hyperv-send-ipiah ]h"]8.20 kvm_cap_hyperv_send_ipiah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.22 KVM_CAP_S390_VCPU_RESETSh]h8.22 KVM_CAP_S390_VCPU_RESETS}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj:hhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjKubah}(h]h ]h"]h$]h&]uh1jxhj:ubeh}(h]h ]h"]h$]h&]uh1jchhhM"hj7hhubah}(h]h ]h"]h$]h&]uh1j^hj&hhhhhM"ubh)}(hgThis capability indicates that the KVM_S390_NORMAL_RESET and KVM_S390_CLEAR_RESET ioctls are available.h]hgThis capability indicates that the KVM_S390_NORMAL_RESET and KVM_S390_CLEAR_RESET ioctls are available.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj&hhubeh}(h]kvm-cap-s390-vcpu-resetsah ]h"]8.22 kvm_cap_s390_vcpu_resetsah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.23 KVM_CAP_S390_PROTECTEDh]h8.23 KVM_CAP_S390_PROTECTED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM"ubh)}(hXThis capability indicates that the Ultravisor has been initialized and KVM can therefore start protected VMs. This capability governs the KVM_S390_PV_COMMAND ioctl and the KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected guests when the state change is invalid.h]hXThis capability indicates that the Ultravisor has been initialized and KVM can therefore start protected VMs. This capability governs the KVM_S390_PV_COMMAND ioctl and the KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected guests when the state change is invalid.}(hjΚhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubeh}(h]kvm-cap-s390-protectedah ]h"]8.23 kvm_cap_s390_protectedah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.24 KVM_CAP_STEAL_TIMEh]h8.24 KVM_CAP_STEAL_TIME}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h arm64, x86 h]h)}(h arm64, x86h]h arm64, x86}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM"ubh)}(hXThis capability indicates that KVM supports steal time accounting. When steal time accounting is supported it may be enabled with architecture-specific interfaces. This capability and the architecture- specific interfaces must be consistent, i.e. if one says the feature is supported, than the other should as well and vice versa. For arm64 see Documentation/virt/kvm/devices/vcpu.rst "KVM_ARM_VCPU_PVTIME_CTRL". For x86 see Documentation/virt/kvm/x86/msr.rst "MSR_KVM_STEAL_TIME".h]hXThis capability indicates that KVM supports steal time accounting. When steal time accounting is supported it may be enabled with architecture-specific interfaces. This capability and the architecture- specific interfaces must be consistent, i.e. if one says the feature is supported, than the other should as well and vice versa. For arm64 see Documentation/virt/kvm/devices/vcpu.rst “KVM_ARM_VCPU_PVTIME_CTRL”. For x86 see Documentation/virt/kvm/x86/msr.rst “MSR_KVM_STEAL_TIME”.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubeh}(h]kvm-cap-steal-timeah ]h"]8.24 kvm_cap_steal_timeah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.25 KVM_CAP_S390_DIAG318h]h8.25 KVM_CAP_S390_DIAG318}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjWhhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhubah}(h]h ]h"]h$]h&]uh1jxhjWubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjThhubah}(h]h ]h"]h$]h&]uh1j^hjChhhhhM"ubh)}(hXThis capability enables a guest to set information about its control program (i.e. guest kernel type and version). The information is helpful during system/firmware service events, providing additional data about the guest environments running on the machine.h]hXThis capability enables a guest to set information about its control program (i.e. guest kernel type and version). The information is helpful during system/firmware service events, providing additional data about the guest environments running on the machine.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjChhubh)}(hXThe information is associated with the DIAGNOSE 0x318 instruction, which sets an 8-byte value consisting of a one-byte Control Program Name Code (CPNC) and a 7-byte Control Program Version Code (CPVC). The CPNC determines what environment the control program is running in (e.g. Linux, z/VM...), and the CPVC is used for information specific to OS (e.g. Linux version, Linux distribution...)h]hXThe information is associated with the DIAGNOSE 0x318 instruction, which sets an 8-byte value consisting of a one-byte Control Program Name Code (CPNC) and a 7-byte Control Program Version Code (CPVC). The CPNC determines what environment the control program is running in (e.g. Linux, z/VM...), and the CPVC is used for information specific to OS (e.g. Linux version, Linux distribution...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjChhubh)}(hIf this capability is available, then the CPNC and CPVC can be synchronized between KVM and userspace via the sync regs mechanism (KVM_SYNC_DIAG318).h]hIf this capability is available, then the CPNC and CPVC can be synchronized between KVM and userspace via the sync regs mechanism (KVM_SYNC_DIAG318).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjChhubeh}(h]kvm-cap-s390-diag318ah ]h"]8.25 kvm_cap_s390_diag318ah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.26 KVM_CAP_X86_USER_SPACE_MSRh]h8.26 KVM_CAP_X86_USER_SPACE_MSR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj՛hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjқhhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jxhjқubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjϛhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM"ubh)}(hX?This capability indicates that KVM supports deflection of MSR reads and writes to user space. It can be enabled on a VM level. If enabled, MSR accesses that would usually trigger a #GP by KVM into the guest will instead get bounced to user space through the KVM_EXIT_X86_RDMSR and KVM_EXIT_X86_WRMSR exit notifications.h]hX?This capability indicates that KVM supports deflection of MSR reads and writes to user space. It can be enabled on a VM level. If enabled, MSR accesses that would usually trigger a #GP by KVM into the guest will instead get bounced to user space through the KVM_EXIT_X86_RDMSR and KVM_EXIT_X86_WRMSR exit notifications.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubeh}(h]id24ah ]h"]8.26 kvm_cap_x86_user_space_msrah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.27 KVM_CAP_X86_MSR_FILTERh]h8.27 KVM_CAP_X86_MSR_FILTER}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjBubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhM"hj.hhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM"ubh)}(hXThis capability indicates that KVM supports that accesses to user defined MSRs may be rejected. With this capability exposed, KVM exports new VM ioctl KVM_X86_SET_MSR_FILTER which user space can call to specify bitmaps of MSR ranges that KVM should deny access to.h]hXThis capability indicates that KVM supports that accesses to user defined MSRs may be rejected. With this capability exposed, KVM exports new VM ioctl KVM_X86_SET_MSR_FILTER which user space can call to specify bitmaps of MSR ranges that KVM should deny access to.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubh)}(hIn combination with KVM_CAP_X86_USER_SPACE_MSR, this allows user space to trap and emulate MSRs that are outside of the scope of KVM as well as limit the attack surface on KVM's MSR emulation code.h]hIn combination with KVM_CAP_X86_USER_SPACE_MSR, this allows user space to trap and emulate MSRs that are outside of the scope of KVM as well as limit the attack surface on KVM’s MSR emulation code.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubeh}(h]kvm-cap-x86-msr-filterah ]h"]8.27 kvm_cap_x86_msr_filterah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.30 KVM_CAP_XEN_HVMh]h8.30 KVM_CAP_XEN_HVM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM"ubh)}(hhThis capability indicates the features that Xen supports for hosting Xen PVHVM guests. Valid flags are::h]hgThis capability indicates the features that Xen supports for hosting Xen PVHVM guests. Valid flags are:}(hjӜhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubj$)}(hX#define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR (1 << 0) #define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL (1 << 1) #define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2) #define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 3) #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4) #define KVM_XEN_HVM_CONFIG_EVTCHN_SEND (1 << 5) #define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG (1 << 6) #define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE (1 << 7)h]hX#define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR (1 << 0) #define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL (1 << 1) #define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2) #define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 3) #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4) #define KVM_XEN_HVM_CONFIG_EVTCHN_SEND (1 << 5) #define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG (1 << 6) #define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE (1 << 7)}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM"hjhhubh)}(hThe KVM_XEN_HVM_CONFIG_HYPERCALL_MSR flag indicates that the KVM_XEN_HVM_CONFIG ioctl is available, for the guest to set its hypercall page.h]hThe KVM_XEN_HVM_CONFIG_HYPERCALL_MSR flag indicates that the KVM_XEN_HVM_CONFIG ioctl is available, for the guest to set its hypercall page.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hX*If KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL is also set, the same flag may also be provided in the flags to KVM_XEN_HVM_CONFIG, without providing hypercall page contents, to request that KVM generate hypercall page content automatically and also enable interception of guest hypercalls with KVM_EXIT_XEN.h]hX*If KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL is also set, the same flag may also be provided in the flags to KVM_XEN_HVM_CONFIG, without providing hypercall page contents, to request that KVM generate hypercall page content automatically and also enable interception of guest hypercalls with KVM_EXIT_XEN.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hX7The KVM_XEN_HVM_CONFIG_SHARED_INFO flag indicates the availability of the KVM_XEN_HVM_SET_ATTR, KVM_XEN_HVM_GET_ATTR, KVM_XEN_VCPU_SET_ATTR and KVM_XEN_VCPU_GET_ATTR ioctls, as well as the delivery of exception vectors for event channel upcalls when the evtchn_upcall_pending field of a vcpu's vcpu_info is set.h]hX9The KVM_XEN_HVM_CONFIG_SHARED_INFO flag indicates the availability of the KVM_XEN_HVM_SET_ATTR, KVM_XEN_HVM_GET_ATTR, KVM_XEN_VCPU_SET_ATTR and KVM_XEN_VCPU_GET_ATTR ioctls, as well as the delivery of exception vectors for event channel upcalls when the evtchn_upcall_pending field of a vcpu’s vcpu_info is set.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hThe KVM_XEN_HVM_CONFIG_RUNSTATE flag indicates that the runstate-related features KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR/_CURRENT/_DATA/_ADJUST are supported by the KVM_XEN_VCPU_SET_ATTR/KVM_XEN_VCPU_GET_ATTR ioctls.h]hThe KVM_XEN_HVM_CONFIG_RUNSTATE flag indicates that the runstate-related features KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR/_CURRENT/_DATA/_ADJUST are supported by the KVM_XEN_VCPU_SET_ATTR/KVM_XEN_VCPU_GET_ATTR ioctls.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hThe KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL flag indicates that IRQ routing entries of the type KVM_IRQ_ROUTING_XEN_EVTCHN are supported, with the priority field set to indicate 2 level event channel delivery.h]hThe KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL flag indicates that IRQ routing entries of the type KVM_IRQ_ROUTING_XEN_EVTCHN are supported, with the priority field set to indicate 2 level event channel delivery.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hXThe KVM_XEN_HVM_CONFIG_EVTCHN_SEND flag indicates that KVM supports injecting event channel events directly into the guest with the KVM_XEN_HVM_EVTCHN_SEND ioctl. It also indicates support for the KVM_XEN_ATTR_TYPE_EVTCHN/XEN_VERSION HVM attributes and the KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID/TIMER/UPCALL_VECTOR vCPU attributes. related to event channel delivery, timers, and the XENVER_version interception.h]hXThe KVM_XEN_HVM_CONFIG_EVTCHN_SEND flag indicates that KVM supports injecting event channel events directly into the guest with the KVM_XEN_HVM_EVTCHN_SEND ioctl. It also indicates support for the KVM_XEN_ATTR_TYPE_EVTCHN/XEN_VERSION HVM attributes and the KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID/TIMER/UPCALL_VECTOR vCPU attributes. related to event channel delivery, timers, and the XENVER_version interception.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hX)The KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG flag indicates that KVM supports the KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG attribute in the KVM_XEN_SET_ATTR and KVM_XEN_GET_ATTR ioctls. This controls whether KVM will set the XEN_RUNSTATE_UPDATE flag in guest memory mapped vcpu_runstate_info during updates of the runstate information. Note that versions of KVM which support the RUNSTATE feature above, but not the RUNSTATE_UPDATE_FLAG feature, will always set the XEN_RUNSTATE_UPDATE flag when updating the guest structure, which is perhaps counterintuitive. When this flag is advertised, KVM will behave more correctly, not using the XEN_RUNSTATE_UPDATE flag until/unless specifically enabled (by the guest making the hypercall, causing the VMM to enable the KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG attribute).h]hX)The KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG flag indicates that KVM supports the KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG attribute in the KVM_XEN_SET_ATTR and KVM_XEN_GET_ATTR ioctls. This controls whether KVM will set the XEN_RUNSTATE_UPDATE flag in guest memory mapped vcpu_runstate_info during updates of the runstate information. Note that versions of KVM which support the RUNSTATE feature above, but not the RUNSTATE_UPDATE_FLAG feature, will always set the XEN_RUNSTATE_UPDATE flag when updating the guest structure, which is perhaps counterintuitive. When this flag is advertised, KVM will behave more correctly, not using the XEN_RUNSTATE_UPDATE flag until/unless specifically enabled (by the guest making the hypercall, causing the VMM to enable the KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG attribute).}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hThe KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE flag indicates that KVM supports clearing the PVCLOCK_TSC_STABLE_BIT flag in Xen pvclock sources. This will be done when the KVM_CAP_XEN_HVM ioctl sets the KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE flag.h]hThe KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE flag indicates that KVM supports clearing the PVCLOCK_TSC_STABLE_BIT flag in Xen pvclock sources. This will be done when the KVM_CAP_XEN_HVM ioctl sets the KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE flag.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*#hjhhubeh}(h]kvm-cap-xen-hvmah ]h"]8.30 kvm_cap_xen_hvmah$]h&]uh1hhjhhhhhM"ubh)}(hhh](h)}(h8.31 KVM_CAP_SPAPR_MULTITCEh]h8.31 KVM_CAP_SPAPR_MULTITCE}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghhhhhM0#ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj{hhhKubjy)}(hppch]h)}(hjh]hppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2#hjubah}(h]h ]h"]h$]h&]uh1jxhj{ubeh}(h]h ]h"]h$]h&]uh1jchhhM2#hjxhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3#hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM3#hjxhhubeh}(h]h ]h"]h$]h&]uh1j^hjghhhhhM2#ubh)}(hXThis capability means the kernel is capable of handling hypercalls H_PUT_TCE_INDIRECT and H_STUFF_TCE without passing those into the user space. This significantly accelerates DMA operations for PPC KVM guests. User space should expect that its handlers for these hypercalls are not going to be called if user space previously registered LIOBN in KVM (via KVM_CREATE_SPAPR_TCE or similar calls).h]hXThis capability means the kernel is capable of handling hypercalls H_PUT_TCE_INDIRECT and H_STUFF_TCE without passing those into the user space. This significantly accelerates DMA operations for PPC KVM guests. User space should expect that its handlers for these hypercalls are not going to be called if user space previously registered LIOBN in KVM (via KVM_CREATE_SPAPR_TCE or similar calls).}(hjޝhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5#hjghhubh)}(hX In order to enable H_PUT_TCE_INDIRECT and H_STUFF_TCE use in the guest, user space might have to advertise it for the guest. For example, IBM pSeries (sPAPR) guest starts using them if "hcall-multi-tce" is present in the "ibm,hypertas-functions" device-tree property.h]hXIn order to enable H_PUT_TCE_INDIRECT and H_STUFF_TCE use in the guest, user space might have to advertise it for the guest. For example, IBM pSeries (sPAPR) guest starts using them if “hcall-multi-tce” is present in the “ibm,hypertas-functions” device-tree property.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<#hjghhubh)}(hXThe hypercalls mentioned above may or may not be processed successfully in the kernel based fast path. If they can not be handled by the kernel, they will get passed on to user space. So user space still has to have an implementation for these despite the in kernel acceleration.h]hXThe hypercalls mentioned above may or may not be processed successfully in the kernel based fast path. If they can not be handled by the kernel, they will get passed on to user space. So user space still has to have an implementation for these despite the in kernel acceleration.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMA#hjghhubh)}(h"This capability is always enabled.h]h"This capability is always enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF#hjghhubeh}(h]kvm-cap-spapr-multitceah ]h"]8.31 kvm_cap_spapr_multitceah$]h&]uh1hhjhhhhhM0#ubh)}(hhh](h)}(h8.32 KVM_CAP_PTP_KVMh]h8.32 KVM_CAP_PTP_KVM}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMI#ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj2hhhKubjy)}(harm64 h]h)}(harm64h]harm64}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMK#hjCubah}(h]h ]h"]h$]h&]uh1jxhj2ubeh}(h]h ]h"]h$]h&]uh1jchhhMK#hj/hhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhMK#ubh)}(hThis capability indicates that the KVM virtual PTP service is supported in the host. A VMM can check whether the service is available to the guest on migration.h]hThis capability indicates that the KVM virtual PTP service is supported in the host. A VMM can check whether the service is available to the guest on migration.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM#hjhhubeh}(h]kvm-cap-ptp-kvmah ]h"]8.32 kvm_cap_ptp_kvmah$]h&]uh1hhjhhhhhMI#ubh)}(hhh](h)}(h 8.37 KVM_CAP_S390_PROTECTED_DUMPh]h 8.37 KVM_CAP_S390_PROTECTED_DUMP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hhhhhMR#ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMT#hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMT#hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjžhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjԞhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMU#hjОubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMU#hjhhubeh}(h]h ]h"]h$]h&]uh1j^hj}hhhhhMT#ubh)}(hXBThis capability indicates that KVM and the Ultravisor support dumping PV guests. The `KVM_PV_DUMP` command is available for the `KVM_S390_PV_COMMAND` ioctl and the `KVM_PV_INFO` command provides dump related UV data. Also the vcpu ioctl `KVM_S390_PV_CPU_COMMAND` is available and supports the `KVM_PV_DUMP_CPU` subcommand.h](hUThis capability indicates that KVM and the Ultravisor support dumping PV guests. The }(hjhhhNhNubjz,)}(h `KVM_PV_DUMP`h]h KVM_PV_DUMP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjubh command is available for the }(hjhhhNhNubjz,)}(h`KVM_S390_PV_COMMAND`h]hKVM_S390_PV_COMMAND}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjubh ioctl and the }(hjhhhNhNubjz,)}(h `KVM_PV_INFO`h]h KVM_PV_INFO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjubh< command provides dump related UV data. Also the vcpu ioctl }(hjhhhNhNubjz,)}(h`KVM_S390_PV_CPU_COMMAND`h]hKVM_S390_PV_CPU_COMMAND}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjubh is available and supports the }(hjhhhNhNubjz,)}(h`KVM_PV_DUMP_CPU`h]hKVM_PV_DUMP_CPU}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjubh subcommand.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMW#hj}hhubeh}(h]kvm-cap-s390-protected-dumpah ]h"] 8.37 kvm_cap_s390_protected_dumpah$]h&]uh1hhjhhhhhMR#ubh)}(hhh](h)}(h8.39 KVM_CAP_S390_CPU_TOPOLOGYh]h8.39 KVM_CAP_S390_CPU_TOPOLOGY}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhhhhhM^#ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjxhhhKubjy)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`#hjubah}(h]h ]h"]h$]h&]uh1jxhjxubeh}(h]h ]h"]h$]h&]uh1jchhhM`#hjuhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa#hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMa#hjuhhubeh}(h]h ]h"]h$]h&]uh1j^hjdhhhhhM`#ubh)}(hX<This capability indicates that KVM will provide the S390 CPU Topology facility which consist of the interpretation of the PTF instruction for the function code 2 along with interception and forwarding of both the PTF instruction with function codes 0 or 1 and the STSI(15,1,x) instruction to the userland hypervisor.h]hX<This capability indicates that KVM will provide the S390 CPU Topology facility which consist of the interpretation of the PTF instruction for the function code 2 along with interception and forwarding of both the PTF instruction with function codes 0 or 1 and the STSI(15,1,x) instruction to the userland hypervisor.}(hj۟hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc#hjdhhubh)}(hkThe stfle facility 11, CPU Topology facility, should not be indicated to the guest without this capability.h]hkThe stfle facility 11, CPU Topology facility, should not be indicated to the guest without this capability.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi#hjdhhubh)}(hWhen this capability is present, KVM provides a new attribute group on vm fd, KVM_S390_VM_CPU_TOPOLOGY. This new attribute allows to get, set or clear the Modified Change Topology Report (MTCR) bit of the SCA through the kvm_device_attr structure.h]hWhen this capability is present, KVM provides a new attribute group on vm fd, KVM_S390_VM_CPU_TOPOLOGY. This new attribute allows to get, set or clear the Modified Change Topology Report (MTCR) bit of the SCA through the kvm_device_attr structure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl#hjdhhubh)}(hWhen getting the Modified Change Topology Report value, the attr->addr must point to a byte where the value will be stored or retrieved from.h]hWhen getting the Modified Change Topology Report value, the attr->addr must point to a byte where the value will be stored or retrieved from.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr#hjdhhubeh}(h]kvm-cap-s390-cpu-topologyah ]h"]8.39 kvm_cap_s390_cpu_topologyah$]h&]uh1hhjhhhhhM^#ubh)}(hhh](h)}(h8.41 KVM_CAP_VM_TYPESh]h8.41 KVM_CAP_VM_TYPES}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMv#ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj/hhhKubjy)}(hx86h]h)}(hjBh]hx86}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMx#hj@ubah}(h]h ]h"]h$]h&]uh1jxhj/ubeh}(h]h ]h"]h$]h&]uh1jchhhMx#hj,hhubjd)}(hhh](ji)}(hTypeh]hType}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj]hhhKubjy)}(h system ioctl h]h)}(h system ioctlh]h system ioctl}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMy#hjnubah}(h]h ]h"]h$]h&]uh1jxhj]ubeh}(h]h ]h"]h$]h&]uh1jchhhMy#hj,hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMx#ubh)}(hThis capability returns a bitmap of support VM types. The 1-setting of bit @n means the VM type with value @n is supported. Possible values of @n are::h]hThis capability returns a bitmap of support VM types. The 1-setting of bit @n means the VM type with value @n is supported. Possible values of @n are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{#hjhhubj$)}(h#define KVM_X86_DEFAULT_VM 0 #define KVM_X86_SW_PROTECTED_VM 1 #define KVM_X86_SEV_VM 2 #define KVM_X86_SEV_ES_VM 3h]h#define KVM_X86_DEFAULT_VM 0 #define KVM_X86_SW_PROTECTED_VM 1 #define KVM_X86_SEV_VM 2 #define KVM_X86_SEV_ES_VM 3}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM~#hjhhubh)}(hNote, KVM_X86_SW_PROTECTED_VM is currently only for development and testing. Do not use KVM_X86_SW_PROTECTED_VM for "real" VMs, and especially not in production. The behavior and effective ABI for software-protected VMs is unstable.h]hNote, KVM_X86_SW_PROTECTED_VM is currently only for development and testing. Do not use KVM_X86_SW_PROTECTED_VM for “real” VMs, and especially not in production. The behavior and effective ABI for software-protected VMs is unstable.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubeh}(h]kvm-cap-vm-typesah ]h"]8.41 kvm_cap_vm_typesah$]h&]uh1hhjhhhhhMv#ubh)}(hhh](h)}(h8.42 KVM_CAP_PPC_RPT_INVALIDATEh]h8.42 KVM_CAP_PPC_RPT_INVALIDATE}(hjǠhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjĠhhhhhM#ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj۠hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjؠhhhKubjy)}(hppc h]h)}(hppch]hppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jxhjؠubeh}(h]h ]h"]h$]h&]uh1jchhhM#hjՠhhubah}(h]h ]h"]h$]h&]uh1j^hjĠhhhhhM#ubh)}(hXThis capability indicates that the kernel is capable of handling H_RPT_INVALIDATE hcall.h]hXThis capability indicates that the kernel is capable of handling H_RPT_INVALIDATE hcall.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjĠhhubh)}(hXIn order to enable the use of H_RPT_INVALIDATE in the guest, user space might have to advertise it for the guest. For example, IBM pSeries (sPAPR) guest starts using it if "hcall-rpt-invalidate" is present in the "ibm,hypertas-functions" device-tree property.h]hX In order to enable the use of H_RPT_INVALIDATE in the guest, user space might have to advertise it for the guest. For example, IBM pSeries (sPAPR) guest starts using it if “hcall-rpt-invalidate” is present in the “ibm,hypertas-functions” device-tree property.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjĠhhubh)}(h[This capability is enabled for hypervisors on platforms like POWER9 that support radix MMU.h]h[This capability is enabled for hypervisors on platforms like POWER9 that support radix MMU.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjĠhhubeh}(h]kvm-cap-ppc-rpt-invalidateah ]h"]8.42 kvm_cap_ppc_rpt_invalidateah$]h&]uh1hhjhhhhhM#ubh)}(hhh](h)}(h8.43 KVM_CAP_PPC_AIL_MODE_3h]h8.43 KVM_CAP_PPC_AIL_MODE_3}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hhhhhM#ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjShhhKubjy)}(hppc h]h)}(hppch]hppc}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjdubah}(h]h ]h"]h$]h&]uh1jxhjSubeh}(h]h ]h"]h$]h&]uh1jchhhM#hjPhhubah}(h]h ]h"]h$]h&]uh1j^hj?hhhhhM#ubh)}(hThis capability indicates that the kernel supports the mode 3 setting for the "Address Translation Mode on Interrupt" aka "Alternate Interrupt Location" resource that is controlled with the H_SET_MODE hypercall.h]hThis capability indicates that the kernel supports the mode 3 setting for the “Address Translation Mode on Interrupt” aka “Alternate Interrupt Location” resource that is controlled with the H_SET_MODE hypercall.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj?hhubh)}(hpThis capability allows a guest kernel to use a better-performance mode for handling interrupts and system calls.h]hpThis capability allows a guest kernel to use a better-performance mode for handling interrupts and system calls.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj?hhubeh}(h]kvm-cap-ppc-ail-mode-3ah ]h"]8.43 kvm_cap_ppc_ail_mode_3ah$]h&]uh1hhjhhhhhM#ubh)}(hhh](h)}(h8.44 KVM_CAP_MEMORY_FAULT_INFOh]h8.44 KVM_CAP_MEMORY_FAULT_INFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM#ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjáhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjաhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjѡubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM#hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM#ubh)}(hThe presence of this capability indicates that KVM_RUN will fill kvm_run.memory_fault if KVM cannot resolve a guest page fault VM-Exit, e.g. if there is a valid memslot but no backing VMA for the corresponding host virtual address.h]hThe presence of this capability indicates that KVM_RUN will fill kvm_run.memory_fault if KVM cannot resolve a guest page fault VM-Exit, e.g. if there is a valid memslot but no backing VMA for the corresponding host virtual address.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hThe information in kvm_run.memory_fault is valid if and only if KVM_RUN returns an error with errno=EFAULT or errno=EHWPOISON *and* kvm_run.exit_reason is set to KVM_EXIT_MEMORY_FAULT.h](h~The information in kvm_run.memory_fault is valid if and only if KVM_RUN returns an error with errno=EFAULT or errno=EHWPOISON }(hjhhhNhNubjn)}(h*and*h]hand}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubh5 kvm_run.exit_reason is set to KVM_EXIT_MEMORY_FAULT.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hNote: Userspaces which attempt to resolve memory faults so that they can retry KVM_RUN are encouraged to guard against repeatedly receiving the same error/annotated fault.h]hNote: Userspaces which attempt to resolve memory faults so that they can retry KVM_RUN are encouraged to guard against repeatedly receiving the same error/annotated fault.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(h/See KVM_EXIT_MEMORY_FAULT for more information.h]h/See KVM_EXIT_MEMORY_FAULT for more information.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubeh}(h]kvm-cap-memory-fault-infoah ]h"]8.44 kvm_cap_memory_fault_infoah$]h&]uh1hhjhhhhhM#ubh)}(hhh](h)}(h8.45 KVM_CAP_X86_GUEST_MODEh]h8.45 KVM_CAP_X86_GUEST_MODE}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhM#ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj[hhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjlubah}(h]h ]h"]h$]h&]uh1jxhj[ubeh}(h]h ]h"]h$]h&]uh1jchhhM#hjXhhubah}(h]h ]h"]h$]h&]uh1j^hjGhhhhhM#ubh)}(hThe presence of this capability indicates that KVM_RUN will update the KVM_RUN_X86_GUEST_MODE bit in kvm_run.flags to indicate whether the vCPU was executing nested guest code when it exited.h]hThe presence of this capability indicates that KVM_RUN will update the KVM_RUN_X86_GUEST_MODE bit in kvm_run.flags to indicate whether the vCPU was executing nested guest code when it exited.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjGhhubh)}(hKVM exits with the register state of either the L1 or L2 guest depending on which executed at the time of an exit. Userspace must take care to differentiate between these cases.h]hKVM exits with the register state of either the L1 or L2 guest depending on which executed at the time of an exit. Userspace must take care to differentiate between these cases.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjGhhubeh}(h]kvm-cap-x86-guest-modeah ]h"]8.45 kvm_cap_x86_guest_modeah$]h&]uh1hhjhhhhhM#ubeh}(h]other-capabilitiesah ]h"]8. other capabilities.ah$]h&]uh1hhhhhhhhM!ubh)}(hhh](h)}(h9. Known KVM API problemsh]h9. Known KVM API problems}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM#ubh)}(hIn some cases, KVM's API has some inconsistencies or common pitfalls that userspace need to be aware of. This section details some of these issues.h]hIn some cases, KVM’s API has some inconsistencies or common pitfalls that userspace need to be aware of. This section details some of these issues.}(hj͢hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hPMost of them are architecture specific, so the section is split by architecture.h]hPMost of them are architecture specific, so the section is split by architecture.}(hjۢhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hhh](h)}(h9.1. x86h]h9.1. x86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM#ubh)}(hhh](h)}(h"``KVM_GET_SUPPORTED_CPUID`` issuesh](j)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh issues}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhM#ubh)}(hIn general, ``KVM_GET_SUPPORTED_CPUID`` is designed so that it is possible to take its result and pass it directly to ``KVM_SET_CPUID2``. This section documents some cases in which that requires some care.h](h In general, }(hjhhhNhNubj)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhO is designed so that it is possible to take its result and pass it directly to }(hjhhhNhNubj)}(h``KVM_SET_CPUID2``h]hKVM_SET_CPUID2}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhF. This section documents some cases in which that requires some care.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(hhh](h)}(hLocal APIC featuresh]hLocal APIC features}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhhhhhM#ubh)}(hCPU[EAX=1]:ECX[21] (X2APIC) is reported by ``KVM_GET_SUPPORTED_CPUID``, but it can only be enabled if ``KVM_CREATE_IRQCHIP`` or ``KVM_ENABLE_CAP(KVM_CAP_IRQCHIP_SPLIT)`` are used to enable in-kernel emulation of the local APIC.h](h+CPU[EAX=1]:ECX[21] (X2APIC) is reported by }(hj\hhhNhNubj)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh , but it can only be enabled if }(hj\hhhNhNubj)}(h``KVM_CREATE_IRQCHIP``h]hKVM_CREATE_IRQCHIP}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh or }(hj\hhhNhNubj)}(h)``KVM_ENABLE_CAP(KVM_CAP_IRQCHIP_SPLIT)``h]h%KVM_ENABLE_CAP(KVM_CAP_IRQCHIP_SPLIT)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh: are used to enable in-kernel emulation of the local APIC.}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hjKhhubh)}(hKThe same is true for the ``KVM_FEATURE_PV_UNHALT`` paravirtualized feature.h](hThe same is true for the }(hjhhhNhNubj)}(h``KVM_FEATURE_PV_UNHALT``h]hKVM_FEATURE_PV_UNHALT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh paravirtualized feature.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hjKhhubh)}(hXCOn older versions of Linux, CPU[EAX=1]:ECX[24] (TSC_DEADLINE) is not reported by ``KVM_GET_SUPPORTED_CPUID``, but it can be enabled if ``KVM_CAP_TSC_DEADLINE_TIMER`` is present and the kernel has enabled in-kernel emulation of the local APIC. On newer versions, ``KVM_GET_SUPPORTED_CPUID`` does report the bit as available.h](hQOn older versions of Linux, CPU[EAX=1]:ECX[24] (TSC_DEADLINE) is not reported by }(hjhhhNhNubj)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hjȣhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, but it can be enabled if }(hjhhhNhNubj)}(h``KVM_CAP_TSC_DEADLINE_TIMER``h]hKVM_CAP_TSC_DEADLINE_TIMER}(hjڣhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubha is present and the kernel has enabled in-kernel emulation of the local APIC. On newer versions, }(hjhhhNhNubj)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh" does report the bit as available.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hjKhhubeh}(h]local-apic-featuresah ]h"]local apic featuresah$]h&]uh1hhjhhhhhM#ubh)}(hhh](h)}(h CPU topologyh]h CPU topology}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM#ubh)}(hXSeveral CPUID values include topology information for the host CPU: 0x0b and 0x1f for Intel systems, 0x8000001e for AMD systems. Different versions of KVM return different values for this information and userspace should not rely on it. Currently they return all zeroes.h]hXSeveral CPUID values include topology information for the host CPU: 0x0b and 0x1f for Intel systems, 0x8000001e for AMD systems. Different versions of KVM return different values for this information and userspace should not rely on it. Currently they return all zeroes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj hhubh)}(hXCIf userspace wishes to set up a guest topology, it should be careful that the values of these three leaves differ for each CPU. In particular, the APIC ID is found in EDX for all subleaves of 0x0b and 0x1f, and in EAX for 0x8000001e; the latter also encodes the core id and node id in bits 7:0 of EBX and ECX respectively.h]hXCIf userspace wishes to set up a guest topology, it should be careful that the values of these three leaves differ for each CPU. In particular, the APIC ID is found in EDX for all subleaves of 0x0b and 0x1f, and in EAX for 0x8000001e; the latter also encodes the core id and node id in bits 7:0 of EBX and ECX respectively.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj hhubeh}(h] cpu-topologyah ]h"] cpu topologyah$]h&]uh1hhjhhhhhM#ubeh}(h]kvm-get-supported-cpuid-issuesah ]h"]kvm_get_supported_cpuid issuesah$]h&]uh1hhjhhhhhM#ubh)}(hhh](h)}(h Obsolete ioctls and capabilitiesh]h Obsolete ioctls and capabilities}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhhhhhM#ubh)}(hKVM_CAP_DISABLE_QUIRKS does not let userspace know which quirks are actually available. Use ``KVM_CHECK_EXTENSION(KVM_CAP_DISABLE_QUIRKS2)`` instead if available.h](h]KVM_CAP_DISABLE_QUIRKS does not let userspace know which quirks are actually available. Use }(hjZhhhNhNubj)}(h0``KVM_CHECK_EXTENSION(KVM_CAP_DISABLE_QUIRKS2)``h]h,KVM_CHECK_EXTENSION(KVM_CAP_DISABLE_QUIRKS2)}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh instead if available.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hjIhhubeh}(h] obsolete-ioctls-and-capabilitiesah ]h"] obsolete ioctls and capabilitiesah$]h&]uh1hhjhhhhhM#ubh)}(hhh](h)}(h&Ordering of KVM_GET_*/KVM_SET_* ioctlsh]h&Ordering of KVM_GET_*/KVM_SET_* ioctls}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM#ubh)}(hTBDh]hTBD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjhhubeh}(h]"ordering-of-kvm-get-kvm-set-ioctlsah ]h"]&ordering of kvm_get_*/kvm_set_* ioctlsah$]h&]uh1hhjhhhhhM#ubeh}(h]id25ah ]h"]9.1. x86ah$]h&]uh1hhjhhhhhM#ubeh}(h]known-kvm-api-problemsah ]h"]9. known kvm api problemsah$]h&]uh1hhhhhhhhM#ubeh}(h]Athe-definitive-kvm-kernel-based-virtual-machine-api-documentationah ]h"]Cthe definitive kvm (kernel-based virtual machine) api documentationah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjofootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(1](jNjšjte2]j_aurefids}(jL]jAaj6 ]j, aj:9]j09aj]jaj?E]j5EajO]jNaj[]j[aj8k]j.kajCk]j9kajIx]j9xaunameids}(jjjCj@jjjjjOj OjjjLjijfj,j)x86:Ns390:Nmips:Narm64:Nj< j9 jb j6 ja j^ j j jQjNjjjjjjj%j"jXjUjojljjjjj$j!jjjjj`j]jjj3 j0 jf!jc!j"j"j#j#j$j$jG'jD'jl(ji(j)j)j*j*j-j-j.j.j%1j"1j3j3j"5j5jG6jD6j8j 8j@9j=9j;j:9j;j;j @j @ for arm64:Nj@j@jfAjcAj^Aj[AjBjBjCjCjDjDj(Fj%FjMGjJGjrHjoHj=Kj:KjLjLjNjNjOjOjPjPj>Rj;RjqSjnSjTjTjYVjVVjWjWjbYj_YjZjZj[j[j\j\jjj̣j]jդjnjjjܾjپjUjRjjjjjBj?jjjOjLjjjjjpjmjujrj_j\jjjjjjjtjqjjjjjjjTjQjjjj}jjjjjCj@jxjujjjjj jjYjVjjjjjjjjjjjYjVjjjmjjjjjjjjj9j6jjjYjVj j j j j j j% j" jjj>j;jUjRjjjjjvjsjjj\jYj7j4jM jJ jc!j`!jy"jv"j,)j))j+j+j,j,j/j/j1j1jB3j?3j4j4j5j5jO>jL>j?j?j@j@jBj}BjCjCjEEjBEjlGj?EjkGjhGjcGj`GjHjHj%Jj"JjtKjqKjOjOj+[jOj*[j'[j"[j[jUkj[jTkjQkjR]jO]je^jb^j(`j%`j;aj8ajNbjKbjbjbjcjcjQdjNdj0ej-ejfj fjgjgjdhjahjhjhjijijjjjjjjjjLkjIkjEkj8kjjCkjjjljlj njnjnjnj{ojxojRpjOpjpjpjqjqj_rj\rjsjsjsjsj4tj1tjtjtjujujovjlvjvjvjwjwjxjxj`yj]yjyjyjzjzj|j|j}j}j~j~jjjjj;j8j:j7j1j.jzjwjqjnjjjjj̋jɋjߌj܌jjjjjjj-j*j$j!j j jjjjjjjTjQjljijjj_j\jjjjj|jyjۗjؗj:j7jjjjjWjTjęjj#j jjjjޚj@j=jjjjjjjdjajjjzjwjaj^jjjjj<j9jjjDjAjjjjjjjFjCj jj>j;jj|jjjxjIxu nametypes}(jjCjjjOjjjij,j5j6j7j8j< jb ja j jQjjjj%jXjojjj$jjj`jj3 jf!j"j#j$jG'jl(j)j*j-j.j%1j3j"5jG6j8j@9j;j;j @j9j@jfAj^AjBjCjDj(FjMGjrHj=KjLjNjOjPj>RjqSjTjYVjWjbYjZj[j\jj̣jդjjܾjUjjjBjjOjjjpjuj_jjjjtjjjjTjjjjjCjxjjj jYjjjjjjYjjmjjjj9jjYj j j j% jj>jUjjjvjj\j7jM jc!jy"j,)j+j,j/j1jB3j4j5jO>j?j@jBjCjEEjlGjkGjcGjHj%JjtKjOj+[j*[j"[jUkjTkjR]je^j(`j;ajNbjbjcjQdj0ejfjgjdhjhjijjjjjLkjEkjjjlj njnj{ojRpjpjqj_rjsjsj4tjtjujovjvjwjxj`yjyjzj|j}j~jjj;j:j1jzjqjjj̋jߌjjjj-j$j jjjjTjljj_jjj|jۗj:jjjWjęj#jjj@jjjjdjjzjajjj<jjDjjjjFj j>jjjxuh}(jhj@hjjFjjj OjjLjMjfjMj)jqjjjjjjj!jj9 j/j6 j? j^ j? j jg jNj jjTjjjjj"jjUj(jlj[jjrjjjAjj!jFjVj'jj[jjj]j"jjcj0 jjc!j6 j"ji!j#j"j$j#jD'j$ji(jJ'j)jo(j*j)j-j*j.j -j"1j.j0j/j1j0j3j(1j3jW2j3j3j5j4jD6j%5j 8jJ6j8j7j=9j8j:9jC9j;jC9j @j;j?ju?j@j?jcAj@j[Aj,AjBjiAjCjBjDjCj%FjDjJGj+FjoHjPGj:KjuHjLj@KjNjLjOjNjPjOj;RjQjnSjARjTjtSjVVjTjWj\Vj_YjWjZjeYj[jZj\j[jj\jXjNjϡjšj~jtj]jtjij_jnjjjjپjjRj߾jjXjjj?j jjEjLjjjRjjjmjjrjsj\jxjjbjjjjjqjjjwjj jjjQjjjWj}jjj=jj"j@jjujFjjjjjj!jVj jj\jjjjjjjjjVjjj\jjjjjpjjjjj6jjj<jVjj j\j j j j j" j jj( j;jjRjAjjXjjjsjjjyjYjj4j_jJ j:j`!jP jv"jf!j))j|"j+j/)j,j+j/j,j1j/j?3j"1j4jE3j5j4jL>j5j?jR>j@j?j}Bj@jCjBjBEjCj?EjHEjhGjHEj`GjFjHjqGjHjHj"JjHjqKj(JjOjwKjOjOj'[jOj=UjaQj[jBUj[j0[jQkj0[jO]j^\jb^jU]j%`jh^j8aj+`jKbj>ajbjQbjcjbjNdjcj-ejTdj fj3ejgjfjahjgjhjghjijijjjijjjjjIkjjj8kjZkjCkjZkjjZkjljKljnjljnj njxojnjOpj~ojpjUpjqjpj\rjqjsjbrjsjsj1tjsjtj7tjujtjlvjujvjrvjwjvjxjwjCxj9xjIxjbxj]yjxjyjcyjzjyj|jzj}j|j~j}jj~jjj8jj7j>j.j=jwj4jnj}jjtjjjɋjj܌jϋjjjjjjj*jj!j0j j'jjjj:jjjQjjijWjjoj\jjjbjjjyj jؗjj7jޗjj=jjjTjjjZj jǙjj&jޚjj=jjjCjjjjjajjjgjwjj^j}jjdjjj9jĠjj?jAjjjGjjjjjCjjjKj;j j|jIjju footnote_refs}(j#](jNjšjtej%]j_au citation_refs} autofootnotes]jbxaautofootnote_refs]j9xasymbol_footnotes]symbol_footnote_refs] footnotes](jtje citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages](hsystem_message)}(hhh]h)}(h'Duplicate implicit target name: "x86:".h]h+Duplicate implicit target name: “x86:”.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ubah}(h]h ]h"]h$]h&]jAalevelKtypeINFOsourcehlineM4uh1jZhjhhhhhM4ubj[)}(hhh]h)}(h(Duplicate implicit target name: "mips:".h]h,Duplicate implicit target name: “mips:”.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxubah}(h]h ]h"]h$]h&]jValevelKtypejusourcehlineMbuh1jZhj'hhhhhMbubj[)}(hhh]h)}(h'Duplicate implicit target name: "x86:".h]h+Duplicate implicit target name: “x86:”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]j0alevelKtypejusourcehlineMnuh1jZhj/hhhhhMnubj[)}(hhh]h)}(h)Duplicate implicit target name: "arm64:".h]h-Duplicate implicit target name: “arm64:”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]j1alevelKtypejusourcehlineMuh1jZhj0hhhhhMubj[)}(hhh]h)}(h'Duplicate implicit target name: "x86:".h]h+Duplicate implicit target name: “x86:”.}(hj̥hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjɥubah}(h]h ]h"]h$]h&]j3alevelKtypejusourcehlineMuh1jZhjW2hhhhhMubj[)}(hhh]h)}(h)Duplicate implicit target name: "arm64:".h]h-Duplicate implicit target name: “arm64:”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]j3alevelKtypejusourcehlineM uh1jZhj3hhhhhM ubj[)}(hhh]h)}(h(Duplicate implicit target name: "s390:".h]h,Duplicate implicit target name: “s390:”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]j8alevelKtypejusourcehlineMuh1jZhj7hhhhhMubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejulineMF sourcehuh1jZhjbjubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]levelKtypejulineMI sourcehuh1jZhj0kubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPubah}(h]h ]h"]h$]h&]levelKtypejulineML sourcehuh1jZhjkubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkubah}(h]h ]h"]h$]h&]levelKtypejulineM sourcehuh1jZhjnubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejulineM sourcehuh1jZhj<ubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejulineM sourcehuh1jZhjdubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejulineM sourcehuh1jZhjjubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjڦhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjצubah}(h]h ]h"]h$]h&]levelKtypejulineM& sourcehuh1jZhjubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejulineM= sourcehuh1jZhjubj[)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypejulineMN sourcehuh1jZhjnubj[)}(hhh]h)}(h(Duplicate implicit target name: "s390:".h]h,Duplicate implicit target name: “s390:”.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]jHalevelKtypejusourcehlineMuh1jZhjHhhhhhMubj[)}(hhh]h)}(h-Duplicate implicit target name: "for arm64:".h]h1Duplicate implicit target name: “for arm64:”.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]j=UalevelKtypejusourcehlineMuh1jZhjaQhhhhhMubetransform_messages](j[)}(hhh]h)}(hhh]h9Hyperlink target "kvm-get-api-version" is not referenced.}hjcsbah}(h]h ]h"]h$]h&]uh1hhj`ubah}(h]h ]h"]h$]h&]levelKtypejusourcehlineKuh1jZubj[)}(hhh]h)}(hhh]h9Hyperlink target "kvm-check-extension" is not referenced.}hj}sbah}(h]h ]h"]h$]h&]uh1hhjzubah}(h]h ]h"]h$]h&]levelKtypejusourcehlineMuh1jZubj[)}(hhh]h)}(hhh]h4Hyperlink target "kvm-enable-cap" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejusourcehlineMuh1jZubj[)}(hhh]h)}(hhh]h7Hyperlink target "kvm-arm-vcpu-init" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejusourcehlineMp uh1jZubj[)}(hhh]h)}(hhh]hDHyperlink target "kvm-arm-get-reg-writable-masks" is not referenced.}hj˧sbah}(h]h ]h"]h$]h&]uh1hhjȧubah}(h]h ]h"]h$]h&]levelKtypejusourcehlineM_uh1jZubj[)}(hhh]h)}(hhh]h*Hyperlink target "id20" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejusourcehlineMPuh1jZubj[)}(hhh]h)}(hhh]h0Hyperlink target "cap-enable" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejusourcehlineMquh1jZubj[)}(hhh]h)}(hhh]h