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)}(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}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8hhhKubjy)}(hKVM_CAP_SET_TSS_ADDRh]h)}(hj,8h]hKVM_CAP_SET_TSS_ADDR}(hj.8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*8ubah}(h]h ]h"]h$]h&]uh1jxhj8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj8hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjJ8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjG8hhhKubjy)}(hx86h]h)}(hjZ8h]hx86}(hj\8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjX8ubah}(h]h ]h"]h$]h&]uh1jxhjG8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj8hhubjd)}(hhh](ji)}(hTypeh]hType}(hjx8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhju8hhhKubjy)}(hvm ioctlh]h)}(hj8h]hvm ioctl}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8ubah}(h]h ]h"]h$]h&]uh1jxhju8ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj8hhubjd)}(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&]uh1jchhhMhj8hhubjd)}(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&]uh1jchhhMhj8hhubeh}(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).}(hj9hhhNhNubah}(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}(hj89hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj59hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjL9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjI9hhhKubjy)}(hKVM_CAP_ENABLE_CAPh]h)}(hj\9h]hKVM_CAP_ENABLE_CAP}(hj^9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ9ubah}(h]h ]h"]h$]h&]uh1jxhjI9ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjF9hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjz9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjw9hhhKubjy)}(hmips, ppc, s390, x86, loongarchh]h)}(hj9h]hmips, ppc, s390, x86, loongarch}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jxhjw9ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjF9hhubjd)}(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&]uh1jchhhMhjF9hhubjd)}(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&]uh1jchhhMhjF9hhubjd)}(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&]uh1jchhhMhjF9hhubjd)}(hhh](ji)}(h Capabilityh]h Capability}(hj3:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0:hhhKubjy)}(hKVM_CAP_ENABLE_CAP_VMh]h)}(hjC:h]hKVM_CAP_ENABLE_CAP_VM}(hjE:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjA:ubah}(h]h ]h"]h$]h&]uh1jxhj0:ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjF9hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hja:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj^:hhhKubjy)}(hallh]h)}(hjq:h]hall}(hjs:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo:ubah}(h]h ]h"]h$]h&]uh1jxhj^:ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjF9hhubjd)}(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&]uh1jchhhMhjF9hhubjd)}(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&]uh1jchhhMhjF9hhubjd)}(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&]uh1jchhhMhjF9hhubeh}(h]h ]h"]h$]h&]uh1j^hj59hhhhhMubhnote)}(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.}(hj#;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1j;hj59hhhhhNubh)}(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.}(hj7;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj59hhubh)}(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.}(hjE;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj59hhubj$)}(h5struct kvm_enable_cap { /* in */ __u32 cap;h]h5struct kvm_enable_cap { /* in */ __u32 cap;}hjS;sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj59hhubh)}(h/The capability that is supposed to get enabled.h]h/The capability that is supposed to get enabled.}(hja;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj59hhubj$)}(h __u32 flags;h]h __u32 flags;}hjo;sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj59hhubh)}(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&]uh1hhhhMhj59hhubj$)}(h__u64 args[4];h]h__u64 args[4];}hj;sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj59hhubh)}(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&]uh1hhhhMhj59hhubj$)}(h __u8 pad[64]; };h]h __u8 pad[64]; };}hj;sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj59hhubh)}(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&]uh1hhhhMhj59hhubeh}(h](j,9id10eh ]h"](4.37 kvm_enable_capkvm_enable_capeh$]h&]uh1hhjhhhhhMjm}j;j"9sjo}j,9j"9subh)}(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)}(hj#<h]h"x86, s390, arm64, riscv, loongarch}(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}(hjA<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj><hhhKubjy)}(h vcpu ioctlh]h)}(hjQ<h]h vcpu ioctl}(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 Parametersh]h Parameters}(hjo<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjl<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&]uh1jxhjl<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]}(hj7=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4=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}(hjW=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjT=ubah}(h]h ]h"]h$]h&]uh1johjQ=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]}(hjn=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjk=ubah}(h]h ]h"]h$]h&]uh1johjQ=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}(hj3>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0>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]}(hjJ>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjG>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}(hjj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjg>ubah}(h]h ]h"]h$]h&]uh1johjd>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&]uh1johjd>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&]uh1hhhhMhj ?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]}(hj&?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#?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.}(hjY?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj;hhubh)}(hhh](h)}(h For arm64:h]h For arm64:}(hjj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjg?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.}(hjx?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjg?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&]uh1hhhhMhjg?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&]uh1hhhhMhj?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?hjg?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&]uh1hhhhM-hj?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&]uh1hhhhM0hj?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@hhhhhM4ubj_)}(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&]uh1hhhhM6hj&@ubah}(h]h ]h"]h$]h&]uh1jxhj@ubeh}(h]h ]h"]h$]h&]uh1jchhhM6hj@hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjF@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjC@hhhKubjy)}(h"x86, s390, arm64, riscv, loongarchh]h)}(hjV@h]h"x86, s390, arm64, riscv, loongarch}(hjX@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjT@ubah}(h]h ]h"]h$]h&]uh1jxhjC@ubeh}(h]h ]h"]h$]h&]uh1jchhhM7hj@hhubjd)}(hhh](ji)}(hTypeh]hType}(hjt@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjq@hhhKubjy)}(h vcpu ioctlh]h)}(hj@h]h vcpu ioctl}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj@ubah}(h]h ]h"]h$]h&]uh1jxhjq@ubeh}(h]h ]h"]h$]h&]uh1jchhhM8hj@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&]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)}(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@hhhhhM6ubh)}(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&]uh1hhhhM?hj@hhubh)}(hhh](h)}(hFor arm64/riscv:h]hFor arm64/riscv:}(hj!AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhMDubh)}(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&]uh1hhhhMFhjAhhubh)}(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=AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjAhhubeh}(h]for-arm64-riscvah ]h"]for arm64/riscv:ah$]h&]uh1hhj@hhhhhMDubeh}(h]kvm-set-mp-stateah ]h"]4.39 kvm_set_mp_stateah$]h&]uh1hhjhhhhhM4ubh)}(hhh](h)}(h4.40 KVM_SET_IDENTITY_MAP_ADDRh]h4.40 KVM_SET_IDENTITY_MAP_ADDR}(hj^AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[AhhhhhMMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjrAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjoAhhhKubjy)}(hKVM_CAP_SET_IDENTITY_MAP_ADDRh]h)}(hjAh]hKVM_CAP_SET_IDENTITY_MAP_ADDR}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjAubah}(h]h ]h"]h$]h&]uh1jxhjoAubeh}(h]h ]h"]h$]h&]uh1jchhhMOhjlAhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hx86h]h)}(hjAh]hx86}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjAubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMPhjlAhhubjd)}(hhh](ji)}(hTypeh]hType}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hvm ioctlh]h)}(hjAh]hvm ioctl}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjAubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMQhjlAhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hunsigned long identity (in)h]h)}(hj Bh]hunsigned long identity (in)}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj Bubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMRhjlAhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj*BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj'BhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjMubah}(h]h ]h"]h$]h&]uh1jxhj-Mubeh}(h]h ]h"]h$]h&]uh1jchhhMYhjLhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj^MhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj[MhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjpMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjlMubah}(h]h ]h"]h$]h&]uh1jxhj[Mubeh}(h]h ]h"]h$]h&]uh1jchhhMZhjLhhubeh}(h]h ]h"]h$]h&]uh1j^hjLhhhhhMVubh)}(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&]uh1hhhhM^hjLhhubh)}(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&]uh1hhhhM`hjMubah}(h]h ]h"]h$]h&]uh1jhjMhhhhhNubah}(h]h ]h"]h$]h&]jjuh1hhhhM`hjLhhubj$)}(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#hhhMdhjLhhubh)}(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&]uh1hhhhMjhjLhhubj$)}(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#hhhMnhjLhhubh)}(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.}(hjMhhhNhNubah}(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.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubah}(h]h ]h"]h$]h&]uh1jhjNhhhhhNubj)}(hzero otherwise h]h)}(hzero otherwiseh]hzero otherwise}(hj2NhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.Nubah}(h]h ]h"]h$]h&]uh1jhjNhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjLhhubj$)}(hstruct kvm_irq_routing_irqchip { __u32 irqchip; __u32 pin; }; struct kvm_irq_routing_msi { __u32 address_lo; __u32 address_hi; __u32 data; union { __u32 pad; __u32 devid; }; };h]hstruct kvm_irq_routing_irqchip { __u32 irqchip; __u32 pin; }; struct kvm_irq_routing_msi { __u32 address_lo; __u32 address_hi; __u32 data; union { __u32 pad; __u32 devid; }; };}hjLNsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjLhhubh)}(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.}(hjZNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLhhubh)}(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.}(hjhNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLhhubj$)}(hXOstruct kvm_irq_routing_s390_adapter { __u64 ind_addr; __u64 summary_addr; __u64 ind_offset; __u32 summary_offset; __u32 adapter_id; }; struct kvm_irq_routing_hv_sint { __u32 vcpu; __u32 sint; }; struct kvm_irq_routing_xen_evtchn { __u32 port; __u32 vcpu; __u32 priority; };h]hXOstruct kvm_irq_routing_s390_adapter { __u64 ind_addr; __u64 summary_addr; __u64 ind_offset; __u32 summary_offset; __u32 adapter_id; }; struct kvm_irq_routing_hv_sint { __u32 vcpu; __u32 sint; }; struct kvm_irq_routing_xen_evtchn { __u32 port; __u32 vcpu; __u32 priority; };}hjvNsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjLhhubh)}(hXhWhen KVM_CAP_XEN_HVM includes the KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL bit in its indication of supported features, routing to Xen event channels is supported. Although the priority field is present, only the value KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL is supported, which means delivery by 2 level event channels. FIFO event channel support may be added in the future.h]hXhWhen KVM_CAP_XEN_HVM includes the KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL bit in its indication of supported features, routing to Xen event channels is supported. Although the priority field is present, only the value KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL is supported, which means delivery by 2 level event channels. FIFO event channel support may be added in the future.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLhhubeh}(h]kvm-set-gsi-routingah ]h"]4.52 kvm_set_gsi_routingah$]h&]uh1hhjhhhhhMTubh)}(hhh](h)}(h4.55 KVM_SET_TSC_KHZh]h4.55 KVM_SET_TSC_KHZ}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNhhhKubjy)}(h,KVM_CAP_TSC_CONTROL / KVM_CAP_VM_TSC_CONTROLh]h)}(hjNh]h,KVM_CAP_TSC_CONTROL / KVM_CAP_VM_TSC_CONTROL}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubah}(h]h ]h"]h$]h&]uh1jxhjNubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNhhhKubjy)}(hx86h]h)}(hjNh]hx86}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubah}(h]h ]h"]h$]h&]uh1jxhjNubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubjd)}(hhh](ji)}(hTypeh]hType}(hj OhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj OhhhKubjy)}(hvcpu ioctl / vm ioctlh]h)}(hjOh]hvcpu ioctl / vm ioctl}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOubah}(h]h ]h"]h$]h&]uh1jxhj Oubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj;OhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8OhhhKubjy)}(hvirtual tsc_khzh]h)}(hjKOh]hvirtual tsc_khz}(hjMOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIOubah}(h]h ]h"]h$]h&]uh1jxhj8Oubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjiOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfOhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj{OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwOubah}(h]h ]h"]h$]h&]uh1jxhjfOubeh}(h]h ]h"]h$]h&]uh1jchhhMhjNhhubeh}(h]h ]h"]h$]h&]uh1j^hjNhhhhhMubh)}(hVSpecifies the tsc frequency for the virtual machine. The unit of the frequency is KHz.h]hVSpecifies the tsc frequency for the virtual machine. The unit of the frequency is KHz.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubh)}(hIf the KVM_CAP_VM_TSC_CONTROL capability is advertised, this can also be used as a vm ioctl to set the initial tsc frequency of subsequently created vCPUs.h]hIf the KVM_CAP_VM_TSC_CONTROL capability is advertised, this can also be used as a vm ioctl to set the initial tsc frequency of subsequently created vCPUs.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubeh}(h]kvm-set-tsc-khzah ]h"]4.55 kvm_set_tsc_khzah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.56 KVM_GET_TSC_KHZh]h4.56 KVM_GET_TSC_KHZ}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjOhhhKubjy)}(h,KVM_CAP_GET_TSC_KHZ / KVM_CAP_VM_TSC_CONTROLh]h)}(hjOh]h,KVM_CAP_GET_TSC_KHZ / KVM_CAP_VM_TSC_CONTROL}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOubah}(h]h ]h"]h$]h&]uh1jxhjOubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjPhhhKubjy)}(hx86h]h)}(hjPh]hx86}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1jxhjPubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOhhubjd)}(hhh](ji)}(hTypeh]hType}(hj2PhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj/PhhhKubjy)}(hvcpu ioctl / vm ioctlh]h)}(hjBPh]hvcpu ioctl / vm ioctl}(hjDPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@Pubah}(h]h ]h"]h$]h&]uh1jxhj/Pubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj`PhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj]PhhhKubjy)}(hnoneh]h)}(hjpPh]hnone}(hjrPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjnPubah}(h]h ]h"]h$]h&]uh1jxhj]Pubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjPhhhKubjy)}(h4virtual tsc-khz on success, negative value on error h]h)}(h3virtual tsc-khz on success, negative value on errorh]h3virtual tsc-khz on success, negative value on error}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1jxhjPubeh}(h]h ]h"]h$]h&]uh1jchhhMhjOhhubeh}(h]h ]h"]h$]h&]uh1j^hjOhhhhhMubh)}(hReturns the tsc frequency of the guest. The unit of the return value is KHz. If the host has unstable tsc this ioctl returns -EIO instead as an error.h]hReturns the tsc frequency of the guest. The unit of the return value is KHz. If the host has unstable tsc this ioctl returns -EIO instead as an error.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubeh}(h]kvm-get-tsc-khzah ]h"]4.56 kvm_get_tsc_khzah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.57 KVM_GET_LAPICh]h4.57 KVM_GET_LAPIC}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjPhhhKubjy)}(hKVM_CAP_IRQCHIPh]h)}(hjPh]hKVM_CAP_IRQCHIP}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1jxhjPubeh}(h]h ]h"]h$]h&]uh1jchhhMhjPhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQhhhKubjy)}(hx86h]h)}(hj+Qh]hx86}(hj-QhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)Qubah}(h]h ]h"]h$]h&]uh1jxhjQubeh}(h]h ]h"]h$]h&]uh1jchhhMhjPhhubjd)}(hhh](ji)}(hTypeh]hType}(hjIQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjFQhhhKubjy)}(h vcpu ioctlh]h)}(hjYQh]h vcpu ioctl}(hj[QhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjWQubah}(h]h ]h"]h$]h&]uh1jxhjFQubeh}(h]h ]h"]h$]h&]uh1jchhhMhjPhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjwQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjtQhhhKubjy)}(hstruct kvm_lapic_state (out)h]h)}(hjQh]hstruct kvm_lapic_state (out)}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQubah}(h]h ]h"]h$]h&]uh1jxhjtQubeh}(h]h ]h"]h$]h&]uh1jchhhMhjPhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQhhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQubah}(h]h ]h"]h$]h&]uh1jxhjQubeh}(h]h ]h"]h$]h&]uh1jchhhMhjPhhubeh}(h]h ]h"]h$]h&]uh1j^hjPhhhhhMubj$)}(h_#define KVM_APIC_REG_SIZE 0x400 struct kvm_lapic_state { char regs[KVM_APIC_REG_SIZE]; };h]h_#define KVM_APIC_REG_SIZE 0x400 struct kvm_lapic_state { char regs[KVM_APIC_REG_SIZE]; };}hjQsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjPhhubh)}(hReads the Local APIC registers and copies them into the input argument. The data format and layout are the same as documented in the architecture manual.h]hReads the Local APIC registers and copies them into the input argument. The data format and layout are the same as documented in the architecture manual.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPhhubh)}(hXIf KVM_X2APIC_API_USE_32BIT_IDS feature of KVM_CAP_X2APIC_API is enabled, then the format of APIC_ID register depends on the APIC mode (reported by MSR_IA32_APICBASE) of its VCPU. x2APIC stores APIC ID in the APIC_ID register (bytes 32-35). xAPIC only allows an 8-bit APIC ID which is stored in bits 31-24 of the APIC register, or equivalently in byte 35 of struct kvm_lapic_state's regs field. KVM_GET_LAPIC must then be called after MSR_IA32_APICBASE has been set with KVM_SET_MSR.h]hXIf KVM_X2APIC_API_USE_32BIT_IDS feature of KVM_CAP_X2APIC_API is enabled, then the format of APIC_ID register depends on the APIC mode (reported by MSR_IA32_APICBASE) of its VCPU. x2APIC stores APIC ID in the APIC_ID register (bytes 32-35). xAPIC only allows an 8-bit APIC ID which is stored in bits 31-24 of the APIC register, or equivalently in byte 35 of struct kvm_lapic_state’s regs field. KVM_GET_LAPIC must then be called after MSR_IA32_APICBASE has been set with KVM_SET_MSR.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPhhubh)}(heIf KVM_X2APIC_API_USE_32BIT_IDS feature is disabled, struct kvm_lapic_state always uses xAPIC format.h]heIf KVM_X2APIC_API_USE_32BIT_IDS feature is disabled, struct kvm_lapic_state always uses xAPIC format.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPhhubeh}(h] kvm-get-lapicah ]h"]4.57 kvm_get_lapicah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.58 KVM_SET_LAPICh]h4.58 KVM_SET_LAPIC}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj.RhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+RhhhKubjy)}(hKVM_CAP_IRQCHIPh]h)}(hj>Rh]hKVM_CAP_IRQCHIP}(hj@RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;YhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjRYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjOYhhhKubjy)}(hKVM_CAP_S390_UCONTROLh]h)}(hjbYh]hKVM_CAP_S390_UCONTROL}(hjdYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`Yubah}(h]h ]h"]h$]h&]uh1jxhjOYubeh}(h]h ]h"]h$]h&]uh1jchhhMhjLYhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}YhhhKubjy)}(hs390h]h)}(hjYh]hs390}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYubah}(h]h ]h"]h$]h&]uh1jxhj}Yubeh}(h]h ]h"]h$]h&]uh1jchhhMhjLYhhubjd)}(hhh](ji)}(hTypeh]hType}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjYhhhKubjy)}(h vcpu ioctlh]h)}(hjYh]h vcpu ioctl}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYubah}(h]h ]h"]h$]h&]uh1jxhjYubeh}(h]h ]h"]h$]h&]uh1jchhhMhjLYhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjYhhhKubjy)}(h!struct kvm_s390_ucas_mapping (in)h]h)}(hjYh]h!struct kvm_s390_ucas_mapping (in)}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYubah}(h]h ]h"]h$]h&]uh1jxhjYubeh}(h]h ]h"]h$]h&]uh1jchhhMhjLYhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj ZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjZhhhKubjy)}(h0 in case of success h]h)}(h0 in case of successh]h0 in case of success}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1jxhjZubeh}(h]h ]h"]h$]h&]uh1jchhhMhjLYhhubeh}(h]h ]h"]h$]h&]uh1j^hj;YhhhhhMubh)}(h$The parameter is defined like this::h]h#The parameter is defined like this:}(hj 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}(hj;khhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM? hj8kubah}(h]h ]h"]h$]h&]uh1johj5kubjp)}(hhh]h)}(hKVM_REG_PPC_VR31h]hKVM_REG_PPC_VR31}(hjRkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM? hjOkubah}(h]h ]h"]h$]h&]uh1johj5kubjp)}(hhh]h)}(h128h]h128}(hjikhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM? hjfkubah}(h]h ]h"]h$]h&]uh1johj5kubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hjkubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(hKVM_REG_PPC_VSR0h]hKVM_REG_PPC_VSR0}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hjkubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(h128h]h128}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hjkubah}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMA 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}(hj lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hjlubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(hKVM_REG_PPC_VSR31h]hKVM_REG_PPC_VSR31}(hj lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hjlubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(h128h]h128}(hj7lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hj4lubah}(h]h ]h"]h$]h&]uh1johjlubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjWlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hjTlubah}(h]h ]h"]h$]h&]uh1johjQlubjp)}(hhh]h)}(hKVM_REG_PPC_FPSCRh]hKVM_REG_PPC_FPSCR}(hjnlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hjklubah}(h]h ]h"]h$]h&]uh1johjQlubjp)}(hhh]h)}(h64h]h64}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hjlubah}(h]h ]h"]h$]h&]uh1johjQlubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjlubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(hKVM_REG_PPC_VSCRh]hKVM_REG_PPC_VSCR}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjlubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(h32h]h32}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjlubah}(h]h ]h"]h$]h&]uh1johjlubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME hjlubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(hKVM_REG_PPC_VPA_ADDRh]hKVM_REG_PPC_VPA_ADDR}(hj mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME hjmubah}(h]h ]h"]h$]h&]uh1johjlubjp)}(hhh]h)}(h64h]h64}(hj!mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME hjmubah}(h]h ]h"]h$]h&]uh1johjlubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjAmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF hj>mubah}(h]h ]h"]h$]h&]uh1johj;mubjp)}(hhh]h)}(hKVM_REG_PPC_VPA_SLBh]hKVM_REG_PPC_VPA_SLB}(hjXmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF hjUmubah}(h]h ]h"]h$]h&]uh1johj;mubjp)}(hhh]h)}(h128h]h128}(hjomhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMF hjlmubah}(h]h ]h"]h$]h&]uh1johj;mubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMG 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&]uh1hhhhMG hjmubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(h128h]h128}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMG hjmubah}(h]h ]h"]h$]h&]uh1johjmubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH hjmubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(hKVM_REG_PPC_EPCRh]hKVM_REG_PPC_EPCR}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH hjmubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(h32h]h32}(hj nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH hjnubah}(h]h ]h"]h$]h&]uh1johjmubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj+nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI hj(nubah}(h]h ]h"]h$]h&]uh1johj%nubjp)}(hhh]h)}(hKVM_REG_PPC_EPRh]hKVM_REG_PPC_EPR}(hjBnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI hj?nubah}(h]h ]h"]h$]h&]uh1johj%nubjp)}(hhh]h)}(h32h]h32}(hjYnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI hjVnubah}(h]h ]h"]h$]h&]uh1johj%nubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjynhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjvnubah}(h]h ]h"]h$]h&]uh1johjsnubjp)}(hhh]h)}(hKVM_REG_PPC_TCRh]hKVM_REG_PPC_TCR}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjnubah}(h]h ]h"]h$]h&]uh1johjsnubjp)}(hhh]h)}(h32h]h32}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJ hjnubah}(h]h ]h"]h$]h&]uh1johjsnubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMK hjnubah}(h]h ]h"]h$]h&]uh1johjnubjp)}(hhh]h)}(hKVM_REG_PPC_TSRh]hKVM_REG_PPC_TSR}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMK hjnubah}(h]h ]h"]h$]h&]uh1johjnubjp)}(hhh]h)}(h32h]h32}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMK hjnubah}(h]h ]h"]h$]h&]uh1johjnubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hjoubah}(h]h ]h"]h$]h&]uh1johjoubjp)}(hhh]h)}(hKVM_REG_PPC_OR_TSRh]hKVM_REG_PPC_OR_TSR}(hj,ohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hj)oubah}(h]h ]h"]h$]h&]uh1johjoubjp)}(hhh]h)}(h32h]h32}(hjCohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML hj@oubah}(h]h ]h"]h$]h&]uh1johjoubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjcohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM hj`oubah}(h]h ]h"]h$]h&]uh1johj]oubjp)}(hhh]h)}(hKVM_REG_PPC_CLEAR_TSRh]hKVM_REG_PPC_CLEAR_TSR}(hjzohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM hjwoubah}(h]h ]h"]h$]h&]uh1johj]oubjp)}(hhh]h)}(h32h]h32}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM hjoubah}(h]h ]h"]h$]h&]uh1johj]oubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjoubah}(h]h ]h"]h$]h&]uh1johjoubjp)}(hhh]h)}(hKVM_REG_PPC_MAS0h]hKVM_REG_PPC_MAS0}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjoubah}(h]h ]h"]h$]h&]uh1johjoubjp)}(hhh]h)}(h32h]h32}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjoubah}(h]h ]h"]h$]h&]uh1johjoubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hjoubah}(h]h ]h"]h$]h&]uh1johjoubjp)}(hhh]h)}(hKVM_REG_PPC_MAS1h]hKVM_REG_PPC_MAS1}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hjpubah}(h]h ]h"]h$]h&]uh1johjoubjp)}(hhh]h)}(h32h]h32}(hj-phhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hj*pubah}(h]h ]h"]h$]h&]uh1johjoubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjMphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hjJpubah}(h]h ]h"]h$]h&]uh1johjGpubjp)}(hhh]h)}(hKVM_REG_PPC_MAS2h]hKVM_REG_PPC_MAS2}(hjdphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hjapubah}(h]h ]h"]h$]h&]uh1johjGpubjp)}(hhh]h)}(h64h]h64}(hj{phhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hjxpubah}(h]h ]h"]h$]h&]uh1johjGpubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ hjpubah}(h]h ]h"]h$]h&]uh1johjpubjp)}(hhh]h)}(hKVM_REG_PPC_MAS7_3h]hKVM_REG_PPC_MAS7_3}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ hjpubah}(h]h ]h"]h$]h&]uh1johjpubjp)}(hhh]h)}(h64h]h64}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ hjpubah}(h]h ]h"]h$]h&]uh1johjpubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMR hjpubah}(h]h ]h"]h$]h&]uh1johjpubjp)}(hhh]h)}(hKVM_REG_PPC_MAS4h]hKVM_REG_PPC_MAS4}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMR hjpubah}(h]h ]h"]h$]h&]uh1johjpubjp)}(hhh]h)}(h32h]h32}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMR hjqubah}(h]h ]h"]h$]h&]uh1johjpubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj7qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hj4qubah}(h]h ]h"]h$]h&]uh1johj1qubjp)}(hhh]h)}(hKVM_REG_PPC_MAS6h]hKVM_REG_PPC_MAS6}(hjNqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hjKqubah}(h]h ]h"]h$]h&]uh1johj1qubjp)}(hhh]h)}(h32h]h32}(hjeqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hjbqubah}(h]h ]h"]h$]h&]uh1johj1qubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMT hjqubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(hKVM_REG_PPC_MMUCFGh]hKVM_REG_PPC_MMUCFG}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMT hjqubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(h32h]h32}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMT 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&]uh1hhhhMU hjqubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(hKVM_REG_PPC_TLB0CFGh]hKVM_REG_PPC_TLB0CFG}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMU hjqubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(h32h]h32}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMU hjqubah}(h]h ]h"]h$]h&]uh1johjqubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj!rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMV hjrubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(hKVM_REG_PPC_TLB1CFGh]hKVM_REG_PPC_TLB1CFG}(hj8rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMV hj5rubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(h32h]h32}(hjOrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMV hjLrubah}(h]h ]h"]h$]h&]uh1johjrubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjorhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMW hjlrubah}(h]h ]h"]h$]h&]uh1johjirubjp)}(hhh]h)}(hKVM_REG_PPC_TLB2CFGh]hKVM_REG_PPC_TLB2CFG}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMW hjrubah}(h]h ]h"]h$]h&]uh1johjirubjp)}(hhh]h)}(h32h]h32}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMW hjrubah}(h]h ]h"]h$]h&]uh1johjirubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMX hjrubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(hKVM_REG_PPC_TLB3CFGh]hKVM_REG_PPC_TLB3CFG}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMX hjrubah}(h]h ]h"]h$]h&]uh1johjrubjp)}(hhh]h)}(h32h]h32}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMX hjrubah}(h]h ]h"]h$]h&]uh1johjrubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj shhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMY hjsubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(hKVM_REG_PPC_TLB0PSh]hKVM_REG_PPC_TLB0PS}(hj"shhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMY hjsubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(h32h]h32}(hj9shhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMY hj6subah}(h]h ]h"]h$]h&]uh1johjsubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjYshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ hjVsubah}(h]h ]h"]h$]h&]uh1johjSsubjp)}(hhh]h)}(hKVM_REG_PPC_TLB1PSh]hKVM_REG_PPC_TLB1PS}(hjpshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ hjmsubah}(h]h ]h"]h$]h&]uh1johjSsubjp)}(hhh]h)}(h32h]h32}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ hjsubah}(h]h ]h"]h$]h&]uh1johjSsubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[ hjsubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(hKVM_REG_PPC_TLB2PSh]hKVM_REG_PPC_TLB2PS}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[ hjsubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(h32h]h32}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[ hjsubah}(h]h ]h"]h$]h&]uh1johjsubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\ hjsubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(hKVM_REG_PPC_TLB3PSh]hKVM_REG_PPC_TLB3PS}(hj thhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\ hj tubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(h32h]h32}(hj#thhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\ hj tubah}(h]h ]h"]h$]h&]uh1johjsubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjCthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hj@tubah}(h]h ]h"]h$]h&]uh1johj=tubjp)}(hhh]h)}(hKVM_REG_PPC_EPTCFGh]hKVM_REG_PPC_EPTCFG}(hjZthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hjWtubah}(h]h ]h"]h$]h&]uh1johj=tubjp)}(hhh]h)}(h32h]h32}(hjqthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hjntubah}(h]h ]h"]h$]h&]uh1johj=tubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^ 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&]uh1hhhhM^ hjtubah}(h]h ]h"]h$]h&]uh1johjtubjp)}(hhh]h)}(h64h]h64}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^ hjtubah}(h]h ]h"]h$]h&]uh1johjtubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_ hjtubah}(h]h ]h"]h$]h&]uh1johjtubjp)}(hhh]h)}(hKVM_REG_PPC_VP_STATEh]hKVM_REG_PPC_VP_STATE}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_ hjtubah}(h]h ]h"]h$]h&]uh1johjtubjp)}(hhh]h)}(h128h]h128}(hj uhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_ hj uubah}(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&]uh1hhhhM` hj*uubah}(h]h ]h"]h$]h&]uh1johj'uubjp)}(hhh]h)}(hKVM_REG_PPC_TB_OFFSETh]hKVM_REG_PPC_TB_OFFSET}(hjDuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM` hjAuubah}(h]h ]h"]h$]h&]uh1johj'uubjp)}(hhh]h)}(h64h]h64}(hj[uhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM` hjXuubah}(h]h ]h"]h$]h&]uh1johj'uubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj{uhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa hjxuubah}(h]h ]h"]h$]h&]uh1johjuuubjp)}(hhh]h)}(hKVM_REG_PPC_SPMC1h]hKVM_REG_PPC_SPMC1}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa hjuubah}(h]h ]h"]h$]h&]uh1johjuuubjp)}(hhh]h)}(h32h]h32}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa hjuubah}(h]h ]h"]h$]h&]uh1johjuuubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMb hjuubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(hKVM_REG_PPC_SPMC2h]hKVM_REG_PPC_SPMC2}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMb hjuubah}(h]h ]h"]h$]h&]uh1johjuubjp)}(hhh]h)}(h32h]h32}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMb hjuubah}(h]h ]h"]h$]h&]uh1johjuubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc hjvubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(hKVM_REG_PPC_IAMRh]hKVM_REG_PPC_IAMR}(hj.vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc hj+vubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(h64h]h64}(hjEvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc hjBvubah}(h]h ]h"]h$]h&]uh1johjvubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjevhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hjbvubah}(h]h ]h"]h$]h&]uh1johj_vubjp)}(hhh]h)}(hKVM_REG_PPC_TFHARh]hKVM_REG_PPC_TFHAR}(hj|vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hjyvubah}(h]h ]h"]h$]h&]uh1johj_vubjp)}(hhh]h)}(h64h]h64}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hjvubah}(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&]uh1hhhhMe hjvubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(hKVM_REG_PPC_TFIARh]hKVM_REG_PPC_TFIAR}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMe hjvubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(h64h]h64}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMe hjvubah}(h]h ]h"]h$]h&]uh1johjvubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMf hjvubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(hKVM_REG_PPC_TEXASRh]hKVM_REG_PPC_TEXASR}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMf hjwubah}(h]h ]h"]h$]h&]uh1johjvubjp)}(hhh]h)}(h64h]h64}(hj/whhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMf hj,wubah}(h]h ]h"]h$]h&]uh1johjvubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjOwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjLwubah}(h]h ]h"]h$]h&]uh1johjIwubjp)}(hhh]h)}(hKVM_REG_PPC_FSCRh]hKVM_REG_PPC_FSCR}(hjfwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjcwubah}(h]h ]h"]h$]h&]uh1johjIwubjp)}(hhh]h)}(h64h]h64}(hj}whhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg hjzwubah}(h]h ]h"]h$]h&]uh1johjIwubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh hjwubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(hKVM_REG_PPC_PSPBh]hKVM_REG_PPC_PSPB}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh hjwubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(h32h]h32}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh hjwubah}(h]h ]h"]h$]h&]uh1johjwubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hjwubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(hKVM_REG_PPC_EBBHRh]hKVM_REG_PPC_EBBHR}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hjwubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(h64h]h64}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMi hjxubah}(h]h ]h"]h$]h&]uh1johjwubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj9xhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMj hj6xubah}(h]h ]h"]h$]h&]uh1johj3xubjp)}(hhh]h)}(hKVM_REG_PPC_EBBRRh]hKVM_REG_PPC_EBBRR}(hjPxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMj hjMxubah}(h]h ]h"]h$]h&]uh1johj3xubjp)}(hhh]h)}(h64h]h64}(hjgxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMj hjdxubah}(h]h ]h"]h$]h&]uh1johj3xubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk hjxubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(hKVM_REG_PPC_BESCRh]hKVM_REG_PPC_BESCR}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk hjxubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(h64h]h64}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMk 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&]uh1hhhhMl hjxubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(hKVM_REG_PPC_TARh]hKVM_REG_PPC_TAR}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl hjxubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(h64h]h64}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl hjyubah}(h]h ]h"]h$]h&]uh1johjxubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj#yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm hj yubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(hKVM_REG_PPC_DPDESh]hKVM_REG_PPC_DPDES}(hj:yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm hj7yubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(h64h]h64}(hjQyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm hjNyubah}(h]h ]h"]h$]h&]uh1johjyubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjqyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn hjnyubah}(h]h ]h"]h$]h&]uh1johjkyubjp)}(hhh]h)}(hKVM_REG_PPC_DAWRh]hKVM_REG_PPC_DAWR}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn hjyubah}(h]h ]h"]h$]h&]uh1johjkyubjp)}(hhh]h)}(h64h]h64}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn hjyubah}(h]h ]h"]h$]h&]uh1johjkyubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo hjyubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(hKVM_REG_PPC_DAWRXh]hKVM_REG_PPC_DAWRX}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo hjyubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(h64h]h64}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMo hjyubah}(h]h ]h"]h$]h&]uh1johjyubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj zhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp hj zubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(hKVM_REG_PPC_CIABRh]hKVM_REG_PPC_CIABR}(hj$zhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp hj!zubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(h64h]h64}(hj;zhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp hj8zubah}(h]h ]h"]h$]h&]uh1johjzubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj[zhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMq hjXzubah}(h]h ]h"]h$]h&]uh1johjUzubjp)}(hhh]h)}(hKVM_REG_PPC_ICh]hKVM_REG_PPC_IC}(hjrzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMq hjozubah}(h]h ]h"]h$]h&]uh1johjUzubjp)}(hhh]h)}(h64h]h64}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMq hjzubah}(h]h ]h"]h$]h&]uh1johjUzubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr hjzubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(hKVM_REG_PPC_VTBh]hKVM_REG_PPC_VTB}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr hjzubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(h64h]h64}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr 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&]uh1hhhhMs hjzubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(hKVM_REG_PPC_CSIGRh]hKVM_REG_PPC_CSIGR}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMs hj {ubah}(h]h ]h"]h$]h&]uh1johjzubjp)}(hhh]h)}(h64h]h64}(hj%{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMs hj"{ubah}(h]h ]h"]h$]h&]uh1johjzubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjE{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjB{ubah}(h]h ]h"]h$]h&]uh1johj?{ubjp)}(hhh]h)}(hKVM_REG_PPC_TACRh]hKVM_REG_PPC_TACR}(hj\{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjY{ubah}(h]h ]h"]h$]h&]uh1johj?{ubjp)}(hhh]h)}(h64h]h64}(hjs{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjp{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&]uh1hhhhMu 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&]uh1hhhhMu hj{ubah}(h]h ]h"]h$]h&]uh1johj{ubjp)}(hhh]h)}(h64h]h64}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu 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&]uh1hhhhMv 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&]uh1hhhhMv hj{ubah}(h]h ]h"]h$]h&]uh1johj{ubjp)}(hhh]h)}(h64h]h64}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMv 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&]uh1hhhhMw hj,|ubah}(h]h ]h"]h$]h&]uh1johj)|ubjp)}(hhh]h)}(hKVM_REG_PPC_ACOPh]hKVM_REG_PPC_ACOP}(hjF|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMw hjC|ubah}(h]h ]h"]h$]h&]uh1johj)|ubjp)}(hhh]h)}(h64h]h64}(hj]|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMw hjZ|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&]uh1hhhhMx hjz|ubah}(h]h ]h"]h$]h&]uh1johjw|ubjp)}(hhh]h)}(hKVM_REG_PPC_VRSAVEh]hKVM_REG_PPC_VRSAVE}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMx hj|ubah}(h]h ]h"]h$]h&]uh1johjw|ubjp)}(hhh]h)}(h32h]h32}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMx hj|ubah}(h]h ]h"]h$]h&]uh1johjw|ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMy 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&]uh1hhhhMy hj|ubah}(h]h ]h"]h$]h&]uh1johj|ubjp)}(hhh]h)}(h32h]h32}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMy 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&]uh1hhhhMz hj}ubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(hKVM_REG_PPC_LPCR_64h]hKVM_REG_PPC_LPCR_64}(hj0}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz hj-}ubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(h64h]h64}(hjG}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz hjD}ubah}(h]h ]h"]h$]h&]uh1johj}ubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjg}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{ hjd}ubah}(h]h ]h"]h$]h&]uh1johja}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&]uh1johja}ubjp)}(hhh]h)}(h64h]h64}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{ hj}ubah}(h]h ]h"]h$]h&]uh1johja}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}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM} hj~ubah}(h]h ]h"]h$]h&]uh1johj}ubjp)}(hhh]h)}(h32h]h32}(hj1~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}(hjQ~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hjN~ubah}(h]h ]h"]h$]h&]uh1johjK~ubjp)}(hhh]h)}(hKVM_REG_PPC_WORTh]hKVM_REG_PPC_WORT}(hjh~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hje~ubah}(h]h ]h"]h$]h&]uh1johjK~ubjp)}(hhh]h)}(h64h]h64}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~ hj|~ubah}(h]h ]h"]h$]h&]uh1johjK~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}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johj~ubjp)}(hhh]h)}(hKVM_REG_PPC_DBSRh]hKVM_REG_PPC_DBSR}(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)}(hPPCh]hPPC}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj8ubah}(h]h ]h"]h$]h&]uh1johj5ubjp)}(hhh]h)}(hKVM_REG_PPC_TIDRh]hKVM_REG_PPC_TIDR}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjOubah}(h]h ]h"]h$]h&]uh1johj5ubjp)}(hhh]h)}(h64h]h64}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjfubah}(h]h ]h"]h$]h&]uh1johj5ubeh}(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}(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_PTCRh]hKVM_REG_PPC_PTCR}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj9ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjpubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(hKVM_REG_PPC_HASHKEYRh]hKVM_REG_PPC_HASHKEYR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjmubeh}(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}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hKVM_REG_PPC_DAWR1h]hKVM_REG_PPC_DAWR1}(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 hjZubah}(h]h ]h"]h$]h&]uh1johjWubjp)}(hhh]h)}(hKVM_REG_PPC_DAWRX1h]hKVM_REG_PPC_DAWRX1}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjqubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_DEXCRh]hKVM_REG_PPC_DEXCR}(hjhhhNhNubah}(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_GPR0h]hKVM_REG_PPC_TM_GPR0}(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)}(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)}(hPPCh]hPPC}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjvubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(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&]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)}(hPPCh]hPPC}(hjǂhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjĂubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_VSR0h]hKVM_REG_PPC_TM_VSR0}(hjނhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjۂubah}(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...}(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&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjDubah}(h]h ]h"]h$]h&]uh1johjAubjp)}(hhh]h)}(hKVM_REG_PPC_TM_VSR63h]hKVM_REG_PPC_TM_VSR63}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj[ubah}(h]h ]h"]h$]h&]uh1johjAubjp)}(hhh]h)}(h128h]h128}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjrubah}(h]h ]h"]h$]h&]uh1johjAubeh}(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}(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 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&]uh1johj݃ubjp)}(hhh]h)}(hKVM_REG_PPC_TM_LRh]hKVM_REG_PPC_TM_LR}(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}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.ubah}(h]h ]h"]h$]h&]uh1johj+ubjp)}(hhh]h)}(hKVM_REG_PPC_TM_CTRh]hKVM_REG_PPC_TM_CTR}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjEubah}(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 hj|ubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(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&]uh1johjyubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjyubeh}(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&]uh1johjDŽubjp)}(hhh]h)}(hKVM_REG_PPC_TM_AMRh]hKVM_REG_PPC_TM_AMR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjDŽubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjDŽ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_PPRh]hKVM_REG_PPC_TM_PPR}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj/ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjFubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjfubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(hKVM_REG_PPC_TM_VRSAVEh]hKVM_REG_PPC_TM_VRSAVE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjcubeh}(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_VSCRh]hKVM_REG_PPC_TM_VSCR}(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)}(hPPCh]hPPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_PPC_TM_DSCRh]hKVM_REG_PPC_TM_DSCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj0ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hPPCh]hPPC}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1johjMubjp)}(hhh]h)}(hKVM_REG_PPC_TM_TARh]hKVM_REG_PPC_TM_TAR}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjgubah}(h]h ]h"]h$]h&]uh1johjMubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johjMubeh}(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_XERh]hKVM_REG_PPC_TM_XER}(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_R0h]hKVM_REG_MIPS_R0}(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)}(h...h]h...}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj:ubah}(h]h ]h"]h$]h&]uh1johj7ubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj7ubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj7ubeh}(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_R31h]hKVM_REG_MIPS_R31}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjiubjp)}(hhh]h)}(h64h]h64}(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_HIh]hKVM_REG_MIPS_HI}(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_LOh]hKVM_REG_MIPS_LO}(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_PCh]hKVM_REG_MIPS_PC}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjmubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(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&]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_ENTRYLO0h]hKVM_REG_MIPS_CP0_ENTRYLO0}(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 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_ENTRYLO1h]hKVM_REG_MIPS_CP0_ENTRYLO1}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjWubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h)}(h64h]h64}(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_CONTEXTh]hKVM_REG_MIPS_CP0_CONTEXT}(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_CONTEXTCONFIGh]hKVM_REG_MIPS_CP0_CONTEXTCONFIG}(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_USERLOCALh]hKVM_REG_MIPS_CP0_USERLOCAL}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjAubah}(h]h ]h"]h$]h&]uh1johj'ubjp)}(hhh]h)}(h64h]h64}(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_XCONTEXTCONFIGh]hKVM_REG_MIPS_CP0_XCONTEXTCONFIG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(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)}(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_PAGEMASKh]hKVM_REG_MIPS_CP0_PAGEMASK}(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_PAGEGRAINh]hKVM_REG_MIPS_CP0_PAGEGRAIN}(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)}(hMIPSh]hMIPS}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjbubah}(h]h ]h"]h$]h&]uh1johj_ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_SEGCTL0h]hKVM_REG_MIPS_CP0_SEGCTL0}(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_SEGCTL1h]hKVM_REG_MIPS_CP0_SEGCTL1}(hjʋhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjNjubah}(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_SEGCTL2h]hKVM_REG_MIPS_CP0_SEGCTL2}(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_PWBASEh]hKVM_REG_MIPS_CP0_PWBASE}(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_PWFIELDh]hKVM_REG_MIPS_CP0_PWFIELD}(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_PWSIZEh]hKVM_REG_MIPS_CP0_PWSIZE}(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_WIREDh]hKVM_REG_MIPS_CP0_WIRED}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjMubah}(h]h ]h"]h$]h&]uh1johj3ubjp)}(hhh]h)}(h32h]h32}(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_PWCTLh]hKVM_REG_MIPS_CP0_PWCTL}(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_HWRENAh]hKVM_REG_MIPS_CP0_HWRENA}(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 hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_BADVADDRh]hKVM_REG_MIPS_CP0_BADVADDR}(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_CP0_BADINSTRh]hKVM_REG_MIPS_CP0_BADINSTR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(h32h]h32}(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_CP0_BADINSTRPh]hKVM_REG_MIPS_CP0_BADINSTRP}(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_CP0_COUNTh]hKVM_REG_MIPS_CP0_COUNT}(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 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_CP0_ENTRYHIh]hKVM_REG_MIPS_CP0_ENTRYHI}(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)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(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&]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_STATUSh]hKVM_REG_MIPS_CP0_STATUS}(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_CP0_INTCTLh]hKVM_REG_MIPS_CP0_INTCTL}(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_CP0_CAUSEh]hKVM_REG_MIPS_CP0_CAUSE}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjސubah}(h]h ]h"]h$]h&]uh1johjېubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_EPCh]hKVM_REG_MIPS_CP0_EPC}(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 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_PRIDh]hKVM_REG_MIPS_CP0_PRID}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjCubah}(h]h ]h"]h$]h&]uh1johj)ubjp)}(hhh]h)}(h32h]h32}(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)}(hMIPSh]hMIPS}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjzubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(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&]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)}(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_CONFIGh]hKVM_REG_MIPS_CP0_CONFIG}(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_CONFIG1h]hKVM_REG_MIPS_CP0_CONFIG1}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj-ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(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)}(hMIPSh]hMIPS}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjdubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG2h]hKVM_REG_MIPS_CP0_CONFIG2}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj{ubah}(h]h ]h"]h$]h&]uh1johjaubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(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_CP0_CONFIG3h]hKVM_REG_MIPS_CP0_CONFIG3}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG4h]hKVM_REG_MIPS_CP0_CONFIG4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hj1hhhNhNubah}(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}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjNubah}(h]h ]h"]h$]h&]uh1johjKubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_CONFIG5h]hKVM_REG_MIPS_CP0_CONFIG5}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjeubah}(h]h ]h"]h$]h&]uh1johjKubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(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_CP0_CONFIG7h]hKVM_REG_MIPS_CP0_CONFIG7}(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_XCONTEXTh]hKVM_REG_MIPS_CP0_XCONTEXT}(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 hj8ubah}(h]h ]h"]h$]h&]uh1johj5ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_ERROREPCh]hKVM_REG_MIPS_CP0_ERROREPC}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjOubah}(h]h ]h"]h$]h&]uh1johj5ubjp)}(hhh]h)}(h64h]h64}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjfubah}(h]h ]h"]h$]h&]uh1johj5ubeh}(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}(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_KSCRATCH2h]hKVM_REG_MIPS_CP0_KSCRATCH2}(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_CP0_KSCRATCH3h]hKVM_REG_MIPS_CP0_KSCRATCH3}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj9ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h64h]h64}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjpubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(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&]uh1johjmubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjmubeh}(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}(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 hj ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_KSCRATCH6h]hKVM_REG_MIPS_CP0_KSCRATCH6}(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)}(hMIPSh]hMIPS}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjZubah}(h]h ]h"]h$]h&]uh1johjWubjp)}(hhh]h)}(hKVM_REG_MIPS_CP0_MAAR(0..63)h]hKVM_REG_MIPS_CP0_MAAR(0..63)}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjqubah}(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)}(hMIPSh]hMIPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hKVM_REG_MIPS_COUNT_CTLh]hKVM_REG_MIPS_COUNT_CTL}(hj–hhhNhNubah}(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_COUNT_RESUMEh]hKVM_REG_MIPS_COUNT_RESUME}(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)}(hMIPSh]hMIPS}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjDubah}(h]h ]h"]h$]h&]uh1johjAubjp)}(hhh]h)}(hKVM_REG_MIPS_COUNT_HZh]hKVM_REG_MIPS_COUNT_HZ}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj[ubah}(h]h ]h"]h$]h&]uh1johjAubjp)}(hhh]h)}(h64h]h64}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjrubah}(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_FPR_32(0..31)h]hKVM_REG_MIPS_FPR_32(0..31)}(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 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&]uh1johjݗubjp)}(hhh]h)}(hKVM_REG_MIPS_FPR_64(0..31)h]hKVM_REG_MIPS_FPR_64(0..31)}(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}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.ubah}(h]h ]h"]h$]h&]uh1johj+ubjp)}(hhh]h)}(hKVM_REG_MIPS_VEC_128(0..31)h]hKVM_REG_MIPS_VEC_128(0..31)}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjEubah}(h]h ]h"]h$]h&]uh1johj+ubjp)}(hhh]h)}(h128h]h128}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(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&]uh1johjyubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjyubeh}(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_FCR_CSRh]hKVM_REG_MIPS_FCR_CSR}(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_MSA_IRh]hKVM_REG_MIPS_MSA_IR}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj/ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h32h]h32}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjFubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj_ubjk)}(hhh](jp)}(hhh]h)}(hMIPSh]hMIPS}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjfubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(hKVM_REG_MIPS_MSA_CSRh]hKVM_REG_MIPS_MSA_CSR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjcubeh}(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&]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:}(hjʙhhhNhNubah}(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:}(hjؙhhhNhNubah}(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 }hjsbah}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h<0x4030 0000 000F h]h<0x4030 0000 000F }hjsbah}(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:}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x4020 0000 0011 00 h]h0x4020 0000 0011 00 }hj:sbah}(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:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x4020 0000 0012 1 h]h0x4020 0000 0012 1 }hjVsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj\hhubh)}(hh]h0x4030 0000 0012 0 }hjrsbah}(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:}(hjhhhNhNubah}(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:}(hjhhhNhNubah}(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:}(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&]colwidthKuh1jOhjךubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jOhjךubj0_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hj hhhNhNubah}(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 hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hBitsh]hBits}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj6ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hkvm_regs memberh]hkvm_regs member}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjMubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1j/_hjךubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0000h]h0x6030 0000 0010 0000}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjvubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(hX0h]hX0}(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&]uh1johjsubjp)}(hhh]h)}(h regs.regs[0]h]h regs.regs[0]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjsubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0002h]h0x6030 0000 0010 0002}(hjޛhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjۛubah}(h]h ]h"]h$]h&]uh1johj؛ubjp)}(hhh]h)}(hX1h]hX1}(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 hj ubah}(h]h ]h"]h$]h&]uh1johj؛ubjp)}(hhh]h)}(h regs.regs[1]h]h regs.regs[1]}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johj؛ubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj@ubah}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj=ubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johj=ubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 003ch]h0x6030 0000 0010 003c}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj{ubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(hX30h]hX30}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjxubjp)}(hhh]h)}(h regs.regs[30]h]h regs.regs[30]}(hjÜhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjxubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 003eh]h0x6030 0000 0010 003e}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjݜubjp)}(hhh]h)}(hSPh]hSP}(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)}(hregs.sph]hregs.sp}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj%ubah}(h]h ]h"]h$]h&]uh1johjݜubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0040h]h0x6030 0000 0010 0040}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjEubah}(h]h ]h"]h$]h&]uh1johjBubjp)}(hhh]h)}(hPCh]hPC}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\ubah}(h]h ]h"]h$]h&]uh1johjBubjp)}(hhh]h)}(h64h]h64}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjsubah}(h]h ]h"]h$]h&]uh1johjBubjp)}(hhh]h)}(hregs.pch]hregs.pc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjBubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0042h]h0x6030 0000 0010 0042}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hPSTATEh]hPSTATE}(hjĝhhhNhNubah}(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.pstateh]h regs.pstate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0044h]h0x6030 0000 0010 0044}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hSP_EL1h]hSP_EL1}(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 ubjp)}(hhh]h)}(hsp_el1h]hsp_el1}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjTubah}(h]h ]h"]h$]h&]uh1johj ubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0046h]h0x6030 0000 0010 0046}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjtubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(hELR_EL1h]hELR_EL1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjqubjp)}(hhh]h)}(helr_el1h]helr_el1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjqubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0048h]h0x6030 0000 0010 0048}(hjܞhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjٞubah}(h]h ]h"]h$]h&]uh1johj֞ubjp)}(hhh]h)}(hSPSR_EL1h]hSPSR_EL1}(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֞ubjp)}(hhh]h)}(h#spsr[KVM_SPSR_EL1] (alias SPSR_SVC)h]h#spsr[KVM_SPSR_EL1] (alias SPSR_SVC)}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj֞ubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 004ah]h0x6030 0000 0010 004a}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj>ubah}(h]h ]h"]h$]h&]uh1johj;ubjp)}(hhh]h)}(hSPSR_ABTh]hSPSR_ABT}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjUubah}(h]h ]h"]h$]h&]uh1johj;ubjp)}(hhh]h)}(h64h]h64}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjlubah}(h]h ]h"]h$]h&]uh1johj;ubjp)}(hhh]h)}(hspsr[KVM_SPSR_ABT]h]hspsr[KVM_SPSR_ABT]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj;ubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 004ch]h0x6030 0000 0010 004c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSPSR_UNDh]hSPSR_UND}(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_UND]h]hspsr[KVM_SPSR_UND]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 004eh]h0x6030 0000 0010 004e}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSPSR_IRQh]hSPSR_IRQ}(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&]uh1johjubjp)}(hhh]h)}(hspsr[KVM_SPSR_IRQ]h]hspsr[KVM_SPSR_IRQ]}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjMubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6030 0000 0010 0050h]h0x6030 0000 0010 0050}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjmubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(hSPSR_FIQh]hSPSR_FIQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h)}(hspsr[KVM_SPSR_FIQ]h]hspsr[KVM_SPSR_FIQ]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjjubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6040 0000 0010 0054h]h0x6040 0000 0010 0054}(hjՠhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjҠubah}(h]h ]h"]h$]h&]uh1johjϠubjp)}(hhh]h)}(hV0h]hV0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjϠubjp)}(hhh]h)}(h128h]h128}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjϠubjp)}(hhh]h)}(hfp_regs.vregs[0] [1]_h](hfp_regs.vregs[0] }(hjhhhNhNubhfootnote_reference)}(h[1]_h]h1}(hj$hhhNhNubah}(h]id11ah ]h"]h$]h&]jKid14docnamejuh1j"hjresolvedKubeh}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjϠubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6040 0000 0010 0058h]h0x6040 0000 0010 0058}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjKubah}(h]h ]h"]h$]h&]uh1johjHubjp)}(hhh]h)}(hV1h]hV1}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjbubah}(h]h ]h"]h$]h&]uh1johjHubjp)}(hhh]h)}(h128h]h128}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjyubah}(h]h ]h"]h$]h&]uh1johjHubjp)}(hhh]h)}(hfp_regs.vregs[1] [1]_h](hfp_regs.vregs[1] }(hjhhhNhNubj#)}(h[1]_h]h1}(hjhhhNhNubah}(h]id12ah ]h"]h$]h&]jKj3j4juh1j"hjj5Kubeh}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjHubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hj¡hhhNhNubah}(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&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6040 0000 0010 00d0h]h0x6040 0000 0010 00d0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hV31h]hV31}(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[31] [1]_h](hfp_regs.vregs[31] }(hjBhhhNhNubj#)}(h[1]_h]h1}(hjJhhhNhNubah}(h]id13ah ]h"]h$]h&]jKj3j4juh1j"hjBj5Kubeh}(h]h ]h"]h$]h&]uh1hhhhM hj?ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6020 0000 0010 00d4h]h0x6020 0000 0010 00d4}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjnubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(hFPSRh]hFPSR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(h32h]h32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubjp)}(hhh]h)}(h fp_regs.fpsrh]h fp_regs.fpsr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjkubeh}(h]h ]h"]h$]h&]uh1jjhjpubjk)}(hhh](jp)}(hhh]h)}(h0x6020 0000 0010 00d5h]h0x6020 0000 0010 00d5}(hj֢hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjӢubah}(h]h ]h"]h$]h&]uh1johjТubjp)}(hhh]h)}(hFPCRh]hFPCR}(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Тubjp)}(hhh]h)}(h fp_regs.fpcrh]h fp_regs.fpcr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(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\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}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjJubh)}(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 }(hj^hhhNhNubh)}(h:ref:`KVM_ARM_VCPU_INIT`h]j)}(hjhh]hKVM_ARM_VCPU_INIT}(hjjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]refdocj refdomainjtreftyperef refexplicitrefwarnjkvm_arm_vcpu_inituh1hhhhM! hj^ubh.}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM! hjJubh)}(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$ hjJubeh}(h]j3ah ]h"]1ah$]h&](j.jjTej4juh1jHhhhM! hj\hhj5Kubh)}(h:arm64 CCSIDR registers are demultiplexed by CSSELR value::h]h9arm64 CCSIDR registers are demultiplexed by CSSELR value:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hj\hhubj$)}(h0x6020 0000 0011 00 h]h0x6020 0000 0011 00 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM* 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&]uh1hhhhM, hj\hhubj$)}(h80x6030 0000 0013 h]h80x6030 0000 0013 }hjϣsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM. 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hjݣubah}(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&]uh1hhhhM: hj\hhubj$)}(h0x6030 0000 0014 h]h0x6030 0000 0014 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM< hj\hhubh)}(h5arm64 SVE registers have the following bit patterns::h]h4arm64 SVE registers have the following bit patterns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM> 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}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM@ 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 }(hj-hhhNhNubj#)}(h[2]_h]h2}(hj5hhhNhNubah}(h]id15ah ]h"]h$]h&]jKid16j4juh1j"hj-j5Kubh below.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhME 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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMI 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.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhML 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:}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ 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 */}hjysbah}(h]h ]h"]h$]h&]hhuh1j#hhhMX hj\hhubjI)}(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](jO)}(h2h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMa hjubeh}(h]jDah ]h"]2ah$]h&]j?aj4juh1jHhhhMa hj\hhj5Kubh)}(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.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMf 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&]uh1hhhhMi 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).}(hjʤhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm 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.}(hjؤhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp 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&]uh1hhhhMv 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&]uh1hhhhMy hj\hhubj$)}(h0x6030 0000 0016 h]h0x6030 0000 0016 }hjsbah}(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.}(hjhhhNhNubah}(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.}(hjhhhNhNubah}(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.)}(hj,hhhNhNubah}(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:}(hj:hhhNhNubah}(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:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h0x7030 0000 0000 h]h0x7030 0000 0000 }hjVsbah}(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:}(hjdhhhNhNubah}(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)}hjrsbah}(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 }hjsbah}(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:}(hjhhhNhNubah}(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:}(hjƥhhhNhNubah}(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)}hjԥsbah}(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:}(hjhhhNhNubah}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubj$)}(h!0x7020 0000 0003 02 <0:3> h]h!0x7020 0000 0003 02 <0:3> }hj sbah}(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.}(hjhhhNhNubah}(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:}(hj(hhhNhNubah}(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)}hj6sbah}(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:}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjUubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjUubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhjUubj0_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(hRegisterh]hRegister}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjyubeh}(h]h ]h"]h$]h&]uh1jjhjvubah}(h]h ]h"]h$]h&]uh1j/_hjUubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0100 0000h]h0x80x0 0000 0100 0000}(hj֦hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjӦubah}(h]h ]h"]h$]h&]uh1johjЦubjp)}(hhh]h)}(hisah]hisa}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjЦubjp)}(hhh]h)}(h ISA feature bitmap of Guest VCPUh]h ISA feature bitmap of Guest VCPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjЦubeh}(h]h ]h"]h$]h&]uh1jjhjͦubah}(h]h ]h"]h$]h&]uh1jehjUubeh}(h]h ]h"]h$]h&]colsKuh1jJhjRubah}(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.}(hj1hhhNhNubah}(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:}(hj?hhhNhNubah}(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)}hjMsbah}(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:}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjlubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjlubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhjlubj0_)}(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 hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubah}(h]h ]h"]h$]h&]uh1j/_hjlubjf)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hProgram counterh]hProgram counter}(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 0001h]h0x80x0 0000 0200 0001}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj8ubah}(h]h ]h"]h$]h&]uh1johj5ubjp)}(hhh]h)}(hregs.rah]hregs.ra}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjOubah}(h]h ]h"]h$]h&]uh1johj5ubjp)}(hhh]h)}(hReturn addressh]hReturn address}(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 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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Stack pointerh]h Stack pointer}(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 0003h]h0x80x0 0000 0200 0003}(hjרhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjԨubah}(h]h ]h"]h$]h&]uh1johjѨubjp)}(hhh]h)}(hregs.gph]hregs.gp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjѨubjp)}(hhh]h)}(hGlobal pointerh]hGlobal pointer}(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 0004h]h0x80x0 0000 0200 0004}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj"ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.tph]hregs.tp}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj9ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h Task pointerh]h Task pointer}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0005h]h0x80x0 0000 0200 0005}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjpubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(hregs.t0h]hregs.t0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjmubjp)}(hhh]h)}(hCaller saved register 0h]hCaller saved register 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjmubeh}(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}(hjةhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjթubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hregs.t2h]hregs.t2}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj#ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hCaller saved register 2h]hCaller saved register 2}(hj=hhhNhNubah}(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 0008h]h0x80x0 0000 0200 0008}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjZubah}(h]h ]h"]h$]h&]uh1johjWubjp)}(hhh]h)}(hregs.s0h]hregs.s0}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjqubah}(h]h ]h"]h$]h&]uh1johjWubjp)}(hhh]h)}(hCallee saved register 0h]hCallee saved register 0}(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 0009h]h0x80x0 0000 0200 0009}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s1h]hregs.s1}(hjªhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 1h]hCallee saved register 1}(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 000ah]h0x80x0 0000 0200 000a}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.a0h]hregs.a0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h%Function argument (or return value) 0h]h%Function argument (or return value) 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 000bh]h0x80x0 0000 0200 000b}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjDubah}(h]h ]h"]h$]h&]uh1johjAubjp)}(hhh]h)}(hregs.a1h]hregs.a1}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj[ubah}(h]h ]h"]h$]h&]uh1johjAubjp)}(hhh]h)}(h%Function argument (or return value) 1h]h%Function argument (or return value) 1}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjrubah}(h]h ]h"]h$]h&]uh1johjAubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFunction argument 2h]hFunction argument 2}(hjëhhhNhNubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjݫubjp)}(hhh]h)}(hregs.a3h]hregs.a3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjݫubjp)}(hhh]h)}(hFunction argument 3h]hFunction argument 3}(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 000eh]h0x80x0 0000 0200 000e}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.ubah}(h]h ]h"]h$]h&]uh1johj+ubjp)}(hhh]h)}(hregs.a4h]hregs.a4}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjEubah}(h]h ]h"]h$]h&]uh1johj+ubjp)}(hhh]h)}(hFunction argument 4h]hFunction argument 4}(hj_hhhNhNubah}(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 000fh]h0x80x0 0000 0200 000f}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(hregs.a5h]hregs.a5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(hhh]h)}(hFunction argument 5h]hFunction argument 5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjyubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0010h]h0x80x0 0000 0200 0010}(hjͬhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjʬubah}(h]h ]h"]h$]h&]uh1johjǬubjp)}(hhh]h)}(hregs.a6h]hregs.a6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjǬubjp)}(hhh]h)}(hFunction argument 6h]hFunction argument 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 0011h]h0x80x0 0000 0200 0011}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.a7h]hregs.a7}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj/ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFunction argument 7h]hFunction argument 7}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjFubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0012h]h0x80x0 0000 0200 0012}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjfubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(hregs.s2h]hregs.s2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johjcubjp)}(hhh]h)}(hCallee saved register 2h]hCallee saved register 2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjcubeh}(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 hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s3h]hregs.s3}(hjέhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj˭ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 3h]hCallee saved register 3}(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 0014h]h0x80x0 0000 0200 0014}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s4h]hregs.s4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 4h]hCallee saved register 4}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj0ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0015h]h0x80x0 0000 0200 0015}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1johjMubjp)}(hhh]h)}(hregs.s5h]hregs.s5}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjgubah}(h]h ]h"]h$]h&]uh1johjMubjp)}(hhh]h)}(hCallee saved register 5h]hCallee saved register 5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj~ubah}(h]h ]h"]h$]h&]uh1johjMubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0016h]h0x80x0 0000 0200 0016}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.s6h]hregs.s6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 6h]hCallee saved register 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 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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hCallee saved register 7h]hCallee saved register 7}(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 0018h]h0x80x0 0000 0200 0018}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj:ubah}(h]h ]h"]h$]h&]uh1johj7ubjp)}(hhh]h)}(hregs.s8h]hregs.s8}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjQubah}(h]h ]h"]h$]h&]uh1johj7ubjp)}(hhh]h)}(hCallee saved register 8h]hCallee saved register 8}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhubah}(h]h ]h"]h$]h&]uh1johj7ubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(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}(hjٯhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj֯ubah}(h]h ]h"]h$]h&]uh1johjӯubjp)}(hhh]h)}(hregs.s10h]hregs.s10}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjӯubjp)}(hhh]h)}(hCallee saved register 10h]hCallee saved register 10}(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 001bh]h0x80x0 0000 0200 001b}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj$ubah}(h]h ]h"]h$]h&]uh1johj!ubjp)}(hhh]h)}(hregs.s11h]hregs.s11}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj;ubah}(h]h ]h"]h$]h&]uh1johj!ubjp)}(hhh]h)}(hCallee saved register 11h]hCallee saved register 11}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjRubah}(h]h ]h"]h$]h&]uh1johj!ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 001ch]h0x80x0 0000 0200 001c}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjrubah}(h]h ]h"]h$]h&]uh1johjoubjp)}(hhh]h)}(hregs.t3h]hregs.t3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjoubjp)}(hhh]h)}(hCaller saved register 3h]hCaller saved register 3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjoubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 001dh]h0x80x0 0000 0200 001d}(hjðhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hregs.t4h]hregs.t4}(hjڰhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjװubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hregs.t5h]hregs.t5}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj%ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hCaller saved register 5h]hCaller saved register 5}(hj?hhhNhNubah}(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 001fh]h0x80x0 0000 0200 001f}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\ubah}(h]h ]h"]h$]h&]uh1johjYubjp)}(hhh]h)}(hregs.t6h]hregs.t6}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjsubah}(h]h ]h"]h$]h&]uh1johjYubjp)}(hhh]h)}(hCaller saved register 6h]hCaller saved register 6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjYubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0200 0020h]h0x80x0 0000 0200 0020}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hmodeh]hmode}(hjıhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h)Privilege mode (1 = S-mode or 0 = U-mode)h]h)Privilege mode (1 = S-mode or 0 = U-mode)}(hj۱hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjرubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjlubeh}(h]h ]h"]h$]h&]colsKuh1jJhjiubah}(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:}(hjhhhNhNubah}(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)}hjsbah}(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:}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhj5ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhj5ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhj5ubj0_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\ubah}(h]h ]h"]h$]h&]uh1johjYubjp)}(hhh]h)}(hRegisterh]hRegister}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjsubah}(h]h ]h"]h$]h&]uh1johjYubjp)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjYubeh}(h]h ]h"]h$]h&]uh1jjhjVubah}(h]h ]h"]h$]h&]uh1j/_hj5ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0000h]h0x80x0 0000 0300 0000}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hsstatush]hsstatus}(hjͲhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjʲubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSupervisor statush]hSupervisor status}(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 0300 0001h]h0x80x0 0000 0300 0001}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hsieh]hsie}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSupervisor interrupt enableh]hSupervisor interrupt enable}(hj2hhhNhNubah}(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 0300 0002h]h0x80x0 0000 0300 0002}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjOubah}(h]h ]h"]h$]h&]uh1johjLubjp)}(hhh]h)}(hstvech]hstvec}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjfubah}(h]h ]h"]h$]h&]uh1johjLubjp)}(hhh]h)}(hSupervisor trap vector baseh]hSupervisor trap vector base}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj}ubah}(h]h ]h"]h$]h&]uh1johjLubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0003h]h0x80x0 0000 0300 0003}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hsscratchh]hsscratch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hSupervisor scratch registerh]hSupervisor scratch register}(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 0300 0004h]h0x80x0 0000 0300 0004}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hsepch]hsepc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h$Supervisor exception program counterh]h$Supervisor exception program counter}(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 0300 0005h]h0x80x0 0000 0300 0005}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj9ubah}(h]h ]h"]h$]h&]uh1johj6ubjp)}(hhh]h)}(hscauseh]hscause}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1johj6ubjp)}(hhh]h)}(hSupervisor trap causeh]hSupervisor trap cause}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjgubah}(h]h ]h"]h$]h&]uh1johj6ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(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 hjubah}(kh]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x80x0 0000 0300 0007h]h0x80x0 0000 0300 0007}(hjشhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjմubah}(h]h ]h"]h$]h&]uh1johjҴubjp)}(hhh]h)}(hsiph]hsip}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjҴubjp)}(hhh]h)}(hSupervisor interrupt pendingh]hSupervisor interrupt pending}(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 0300 0008h]h0x80x0 0000 0300 0008}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj#ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(hsatph]hsatp}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj:ubah}(h]h ]h"]h$]h&]uh1johj ubjp)}(hhh]h)}(h-Supervisor address translation and protectionh]h-Supervisor address translation and protection}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjQubah}(h]h ]h"]h$]h&]uh1johj ubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehj5ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj2ubah}(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:}(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-uh1jOhjubj0_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hjصhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjյubah}(h]h ]h"]h$]h&]uh1johjҵubjp)}(hhh]h)}(hRegisterh]hRegister}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjҵubjp)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1johjҵubeh}(h]h ]h"]h$]h&]uh1jjhjϵubah}(h]h ]h"]h$]h&]uh1j/_hjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0400 0000h]h0x8030 0000 0400 0000}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM! hj,ubah}(h]h ]h"]h$]h&]uh1johj)ubjp)}(hhh]h)}(h frequencyh]h frequency}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM! hjCubah}(h]h ]h"]h$]h&]uh1johj)ubjp)}(hhh]h)}(hTime base frequency (read-only)h]hTime base frequency (read-only)}(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)}(h0x8030 0000 0400 0001h]h0x8030 0000 0400 0001}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM" hjzubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(htimeh]htime}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM" hjubah}(h]h ]h"]h$]h&]uh1johjwubjp)}(hhh]h)}(hTime value visible to Guesth]hTime value visible to Guest}(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)}(h0x8030 0000 0400 0002h]h0x8030 0000 0400 0002}(hj˶hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM# hjȶubah}(h]h ]h"]h$]h&]uh1johjŶubjp)}(hhh]h)}(hcompareh]hcompare}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM# hj߶ubah}(h]h ]h"]h$]h&]uh1johjŶubjp)}(hhh]h)}(h Time compare programmed by Guesth]h Time compare programmed by Guest}(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)}(h0x8030 0000 0400 0003h]h0x8030 0000 0400 0003}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$ hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hstateh]hstate}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$ hj-ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h&Time compare state (1 = ON or 0 = OFF)h]h&Time compare state (1 = ON or 0 = OFF)}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$ hjDubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj&ubeh}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(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:}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM' hj\hhubj$)}(h=0x8020 0000 05 h]h=0x8020 0000 05 }hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM* 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&]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-uh1jOhjubj0_)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hEncodingh]hEncoding}(hj˷hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/ hjȷubah}(h]h ]h"]h$]h&]uh1johjŷubjp)}(hhh]h)}(hRegisterh]hRegister}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/ hj߷ubah}(h]h ]h"]h$]h&]uh1johjŷubjp)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/ hjubah}(h]h ]h"]h$]h&]uh1johjŷubeh}(h]h ]h"]h$]h&]uh1jjhj·ubah}(h]h ]h"]h$]h&]uh1j/_hjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x8020 0000 0500 0000h]h0x8020 0000 0500 0000}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1 hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hf[0]h]hf[0]}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1 hj6ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFloating point register 0h]hFloating point register 0}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1 hjMubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hjmubah}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjjubjp)}(hhh]h}(h]h ]h"]h$]h&]uh1johjjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x8020 0000 0500 001fh]h0x8020 0000 0500 001f}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3 hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hf[31]h]hf[31]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3 hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFloating point register 31h]hFloating point register 31}(hjиhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3 hj͸ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x8020 0000 0500 0020h]h0x8020 0000 0500 0020}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4 hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hfcsrh]hfcsr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4 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&]uh1hhhhM4 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)}(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:}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7 hj\hhubj$)}(h0x8020 0000 06 (fcsr) 0x8030 0000 06 (non-fcsr)h]h0x8020 0000 06 (fcsr) 0x8030 0000 06 (non-fcsr)}hjYsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM: hj\hhubh)}(h/Following are the RISC-V D-extension registers:h]h/Following are the RISC-V D-extension registers:}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hj\hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjxubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhjxubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jOhjxubj0_)}(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&]uh1j/_hjxubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0600 0000h]h0x8030 0000 0600 0000}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hf[0]h]hf[0]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hFloating point register 0h]hFloating point register 0}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hj$ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h...h]h...}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC 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&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x8030 0000 0600 001fh]h0x8030 0000 0600 001f}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjvubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(hf[31]h]hf[31]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjubah}(h]h ]h"]h$]h&]uh1johjsubjp)}(hhh]h)}(hFloating point register 31h]hFloating point register 31}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD hjubah}(h]h ]h"]h$]h&]uh1johjsubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h0x8020 0000 0600 0020h]h0x8020 0000 0600 0020}(hjǺhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME hjĺubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(hfcsrh]hfcsr}(hj޺hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhME hjۺubah}(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&]uh1hhhhME hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jehjxubeh}(h]h ]h"]h$]h&]colsKuh1jJhjuubah}(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.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH 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:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMK hj\hhubj$)}(h.0x9030 0000 0001 00 (64-bit)h]h.0x9030 0000 0001 00 (64-bit)}hj>sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMN 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:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hj\hhubj$)}(h0x9030 0000 0002 h]h0x9030 0000 0002 }hjZsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMS 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}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphhhhhMW 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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMY hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMY hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hallh]h)}(hjŻh]hall}(hjǻhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ hjûubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMZ 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_one_reg (in and out)h]h)}(hj!h]hstruct kvm_one_reg (in and out)}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\ hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM\ hjhhubjd)}(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}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hjMubah}(h]h ]h"]h$]h&]uh1jxhj<ubeh}(h]h ]h"]h$]h&]uh1jchhhM] hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjphhhhhMY ubh)}(hErrors include:h]hErrors include:}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_ hjphhubh)}(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&]colwidthK0 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 hjƾhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM 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 hjhhubj$)}(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]; };}hjĿsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubj)}(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:}(hjٿhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjտubj)}(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&]uh1jhjտubeh}(h]h ]h"]h$]h&]uh1jhhhM hjҿubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(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}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(h KVM_CAP_PIT2h]h)}(hjUh]h KVM_CAP_PIT2}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjSubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhM hj?hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhM hj?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_pit_config (in)h]h)}(hjh]hstruct kvm_pit_config (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)}(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&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj?hhubeh}(h]h ]h"]h$]h&]uh1j^hj.hhhhhM 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:}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubj$)}(hBstruct kvm_pit_config { __u32 flags; __u32 pad[15]; };h]hBstruct kvm_pit_config { __u32 flags; __u32 pad[15]; };}hj=sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj.hhubh)}(hValid flags are::h]hValid flags are:}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubj$)}(hC#define KVM_PIT_SPEAKER_DUMMY 1 /* emulate speaker port stub */h]hC#define KVM_PIT_SPEAKER_DUMMY 1 /* emulate speaker port stub */}hjYsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj.hhubh)}(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:}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubj$)}(hkvm-pit/h]hkvm-pit/}hjusbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hj.hhubh)}(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 hj.hhubh)}(h0This IOCTL replaces the obsolete KVM_CREATE_PIT.h]h0This IOCTL replaces the obsolete KVM_CREATE_PIT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubeh}(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)}(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)}(hvm ioctlh]h)}(hj*h]hvm 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}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(hstruct kvm_pit_state2 (out)h]h)}(hjXh]hstruct kvm_pit_state2 (out)}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjVubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjshhhKubjy)}(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&]uh1jxhjsubeh}(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.}(hjhhhNhNubah}(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}(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_PIT_STATE2h]h)}(hjh]hKVM_CAP_PIT_STATE2}(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 Architecturesh]h Architectures}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj8hhhKubjy)}(hx86h]h)}(hjKh]hx86}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjIubah}(h]h ]h"]h$]h&]uh1jxhj8ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(hvm ioctlh]h)}(hjyh]hvm ioctl}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjwubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(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 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)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(h-This IOCTL replaces the obsolete KVM_SET_PIT.h]h-This IOCTL replaces the obsolete KVM_SET_PIT.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj/hhhKubjy)}(hKVM_CAP_PPC_GET_SMMU_INFOh]h)}(hjBh]hKVM_CAP_PPC_GET_SMMU_INFO}(hjDhhhNhNubah}(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)}(hpowerpch]h)}(hjph]hpowerpc}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjnubah}(h]h ]h"]h$]h&]uh1jxhj]ubeh}(h]h ]h"]h$]h&]uh1jchhhM hj,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)}(hNoneh]h)}(hjh]hNone}(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)}(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)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(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:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(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]; };}hj8sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjhhubh)}(hThe supported flags are:h]hThe supported flags are:}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(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:}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjbubj)}(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.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjtubah}(h]h ]h"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]uh1jhhhM hj_ubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1jhjXubj)}(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&]uh1jhjXubj)}(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.}(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&]uh1jhjXubeh}(h]h ]h"]h$]h&]jjuh1hhhhM hjTubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hAThe "slb_size" field indicates how many SLB entries are supportedh]hEThe “slb_size” field indicates how many SLB entries are supported}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM& hjhhubh)}(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:}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM( hjhhubj$)}(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]; };}hjIsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM, hjhhubh)}(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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hjhhubh)}(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.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6 hjhhubh)}(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:}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM: hjhhubj$)}(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#hhhMA hjhhubh)}(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&]uh1hhhhMF hjhhubeh}(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&]uh1hhjhhhhhMK 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&]uh1hhhhMM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMM hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86 s390 arm64h]h)}(hjh]hx86 s390 arm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMN hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hj(h]hvm ioctl}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO hj&ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMO hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(hstruct kvm_irqfd (in)h]h)}(hjVh]hstruct kvm_irqfd (in)}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMP hjTubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhMP hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjqhhhKubjy)}(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&]uh1hhhhMQ hjubah}(h]h ]h"]h$]h&]uh1jxhjqubeh}(h]h ]h"]h$]h&]uh1jchhhMQ hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMM 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&]uh1hhhhMS 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&]uh1hhhhM[ 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&]uh1hhhhMh 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&]uh1hhhhMj 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&]uh1hhhhMk 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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMj hjhhubeh}(h] kvm-irqfdah ]h"]4.75 kvm_irqfdah$]h&]uh1hhjhhhhhMK ubh)}(hhh](h)}(h4.76 KVM_PPC_ALLOCATE_HTABh]h4.76 KVM_PPC_ALLOCATE_HTAB}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hhhhhMr ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<hhhKubjy)}(hKVM_CAP_PPC_ALLOC_HTABh]h)}(hjOh]hKVM_CAP_PPC_ALLOC_HTAB}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjMubah}(h]h ]h"]h$]h&]uh1jxhj<ubeh}(h]h ]h"]h$]h&]uh1jchhhMt hj9hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjjhhhKubjy)}(hpowerpch]h)}(hj}h]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hj{ubah}(h]h ]h"]h$]h&]uh1jxhjjubeh}(h]h ]h"]h$]h&]uh1jchhhMu hj9hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMv hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMv hj9hhubjd)}(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&]uh1hhhhMw hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMw hj9hhubjd)}(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&]uh1hhhhMx hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMx hj9hhubeh}(h]h ]h"]h$]h&]uh1j^hj(hhhhhMt 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.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMz hj(hhubh)}(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.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj(hhubh)}(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.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj(hhubh)}(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).}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj(hhubh)}(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.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj(hhubeh}(h]kvm-ppc-allocate-htabah ]h"]4.76 kvm_ppc_allocate_htabah$]h&]uh1hhjhhhhhMr ubh)}(hhh](h)}(h4.77 KVM_S390_INTERRUPTh]h4.77 KVM_S390_INTERRUPT}(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&]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)}(hjh]hvm 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_s390_interrupt (in)h]h)}(hj(h]hstruct kvm_s390_interrupt (in)}(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}(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&]uh1hhhhM hjTubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjwhhhhhM 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.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjwhhubh)}(h8Interrupt parameters are passed via kvm_s390_interrupt::h]h7Interrupt parameters are passed via kvm_s390_interrupt:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjwhhubj$)}(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 hjwhhubh)}(h!type can be one of the following:h]h!type can be one of the following:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjwhhubj)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(hprogram check; code in parmh]h)}(hjh]hprogram check; code in parm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjubah}(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)}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj5ubj)}(hhh]h)}(hhh]j)}(h'sigp set prefix; prefix address in parmh]h)}(hjOh]h'sigp set prefix; prefix address in parm}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjMubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjGubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubj)}(h!KVM_S390_RESTART (vcpu) - restarth](j)}(hKVM_S390_RESTART (vcpu)h]hKVM_S390_RESTART (vcpu)}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjvubj)}(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&]uh1jhjvubeh}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(hCPU timer interrupth]h)}(hjh]hCPU timer interrupt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]jjuh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(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)}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj9ubj)}(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}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjQubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjKubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(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 hj{ubj)}(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&]uh1jhj{ubeh}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjubj)}(hhh]h)}(hhh]j)}(h&sigp external call; source cpu in parmh]h)}(hjh]h&sigp external call; 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)}(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)}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj>ubj)}(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)}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjVubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]jjuh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(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&]uh1jhjwhhhNhNubh)}(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 hjwhhubeh}(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}(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_HTAB_FDh]h)}(hjh]hKVM_CAP_PPC_HTAB_FD}(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)}(hpowerpch]h)}(hj3h]hpowerpc}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj1ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNhhhKubjy)}(hvm ioctlh]h)}(hjah]hvm ioctl}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj_ubah}(h]h ]h"]h$]h&]uh1jxhjNubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|hhhKubjy)}(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&]uh1jxhj|ubeh}(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:}(hjhhhNhNubah}(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.}(hjhhhNhNubah}(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.}(hj hhhNhNubah}(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:}(hjhhhNhNubah}(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; };}hj%sbah}(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.}(hj3hhhNhNubah}(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}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj]hhhKubjy)}(hKVM_CAP_DEVICE_CTRLh]h)}(hjph]hKVM_CAP_DEVICE_CTRL}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjnubah}(h]h ]h"]h$]h&]uh1jxhj]ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjZhhubjd)}(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 hjZhhubjd)}(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 hjZhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h!struct kvm_create_device (in/out)h]h)}(hjh]h!struct kvm_create_device (in/out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjZhhubjd)}(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 hjZhhubeh}(h]h ]h"]h$]h&]uh1j^hjIhhhhhM ubh)}(hErrors:h]hErrors:}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjIhhubh)}(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&]colwidthKuh1jOhj_ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK7uh1jOhj_ubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hENODEVh]hENODEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj|ubah}(h]h ]h"]h$]h&]uh1johjyubjp)}(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&]uh1johjyubeh}(h]h ]h"]h$]h&]uh1jjhjvubjk)}(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&]uh1jjhjvubeh}(h]h ]h"]h$]h&]uh1jehj_ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj\ubah}(h]h ]h"]h$]h&]uh1jEhjXubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjXubeh}(h]h ]h"]h$]h&]uh1hhhhM hjIhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjIhhubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjIhhubh)}(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.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjIhhubj$)}(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 */ };}hj8sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM% hjIhhubeh}(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}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhhhhhM, ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjbhhhKubjy)}(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)}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM. hjsubah}(h]h ]h"]h$]h&]uh1jxhjbubeh}(h]h ]h"]h$]h&]uh1jchhhM. hj_hhubjd)}(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&]uh1hhhhM1 hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM1 hj_hhubjd)}(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&]uh1hhhhM2 hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM2 hj_hhubjd)}(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&]uh1hhhhM3 hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM3 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}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4 hj,ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM4 hj_hhubeh}(h]h ]h"]h$]h&]uh1j^hjNhhhhhM. ubh)}(hErrors:h]hErrors:}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6 hjNhhubh)}(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&]colwidthKuh1jOhjeubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1jOhjeubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hENXIOh]hENXIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9 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&]uh1hhhhM9 hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj|ubjk)}(hhh](jp)}(hhh]h)}(hEPERMh]hEPERM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM; 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&]uh1hhhhM; hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhj|ubeh}(h]h ]h"]h$]h&]uh1jehjeubeh}(h]h ]h"]h$]h&]colsKuh1jJhjbubah}(h]h ]h"]h$]h&]uh1jEhj^ubh)}(hAOther error conditions may be defined by individual device types.h]hAOther error conditions may be defined by individual device types.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@ hj^ubeh}(h]h ]h"]h$]h&]uh1hhhhM8 hjNhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMB hjNhhubj$)}(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 */ };}hj"sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMI hjNhhubeh}(h]'kvm-set-device-attr-kvm-get-device-attrah ]h"],4.80 kvm_set_device_attr/kvm_get_device_attrah$]h&]uh1hhjhhhhhM, ubh)}(hhh](h)}(h4.81 KVM_HAS_DEVICE_ATTRh]h4.81 KVM_HAS_DEVICE_ATTR}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhMQ ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjLhhhKubjy)}(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}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS hj]ubah}(h]h ]h"]h$]h&]uh1jxhjLubeh}(h]h ]h"]h$]h&]uh1jchhhMS hjIhhubjd)}(hhh](ji)}(hTypeh]hType}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj{hhhKubjy)}(h"device ioctl, vm ioctl, vcpu ioctlh]h)}(hjh]h"device ioctl, vm ioctl, vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMV hjubah}(h]h ]h"]h$]h&]uh1jxhj{ubeh}(h]h ]h"]h$]h&]uh1jchhhMV hjIhhubjd)}(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&]uh1hhhhMW hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMW hjIhhubjd)}(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&]uh1hhhhMX hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMX hjIhhubeh}(h]h ]h"]h$]h&]uh1j^hj8hhhhhMS ubh)}(hErrors:h]hErrors:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZ hj8hhubh)}(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&]colwidthKuh1jOhj!ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1jOhj!ubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hENXIOh]hENXIO}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hj>ubah}(h]h ]h"]h$]h&]uh1johj;ubjp)}(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.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hjUubah}(h]h ]h"]h$]h&]uh1johj;ubeh}(h]h ]h"]h$]h&]uh1jjhj8ubah}(h]h ]h"]h$]h&]uh1jehj!ubeh}(h]h ]h"]h$]h&]colsKuh1jJhjubah}(h]h ]h"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&]uh1hhhhM\ hj8hhubh)}(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&]uh1hhhhMa hj8hhubj@)}(h.. _KVM_ARM_VCPU_INIT:h]h}(h]h ]h"]h$]h&]jKkvm-arm-vcpu-inituh1j?hMf hj8hhhhubeh}(h]kvm-has-device-attrah ]h"]4.81 kvm_has_device_attrah$]h&]uh1hhjhhhhhMQ ubh)}(hhh](h)}(h4.82 KVM_ARM_VCPU_INITh]h4.82 KVM_ARM_VCPU_INIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMi 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&]uh1hhhhMk hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMk hjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(harm64h]h)}(hjh]harm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMl hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hj/h]h vcpu ioctl}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMm hj-ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMm hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjJhhhKubjy)}(hstruct kvm_vcpu_init (in)h]h)}(hj]h]hstruct kvm_vcpu_init (in)}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn hj[ubah}(h]h ]h"]h$]h&]uh1jxhjJubeh}(h]h ]h"]h$]h&]uh1jchhhMn hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjxhhhKubjy)}(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&]uh1hhhhMo hjubah}(h]h ]h"]h$]h&]uh1jxhjxubeh}(h]h ]h"]h$]h&]uh1jchhhMo hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMk ubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMq 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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMt hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hENOENTh]hENOENT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h$a features bit specified is unknown.h]h$a features bit specified is unknown.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMu hj-ubah}(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&]uh1hhhhMs 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.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMx 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) h](j)}(h"The initial values are defined as:h]h"The initial values are defined as:}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hjtubj)}(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)}(hjh]h8General Purpose registers, including PC and SP: set to 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hFPSIMD/NEON registers: set to 0h]h)}(hjh]hFPSIMD/NEON registers: set to 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hSVE registers: set to 0h]h)}(hj*h]hSVE registers: set to 0}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj(ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hgSystem registers: Reset to their architecturally defined values as for a warm reset to EL1 (resp. SVC) h]h)}(hfSystem registers: Reset to their architecturally defined values as for a warm reset to EL1 (resp. SVC)h]hfSystem registers: Reset to their architecturally defined values as for a warm reset to EL1 (resp. SVC)}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj?ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhM~ hjubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jhhhM hjqubah}(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.}(hjohhhNhNubah}(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.}(hj}hhhNhNubah}(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. 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(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):}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj0ubh)}(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:}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjIubh)}(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.}(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 hjIubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(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&]uh1jhjFubj)}(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):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubh)}(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.}(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 hjubeh}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]jjuh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1hhhhM hj0ubeh}(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&]uh1hhjhhhhhMi jm}jfjsjo}jjsubh)}(hhh](h)}(h4.83 KVM_ARM_PREFERRED_TARGETh]h4.83 KVM_ARM_PREFERRED_TARGET}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhhhhhM 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 hj|hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(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 hj|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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hstruct kvm_vcpu_init (out)h]h)}(hjh]hstruct kvm_vcpu_init (out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(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&]uh1jhhj7hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjHubah}(h]h ]h"]h$]h&]uh1jxhj7ubeh}(h]h ]h"]h$]h&]uh1jchhhM hj|hhubeh}(h]h ]h"]h$]h&]uh1j^hjkhhhhhM ubh)}(hErrors:h]hErrors:}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjkhhubh)}(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&]colsKuh1jJhj~ubah}(h]h ]h"]h$]h&]uh1jEhjzubah}(h]h ]h"]h$]h&]uh1hhhhM hjkhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjkhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjkhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjkhhubeh}(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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(hbasich]h)}(hjDh]hbasic}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhM hj.hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_hhhKubjy)}(harm64, mips, riscvh]h)}(hjrh]harm64, mips, riscv}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjpubah}(h]h ]h"]h$]h&]uh1jxhj_ubeh}(h]h ]h"]h$]h&]uh1jchhhM hj.hhubjd)}(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 hj.hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_reg_list (in/out)h]h)}(hjh]hstruct kvm_reg_list (in/out)}(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)}(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)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(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&]colwidthKuh1jOhj3ubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK>uh1jOhj3ubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hE2BIGh]hE2BIG}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjPubah}(h]h ]h"]h$]h&]uh1johjMubjp)}(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).}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjgubah}(h]h ]h"]h$]h&]uh1johjMubeh}(h]h ]h"]h$]h&]uh1jjhjJubah}(h]h ]h"]h$]h&]uh1jehj3ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj0ubah}(h]h ]h"]h$]h&]uh1jEhj,ubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj$)}(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#hhhM hjhhubh)}(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&]uh1hhhhM hjhhubh)}(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&]uh1hhhhMhjhhubh)}(hhh](j)}(hKVM_REG_S390_TODPR h]h)}(hKVM_REG_S390_TODPRh]hKVM_REG_S390_TODPR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hKVM_REG_S390_EPOCHDIFF h]h)}(hKVM_REG_S390_EPOCHDIFFh]hKVM_REG_S390_EPOCHDIFF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hKVM_REG_S390_CPU_TIMER h]h)}(hKVM_REG_S390_CPU_TIMERh]hKVM_REG_S390_CPU_TIMER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hKVM_REG_S390_CLOCK_COMP h]h)}(hKVM_REG_S390_CLOCK_COMPh]hKVM_REG_S390_CLOCK_COMP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hKVM_REG_S390_PFTOKEN h]h)}(hKVM_REG_S390_PFTOKENh]hKVM_REG_S390_PFTOKEN}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj*ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hKVM_REG_S390_PFCOMPARE h]h)}(hKVM_REG_S390_PFCOMPAREh]hKVM_REG_S390_PFCOMPARE}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hKVM_REG_S390_PFSELECT h]h)}(hKVM_REG_S390_PFSELECTh]hKVM_REG_S390_PFSELECT}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hKVM_REG_S390_PP h]h)}(hKVM_REG_S390_PPh]hKVM_REG_S390_PP}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hKVM_REG_S390_GBEA h]h)}(hKVM_REG_S390_GBEAh]hKVM_REG_S390_GBEA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjhhubeh}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_ARM_SET_DEVICE_ADDRh]h)}(hjh]hKVM_CAP_ARM_SET_DEVICE_ADDR}(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)}(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}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(hvm ioctlh]h)}(hj3h]hvm ioctl}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjNhhhKubjy)}(h"struct kvm_arm_device_address (in)h]h)}(hjah]h"struct kvm_arm_device_address (in)}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jxhjNubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(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&]uh1hhhhM hjhhubh)}(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&]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)}(hThe device id is unknownh]hThe device id is unknown}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hENXIOh]hENXIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h&Device not supported on current systemh]h&Device not supported on current system}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hj1ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hEEXISTh]hEEXIST}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjQubah}(h]h ]h"]h$]h&]uh1johjNubjp)}(hhh]h)}(hAddress already seth]hAddress already set}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjhubah}(h]h ]h"]h$]h&]uh1johjNubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(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&]uh1jjhjubjk)}(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}(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&]uh1hhhhM"hjhhubj$)}(hAstruct kvm_arm_device_addr { __u64 id; __u64 addr; };h]hAstruct kvm_arm_device_addr { __u64 id; __u64 addr; };}hj sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM,hjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjhhubh)}(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:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjhhubj$)}(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 |}hj6sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM9hjhhubh)}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjhhubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjhhubeh}(h]"kvm-arm-set-device-addr-deprecatedah ]h"])4.85 kvm_arm_set_device_addr (deprecated)ah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.86 KVM_PPC_RTAS_DEFINE_TOKENh]h4.86 KVM_PPC_RTAS_DEFINE_TOKEN}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhhMIubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|hhhKubjy)}(hKVM_CAP_PPC_RTASh]h)}(hjh]hKVM_CAP_PPC_RTAS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhMKhjyhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hppch]h)}(hjh]hppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMLhjyhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMMhjyhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_rtas_token_argsh]h)}(hjh]hstruct kvm_rtas_token_args}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMNhjyhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj7hhhNhNubah}(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}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjEubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMOhjyhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhhMKubh)}(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.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjhhhubeh}(h]kvm-ppc-rtas-define-tokenah ]h"]4.86 kvm_ppc_rtas_define_tokenah$]h&]uh1hhjhhhhhMIubh)}(hhh](h)}(h4.87 KVM_SET_GUEST_DEBUGh]h4.87 KVM_SET_GUEST_DEBUG}(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_SET_GUEST_DEBUGh]h)}(hjh]hKVM_CAP_SET_GUEST_DEBUG}(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)}(hx86, s390, ppc, arm64h]h)}(hjh]hx86, s390, ppc, 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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMahjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_guest_debug (in)h]h)}(hj0h]hstruct kvm_guest_debug (in)}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj.ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMbhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjKhhhKubjy)}(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&]uh1hhhhMchj\ubah}(h]h ]h"]h$]h&]uh1jxhjKubeh}(h]h ]h"]h$]h&]uh1jchhhMchjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM_ubj$)}(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#hhhMghjhhubh)}(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&]uh1hhhhMmhjhhubh)}(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&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjhhubeh}(h]logical-read-writeah ]h"]logical read/write:ah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hAbsolute read/write:h]hAbsolute read/write:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMEubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjhhubj)}(hhh]j)}(hZSupported flags: * ``KVM_S390_MEMOP_F_CHECK_ONLY`` * ``KVM_S390_MEMOP_F_SKEY_PROTECTION`` h](j)}(hSupported flags:h]hSupported flags:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMShjubj)}(hhh]h)}(hhh](j)}(h``KVM_S390_MEMOP_F_CHECK_ONLY``h]h)}(hjh]j)}(hjh]hKVM_S390_MEMOP_F_CHECK_ONLY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1hhhhMShj"ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMShjubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(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.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjhhubeh}(h]absolute-read-writeah ]h"]absolute read/write:ah$]h&]uh1hhjhhhhhMEubh)}(hhh](h)}(hAbsolute cmpxchg:h]hAbsolute cmpxchg:}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhhhhhMYubh)}(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&]uh1hhhhM[hjqhhubj)}(hhh]j)}(h8Supported flags: * ``KVM_S390_MEMOP_F_SKEY_PROTECTION`` h](j)}(hSupported flags:h]hSupported flags:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhhjubj)}(hhh]h)}(hhh]j)}(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&]uh1hhhhMhhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1hhhhMhhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhhjubah}(h]h ]h"]h$]h&]uh1jhjqhhhNhNubeh}(h]absolute-cmpxchgah ]h"]absolute cmpxchg:ah$]h&]uh1hhjhhhhhMYubh)}(hhh](h)}(hSIDA read/write:h]hSIDA read/write:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMkubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhjhhubh)}(hNo flags are supported.h]hNo flags are supported.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjhhubeh}(h]sida-read-writeah ]h"]sida read/write:ah$]h&]uh1hhjhhhhhMkubeh}(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}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhMvubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=hhhKubjy)}(hKVM_CAP_S390_SKEYSh]h)}(hjPh]hKVM_CAP_S390_SKEYS}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjNubah}(h]h ]h"]h$]h&]uh1jxhj=ubeh}(h]h ]h"]h$]h&]uh1jchhhMxhj:hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjkhhhKubjy)}(hs390h]h)}(hj~h]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj|ubah}(h]h ]h"]h$]h&]uh1jxhjkubeh}(h]h ]h"]h$]h&]uh1jchhhMyhj:hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMzhj:hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_s390_skeysh]h)}(hjh]hstruct kvm_s390_skeys}(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)}(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}(hj hhhNhNubah}(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^hj)hhhhhMxubh)}(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:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubj$)}(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]; };}hj8sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj)hhubh)}(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.+}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(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.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubeh}(h]kvm-s390-get-skeysah ]h"]4.90 kvm_s390_get_skeysah$]h&]uh1hhjhhhhhMvubh)}(hhh](h)}(h4.91 KVM_S390_SET_SKEYSh]h4.91 KVM_S390_SET_SKEYS}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhhhhhMubj_)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_s390_skeysh]h)}(hj)h]hstruct kvm_s390_skeys}(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}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(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}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjUubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjxhhhhhMubh)}(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.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxhhubh)}(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&]uh1hhhhMhjxhhubh)}(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&]uh1hhhhMhjxhhubh)}(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&]uh1hhhhMhjxhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxhhubeh}(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}(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_INJECT_IRQh]h)}(hjh]hKVM_CAP_S390_INJECT_IRQ}(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)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj7hhhKubjy)}(h vcpu ioctlh]h)}(hjJh]h vcpu ioctl}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHubah}(h]h ]h"]h$]h&]uh1jxhj7ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjehhhKubjy)}(hstruct kvm_s390_irq (in)h]h)}(hjxh]hstruct kvm_s390_irq (in)}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjvubah}(h]h ]h"]h$]h&]uh1jxhjeubeh}(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)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKAuh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hEBUSYh]hEBUSY}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1johj.ubjp)}(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}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHubah}(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&]uh1hhhhMhjhhubh)}(h+Allows to inject an interrupt to the guest.h]h+Allows to inject an interrupt to the guest.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(h2Interrupt parameters are passed via kvm_s390_irq::h]h1Interrupt parameters are passed via kvm_s390_irq:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(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#hhhMhjhhubh)}(h!type can be one of the following:h]h!type can be one of the following:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hhh](j)}(h2KVM_S390_SIGP_STOP - sigp stop; parameter in .stoph]h)}(hjh]h2KVM_S390_SIGP_STOP - sigp stop; parameter in .stop}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h8KVM_S390_PROGRAM_INT - program check; parameters in .pgmh]h)}(hjh]h8KVM_S390_PROGRAM_INT - program check; parameters in .pgm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hAKVM_S390_SIGP_SET_PREFIX - sigp set prefix; parameters in .prefixh]h)}(hjh]hAKVM_S390_SIGP_SET_PREFIX - sigp set prefix; parameters in .prefix}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h)KVM_S390_RESTART - restart; no parametersh]h)}(hjh]h)KVM_S390_RESTART - restart; no parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hCKVM_S390_INT_CLOCK_COMP - clock comparator interrupt; no parametersh]h)}(hj%h]hCKVM_S390_INT_CLOCK_COMP - clock comparator interrupt; no parameters}(hj'hhhNhNubah}(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)}(hj<h]h;KVM_S390_INT_CPU_TIMER - CPU timer interrupt; no parameters}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h=KVM_S390_INT_EMERGENCY - sigp emergency; parameters in .emergh]h)}(hjSh]h=KVM_S390_INT_EMERGENCY - sigp emergency; parameters in .emerg}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hGKVM_S390_INT_EXTERNAL_CALL - sigp external call; parameters in .extcallh]h)}(hjjh]hGKVM_S390_INT_EXTERNAL_CALL - sigp external call; parameters in .extcall}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhubah}(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&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(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&]uh1hhhhMhjhhubj$)}(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#hhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(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}(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_IRQ_STATEh]h)}(hj)h]hKVM_CAP_S390_IRQ_STATE}(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}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(hs390h]h)}(hjWh]hs390}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjUubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrhhhKubjy)}(h vcpu ioctlh]h)}(hjh]h vcpu ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjrubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_s390_irq_state (in)h]h)}(hjh]hstruct kvm_s390_irq_state (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 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.}(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)}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(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#hhhM#hjhhubh)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjhhubh)}(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.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjhhubh)}(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.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjhhubeh}(h]kvm-s390-set-irq-stateah ]h"]4.95 kvm_s390_set_irq_stateah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h 4.96 KVM_SMIh]h 4.96 KVM_SMI}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhhhhhM7ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjehhhKubjy)}(hKVM_CAP_X86_SMMh]h)}(hjxh]hKVM_CAP_X86_SMM}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjvubah}(h]h ]h"]h$]h&]uh1jxhjeubeh}(h]h ]h"]h$]h&]uh1jchhhM9hjbhhubjd)}(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:hjbhhubjd)}(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;hjbhhubjd)}(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<hjbhhubjd)}(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}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj.ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM=hjbhhubeh}(h]h ]h"]h$]h&]uh1j^hjQhhhhhM9ubh)}(h#Queues an SMI on the thread's vcpu.h]h%Queues an SMI on the thread’s vcpu.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjQhhubeh}(h]kvm-smiah ]h"] 4.96 kvm_smiah$]h&]uh1hhjhhhhhM7ubh)}(hhh](h)}(h4.97 KVM_X86_SET_MSR_FILTERh]h4.97 KVM_X86_SET_MSR_FILTER}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhhMBubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|hhhKubjy)}(hKVM_CAP_X86_MSR_FILTERh]h)}(hjh]hKVM_CAP_X86_MSR_FILTER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhMDhjyhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMEhjyhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMFhjyhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_msr_filterh]h)}(hjh]hstruct kvm_msr_filter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMGhjyhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(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&]uh1hhhhMHhjEubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMHhjyhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhhMDubj$)}(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]; };}hjisbah}(h]h ]h"]h$]h&]hhuh1j#hhhMLhjhhhubh)}(h1flags values for ``struct kvm_msr_filter_range``:h](hflags values for }(hjwhhhNhNubj)}(h``struct kvm_msr_filter_range``h]hstruct kvm_msr_filter_range}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh:}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM]hjhhhubh)}(h``KVM_MSR_FILTER_READ``h]j)}(hjh]hKVM_MSR_FILTER_READ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM_hjhhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjubah}(h]h ]h"]h$]h&]uh1hhhhMahjhhhubh)}(h``KVM_MSR_FILTER_WRITE``h]j)}(hjh]hKVM_MSR_FILTER_WRITE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMfhjhhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhjubah}(h]h ]h"]h$]h&]uh1hhhhMhhjhhhubh)}(h+flags values for ``struct kvm_msr_filter``:h](hflags values for }(hjhhhNhNubj)}(h``struct kvm_msr_filter``h]hstruct kvm_msr_filter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMmhjhhhubh)}(h ``KVM_MSR_FILTER_DEFAULT_ALLOW``h]j)}(hjh]hKVM_MSR_FILTER_DEFAULT_ALLOW}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMohjhhhubh)}(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.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhj,ubah}(h]h ]h"]h$]h&]uh1hhhhMqhjhhhubh)}(h``KVM_MSR_FILTER_DEFAULT_DENY``h]j)}(hjFh]hKVM_MSR_FILTER_DEFAULT_DENY}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1hhhhMthjhhhubh)}(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.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj[ubah}(h]h ]h"]h$]h&]uh1hhhhMvhjhhhubh)}(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).}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjhhhubh)}(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&]uh1hhhhM~hjhhhubh)}(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&]uh1hhhhMhjhhhubh)}(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&]uh1hhhhMhjhhhubh)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is invalid and causes an error.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhhubj?)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1j?hjhhhhhhNubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhhubeh}(h]kvm-x86-set-msr-filterah ]h"]4.97 kvm_x86_set_msr_filterah$]h&]uh1hhjhhhhhMBubh)}(hhh](h)}(h4.98 KVM_CREATE_SPAPR_TCE_64h]h4.98 KVM_CREATE_SPAPR_TCE_64}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(hKVM_CAP_SPAPR_TCE_64h]h)}(hjXh]hKVM_CAP_SPAPR_TCE_64}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjVubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMhjBhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjshhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjsubeh}(h]h ]h"]h$]h&]uh1jchhhMhjBhhubjd)}(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&]uh1jchhhMhjBhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h#struct kvm_create_spapr_tce_64 (in)h]h)}(hjh]h#struct kvm_create_spapr_tce_64 (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjBhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjBhhubeh}(h]h ]h"]h$]h&]uh1j^hj1hhhhhMubh)}(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}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubh)}(h9This capability uses extended struct in ioctl interface::h]h8This capability uses extended struct in ioctl interface:}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubj$)}(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 */ };}hjNsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj1hhubh)}(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.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubh)}(h"@flags are not used at the moment.h]h"@flags are not used at the moment.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubh)}(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.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1hhubeh}(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&]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)}(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)}(h struct kvm_reinject_control (in)h]h)}(hj?h]h struct kvm_reinject_control (in)}(hjAhhhNhNubah}(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&]uh1jhhjZhhhKubjy)}(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.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjkubah}(h]h ]h"]h$]h&]uh1jxhjZubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h0KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3h]h)}(hjh]h0KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3}(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)}(hppch]h)}(hjh]hppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(hvm ioctlh]h)}(hjDh]hvm ioctl}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_hhhKubjy)}(hstruct kvm_ppc_mmuv3_cfg (in)h]h)}(hjrh]hstruct kvm_ppc_mmuv3_cfg (in)}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjpubah}(h]h ]h"]h$]h&]uh1jxhj_ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(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&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(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; };}hjsbah}(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.}(hjhhhNhNubah}(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.}(hjhhhNhNubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_PPC_MMU_RADIXh]h)}(hj)h]hKVM_CAP_PPC_MMU_RADIX}(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}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(hppch]h)}(hjWh]hppc}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjUubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjrubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_ppc_rmmu_info (out)h]h)}(hjh]hstruct kvm_ppc_rmmu_info (out)}(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)}(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}(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 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(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]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM"hjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjhhubh)}(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.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjhhubeh}(h]kvm-ppc-get-rmmu-infoah ]h"]4.101 kvm_ppc_get_rmmu_infoah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h 4.102 KVM_PPC_RESIZE_HPT_PREPAREh]h 4.102 KVM_PPC_RESIZE_HPT_PREPARE}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhM6ubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjWhhhKubjy)}(hKVM_CAP_SPAPR_RESIZE_HPTh]h)}(hjjh]hKVM_CAP_SPAPR_RESIZE_HPT}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjhubah}(h]h ]h"]h$]h&]uh1jxhjWubeh}(h]h ]h"]h$]h&]uh1jchhhM8hjThhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hpowerpch]h)}(hjh]hpowerpc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM9hjThhubjd)}(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:hjThhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_ppc_resize_hpt (in)h]h)}(hjh]hstruct kvm_ppc_resize_hpt (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM;hjThhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(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&]uh1hhhhM<hj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM<hjThhubeh}(h]h ]h"]h$]h&]uh1j^hjChhhhhM8ubh)}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjChhubj$)}(hUstruct kvm_ppc_resize_hpt { __u64 flags; __u32 shift; __u32 pad; };h]hUstruct kvm_ppc_resize_hpt { __u64 flags; __u32 shift; __u32 pad; };}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMJhjChhubh)}(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.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjChhubh)}(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.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjChhubh)}(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:}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjChhubh)}(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&]uh1hhhhM[hjubah}(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&]uh1hhhhM\hjubah}(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&]uh1hhhhM^hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1hhhhM[hjubah}(h]h ]h"]h$]h&]uh1hhhhM[hjChhubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjChhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjChhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjChhubeh}(h]kvm-ppc-resize-hpt-prepareah ]h"] 4.102 kvm_ppc_resize_hpt_prepareah$]h&]uh1hhjhhhhhM6ubh)}(hhh](h)}(h4.103 KVM_PPC_RESIZE_HPT_COMMITh]h4.103 KVM_PPC_RESIZE_HPT_COMMIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMlubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj*hhhKubjy)}(hKVM_CAP_SPAPR_RESIZE_HPTh]h)}(hj=h]hKVM_CAP_SPAPR_RESIZE_HPT}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj;ubah}(h]h ]h"]h$]h&]uh1jxhj*ubeh}(h]h ]h"]h$]h&]uh1jchhhMnhj'hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjXhhhKubjy)}(hpowerpch]h)}(hjkh]hpowerpc}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjiubah}(h]h ]h"]h$]h&]uh1jxhjXubeh}(h]h ]h"]h$]h&]uh1jchhhMohj'hhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMphj'hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_ppc_resize_hpt (in)h]h)}(hjh]hstruct kvm_ppc_resize_hpt (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMqhj'hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMrhj'hhubeh}(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 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjhhubj$)}(hUstruct kvm_ppc_resize_hpt { __u64 flags; __u32 shift; __u32 pad; };h]hUstruct kvm_ppc_resize_hpt { __u64 flags; __u32 shift; __u32 pad; };}hj%sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(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).}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-ppc-resize-hpt-commitah ]h"]4.103 kvm_ppc_resize_hpt_commitah$]h&]uh1hhjhhhhhMlubh)}(hhh](h)}(h#4.104 KVM_X86_GET_MCE_CAP_SUPPORTEDh]h#4.104 KVM_X86_GET_MCE_CAP_SUPPORTED}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshhhhhMubj_)}(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)}(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 system ioctlh]h)}(hjh]h system 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)}(hu64 mce_cap (out)h]h)}(hj$h]hu64 mce_cap (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}(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&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjshhhhhMubh)}(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.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjshhubeh}(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)}(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)}(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)}(hj h]h vcpu 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)}(hu64 mcg_cap (in)h]h)}(hj;h]hu64 mcg_cap (in)}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjVhhhKubjy)}(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.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjgubah}(h]h ]h"]h$]h&]uh1jxhjVubeh}(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)}(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)}(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)}(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}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(hstruct kvm_x86_mce (in)h]h)}(hjRh]hstruct kvm_x86_mce (in)}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjmhhhKubjy)}(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&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1jxhjmubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(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]; };}hjsbah}(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).}(hjhhhNhNubah}(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}(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_CMMA_MIGRATIONh]h)}(hj h]hKVM_CAP_S390_CMMA_MIGRATION}(hj hhhNhNubah}(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)}(hs390h]h)}(hj7h]hs390}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5ubah}(h]h ]h"]h$]h&]uh1jxhj$ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRhhhKubjy)}(hvm ioctlh]h)}(hjeh]hvm ioctl}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubah}(h]h ]h"]h$]h&]uh1jxhjRubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(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&]uh1jchhhMhjhhubjd)}(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&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKCuh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hENOMEMh]hENOMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h7not enough memory can be allocated to complete the taskh]h7not enough memory can be allocated to complete the task}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hENXIOh]hENXIO}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLubah}(h]h ]h"]h$]h&]uh1johjIubjp)}(hhh]h)}(hif CMMA is not enabledh]hif CMMA is not enabled}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubah}(h]h ]h"]h$]h&]uh1johjIubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(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&]uh1jjhjubjk)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hEFAULTh]hEFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(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).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(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&]uh1hhhhMhjhhubh)}(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:}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOubah}(h]h ]h"]h$]h&]uh1jhjLhhhhhNubj)}(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.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjgubah}(h]h ]h"]h$]h&]uh1jhjLhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(h"Each CMMA value takes up one byte.h]h"Each CMMA value takes up one byte.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj$)}(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#hhhMhjhhubh)}(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,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(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&]uh1hhhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubh)}(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;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjhhubh)}(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,}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjhhubh)}(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.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjhhubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjhhubh)}(hmask is unused.h]hmask is unused.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjhhubh)}(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.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjhhubeh}(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}(hj~hhhNhNubah}(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_S390_CMMA_MIGRATIONh]h)}(hjh]hKVM_CAP_S390_CMMA_MIGRATION}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMBhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hs390h]h)}(hjh]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMChjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMDhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_s390_cmma_log (in)h]h)}(hj,h]hstruct kvm_s390_cmma_log (in)}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj*ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMEhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjGhhhKubjy)}(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}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhjXubah}(h]h ]h"]h$]h&]uh1jxhjGubeh}(h]h ]h"]h$]h&]uh1jchhhMFhjhhubeh}(h]h ]h"]h$]h&]uh1j^hj{hhhhhMBubh)}(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.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj{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#hhhMPhj{hhubh)}(h4start_gfn indicates the starting guest frame number,h]h4start_gfn indicates the starting guest frame number,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj{hhubh)}(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&]uh1hhhhM]hj{hhubh)}(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&]uh1hhhhM_hj{hhubh)}(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&]uh1hhhhMahj{hhubh)}(hremaining is not used.h]hremaining is not used.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchj{hhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehj{hhubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj{hhubeh}(h]kvm-s390-set-cmma-bitsah ]h"]4.108 kvm_s390_set_cmma_bitsah$]h&]uh1hhjhhhhhM@ubh)}(hhh](h)}(h4.109 KVM_PPC_GET_CPU_CHARh]h4.109 KVM_PPC_GET_CPU_CHAR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMpubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hKVM_CAP_PPC_GET_CPU_CHARh]h)}(hj)h]hKVM_CAP_PPC_GET_CPU_CHAR}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhj'ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMrhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjDhhhKubjy)}(hpowerpch]h)}(hjWh]hpowerpc}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjUubah}(h]h ]h"]h$]h&]uh1jxhjDubeh}(h]h ]h"]h$]h&]uh1jchhhMshjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjrhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjubah}(h]h ]h"]h$]h&]uh1jxhjrubeh}(h]h ]h"]h$]h&]uh1jchhhMthjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_ppc_cpu_char (out)h]h)}(hjh]hstruct kvm_ppc_cpu_char (out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMuhjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMvhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMrubh)}(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&]uh1hhhhMyhjhhubj$)}(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 */ };}hj sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjhhubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(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.}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]kvm-ppc-get-cpu-charah ]h"]4.109 kvm_ppc_get_cpu_charah$]h&]uh1hhjhhhhhMpubh)}(hhh](h)}(h4.110 KVM_MEMORY_ENCRYPT_OPh]h4.110 KVM_MEMORY_ENCRYPT_OP}(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)}(hbasich]h)}(hj h]hbasic}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhjs ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjp 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&]uh1jchhhMhjp 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&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjp hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(h.an opaque platform specific structure (in/out)h]h)}(hj h]h.an opaque platform specific structure (in/out)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjp 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&]uh1jchhhMhjp 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)}(hCurrently, this ioctl is used for issuing Secure Encrypted Virtualization (SEV) commands on AMD Processors. The SEV commands are defined in Documentation/virt/kvm/x86/amd-memory-encryption.rst.h]hCurrently, this ioctl is used for issuing Secure Encrypted Virtualization (SEV) commands on AMD Processors. The SEV commands are defined in Documentation/virt/kvm/x86/amd-memory-encryption.rst.}(hjn 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)}(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)}(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)}(hj5 h]hstruct kvm_enc_region (in)}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3 ubah}(h]h ]h"]h$]h&]uh1jxhj" ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjP hhhKubjy)}(h0 on success; -1 on error h]h)}(h0 on success; -1 on errorh]h0 on success; -1 on error}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhja ubah}(h]h ]h"]h$]h&]uh1jxhjP 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)}(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)}(hsystemh]h)}(hj: h]hsystem}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8 ubah}(h]h ]h"]h$]h&]uh1jxhj' ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjU hhhKubjy)}(hstruct kvm_enc_region (in)h]h)}(hjh h]hstruct kvm_enc_region (in)}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf ubah}(h]h ]h"]h$]h&]uh1jxhjU 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)}(hj h]hKVM_CAP_HYPERV_EVENTFD}(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}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj> hhhKubjy)}(hvm ioctlh]h)}(hjQ h]hvm ioctl}(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 Parametersh]h Parameters}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjl 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&]uh1jxhjl ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj 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:}(hj hhhNhNubah}(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:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj$)}(h.#define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)h]h.#define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)}hj sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj hhubj_)}(hhh]jd)}(hhh](ji)}(hReturnsh]hReturns}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj hhhKubjy)}(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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj hhubah}(h]h ]h"]h$]h&]uh1j^hj hhhhhMubeh}(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}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjIhhhKubjy)}(hKVM_CAP_NESTED_STATEh]h)}(hj\h]hKVM_CAP_NESTED_STATE}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1jxhjIubeh}(h]h ]h"]h$]h&]uh1jchhhMhjFhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjwhhhKubjy)}(hx86h]h)}(hjh]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjwubeh}(h]h ]h"]h$]h&]uh1jchhhMhjFhhubjd)}(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&]uh1jchhhMhjFhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h struct kvm_nested_state (in/out)h]h)}(hjh]h struct kvm_nested_state (in/out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjFhhubjd)}(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&]uh1jchhhMhjFhhubeh}(h]h ]h"]h$]h&]uh1j^hj5hhhhhMubh)}(hErrors:h]hErrors:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5hhubh)}(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&]colwidthKuh1jOhjKubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1jOhjKubjf)}(hhh]jk)}(hhh](jp)}(hhh]h)}(hE2BIGh]hE2BIG}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhubah}(h]h ]h"]h$]h&]uh1johjeubjp)}(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&]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&]uh1hhhhMhj5hhubj$)}(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#hhhMhj5hhubh)}(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&]uh1hhhhM:hj5hhubh)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj5hhubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMAubj_)}(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&]uh1hhhhMChj ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMChjhhubjd)}(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&]uh1hhhhMDhj:ubah}(h]h ]h"]h$]h&]uh1jxhj)ubeh}(h]h ]h"]h$]h&]uh1jchhhMDhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjWhhhKubjy)}(h vcpu ioctlh]h)}(hjjh]h vcpu ioctl}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjhubah}(h]h ]h"]h$]h&]uh1jxhjWubeh}(h]h ]h"]h$]h&]uh1jchhhMEhjhhubjd)}(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&]uh1hhhhMFhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMFhjhhubjd)}(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&]uh1hhhhMGhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMGhjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMCubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjhhubeh}(h]kvm-set-nested-stateah ]h"]4.115 kvm_set_nested_stateah$]h&]uh1hhjhhhhhMAubh)}(hhh](h)}(h%4.116 KVM_(UN)REGISTER_COALESCED_MMIOh]h%4.116 KVM_(UN)REGISTER_COALESCED_MMIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(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)}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj#ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMOhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hallh]h)}(hjTh]hall}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjRubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMQhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjohhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jxhjoubeh}(h]h ]h"]h$]h&]uh1jchhhMRhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_coalesced_mmio_zoneh]h)}(hjh]hstruct kvm_coalesced_mmio_zone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMShjhhubjd)}(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&]uh1hhhhMThjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMThjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMOubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjhhubh)}(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.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjhhubeh}(h]kvm-un-register-coalesced-mmioah ]h"]%4.116 kvm_(un)register_coalesced_mmioah$]h&]uh1hhjhhhhhMMubh)}(hhh](h)}(h4.117 KVM_CLEAR_DIRTY_LOGh]h4.117 KVM_CLEAR_DIRTY_LOG}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhMjubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjThhhKubjy)}(h!KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2h]h)}(hjgh]h!KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjeubah}(h]h ]h"]h$]h&]uh1jxhjTubeh}(h]h ]h"]h$]h&]uh1jchhhMlhjQhhubjd)}(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&]uh1hhhhMmhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMmhjQhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hvm ioctlh]h)}(hjh]hvm ioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMnhjQhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_clear_dirty_log (in)h]h)}(hjh]hstruct kvm_clear_dirty_log (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMohjQhhubjd)}(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&]uh1hhhhMphjubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhMphjQhhubeh}(h]h ]h"]h$]h&]uh1j^hj@hhhhhMlubj$)}(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; }; };}hjAsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMthj@hhubh)}(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).}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@hhubh)}(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.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@hhubh)}(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.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@hhubeh}(h]kvm-clear-dirty-logah ]h"]4.117 kvm_clear_dirty_logah$]h&]uh1hhjhhhhhMjubh)}(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}(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)}(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&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hstruct kvm_cpuid2 (in/out)h]h)}(hj2h]hstruct kvm_cpuid2 (in/out)}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(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}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^ubah}(h]h ]h"]h$]h&]uh1jxhjMubeh}(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)}(hjh]hHYPERV_CPUID_INTERFACE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_VERSIONh]h)}(hjh]hHYPERV_CPUID_VERSION}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_FEATURESh]h)}(hjh]hHYPERV_CPUID_FEATURES}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_ENLIGHTMENT_INFOh]h)}(hjh]hHYPERV_CPUID_ENLIGHTMENT_INFO}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_IMPLEMENT_LIMITSh]h)}(hj6h]hHYPERV_CPUID_IMPLEMENT_LIMITS}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_NESTED_FEATURESh]h)}(hjMh]hHYPERV_CPUID_NESTED_FEATURES}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h,HYPERV_CPUID_SYNDBG_VENDOR_AND_MAX_FUNCTIONSh]h)}(hjdh]h,HYPERV_CPUID_SYNDBG_VENDOR_AND_MAX_FUNCTIONS}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hHYPERV_CPUID_SYNDBG_INTERFACEh]h)}(hj{h]hHYPERV_CPUID_SYNDBG_INTERFACE}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyubah}(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:}(hjhhhNhNubah}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(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&]uh1hhjhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3hhhKubjy)}(harm64h]h)}(hjFh]harm64}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jxhj3ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(hhh](ji)}(hTypeh]hType}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjahhhKubjy)}(h vcpu ioctlh]h)}(hjth]h vcpu ioctl}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrubah}(h]h ]h"]h$]h&]uh1jxhjaubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(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&]uh1jchhhMhj0hhubjd)}(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&]uh1jchhhMhj0hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK>uh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEPERMh]hEPERM}(hj'hhhNhNubah}(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}(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)}(hEINVALh]hEINVAL}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ubah}(h]h ]h"]h$]h&]uh1johjXubjp)}(hhh]h)}(hfeature unknown or not presenth]hfeature unknown or not present}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrubah}(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)}(hRecognised values for feature:h]hRecognised values for feature:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(hhh]h)}(h+KVM_ARM_VCPU_SVE (requires KVM_CAP_ARM_SVE)h]h+KVM_ARM_VCPU_SVE (requires KVM_CAP_ARM_SVE)}(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&]uh1hhhhMhjhhubh)}(h:Finalizes the configuration of the specified vcpu feature.h]h:Finalizes the configuration of the specified vcpu feature.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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 }(hj5hhhNhNubh)}(h,:ref:`KVM_ARM_VCPU_INIT `h]j)}(hj?h]hKVM_ARM_VCPU_INIT}(hjAhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]refdocj refdomainjKreftyperef refexplicitrefwarnjkvm_arm_vcpu_inituh1hhhhMhj5ubh2 call with the appropriate flag set in features[].}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubeh}(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)}(hjh]hKVM_CAP_PMU_EVENT_FILTER}(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)}(hvm ioctlh]h)}(hj*h]hvm 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}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(h struct kvm_pmu_event_filter (in)h]h)}(hjXh]h struct kvm_pmu_event_filter (in)}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjVubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjshhhKubjy)}(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&]uh1jxhjsubeh}(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&]colwidthK= 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&]uh1jhhhMbhj+&ubj)}(hhh](j_)}(hhh]jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjF&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjC&hhhKubjy)}(hKVM_CAP_S390_PROTECTED_DUMP h]h)}(hKVM_CAP_S390_PROTECTED_DUMPh]hKVM_CAP_S390_PROTECTED_DUMP}(hjX&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjT&ubah}(h]h ]h"]h$]h&]uh1jxhjC&ubeh}(h]h ]h"]h$]h&]uh1jchhhM8hj@&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.}(hjx&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj=&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#hhhM?hj=&ubh)}(h**subcommands:**h]j6#)}(hj&h]h subcommands:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j5#hj&ubah}(h]h ]h"]h$]h&]uh1hhhhMFhj=&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&]uh1jhhhMOhj&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&]uh1hhhhMIhj&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}(hj&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&]uh1hhhhMNhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhMOhj&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&]uh1jhhhMXhj&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 }(hj'hhhNhNubjz,)}(h `buff_len`h]hbuff_len}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj'ubhf bytes of tweak component values starting with the 1MB block specified by the absolute guest address (}(hj'hhhNhNubjz,)}(h`gaddr`h]hgaddr}(hj,'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj'ubh). }(hj'hhhNhNubjz,)}(h `buff_len`h]hbuff_len}(hj>'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj'ubh needs to be }(hj'hhhNhNubjz,)}(h`conf_dump_storage_state_len`h]hconf_dump_storage_state_len}(hjP'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj'ubh aligned and at least >= the }(hj'hhhNhNubjz,)}(h`conf_dump_storage_state_len`h]hconf_dump_storage_state_len}(hjb'hhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hj'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.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMRhj'ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhhhMXhj&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&]uh1jhhhMbhj'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&]uh1hhhhM[hj'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&]uh1hhhhM^hj'ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhMbhj&ubeh}(h]h ]h"]h$]h&]uh1jhj=&ubeh}(h]h ]h"]h$]h&]uh1jhj+&ubeh}(h]h ]h"]h$]h&]uh1jhhhMbhj(&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}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMshj'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&]uh1hhhhMehj"(ubah}(h]h ]h"]h$]h&]uh1jxhj(ubeh}(h]h ]h"]h$]h&]uh1jchhhMehj(ubah}(h]h ]h"]h$]h&]uh1j^hj (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.}(hjF(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj (ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhhhMshj(&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}(hjd(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&]uh1jhhjx(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&]uh1hhhhMvhj(ubah}(h]h ]h"]h$]h&]uh1jxhjx(ubeh}(h]h ]h"]h$]h&]uh1jchhhMvhju(ubah}(h]h ]h"]h$]h&]uh1j^hjr(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&]uh1hhhhMxhjr(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}(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}(hjH)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjE)hhhKubjy)}(hvm ioctlh]h)}(hjX)h]hvm ioctl}(hjZ)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjV)ubah}(h]h ]h"]h$]h&]uh1jxhjE)ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj(hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjv)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjs)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&]uh1jxhjs)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; };}hj)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}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj)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.}(hj *hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj)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.}(hj9*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6*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.}(hjG*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6*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.}(hjU*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6*ubeh}(h]h ]h"]h$]h&]uh1jhj$*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj)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}(hjs*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjo*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&]uh1jhjo*ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj)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&]uh1jhhhMhj)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}(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 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.}(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_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}(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 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.}(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_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&]uh1jhhhMhj9+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.}(hjN+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK+ubah}(h]h ]h"]h$]h&]uh1jhj9+ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj)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}(hjy+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv+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}(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}(hjE,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjB,hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjW,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjS,ubah}(h]h ]h"]h$]h&]uh1jxhjB,ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+hhubeh}(h]h ]h"]h$]h&]uh1j^hjv+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.}(hjw,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv+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&]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)}(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&]uh1jchhhMhj,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&]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&]uh1jhhjY-hhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjn-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj-ubah}(h]h ]h"]h$]h&]uh1jxhjY-ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj,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#hhhMhj,hhubh)}(h type values:h]h type values:}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj,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&]uh1jhhhM5hj-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&]uh1hhhhM0hj-ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhhhM5hj-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&]uh1jhhhMDhj-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.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj-ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhhhMDhj-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}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMIhj .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.}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj.ubah}(h]h ]h"]h$]h&]uh1jhj .ubeh}(h]h ]h"]h$]h&]uh1jhhhMIhj-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&]uh1jhhhMNhj:.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.}(hjO.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjL.ubah}(h]h ]h"]h$]h&]uh1jhj:.ubeh}(h]h ]h"]h$]h&]uh1jhhhMNhj-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}(hjm.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMThji.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&]uh1hhhhMQhj{.ubah}(h]h ]h"]h$]h&]uh1jhji.ubeh}(h]h ]h"]h$]h&]uh1jhhhMThj-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&]uh1jhhhMYhj.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&]uh1hhhhMWhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhhhMYhj-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&]uh1jhhhMchj.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 }(hj.hhhNhNubjn)}(h*adds*h]hadds}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj.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.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM\hj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhhhMchj-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}(hj /hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMihj/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.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhj/ubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhhhMihj-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&]uh1jhhhMphj7/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.}(hjL/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjI/ubah}(h]h ]h"]h$]h&]uh1jhj7/ubeh}(h]h ]h"]h$]h&]uh1jhhhMphj-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}(hjj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMzhjf/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&]uh1hhhhMshjx/ubah}(h]h ]h"]h$]h&]uh1jhjf/ubeh}(h]h ]h"]h$]h&]uh1jhhhMzhj-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}(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&]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}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0hhhKubjy)}(h vcpu ioctlh]h)}(hj&0h]h vcpu ioctl}(hj(0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$0ubah}(h]h ]h"]h$]h&]uh1jxhj0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj/hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjD0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjA0hhhKubjy)}(hstruct kvm_xen_vcpu_attrh]h)}(hjT0h]hstruct kvm_xen_vcpu_attr}(hjV0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjR0ubah}(h]h ]h"]h$]h&]uh1jxhjA0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj/hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjr0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjo0hhhKubjy)}(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&]uh1jxhjo0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj/hhubeh}(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.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubeh}(h]kvm-xen-vcpu-get-attrah ]h"]4.129 kvm_xen_vcpu_get_attrah$]h&]uh1hhjhhhhhM}ubh)}(hhh](h)}(h4.130 KVM_ARM_MTE_COPY_TAGSh]h4.130 KVM_ARM_MTE_COPY_TAGS}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0hhhKubjy)}(hKVM_CAP_ARM_MTEh]h)}(hj0h]hKVM_CAP_ARM_MTE}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jxhj0ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj 1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj 1hhhKubjy)}(harm64h]h)}(hj1h]harm64}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj 1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(hhh](ji)}(hTypeh]hType}(hj;1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj81hhhKubjy)}(hvm ioctlh]h)}(hjK1h]hvm ioctl}(hjM1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjI1ubah}(h]h ]h"]h$]h&]uh1jxhj81ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hji1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjf1hhhKubjy)}(hstruct kvm_arm_copy_mte_tagsh]h)}(hjy1h]hstruct kvm_arm_copy_mte_tags}(hj{1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw1ubah}(h]h ]h"]h$]h&]uh1jxhjf1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubjd)}(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).}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj0hhubeh}(h]h ]h"]h$]h&]uh1j^hj0hhhhhMubj$)}(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]; };}hj1sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj0hhubh)}(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 }(hj1hhhNhNubj)}(h ``guest_ipa``h]h guest_ipa}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh and }(hj1hhhNhNubj)}(h ``length``h]hlength}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh fields must be }(hj1hhhNhNubj)}(h ``PAGE_SIZE``h]h PAGE_SIZE}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh aligned. }(hj1hhhNhNubj)}(h ``length``h]hlength}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh5 must not be bigger than 2^31 - PAGE_SIZE bytes. The }(hj1hhhNhNubj)}(h``addr``h]haddr}(hj'2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubhG field must point to a buffer which the tags will be copied to or from.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(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}(hjC2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?2ubh) specifies the direction of copy, either }(hj?2hhhNhNubj)}(h``KVM_ARM_TAGS_TO_GUEST``h]hKVM_ARM_TAGS_TO_GUEST}(hjU2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?2ubh or }(hj?2hhhNhNubj)}(h``KVM_ARM_TAGS_FROM_GUEST``h]hKVM_ARM_TAGS_FROM_GUEST}(hjg2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?2ubh.}(hj?2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(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}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(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 }(hj2hhhNhNubj)}(h ``length``h]hlength}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh is returned.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubeh}(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}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj2hhhKubjy)}(hKVM_CAP_SREGS2h]h)}(hj3h]hKVM_CAP_SREGS2}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jxhj2ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj03hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj-3hhhKubjy)}(hx86h]h)}(hj@3h]hx86}(hjB3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>3ubah}(h]h ]h"]h$]h&]uh1jxhj-3ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubjd)}(hhh](ji)}(hTypeh]hType}(hj^3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj[3hhhKubjy)}(h vcpu ioctlh]h)}(hjn3h]h vcpu ioctl}(hjp3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjl3ubah}(h]h ]h"]h$]h&]uh1jxhj[3ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubjd)}(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&]uh1jchhhMhj2hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3hhhKubjy)}(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&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jxhj3ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj2hhubeh}(h]h ]h"]h$]h&]uh1j^hj2hhhhhMubh)}(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.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2hhubj$)}(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]; };}hj3sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj2hhubh)}(h flags values for ``kvm_sregs2``:h](hflags values for }(hj4hhhNhNubj)}(h``kvm_sregs2``h]h kvm_sregs2}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh:}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj2hhubh)}(h!``KVM_SREGS2_FLAGS_PDPTRS_VALID``h]j)}(hj*4h]hKVM_SREGS2_FLAGS_PDPTRS_VALID}(hj,4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(4ubah}(h]h ]h"]h$]h&]uh1hhhhMhj2hhubh)}(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.}(hjC4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?4ubah}(h]h ]h"]h$]h&]uh1hhhhMhj2hhubeh}(h]kvm-get-sregs2ah ]h"]4.131 kvm_get_sregs2ah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.132 KVM_SET_SREGS2h]h4.132 KVM_SET_SREGS2}(hjb4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_4hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjv4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjs4hhhKubjy)}(hKVM_CAP_SREGS2h]h)}(hj4h]hKVM_CAP_SREGS2}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jxhjs4ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjp4hhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hx86h]h)}(hj4h]hx86}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjp4hhubjd)}(hhh](ji)}(hTypeh]hType}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(h vcpu ioctlh]h)}(hj4h]h vcpu ioctl}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjp4hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hstruct kvm_sregs2 (in)h]h)}(hj5h]hstruct kvm_sregs2 (in)}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5ubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjp4hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj.5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+5hhhKubjy)}(h0 on success, -1 on error h]h)}(h0 on success, -1 on errorh]h0 on success, -1 on error}(hj@5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<5ubah}(h]h ]h"]h$]h&]uh1jxhj+5ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjp4hhubeh}(h]h ]h"]h$]h&]uh1j^hj_4hhhhhMubh)}(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.}(hj`5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_4hhubeh}(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}(hjy5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv5hhhhhMubj_)}(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}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(hallh]h)}(hj5h]hall}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5ubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubjd)}(hhh](ji)}(hTypeh]hType}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5hhhKubjy)}(hvm ioctl, vcpu ioctlh]h)}(hj5h]hvm ioctl, vcpu ioctl}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5ubah}(h]h ]h"]h$]h&]uh1jxhj5ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj6hhhKubjy)}(hnoneh]h)}(hj'6h]hnone}(hj)6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%6ubah}(h]h ]h"]h$]h&]uh1jxhj6ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjE6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjB6hhhKubjy)}(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}(hjW6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjS6ubah}(h]h ]h"]h$]h&]uh1jxhjB6ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj5hhubeh}(h]h ]h"]h$]h&]uh1j^hjv5hhhhhMubh)}(hErrors:h]hErrors:}(hjw6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1johj6ubjp)}(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}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1johj6ubeh}(h]h ]h"]h$]h&]uh1jjhj6ubjk)}(hhh](jp)}(hhh]h)}(hEMFILEh]hEMFILE}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1johj6ubjp)}(hhh]h)}(h/if the number of opened files exceeds the limith]h/if the number of opened files exceeds the limit}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1johj6ubeh}(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&]uh1hhhhMhjv5hhubh)}(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:}(hj-7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhj>7ubjf)}(hhh](jk)}(hhh]jp)}(hhh]h)}(hHeaderh]hHeader}(hjT7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQ7ubah}(h]h ]h"]h$]h&]uh1johjN7ubah}(h]h ]h"]h$]h&]uh1jjhjK7ubjk)}(hhh]jp)}(hhh]h)}(h id stringh]h id string}(hjt7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjq7ubah}(h]h ]h"]h$]h&]uh1johjn7ubah}(h]h ]h"]h$]h&]uh1jjhjK7ubjk)}(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&]uh1jjhjK7ubjk)}(hhh]jp)}(hhh]h)}(h Stats Datah]h Stats Data}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1johj7ubah}(h]h ]h"]h$]h&]uh1jjhjK7ubeh}(h]h ]h"]h$]h&]uh1jehj>7ubeh}(h]h ]h"]h$]h&]colsKuh1jJhj;7ubah}(h]h ]h"]h$]h&]uh1jEhjv5hhhhhNubh)}(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.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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 }(hj7hhhNhNubj)}(h ``pread``h]hpread}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh or }(hj7hhhNhNubj)}(h ``lseek``h]hlseek}(hj 8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh# to read the statistics repeatedly.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(h!All data is in system endianness.h]h!All data is in system endianness.}(hj!8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(h(The format of the header is as follows::h]h'The format of the header is as follows:}(hj/8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjv5hhubj$)}(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; };}hj=8sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjv5hhubh)}(hFThe ``flags`` field is not used at the moment. It is always read as 0.h](hThe }(hjK8hhhNhNubj)}(h ``flags``h]hflags}(hjS8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK8ubh9 field is not used at the moment. It is always read as 0.}(hjK8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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 }(hjk8hhhNhNubj)}(h ``name_size``h]h name_size}(hjs8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk8ubh 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.}(hjk8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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&]uh1hhhhMhjv5hhubh)}(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 }(hj8hhhNhNubj)}(h ``id_offset``h]h id_offset}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubhy 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.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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 }(hj8hhhNhNubj)}(h``desc_offset``h]h desc_offset}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh 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.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM!hjv5hhubh)}(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 }(hj8hhhNhNubj)}(h``data_offset``h]h data_offset}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh 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.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM$hjv5hhubh)}(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 }(hj 9hhhNhNubj)}(h``'\0'``h]h'\0'}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 9ubh, is indicated by the }(hj 9hhhNhNubj)}(h ``name_size``h]h name_size}(hj%9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 9ubh field in the header.}(hj 9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM'hjv5hhubh)}(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 }(hj=9hhhNhNubj)}(h``struct kvm_stats_desc``h]hstruct kvm_stats_desc}(hjE9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=9ubh$, each followed by a string of size }(hj=9hhhNhNubj)}(h ``name_size``h]h name_size}(hjW9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=9ubh.}(hj=9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM+hjv5hhubj$)}(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[]; };}hjo9sbah}(h]h ]h"]h$]h&]hhuh1j#hhhM0hjv5hhubh)}(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 }(hj}9hhhNhNubj)}(h ``flags``h]hflags}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}9ubh field contains the type and unit of the statistics data described by this descriptor. Its endianness is CPU native. The following flags are supported:}(hj}9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMQhjv5hhubh)}(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&]uh1hhhhMUhjv5hhubh)}(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}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh 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 }(hj9hhhNhNubj)}(h``size``h]hsize}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubhP field for this type is always 1. All cumulative statistics data are read/write.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMWhj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(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&]uh1jhj: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 }(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&]uh1hhhhM\hj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(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&]uh1jhj8: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 }(hj8:hhhNhNubj)}(h``size``h]hsize}(hjN:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8:ubh! field for this type is always 1.}(hj8:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMbhj4:ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(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}(hjt:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp:ubh\ The statistic is reported as a linear histogram. The number of buckets is specified by the }(hjp:hhhNhNubj)}(h``size``h]hsize}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp:ubh0 field. The size of buckets is specified by the }(hjp:hhhNhNubj)}(h``hist_param``h]h hist_param}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp:ubh. field. The range of the Nth bucket (1 <= N < }(hjp:hhhNhNubj)}(h``size``h]hsize}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp:ubh) is [}(hjp: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&]uh1jhjp:ubh1-1), +INF). (+INF means positive infinity value.)}(hjp:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMghjl:ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(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&]uh1jhj:ubha The statistic is reported as a logarithmic histogram. The number of buckets is specified by the }(hj:hhhNhNubj)}(h``size``h]hsize}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh_ field. The range of the first bucket is [0, 1), while the range of the last bucket is [pow(2, }(hj:hhhNhNubj)}(h``size``h]hsize}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh/-2), +INF). Otherwise, The Nth bucket (1 < N < }(hj:hhhNhNubj)}(h``size``h]hsize}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh$) covers [pow(2, N-2), pow(2, N-1)).}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMnhj:ubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]jjuh1hhhhMWhj9ubah}(h]h ]h"]h$]h&]uh1hhhhMWhjv5hhubh)}(h&Bits 4-7 of ``flags`` encode the unit:h](h Bits 4-7 of }(hjB;hhhNhNubj)}(h ``flags``h]hflags}(hjJ;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB;ubh encode the unit:}(hjB;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMuhjv5hhubh)}(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}(hjq;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm;ubhv There is no unit for the value of statistics data. This usually means that the value is a simple counter of an event.}(hjm;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMwhji;ubah}(h]h ]h"]h$]h&]uh1jhjf;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&]uh1hhhhMzhj;ubah}(h]h ]h"]h$]h&]uh1jhjf;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&]uh1hhhhM~hj;ubah}(h]h ]h"]h$]h&]uh1jhjf;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}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubhK It indicates that the statistics data is used to measure CPU clock cycles.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1jhjf;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}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<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.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jhjf;ubeh}(h]h ]h"]h$]h&]jjuh1hhhhMwhjb;ubah}(h]h ]h"]h$]h&]uh1hhhhMwhjv5hhubh)}(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.}(hjE<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(hQBits 8-11 of ``flags``, together with ``exponent``, encode the scale of the unit:h](h Bits 8-11 of }(hjS<hhhNhNubj)}(h ``flags``h]hflags}(hj[<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS<ubh, together with }(hjS<hhhNhNubj)}(h ``exponent``h]hexponent}(hjm<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS<ubh, encode the scale of the unit:}(hjS<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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}(hj<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&]jjuh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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 }(hj=hhhNhNubj)}(h``size``h]hsize}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=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.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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}(hj0=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&]uh1hhhhMhjv5hhubh)}(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 }(hjH=hhhNhNubj)}(h``bucket_size``h]h bucket_size}(hjP=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH=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 }(hjH=hhhNhNubj)}(h ``flags``h]hflags}(hjb=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH=ubh together with 7}(hjH=hhhNhNubj)}(h ``exponent``h]hexponent}(hjt=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH=ubh.}(hjH=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjv5hhubh)}(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&]uh1hhhhMhjv5hhubh)}(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&]uh1hhhhMhjv5hhubeh}(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}(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_XSAVE2h]h)}(hj>h]hKVM_CAP_XSAVE2}(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)}(hjM>h]hx86}(hjO>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK>ubah}(h]h ]h"]h$]h&]uh1jxhj:>ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj >hhubjd)}(hhh](ji)}(hTypeh]hType}(hjk>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjh>hhhKubjy)}(h vcpu ioctlh]h)}(hj{>h]h vcpu ioctl}(hj}>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjy>ubah}(h]h ]h"]h$]h&]uh1jxhjh>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_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&]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$)}(hEstruct kvm_xsave { __u32 region[1024]; __u32 extra[0]; };h]hEstruct kvm_xsave { __u32 region[1024]; __u32 extra[0]; };}hj>sbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj=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 }(hj?hhhNhNubj)}(h``arch_prctl()``h]h arch_prctl()}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh$, but this may change in the future.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj=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&]uh1hhhhMhj=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}(hjT?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjQ?hhhKubjy)}(h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SENDh]h)}(hjd?h]h0KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND}(hjf?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb?ubah}(h]h ]h"]h$]h&]uh1jxhjQ?ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjN?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&]uh1jchhhMhjN?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&]uh1jchhhMhjN?hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj?hhhKubjy)}(h!struct kvm_irq_routing_xen_evtchnh]h)}(hj?h]h!struct kvm_irq_routing_xen_evtchn}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jxhj?ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjN?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&]uh1jchhhMhjN?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.}(hjL@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}(hje@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb@hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjy@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjv@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&]uh1jxhjv@ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjs@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&]uh1jchhhMhjs@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&]uh1jchhhMhjs@hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjAhhhKubjy)}(hnoneh]h)}(hjAh]hnone}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jxhjAubeh}(h]h ]h"]h$]h&]uh1jchhhMhjs@hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj1AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj.AhhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjCAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?Aubah}(h]h ]h"]h$]h&]uh1jxhj.Aubeh}(h]h ]h"]h$]h&]uh1jchhhMhjs@hhubeh}(h]h ]h"]h$]h&]uh1j^hjb@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 }(hjcAhhhNhNubjz,)}(h`KVM_S390_PV_COMMAND`h]hKVM_S390_PV_COMMAND}(hjkAhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjcAubhm but handles requests for vcpus. It re-uses the kvm_s390_pv_dmp struct and hence also shares the command ids.}(hjcAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjb@hhubh)}(h **command:**h]j6#)}(hjAh]hcommand:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j5#hjAubah}(h]h ]h"]h$]h&]uh1hhhhMhjb@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.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1jhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhjb@hhhhhNubh)}(h**subcommand:**h]j6#)}(hjAh]h subcommand:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j5#hjAubah}(h]h ]h"]h$]h&]uh1hhhhMhjb@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}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjAubj)}(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.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1jhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhjb@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}(hj,BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)BhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj@BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj=BhhhKubjy)}(hKVM_CAP_S390_ZPCI_OPh]h)}(hjPBh]hKVM_CAP_S390_ZPCI_OP}(hjRBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNBubah}(h]h ]h"]h$]h&]uh1jxhj=Bubeh}(h]h ]h"]h$]h&]uh1jchhhMhj:Bhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjnBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjkBhhhKubjy)}(hs390h]h)}(hj~Bh]hs390}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj|Bubah}(h]h ]h"]h$]h&]uh1jxhjkBubeh}(h]h ]h"]h$]h&]uh1jchhhMhj:Bhhubjd)}(hhh](ji)}(hTypeh]hType}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hvm ioctlh]h)}(hjBh]hvm ioctl}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMhj:Bhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hstruct kvm_s390_zpci_op (in)h]h)}(hjBh]hstruct kvm_s390_zpci_op (in)}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMhj:Bhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(h0 on success, <0 on error h]h)}(h0 on success, <0 on errorh]h0 on success, <0 on error}(hj ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMhj:Bhhubeh}(h]h ]h"]h$]h&]uh1j^hj)BhhhhhMubh)}(hJUsed to manage hardware-assisted virtualization features for zPCI devices.h]hJUsed to manage hardware-assisted virtualization features for zPCI devices.}(hj*ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)Bhhubh)}(h6Parameters are specified via the following structure::h]h5Parameters are specified via the following structure:}(hj8ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)Bhhubj$)}(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; };}hjFCsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhj)Bhhubh)}(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.}(hjTChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)Bhhubh)}(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.}(hjbChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)Bhhubh)}(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.}(hjpChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)Bhhubeh}(h]kvm-s390-zpci-opah ]h"]4.137 kvm_s390_zpci_opah$]h&]uh1hhjhhhhhMubh)}(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)}(hjCh]hKVM_CAP_COUNTER_OFFSET}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjCubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhM$hjChhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(harm64h]h)}(hjCh]harm64}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjCubah}(h]h ]h"]h$]h&]uh1jxhjCubeh}(h]h ]h"]h$]h&]uh1jchhhM%hjChhubjd)}(hhh](ji)}(hTypeh]hType}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjChhhKubjy)}(hvm ioctlh]h)}(hj Dh]hvm ioctl}(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 Parametersh]h Parameters}(hj'DhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$DhhhKubjy)}(h"struct kvm_arm_counter_offset (in)h]h)}(hj7Dh]h"struct kvm_arm_counter_offset (in)}(hj9DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj5Dubah}(h]h ]h"]h$]h&]uh1jxhj$Dubeh}(h]h ]h"]h$]h&]uh1jchhhM'hjChhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjUDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRDhhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjgDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjcDubah}(h]h ]h"]h$]h&]uh1jxhjRDubeh}(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&]uh1hhhhM*hjChhubj$)}(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#hhhM0hjChhubh)}(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&]uh1hhhhM5hjChhubh)}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjChhubh)}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjChhubh)}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjChhubj@)}(h#.. _KVM_ARM_GET_REG_WRITABLE_MASKS:h]h}(h]h ]h"]h$]h&]jKkvm-arm-get-reg-writable-masksuh1j?hMGhjChhhhubeh}(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}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhhhhhMJubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(h%KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGESh]h)}(hjEh]h%KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjEubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMLhjDhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj3EhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj0EhhhKubjy)}(harm64h]h)}(hjCEh]harm64}(hjEEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjAEubah}(h]h ]h"]h$]h&]uh1jxhj0Eubeh}(h]h ]h"]h$]h&]uh1jchhhMMhjDhhubjd)}(hhh](ji)}(hTypeh]hType}(hjaEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj^EhhhKubjy)}(hvm ioctlh]h)}(hjqEh]hvm ioctl}(hjsEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjoEubah}(h]h ]h"]h$]h&]uh1jxhj^Eubeh}(h]h ]h"]h$]h&]uh1jchhhMNhjDhhubjd)}(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&]uh1hhhhMOhjEubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMOhjDhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjEhhhKubjy)}(h0 on success, < 0 on error h]h)}(h0 on success, < 0 on errorh]h0 on success, < 0 on error}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjEubah}(h]h ]h"]h$]h&]uh1jxhjEubeh}(h]h ]h"]h$]h&]uh1jchhhMPhjDhhubeh}(h]h ]h"]h$]h&]uh1j^hjDhhhhhMLubj$)}(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]; };}hjEsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMUhjDhhubh)}(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.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjDhhubh)}(h]The ``addr`` field is a pointer to the destination array where KVM copies the writable masks.h](hThe }(hj FhhhNhNubj)}(h``addr``h]haddr}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj FubhQ field is a pointer to the destination array where KVM copies the writable masks.}(hj FhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMahjDhhubh)}(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 }(hj+FhhhNhNubj)}(h ``range``h]hrange}(hj3FhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+Fubh3 field indicates the requested range of registers. }(hj+FhhhNhNubj)}(h``KVM_CHECK_EXTENSION``h]hKVM_CHECK_EXTENSION}(hjEFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+Fubh for the }(hj+FhhhNhNubj)}(h)``KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES``h]h%KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES}(hjWFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+Fubh capability returns the supported ranges, expressed as a set of flags. Each flag’s bit index represents a possible value for the }(hj+FhhhNhNubj)}(h ``range``h]hrange}(hjiFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+FubhQ field. All other values are reserved for future use and KVM may return an error.}(hj+FhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMdhjDhhubh)}(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&]uh1hhhhMjhjDhhubh)}(hhh](h)}(hKVM_ARM_FEATURE_ID_RANGE (0)h]hKVM_ARM_FEATURE_ID_RANGE (0)}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhMnubh)}(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}.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjFhhubh)}(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 }(hjFhhhNhNubj)}(h``addr``h]haddr}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh is indexed by the macro }(hjFhhhNhNubj)}(h7``ARM64_FEATURE_ID_RANGE_IDX(op0, op1, crn, crm, op2)``h]h3ARM64_FEATURE_ID_RANGE_IDX(op0, op1, crn, crm, op2)}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh], allowing userspace to know what fields can be changed for the system register described by }(hjFhhhNhNubj)}(h``op0, op1, crn, crm, op2``h]hop0, op1, crn, crm, op2}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubhb. KVM rejects ID register values that describe a superset of the features supported by the system.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshjFhhubeh}(h]kvm-arm-feature-id-range-0ah ]h"]kvm_arm_feature_id_range (0)ah$]h&]uh1hhjDhhhhhMnubeh}(h](jDid18eh ]h"]($4.139 kvm_arm_get_reg_writable_maskskvm_arm_get_reg_writable_maskseh$]h&]uh1hhjhhhhhMJjm}jGjDsjo}jDjDsubh)}(hhh](h)}(h!4.140 KVM_SET_USER_MEMORY_REGION2h]h!4.140 KVM_SET_USER_MEMORY_REGION2}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhMzubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj.GhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+GhhhKubjy)}(hKVM_CAP_USER_MEMORY2h]h)}(hj>Gh]hKVM_CAP_USER_MEMORY2}(hj@GhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjJhhhKubjy)}(hvm ioctlh]h)}(hjQJh]hvm ioctl}(hjSJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOJubah}(h]h ]h"]h$]h&]uh1jxhj>Jubeh}(h]h ]h"]h$]h&]uh1jchhhMhjIhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjoJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjlJhhhKubjy)}(h!struct kvm_create_guest_memfd(in)h]h)}(hjJh]h!struct kvm_create_guest_memfd(in)}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}Jubah}(h]h ]h"]h$]h&]uh1jxhjlJubeh}(h]h ]h"]h$]h&]uh1jchhhMhjIhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjJhhhKubjy)}(h*A file descriptor on success, <0 on error h]h)}(h)A file descriptor on success, <0 on errorh]h)A file descriptor on success, <0 on error}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJubah}(h]h ]h"]h$]h&]uh1jxhjJubeh}(h]h ]h"]h$]h&]uh1jchhhMhjIhhubeh}(h]h ]h"]h$]h&]uh1j^hjIhhhhhMubh)}(hXKVM_CREATE_GUEST_MEMFD creates an anonymous file and returns a file descriptor that refers to it. guest_memfd files are roughly analogous to files created via memfd_create(), e.g. guest_memfd files live in RAM, have volatile storage, and are automatically released when the last reference is dropped. Unlike "regular" memfd_create() files, guest_memfd files are bound to their owning virtual machine (see below), cannot be mapped, read, or written by userspace, and cannot be resized (guest_memfd files do however support PUNCH_HOLE).h]hXKVM_CREATE_GUEST_MEMFD creates an anonymous file and returns a file descriptor that refers to it. guest_memfd files are roughly analogous to files created via memfd_create(), e.g. guest_memfd files live in RAM, have volatile storage, and are automatically released when the last reference is dropped. Unlike “regular” memfd_create() files, guest_memfd files are bound to their owning virtual machine (see below), cannot be mapped, read, or written by userspace, and cannot be resized (guest_memfd files do however support PUNCH_HOLE).}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIhhubj$)}(h`struct kvm_create_guest_memfd { __u64 size; __u64 flags; __u64 reserved[6]; };h]h`struct kvm_create_guest_memfd { __u64 size; __u64 flags; __u64 reserved[6]; };}hjJsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjIhhubh)}(hXConceptually, the inode backing a guest_memfd file represents physical memory, i.e. is coupled to the virtual machine as a thing, not to a "struct kvm". The file itself, which is bound to a "struct kvm", is that instance's view of the underlying memory, e.g. effectively provides the translation of guest addresses to host memory. This allows for use cases where multiple KVM structures are used to manage a single virtual machine, e.g. when performing intrahost migration of a virtual machine.h]hXConceptually, the inode backing a guest_memfd file represents physical memory, i.e. is coupled to the virtual machine as a thing, not to a “struct kvm”. The file itself, which is bound to a “struct kvm”, is that instance’s view of the underlying memory, e.g. effectively provides the translation of guest addresses to host memory. This allows for use cases where multiple KVM structures are used to manage a single virtual machine, e.g. when performing intrahost migration of a virtual machine.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIhhubh)}(hXKVM currently only supports mapping guest_memfd via KVM_SET_USER_MEMORY_REGION2, and more specifically via the guest_memfd and guest_memfd_offset fields in "struct kvm_userspace_memory_region2", where guest_memfd_offset is the offset into the guest_memfd instance. For a given guest_memfd file, there can be at most one mapping per page, i.e. binding multiple memory regions to a single guest_memfd range is not allowed (any number of memory regions can be bound to a single guest_memfd file, but the bound ranges must not overlap).h]hXKVM currently only supports mapping guest_memfd via KVM_SET_USER_MEMORY_REGION2, and more specifically via the guest_memfd and guest_memfd_offset fields in “struct kvm_userspace_memory_region2”, where guest_memfd_offset is the offset into the guest_memfd instance. For a given guest_memfd file, there can be at most one mapping per page, i.e. binding multiple memory regions to a single guest_memfd range is not allowed (any number of memory regions can be bound to a single guest_memfd file, but the bound ranges must not overlap).}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIhhubh)}(h7See KVM_SET_USER_MEMORY_REGION2 for additional details.h]h7See KVM_SET_USER_MEMORY_REGION2 for additional details.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIhhubeh}(h]kvm-create-guest-memfdah ]h"]4.142 kvm_create_guest_memfdah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(h4.143 KVM_PRE_FAULT_MEMORYh]h4.143 KVM_PRE_FAULT_MEMORY}(hj KhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Capabilityh]h Capability}(hj4KhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1KhhhKubjy)}(hKVM_CAP_PRE_FAULT_MEMORYh]h)}(hjDKh]hKVM_CAP_PRE_FAULT_MEMORY}(hjFKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBKubah}(h]h ]h"]h$]h&]uh1jxhj1Kubeh}(h]h ]h"]h$]h&]uh1jchhhMhj.Khhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjbKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_KhhhKubjy)}(hnoneh]h)}(hjrKh]hnone}(hjtKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjpKubah}(h]h ]h"]h$]h&]uh1jxhj_Kubeh}(h]h ]h"]h$]h&]uh1jchhhMhj.Khhubjd)}(hhh](ji)}(hTypeh]hType}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjKhhhKubjy)}(h vcpu ioctlh]h)}(hjKh]h vcpu ioctl}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubah}(h]h ]h"]h$]h&]uh1jxhjKubeh}(h]h ]h"]h$]h&]uh1jchhhMhj.Khhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjKhhhKubjy)}(h$struct kvm_pre_fault_memory (in/out)h]h)}(hjKh]h$struct kvm_pre_fault_memory (in/out)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubah}(h]h ]h"]h$]h&]uh1jxhjKubeh}(h]h ]h"]h$]h&]uh1jchhhMhj.Khhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjKhhhKubjy)}(h20 if at least one page is processed, < 0 on error h]h)}(h10 if at least one page is processed, < 0 on errorh]h10 if at least one page is processed, < 0 on error}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubah}(h]h ]h"]h$]h&]uh1jxhjKubeh}(h]h ]h"]h$]h&]uh1jchhhMhj.Khhubeh}(h]h ]h"]h$]h&]uh1j^hjKhhhhhMubh)}(hErrors:h]hErrors:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKhhubh)}(hXy========== =============================================================== EINVAL The specified `gpa` and `size` were invalid (e.g. not page aligned, causes an overflow, or size is zero). ENOENT The specified `gpa` is outside defined memslots. EINTR An unmasked signal is pending and no page was processed. EFAULT The parameter address was invalid. EOPNOTSUPP Mapping memory for a GPA is unsupported by the hypervisor, and/or for the current vCPU state/mode. EIO unexpected error conditions (also causes a WARN) ========== =============================================================== h]jF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jOhj3LubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK?uh1jOhj3Lubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hEINVALh]hEINVAL}(hjSLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPLubah}(h]h ]h"]h$]h&]uh1johjMLubjp)}(hhh]h)}(hiThe specified `gpa` and `size` were invalid (e.g. not page aligned, causes an overflow, or size is zero).h](hThe specified }(hjjLhhhNhNubjz,)}(h`gpa`h]hgpa}(hjrLhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjjLubh and }(hjjLhhhNhNubjz,)}(h`size`h]hsize}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjjLubhK were invalid (e.g. not page aligned, causes an overflow, or size is zero).}(hjjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjgLubah}(h]h ]h"]h$]h&]uh1johjMLubeh}(h]h ]h"]h$]h&]uh1jjhjJLubjk)}(hhh](jp)}(hhh]h)}(hENOENTh]hENOENT}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjLubah}(h]h ]h"]h$]h&]uh1johjLubjp)}(hhh]h)}(h0The specified `gpa` is outside defined memslots.h](hThe specified }(hjLhhhNhNubjz,)}(h`gpa`h]hgpa}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjLubh is outside defined memslots.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjLubah}(h]h ]h"]h$]h&]uh1johjLubeh}(h]h ]h"]h$]h&]uh1jjhjJLubjk)}(hhh](jp)}(hhh]h)}(hEINTRh]hEINTR}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjLubah}(h]h ]h"]h$]h&]uh1johjLubjp)}(hhh]h)}(h8An unmasked signal is pending and no page was processed.h]h8An unmasked signal is pending and no page was processed.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj Mubah}(h]h ]h"]h$]h&]uh1johjLubeh}(h]h ]h"]h$]h&]uh1jjhjJLubjk)}(hhh](jp)}(hhh]h)}(hEFAULTh]hEFAULT}(hj.MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj+Mubah}(h]h ]h"]h$]h&]uh1johj(Mubjp)}(hhh]h)}(h"The parameter address was invalid.h]h"The parameter address was invalid.}(hjEMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjBMubah}(h]h ]h"]h$]h&]uh1johj(Mubeh}(h]h ]h"]h$]h&]uh1jjhjJLubjk)}(hhh](jp)}(hhh]h)}(h EOPNOTSUPPh]h EOPNOTSUPP}(hjeMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjbMubah}(h]h ]h"]h$]h&]uh1johj_Mubjp)}(hhh]h)}(hbMapping memory for a GPA is unsupported by the hypervisor, and/or for the current vCPU state/mode.h]hbMapping memory for a GPA is unsupported by the hypervisor, and/or for the current vCPU state/mode.}(hj|MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjyMubah}(h]h ]h"]h$]h&]uh1johj_Mubeh}(h]h ]h"]h$]h&]uh1jjhjJLubjk)}(hhh](jp)}(hhh]h)}(hEIOh]hEIO}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMubah}(h]h ]h"]h$]h&]uh1johjMubjp)}(hhh]h)}(h0unexpected error conditions (also causes a WARN)h]h0unexpected error conditions (also causes a WARN)}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMubah}(h]h ]h"]h$]h&]uh1johjMubeh}(h]h ]h"]h$]h&]uh1jjhjJLubeh}(h]h ]h"]h$]h&]uh1jehj3Lubeh}(h]h ]h"]h$]h&]colsKuh1jJhj0Lubah}(h]h ]h"]h$]h&]uh1jEhj,Lubah}(h]h ]h"]h$]h&]uh1hhhhMhjKhhubj$)}(hstruct kvm_pre_fault_memory { /* in/out */ __u64 gpa; __u64 size; /* in */ __u64 flags; __u64 padding[5]; };h]hstruct kvm_pre_fault_memory { /* in/out */ __u64 gpa; __u64 size; /* in */ __u64 flags; __u64 padding[5]; };}hjMsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjKhhubh)}(hX+KVM_PRE_FAULT_MEMORY populates KVM's stage-2 page tables used to map memory for the current vCPU state. KVM maps memory as if the vCPU generated a stage-2 read page fault, e.g. faults in memory as needed, but doesn't break CoW. However, KVM does not mark any newly created stage-2 PTE as Accessed.h]hX/KVM_PRE_FAULT_MEMORY populates KVM’s stage-2 page tables used to map memory for the current vCPU state. KVM maps memory as if the vCPU generated a stage-2 read page fault, e.g. faults in memory as needed, but doesn’t break CoW. However, KVM does not mark any newly created stage-2 PTE as Accessed.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKhhubh)}(hX0In the case of confidential VM types where there is an initial set up of private guest memory before the guest is 'finalized'/measured, this ioctl should only be issued after completing all the necessary setup to put the guest into a 'finalized' state so that the above semantics can be reliably ensured.h]hX8In the case of confidential VM types where there is an initial set up of private guest memory before the guest is ‘finalized’/measured, this ioctl should only be issued after completing all the necessary setup to put the guest into a ‘finalized’ state so that the above semantics can be reliably ensured.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjKhhubh)}(hnIn some cases, multiple vCPUs might share the page tables. In this case, the ioctl can be called in parallel.h]hnIn some cases, multiple vCPUs might share the page tables. In this case, the ioctl can be called in parallel.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjKhhubh)}(hWhen the ioctl returns, the input values are updated to point to the remaining range. If `size` > 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 }(hjNhhhNhNubjz,)}(h`size`h]hsize}(hj&NhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjNubhH > 0 on return, the caller can just issue the ioctl again with the same }(hjNhhhNhNubjz,)}(h`struct kvm_map_memory`h]hstruct kvm_map_memory}(hj8NhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjNubh argument.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM*hjKhhubh)}(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 }(hjPNhhhNhNubjz,)}(h `EOPNOTSUPP`h]h EOPNOTSUPP}(hjXNhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjPNubh even if }(hjPNhhhNhNubjz,)}(h`KVM_CHECK_EXTENSION`h]hKVM_CHECK_EXTENSION}(hjjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjPNubh& reports the capability to be present.}(hjPNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM.hjKhhubh)}(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&]uh1hhhhM5hjKhhubj@)}(h .. _kvm_run:h]h}(h]h ]h"]h$]h&]jKid20uh1j?hM8hjKhhhhubeh}(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}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhhhhhM;ubh)}(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.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjNhhubj$)}(hDstruct kvm_run { /* in */ __u8 request_interrupt_window;h]hDstruct kvm_run { /* in */ __u8 request_interrupt_window;}hjNsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMEhjNhhubh)}(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.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjNhhubj$)}(h__u8 immediate_exit;h]h__u8 immediate_exit;}hjNsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMNhjNhhubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjNhhubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjNhhubj$)}(h/__u8 padding1[6]; /* out */ __u32 exit_reason;h]h/__u8 padding1[6]; /* out */ __u32 exit_reason;}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM[hjNhhubh)}(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.}(hj,OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`hjNhhubj$)}(h#__u8 ready_for_interrupt_injection;h]h#__u8 ready_for_interrupt_injection;}hj:Osbah}(h]h ]h"]h$]h&]hhuh1j#hhhMfhjNhhubh)}(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.}(hjHOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhjNhhubj$)}(h __u8 if_flag;h]h __u8 if_flag;}hjVOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMmhjNhhubh)}(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.}(hjdOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjNhhubj$)}(h __u16 flags;h]h __u16 flags;}hjrOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMthjNhhubh)}(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&]uh1hhhhMvhjNhhubj$)}(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#hhhMyhjNhhubj$)}(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#hhhMhjNhhubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj$)}(h__u64 apic_base;h]h__u64 apic_base;}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjNhhubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj$)}(hqunion { /* KVM_EXIT_UNKNOWN */ struct { __u64 hardware_exit_reason; } hw;h]hqunion { /* KVM_EXIT_UNKNOWN */ struct { __u64 hardware_exit_reason; } hw;}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjNhhubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj$)}(h/* KVM_EXIT_FAIL_ENTRY */ struct { __u64 hardware_entry_failure_reason; __u32 cpu; /* if KVM_LAST_CPU */ } fail_entry;h]h/* KVM_EXIT_FAIL_ENTRY */ struct { __u64 hardware_entry_failure_reason; __u32 cpu; /* if KVM_LAST_CPU */ } fail_entry;}hjOsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjNhhubh)}(hIf exit_reason is KVM_EXIT_FAIL_ENTRY, the vcpu could not be run due to unknown reasons. Further architecture-specific information is available in hardware_entry_failure_reason.h]hIf exit_reason is KVM_EXIT_FAIL_ENTRY, the vcpu could not be run due to unknown reasons. Further architecture-specific information is available in hardware_entry_failure_reason.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj$)}(hZ/* KVM_EXIT_EXCEPTION */ struct { __u32 exception; __u32 error_code; } ex;h]hZ/* KVM_EXIT_EXCEPTION */ struct { __u32 exception; __u32 error_code; } ex;}hj Psbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjNhhubh)}(hUnused.h]hUnused.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj$)}(hX_ /* KVM_EXIT_IO */ struct { #define KVM_EXIT_IO_IN 0 #define KVM_EXIT_IO_OUT 1 __u8 direction; __u8 size; /* bytes */ __u16 port; __u32 count; __u64 data_offset; /* relative to kvm_run start */ } io;h]hX_ /* KVM_EXIT_IO */ struct { #define KVM_EXIT_IO_IN 0 #define KVM_EXIT_IO_OUT 1 __u8 direction; __u8 size; /* bytes */ __u16 port; __u32 count; __u64 data_offset; /* relative to kvm_run start */ } io;}hj(Psbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjNhhubh)}(hXAIf exit_reason is KVM_EXIT_IO, then the vcpu has executed a port I/O instruction which could not be satisfied by kvm. data_offset describes where the data is located (KVM_EXIT_IO_OUT) or where kvm expects application code to place the data for the next KVM_RUN invocation (KVM_EXIT_IO_IN). Data format is a packed array.h]hXAIf exit_reason is KVM_EXIT_IO, then the vcpu has executed a port I/O instruction which could not be satisfied by kvm. data_offset describes where the data is located (KVM_EXIT_IO_OUT) or where kvm expects application code to place the data for the next KVM_RUN invocation (KVM_EXIT_IO_IN). Data format is a packed array.}(hj6PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj$)}(hO/* KVM_EXIT_DEBUG */ struct { struct kvm_debug_exit_arch arch; } debug;h]hO/* KVM_EXIT_DEBUG */ struct { struct kvm_debug_exit_arch arch; } debug;}hjDPsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjNhhubh)}(hIf the exit_reason is KVM_EXIT_DEBUG, then a vcpu is processing a debug event for which architecture specific information is returned.h]hIf the exit_reason is KVM_EXIT_DEBUG, then a vcpu is processing a debug event for which architecture specific information is returned.}(hjRPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj$)}(h/* KVM_EXIT_MMIO */ struct { __u64 phys_addr; __u8 data[8]; __u32 len; __u8 is_write; } mmio;h]h/* KVM_EXIT_MMIO */ struct { __u64 phys_addr; __u8 data[8]; __u32 len; __u8 is_write; } mmio;}hj`Psbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjNhhubh)}(hIf exit_reason is KVM_EXIT_MMIO, then the vcpu has executed a memory-mapped I/O instruction which could not be satisfied by kvm. The 'data' member contains the written data if 'is_write' is true, and should be filled by application code otherwise.h]hXIf exit_reason is KVM_EXIT_MMIO, then the vcpu has executed a memory-mapped I/O instruction which could not be satisfied by kvm. The ‘data’ member contains the written data if ‘is_write’ is true, and should be filled by application code otherwise.}(hjnPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubh)}(hThe 'data' member contains, in its first 'len' bytes, the value as it would appear if the VCPU performed a load or store of the appropriate width directly to the byte array.h]hThe ‘data’ member contains, in its first ‘len’ bytes, the value as it would appear if the VCPU performed a load or store of the appropriate width directly to the byte array.}(hj|PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj;)}(hXFor KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_PAPR, KVM_EXIT_XEN, KVM_EXIT_EPR, KVM_EXIT_X86_RDMSR and KVM_EXIT_X86_WRMSR the corresponding operations are complete (and guest state is consistent) only after userspace has re-entered the kernel with KVM_RUN. The kernel side will first finish incomplete operations and then check for pending signals. The pending state of the operation is not preserved in state which is visible to userspace, thus userspace should ensure that the operation is completed before performing a live migration. Userspace can re-enter the guest with an unmasked signal pending or with the immediate_exit field set to complete pending operations without allowing any further instructions to be executed.h](h)}(hXfFor KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_PAPR, KVM_EXIT_XEN, KVM_EXIT_EPR, KVM_EXIT_X86_RDMSR and KVM_EXIT_X86_WRMSR the corresponding operations are complete (and guest state is consistent) only after userspace has re-entered the kernel with KVM_RUN. The kernel side will first finish incomplete operations and then check for pending signals.h]hXfFor KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_PAPR, KVM_EXIT_XEN, KVM_EXIT_EPR, KVM_EXIT_X86_RDMSR and KVM_EXIT_X86_WRMSR the corresponding operations are complete (and guest state is consistent) only after userspace has re-entered the kernel with KVM_RUN. The kernel side will first finish incomplete operations and then check for pending signals.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubh)}(hX|The pending state of the operation is not preserved in state which is visible to userspace, thus userspace should ensure that the operation is completed before performing a live migration. Userspace can re-enter the guest with an unmasked signal pending or with the immediate_exit field set to complete pending operations without allowing any further instructions to be executed.h]hX|The pending state of the operation is not preserved in state which is visible to userspace, thus userspace should ensure that the operation is completed before performing a live migration. Userspace can re-enter the guest with an unmasked signal pending or with the immediate_exit field set to complete pending operations without allowing any further instructions to be executed.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubeh}(h]h ]h"]h$]h&]uh1j;hjNhhhhhNubj$)}(h/* KVM_EXIT_HYPERCALL */ struct { __u64 nr; __u64 args[6]; __u64 ret; __u64 flags; } hypercall;h]h/* KVM_EXIT_HYPERCALL */ struct { __u64 nr; __u64 args[6]; __u64 ret; __u64 flags; } hypercall;}hjPsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjNhhubh)}(hIt is strongly recommended that userspace use ``KVM_EXIT_IO`` (x86) or ``KVM_EXIT_MMIO`` (all except s390) to implement functionality that requires a guest to interact with host userspace.h](h.It is strongly recommended that userspace use }(hjPhhhNhNubj)}(h``KVM_EXIT_IO``h]h KVM_EXIT_IO}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubh (x86) or }(hjPhhhNhNubj)}(h``KVM_EXIT_MMIO``h]h KVM_EXIT_MMIO}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubhd (all except s390) to implement functionality that requires a guest to interact with host userspace.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubj;)}(h7KVM_EXIT_IO is significantly faster than KVM_EXIT_MMIO.h]h)}(hjPh]h7KVM_EXIT_IO is significantly faster than KVM_EXIT_MMIO.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1j;hjNhhhhhNubh)}(hhh](h)}(h For arm64:h]h For arm64:}(hj QhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhhhhhMubh)}(hSMCCC exits can be enabled depending on the configuration of the SMCCC filter. See the Documentation/virt/kvm/devices/vm.rst ``KVM_ARM_SMCCC_FILTER`` for more details.h](h}SMCCC exits can be enabled depending on the configuration of the SMCCC filter. See the Documentation/virt/kvm/devices/vm.rst }(hjQhhhNhNubj)}(h``KVM_ARM_SMCCC_FILTER``h]hKVM_ARM_SMCCC_FILTER}(hj QhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubh for more details.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(h``nr`` contains the function ID of the guest's SMCCC call. Userspace is expected to use the ``KVM_GET_ONE_REG`` ioctl to retrieve the call parameters from the vCPU's GPRs.h](j)}(h``nr``h]hnr}(hj ioctl to retrieve the call parameters from the vCPU’s GPRs.}(hj8QhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjQhhubj)}(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 }(hjmQhhhNhNubj)}(h ``flags``h]hflags}(hjuQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmQubh:}(hjmQhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjiQubj)}(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&]uh1hhhhMhjQubah}(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}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubh: 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.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjQubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjQubah}(h]h ]h"]h$]h&]uh1jhjiQubeh}(h]h ]h"]h$]h&]uh1jhhhMhjfQubah}(h]h ]h"]h$]h&]uh1jhjQhhhNhNubh)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubj$)}(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;}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjQhhubh)}(h,To be documented (KVM_TPR_ACCESS_REPORTING).h]h,To be documented (KVM_TPR_ACCESS_REPORTING).}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjQhhubj$)}(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#hhhM)hjQhhubh)}(hs390 specific.h]hs390 specific.}(hj/RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjQhhubj$)}(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;}hj=Rsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM6hjQhhubh)}(hs390 specific.h]hs390 specific.}(hjKRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjQhhubj$)}(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;}hjYRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMBhjQhhubh)}(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)}(hjgRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjQhhubj$)}(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;}hjuRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMRhjQhhubh)}(h"Deprecated - was used for 440 KVM.h]h"Deprecated - was used for 440 KVM.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjQhhubj$)}(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#hhhM]hjQhhubh)}(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&]uh1hhhhMbhjQhhubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjQhhubj$)}(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;}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMlhjQhhubh)}(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).}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjQhhubj$)}(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;}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjQhhubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubj$)}(h5/* KVM_EXIT_EPR */ struct { __u32 epr; } epr;h]h5/* KVM_EXIT_EPR */ struct { __u32 epr; } epr;}hjRsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjQhhubh)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubj$)}(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 __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 __u32 type; __u32 ndata; __u64 data[16]; } system_event;}hj+Ssbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjQhhubh)}(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.}(hj9ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(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:}(hjGShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(hXy- 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_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).}(hj`ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\Subah}(h]h ]h"]h$]h&]uh1jhjYSubj)}(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.}(hjxShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjtSubah}(h]h ]h"]h$]h&]uh1jhjYSubj)}(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&]uh1jhjYSubj)}(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 }(hjShhhNhNubjz,)}(h `data[0]`h]hdata[0]}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjSubh.}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhjYSubj)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhjYSubj)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhjYSubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjUSubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(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&]uh1hhhhMhjQhhubh)}(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.}(hj5ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1Tubah}(h]h ]h"]h$]h&]uh1jhj.Tubj)}(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.}(hjMThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjITubah}(h]h ]h"]h$]h&]uh1jhj.Tubj)}(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 }(hjeThhhNhNubj)}(h``sbi_system_reset``h]hsbi_system_reset}(hjmThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeTubh call.}(hjeThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjaTubah}(h]h ]h"]h$]h&]uh1jhj.Tubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj*Tubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(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 }(hjThhhNhNubjz,)}(h`flags`h]hflags}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjTubh5 member in this struct. The field is now aliased to }(hjThhhNhNubjz,)}(h `data[0]`h]hdata[0]}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjTubhK. Userspace can assume that it is only written if ndata is greater than 0.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubeh}(h]id21ah ]h"]h$]j?ah&]uh1hhjNhhhhhMjKubh)}(hhh](h)}(hFor arm/arm64:h]hFor arm/arm64:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThhhhhMubh)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hj.UhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*Uubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhj Uubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hjNUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubj$)}(h>/* KVM_EXIT_IOAPIC_EOI */ struct { __u8 vector; } eoi;h]h>/* KVM_EXIT_IOAPIC_EOI */ struct { __u8 vector; } eoi;}hj\Usbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjThhubh)}(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.}(hjjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubj$)}(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;}hjxUsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjThhubh)}(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&]uh1hhhhM2hjThhubh)}(hValid values for 'type' are:h]h Valid values for ‘type’ are:}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjThhubh)}(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}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjUubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]jjuh1hhhhM7hjUubah}(h]h ]h"]h$]h&]uh1hhhhM7hjThhubh)}(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.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjThhubh)}(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}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjUubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]jjuh1hhhhM=hjUubah}(h]h ]h"]h$]h&]uh1hhhhM=hjThhubh)}(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).}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjThhubj$)}(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#hhhMEhjThhubh)}(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.}(hj"VhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjThhubh)}(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.}(hj0VhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjThhubh)}(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.}(hj>VhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjThhubh)}(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.}(hjLVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjThhubh)}(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.}(hjZVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjThhubj$)}(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;}hjhVsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMnhjThhubh)}(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.}(hjvVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjThhubh)}(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&]uh1hhhhM|hjThhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjVubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthK(uh1jOhjVubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_UNKNOWNh]hKVM_MSR_EXIT_REASON_UNKNOWN}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjVubah}(h]h ]h"]h$]h&]uh1johjVubjp)}(hhh]h)}(h$access to MSR that is unknown to KVMh]h$access to MSR that is unknown to KVM}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjVubah}(h]h ]h"]h$]h&]uh1johjVubeh}(h]h ]h"]h$]h&]uh1jjhjVubjk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_INVALh]hKVM_MSR_EXIT_REASON_INVAL}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjVubah}(h]h ]h"]h$]h&]uh1johjVubjp)}(hhh]h)}(h'access to invalid MSRs or reserved bitsh]h'access to invalid MSRs or reserved bits}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjWubah}(h]h ]h"]h$]h&]uh1johjVubeh}(h]h ]h"]h$]h&]uh1jjhjVubjk)}(hhh](jp)}(hhh]h)}(hKVM_MSR_EXIT_REASON_FILTERh]hKVM_MSR_EXIT_REASON_FILTER}(hj#WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj Wubah}(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}(hj:WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7Wubah}(h]h ]h"]h$]h&]uh1johjWubeh}(h]h ]h"]h$]h&]uh1jjhjVubeh}(h]h ]h"]h$]h&]uh1jehjVubeh}(h]h ]h"]h$]h&]colsKuh1jJhjVubah}(h]h ]h"]h$]h&]uh1jEhjThhhhhNubh)}(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.}(hjgWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hjuWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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&]uh1hhhhMhjThhubh)}(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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubj$)}(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;}hjWsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjThhubh)}(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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(hValid values for 'type' are:h]h Valid values for ‘type’ are:}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjWubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]jjuh1hhhhMhjWubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubj$)}(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;}hjWsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjThhubh)}(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, }(hjXhhhNhNubh 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 XhjXubh.}(hjXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjThhubj$)}(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;}hj%Xsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjThhubh)}(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:}(hj3XhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hjLXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHXubah}(h]h ]h"]h$]h&]uh1jhjEXubah}(h]h ]h"]h$]h&]jjuh1hhhhMhjAXubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hjlXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubj$)}(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;}hjzXsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjThhubh)}(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&]uh1hhhhMhjThhubh)}(hThe valid value for 'flags' is:h]h#The valid value for ‘flags’ is:}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]jjuh1hhhhMhjXubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubj$)}(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;}hjXsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjThhubh)}(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)}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(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.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubj@)}(h.. _cap_enable:h]h}(h]h ]h"]h$]h&]jK cap-enableuh1j?hMhjThhhhubeh}(h] for-arm-arm64ah ]h"]for arm/arm64:ah$]h&]uh1hhjNhhhhhMubeh}(h](the-kvm-run-structurejNeh ]h"](5. the kvm_run structurekvm_runeh$]h&]uh1hhhhhhhhM;jm}jYjNsjo}jNjNsubh)}(hhh](h)}(h,6. Capabilities that can be enabled on vCPUsh]h,6. Capabilities that can be enabled on vCPUs}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhhhhhMubh)}(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 }(hj(YhhhNhNubh)}(h:ref:`KVM_ENABLE_CAP`h]j)}(hj2Yh]hKVM_ENABLE_CAP}(hj4YhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj0Yubah}(h]h ]h"]h$]h&]refdocj refdomainj>Yreftyperef refexplicitrefwarnjkvm_enable_capuh1hhhhMhj(Yubh.}(hj(YhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjYhhubh)}(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.}(hjZYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYhhubh)}(hAThe following information is provided along with the description:h]hAThe following information is provided along with the description:}(hjhYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYhhubh)}(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:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM#hj}Yubj)}(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.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjYubah}(h]h ]h"]h$]h&]uh1jhj}Yubeh}(h]h ]h"]h$]h&]uh1jhhhM#hjzYubj)}(h9Target: whether this is a per-vcpu or per-vm capability. h](j)}(hTarget:h]hTarget:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM&hjYubj)}(hhh]h)}(h0whether this is a per-vcpu or per-vm capability.h]h0whether this is a per-vcpu or per-vm capability.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjYubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1jhhhM&hjzYubj)}(h]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhjO\hhubh)}(hOn return from KVM_RUN, the shared region will reflect the current state of the guest's TLB. If userspace makes any changes, it must call KVM_DIRTY_TLB to tell KVM which entries have been changed, prior to calling KVM_RUN again on this vcpu.h]hOn return from KVM_RUN, the shared region will reflect the current state of the guest’s TLB. If userspace makes any changes, it must call KVM_DIRTY_TLB to tell KVM which entries have been changed, prior to calling KVM_RUN again on this vcpu.}(hjL]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjO\hhubh)}(h>For 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:}(hjZ]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjO\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)}(hjq]h]hIThe “params” field is of type “struct kvm_book3e_206_tlb_params”.}(hjs]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjo]ubah}(h]h ]h"]h$]h&]uh1jhjl]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&]uh1hhhhMyhj]ubah}(h]h ]h"]h$]h&]uh1jhjl]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&]uh1hhhhM{hj]ubah}(h]h ]h"]h$]h&]uh1jhjl]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&]uh1hhhhM}hj]ubah}(h]h ]h"]h$]h&]uh1jhjl]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&]uh1jhjl]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&]uh1jhjl]ubeh}(h]h ]h"]h$]h&]jjuh1hhhhMxhjh]ubah}(h]h ]h"]h$]h&]uh1hhhhMxhjO\hhubeh}(h]kvm-cap-sw-tlbah ]h"]6.3 kvm_cap_sw_tlbah$]h&]uh1hhjYhhhhhMVubh)}(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}(hj)^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj&^hhhKubjy)}(hs390h]h)}(hj9^h]hs390}(hj;^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7^ubah}(h]h ]h"]h$]h&]uh1jxhj&^ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj#^hhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjW^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjT^hhhKubjy)}(hvcpuh]h)}(hjg^h]hvcpu}(hji^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhje^ubah}(h]h ]h"]h$]h&]uh1jxhjT^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^hhhNhNubah}(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.}(hj_hhhNhNubah}(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_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^hhubeh}(h]kvm-cap-s390-css-supportah ]h"]6.4 kvm_cap_s390_css_supportah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.5 KVM_CAP_PPC_EPRh]h6.5 KVM_CAP_PPC_EPR}(hj(_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%_hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj<_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj9_hhhKubjy)}(hppch]h)}(hjL_h]hppc}(hjN_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJ_ubah}(h]h ]h"]h$]h&]uh1jxhj9_ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj6_hhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjg_hhhKubjy)}(hvcpuh]h)}(hjz_h]hvcpu}(hj|_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjx_ubah}(h]h ]h"]h$]h&]uh1jxhjg_ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj6_hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_hhhKubjy)}(h4args[0] defines whether the proxy facility is activeh]h)}(hj_h]h4args[0] defines whether the proxy facility is active}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jxhj_ubeh}(h]h ]h"]h$]h&]uh1jchhhMhj6_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&]uh1jchhhMhj6_hhubeh}(h]h ]h"]h$]h&]uh1j^hj%_hhhhhMubh)}(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.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%_hhubh)}(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.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%_hhubh)}(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`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%_hhubh)}(h8When this capability is enabled, KVM_EXIT_EPR can occur.h]h8When this capability is enabled, KVM_EXIT_EPR can occur.}(hj"`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%_hhubeh}(h]kvm-cap-ppc-eprah ]h"]6.5 kvm_cap_ppc_eprah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.6 KVM_CAP_IRQ_MPICh]h6.6 KVM_CAP_IRQ_MPIC}(hj;`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8`hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjO`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjL`hhhKubjy)}(hppch]h)}(hj_`h]hppc}(hja`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]`ubah}(h]h ]h"]h$]h&]uh1jxhjL`ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjI`hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj}`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjz`hhhKubjy)}(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}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`ubah}(h]h ]h"]h$]h&]uh1jxhjz`ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjI`hhubeh}(h]h ]h"]h$]h&]uh1j^hj8`hhhhhMubh)}(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.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8`hhubeh}(h]kvm-cap-irq-mpicah ]h"]6.6 kvm_cap_irq_mpicah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.7 KVM_CAP_IRQ_XICSh]h6.7 KVM_CAP_IRQ_XICS}(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)}(hTargeth]hTarget}(hj ahhhNhNubah}(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&]uh1jchhhMhj`hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj8ahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj5ahhhKubjy)}(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}(hjJahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFaubah}(h]h ]h"]h$]h&]uh1jxhj5aubeh}(h]h ]h"]h$]h&]uh1jchhhMhj`hhubeh}(h]h ]h"]h$]h&]uh1j^hj`hhhhhMubh)}(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.}(hjjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`hhubeh}(h]kvm-cap-irq-xicsah ]h"]6.7 kvm_cap_irq_xicsah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.8 KVM_CAP_S390_IRQCHIPh]h6.8 KVM_CAP_S390_IRQCHIP}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjahhhKubjy)}(hs390h]h)}(hjah]hs390}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaubah}(h]h ]h"]h$]h&]uh1jxhjaubeh}(h]h ]h"]h$]h&]uh1jchhhMhjahhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjahhhKubjy)}(hvmh]h)}(hjah]hvm}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaubah}(h]h ]h"]h$]h&]uh1jxhjaubeh}(h]h ]h"]h$]h&]uh1jchhhMhjahhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjahhhKubjy)}(hnone h]h)}(hnoneh]hnone}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1jxhjaubeh}(h]h ]h"]h$]h&]uh1jchhhMhjahhubeh}(h]h ]h"]h$]h&]uh1j^hjahhhhhMubh)}(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%bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjahhubeh}(h]kvm-cap-s390-irqchipah ]h"]6.8 kvm_cap_s390_irqchipah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.9 KVM_CAP_MIPS_FPUh]h6.9 KVM_CAP_MIPS_FPU}(hj>bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;bhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjRbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjObhhhKubjy)}(hmipsh]h)}(hjbbh]hmips}(hjdbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`bubah}(h]h ]h"]h$]h&]uh1jxhjObubeh}(h]h ]h"]h$]h&]uh1jchhhMhjLbhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}bhhhKubjy)}(hvcpuh]h)}(hjbh]hvcpu}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1jxhj}bubeh}(h]h ]h"]h$]h&]uh1jchhhMhjLbhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjbhhhKubjy)}(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).}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1jxhjbubeh}(h]h ]h"]h$]h&]uh1jchhhMhjLbhhubeh}(h]h ]h"]h$]h&]uh1j^hj;bhhhhhMubh)}(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 }(hjbhhhNhNubj)}(h``KVM_REG_MIPS_FPR_*``h]hKVM_REG_MIPS_FPR_*}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubh and }(hjbhhhNhNubj)}(h``KVM_REG_MIPS_FCR_*``h]hKVM_REG_MIPS_FCR_*}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubh 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.}(hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj;bhhubeh}(h]kvm-cap-mips-fpuah ]h"]6.9 kvm_cap_mips_fpuah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.10 KVM_CAP_MIPS_MSAh]h6.10 KVM_CAP_MIPS_MSA}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj1chhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj.chhhKubjy)}(hmipsh]h)}(hjAch]hmips}(hjCchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?cubah}(h]h ]h"]h$]h&]uh1jxhj.cubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+chhubjd)}(hhh](ji)}(hTargeth]hTarget}(hj_chhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj\chhhKubjy)}(hvcpuh]h)}(hjoch]hvcpu}(hjqchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjmcubah}(h]h ]h"]h$]h&]uh1jxhj\cubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+chhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjchhhKubjy)}(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).}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubah}(h]h ]h"]h$]h&]uh1jxhjcubeh}(h]h ]h"]h$]h&]uh1jchhhMhj+chhubeh}(h]h ]h"]h$]h&]uh1j^hjchhhhhMubh)}(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 }(hjchhhNhNubj)}(h``KVM_REG_MIPS_VEC_*``h]hKVM_REG_MIPS_VEC_*}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubh and }(hjchhhNhNubj)}(h``KVM_REG_MIPS_MSA_*``h]hKVM_REG_MIPS_MSA_*}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubhl registers can be accessed, and the Config5.MSAEn bit is accessible via the KVM API and also from the guest.}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjchhubeh}(h]kvm-cap-mips-msaah ]h"]6.10 kvm_cap_mips_msaah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.74 KVM_CAP_SYNC_REGSh]h6.74 KVM_CAP_SYNC_REGS}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj dhhhKubjy)}(h s390, x86h]h)}(hj dh]h s390, x86}(hj"dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjdubah}(h]h ]h"]h$]h&]uh1jxhj dubeh}(h]h ]h"]h$]h&]uh1jchhhMhj dhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hj>dhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj;dhhhKubjy)}(hs390: always enabled, x86: vcpuh]h)}(hjNdh]hs390: always enabled, x86: vcpu}(hjPdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLdubah}(h]h ]h"]h$]h&]uh1jxhj;dubeh}(h]h ]h"]h$]h&]uh1jchhhMhj dhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjldhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjidhhhKubjy)}(hnoneh]h)}(hj|dh]hnone}(hj~dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjzdubah}(h]h ]h"]h$]h&]uh1jxhjidubeh}(h]h ]h"]h$]h&]uh1jchhhMhj dhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjdhhhKubjy)}(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).}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjdubah}(h]h ]h"]h$]h&]uh1jxhjdubeh}(h]h ]h"]h$]h&]uh1jchhhMhj dhhubeh}(h]h ]h"]h$]h&]uh1j^hjchhhhhMubh)}(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 }(hjdhhhNhNubh)}(h:ref:`kvm_run`h]j)}(hjdh]hkvm_run}(hjdhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]refdocj refdomainjdreftyperef refexplicitrefwarnjkvm_runuh1hhhhMhjdubhX|, 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.}(hjdhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjchhubh)}(h4For s390 specifics, please refer to the source code.h]h4For s390 specifics, please refer to the source code.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjchhubh)}(hFor x86:h]hFor x86:}(hj ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjchhubh)}(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!ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjeubah}(h]h ]h"]h$]h&]uh1jhjehhhhhNubj)}(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.}(hj9ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5eubah}(h]h ]h"]h$]h&]uh1jhjehhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhMhjchhubh)}(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.}(hjSehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjchhubh)}(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.}(hjaehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjchhubh)}(h6Unused bitfields in the bitarrays must be set to zero.h]h6Unused bitfields in the bitarrays must be set to zero.}(hjoehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjchhubj$)}(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; };}hj}esbah}(h]h ]h"]h$]h&]hhuh1j#hhhM hjchhubeh}(h]kvm-cap-sync-regsah ]h"]6.74 kvm_cap_sync_regsah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.75 KVM_CAP_PPC_IRQ_XIVEh]h6.75 KVM_CAP_PPC_IRQ_XIVE}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjehhhKubjy)}(hppch]h)}(hjeh]hppc}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjeubah}(h]h ]h"]h$]h&]uh1jxhjeubeh}(h]h ]h"]h$]h&]uh1jchhhMhjehhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjehhhKubjy)}(hvcpuh]h)}(hjeh]hvcpu}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjeubah}(h]h ]h"]h$]h&]uh1jxhjeubeh}(h]h ]h"]h$]h&]uh1jchhhMhjehhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(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}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhMhjehhubeh}(h]h ]h"]h$]h&]uh1j^hjehhhhhMubh)}(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.}(hj8fhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjehhubeh}(h]kvm-cap-ppc-irq-xiveah ]h"]6.75 kvm_cap_ppc_irq_xiveah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.76 KVM_CAP_HYPERV_SYNICh]h6.76 KVM_CAP_HYPERV_SYNIC}(hjQfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNfhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjefhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjbfhhhKubjy)}(hx86h]h)}(hjufh]hx86}(hjwfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjsfubah}(h]h ]h"]h$]h&]uh1jxhjbfubeh}(h]h ]h"]h$]h&]uh1jchhhMhj_fhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(hvcpu h]h)}(hvcpuh]hvcpu}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhMhj_fhhubeh}(h]h ]h"]h$]h&]uh1j^hjNfhhhhhMubh)}(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).}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjNfhhubh)}(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.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjNfhhubeh}(h]kvm-cap-hyperv-synicah ]h"]6.76 kvm_cap_hyperv_synicah$]h&]uh1hhjYhhhhhMubh)}(hhh](h)}(h6.77 KVM_CAP_HYPERV_SYNIC2h]h6.77 KVM_CAP_HYPERV_SYNIC2}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhhhhhM+ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(hx86h]h)}(hjgh]hx86}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjgubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhM-hjfhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hj.ghhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+ghhhKubjy)}(hvcpu h]h)}(hvcpuh]hvcpu}(hj@ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hjrun::h]hVBefore exiting to userspace, kvm handlers should fill in s390_stsi field of vcpu->run:}(hj3mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubj$)}(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}hjAmsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMhjlhhubh)}(h9KVM handlers should exit to userspace with rc = -EREMOTE.h]h9KVM handlers should exit to userspace with rc = -EREMOTE.}(hjOmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubeh}(h]kvm-cap-s390-user-stsiah ]h"]7.4 kvm_cap_s390_user_stsiah$]h&]uh1hhjAihhhhhMubh)}(hhh](h)}(h7.5 KVM_CAP_SPLIT_IRQCHIPh]h7.5 KVM_CAP_SPLIT_IRQCHIP}(hjhmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjemhhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj|mhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjymhhhKubjy)}(hx86h]h)}(hjmh]hx86}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjmubah}(h]h ]h"]h$]h&]uh1jxhjymubeh}(h]h ]h"]h$]h&]uh1jchhhMhjvmhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjmhhhKubjy)}(h9args[0] - number of routes reserved for userspace IOAPICsh]h)}(hjmh]h9args[0] - number of routes reserved for userspace IOAPICs}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjmubah}(h]h ]h"]h$]h&]uh1jxhjmubeh}(h]h ]h"]h$]h&]uh1jchhhMhjvmhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjmhhhNhNubah}(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}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjmubah}(h]h ]h"]h$]h&]uh1jxhjmubeh}(h]h ]h"]h$]h&]uh1jchhhMhjvmhhubeh}(h]h ]h"]h$]h&]uh1j^hjemhhhhhMubh)}(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 nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjemhhubh)}(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.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjemhhubh)}(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&nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjemhhubeh}(h]kvm-cap-split-irqchipah ]h"]7.5 kvm_cap_split_irqchipah$]h&]uh1hhjAihhhhhMubh)}(hhh](h)}(h7.6 KVM_CAP_S390_RIh]h7.6 KVM_CAP_S390_RI}(hj?nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjflags, 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&]uh1hhhhM&hjzhhubh)}(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&]uh1hhhhM-hjzhhubeh}(h]kvm-cap-x86-bus-lock-exitah ]h"]7.22 kvm_cap_x86_bus_lock_exitah$]h&]uh1hhjAihhhhhM ubh)}(hhh](h)}(h7.23 KVM_CAP_PPC_DAWR1h]h7.23 KVM_CAP_PPC_DAWR1}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hhhhhM2ubj_)}(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&]uh1hhhhM4hj{ubah}(h]h ]h"]h$]h&]uh1jxhj{ubeh}(h]h ]h"]h$]h&]uh1jchhhM4hj{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&]uh1hhhhM5hj&|ubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhM5hj{hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjF|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjC|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}(hjX|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjT|ubah}(h]h ]h"]h$]h&]uh1jxhjC|ubeh}(h]h ]h"]h$]h&]uh1jchhhM6hj{hhubeh}(h]h ]h"]h$]h&]uh1j^hj{hhhhhM4ubh)}(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.}(hjx|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj{hhubeh}(h]kvm-cap-ppc-dawr1ah ]h"]7.23 kvm_cap_ppc_dawr1ah$]h&]uh1hhjAihhhhhM2ubh)}(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|hhhhhM=ubj_)}(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&]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)}(hvmh]h)}(hj|h]hvm}(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)}(h"args[0] is the fd of the source vmh]h)}(hj}h]h"args[0] is the fd of the source vm}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj}ubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhMAhj|hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj/}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj,}hhhKubjy)}(h0 on success; ENOTTY on error h]h)}(h0 on success; ENOTTY on errorh]h0 on success; ENOTTY on error}(hjA}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj=}ubah}(h]h ]h"]h$]h&]uh1jxhj,}ubeh}(h]h ]h"]h$]h&]uh1jchhhMBhj|hhubeh}(h]h ]h"]h$]h&]uh1j^hj|hhhhhM?ubh)}(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.}(hja}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhj|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).}(hjo}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj|hhubeh}(h] kvm-cap-vm-copy-enc-context-fromah ]h"]%7.24 kvm_cap_vm_copy_enc_context_fromah$]h&]uh1hhjAihhhhhM=ubh)}(hhh](h)}(h7.25 KVM_CAP_SGX_ATTRIBUTEh]h7.25 KVM_CAP_SGX_ATTRIBUTE}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hhhhhMMubj_)}(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&]uh1hhhhMOhj}ubah}(h]h ]h"]h$]h&]uh1jxhj}ubeh}(h]h ]h"]h$]h&]uh1jchhhMOhj}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&]uh1hhhhMPhj}ubah}(h]h ]h"]h$]h&]uh1jxhj}ubeh}(h]h ]h"]h$]h&]uh1jchhhMPhj}hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}hhhKubjy)}(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}(hj ~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj~ubah}(h]h ]h"]h$]h&]uh1jxhj}ubeh}(h]h ]h"]h$]h&]uh1jchhhMQhj}hhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj&~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj#~hhhKubjy)}(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.}(hj8~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj4~ubah}(h]h ]h"]h$]h&]uh1jxhj#~ubeh}(h]h ]h"]h$]h&]uh1jchhhMRhj}hhubeh}(h]h ]h"]h$]h&]uh1j^hj}hhhhhMOubh)}(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).}(hjX~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj}hhubh)}(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.}(hjf~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj}hhubh)}(h4See Documentation/arch/x86/sgx.rst for more details.h]h4See Documentation/arch/x86/sgx.rst for more details.}(hjt~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahj}hhubeh}(h]kvm-cap-sgx-attributeah ]h"]7.25 kvm_cap_sgx_attributeah$]h&]uh1hhjAihhhhhMMubh)}(hhh](h)}(h&7.27 KVM_CAP_EXIT_ON_EMULATION_FAILUREh]h&7.27 KVM_CAP_EXIT_ON_EMULATION_FAILURE}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hhhhhMdubj_)}(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&]uh1hhhhMfhj~ubah}(h]h ]h"]h$]h&]uh1jxhj~ubeh}(h]h ]h"]h$]h&]uh1jchhhMfhj~hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj~hhhKubjy)}(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}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj~ubah}(h]h ]h"]h$]h&]uh1jxhj~ubeh}(h]h ]h"]h$]h&]uh1jchhhMghj~hhubeh}(h]h ]h"]h$]h&]uh1j^hj~hhhhhMfubh)}(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.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihj~hhubeh}(h]!kvm-cap-exit-on-emulation-failureah ]h"]&7.27 kvm_cap_exit_on_emulation_failureah$]h&]uh1hhjAihhhhhMdubh)}(hhh](h)}(h7.28 KVM_CAP_ARM_MTEh]h7.28 KVM_CAP_ARM_MTE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMvubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj+hhhKubjy)}(harm64h]h)}(hj>h]harm64}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhj<ubah}(h]h ]h"]h$]h&]uh1jxhj+ubeh}(h]h ]h"]h$]h&]uh1jchhhMxhj(hhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjYhhhKubjy)}(hnone h]h)}(hnoneh]hnone}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjjubah}(h]h ]h"]h$]h&]uh1jxhjYubeh}(h]h ]h"]h$]h&]uh1jchhhMyhj(hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMxubh)}(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&]uh1hhhhM{hjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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 }(hjhhhNhNubj)}(h``MAP_ANONYMOUS``h]h MAP_ANONYMOUS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh# or with a RAM-based file mapping (}(hjhhhNhNubj)}(h ``tmpfs``h]htmpfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h ``memfd``h]hmemfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhV), attempts to create a memslot with an invalid mmap will result in an -EINVAL return.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubeh}(h]kvm-cap-arm-mteah ]h"]7.28 kvm_cap_arm_mteah$]h&]uh1hhjAihhhhhMvubh)}(hhh](h)}(h%7.29 KVM_CAP_VM_MOVE_ENC_CONTEXT_FROMh]h%7.29 KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj_)}(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&]uh1jhhjXhhhKubjy)}(hvmh]h)}(hjkh]hvm}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjiubah}(h]h ]h"]h$]h&]uh1jxhjXubeh}(h]h ]h"]h$]h&]uh1jchhhMhj'hhubjd)}(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}(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)}(h 0 on success h]h)}(h 0 on successh]h 0 on success}(hjɀhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjŀubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMhj'hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhMubh)}(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&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubeh}(h] kvm-cap-vm-move-enc-context-fromah ]h"]%7.29 kvm_cap_vm_move_enc_context_fromah$]h&]uh1hhjAihhhhhMubh)}(hhh](h)}(h7.31 KVM_CAP_DISABLE_QUIRKS2h]h7.31 KVM_CAP_DISABLE_QUIRKS2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubj_)}(hhh](jd)}(hhh](ji)}(h Parametersh]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj!hhhKubjy)}(h&args[0] - set of KVM quirks to disableh]h)}(hj4h]h&args[0] - set of KVM quirks to disable}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jxhj!ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjOhhhKubjy)}(hx86h]h)}(hjbh]hx86}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`ubah}(h]h ]h"]h$]h&]uh1jxhjOubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj}hhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jxhj}ubeh}(h]h ]h"]h$]h&]uh1jchhhMhjhhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhMubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(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&]uh1hhhhMhj hhubh)}(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.}(hj΁hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(h"The valid bits in cap.args[0] are:h]h"The valid bits in cap.args[0] are:}(hj܁hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubjF)}(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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1johjubjp)}(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).}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_CD_NW_CLEAREDh]hKVM_X86_QUIRK_CD_NW_CLEARED}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1johj>ubjp)}(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.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXubh)}(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.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXubeh}(h]h ]h"]h$]h&]uh1johj>ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_LAPIC_MMIO_HOLEh]hKVM_X86_QUIRK_LAPIC_MMIO_HOLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_OUT_7E_INC_RIPh]hKVM_X86_QUIRK_OUT_7E_INC_RIP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(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.}(hjׂhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjԂubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(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&]uh1hhhhMhjubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h KVM_X86_QUIRK_FIX_HYPERCALL_INSNh]h KVM_X86_QUIRK_FIX_HYPERCALL_INSN}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1johj(ubjp)}(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.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1johj(ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h#KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTSh]h#KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1johj_ubjp)}(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.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyubah}(h]h ]h"]h$]h&]uh1johj_ubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(hKVM_X86_QUIRK_SLOT_ZAP_ALLh]hKVM_X86_QUIRK_SLOT_ZAP_ALL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h KVM_X86_QUIRK_STUFF_FEATURE_MSRSh]h KVM_X86_QUIRK_STUFF_FEATURE_MSRS}(hjӃhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjЃubah}(h]h ]h"]h$]h&]uh1johj̓ubjp)}(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&]uh1hhhhMhjubah}(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 hhhhhNubeh}(h]kvm-cap-disable-quirks2ah ]h"]7.31 kvm_cap_disable_quirks2ah$]h&]uh1hhjAihhhhhMubh)}(hhh](h)}(h7.32 KVM_CAP_MAX_VCPU_IDh]h7.32 KVM_CAP_MAX_VCPU_ID}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj3hhhKubjy)}(hx86h]h)}(hjFh]hx86}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjDubah}(h]h ]h"]h$]h&]uh1jxhj3ubeh}(h]h ]h"]h$]h&]uh1jchhhM hj0hhubjd)}(hhh](ji)}(hTargeth]hTarget}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjahhhKubjy)}(hVMh]h)}(hjth]hVM}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjrubah}(h]h ]h"]h$]h&]uh1jxhjaubeh}(h]h ]h"]h$]h&]uh1jchhhM hj0hhubjd)}(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 hj0hhubjd)}(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.}(hj҄hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj΄ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hj0hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h]kvm-cap-max-vcpu-idah ]h"]7.32 kvm_cap_max_vcpu_idah$]h&]uh1hhjAihhhhhM ubh)}(hhh](h)}(h7.33 KVM_CAP_X86_NOTIFY_VMEXITh]h7.33 KVM_CAP_X86_NOTIFY_VMEXIT}(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)}(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)}(hTargeth]hTarget}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjXhhhKubjy)}(hVMh]h)}(hjkh]hVM}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjiubah}(h]h ]h"]h$]h&]uh1jxhjXubeh}(h]h ]h"]h$]h&]uh1jchhhM hj'hhubjd)}(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! hj'hhubjd)}(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" hj'hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM 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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM% hjhhubj$)}(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)}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM( hjhhubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+ hjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2 hjhhubh)}(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.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5 hjhhubeh}(h]kvm-cap-x86-notify-vmexitah ]h"]7.33 kvm_cap_x86_notify_vmexitah$]h&]uh1hhjAihhhhhM ubh)}(hhh](h)}(h#7.35 KVM_CAP_X86_APIC_BUS_CYCLES_NSh]h#7.35 KVM_CAP_X86_APIC_BUS_CYCLES_NS}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hhhhhM: ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjKhhhKubjy)}(hx86h]h)}(hj^h]hx86}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM< hj\ubah}(h]h ]h"]h$]h&]uh1jxhjKubeh}(h]h ]h"]h$]h&]uh1jchhhM< hjHhhubjd)}(hhh](ji)}(hTargeth]hTarget}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjyhhhKubjy)}(hVMh]h)}(hjh]hVM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM= hjubah}(h]h ]h"]h$]h&]uh1jxhjyubeh}(h]h ]h"]h$]h&]uh1jchhhM= hjHhhubjd)}(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> hjHhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj؆hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjՆhhhKubjy)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM? hjubah}(h]h ]h"]h$]h&]uh1jxhjՆubeh}(h]h ]h"]h$]h&]uh1jchhhM? hjHhhubeh}(h]h ]h"]h$]h&]uh1j^hj7hhhhhM< 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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC hj7hhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMG hj7hhubeh}(h]kvm-cap-x86-apic-bus-cycles-nsah ]h"]#7.35 kvm_cap_x86_apic_bus_cycles_nsah$]h&]uh1hhjAihhhhhM: 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}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hhhhhMK ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(h x86, arm64h]h)}(hjUh]h x86, arm64}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMM hjSubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhMM hj?hhubjd)}(hhh](ji)}(hTypeh]hType}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(hvmh]h)}(hjh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMN hjubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhMN hj?hhubjd)}(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&]uh1hhhhMO hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMO hj?hhubeh}(h]h ]h"]h$]h&]uh1j^hj.hhhhhMM 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.}(hjӇhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ hj.hhubh)}(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 }(hjhhhNhNubj)}(h``struct kvm_dirty_gfn``h]hstruct kvm_dirty_gfn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh". Each dirty entry is defined as:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMT hj.hhubj$)}(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; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMW hj.hhubh)}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM] hj.hhubj$)}(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}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM` hj.hhubh)}(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).}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMd hj.hhubh)}(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.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl hj.hhubh)}(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 }(hjGhhhNhNubj)}(h``00``h]h00}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh), dirty (flag bits }(hjGhhhNhNubj)}(h``01``h]h01}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh) or harvested (flag bits }(hjGhhhNhNubj)}(h``1X``h]h1X}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh2). The state machine for the entry is as follows:}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMr hj.hhubj$)}(h dirtied harvested reset 00 -----------> 01 -------------> 1X -------+ ^ | | | +------------------------------------------+h]h dirtied harvested reset 00 -----------> 01 -------------> 1X -------+ ^ | | | +------------------------------------------+}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhMv hj.hhubh)}(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| hj.hhubh)}(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 hj.hhubh)}(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.}(hjوhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubh)}(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 }(hjhhhNhNubjn)}(h*before*h]hbefore}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubh( reading the content of the dirty pages.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubh)}(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.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubh)}(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.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubh)}(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.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubh)}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubh)}(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”.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.hhubeh}(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&]uh1hhjAihhhhhMK ubh)}(hhh](h)}(h7.37 KVM_CAP_PMU_CAPABILITYh]h7.37 KVM_CAP_PMU_CAPABILITY}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhhhhhM 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)}(hTypeh]hType}(hjhhhNhNubah}(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)}(h5arg[0] is bitmask of PMU virtualization capabilities.h]h)}(hjh]h5arg[0] is bitmask of PMU virtualization capabilities.}(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)}(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}(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^hjqhhhhhM ubh)}(h1This capability alters PMU virtualization in KVM.h]h1This capability alters PMU virtualization in KVM.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjqhhubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjqhhubh)}(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.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjqhhubh)}(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.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjqhhubeh}(h]kvm-cap-pmu-capabilityah ]h"]7.37 kvm_cap_pmu_capabilityah$]h&]uh1hhjAihhhhhM 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&]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)}(hTypeh]hType}(hjɊhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjƊhhhKubjy)}(hvmh]h)}(hjيh]hvm}(hjۊhhhDNhNubah}(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)}(harg[0] must be 0.h]h)}(hjh]harg[0] must be 0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj"hhhKubjy)}(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.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj3ubah}(h]h ]h"]h$]h&]uh1jxhj"ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(hHThis capability disables the NX huge pages mitigation for iTLB MULTIHIT.h]hHThis capability disables the NX huge pages mitigation for iTLB MULTIHIT.}(hjWhhhNhNubah}(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.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM 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.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h] kvm-cap-vm-disable-nx-huge-pagesah ]h"]%7.38 kvm_cap_vm_disable_nx_huge_pagesah$]h&]uh1hhjAihhhhhM 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&]uh1hhjhhhhhM 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&]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)}(hjދh]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#arg[0] is the new split chunk size.h]h)}(hj h]h#arg[0] is the new split chunk size.}(hjhhhNhNubah}(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}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj'hhhKubjy)}(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.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj8ubah}(h]h ]h"]h$]h&]uh1jxhj'ubeh}(h]h ]h"]h$]h&]uh1jchhhM hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM ubh)}(hAThis capability sets the chunk size used in Eager Page Splitting.h]hAThis capability sets the chunk size used in Eager Page Splitting.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM 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.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM 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.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM 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&]uh1hhhhM!hjhhubeh}(h]"kvm-cap-arm-eager-split-chunk-sizeah ]h"]'7.39 kvm_cap_arm_eager_split_chunk_sizeah$]h&]uh1hhjAihhhhhM 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 !hjhhubjd)}(hhh](ji)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjތhhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM !hjubah}(h]h ]h"]h$]h&]uh1jxhjތubeh}(h]h ]h"]h$]h&]uh1jchhhM !hjhhubeh}(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.}(hjhhhNhNubah}(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.}(hj!hhhNhNubah}(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.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-exit-hypercallah ]h"]7.40 kvm_cap_exit_hypercallah$]h&]uh1hhjAihhhhhM!ubh)}(hhh](h)}(h7.41 KVM_CAP_ARM_SYSTEM_SUSPENDh]h7.41 KVM_CAP_ARM_SYSTEM_SUSPEND}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhM!ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjYhhhKubjy)}(harm64h]h)}(hjlh]harm64}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjjubah}(h]h ]h"]h$]h&]uh1jxhjYubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjVhhubjd)}(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!hjVhhubeh}(h]h ]h"]h$]h&]uh1j^hjEhhhhhM!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!hjEhhubeh}(h]kvm-cap-arm-system-suspendah ]h"]7.41 kvm_cap_arm_system_suspendah$]h&]uh1hhjAihhhhhM!ubh)}(hhh](h)}(h%7.37 KVM_CAP_ARM_WRITABLE_IMP_ID_REGSh]h%7.37 KVM_CAP_ARM_WRITABLE_IMP_ID_REGS}(hjՍhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjҍhhhhhM"!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&]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%!hj%ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM%!hjhhubjd)}(hhh](ji)}(h Parametersh]h Parameters}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjBhhhKubjy)}(hNoneh]h)}(hjUh]hNone}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&!hjSubah}(h]h ]h"]h$]h&]uh1jxhjBubeh}(h]h ]h"]h$]h&]uh1jchhhM&!hjhhubjd)}(hhh](ji)}(hReturnsh]hReturns}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjphhhKubjy)}(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'!hjubah}(h]h ]h"]h$]h&]uh1jxhjpubeh}(h]h ]h"]h$]h&]uh1jchhhM'!hjhhubeh}(h]h ]h"]h$]h&]uh1j^hjҍhhhhhM$!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*!hjҍhhubh)}(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.!hjҍhhubeh}(h] kvm-cap-arm-writable-imp-id-regsah ]h"]%7.37 kvm_cap_arm_writable_imp_id_regsah$]h&]uh1hhjAihhhhhM"!ubeh}(h]('capabilities-that-can-be-enabled-on-vmsj*ijieh ]h"](*7. capabilities that can be enabled on vms cap_enable_vmj,ieh$]h&]uh1hhhhhhhhMbjm}(jώj ij,ijiujo}(j*ij ijijiuubh)}(hhh](h)}(h8. Other capabilities.h]h8. Other capabilities.}(hj׎hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjԎhhhhhM4!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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6!hjԎhhubh)}(hhh](h)}(h8.1 KVM_CAP_PPC_HWRNGh]h8.1 KVM_CAP_PPC_HWRNG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM:!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hppc h]h)}(hppch]hppc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-ppc-hwrngah ]h"]8.1 kvm_cap_ppc_hwrngah$]h&]uh1hhjԎhhhhhM:!ubh)}(hhh](h)}(h8.3 KVM_CAP_PPC_MMU_RADIXh]h8.3 KVM_CAP_PPC_MMU_RADIX}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhhhhhME!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjfhhhKubjy)}(hppc h]h)}(hppch]hppc}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMG!hjwubah}(h]h ]h"]h$]h&]uh1jxhjfubeh}(h]h ]h"]h$]h&]uh1jchhhMG!hjchhubah}(h]h ]h"]h$]h&]uh1j^hjRhhhhhMG!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&]uh1hhhhMI!hjRhhubeh}(h]kvm-cap-ppc-mmu-radixah ]h"]8.3 kvm_cap_ppc_mmu_radixah$]h&]uh1hhjԎhhhhhME!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&]uh1hhjhhhhhMO!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjȏhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjŏhhhKubjy)}(hppc h]h)}(hppch]hppc}(hjڏhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQ!hj֏ubah}(h]h ]h"]h$]h&]uh1jxhjŏubeh}(h]h ]h"]h$]h&]uh1jchhhMQ!hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhMQ!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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMS!hjhhubeh}(h]kvm-cap-ppc-mmu-hash-v3ah ]h"]8.4 kvm_cap_ppc_mmu_hash_v3ah$]h&]uh1hhjԎhhhhhMO!ubh)}(hhh](h)}(h8.5 KVM_CAP_MIPS_VZh]h8.5 KVM_CAP_MIPS_VZ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMY!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj$hhhKubjy)}(hmips h]h)}(hmipsh]hmips}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[!hj5ubah}(h]h ]h"]h$]h&]uh1jxhj$ubeh}(h]h ]h"]h$]h&]uh1jchhhM[!hj!hhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM[!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.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]!hjhhubh)}(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.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMc!hjhhubh)}(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.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMh!hjhhubjF)}(hhh]jK)}(hhh](jP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jOhjubjP)}(hhh]h}(h]h ]h"]h$]h&]colwidthKJuh1jOhjubjf)}(hhh](jk)}(hhh](jp)}(hhh]h)}(hjvh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn!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&]uh1hhhhMn!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&]uh1hhhhMr!hjِubah}(h]h ]h"]h$]h&]uh1johj֐ubjp)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMr!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&]uh1jEhjhhhhhNubeh}(h]kvm-cap-mips-vzah ]h"]8.5 kvm_cap_mips_vzah$]h&]uh1hhjԎhhhhhMY!ubh)}(hhh](h)}(h8.7 KVM_CAP_MIPS_64BITh]h8.7 KVM_CAP_MIPS_64BIT}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hhhhhMw!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj<hhhKubjy)}(hmips h]h)}(hmipsh]hmips}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMy!hjMubah}(h]h ]h"]h$]h&]uh1jxhj<ubeh}(h]h ]h"]h$]h&]uh1jchhhMy!hj9hhubah}(h]h ]h"]h$]h&]uh1j^hj(hhhhhMy!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.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{!hj(hhubh)}(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.}(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&]colwidthKHuh1jOhjubjf)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1johjubeh}(h]h ]h"]h$]h&]uh1jjhjubjk)}(hhh](jp)}(hhh]h)}(h2h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1johjubjp)}(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.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj0ubah}(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(hhhhhNubeh}(h]kvm-cap-mips-64bitah ]h"]8.7 kvm_cap_mips_64bitah$]h&]uh1hhjԎhhhhhMw!ubh)}(hhh](h)}(h8.9 KVM_CAP_ARM_USER_IRQh]h8.9 KVM_CAP_ARM_USER_IRQ}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj|hhhKubjy)}(harm64 h]h)}(harm64h]harm64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhj|ubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjyhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhhM!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!hjhhhubh)}(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!hjhhhubh)}(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.}(hj͒hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhhubh)}(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&]uh1hhhhM!hjhhhubh)}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhhubj$)}(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}hjsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM!hjhhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhhubeh}(h]kvm-cap-arm-user-irqah ]h"]8.9 kvm_cap_arm_user_irqah$]h&]uh1hhjԎhhhhhM!ubh)}(hhh](h)}(h8.10 KVM_CAP_PPC_SMT_POSSIBLEh]h8.10 KVM_CAP_PPC_SMT_POSSIBLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj/hhhKubjy)}(hppc h]h)}(hppch]hppc}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj@ubah}(h]h ]h"]h$]h&]uh1jxhj/ubeh}(h]h ]h"]h$]h&]uh1jchhhM!hj,hhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM!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.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-ppc-smt-possibleah ]h"]8.10 kvm_cap_ppc_smt_possibleah$]h&]uh1hhjԎhhhhhM!ubh)}(hhh](h)}(h8.12 KVM_CAP_HYPERV_VP_INDEXh]h8.12 KVM_CAP_HYPERV_VP_INDEX}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhhhhhM!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^hjzhhhhhM!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&]uh1hhhhM!hjzhhubeh}(h]kvm-cap-hyperv-vp-indexah ]h"]8.12 kvm_cap_hyperv_vp_indexah$]h&]uh1hhjԎhhhhhM!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ٓhhhhhM!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^hjٓhhhhhM!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.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjٓhhubeh}(h]kvm-cap-s390-ais-migrationah ]h"]8.13 kvm_cap_s390_ais_migrationah$]h&]uh1hhjԎhhhhhM!ubh)}(hhh](h)}(h8.14 KVM_CAP_S390_PSWh]h8.14 KVM_CAP_S390_PSW}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjLhhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj]ubah}(h]h ]h"]h$]h&]uh1jxhjLubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjIhhubah}(h]h ]h"]h$]h&]uh1j^hj8hhhhhM!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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj8hhubeh}(h]kvm-cap-s390-pswah ]h"]8.14 kvm_cap_s390_pswah$]h&]uh1hhjԎhhhhhM!ubh)}(hhh](h)}(h8.15 KVM_CAP_S390_GMAPh]h8.15 KVM_CAP_S390_GMAP}(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)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-s390-gmapah ]h"]8.15 kvm_cap_s390_gmapah$]h&]uh1hhjԎhhhhhM!ubh)}(hhh](h)}(h8.16 KVM_CAP_S390_COWh]h8.16 KVM_CAP_S390_COW}(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)}(hs390 h]h)}(hs390h]hs390}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jxhj ubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM!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.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubeh}(h]kvm-cap-s390-cowah ]h"]8.16 kvm_cap_s390_cowah$]h&]uh1hhjԎhhhhhM!ubh)}(hhh](h)}(h8.17 KVM_CAP_S390_BPBh]h8.17 KVM_CAP_S390_BPB}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhhhhhM!ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjihhhKubjy)}(hs390 h]h)}(hs390h]hs390}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjzubah}(h]h ]h"]h$]h&]uh1jxhjiubeh}(h]h ]h"]h$]h&]uh1jchhhM!hjfhhubah}(h]h ]h"]h$]h&]uh1j^hjUhhhhhM!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!hjUhhubeh}(h]kvm-cap-s390-bpbah ]h"]8.17 kvm_cap_s390_bpbah$]h&]uh1hhjԎhhhhhM!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}(hj˕hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjȕhhhKubjy)}(hx86 h]h)}(hx86h]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ŕ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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubeh}(h]kvm-cap-hyperv-tlbflushah ]h"]8.18 kvm_cap_hyperv_tlbflushah$]h&]uh1hhjԎhhhhhM!ubh)}(hhh](h)}(h"8.19 KVM_CAP_ARM_INJECT_SERROR_ESRh]h"8.19 KVM_CAP_ARM_INJECT_SERROR_ESR}(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 "hj8ubah}(h]h ]h"]h$]h&]uh1jxhj'ubeh}(h]h ]h"]h$]h&]uh1jchhhM "hj$hhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM "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.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM "hjhhubh)}(h)See KVM_CAP_VCPU_EVENTS for more details.h]h)See KVM_CAP_VCPU_EVENTS for more details.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubeh}(h]kvm-cap-arm-inject-serror-esrah ]h"]"8.19 kvm_cap_arm_inject_serror_esrah$]h&]uh1hhjԎhhhhhM"ubh)}(hhh](h)}(h8.20 KVM_CAP_HYPERV_SEND_IPIh]h8.20 KVM_CAP_HYPERV_SEND_IPI}(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)}(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.}(hjɖhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubeh}(h]kvm-cap-hyperv-send-ipiah ]h"]8.20 kvm_cap_hyperv_send_ipiah$]h&]uh1hhjԎhhhhhM"ubh)}(hhh](h)}(h8.22 KVM_CAP_S390_VCPU_RESETSh]h8.22 KVM_CAP_S390_VCPU_RESETS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjߖhhhhhM"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^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.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#"hjߖhhubeh}(h]kvm-cap-s390-vcpu-resetsah ]h"]8.22 kvm_cap_s390_vcpu_resetsah$]h&]uh1hhjԎhhhhhM"ubh)}(hhh](h)}(h8.23 KVM_CAP_S390_PROTECTEDh]h8.23 KVM_CAP_S390_PROTECTED}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhM'"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjRhhhKubjy)}(hs390 h]h)}(hs390h]hs390}(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)"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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+"hj>hhubeh}(h]kvm-cap-s390-protectedah ]h"]8.23 kvm_cap_s390_protectedah$]h&]uh1hhjԎhhhhhM'"ubh)}(hhh](h)}(h8.24 KVM_CAP_STEAL_TIMEh]h8.24 KVM_CAP_STEAL_TIME}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM2"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&]uh1hhhhM4"hj—ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM4"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM4"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”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6"hjhhubeh}(h]kvm-cap-steal-timeah ]h"]8.24 kvm_cap_steal_timeah$]h&]uh1hhjԎhhhhhM2"ubh)}(hhh](h)}(h8.25 KVM_CAP_S390_DIAG318h]h8.25 KVM_CAP_S390_DIAG318}(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}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMA"hj!ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMA"hj hhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhMA"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.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMC"hjhhubh)}(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...)}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH"hjhhubh)}(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).}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMO"hjhhubeh}(h]kvm-cap-s390-diag318ah ]h"]8.25 kvm_cap_s390_diag318ah$]h&]uh1hhjԎhhhhhM?"ubh)}(hhh](h)}(h8.26 KVM_CAP_X86_USER_SPACE_MSRh]h8.26 KVM_CAP_X86_USER_SPACE_MSR}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhhhhhMS"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&]uh1hhhhMU"hjubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhMU"hjhhubah}(h]h ]h"]h$]h&]uh1j^hjwhhhhhMU"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&]uh1hhhhMW"hjwhhubeh}(h]id24ah ]h"]8.26 kvm_cap_x86_user_space_msrah$]h&]uh1hhjԎhhhhhMS"ubh)}(hhh](h)}(h8.27 KVM_CAP_X86_MSR_FILTERh]h8.27 KVM_CAP_X86_MSR_FILTER}(hj٘hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj֘hhhhhM^"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^hj֘hhhhhM`"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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMb"hj֘hhubh)}(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.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg"hj֘hhubeh}(h]kvm-cap-x86-msr-filterah ]h"]8.27 kvm_cap_x86_msr_filterah$]h&]uh1hhjԎhhhhhM^"ubh)}(hhh](h)}(h8.30 KVM_CAP_XEN_HVMh]h8.30 KVM_CAP_XEN_HVM}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhMl"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjWhhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMn"hjhubah}(h]h ]h"]h$]h&]uh1jxhjWubeh}(h]h ]h"]h$]h&]uh1jchhhMn"hjThhubah}(h]h ]h"]h$]h&]uh1j^hjChhhhhMn"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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMp"hjChhubj$)}(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#hhhMs"hjChhubh)}(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|"hjChhubh)}(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"hjChhubh)}(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"hjChhubh)}(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.}(hjҙhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjChhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjChhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjChhubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjChhubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjChhubeh}(h]kvm-cap-xen-hvmah ]h"]8.30 kvm_cap_xen_hvmah$]h&]uh1hhjԎhhhhhMl"ubh)}(hhh](h)}(h8.31 KVM_CAP_SPAPR_MULTITCEh]h8.31 KVM_CAP_SPAPR_MULTITCE}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM"ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj4hhhKubjy)}(hppch]h)}(hjGh]hppc}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjEubah}(h]h ]h"]h$]h&]uh1jxhj4ubeh}(h]h ]h"]h$]h&]uh1jchhhM"hj1hhubjd)}(hhh](ji)}(hTypeh]hType}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjbhhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjsubah}(h]h ]h"]h$]h&]uh1jxhjbubeh}(h]h ]h"]h$]h&]uh1jchhhM"hj1hhubeh}(h]h ]h"]h$]h&]uh1j^hj hhhhhM"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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj hhubh)}(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"hj hhubh)}(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&]uh1hhhhM"hj hhubh)}(h"This capability is always enabled.h]h"This capability is always enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj hhubeh}(h]kvm-cap-spapr-multitceah ]h"]8.31 kvm_cap_spapr_multitceah$]h&]uh1hhjԎhhhhhM"ubh)}(hhh](h)}(h8.32 KVM_CAP_PTP_KVMh]h8.32 KVM_CAP_PTP_KVM}(hjښhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjךhhhhhM"ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(harm64 h]h)}(harm64h]harm64}(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^hjךhhhhhM"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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjךhhubeh}(h]kvm-cap-ptp-kvmah ]h"]8.32 kvm_cap_ptp_kvmah$]h&]uh1hhjԎhhhhhM"ubh)}(hhh](h)}(h 8.37 KVM_CAP_S390_PROTECTED_DUMPh]h 8.37 KVM_CAP_S390_PROTECTED_DUMP}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hhhhhM"ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjJhhhKubjy)}(hs390h]h)}(hj]h]hs390}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj[ubah}(h]h ]h"]h$]h&]uh1jxhjJubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjGhhubjd)}(hhh](ji)}(hTypeh]hType}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjxhhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jxhjxubeh}(h]h ]h"]h$]h&]uh1jchhhM"hjGhhubeh}(h]h ]h"]h$]h&]uh1j^hj6hhhhhM"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}(hjǛhhhNhNubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjubh is available and supports the }(hjhhhNhNubjz,)}(h`KVM_PV_DUMP_CPU`h]hKVM_PV_DUMP_CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jy,hjubh subcommand.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM"hj6hhubeh}(h]kvm-cap-s390-protected-dumpah ]h"] 8.37 kvm_cap_s390_protected_dumpah$]h&]uh1hhjԎhhhhhM"ubh)}(hhh](h)}(h8.39 KVM_CAP_S390_CPU_TOPOLOGYh]h8.39 KVM_CAP_S390_CPU_TOPOLOGY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubj_)}(hhh](jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj1hhhKubjy)}(hs390h]h)}(hjDh]hs390}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjBubah}(h]h ]h"]h$]h&]uh1jxhj1ubeh}(h]h ]h"]h$]h&]uh1jchhhM"hj.hhubjd)}(hhh](ji)}(hTypeh]hType}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhj_hhhKubjy)}(hvm h]h)}(hvmh]hvm}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjpubah}(h]h ]h"]h$]h&]uh1jxhj_ubeh}(h]h ]h"]h$]h&]uh1jchhhM"hj.hhubeh}(h]h ]h"]h$]h&]uh1j^hjhhhhhM"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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubh)}(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&]uh1hhhhM"hjhhubh)}(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&]uh1hhhhM"hjhhubh)}(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&]uh1hhhhM"hjhhubeh}(h]kvm-cap-s390-cpu-topologyah ]h"]8.39 kvm_cap_s390_cpu_topologyah$]h&]uh1hhjԎhhhhhM"ubh)}(hhh](h)}(h8.41 KVM_CAP_VM_TYPESh]h8.41 KVM_CAP_VM_TYPES}(hjלhhhNhNubah}(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)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(h system ioctl h]h)}(h system ioctlh]h system ioctl}(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^hjԜhhhhhM"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:}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjԜhhubj$)}(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}hjYsbah}(h]h ]h"]h$]h&]hhuh1j#hhhM"hjԜhhubh)}(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.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjԜhhubeh}(h]kvm-cap-vm-typesah ]h"]8.41 kvm_cap_vm_typesah$]h&]uh1hhjԎhhhhhM"ubh)}(hhh](h)}(h8.42 KVM_CAP_PPC_RPT_INVALIDATEh]h8.42 KVM_CAP_PPC_RPT_INVALIDATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hhhhhM#ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjhhhKubjy)}(hppc h]h)}(hppch]hppc}(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^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.}(hjԝhhhNhNubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj}hhubeh}(h]kvm-cap-ppc-rpt-invalidateah ]h"]8.42 kvm_cap_ppc_rpt_invalidateah$]h&]uh1hhjԎhhhhhM#ubh)}(hhh](h)}(h8.43 KVM_CAP_PPC_AIL_MODE_3h]h8.43 KVM_CAP_PPC_AIL_MODE_3}(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 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.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubeh}(h]kvm-cap-ppc-ail-mode-3ah ]h"]8.43 kvm_cap_ppc_ail_mode_3ah$]h&]uh1hhjԎhhhhhM#ubh)}(hhh](h)}(h8.44 KVM_CAP_MEMORY_FAULT_INFOh]h8.44 KVM_CAP_MEMORY_FAULT_INFO}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehhhhhM!#ubj_)}(hhh]jd)}(hhh](ji)}(h Architecturesh]h Architectures}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhjyhhhKubjy)}(hx86 h]h)}(hx86h]hx86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM##hjubah}(h]h ]h"]h$]h&]uh1jxhjyubeh}(h]h ]h"]h$]h&]uh1jchhhM##hjvhhubah}(h]h ]h"]h$]h&]uh1j^hjehhhhhM##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%#hjehhubh)}(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*#hjehhubh)}(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.#hjehhubh)}(h/See KVM_EXIT_MEMORY_FAULT for more information.h]h/See KVM_EXIT_MEMORY_FAULT for more information.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2#hjehhubeh}(h]kvm-cap-memory-fault-infoah ]h"]8.44 kvm_cap_memory_fault_infoah$]h&]uh1hhjԎhhhhhM!#ubh)}(hhh](h)}(h8.45 KVM_CAP_X86_GUEST_MODEh]h8.45 KVM_CAP_X86_GUEST_MODE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM5#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&]uh1hhhhM7#hj%ubah}(h]h ]h"]h$]h&]uh1jxhjubeh}(h]h ]h"]h$]h&]uh1jchhhM7#hjhhubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhM7#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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9#hjhhubh)}(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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=#hjhhubeh}(h]kvm-cap-x86-guest-modeah ]h"]8.45 kvm_cap_x86_guest_modeah$]h&]uh1hhjԎhhhhhM5#ubeh}(h]other-capabilitiesah ]h"]8. other capabilities.ah$]h&]uh1hhhhhhhhM4!ubh)}(hhh](h)}(h9. Known KVM API problemsh]h9. Known KVM API problems}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhhhhhMB#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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMD#hjuhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMH#hjuhhubh)}(hhh](h)}(h9.1. x86h]h9.1. x86}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhML#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&]uh1hhjhhhhhMO#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, }(hjҟhhhNhNubj)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hjڟhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjҟubhO is designed so that it is possible to take its result and pass it directly to }(hjҟhhhNhNubj)}(h``KVM_SET_CPUID2``h]hKVM_SET_CPUID2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjҟubhF. This section documents some cases in which that requires some care.}(hjҟhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMQ#hjhhubh)}(hhh](h)}(hLocal APIC featuresh]hLocal APIC features}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMV#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 }(hjhhhNhNubj)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh , but it can only be enabled if }(hjhhhNhNubj)}(h``KVM_CREATE_IRQCHIP``h]hKVM_CREATE_IRQCHIP}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(hjhhhNhNubj)}(h)``KVM_ENABLE_CAP(KVM_CAP_IRQCHIP_SPLIT)``h]h%KVM_ENABLE_CAP(KVM_CAP_IRQCHIP_SPLIT)}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: are used to enable in-kernel emulation of the local APIC.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMX#hjhhubh)}(hKThe same is true for the ``KVM_FEATURE_PV_UNHALT`` paravirtualized feature.h](hThe same is true for the }(hjYhhhNhNubj)}(h``KVM_FEATURE_PV_UNHALT``h]hKVM_FEATURE_PV_UNHALT}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh paravirtualized feature.}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM]#hjhhubh)}(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 }(hjyhhhNhNubj)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubh, but it can be enabled if }(hjyhhhNhNubj)}(h``KVM_CAP_TSC_DEADLINE_TIMER``h]hKVM_CAP_TSC_DEADLINE_TIMER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubha is present and the kernel has enabled in-kernel emulation of the local APIC. On newer versions, }(hjyhhhNhNubj)}(h``KVM_GET_SUPPORTED_CPUID``h]hKVM_GET_SUPPORTED_CPUID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubh" does report the bit as available.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM_#hjhhubeh}(h]local-apic-featuresah ]h"]local apic featuresah$]h&]uh1hhjhhhhhMV#ubh)}(hhh](h)}(h CPU topologyh]h CPU topology}(hjȠhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjŠhhhhhMe#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.}(hj֠hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMg#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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMl#hjŠhhubeh}(h] cpu-topologyah ]h"] cpu topologyah$]h&]uh1hhjhhhhhMe#ubeh}(h]kvm-get-supported-cpuid-issuesah ]h"]kvm_get_supported_cpuid issuesah$]h&]uh1hhjhhhhhMO#ubh)}(hhh](h)}(h Obsolete ioctls and capabilitiesh]h Obsolete ioctls and capabilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMs#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 }(hjhhhNhNubj)}(h0``KVM_CHECK_EXTENSION(KVM_CAP_DISABLE_QUIRKS2)``h]h,KVM_CHECK_EXTENSION(KVM_CAP_DISABLE_QUIRKS2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh instead if available.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMu#hjhhubeh}(h] obsolete-ioctls-and-capabilitiesah ]h"] obsolete ioctls and capabilitiesah$]h&]uh1hhjhhhhhMs#ubh)}(hhh](h)}(h&Ordering of KVM_GET_*/KVM_SET_* ioctlsh]h&Ordering of KVM_GET_*/KVM_SET_* ioctls}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hhhhhMz#ubh)}(hTBDh]hTBD}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|#hj;hhubeh}(h]"ordering-of-kvm-get-kvm-set-ioctlsah ]h"]&ordering of kvm_get_*/kvm_set_* ioctlsah$]h&]uh1hhjhhhhhMz#ubeh}(h]id25ah ]h"]9.1. x86ah$]h&]uh1hhjuhhhhhML#ubeh}(h]known-kvm-api-problemsah ]h"]9. known kvm api problemsah$]h&]uh1hhhhhhhhMB#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](j$jjJe2]j5aurefids}(jL]jAaj6 ]j, aj,9]j"9aj]jajD]jDajN]jNajY]jXaji]jiaj*i]j iaj0v]j vaunameids}(jwjtjCj@jjjjjNjNjjjLjijfj,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"5j5jG6jD6j8j7j29j/9j;j,9j;j;j?j? for arm64:Nj?j?jXAjUAjPAjMAjBjBjCjCjDjDjFjFj?GjjjjqjjИjwj=j֘jjCjњj j0jךjj6jΜjjwjԜjj}j_jjjejgjjljujdjjjjjjjŠj5jj\j;u footnote_refs}(jܡ](j$jjJejޡ]j5au citation_refs} autofootnotes]jIvaautofootnote_refs]j vasymbol_footnotes]symbol_footnote_refs] footnotes](jJje 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:”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]jAalevelKtypeINFOsourcehlineM4uh1jhjhhhhhM4ubj)}(hhh]h)}(h(Duplicate implicit target name: "mips:".h]h,Duplicate implicit target name: “mips:”.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]jValevelKtypej.sourcehlineMbuh1jhj'hhhhhMbubj)}(hhh]h)}(h'Duplicate implicit target name: "x86:".h]h+Duplicate implicit target name: “x86:”.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]j0alevelKtypej.sourcehlineMnuh1jhj/hhhhhMnubj)}(hhh]h)}(h)Duplicate implicit target name: "arm64:".h]h-Duplicate implicit target name: “arm64:”.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]j1alevelKtypej.sourcehlineMuh1jhj0hhhhhMubj)}(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&]j3alevelKtypej.sourcehlineMuh1jhjW2hhhhhMubj)}(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&]j3alevelKtypej.sourcehlineM uh1jhj3hhhhhM 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&]j7alevelKtypej.sourcehlineMuh1jhj7hhhhhMubj)}(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&]levelKtypej.lineM< sourcehuh1jhj8jubj)}(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&]levelKtypej.lineM? sourcehuh1jhjkubj)}(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&]levelKtypej.lineMB sourcehuh1jhjkubj)}(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&]levelKtypej.lineM sourcehuh1jhjDubj)}(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.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?ubah}(h]h ]h"]h$]h&]levelKtypej.lineM sourcehuh1jhjubj)}(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&]uh1hhjZubah}(h]h ]h"]h$]h&]levelKtypej.lineM sourcehuh1jhj: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.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]levelKtypej.lineM sourcehuh1jhj@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&]levelKtypej.lineM sourcehuh1jhjubj)}(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&]levelKtypej.lineM3 sourcehuh1jhjmubj)}(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&]levelKtypej.lineMD sourcehuh1jhjDubj)}(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&]jqHalevelKtypej.sourcehlineMuh1jhjPHhhhhhMubj)}(hhh]h)}(h-Duplicate implicit target name: "for arm64:".h]h1Duplicate implicit target name: “for arm64:”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]jTalevelKtypej.sourcehlineMuh1jhjQhhhhhMubetransform_messages](j)}(hhh]h)}(hhh]h9Hyperlink target "kvm-get-api-version" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypej.sourcehlineKuh1jubj)}(hhh]h)}(hhh]h9Hyperlink target "kvm-check-extension" is not referenced.}hj6sbah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]levelKtypej.sourcehlineMuh1jubj)}(hhh]h)}(hhh]h4Hyperlink target "kvm-enable-cap" is not referenced.}hjPsbah}(h]h ]h"]h$]h&]uh1hhjMubah}(h]h ]h"]h$]h&]levelKtypej.sourcehlineMuh1jubj)}(hhh]h)}(hhh]h7Hyperlink target "kvm-arm-vcpu-init" is not referenced.}hjjsbah}(h]h ]h"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]levelKtypej.sourcehlineMf uh1jubj)}(hhh]h)}(hhh]hDHyperlink target "kvm-arm-get-reg-writable-masks" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypej.sourcehlineMGuh1jubj)}(hhh]h)}(hhh]h*Hyperlink target "id20" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypej.sourcehlineM8uh1jubj)}(hhh]h)}(hhh]h0Hyperlink target "cap-enable" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypej.sourcehlineMuh1jubj)}(hhh]h)}(hhh]h