linux/arch/powerpc/include/asm
Nicholas Piggin 22f7ff0dea KVM: PPC: Book3S HV Nested: Fix nested HFSCR being clobbered with multiple vCPUs
The L0 is storing HFSCR requested by the L1 for the L2 in struct
kvm_nested_guest when the L1 requests a vCPU enter L2. kvm_nested_guest
is not a per-vCPU structure. Hilarity ensues.

Fix it by moving the nested hfscr into the vCPU structure together with
the other per-vCPU nested fields.

Fixes: 8b210a880b ("KVM: PPC: Book3S HV Nested: Make nested HFSCR state accessible")
Cc: stable@vger.kernel.org # v5.15+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220122105530.3477250-1-npiggin@gmail.com
2022-01-25 16:39:41 +11:00
..
book3s powerpc/fixmap: Fix VM debug warning on unmap 2022-01-24 17:29:05 +11:00
nohash powerpc/fixmap: Fix VM debug warning on unmap 2022-01-24 17:29:05 +11:00
vdso powerpc: Redefine HMT_xxx macros as empty on PPC32 2021-08-27 00:56:52 +10:00
8xx_immap.h
accounting.h
agp.h
archrandom.h
asm-compat.h powerpc: Use lwarx/ldarx directly instead of PPC_LWARX/LDARX macros 2021-08-25 13:35:49 +10:00
asm-const.h powerpc/asm: Remove UPD_CONSTR after GCC 4.9 removal 2021-10-09 00:15:59 +11:00
asm-offsets.h
asm-prototypes.h KVM: PPC: Book3S HV P9: Implement PMU save/restore in C 2021-11-24 21:08:58 +11:00
async_tx.h
atomic.h powerpc/atomics: Remove atomic_inc()/atomic_dec() and friends 2021-11-30 11:45:57 +11:00
backlight.h
barrier.h powerpc/barrier: Avoid collision with clang's __lwsync macro 2021-06-10 21:44:57 +10:00
bitops.h bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
bootx.h
btext.h powerpc/kernel: Add __init attribute to eligible functions 2021-12-23 22:33:10 +11:00
bug.h powerpc/bug: Cast to unsigned long before passing to inline asm 2021-09-01 21:25:43 +10:00
bugs.h
cache.h
cacheflush.h
cell-pmu.h
cell-regs.h
checksum.h powerpc: Force inlining of csum_add() 2021-06-16 00:16:47 +10:00
clocksource.h
cmpxchg.h locking/atomic: powerpc: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
code-patching-asm.h
code-patching.h powerpc/code-patching: Move instr_is_branch_{i/b}form() in code-patching.h 2021-12-23 22:36:58 +11:00
compat.h arch: remove compat_alloc_user_space 2021-09-08 15:32:35 -07:00
context_tracking.h
copro.h
cpm1.h
cpm2.h powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
cpm.h
cpu_has_feature.h
cpu_setup_power.h
cpufeature.h
cpuidle.h powerpc/powernv: Add __init attribute to eligible functions 2021-12-23 22:33:15 +11:00
cputable.h
cputhreads.h powerpc: remove cpu_online_cores_map function 2021-11-29 22:48:32 +11:00
cputime.h
crashdump-ppc64.h
current.h
dbdma.h
dbell.h
dcr-generic.h
dcr-mmio.h
dcr-native.h
dcr-regs.h
dcr.h
debug.h
delay.h
device.h
disassemble.h
dma-direct.h
dma.h
drmem.h pseries/drmem: update LMBs after LPM 2021-08-10 23:14:55 +10:00
dt_cpu_ftrs.h
dtl.h
edac.h
eeh_event.h
eeh.h powerpc/kernel: Add __init attribute to eligible functions 2021-12-23 22:33:10 +11:00
ehv_pic.h
elf.h
elfnote.h
emergency-restart.h
emulated_ops.h
epapr_hcalls.h
exception-64e.h powerpc/code-patching: Move patch_exception() outside code-patching.c 2021-12-23 22:36:55 +11:00
exception-64s.h KVM: PPC: Book3S 64: Move hcall early register setup to KVM 2021-06-10 22:12:12 +10:00
exec.h
extable.h powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto 2021-08-15 13:49:24 +10:00
fadump-internal.h powerpc/kernel: Add __init attribute to eligible functions 2021-12-23 22:33:10 +11:00
fadump.h
fb.h
feature-fixups.h
firmware.h powerpc: Remove unused FW_FEATURE_NATIVE references 2021-12-02 22:57:22 +11:00
fixmap.h powerpc/fixmap: Fix VM debug warning on unmap 2022-01-24 17:29:05 +11:00
floppy.h powerpc/floppy: Remove usage of the deprecated "pci-dma-compat.h" API 2022-01-04 16:00:59 +11:00
fs_pd.h
fsl_85xx_cache_sram.h
fsl_gtm.h
fsl_hcalls.h
fsl_lbc.h
fsl_pamu_stash.h
fsl_pm.h
ftrace.h
futex.h
grackle.h
hardirq.h
head-64.h powerpc/64/asm: Do not reassign labels 2021-12-23 22:35:12 +11:00
heathrow.h
highmem.h
hmi.h
hugetlb.h powerpc/mm: Add __init attribute to eligible functions 2021-12-23 22:33:11 +11:00
hvcall.h Merge branch 'topic/ppc-kvm' into next 2021-06-23 00:19:08 +10:00
hvconsole.h
hvcserver.h
hvsi.h
hw_breakpoint.h powerpc/inst: Move ppc_inst_t definition in asm/reg.h 2021-12-09 22:41:21 +11:00
hw_irq.h powerpc/time: Fix build failure due to do_hard_irq_enable() on PPC32 2022-01-16 20:50:20 +11:00
hydra.h
i8259.h powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
ibmebus.h
icswx.h
ide.h
idle.h
imc-pmu.h
immap_cpm2.h
inst.h powerpc/code-patching: Replace patch_instruction() by ppc_inst_write() in selftests 2021-12-23 22:36:58 +11:00
interrupt.h powerpc/64/interrupt: reduce expensive debug tests 2021-12-16 21:31:45 +11:00
io_event_irq.h
io-defs.h
io-workarounds.h
io.h powerpc/asm: Remove UPD_CONSTR after GCC 4.9 removal 2021-10-09 00:15:59 +11:00
iommu.h powerpc/pseries: Add __init attribute to eligible functions 2021-12-23 22:33:15 +11:00
ipic.h powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
irq_work.h
irq.h powerpc/config: Add CONFIG_BOOKE_OR_40x 2021-12-09 22:41:19 +11:00
irqflags.h
isa-bridge.h
jump_label.h powerpc: Fix initrd corruption with relative jump labels 2021-06-15 23:35:57 +10:00
kasan.h
Kbuild
kdebug.h
kdump.h
kexec_ranges.h
kexec.h powerpc/kernel: Add __init attribute to eligible functions 2021-12-23 22:33:10 +11:00
keylargo.h
kfence.h
kgdb.h
kprobes.h kprobes: treewide: Make it harder to refer kretprobe_trampoline directly 2021-09-30 21:24:06 -04:00
kup.h powerpc: Add KUAP support for BOOKE and 40x 2021-12-09 22:41:19 +11:00
kvm_asm.h KVM: PPC: Book3S HV Nested: Avoid extra mftb() in nested entry 2021-11-24 21:09:02 +11:00
kvm_book3s_32.h
kvm_book3s_64.h KVM: PPC: Book3S HV Nested: Fix nested HFSCR being clobbered with multiple vCPUs 2022-01-25 16:39:41 +11:00
kvm_book3s_asm.h
kvm_book3s_uvmem.h
kvm_book3s.h KVM: PPC: Book3S HV: Change dec_expires to be relative to guest timebase 2021-11-24 21:08:59 +11:00
kvm_booke_hv_asm.h
kvm_booke.h
kvm_fpu.h
kvm_guest.h powerpc/kernel: Add __init attribute to eligible functions 2021-12-23 22:33:10 +11:00
kvm_host.h KVM: PPC: Book3S HV Nested: Fix nested HFSCR being clobbered with multiple vCPUs 2022-01-25 16:39:41 +11:00
kvm_para.h
kvm_ppc.h Merge branch 'topic/ppc-kvm' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux into HEAD 2021-12-19 15:27:21 +01:00
libata-portmap.h
linkage.h
livepatch.h powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
local.h
lppaca.h
lv1call.h
machdep.h powerpc: Mark probe_machine() __init and static 2021-11-29 22:49:26 +11:00
macio.h
mc146818rtc.h
mce.h
mediabay.h
mem_encrypt.h treewide: Replace the use of mem_encrypt_active() with cc_platform_has() 2021-10-04 11:47:24 +02:00
membarrier.h powerpc/non-smp: Unconditionaly call smp_mb() on switch_mm 2021-08-10 23:14:55 +10:00
mman.h
mmiowb.h
mmu_context.h powerpc/mm: Add __init attribute to eligible functions 2021-12-23 22:33:11 +11:00
mmu.h powerpc/64s: Make hash MMU support configurable 2021-12-09 22:40:24 +11:00
mmzone.h mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
module.h
module.lds.h
mpc5xxx.h
mpc6xx.h
mpc52xx_psc.h
mpc52xx.h
mpc85xx.h
mpc5121.h
mpc8260.h
mpic_msgr.h
mpic_timer.h
mpic.h powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
msi_bitmap.h
nmi.h
nvram.h
ohare.h
opal-api.h powerpc/xive: Activate StoreEOI on P10 2021-11-25 11:25:30 +11:00
opal.h powerpc/powernv: Add __init attribute to eligible functions 2021-12-23 22:33:15 +11:00
paca.h powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU 2021-12-09 22:41:13 +11:00
page_32.h
page_64.h
page.h
paravirt.h powerpc/paravirt: correct preempt debug splat in vcpu_is_preempted() 2021-10-09 00:15:59 +11:00
parport.h
pasemi_dma.h
pci-bridge.h powerpc/pseries/pci: Add MSI domains 2021-08-10 23:14:57 +10:00
pci.h powerpc/kernel: Add __init attribute to eligible functions 2021-12-23 22:33:10 +11:00
percpu.h
perf_event_fsl_emb.h
perf_event_server.h powerpc/perf: Add __init attribute to eligible functions 2021-12-23 22:33:11 +11:00
perf_event.h
pgalloc.h mm/thp: define default pmd_pgtable() 2021-07-01 11:06:03 -07:00
pgtable-be-types.h
pgtable-types.h powerpc/32: Don't use a struct based type for pte_t 2021-10-22 15:22:06 +11:00
pgtable.h powerpc updates for 5.14 2021-07-02 12:54:34 -07:00
pkeys.h
plpar_wrappers.h powerpc/pseries: use notrace hcall variant for H_CEDE idle 2021-05-12 11:07:38 +10:00
pmac_feature.h
pmac_low_i2c.h
pmac_pfunc.h
pmc.h KVM: PPC: Book3S HV Nested: Reflect guest PMU in-use to L0 when guest SPRs are live 2021-08-25 16:37:18 +10:00
pmi.h
pnv-ocxl.h
pnv-pci.h powerpc/powernv/pci: Rework pnv_opal_pci_msi_eoi() 2021-08-10 23:15:01 +10:00
powernv.h
ppc4xx.h
ppc_asm.h powerpc: flexible GPR range save/restore macros 2021-11-29 23:15:20 +11:00
ppc-opcode.h powerpc64/bpf: Limit 'ldbrx' to processors compliant with ISA v2.06 2022-01-15 12:21:25 +11:00
ppc-pci.h powerpc/eeh: Use dev_driver_string() instead of struct pci_dev->driver->name 2021-10-12 17:50:12 -05:00
probes.h powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
processor.h powerpc: Add KUAP support for BOOKE and 40x 2021-12-09 22:41:19 +11:00
prom.h powerpc/pseries: Add support for FORM2 associativity 2021-08-13 22:04:27 +10:00
ps3.h powerpc/ps3: Add dma_mask to ps3_dma_region 2021-06-10 21:44:58 +10:00
ps3av.h
ps3gpu.h
ps3stor.h
pte-walk.h powerpc: Fix reverse map real-mode address lookup with huge vmalloc 2021-05-28 22:54:27 +10:00
ptrace.h powerpc/config: Add CONFIG_BOOKE_OR_40x 2021-12-09 22:41:19 +11:00
qspinlock_paravirt.h
qspinlock.h locking/atomic: powerpc: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
reg_8xx.h
reg_a2.h
reg_booke.h
reg_fsl_emb.h
reg.h powerpc/inst: Move ppc_inst_t definition in asm/reg.h 2021-12-09 22:41:21 +11:00
rheap.h
rio.h
rtas-types.h
rtas.h powerpc/rtas: rtas_busy_delay() improvements 2021-11-25 11:25:33 +11:00
runlatch.h
seccomp.h
sections.h powerpc/toc: Future proof kernel toc 2021-12-23 22:35:01 +11:00
secure_boot.h
security_features.h powerpc/security: Add a helper to query stf_barrier type 2021-10-07 19:52:58 +11:00
secvar.h
serial.h
set_memory.h powerpc/mm: implement set_memory_attr() 2021-06-21 21:13:21 +10:00
setjmp.h
setup.h powerpc/code-patching: Remove init_mem_is_free 2021-12-23 22:35:24 +11:00
sfp-machine.h
shmparam.h
signal.h
simple_spinlock_types.h locking: Allow to include asm/spinlock_types.h from linux/spinlock_types_raw.h 2021-12-07 15:14:12 +01:00
simple_spinlock.h locking: Remove spin_lock_flags() etc 2021-10-30 16:37:28 +02:00
slice.h
smp.h powerpc: smp: remove hack to obtain offset of task_struct::cpu 2021-09-30 16:13:11 +02:00
smu.h powerpc/powermac: Add __init attribute to eligible functions 2021-12-23 22:33:14 +11:00
sparsemem.h
spinlock_types.h locking: Allow to include asm/spinlock_types.h from linux/spinlock_types_raw.h 2021-12-07 15:14:12 +01:00
spinlock.h
spu_csa.h
spu_info.h
spu_priv1.h
spu.h
sstep.h powerpc/inst: Define ppc_inst_t 2021-12-09 22:41:21 +11:00
stackprotector.h
stacktrace.h
static_call.h powerpc/32: Add support for out-of-line static calls 2021-10-22 15:22:05 +11:00
string.h
svm.h
swab.h
swiotlb.h
switch_to.h KVM: PPC: Book3S HV P9: Use Linux SPR save/restore to manage some host SPRs 2021-11-24 21:09:01 +11:00
synch.h
syscall.h powerpc/audit: Fix syscall_get_arch() 2022-01-15 12:21:26 +11:00
syscalls.h powerpc/compat_sys: Declare syscalls 2021-08-23 19:28:21 +10:00
task_size_32.h
task_size_64.h powerpc/sched: Remove unused TASK_SIZE_OF 2022-01-04 23:12:27 +11:00
tce.h powerpc/pseries/iommu: Replace hard-coded page shift 2021-08-27 00:56:54 +10:00
termios.h
thread_info.h powerpc/audit: Fix syscall_get_arch() 2022-01-15 12:21:26 +11:00
time.h powerpc/time: add API for KVM to re-arm the host timer/decrementer 2021-11-24 21:08:57 +11:00
timex.h
tlb.h mm/mremap: allow arch runtime override 2021-07-08 11:48:23 -07:00
tlbflush.h
tm.h
topology.h powerpc/numa: Update cpu_cpu_map on CPU online/offline 2021-08-27 00:56:54 +10:00
trace_clock.h
trace.h
tsi108_irq.h
tsi108_pci.h
tsi108.h
types.h
uaccess.h powerpc/asm: Remove UPD_CONSTR after GCC 4.9 removal 2021-10-09 00:15:59 +11:00
udbg.h powerpc/powermac: Add __init attribute to eligible functions 2021-12-23 22:33:14 +11:00
uic.h
ultravisor-api.h
ultravisor.h
uninorth.h
unistd.h powerpc/syscalls: Remove __NR__exit 2021-08-23 19:28:20 +10:00
uprobes.h powerpc/inst: Move ppc_inst_t definition in asm/reg.h 2021-12-09 22:41:21 +11:00
user.h
vas.h powerpc/pseries/vas: Integrate API with open/close windows 2021-06-20 21:58:57 +10:00
vdso_datapage.h
vdso.h
vermagic.h
vga.h
vio.h
vmalloc.h
word-at-a-time.h
xics.h powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
xive-regs.h KVM: PPC: Book3S HV: XIVE: Add support for automatic save-restore 2021-08-10 23:15:02 +10:00
xive.h KVM: PPC: Book3S HV: XIVE: Add support for automatic save-restore 2021-08-10 23:15:02 +10:00
xmon.h powerpc/xmon: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
xor_altivec.h
xor.h