Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: arm64: Document ordering requirements for irqbypass

One of the not-so-obvious requirements for restoring a VM is ensuring
that the vITS has been restored _before_ creating any irqbypass mappings.
This is because KVM needs to get the guest translation for MSIs to
correctly assemble the vLPI mapping getting installed in the physical
ITS.

Document the restore ordering requirements necessary for GICv4 vLPI
injection to work.

Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250226183124.82094-5-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>

+4 -1
+4 -1
Documentation/virt/kvm/devices/arm-vgic-its.rst
··· 126 126 ITS Restore Sequence: 127 127 --------------------- 128 128 129 - The following ordering must be followed when restoring the GIC and the ITS: 129 + The following ordering must be followed when restoring the GIC, ITS, and 130 + KVM_IRQFD assignments: 130 131 131 132 a) restore all guest memory and create vcpus 132 133 b) restore all redistributors ··· 139 138 2. Restore all other ``GITS_`` registers, except GITS_CTLR! 140 139 3. Load the ITS table data (KVM_DEV_ARM_ITS_RESTORE_TABLES) 141 140 4. Restore GITS_CTLR 141 + 142 + e) restore KVM_IRQFD assignments for MSIs 142 143 143 144 Then vcpus can be started. 144 145