diff options
| author | Marc Zyngier <maz@kernel.org> | 2026-07-29 14:18:22 +0100 |
|---|---|---|
| committer | Oliver Upton <oupton@kernel.org> | 2026-07-30 23:48:22 -0700 |
| commit | 42fe26543e66c27932b4c7f4c5c149e38f4e14b9 (patch) | |
| tree | 835974f74078e75f1be702d5e546b63d54f2a2a8 /include/linux/timerqueue.h | |
| parent | 79c3122a1e142166b9254809115ef26ba7797769 (diff) | |
KVM: arm64: Add primitives to flush/sync the VGIC state at EL2
pKVM performs its own world switch for protected VMs but has no
primitives to move the per-vCPU VGIC state between the host and
hypervisor vCPU contexts.
Add flush_hyp_vgic_state() and sync_hyp_vgic_state(). Flush copies
vgic_hcr, the in-use list registers and used_lrs from the host into the
hyp vCPU and pins vgic_sre to a fixed value; sync copies vgic_hcr,
vgic_vmcr and the in-use list registers back. The active priority
registers are handled separately by the save/restore-aprs path.
Bound used_lrs by hyp_gicv3_nr_lr, the cached implemented-LR count,
instead of reading ICH_VTR_EL2 on each entry. That clamps the
host-supplied value and avoids a per-entry sysreg read that is costly
under NV.
Reviewed-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Co-developed-by: Fuad Tabba <fuad.tabba@linux.dev>
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Link: https://patch.msgid.link/20260729131823.2021516-8-fuad.tabba@linux.dev
Signed-off-by: Oliver Upton <oupton@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
