linux-stable/arch
Nicholas Piggin 5088eb4092 KVM: PPC: Book3S HV P9: Restore host CTRL SPR after guest exit
The host CTRL (runlatch) value is not restored after guest exit. The
host CTRL should always be 1 except in CPU idle code, so this can result
in the host running with runlatch clear, and potentially switching to
a different vCPU which then runs with runlatch clear as well.

This has little effect on P9 machines, CTRL is only responsible for some
PMU counter logic in the host and so other than corner cases of software
relying on that, or explicitly reading the runlatch value (Linux does
not appear to be affected but it's possible non-Linux guests could be),
there should be no execution correctness problem, though it could be
used as a covert channel between guests.

There may be microcontrollers, firmware or monitoring tools that sample
the runlatch value out-of-band, however since the register is writable
by guests, these values would (should) not be relied upon for correct
operation of the host, so suboptimal performance or incorrect reporting
should be the worst problem.

Fixes: 95a6432ce9 ("KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210412014845.1517916-2-npiggin@gmail.com
2021-04-12 13:36:22 +10:00
..
alpha io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
arc arch: setup PF_IO_WORKER threads like PF_KTHREAD 2021-02-21 17:25:22 -07:00
arm A set of irqchip updates: 2021-03-14 13:33:33 -07:00
arm64 More fixes for ARM and x86. 2021-03-14 12:35:02 -07:00
csky arch/csky patches for 5.12-rc1 2021-02-28 12:06:45 -08:00
h8300 arch: setup PF_IO_WORKER threads like PF_KTHREAD 2021-02-21 17:25:22 -07:00
hexagon io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
ia64 ia64: fix ptrace(PTRACE_SYSCALL_INFO_EXIT) sign 2021-03-13 11:27:31 -08:00
m68k m68k: Fix virt_addr_valid() W=1 compiler warnings 2021-03-06 14:15:07 +01:00
microblaze io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
mips MIPS: kernel: Reserve exception base early to prevent corruption 2021-03-09 11:22:59 +01:00
nds32 io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
nios2 io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
openrisc io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
parisc arch/parisc/kernel: remove duplicate include in ptrace 2021-03-04 09:12:29 +01:00
powerpc KVM: PPC: Book3S HV P9: Restore host CTRL SPR after guest exit 2021-04-12 13:36:22 +10:00
riscv RISC-V Patches for the 5.12 Merge Window, Part 2 2021-02-28 12:01:23 -08:00
s390 s390: remove IBM_PARTITION and CONFIGFS_FS from zfcpdump defconfig 2021-03-08 10:46:30 +01:00
sh io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
sparc Merge git://git.kernel.org:/pub/scm/linux/kernel/git/davem/sparc 2021-03-09 17:08:41 -08:00
um io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
x86 A single objtool fix to handle the PUSHF/POPF validation correctly for the 2021-03-14 13:15:55 -07:00
xtensa io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
.gitignore
Kconfig kbuild: remove LLVM=1 test from HAS_LTO_CLANG 2021-03-11 14:52:55 +09:00