linux_dsm_epyc7002/arch/arm
Jintack Lim 488f94d721 KVM: arm64: Access CNTHCTL_EL2 bit fields correctly on VHE systems
Current KVM world switch code is unintentionally setting wrong bits to
CNTHCTL_EL2 when E2H == 1, which may allow guest OS to access physical
timer.  Bit positions of CNTHCTL_EL2 are changing depending on
HCR_EL2.E2H bit.  EL1PCEN and EL1PCTEN are 1st and 0th bits when E2H is
not set, but they are 11th and 10th bits respectively when E2H is set.

In fact, on VHE we only need to set those bits once, not for every world
switch. This is because the host kernel runs in EL2 with HCR_EL2.TGE ==
1, which makes those bits have no effect for the host kernel execution.
So we just set those bits once for guests, and that's it.

Signed-off-by: Jintack Lim <jintack@cs.columbia.edu>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2017-01-13 11:19:25 +00:00
..
boot ARMv7 VExpress fixes for v4.10 2017-01-04 16:33:37 +01:00
common Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
configs ARM: SoC defconfig updates for v4.10 2016-12-15 15:41:04 -08:00
crypto crypto: arm/crc32 - accelerated support based on x86 SSE implementation 2016-12-07 20:01:24 +08:00
firmware
include KVM: arm64: Access CNTHCTL_EL2 bit fields correctly on VHE systems 2017-01-13 11:19:25 +00:00
kernel Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:05:56 -08:00
kvm KVM: arm64: Access CNTHCTL_EL2 bit fields correctly on VHE systems 2017-01-13 11:19:25 +00:00
lib Merge branches 'clkdev', 'fixes', 'misc' and 'sa1100-base' into for-linus 2016-12-14 11:13:46 +00:00
mach-alpine
mach-artpec ARM: ARTPEC-6: add select MFD_SYSCON to MACH_ARTPEC6 2016-11-26 00:06:34 +01:00
mach-asm9260
mach-aspeed
mach-at91
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci ARM: davinci: da8xx: Fix sleeping function called from invalid context 2017-01-02 16:15:07 +05:30
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
mach-exynos
mach-footbridge clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: i.MX: remove map_io callback 2017-01-02 14:02:09 +08:00
mach-integrator ARM: SoC platform updates for v4.10 2016-12-15 15:39:02 -08:00
mach-iop13xx Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mach-iop32x
mach-iop33x
mach-ixp4xx clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
mach-keystone
mach-ks8695
mach-lpc18xx
mach-lpc32xx ARM: SoC platform updates for v4.10 2016-12-15 15:39:02 -08:00
mach-mediatek
mach-meson
mach-mmp clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
mach-moxart
mach-mv78xx0
mach-mvebu cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1
mach-omap2 Merge branch 'omap-for-v4.10/legacy' into omap-for-v4.10/fixes 2016-12-27 10:29:24 -08:00
mach-orion5x
mach-oxnas ARM: oxnas: Add OX820 config and makefile entry 2016-11-23 09:53:55 +01:00
mach-picoxcell
mach-prima2
mach-pxa ARM: SoC platform updates for v4.10 2016-12-15 15:39:02 -08:00
mach-qcom
mach-realview
mach-rockchip
mach-rpc Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mach-s3c24xx Samsung mach/soc update for v4.10: 2017-01-04 16:12:17 +01:00
mach-s3c64xx MTD updates for v4.10-rc1: 2016-12-17 16:41:10 -08:00
mach-s5pv210
mach-sa1100 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2016-12-15 16:06:15 -08:00
mach-shmobile ARM: SoC driver updates for v4.10 2016-12-15 16:03:25 -08:00
mach-socfpga
mach-spear
mach-sti
mach-stm32
mach-sunxi
mach-tango
mach-tegra
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900
mach-zx
mach-zynq
mm cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
net
nwfpe
oprofile
plat-iop clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
plat-omap
plat-orion
plat-pxa
plat-samsung virtio, vhost: new device, fixes, speedups 2016-12-15 18:13:41 -08:00
plat-versatile
probes
tools Merge branch 'syscalls' into for-linus 2016-12-14 11:14:00 +00:00
vdso
vfp cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
xen cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
Kconfig Samsung mach/soc update for v4.10: 2017-01-04 16:12:17 +01:00
Kconfig-nommu
Kconfig.debug
Makefile Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2016-12-15 16:06:15 -08:00