linux_dsm_epyc7002/arch/arm64/include/asm
Dave Martin 3fab39997a arm64/sve: Report SVE to userspace via CPUID only if supported
Currently, the SVE field in ID_AA64PFR0_EL1 is visible
unconditionally to userspace via the CPU ID register emulation,
irrespective of the kernel config.  This means that if a kernel
configured with CONFIG_ARM64_SVE=n is run on SVE-capable hardware,
userspace will see SVE reported as present in the ID regs even
though the kernel forbids execution of SVE instructions.

This patch makes the exposure of the SVE field in ID_AA64PFR0_EL1
conditional on CONFIG_ARM64_SVE=y.

Since future architecture features are likely to encounter a
similar requirement, this patch adds a suitable helper macros for
use when declaring config-conditional ID register fields.

Fixes: 43994d824e ("arm64/sve: Detect SVE and activate runtime support")
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-12-14 15:14:30 +00: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arch_gicv3.h irqchip/gic-v3: Add support for Range Selector (RS) feature 2017-10-19 11:22:34 +01:00
arch_timer.h First batch of KVM changes for 4.15 2017-11-16 13:00:24 -08: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
assembler.h arm64: Add software workaround for Falkor erratum 1041 2017-12-12 11:45:19 +00:00
atomic_ll_sc.h
atomic_lse.h
atomic.h
barrier.h arm64: sysreg: Move SPE registers and PSB into common header files 2017-10-18 12:53:32 +01: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
cacheflush.h arm64: mm: cleanup stale AIVIVT references 2017-11-28 18:13:18 +00: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
compat.h fcntl: don't cap l_start and l_end values for F_GETLK64 in compat syscall 2017-11-15 08:08:36 -05: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/sve: Detect SVE and activate runtime support 2017-11-03 15:24:21 +00:00
cpufeature.h arm64/sve: Report SVE to userspace via CPUID only if supported 2017-12-14 15:14:30 +00: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: Define cputype macros for Falkor CPU 2017-12-12 11:45:19 +00: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
dmi.h
efi.h arm64: SW PAN: Point saved ttbr0 at the zero page when switching to init_mm 2017-12-06 18:28:10 +00:00
elf.h arm64: elf.h: Correct comment about READ_IMPLIES_EXEC propagation 2017-10-09 10:00:23 +01:00
esr.h arm64/sve: System register and exception syndrome definitions 2017-11-03 15:24:13 +00:00
exception.h
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 ACPI / APEI: Replace ioremap_page_range() with fixmap 2017-11-07 12:12:44 +01:00
fpsimd.h arm64/sve: KVM: Prevent guests from using SVE 2017-11-03 15:24:19 +00:00
fpsimdmacros.h arm64/sve: Low-level SVE architectural state manipulation functions 2017-11-03 15:24:14 +00:00
ftrace.h
futex.h
hardirq.h
hugetlb.h
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
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kbuild locking/qrwlock, arm64: Move rwlock implementation over to qrwlocks 2017-10-25 10:57:25 +02:00
kernel-pgtable.h
kexec.h
kgdb.h
kprobes.h
kvm_arm.h arm64: KVM: fix VTTBR_BADDR_MASK BUG_ON off-by-one 2017-11-29 16:46:17 +01:00
kvm_asm.h KVM: arm/arm64: Move timer save/restore out of the hyp code 2017-11-06 16:23:13 +01:00
kvm_coproc.h
kvm_emulate.h KVM: arm/arm64: fix the incompatible matching for external abort 2017-11-06 16:23:20 +01:00
kvm_host.h KVM: arm/arm64: debug: Introduce helper for single-step 2017-11-29 16:46:19 +01:00
kvm_hyp.h KVM: arm/arm64: Move timer save/restore out of the hyp code 2017-11-06 16:23:13 +01:00
kvm_mmio.h
kvm_mmu.h
kvm_psci.h
linkage.h arm64: relax assembly code alignment from 16 byte to 4 byte 2017-09-18 11:20:19 +01:00
lse.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memblock.h
memory.h arm64 updates for 4.15 2017-11-15 10:56:56 -08:00
mmu_context.h arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb 2017-12-06 18:28:10 +00:00
mmu.h
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: ftrace: emit ftrace-mod.o contents through code 2017-12-01 13:04:59 +00: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
page.h
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
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 kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK 2017-11-15 18:21:04 -08:00
pgtable-hwdef.h
pgtable-prot.h
pgtable-types.h
pgtable.h arm64: mm: Fix false positives in set_pte_at access/dirty race detection 2017-12-12 11:42:24 +00:00
probes.h
proc-fns.h
processor.h arm64/sve: Add prctl controls for userspace vector length management 2017-11-03 15:24:19 +00:00
ptdump.h
ptrace.h
seccomp.h
sections.h
shmparam.h
signal32.h
simd.h
smp_plat.h
smp.h
sparsemem.h
spinlock_types.h locking/qrwlock, arm64: Move rwlock implementation over to qrwlocks 2017-10-25 10:57:25 +02:00
spinlock.h locking/qrwlock, arm64: Move rwlock implementation over to qrwlocks 2017-10-25 10:57:25 +02: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
stage2_pgtable-nopmd.h
stage2_pgtable-nopud.h
stage2_pgtable.h
stat.h
string.h
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 arm64/sve: System register and exception syndrome definitions 2017-11-03 15:24:13 +00:00
system_misc.h
thread_info.h arm64/sve: Support vector length resetting for new processes 2017-11-03 15:24:16 +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
topology.h Merge branch 'pm-cpufreq' 2017-11-13 01:34:49 +01:00
traps.h arm64/sve: Core task context handling 2017-11-03 15:24:15 +00:00
uaccess.h arm64 updates for 4.14: 2017-09-05 09:53:37 -07:00
unistd32.h
unistd.h
uprobes.h
vdso_datapage.h
vdso.h
virt.h
word-at-a-time.h