mirror-linux/arch/arm64/include/asm
Linus Torvalds a382b06d29 KVM/arm64 fixes for 6.14, take #4
* Fix a couple of bugs affecting pKVM's PSCI relay implementation
   when running in the hVHE mode, resulting in the host being entered
   with the MMU in an unknown state, and EL2 being in the wrong mode.
 
 x86:
 
 * Set RFLAGS.IF in C code on SVM to get VMRUN out of the STI shadow.
 
 * Ensure DEBUGCTL is context switched on AMD to avoid running the guest with
   the host's value, which can lead to unexpected bus lock #DBs.
 
 * Suppress DEBUGCTL.BTF on AMD (to match Intel), as KVM doesn't properly
   emulate BTF.  KVM's lack of context switching has meant BTF has always been
   broken to some extent.
 
 * Always save DR masks for SNP vCPUs if DebugSwap is *supported*, as the guest
   can enable DebugSwap without KVM's knowledge.
 
 * Fix a bug in mmu_stress_tests where a vCPU could finish the "writes to RO
   memory" phase without actually generating a write-protection fault.
 
 * Fix a printf() goof in the SEV smoke test that causes build failures with
   -Werror.
 
 * Explicitly zero EAX and EBX in CPUID.0x8000_0022 output when PERFMON_V2
   isn't supported by KVM.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmfNSeUUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNKngf/cLgQAT9AF4nFqcwh5b5uucKHVJ8W
 uTiGlWqLAf2UN53L63eZ/7vKQWGQYkOTFvormR14Jam6IYtytsZw1xLBH4fGtUyB
 qVjk0EPzaKGqn3LrgyneQNCXdyxJv7EBVBgoOKH0pvOksoW2E5ZizhhtRFtL7nCE
 Yk8FQKpP0mIBk04RMsvzJVEFKIb4OZgJadWo0gryg1oF2aAv7mxQjyqUWsBDsb3q
 99c0ElSBfV39FeT8xeok4k7S5jbBWii2KiaH72ZsNiBu0rYmEuLwIoygCNNWL9Wu
 FPdQ+r//YrzfCJSXwGPfdUaRaF4p2642S6oiXQuusNNUmhK6/MRo3mZo8A==
 =XQHm
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Paolo Bonzini:
 "arm64:

   - Fix a couple of bugs affecting pKVM's PSCI relay implementation
     when running in the hVHE mode, resulting in the host being entered
     with the MMU in an unknown state, and EL2 being in the wrong mode

  x86:

   - Set RFLAGS.IF in C code on SVM to get VMRUN out of the STI shadow

   - Ensure DEBUGCTL is context switched on AMD to avoid running the
     guest with the host's value, which can lead to unexpected bus lock
     #DBs

   - Suppress DEBUGCTL.BTF on AMD (to match Intel), as KVM doesn't
     properly emulate BTF. KVM's lack of context switching has meant BTF
     has always been broken to some extent

   - Always save DR masks for SNP vCPUs if DebugSwap is *supported*, as
     the guest can enable DebugSwap without KVM's knowledge

   - Fix a bug in mmu_stress_tests where a vCPU could finish the "writes
     to RO memory" phase without actually generating a write-protection
     fault

   - Fix a printf() goof in the SEV smoke test that causes build
     failures with -Werror

   - Explicitly zero EAX and EBX in CPUID.0x8000_0022 output when
     PERFMON_V2 isn't supported by KVM"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: Explicitly zero EAX and EBX when PERFMON_V2 isn't supported by KVM
  KVM: selftests: Fix printf() format goof in SEV smoke test
  KVM: selftests: Ensure all vCPUs hit -EFAULT during initial RO stage
  KVM: SVM: Don't rely on DebugSwap to restore host DR0..DR3
  KVM: SVM: Save host DR masks on CPUs with DebugSwap
  KVM: arm64: Initialize SCTLR_EL1 in __kvm_hyp_init_cpu()
  KVM: arm64: Initialize HCR_EL2.E2H early
  KVM: x86: Snapshot the host's DEBUGCTL after disabling IRQs
  KVM: SVM: Manually context switch DEBUGCTL if LBR virtualization is disabled
  KVM: x86: Snapshot the host's DEBUGCTL in common x86
  KVM: SVM: Suppress DEBUGCTL.BTF on AMD
  KVM: SVM: Drop DEBUGCTL[5:2] from guest's effective value
  KVM: selftests: Assert that STI blocking isn't set after event injection
  KVM: SVM: Set RFLAGS.IF=1 in C code, to get VMRUN out of the STI shadow
