The Distributor and Redistributors

The Distributor provides the routing configuration for SPIs, and holds all the associated routing and priority information.

The Redistributor provides the configuration settings for PPIs and SGIs.

INTIDs

gicv3逻辑组件图

gicv3ITS是可选组件;gicv4中ITS是必须包含的一个组件,以支持虚拟LPI的注入,如下图:

中断生命周期

Priority drop

After an interrupt has been acknowledged, a valid write to ICC_EOIR0_EL1 for Group 0 interrupts, or a valid write to ICC_EOIR1_EL1 for Group 1 interrupts, results in a priority drop.

NoteA priority drop must be performed by the same PE that activated the interrupt.

Interrupt handling state machine

Interrupt grouping

Interrupt prioritization

In the GIC prioritization scheme, lower numbers have higher priority

GICv3.3 introduces the non-maskable property for SPIs, PPIs and SGIs. Support for GICv3.3 is indicated by GICD_TYPER2.NMI.

gicv3/v4 virtualization

The GIC does not provide additional mechanisms for the virtualization of the GICD_*, GICR_*, and GITS_* registers. To virtualize VM accesses to these registers, the hypervisor must set stage 2 Data Aborts to those memory locations so that the hypervisor can emulate these effects.

GICv3 supports the Armv8-A and Armv9-A virtualization functionality. A hypervisor executing at EL2 uses the ICH_* System register interface to configure and control a virtual PE (vPE) executing at EL1. For information about the VM control interface, see Configuration and control of VMs on page 6-157. A vPE uses the ICC_*_EL1 System register interface to communicate with the GIC. The configuration of HCR_EL2.{IMO, FMO} determines whether the virtual or the physical interface registers are accessed.

翻译理解一下上面这段话:

虚拟机里vcpu都是通过ICC_*来访问gicc,但具体访问的是虚拟的(ICV_*),还是物理的(ICC_*)是通过HCR_EL2.{IMO, FMO}来判断的,如果其设置为1,表示虚拟化中断路由开启,访问的是ICV,否则访问的是ICC。

Maintenance interrupts

Maintenance interrupts can signal key events in the operation of a GIC that implements virtualization. These events are processed by the hypervisor.

maint中断是level-sensitive interrupts。其产生的必要条件是ICH_HCR_EL2.En位使能,其产生的场景有:

• Group 0 virtual interrupts are enabled.

• Group 1 virtual interrupts are enabled.

• Group 0 virtual interrupts are disabled.

• Group 1 virtual interrupts are disabled.

• There are no pending interrupts in the List registers.

• At least one EOI request occurs with no valid List register entry for the corresponding interrupt.

• There are no valid entries, or there is only one valid entry, in the List registers. This is an underflow condition.

• At least one List register entry has received an EOI request.

GIC Redistributor register map

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