KVM: PPC: Book3S: Provide information about hardware/firmware CVE workarounds
authorPaul Mackerras <paulus@ozlabs.org>
Mon, 15 Jan 2018 05:06:47 +0000 (16:06 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 19 Jan 2018 04:17:01 +0000 (15:17 +1100)
commit3214d01f139b7544e870fc0b7fcce8da13c1cb51
tree15736d0929131d265751405b3cb262444246ab8c
parent37b95951c58fdf08dc10afa9d02066ed9f176fb5
KVM: PPC: Book3S: Provide information about hardware/firmware CVE workarounds

This adds a new ioctl, KVM_PPC_GET_CPU_CHAR, that gives userspace
information about the underlying machine's level of vulnerability
to the recently announced vulnerabilities CVE-2017-5715,
CVE-2017-5753 and CVE-2017-5754, and whether the machine provides
instructions to assist software to work around the vulnerabilities.

The ioctl returns two u64 words describing characteristics of the
CPU and required software behaviour respectively, plus two mask
words which indicate which bits have been filled in by the kernel,
for extensibility.  The bit definitions are the same as for the
new H_GET_CPU_CHARACTERISTICS hypercall.

There is also a new capability, KVM_CAP_PPC_GET_CPU_CHAR, which
indicates whether the new ioctl is available.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Documentation/virtual/kvm/api.txt
arch/powerpc/include/uapi/asm/kvm.h
arch/powerpc/kvm/powerpc.c
include/uapi/linux/kvm.h