linux_dsm_epyc7002/arch/arm64/include/asm
Andre Przywara bf308242ab KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock
kvm_read_guest() will eventually look up in kvm_memslots(), which requires
either to hold the kvm->slots_lock or to be inside a kvm->srcu critical
section.
In contrast to x86 and s390 we don't take the SRCU lock on every guest
exit, so we have to do it individually for each kvm_read_guest() call.

Provide a wrapper which does that and use that everywhere.

Note that ending the SRCU critical section before returning from the
kvm_read_guest() wrapper is safe, because the data has been *copied*, so
we don't need to rely on valid references to the memslot anymore.

Cc: Stable <stable@vger.kernel.org> # 4.8+
Reported-by: Jan Glauber <jan.glauber@caviumnetworks.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-05-15 13:36:49 +02:00
..
xen License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acenv.h
acpi.h arm64: mm: Remove arch_apei_flush_tlb_one() 2017-11-07 12:13:33 +01:00
alternative.h arm64: alternatives: Add dynamic patching feature 2018-03-19 13:03:17 +00:00
arch_gicv3.h irqchip/gic-v3: Probe for SCR_EL3 being clear before resetting AP0Rn 2018-03-22 13:46:18 +00:00
arch_timer.h First batch of KVM changes for 4.15 2017-11-16 13:00:24 -08:00
arm_dsu_pmu.h perf: ARM DynamIQ Shared Unit PMU support 2018-01-02 16:43:12 +00:00
arm-cci.h
asm-bug.h arm64: asm-bug: Renumber macro local labels to avoid clashes 2017-10-25 15:57:15 +01:00
asm-offsets.h
asm-uaccess.h arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
assembler.h arm64: assembler: add macros to conditionally yield the NEON under PREEMPT 2018-04-11 18:50:34 +01:00
atomic_ll_sc.h
atomic_lse.h
atomic.h
barrier.h arm64: Implement array_index_mask_nospec() 2018-02-06 22:53:30 +00:00
bitops.h
bitrev.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
boot.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
brk-imm.h
bug.h
cache.h Revert "arm64: Revert L1_CACHE_SHIFT back to 6 (64-byte cache line size)" 2018-03-27 12:04:51 +01:00
cacheflush.h arm64: turn flush_dcache_mmap_lock into a no-op 2018-04-11 10:28:39 -07:00
checksum.h
clocksource.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmpxchg.h arm64: cmpxchg: Include linux/compiler.h in asm/cmpxchg.h 2018-03-27 13:15:49 +01:00
compat.h signal: unify compat_siginfo_t 2018-01-15 17:40:31 -06:00
compiler.h
cpu_ops.h
cpu.h arm64/sve: Probe SVE capabilities and usable vector lengths 2017-11-03 15:24:17 +00:00
cpucaps.h arm64: KVM: Use SMCCC_ARCH_WORKAROUND_1 for Falkor BP hardening 2018-04-11 18:49:30 +01:00
cpufeature.h arm64: capabilities: Handle shared entries 2018-03-26 18:01:43 +01:00
cpuidle.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cputype.h arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35 2018-03-26 18:01:43 +01:00
current.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
daifflags.h arm64: Move the async/fiq helpers to explicitly set process context flags 2017-11-02 15:55:41 +00:00
dcc.h
debug-monitors.h
device.h
dma-mapping.h dma-mapping: move dma_mark_clean to dma-direct.h 2018-01-10 16:41:12 +01:00
dmi.h
efi.h efi/arm64: Check whether x18 is preserved by runtime services calls 2018-03-09 08:58:22 +01:00
elf.h arm64: elf.h: Correct comment about READ_IMPLIES_EXEC propagation 2017-10-09 10:00:23 +01:00
esr.h arm64: fpsimd: Fix bad si_code for undiagnosed SIGFPE 2018-03-20 10:03:11 +00:00
exception.h arm64: kernel: Prepare for a DISR user 2018-01-16 15:07:12 +00:00
exec.h
extable.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fb.h
fixmap.h arm64: kaslr: Put kernel vectors address in separate data page 2017-12-11 13:41:20 +00:00
fpsimd.h arm64: fpsimd: Split cpu field out from struct fpsimd_state 2018-03-28 15:20:17 +01:00
fpsimdmacros.h arm64/sve: Low-level SVE architectural state manipulation functions 2017-11-03 15:24:14 +00:00
ftrace.h
futex.h arm64: futex: Mask __user pointers prior to dereference 2018-02-06 22:53:42 +00:00
hardirq.h
hugetlb.h arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables 2018-02-16 18:13:57 +00:00
hw_breakpoint.h
hwcap.h
hypervisor.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
insn.h arm64; insn: Add encoder for the EXTR instruction 2018-03-19 13:05:10 +00:00
io.h
irq_work.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irqflags.h arm64: Move the async/fiq helpers to explicitly set process context flags 2017-11-02 15:55:41 +00:00
jump_label.h
kasan.h kasan: clean up KASAN_SHADOW_SCALE_SHIFT usage 2018-02-06 18:32:43 -08:00
Kbuild arch: Remove clkdev.h asm-generic from Kbuild 2018-01-03 09:02:11 -08:00
kernel-pgtable.h arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0() 2018-02-06 22:53:14 +00:00
kexec.h
kgdb.h
kprobes.h
kvm_arm.h KVM: arm64: Move HCR_INT_OVERRIDE to default HCR_EL2 guest flag 2018-03-19 10:53:10 +00:00
kvm_asm.h arm64: KVM: Use SMCCC_ARCH_WORKAROUND_1 for Falkor BP hardening 2018-04-11 18:49:30 +01:00
kvm_coproc.h
kvm_emulate.h KVM: arm64: Fix order of vcpu_write_sys_reg() arguments 2018-05-04 16:44:54 +01:00
kvm_host.h arm/arm64: KVM: Add PSCI version selection API 2018-04-20 16:32:23 +01:00
kvm_hyp.h KVM: arm/arm64: Avoid VGICv3 save/restore on VHE with no IRQs 2018-03-19 10:53:21 +00:00
kvm_mmio.h
kvm_mmu.h KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock 2018-05-15 13:36:49 +02:00
linkage.h arm64: relax assembly code alignment from 16 byte to 4 byte 2017-09-18 11:20:19 +01:00
lse.h arm64: lse: Include compiler_types.h and export.h for out-of-line LL/SC 2018-03-27 13:14:49 +01:00
memblock.h
memory.h linux/const.h: move UL() macro to include/linux/const.h 2018-04-11 10:28:38 -07:00
mmu_context.h arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables 2018-02-16 18:13:57 +00:00
mmu.h arm64: KVM: Allow mapping of vectors outside of the RAM region 2018-03-19 13:06:46 +00:00
mmzone.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.h arm64/kernel: rename module_emit_adrp_veneer->module_emit_veneer_for_adrp 2018-04-24 19:07:35 +01:00
neon.h
numa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
page-def.h arm64: factor out PAGE_* and CONT_* definitions 2017-08-15 18:35:00 +01:00
page.h arm64: factor out PAGE_* and CONT_* definitions 2017-08-15 18:35:00 +01:00
paravirt.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
percpu.h arm64: move percpu cmpxchg implementation from cmpxchg.h to percpu.h 2018-03-27 13:15:29 +01:00
perf_event.h arm64/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type 2017-12-05 15:02:41 +01:00
pgalloc.h arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables 2018-02-16 18:13:57 +00:00
pgtable-hwdef.h arm64: kaslr: Set TCR_EL1.NFD1 when CONFIG_RANDOMIZE_BASE=y 2018-03-06 18:52:34 +00:00
pgtable-prot.h KVM changes for 4.16 2018-02-10 13:16:35 -08:00
pgtable-types.h
pgtable.h arm64: mm: drop addr parameter from sync icache and dcache 2018-04-24 09:23:00 +01:00
probes.h
proc-fns.h arm64: mm: Move ASID from TTBR0 to TTBR1 2017-12-11 13:40:25 +00:00
processor.h arm64: uaccess: Fix omissions from usercopy whitelist 2018-03-28 15:25:44 +01:00
ptdump.h
ptrace.h Merge branch 'arm64/exception-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-09 15:37:49 +01:00
sdei.h arm64: sdei: Add trampoline code for remapping the kernel 2018-01-14 18:49:50 +00:00
seccomp.h
sections.h arm64: mmu: add the entry trampolines start/end section markers into sections.h 2018-01-14 18:49:50 +00:00
shmparam.h
signal32.h arm64: compat: Remove leftover variable declaration 2017-08-10 18:17:32 +01:00
simd.h arm64: neon: Forbid when irqs are disabled 2017-08-09 15:05:59 +01:00
smp_plat.h
smp.h arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores 2017-08-21 18:01:04 +01:00
sparsemem.h arm64: add kconfig symbol to configure physical address size 2017-12-22 17:30:33 +00:00
spinlock_types.h locking/qrwlock, arm64: Move rwlock implementation over to qrwlocks 2017-10-25 10:57:25 +02:00
spinlock.h arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics 2018-02-06 22:53:11 +00:00
stack_pointer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stackprotector.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stacktrace.h arm64: fix unwind_frame() for filtered out fn for function graph tracing 2018-02-23 13:46:38 +00:00
stage2_pgtable-nopmd.h
stage2_pgtable-nopud.h
stage2_pgtable.h
stat.h
string.h arm64: uaccess: Implement *_flushcache variants 2017-08-09 12:16:26 +01:00
suspend.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sync_bitops.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall.h
sysreg.h ARM: 2018-04-09 11:42:31 -07:00
system_misc.h arm64: Move show_unhandled_signals_ratelimited into traps.c 2018-03-06 18:52:31 +00:00
thread_info.h Construct init thread stack in the linker script rather than by union 2018-01-09 23:21:02 +00:00
timex.h arm64: Use physical counter for in-kernel reads when booted in EL2 2017-11-06 16:23:09 +01:00
tlb.h
tlbflush.h arm64: tlbflush: avoid writing RES0 bits 2018-03-28 15:20:17 +01:00
topology.h Merge branch 'pm-cpufreq' 2017-11-13 01:34:49 +01:00
traps.h arm64: Introduce arm64_force_sig_info and hook up in arm64_notify_die 2018-03-06 18:52:23 +00:00
uaccess.h arm64: uaccess: Formalise types for access_ok() 2018-02-19 13:59:58 +00:00
unistd32.h
unistd.h
uprobes.h
vdso_datapage.h
vdso.h
virt.h arm64: capabilities: Change scope of VHE to Boot CPU feature 2018-03-26 18:01:41 +01:00
vmap_stack.h arm64: Add vmap_stack header file 2018-01-13 10:45:03 +00:00
word-at-a-time.h