€•xIŒsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ)/translations/zh_CN/virt/kvm/devices/xics”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/zh_TW/virt/kvm/devices/xics”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/virt/kvm/devices/xics”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/virt/kvm/devices/xics”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/virt/kvm/devices/xics”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/pt_BR/virt/kvm/devices/xics”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/sp_SP/virt/kvm/devices/xics”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒC/var/lib/git/docbuild/linux/Documentation/virt/kvm/devices/xics.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒXICS interrupt controller”h]”hŒXICS interrupt controller”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hŒ(Device type supported: KVM_DEV_TYPE_XICS”h]”hŒ(Device type supported: KVM_DEV_TYPE_XICS”…”�”}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhŒdefinition_list”“”)�”}”(hhh]”hŒdefinition_list_item”“”)�”}”(hXgGroups: 1. KVM_DEV_XICS_GRP_SOURCES Attributes: One per interrupt source, indexed by the source number. 2. KVM_DEV_XICS_GRP_CTRL Attributes: 2.1 KVM_DEV_XICS_NR_SERVERS (write only) The kvm_device_attr.addr points to a __u32 value which is the number of interrupt server numbers (ie, highest possible vcpu id plus one). Errors: ======= ========================================== -EINVAL Value greater than KVM_MAX_VCPU_IDS. -EFAULT Invalid user pointer for attr->addr. -EBUSY A vcpu is already connected to the device. ======= ========================================== ”h]”(hŒterm”“”)�”}”(hŒGroups:”h]”hŒGroups:”…”�”}”(hhúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høh³hÇh´KhhôubhŒ definition”“”)�”}”(hhh]”(hŒenumerated_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒcKVM_DEV_XICS_GRP_SOURCES Attributes: One per interrupt source, indexed by the source number.”h]”hî)�”}”(hhh]”hó)�”}”(hŒ_KVM_DEV_XICS_GRP_SOURCES Attributes: One per interrupt source, indexed by the source number.”h]”(hù)�”}”(hŒKVM_DEV_XICS_GRP_SOURCES”h]”hŒKVM_DEV_XICS_GRP_SOURCES”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høh³hÇh´K hjubj )�”}”(hhh]”(hÞ)�”}”(hŒ Attributes:”h]”hŒ Attributes:”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hj-ubhŒ block_quote”“”)�”}”(hŒ7One per interrupt source, indexed by the source number.”h]”hÞ)�”}”(hjBh]”hŒ7One per interrupt source, indexed by the source number.”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1j>h³hÇh´K hj-ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hòh³hÇh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1híhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒRKVM_DEV_XICS_GRP_CTRL Attributes: 2.1 KVM_DEV_XICS_NR_SERVERS (write only) ”h]”hî)�”}”(hhh]”hó)�”}”(hŒNKVM_DEV_XICS_GRP_CTRL Attributes: 2.1 KVM_DEV_XICS_NR_SERVERS (write only) ”h]”(hù)�”}”(hŒKVM_DEV_XICS_GRP_CTRL”h]”hŒKVM_DEV_XICS_GRP_CTRL”…”�”}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høh³hÇh´Khjvubj )�”}”(hhh]”(hÞ)�”}”(hŒ Attributes:”h]”hŒ Attributes:”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjˆubj?)�”}”(hŒ)2.1 KVM_DEV_XICS_NR_SERVERS (write only) ”h]”hÞ)�”}”(hŒ(2.1 KVM_DEV_XICS_NR_SERVERS (write only)”h]”hŒ(2.1 KVM_DEV_XICS_NR_SERVERS (write only)”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj™ubah}”(h]”h ]”h"]”h$]”h&]”uh1j>h³hÇh´Khjˆubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjvubeh}”(h]”h ]”h"]”h$]”h&]”uh1hòh³hÇh´Khjsubah}”(h]”h ]”h"]”h$]”h&]”uh1híhjoubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1j hj ubhÞ)�”}”(hŒ‰The kvm_device_attr.addr points to a __u32 value which is the number of interrupt server numbers (ie, highest possible vcpu id plus one).”h]”hŒ‰The kvm_device_attr.addr points to a __u32 value which is the number of interrupt server numbers (ie, highest possible vcpu id plus one).”…”�”}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj ubhÞ)�”}”(hŒErrors:”h]”hŒErrors:”…”�”}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj ubj?)�”}”(hŒø======= ========================================== -EINVAL Value greater than KVM_MAX_VCPU_IDS. -EFAULT Invalid user pointer for attr->addr. -EBUSY A vcpu is already connected to the device. ======= ========================================== ”h]”hŒtable”“”)�”}”(hhh]”hŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jþhjûubjÿ)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K*uh1jþhjûubhŒtbody”“”)�”}”(hhh]”(hŒrow”“”)�”}”(hhh]”(hŒentry”“”)�”}”(hhh]”hÞ)�”}”(hŒ-EINVAL”h]”hŒ-EINVAL”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hhh]”hÞ)�”}”(hŒ$Value greater than KVM_MAX_VCPU_IDS.”h]”hŒ$Value greater than KVM_MAX_VCPU_IDS.”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj7ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hhh]”(j)�”}”(hhh]”hÞ)�”}”(hŒ-EFAULT”h]”hŒ-EFAULT”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjWubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjTubj)�”}”(hhh]”hÞ)�”}”(hŒ$Invalid user pointer for attr->addr.”h]”hŒ$Invalid user pointer for attr->addr.”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjnubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjTubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hhh]”(j)�”}”(hhh]”hÞ)�”}”(hŒ-EBUSY”h]”hŒ-EBUSY”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjŽubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj‹ubj)�”}”(hhh]”hÞ)�”}”(hŒ*A vcpu is already connected to the device.”h]”hŒ*A vcpu is already connected to the device.”…”�”}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj¥ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj‹ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjûubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jùhjöubah}”(h]”h ]”h"]”h$]”h&]”uh1jôhjðubah}”(h]”h ]”h"]”h$]”h&]”uh1j>h³hÇh´Khj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhhôubeh}”(h]”h ]”h"]”h$]”h&]”uh1hòh³hÇh´Khhïubah}”(h]”h ]”h"]”h$]”h&]”uh1híhhÊh²hh³hÇh´NubhÞ)�”}”(hX(This device emulates the XICS (eXternal Interrupt Controller Specification) defined in PAPR. The XICS has a set of interrupt sources, each identified by a 20-bit source number, and a set of Interrupt Control Presentation (ICP) entities, also called "servers", each associated with a virtual CPU.”h]”hX,This device emulates the XICS (eXternal Interrupt Controller Specification) defined in PAPR. The XICS has a set of interrupt sources, each identified by a 20-bit source number, and a set of Interrupt Control Presentation (ICP) entities, also called “serversâ€�, each associated with a virtual CPU.”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)�”}”(hXâThe ICP entities are created by enabling the KVM_CAP_IRQ_ARCH capability for each vcpu, specifying KVM_CAP_IRQ_XICS in args[0] and the interrupt server number (i.e. the vcpu number from the XICS's point of view) in args[1] of the kvm_enable_cap struct. Each ICP has 64 bits of state which can be read and written using the KVM_GET_ONE_REG and KVM_SET_ONE_REG ioctls on the vcpu. The 64 bit state word has the following bitfields, starting at the least-significant end of the word:”h]”hXäThe ICP entities are created by enabling the KVM_CAP_IRQ_ARCH capability for each vcpu, specifying KVM_CAP_IRQ_XICS in args[0] and the interrupt server number (i.e. the vcpu number from the XICS’s point of view) in args[1] of the kvm_enable_cap struct. Each ICP has 64 bits of state which can be read and written using the KVM_GET_ONE_REG and KVM_SET_ONE_REG ioctls on the vcpu. The 64 bit state word has the following bitfields, starting at the least-significant end of the word:”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K$hhÊh²hubhŒ bullet_list”“”)�”}”(hhh]”(j)�”}”(hŒUnused, 16 bits ”h]”hÞ)�”}”(hŒUnused, 16 bits”h]”hŒUnused, 16 bits”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K-hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj h²hh³hÇh´Nubj)�”}”(hŒdPending interrupt priority, 8 bits Zero is the highest priority, 255 means no interrupt is pending. ”h]”hÞ)�”}”(hŒcPending interrupt priority, 8 bits Zero is the highest priority, 255 means no interrupt is pending.”h]”hŒcPending interrupt priority, 8 bits Zero is the highest priority, 255 means no interrupt is pending.”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K/hj&ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj h²hh³hÇh´Nubj)�”}”(hŒtPending IPI (inter-processor interrupt) priority, 8 bits Zero is the highest priority, 255 means no IPI is pending. ”h]”hÞ)�”}”(hŒsPending IPI (inter-processor interrupt) priority, 8 bits Zero is the highest priority, 255 means no IPI is pending.”h]”hŒsPending IPI (inter-processor interrupt) priority, 8 bits Zero is the highest priority, 255 means no IPI is pending.”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K2hj>ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj h²hh³hÇh´Nubj)�”}”(hŒdPending interrupt source number, 24 bits Zero means no interrupt pending, 2 means an IPI is pending ”h]”hÞ)�”}”(hŒcPending interrupt source number, 24 bits Zero means no interrupt pending, 2 means an IPI is pending”h]”hŒcPending interrupt source number, 24 bits Zero means no interrupt pending, 2 means an IPI is pending”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K5hjVubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj h²hh³hÇh´Nubj)�”}”(hŒ‰Current processor priority, 8 bits Zero is the highest priority, meaning no interrupts can be delivered, and 255 is the lowest priority. ”h]”hÞ)�”}”(hŒˆCurrent processor priority, 8 bits Zero is the highest priority, meaning no interrupts can be delivered, and 255 is the lowest priority.”h]”hŒˆCurrent processor priority, 8 bits Zero is the highest priority, meaning no interrupts can be delivered, and 255 is the lowest priority.”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K8hjnubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1j h³hÇh´K-hhÊh²hubhÞ)�”}”(hXZEach source has 64 bits of state that can be read and written using the KVM_GET_DEVICE_ATTR and KVM_SET_DEVICE_ATTR ioctls, specifying the KVM_DEV_XICS_GRP_SOURCES attribute group, with the attribute number being the interrupt source number. The 64 bit state word has the following bitfields, starting from the least-significant end of the word:”h]”hXZEach source has 64 bits of state that can be read and written using the KVM_GET_DEVICE_ATTR and KVM_SET_DEVICE_ATTR ioctls, specifying the KVM_DEV_XICS_GRP_SOURCES attribute group, with the attribute number being the interrupt source number. The 64 bit state word has the following bitfields, starting from the least-significant end of the word:”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K