https://github.com/torvalds/linux
Revision 03fdfb2690099c19160a3f2c5b77db60b3afeded authored by Marc Zyngier on 05 August 2019, 09:34:51 UTC, committed by Marc Zyngier on 09 August 2019, 07:07:07 UTC
At the moment, the way we reset system registers is mildly insane:
We write junk to them, call the reset functions, and then check that
we have something else in them.

The "fun" thing is that this can happen while the guest is running
(PSCI, for example). If anything in KVM has to evaluate the state
of a system register while junk is in there, bad thing may happen.

Let's stop doing that. Instead, we track that we have called a
reset function for that register, and assume that the reset
function has done something. This requires fixing a couple of
sysreg refinition in the trap table.

In the end, the very need of this reset check is pretty dubious,
as it doesn't check everything (a lot of the sysregs leave outside of
the sys_regs[] array). It may well be axed in the near future.

Tested-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 5eeaf10
History
Tip revision: 03fdfb2690099c19160a3f2c5b77db60b3afeded authored by Marc Zyngier on 05 August 2019, 09:34:51 UTC
KVM: arm64: Don't write junk to sysregs on reset
Tip revision: 03fdfb2
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 14.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.6 KB
.mailmap -rw-r--r-- 12.0 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.1 KB
Kbuild -rw-r--r-- 1.5 KB
Kconfig -rw-r--r-- 595 bytes
MAINTAINERS -rw-r--r-- 509.8 KB
Makefile -rw-r--r-- 59.1 KB
README -rw-r--r-- 727 bytes

README

back to top