arch/arm64: Optimized SGI to avoid VM exit. #14689
Open
+3
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This patch is necessary to optimize the handling of SGI (Software Generated Interrupts) in a virtualized environment on ARM64 architecture. The original implementation required reading the IGROUPR0 register each time an SGI was sent, which, due to the GIC Redistributor being a purely emulated device, caused a VM exit. This VM exit leads to significant performance degradation. The patch addresses this issue by replacing the read operation with a predefined value set during the initialization in
gicv3_cpuif_init
, assuming that this value remains unmodified post-initialization.Impact
The change primarily affects the performance of virtualized environments by reducing the number of VM exits caused by SGI handling. Users running virtual machines on ARM64 hardware should experience improved performance, especially in scenarios with frequent SGI usage. There are no direct changes to the build process, hardware requirements, or documentation. Security and compatibility are not directly impacted by this change, but the overall system performance may be enhanced due to reduced VM exits.
Testing
The change was verified on QEMU-virt/arm64.