KVM: arm64: Explicitly map 'kvm_vgic_global_state' at EL2
authorQuentin Perret <qperret@google.com>
Thu, 10 Nov 2022 19:02:56 +0000 (19:02 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 11 Nov 2022 17:19:35 +0000 (17:19 +0000)
commit27eb26bfff5d358d42911d04bbecc62e659ec32b
treee60ac928666cb545cee520a9524ca1b60e752274
parent73f38ef2ae531b180685173e0923225551434fcb
KVM: arm64: Explicitly map 'kvm_vgic_global_state' at EL2

The pkvm hypervisor at EL2 may need to read the 'kvm_vgic_global_state'
variable from the host, for example when saving and restoring the state
of the virtual GIC.

Explicitly map 'kvm_vgic_global_state' in the stage-1 page-table of the
pKVM hypervisor rather than relying on mapping all of the host '.rodata'
section.

Tested-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221110190259.26861-24-will@kernel.org
arch/arm64/kvm/hyp/nvhe/setup.c