sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget-/translations/zh_CN/virt/kvm/devices/arm-vgicmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/zh_TW/virt/kvm/devices/arm-vgicmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/it_IT/virt/kvm/devices/arm-vgicmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ja_JP/virt/kvm/devices/arm-vgicmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/ko_KR/virt/kvm/devices/arm-vgicmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget-/translations/sp_SP/virt/kvm/devices/arm-vgicmodnameN 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:spacepreserveuh1hhhhhhG/var/lib/git/docbuild/linux/Documentation/virt/kvm/devices/arm-vgic.rsthKubhsection)}(hhh](htitle)}(h2ARM Virtual Generic Interrupt Controller v2 (VGIC)h]h2ARM Virtual Generic Interrupt Controller v2 (VGIC)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hDevice types supported:h]hDevice types supported:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh block_quote)}(hE- KVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0 h]h bullet_list)}(hhh]h list_item)}(hCKVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0 h]h)}(hBKVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0h]hBKVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]bullet-uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXOnly one VGIC instance may be instantiated through either this API or the legacy KVM_CREATE_IRQCHIP API. The created VGIC will act as the VM interrupt controller, requiring emulated user-space devices to inject interrupts to the VGIC instead of directly to CPUs.h]hXOnly one VGIC instance may be instantiated through either this API or the legacy KVM_CREATE_IRQCHIP API. The created VGIC will act as the VM interrupt controller, requiring emulated user-space devices to inject interrupts to the VGIC instead of directly to CPUs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXGICv3 implementations with hardware compatibility support allow creating a guest GICv2 through this interface. For information on creating a guest GICv3 device and guest ITS devices, see arm-vgic-v3.txt. It is not possible to create both a GICv3 and GICv2 device on the same VM.h]hXGICv3 implementations with hardware compatibility support allow creating a guest GICv2 through this interface. For information on creating a guest GICv3 device and guest ITS devices, see arm-vgic-v3.txt. It is not possible to create both a GICv3 and GICv2 device on the same VM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhdefinition_list)}(hhh]hdefinition_list_item)}(hXGroups: KVM_DEV_ARM_VGIC_GRP_ADDR Attributes: KVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit) Base address in the guest physical address space of the GIC distributor register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 4 KByte. KVM_VGIC_V2_ADDR_TYPE_CPU (rw, 64-bit) Base address in the guest physical address space of the GIC virtual cpu interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 8 KByte. Errors: ======= ============================================================= -E2BIG Address outside of addressable IPA range -EINVAL Incorrectly aligned address -EEXIST Address already configured -ENXIO The group or attribute is unknown/unsupported for this device or hardware support is missing. -EFAULT Invalid user pointer for attr->addr. ======= ============================================================= KVM_DEV_ARM_VGIC_GRP_DIST_REGS Attributes: The attr field of kvm_device_attr encodes two values:: bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset | All distributor regs are (rw, 32-bit) The offset is relative to the "Distributor base address" as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware from the cpu whose index is specified with the vcpu_index field. Note that most distributor fields are not banked, but return the same value regardless of the vcpu_index used to access the register. GICD_IIDR.Revision is updated when the KVM implementation of an emulated GICv2 is changed in a way directly observable by the guest or userspace. Userspace should read GICD_IIDR from KVM and write back the read value to confirm its expected behavior is aligned with the KVM implementation. Userspace should set GICD_IIDR before setting any other registers (both KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS) to ensure the expected behavior. Unless GICD_IIDR has been set from userspace, writes to the interrupt group registers (GICD_IGROUPR) are ignored. Errors: ======= ===================================================== -ENXIO Getting or setting this register is not yet supported -EBUSY One or more VCPUs are running -EINVAL Invalid vcpu_index supplied ======= ===================================================== KVM_DEV_ARM_VGIC_GRP_CPU_REGS Attributes: The attr field of kvm_device_attr encodes two values:: bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset | All CPU interface regs are (rw, 32-bit) The offset specifies the offset from the "CPU interface base address" as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware. The Active Priorities Registers APRn are implementation defined, so we set a fixed format for our implementation that fits with the model of a "GICv2 implementation without the security extensions" which we present to the guest. This interface always exposes four register APR[0-3] describing the maximum possible 128 preemption levels. The semantics of the register indicate if any interrupts in a given preemption level are in the active state by setting the corresponding bit. Thus, preemption level X has one or more active interrupts if and only if: APRn[X mod 32] == 0b1, where n = X / 32 Bits for undefined preemption levels are RAZ/WI. Note that this differs from a CPU's view of the APRs on hardware in which a GIC without the security extensions expose group 0 and group 1 active priorities in separate register groups, whereas we show a combined view similar to GICv2's GICH_APR. For historical reasons and to provide ABI compatibility with userspace we export the GICC_PMR register in the format of the GICH_VMCR.VMPriMask field in the lower 5 bits of a word, meaning that userspace must always use the lower 5 bits to communicate with the KVM device and must shift the value left by 3 places to obtain the actual priority mask level. Errors: ======= ===================================================== -ENXIO Getting or setting this register is not yet supported -EBUSY One or more VCPUs are running -EINVAL Invalid vcpu_index supplied ======= ===================================================== KVM_DEV_ARM_VGIC_GRP_NR_IRQS Attributes: A value describing the number of interrupts (SGI, PPI and SPI) for this GIC instance, ranging from 64 to 1024, in increments of 32. Errors: ======= ============================================================= -EINVAL Value set is out of the expected range -EBUSY Value has already be set, or GIC has already been initialized with default values. ======= ============================================================= KVM_DEV_ARM_VGIC_GRP_CTRL Attributes: KVM_DEV_ARM_VGIC_CTRL_INIT request the initialization of the VGIC or ITS, no additional parameter in kvm_device_attr.addr. Errors: ======= ========================================================= -ENXIO VGIC not properly configured as required prior to calling this attribute -ENODEV no online VCPU -ENOMEM memory shortage when allocating vgic internal data ======= =========================================================h](hterm)}(hGroups:h]hGroups:}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhKhj/ubh definition)}(hhh](j))}(hhh]j.)}(hX#KVM_DEV_ARM_VGIC_GRP_ADDR Attributes: KVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit) Base address in the guest physical address space of the GIC distributor register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 4 KByte. KVM_VGIC_V2_ADDR_TYPE_CPU (rw, 64-bit) Base address in the guest physical address space of the GIC virtual cpu interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 8 KByte. h](j4)}(hKVM_DEV_ARM_VGIC_GRP_ADDRh]hKVM_DEV_ARM_VGIC_GRP_ADDR}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhK"hjKubjD)}(hhh](h)}(h Attributes:h]h Attributes:}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubh)}(hXKVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit) Base address in the guest physical address space of the GIC distributor register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 4 KByte. KVM_VGIC_V2_ADDR_TYPE_CPU (rw, 64-bit) Base address in the guest physical address space of the GIC virtual cpu interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 8 KByte. h]j))}(hhh](j.)}(hKVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit) Base address in the guest physical address space of the GIC distributor register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 4 KByte. h](j4)}(h'KVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit)h]h'KVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhKhjuubjD)}(hhh]h)}(hBase address in the guest physical address space of the GIC distributor register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 4 KByte.h]hBase address in the guest physical address space of the GIC distributor register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 4 KByte.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jChjuubeh}(h]h ]h"]h$]h&]uh1j-hhhKhjrubj.)}(hKVM_VGIC_V2_ADDR_TYPE_CPU (rw, 64-bit) Base address in the guest physical address space of the GIC virtual cpu interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 8 KByte. h](j4)}(h&KVM_VGIC_V2_ADDR_TYPE_CPU (rw, 64-bit)h]h&KVM_VGIC_V2_ADDR_TYPE_CPU (rw, 64-bit)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhK"hjubjD)}(hhh]h)}(hBase address in the guest physical address space of the GIC virtual cpu interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 8 KByte.h]hBase address in the guest physical address space of the GIC virtual cpu interface register mappings. Only valid for KVM_DEV_TYPE_ARM_VGIC_V2. This address needs to be 4K aligned and the region covers 8 KByte.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jChjubeh}(h]h ]h"]h$]h&]uh1j-hhhK"hjrubeh}(h]h ]h"]h$]h&]uh1j(hjnubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubeh}(h]h ]h"]h$]h&]uh1jChjKubeh}(h]h ]h"]h$]h&]uh1j-hhhK"hjHubah}(h]h ]h"]h$]h&]uh1j(hjEubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjEubh)}(hX======= ============================================================= -E2BIG Address outside of addressable IPA range -EINVAL Incorrectly aligned address -EEXIST Address already configured -ENXIO The group or attribute is unknown/unsupported for this device or hardware support is missing. -EFAULT Invalid user pointer for attr->addr. ======= ============================================================= h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j hj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1j hj ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h-E2BIGh]h-E2BIG}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hj/ubah}(h]h ]h"]h$]h&]uh1j-hj*ubj.)}(hhh]h)}(h(Address outside of addressable IPA rangeh]h(Address outside of addressable IPA range}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjFubah}(h]h ]h"]h$]h&]uh1j-hj*ubeh}(h]h ]h"]h$]h&]uh1j(hj%ubj))}(hhh](j.)}(hhh]h)}(h-EINVALh]h-EINVAL}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjfubah}(h]h ]h"]h$]h&]uh1j-hjcubj.)}(hhh]h)}(hIncorrectly aligned addressh]hIncorrectly aligned address}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hj}ubah}(h]h ]h"]h$]h&]uh1j-hjcubeh}(h]h ]h"]h$]h&]uh1j(hj%ubj))}(hhh](j.)}(hhh]h)}(h-EEXISTh]h-EEXIST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1j-hjubj.)}(hhh]h)}(hAddress already configuredh]hAddress already configured}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1j-hjubeh}(h]h ]h"]h$]h&]uh1j(hj%ubj))}(hhh](j.)}(hhh]h)}(h-ENXIOh]h-ENXIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1j-hjubj.)}(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&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1j-hjubeh}(h]h ]h"]h$]h&]uh1j(hj%ubj))}(hhh](j.)}(hhh]h)}(h-EFAULTh]h-EFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hj ubah}(h]h ]h"]h$]h&]uh1j-hjubj.)}(hhh]h)}(h$Invalid user pointer for attr->addr.h]h$Invalid user pointer for attr->addr.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hj"ubah}(h]h ]h"]h$]h&]uh1j-hjubeh}(h]h ]h"]h$]h&]uh1j(hj%ubeh}(h]h ]h"]h$]h&]uh1j#hj ubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK&hjEubj))}(hhh]j.)}(hXKVM_DEV_ARM_VGIC_GRP_DIST_REGS Attributes: The attr field of kvm_device_attr encodes two values:: bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset | All distributor regs are (rw, 32-bit) The offset is relative to the "Distributor base address" as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware from the cpu whose index is specified with the vcpu_index field. Note that most distributor fields are not banked, but return the same value regardless of the vcpu_index used to access the register. GICD_IIDR.Revision is updated when the KVM implementation of an emulated GICv2 is changed in a way directly observable by the guest or userspace. Userspace should read GICD_IIDR from KVM and write back the read value to confirm its expected behavior is aligned with the KVM implementation. Userspace should set GICD_IIDR before setting any other registers (both KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS) to ensure the expected behavior. Unless GICD_IIDR has been set from userspace, writes to the interrupt group registers (GICD_IGROUPR) are ignored. h](j4)}(hKVM_DEV_ARM_VGIC_GRP_DIST_REGSh]hKVM_DEV_ARM_VGIC_GRP_DIST_REGS}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhKGhj[ubjD)}(hhh](h)}(h Attributes:h]h Attributes:}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjmubh)}(hXThe attr field of kvm_device_attr encodes two values:: bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset | All distributor regs are (rw, 32-bit) The offset is relative to the "Distributor base address" as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware from the cpu whose index is specified with the vcpu_index field. Note that most distributor fields are not banked, but return the same value regardless of the vcpu_index used to access the register. GICD_IIDR.Revision is updated when the KVM implementation of an emulated GICv2 is changed in a way directly observable by the guest or userspace. Userspace should read GICD_IIDR from KVM and write back the read value to confirm its expected behavior is aligned with the KVM implementation. Userspace should set GICD_IIDR before setting any other registers (both KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS) to ensure the expected behavior. Unless GICD_IIDR has been set from userspace, writes to the interrupt group registers (GICD_IGROUPR) are ignored. h](h)}(h6The attr field of kvm_device_attr encodes two values::h]h5The attr field of kvm_device_attr encodes two values:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hj~ubh literal_block)}(hubits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset |h]hubits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset |}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK4hj~ubh)}(h%All distributor regs are (rw, 32-bit)h]h%All distributor regs are (rw, 32-bit)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hj~ubh)}(hXThe offset is relative to the "Distributor base address" as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware from the cpu whose index is specified with the vcpu_index field. Note that most distributor fields are not banked, but return the same value regardless of the vcpu_index used to access the register.h]hXThe offset is relative to the “Distributor base address” as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware from the cpu whose index is specified with the vcpu_index field. Note that most distributor fields are not banked, but return the same value regardless of the vcpu_index used to access the register.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hj~ubh)}(hX>GICD_IIDR.Revision is updated when the KVM implementation of an emulated GICv2 is changed in a way directly observable by the guest or userspace. Userspace should read GICD_IIDR from KVM and write back the read value to confirm its expected behavior is aligned with the KVM implementation. Userspace should set GICD_IIDR before setting any other registers (both KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS) to ensure the expected behavior. Unless GICD_IIDR has been set from userspace, writes to the interrupt group registers (GICD_IGROUPR) are ignored.h]hX>GICD_IIDR.Revision is updated when the KVM implementation of an emulated GICv2 is changed in a way directly observable by the guest or userspace. Userspace should read GICD_IIDR from KVM and write back the read value to confirm its expected behavior is aligned with the KVM implementation. Userspace should set GICD_IIDR before setting any other registers (both KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS) to ensure the expected behavior. Unless GICD_IIDR has been set from userspace, writes to the interrupt group registers (GICD_IGROUPR) are ignored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hj~ubeh}(h]h ]h"]h$]h&]uh1hhhhK2hjmubeh}(h]h ]h"]h$]h&]uh1jChj[ubeh}(h]h ]h"]h$]h&]uh1j-hhhKGhjXubah}(h]h ]h"]h$]h&]uh1j(hjEubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjEubh)}(hX ======= ===================================================== -ENXIO Getting or setting this register is not yet supported -EBUSY One or more VCPUs are running -EINVAL Invalid vcpu_index supplied ======= ===================================================== h]j)}(hhh]j )}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j hjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK5uh1j hjubj$)}(hhh](j))}(hhh](j.)}(hhh]h)}(h-ENXIOh]h-ENXIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjubah}(h]h ]h"]h$]h&]uh1j-hjubj.)}(hhh]h)}(h5Getting or setting this register is not yet supportedh]h5Getting or setting this register is not yet supported}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhj+ubah}(h]h ]h"]h$]h&]uh1j-hjubeh}(h]h ]h"]h$]h&]uh1j(hjubj))}(hhh](j.)}(hhh]h)}(h-EBUSYh]h-EBUSY}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjKubah}(h]h ]h"]h$]h&]uh1j-hjHubj.)}(hhh]h)}(hOne or more VCPUs are runningh]hOne or more VCPUs are running}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjbubah}(h]h ]h"]h$]h&]uh1j-hjHubeh}(h]h ]h"]h$]h&]uh1j(hjubj))}(hhh](j.)}(hhh]h)}(h-EINVALh]h-EINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubah}(h]h ]h"]h$]h&]uh1j-hjubj.)}(hhh]h)}(hInvalid vcpu_index suppliedh]hInvalid vcpu_index supplied}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubah}(h]h ]h"]h$]h&]uh1j-hjubeh}(h]h ]h"]h$]h&]uh1j(hjubeh}(h]h ]h"]h$]h&]uh1j#hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKKhjEubj))}(hhh]j.)}(hXKVM_DEV_ARM_VGIC_GRP_CPU_REGS Attributes: The attr field of kvm_device_attr encodes two values:: bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset | All CPU interface regs are (rw, 32-bit) The offset specifies the offset from the "CPU interface base address" as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware. The Active Priorities Registers APRn are implementation defined, so we set a fixed format for our implementation that fits with the model of a "GICv2 implementation without the security extensions" which we present to the guest. This interface always exposes four register APR[0-3] describing the maximum possible 128 preemption levels. The semantics of the register indicate if any interrupts in a given preemption level are in the active state by setting the corresponding bit. Thus, preemption level X has one or more active interrupts if and only if: APRn[X mod 32] == 0b1, where n = X / 32 Bits for undefined preemption levels are RAZ/WI. Note that this differs from a CPU's view of the APRs on hardware in which a GIC without the security extensions expose group 0 and group 1 active priorities in separate register groups, whereas we show a combined view similar to GICv2's GICH_APR. For historical reasons and to provide ABI compatibility with userspace we export the GICC_PMR register in the format of the GICH_VMCR.VMPriMask field in the lower 5 bits of a word, meaning that userspace must always use the lower 5 bits to communicate with the KVM device and must shift the value left by 3 places to obtain the actual priority mask level. h](j4)}(hKVM_DEV_ARM_VGIC_GRP_CPU_REGSh]hKVM_DEV_ARM_VGIC_GRP_CPU_REGS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhKvhjubjD)}(hhh](h)}(h Attributes:h]h Attributes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubh)}(hXThe attr field of kvm_device_attr encodes two values:: bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset | All CPU interface regs are (rw, 32-bit) The offset specifies the offset from the "CPU interface base address" as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware. The Active Priorities Registers APRn are implementation defined, so we set a fixed format for our implementation that fits with the model of a "GICv2 implementation without the security extensions" which we present to the guest. This interface always exposes four register APR[0-3] describing the maximum possible 128 preemption levels. The semantics of the register indicate if any interrupts in a given preemption level are in the active state by setting the corresponding bit. Thus, preemption level X has one or more active interrupts if and only if: APRn[X mod 32] == 0b1, where n = X / 32 Bits for undefined preemption levels are RAZ/WI. Note that this differs from a CPU's view of the APRs on hardware in which a GIC without the security extensions expose group 0 and group 1 active priorities in separate register groups, whereas we show a combined view similar to GICv2's GICH_APR. For historical reasons and to provide ABI compatibility with userspace we export the GICC_PMR register in the format of the GICH_VMCR.VMPriMask field in the lower 5 bits of a word, meaning that userspace must always use the lower 5 bits to communicate with the KVM device and must shift the value left by 3 places to obtain the actual priority mask level. h](h)}(h6The attr field of kvm_device_attr encodes two values::h]h5The attr field of kvm_device_attr encodes two values:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubj)}(hubits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset |h]hubits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | values: | reserved | vcpu_index | offset |}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKVhjubh)}(h'All CPU interface regs are (rw, 32-bit)h]h'All CPU interface regs are (rw, 32-bit)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjubh)}(hThe offset specifies the offset from the "CPU interface base address" as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware.h]hThe offset specifies the offset from the “CPU interface base address” as defined in the GICv2 specs. Getting or setting such a register has the same effect as reading or writing the register on the actual hardware.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjubh)}(hXThe Active Priorities Registers APRn are implementation defined, so we set a fixed format for our implementation that fits with the model of a "GICv2 implementation without the security extensions" which we present to the guest. This interface always exposes four register APR[0-3] describing the maximum possible 128 preemption levels. The semantics of the register indicate if any interrupts in a given preemption level are in the active state by setting the corresponding bit.h]hXThe Active Priorities Registers APRn are implementation defined, so we set a fixed format for our implementation that fits with the model of a “GICv2 implementation without the security extensions” which we present to the guest. This interface always exposes four register APR[0-3] describing the maximum possible 128 preemption levels. The semantics of the register indicate if any interrupts in a given preemption level are in the active state by setting the corresponding bit.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubh)}(hJThus, preemption level X has one or more active interrupts if and only if:h]hJThus, preemption level X has one or more active interrupts if and only if:}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubh)}(h)APRn[X mod 32] == 0b1, where n = X / 32 h]h)}(h(APRn[X mod 32] == 0b1, where n = X / 32h]h(APRn[X mod 32] == 0b1, where n = X / 32}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjMubah}(h]h ]h"]h$]h&]uh1hhhhKihjubh)}(h0Bits for undefined preemption levels are RAZ/WI.h]h0Bits for undefined preemption levels are RAZ/WI.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjubh)}(hNote that this differs from a CPU's view of the APRs on hardware in which a GIC without the security extensions expose group 0 and group 1 active priorities in separate register groups, whereas we show a combined view similar to GICv2's GICH_APR.h]hNote that this differs from a CPU’s view of the APRs on hardware in which a GIC without the security extensions expose group 0 and group 1 active priorities in separate register groups, whereas we show a combined view similar to GICv2’s GICH_APR.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubh)}(hXcFor historical reasons and to provide ABI compatibility with userspace we export the GICC_PMR register in the format of the GICH_VMCR.VMPriMask field in the lower 5 bits of a word, meaning that userspace must always use the lower 5 bits to communicate with the KVM device and must shift the value left by 3 places to obtain the actual priority mask level.h]hXcFor historical reasons and to provide ABI compatibility with userspace we export the GICC_PMR register in the format of the GICH_VMCR.VMPriMask field in the lower 5 bits of a word, meaning that userspace must always use the lower 5 bits to communicate with the KVM device and must shift the value left by 3 places to obtain the actual priority mask level.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubeh}(h]h ]h"]h$]h&]uh1hhhhKThjubeh}(h]h ]h"]h$]h&]uh1jChjubeh}(h]h ]h"]h$]h&]uh1j-hhhKvhjubah}(h]h ]h"]h$]h&]uh1j(hjEubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjEubh)}(hX ======= ===================================================== -ENXIO Getting or setting this register is not yet supported -EBUSY One or more VCPUs are running -EINVAL Invalid vcpu_index supplied ======= ===================================================== h]j)}(hhh]j )}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j hjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK5uh1j hjubj$)}(hhh](j))}(hhh](j.)}(hhh]h)}(h-ENXIOh]h-ENXIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1j-hjubj.)}(hhh]h)}(h5Getting or setting this register is not yet supportedh]h5Getting or setting this register is not yet supported}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1j-hjubeh}(h]h ]h"]h$]h&]uh1j(hjubj))}(hhh](j.)}(hhh]h)}(h-EBUSYh]h-EBUSY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjubah}(h]h ]h"]h$]h&]uh1j-hj ubj.)}(hhh]h)}(hOne or more VCPUs are runningh]hOne or more VCPUs are running}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj'ubah}(h]h ]h"]h$]h&]uh1j-hj ubeh}(h]h ]h"]h$]h&]uh1j(hjubj))}(hhh](j.)}(hhh]h)}(h-EINVALh]h-EINVAL}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjGubah}(h]h ]h"]h$]h&]uh1j-hjDubj.)}(hhh]h)}(hInvalid vcpu_index suppliedh]hInvalid vcpu_index supplied}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hj^ubah}(h]h ]h"]h$]h&]uh1j-hjDubeh}(h]h ]h"]h$]h&]uh1j(hjubeh}(h]h ]h"]h$]h&]uh1j#hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKzhjEubj))}(hhh]j.)}(hKVM_DEV_ARM_VGIC_GRP_NR_IRQS Attributes: A value describing the number of interrupts (SGI, PPI and SPI) for this GIC instance, ranging from 64 to 1024, in increments of 32. h](j4)}(hKVM_DEV_ARM_VGIC_GRP_NR_IRQSh]hKVM_DEV_ARM_VGIC_GRP_NR_IRQS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhKhjubjD)}(hhh](h)}(h Attributes:h]h Attributes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hA value describing the number of interrupts (SGI, PPI and SPI) for this GIC instance, ranging from 64 to 1024, in increments of 32. h]h)}(hA value describing the number of interrupts (SGI, PPI and SPI) for this GIC instance, ranging from 64 to 1024, in increments of 32.h]hA value describing the number of interrupts (SGI, PPI and SPI) for this GIC instance, ranging from 64 to 1024, in increments of 32.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jChjubeh}(h]h ]h"]h$]h&]uh1j-hhhKhjubah}(h]h ]h"]h$]h&]uh1j(hjEubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEubh)}(hX#======= ============================================================= -EINVAL Value set is out of the expected range -EBUSY Value has already be set, or GIC has already been initialized with default values. ======= ============================================================= h]j)}(hhh]j )}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j hjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1j hjubj$)}(hhh](j))}(hhh](j.)}(hhh]h)}(h-EINVALh]h-EINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j-hjubj.)}(hhh]h)}(h&Value set is out of the expected rangeh]h&Value set is out of the expected range}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj-ubah}(h]h ]h"]h$]h&]uh1j-hjubeh}(h]h ]h"]h$]h&]uh1j(hjubj))}(hhh](j.)}(hhh]h)}(h-EBUSYh]h-EBUSY}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjMubah}(h]h ]h"]h$]h&]uh1j-hjJubj.)}(hhh]h)}(hRValue has already be set, or GIC has already been initialized with default values.h]hRValue has already be set, or GIC has already been initialized with default values.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjdubah}(h]h ]h"]h$]h&]uh1j-hjJubeh}(h]h ]h"]h$]h&]uh1j(hjubeh}(h]h ]h"]h$]h&]uh1j#hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjEubj))}(hhh]j.)}(hKVM_DEV_ARM_VGIC_GRP_CTRL Attributes: KVM_DEV_ARM_VGIC_CTRL_INIT request the initialization of the VGIC or ITS, no additional parameter in kvm_device_attr.addr. h](j4)}(hKVM_DEV_ARM_VGIC_GRP_CTRLh]hKVM_DEV_ARM_VGIC_GRP_CTRL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhKhjubjD)}(hhh](h)}(h Attributes:h]h Attributes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hKVM_DEV_ARM_VGIC_CTRL_INIT request the initialization of the VGIC or ITS, no additional parameter in kvm_device_attr.addr. h]j))}(hhh]j.)}(h{KVM_DEV_ARM_VGIC_CTRL_INIT request the initialization of the VGIC or ITS, no additional parameter in kvm_device_attr.addr. h](j4)}(hKVM_DEV_ARM_VGIC_CTRL_INITh]hKVM_DEV_ARM_VGIC_CTRL_INIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j3hhhKhjubjD)}(hhh]h)}(h_request the initialization of the VGIC or ITS, no additional parameter in kvm_device_attr.addr.h]h_request the initialization of the VGIC or ITS, no additional parameter in kvm_device_attr.addr.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jChjubeh}(h]h ]h"]h$]h&]uh1j-hhhKhjubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jChjubeh}(h]h ]h"]h$]h&]uh1j-hhhKhjubah}(h]h ]h"]h$]h&]uh1j(hjEubh)}(hErrors:h]hErrors:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEubh)}(hX4======= ========================================================= -ENXIO VGIC not properly configured as required prior to calling this attribute -ENODEV no online VCPU -ENOMEM memory shortage when allocating vgic internal data ======= =========================================================h]j)}(hhh]j )}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j hj)ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK9uh1j hj)ubj$)}(hhh](j))}(hhh](j.)}(hhh]h)}(h-ENXIOh]h-ENXIO}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjFubah}(h]h ]h"]h$]h&]uh1j-hjCubj.)}(hhh]h)}(hHVGIC not properly configured as required prior to calling this attributeh]hHVGIC not properly configured as required prior to calling this attribute}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubah}(h]h ]h"]h$]h&]uh1j-hjCubeh}(h]h ]h"]h$]h&]uh1j(hj@ubj))}(hhh](j.)}(hhh]h)}(h-ENODEVh]h-ENODEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj}ubah}(h]h ]h"]h$]h&]uh1j-hjzubj.)}(hhh]h)}(hno online VCPUh]hno online VCPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j-hjzubeh}(h]h ]h"]h$]h&]uh1j(hj@ubj))}(hhh](j.)}(hhh]h)}(h-ENOMEMh]h-ENOMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j-hjubj.)}(hhh]h)}(h2memory shortage when allocating vgic internal datah]h2memory shortage when allocating vgic internal data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j-hjubeh}(h]h ]h"]h$]h&]uh1j(hj@ubeh}(h]h ]h"]h$]h&]uh1j#hj)ubeh}(h]h ]h"]h$]h&]colsKuh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1hhhhKhjEubeh}(h]h ]h"]h$]h&]uh1jChj/ubeh}(h]h ]h"]h$]h&]uh1j-hhhKhj*ubah}(h]h ]h"]h$]h&]uh1j(hhhhhhhNubeh}(h]0arm-virtual-generic-interrupt-controller-v2-vgicah ]h"]2arm virtual generic interrupt controller v2 (vgic)ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksj-footnote_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_handlerj= error_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}refids}nameids}j j s nametypes}j sh}j hs footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.