Repository navigation
refactor(aarch64): migrate virtual IPIs off PERCPU_EVENTS - #407
Conversation
|
Thanks for the contribution! This is a substantial refactor and the migration of AArch64 virtual IPIs off Also, this change seems to introduce some bugs. It may take some effort to resolve them. |
d287afe to
a27b87f
Compare
li041
left a comment
There was a problem hiding this comment.
Thank you for consistently addressing the review feedback throughout this PR. The latest revisions have significantly improved the abstraction boundaries and cleaned up the ARM interrupt-controller code.
There are still some limitations in the current vCPU abstraction. For example, each Vcpu remains embedded in and pinned to a single PerCpu; architectural context, virtual timer state, and GICH/ICH state are not yet owned and saved by the vCPU. Therefore, this abstraction is a useful foundation, but it does not yet support scheduling or time-sharing multiple vCPUs on one pCPU.
The existing GICv2 and GICv3 implementations also contain several pre-existing issues that are outside the scope of this PR. Since this change substantially modifies the SGI delivery and pending-state paths, please run the relevant GICv2 and GICv3 boot and workload tests multiple times, especially with multi zones, to make sure the result is stable and does not introduce intermittent interrupt loss or startup failures.
d28bd9f to
3fcb5a7
Compare
3fcb5a7 to
ddb134f
Compare
|
Reorganized the commits by feature just now (the final code is unchanged). |
Summary
This pull request starts the staged removal of
PERCPU_EVENTSby migrating AArch64 virtual IPIs to per-vCPU interrupt state.GuestCpuIrqStatepending bitmap and architecture-privateArchVcpustate.Motivation
Virtual IPIs describe guest interrupt state and do not require FIFO payload semantics. Routing them through
PERCPU_EVENTSadds locking, possible queue allocation, and unnecessary coupling between guest interrupt delivery and host CPU event dispatch.The new path publishes pending state before kicking the target CPU. Only the target CPU installs the interrupt into its local GIC list registers. This keeps interrupt state with the guest CPU, supports the current pinned pCPU:vCPU mapping, and provides a foundation for removing additional event categories without introducing a scheduler in this change.
The event ID update also removes collisions between virtio-pci events, vCPU suspend/resume events, and DWC MSI injection.
Verification
Risks and Limitations
PERCPU_EVENTSFIFO and GICPENDING_VIRQSqueue remain for unmigrated producers.