2025-03-09 09:04:08 -10:00
..
stacktrace arm64: kvm: Introduce nvhe stack size constants 2025-01-08 11:25:28 +00:00
vdso vdso: Remove timekeeper argument of __arch_update_vsyscall() 2024-10-15 17:50:28 +02:00
xen
Kbuild fprobe: Add fprobe_header encoding feature 2024-12-26 10:50:05 -05:00
acenv.h
acpi.h arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry 2024-06-28 18:38:30 +01:00
alternative-macros.h arm64: alternative: make alternative_has_cap_likely() VDSO compatible 2024-09-13 17:28:35 +02:00
alternative.h Merge branches 'for-next/kpti', 'for-next/missing-proto-warn', 'for-next/iss2-decode', 'for-next/kselftest', 'for-next/misc', 'for-next/feat_mops', 'for-next/module-alloc', 'for-next/sysreg', 'for-next/cpucap', 'for-next/acpi', 'for-next/kdump', 'for-next/acpi-doc', 'for-next/doc' and 'for-next/tpidr2-fix', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2023-06-23 18:32:20 +01:00
apple_m1_pmu.h
arch_gicv3.h arm64: irqchip/gic-v3: Select priorities at boot time 2024-06-24 18:16:45 +01:00
arch_timer.h arm64/arch_timer: include <linux/percpu.h> 2024-06-12 15:44:19 +01:00
archrandom.h arm64: head: Move early kernel mapping routines into C code 2024-02-16 12:42:33 +00:00
arm-cci.h
arm_dsu_pmu.h
arm_pmuv3.h perf/arm_pmuv3: Add PMUv3.9 per counter EL0 access control 2024-10-28 17:27:15 +00:00
asm-bug.h arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY 2024-05-21 19:08:24 +01:00
asm-extable.h arm64: start using 'asm goto' for put_user() 2024-06-19 12:33:38 -07:00
asm-offsets.h
asm-prototypes.h
asm-uaccess.h arm64/mm: remove now-superfluous ISBs from TTBR writes 2023-06-15 17:47:54 +01:00
asm_pointer_auth.h
assembler.h arm64/mm: Override PARange for !LPA2 and use it consistently 2024-12-19 17:23:52 +00:00
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
atomic_ll_sc.h arch: Remove cmpxchg_double 2023-06-05 09:36:39 +02:00
atomic_lse.h arch: Remove cmpxchg_double 2023-06-05 09:36:39 +02:00
barrier.h arm64: barrier: Restore spec_bar() macro 2024-05-10 12:21:56 +01:00
bitops.h
bitrev.h
boot.h
brk-imm.h arm64: kretprobes: acquire the regs via a BRK exception 2024-02-20 18:13:57 +00:00
bug.h
cache.h arm64: Kill detection of VPIPT i-cache policy 2023-12-05 11:38:03 +00:00
cacheflush.h mm: remove page_mapping() 2024-07-03 19:29:59 -07:00
checksum.h
clocksource.h
cmpxchg.h arch: Remove cmpxchg_double 2023-06-05 09:36:39 +02:00
compat.h arm64: avoid prototype warnings for syscalls 2023-05-25 17:44:01 +01:00
compiler.h arm64: move PAC masks to <asm/pointer_auth.h> 2023-04-13 12:27:11 +01:00
cpu.h arm64: cpufeature: discover CPU support for MPAM 2024-10-31 18:09:38 +00:00
cpu_ops.h
cpucaps.h arm64: cpufeature: Add HAFT to cpucap_is_possible() 2024-12-10 12:10:09 +00:00
cpufeature.h Kthreads affinity follow either of 4 existing different patterns: 2025-01-21 17:10:05 -08:00
cpuidle.h
cputype.h KVM: arm64: Work around x1e's CNTVOFF_EL2 bogosity 2025-01-02 19:19:10 +00:00
crash_reserve.h kexec: split crashkernel reservation code out from crash_core.c 2024-02-23 17:48:21 -08:00
current.h
daifflags.h arm64: pt_regs: rename "pmr_save" -> "pmr" 2024-10-17 18:06:24 +01:00
dcc.h
debug-monitors.h arm64: mops: Handle MOPS exceptions from EL1 2024-10-17 16:42:51 +01:00
device.h
dmi.h
efi.h Merge patch series "riscv: Introduce KASLR" 2023-09-08 11:25:13 -07:00
el2_setup.h KVM: arm64: Initialize SCTLR_EL1 in __kvm_hyp_init_cpu() 2025-03-02 08:36:52 +00:00
elf.h arm64: remove unnecessary ifdefs around is_compat_task() 2024-02-28 18:01:23 +00:00
esr.h arm64/traps: Handle GCS exceptions 2024-10-04 12:04:37 +01:00
exception.h Merge branch 'for-next/mops' into for-next/core 2024-11-14 12:07:28 +00:00
exec.h
extable.h
fixmap.h arm64: mm: Add 5 level paging support to fixmap and swapper handling 2024-02-16 12:42:40 +00:00
fpsimd.h arm64/sve: Remove unused declaration read_smcr_features() 2024-08-16 11:48:14 +01:00
fpsimdmacros.h arm64: Delete the zero_za macro 2023-12-11 13:18:06 +00:00
fpu.h arm64: implement ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:18 -07:00
ftrace.h ftrace: Add ftrace_get_symaddr to convert fentry_ip to symaddr 2024-12-26 10:50:07 -05:00
futex.h
gcs.h arm64/signal: Set up and restore the GCS context for signal handlers 2024-10-04 12:04:40 +01:00
gpr-num.h
hardirq.h
hugetlb.h arm64: hugetlb: Fix flush_hugetlb_tlb_range() invalidation level 2025-02-27 17:40:58 +00:00
hw_breakpoint.h arm64/hw_breakpoint: Directly use ESR_ELx_WNR for an watchpoint exception 2024-03-01 17:36:51 +00:00
hwcap.h arm64/hwcap: Describe 2024 dpISA extensions to userspace 2025-01-08 13:41:06 +00:00
hyp_image.h
hypervisor.h drivers/virt: pkvm: Add initial support for running as a protected guest 2024-08-30 16:30:41 +01:00
image.h arm64: Fix dangling references to Documentation/arm64 2023-06-21 08:53:31 -06:00
insn-def.h
insn.h Merge branch 'for-next/mops' into for-next/core 2024-11-14 12:07:28 +00:00
io.h asm-generic updates for 6.13 2024-11-20 15:13:02 -08:00
irq.h arm64: irq: include <linux/cpumask.h> 2024-01-12 12:44:18 +00:00
irq_work.h arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
irqflags.h arm64: Remove unnecessary irqflags alternative.h include 2024-04-10 17:15:09 +01:00
jump_label.h jump_label: adjust inline asm to be consistent 2024-11-04 16:21:45 -05:00
kasan.h arm64: mm: omit redundant remap of kernel image 2024-02-16 12:42:35 +00:00
kernel-pgtable.h arm64: head: Drop SWAPPER_TABLE_SHIFT 2024-10-16 16:04:19 +01:00
kexec.h arm64, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
kfence.h mm,kfence: decouple kfence from page granularity mapping judgement 2023-03-27 16:15:20 +01:00
kgdb.h
kprobes.h kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
kvm_arm.h KVM: arm64: Fix tcr_el2 initialisation in hVHE mode 2025-02-19 22:09:24 +00:00
kvm_asm.h Merge branch kvm-arm64/pkvm-np-guest into kvmarm-master/next 2025-01-12 10:37:15 +00:00
kvm_emulate.h KVM: arm64: Refactor CPTR trap deactivation 2025-02-13 17:54:57 +00:00
kvm_host.h KVM: arm64: Ensure a VMID is allocated before programming VTTBR_EL2 2025-02-20 16:29:28 +00:00
kvm_hyp.h KVM: arm64: Fix __pkvm_init_switch_pgd call ABI 2024-06-20 17:40:53 +00:00
kvm_mmu.h Merge branch kvm-arm64/misc-6.14 into kvmarm-master/next 2025-01-17 11:06:50 +00:00
kvm_mte.h
kvm_nested.h Merge branch kvm-arm64/nv-resx-fixes-6.14 into kvmarm-master/next 2025-01-17 11:06:33 +00:00
kvm_pgtable.h KVM: arm64: Introduce the EL1 pKVM MMU 2024-12-20 09:44:00 +00:00
kvm_pkvm.h Merge branch kvm-arm64/pkvm-fixed-features-6.14 into kvmarm-master/next 2025-01-12 10:40:10 +00:00
kvm_ptrauth.h KVM: arm64: Tidying up PAuth code in KVM 2024-08-07 19:11:05 +00:00
kvm_ras.h
kvm_types.h
linkage.h arm64: Extend support for CONFIG_FUNCTION_ALIGNMENT 2023-01-24 11:49:43 +00:00
lse.h arm64: Remove system_uses_lse_atomics() 2023-10-18 10:58:59 +01:00
mem_encrypt.h arm64: Enable memory encrypt for Realms 2024-10-23 10:19:33 +01:00
memory.h arm64: kvm: Introduce nvhe stack size constants 2025-01-08 11:25:28 +00:00
mman.h arm64: mte: set VM_MTE_ALLOWED for hugetlbfs at correct place 2024-12-02 11:48:14 +00:00
mmu.h arm64/mm: Drop INIT_MM_CONTEXT() 2024-12-10 11:32:26 +00:00
mmu_context.h sched,arm64: Handle CPU isolation on last resort fallback rq selection 2025-01-08 18:14:23 +01:00
module.h arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_843419 2023-10-16 14:17:06 +01:00
module.lds.h arm64: module: mandate MODULE_PLTS 2023-06-06 17:39:05 +01:00
mshyperv.h hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
mte-def.h
mte-kasan.h arm64: mte: rename TCO routines 2023-04-05 19:42:43 -07:00
mte.h hugetlb: arm64: add mte support 2024-10-16 14:50:47 +01:00
neon-intrinsics.h
neon.h
numa.h
page-def.h vdso: Introduce vdso/page.h 2024-10-16 00:13:04 +02:00
page.h mm: add vma_alloc_zeroed_movable_folio() 2023-02-02 22:33:18 -08:00
paravirt.h
paravirt_api_clock.h
pci.h
percpu.h arch: Remove cmpxchg_double 2023-06-05 09:36:39 +02:00
perf_event.h perf/core: Correct perf sampling with guest VMs 2024-11-14 10:40:01 +01:00
pgalloc.h arm64: pgtable: use mmu gather to free p4d level page table 2025-01-25 20:22:21 -08:00
pgtable-hwdef.h arm64/mm: Reduce PA space to 48 bits when LPA2 is not enabled 2024-12-19 17:23:52 +00:00
pgtable-prot.h arm64/mm: Reduce PA space to 48 bits when LPA2 is not enabled 2024-12-19 17:23:52 +00:00
pgtable-types.h arm64: mm: Add definitions to support 5 levels of paging 2024-02-16 12:42:39 +00:00
pgtable.h Merge branch 'for-next/mm' into for-next/core 2025-01-17 13:52:33 +00:00
pkeys.h arm64: pkeys: remove redundant WARN 2024-09-10 18:19:59 +01:00
pointer_auth.h arm64: move PAC masks to <asm/pointer_auth.h> 2023-04-13 12:27:11 +01:00
por.h arm64: implement PKEYS support 2024-09-04 12:54:04 +01:00
preempt.h
probes.h arm64: probes: Remove probe_opcode_t 2024-10-15 18:16:20 +01:00
proc-fns.h
processor.h Merge branches 'for-next/gcs', 'for-next/probes', 'for-next/asm-offsets', 'for-next/tlb', 'for-next/misc', 'for-next/mte', 'for-next/sysreg', 'for-next/stacktrace', 'for-next/hwcap3', 'for-next/kselftest', 'for-next/crc32', 'for-next/guest-cca', 'for-next/haft' and 'for-next/scs', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2024-11-14 12:07:16 +00:00
ptdump.h arm64: ptdump: Use the ptdump description from a local context 2024-09-10 21:32:51 +01:00
ptrace.h arm64: stacktrace: unwind exception boundaries 2024-10-17 18:06:25 +01:00
pvclock-abi.h
rsi.h arm64: rsi: Add automatic arm-cca-guest module loading 2025-01-08 13:58:49 +00:00
rsi_cmds.h arm64: rsi: Add support for checking whether an MMIO is protected 2024-10-23 10:19:32 +01:00
rsi_smc.h arm64: rsi: Add RSI definitions 2024-10-23 10:19:32 +01:00
runtime-const.h arm64: add 'runtime constant' support 2024-07-09 07:30:43 -07:00
rwonce.h
scs.h arm64/scs: Drop unused prototype __pi_scs_patch_vmlinux() 2024-11-08 16:37:55 +00:00
sdei.h arm64: sdei: abort running SDEI handlers during crash 2023-08-04 17:35:33 +01:00
seccomp.h arm64: Remove duplicate included header 2025-01-10 13:44:22 +00:00
sections.h
semihost.h serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h 2023-01-19 14:58:19 +01:00
set_memory.h - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
setup.h arm64: kernel: Remove early fdt remap code 2024-02-16 12:42:29 +00:00
shmparam.h
signal.h
signal32.h
simd.h arm64: fpsimd: Drop unneeded 'busy' flag 2023-12-12 14:29:16 +00:00
smp.h arm64: implement raw_smp_processor_id() using thread_info 2024-06-12 15:44:19 +01:00
smp_plat.h
sparsemem.h arm64/mm: Reduce PA space to 48 bits when LPA2 is not enabled 2024-12-19 17:23:52 +00:00
spectre.h arm64: Fix circular header dependency 2023-12-20 19:26:30 -05:00
spinlock.h
spinlock_types.h Improve consistency of '#error' directive messages 2024-11-11 17:17:04 -08:00
stack_pointer.h
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h arm64: efi: Account for the EFI runtime stack in stack unwinder 2023-01-16 15:27:31 +01:00
stage2_pgtable.h KVM: arm64: Move VTCR_EL2 into struct s2_mmu 2023-10-23 18:48:46 +00:00
stat.h
string.h
suspend.h
sync_bitops.h
syscall.h tracing: arm64: Avoid missing-prototype warnings 2023-07-12 12:06:04 -04:00
syscall_wrapper.h posix-timers: Get rid of [COMPAT_]SYS_NI() uses 2023-12-20 21:30:27 -08:00
sysreg.h Merge branch kvm-arm64/coresight-6.14 into kvmarm-master/next 2025-01-17 11:05:44 +00:00
system_misc.h
text-patching.h asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
thread_info.h arm64: Implement prctl(PR_{G,S}ET_TSC) 2024-08-27 13:38:56 +01:00
timex.h
tlb.h mm: pgtable: introduce generic __tlb_remove_table() 2025-01-25 20:22:23 -08:00
tlbbatch.h arm64: support batched/deferred tlb shootdown during page reclamation/migration 2023-08-18 10:12:37 -07:00
tlbflush.h arm64: optimize flush tlb kernel range 2024-10-16 12:01:53 +01:00
topology.h ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
trans_pgd.h
traps.h arm64: handle PKEY/POE faults 2024-09-04 12:53:44 +01:00
uaccess.h arm64/gcs: Provide put_user_gcs() 2024-10-04 12:04:34 +01:00
unistd.h arm64: rework compat syscall macros 2024-07-10 14:23:38 +02:00
unistd32.h arm64: convert unistd_32.h to syscall.tbl format 2024-07-10 14:23:38 +02:00
uprobes.h arm64: probes: Fix uprobes for big-endian kernels 2024-10-09 16:56:53 +01:00
vdso.h arm64: vdso: Drop LBASE_VDSO 2024-11-02 12:37:33 +01:00
vectors.h arm64: Avoid cpus_have_const_cap() for ARM64_UNMAP_KERNEL_AT_EL0 2023-10-16 14:17:06 +01:00
vermagic.h
virt.h KVM: arm64: Add is_pkvm_initialized() helper 2024-05-01 16:48:14 +01:00
vmalloc.h
vmap_stack.h
vncr_mapping.h arm64: Remove VNCR definition for PIRE0_EL2 2024-10-31 02:42:29 +00:00
word-at-a-time.h arm64: word-at-a-time: improve byte count calculations for LE 2024-06-19 12:35:19 -07:00
xor.h