diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-03-09 23:51:59 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2017-03-23 16:53:46 +0300 |
commit | 63d7c6afc510a4a6265b119f7b988af0cc118889 (patch) | |
tree | f3725a5ae439b79fbfa5f4c7cc44b13a10e79a17 /virt/kvm/arm/vgic | |
parent | 3b3c6c24de7f2de213e5e1e04a0c4b9082d61650 (diff) | |
download | linux-63d7c6afc510a4a6265b119f7b988af0cc118889.tar.xz |
arm: kvm: move kvm_vgic_global_state out of .text section
The kvm_vgic_global_state struct contains a static key which is
written to by jump_label_init() at boot time. So in preparation of
making .text regions truly (well, almost truly) read-only, mark
kvm_vgic_global_state __ro_after_init so it moves to the .rodata
section instead.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'virt/kvm/arm/vgic')
-rw-r--r-- | virt/kvm/arm/vgic/vgic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c index 654dfd40e449..7713d96e85b7 100644 --- a/virt/kvm/arm/vgic/vgic.c +++ b/virt/kvm/arm/vgic/vgic.c @@ -29,7 +29,9 @@ #define DEBUG_SPINLOCK_BUG_ON(p) #endif -struct vgic_global __section(.hyp.text) kvm_vgic_global_state = {.gicv3_cpuif = STATIC_KEY_FALSE_INIT,}; +struct vgic_global kvm_vgic_global_state __ro_after_init = { + .gicv3_cpuif = STATIC_KEY_FALSE_INIT, +}; /* * Locking order is always: |