linux_dsm_epyc7002/arch/arm
Dongjiu Geng fd6c8c206f arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort
When a exception is trapped to EL2, hardware uses  ELR_ELx to hold
the current fault instruction address. If KVM wants to inject a
abort to 32 bit guest, it needs to set the LR register for the
guest to emulate this abort happened in the guest. Because ARM32
architecture is pipelined execution, so the LR value has an offset to
the fault instruction address.

The offsets applied to Link value for exceptions as shown below,
which should be added for the ARM32 link register(LR).

Table taken from ARMv8 ARM DDI0487B-B, table G1-10:
Exception			Offset, for PE state of:
				A32 	  T32
Undefined Instruction 		+4 	  +2
Prefetch Abort 			+4 	  +4
Data Abort 			+8 	  +8
IRQ or FIQ 			+4 	  +4

  [ Removed unused variables in inject_abt to avoid compile warnings.
    -- Christoffer ]

Cc: <stable@vger.kernel.org>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Tested-by: Haibin Zhang <zhanghaibin7@huawei.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
2017-10-21 17:03:15 +02:00
..
boot STM32 fixes for v4.14: 2017-10-04 10:31:00 -07:00
common arm: implement ->dma_supported instead of ->set_dma_mask 2017-06-28 06:54:49 -07:00
configs ARM: defconfig: update Gemini defconfig 2017-10-03 18:08:05 -07:00
crypto crypto: arm/aes - avoid expanded lookup tables in the final round 2017-08-04 09:27:25 +08:00
firmware
include Revert "arm/syscalls: Check address limit on user-mode return" 2017-09-17 19:45:33 +02:00
kernel arm/syscalls: Optimize address limit check 2017-09-17 19:45:33 +02:00
kvm arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort 2017-10-21 17:03:15 +02:00
lib ARM: implement memset32 & memset64 2017-09-08 18:26:48 -07:00
mach-actions ARM: owl: smp: Drop bogus holding pen 2017-07-03 14:31:47 +02:00
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed clocksource/drivers/fttmr010: Merge Moxa into FTTMR010 2017-06-12 10:45:10 +02:00
mach-at91 ARM: at91: Replace uses of virt_to_phys with __pa_symbol 2017-09-18 10:05:38 +02:00
mach-axxia
mach-bcm ARM: SoC platform updates 2017-07-04 14:34:51 -07:00
mach-berlin
mach-clps711x clocksource/drivers: Rename CLKSRC_OF to TIMER_OF 2017-06-14 12:01:03 +02:00
mach-cns3xxx ARM: remove duplicate 'const' annotations' 2017-05-19 10:12:55 +02:00
mach-davinci This pull request contains the following core changes: 2017-09-01 15:34:30 +02:00
mach-digicolor
mach-dove mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
mach-ebsa110
mach-efm32
mach-ep93xx ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
mach-exynos Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
mach-footbridge
mach-gemini ARM: gemini: select pin controller 2017-08-05 23:48:29 +02:00
mach-highbank
mach-hisi ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
mach-imx dma-mapping updates for 4.14: 2017-09-12 13:30:06 -07:00
mach-integrator
mach-iop13xx ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge() 2017-06-28 15:13:55 -05:00
mach-iop32x
mach-iop33x
mach-ixp4xx This pull request contains the following core changes: 2017-09-01 15:34:30 +02:00
mach-keystone
mach-ks8695
mach-lpc18xx
mach-lpc32xx ARM/dmaengine: pl08x: pass reasonable memcpy settings 2017-05-24 09:44:32 +05:30
mach-mediatek ARM: mediatek: add MT7623a smp bringup code 2017-07-31 13:31:48 +02:00
mach-meson arm: meson: select the clock controller for Meson8 2017-06-09 11:15:36 -07:00
mach-mmp This pull request contains the following core changes: 2017-09-01 15:34:30 +02:00
mach-moxart clocksource/drivers/fttmr010: Merge Moxa into FTTMR010 2017-06-12 10:45:10 +02:00
mach-mv78xx0 ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge() 2017-06-28 15:13:55 -05:00
mach-mvebu Merge branch 'next/cleanup' into next/soc 2017-09-05 20:29:46 -07:00
mach-mxs ARM: mxs: add support for I2SE Duckbill 2 boards 2017-04-10 21:25:50 +08:00
mach-netx
mach-nomadik
mach-nspire
mach-omap1 MTD changes for 4.14: 2017-09-09 14:48:21 -07:00
mach-omap2 ARM: OMAP2+: hsmmc: fix logic to call either omap_hsmmc_init or omap_hsmmc_late_init but not both 2017-09-19 10:59:26 -07:00
mach-orion5x mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
mach-oxnas
mach-picoxcell
mach-prima2 ARM: sirf: mark sirfsoc_init_late as __maybe_unused 2017-07-27 22:57:44 +02:00
mach-pxa Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
mach-qcom
mach-realview
mach-rockchip Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
mach-rpc ARM: rpc: rename RAM_SIZE macro 2017-07-27 22:57:38 +02:00
mach-s3c24xx ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
mach-s3c64xx dmaengine updates for 4.13-rc1 2017-07-08 12:36:50 -07:00
mach-s5pv210
mach-sa1100 ARM: sa1100: normalize clk API 2017-07-27 13:15:50 +02:00
mach-shmobile Merge branch 'next/cleanup' into next/soc 2017-09-05 20:29:46 -07:00
mach-socfpga
mach-spear dmaengine updates for 4.13-rc1 2017-07-08 12:36:50 -07:00
mach-sti
mach-stm32 ARM: stm32: Introduce MACH_STM32F469 flag 2017-06-18 20:10:27 -07:00
mach-sunxi clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
mach-tango
mach-tegra ARM: SoC driver updates for v4.14 2017-09-10 20:40:00 -07:00
mach-u300 clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
mach-uniphier
mach-ux500 ARM: ux500: don't select CPUFREQ_DT 2017-08-25 01:34:45 +02:00
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900 ARM: w90x900: normalize clk API 2017-07-27 22:57:36 +02:00
mach-zx
mach-zynq clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
mm Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
net arm: eBPF JIT compiler 2017-08-22 09:26:43 -07:00
nwfpe
oprofile
plat-iop
plat-omap
plat-orion
plat-pxa
plat-samsung ARM: s3c24xx: Remove non-existing CONFIG_CPU_S3C2413 2017-07-20 07:17:43 +02:00
plat-versatile ARM: plat-versatile: remove stale clock header 2017-04-07 11:57:57 +02:00
probes arm: Prevent hotplug rwsem recursion 2017-05-26 10:10:46 +02:00
tools
vdso
vfp
xen This is the first pull request for the new dma-mapping subsystem 2017-07-06 19:20:54 -07:00
Kconfig Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
Kconfig-nommu
Kconfig.debug Updates to for omap debug_ll code to use generic DEBUG_UART_8250 code. 2017-08-16 22:36:10 +02:00
Makefile ARM: Prepare Actions Semi S500 2017-06-21 18:08:41 +02:00