linux_dsm_epyc7002/arch/arm
Marc Zyngier ae120d9edf ARM: 7767/1: let the ASID allocator handle suspended animation
When a CPU is running a process, the ASID for that process is
held in a per-CPU variable (the "active ASIDs" array). When
the ASID allocator handles a rollover, it copies the active
ASIDs into a "reserved ASIDs" array to ensure that a process
currently running on another CPU will continue to run unaffected.
The active array is zero-ed to indicate that a rollover occurred.

Because of this mechanism, a reserved ASID is only remembered for
a single rollover. A subsequent rollover will completely refill
the reserved ASIDs array.

In a severely oversubscribed environment where a CPU can be
prevented from running for extended periods of time (think virtual
machines), the above has a horrible side effect:

[P{a} denotes process P running with ASID a]

	CPU-0		CPU-1

	A{x}				[active = <x 0>]

	[suspended]	runs B{y}	[active = <x y>]

					[rollover:
					 active = <0 0>
					 reserved = <x y>]

			runs B{y}	[active = <0 y>
					 reserved = <x y>]

					[rollover:
					 active = <0 0>
					 reserved = <0 y>]

			runs C{x}	[active = <0 x>]

	[resumes]

	runs A{x}

At that stage, both A and C have the same ASID, with deadly
consequences.

The fix is to preserve reserved ASIDs across rollovers if
the CPU doesn't have an active ASID when the rollover occurs.

Cc: <stable@vger.kernel.org> # 3.9
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Carinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:24:54 +01:00
..
boot ARM: 7751/1: zImage: don't overwrite ourself with a page table 2013-06-17 09:27:05 +01:00
common ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
configs Omap fixes for things that were discovered during the merge window: 2013-05-09 13:13:57 -07:00
crypto
include ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork 2013-06-24 15:21:59 +01:00
kernel ARM: 7765/1: perf: Record the user-mode PC in the call chain. 2013-06-24 15:23:29 +01:00
kvm Merge tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-05-05 14:47:31 -07:00
lib ARM: 7685/1: delay: use private ticks_per_jiffy field for timer-based delay ops 2013-04-03 16:45:50 +01:00
mach-at91 ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
mach-bcm ARM: platform specific firmware interfaces for 3.10 2013-05-04 12:33:36 -07:00
mach-bcm2835
mach-clps711x
mach-cns3xxx ARM: arm-soc multiplatform updates for 3.10 2013-05-02 09:38:16 -07:00
mach-davinci ARM: arm-soc device tree changes, part 2 2013-05-07 11:06:17 -07:00
mach-dove arm: mach-dove: convert to use mvebu-mbus driver 2013-04-15 14:06:27 +00:00
mach-ebsa110 ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions 2013-05-23 00:09:44 +01:00
mach-ep93xx
mach-exynos ARM: EXYNOS5: Fix kernel dump in AFTR idle mode 2013-05-09 13:22:22 -07:00
mach-footbridge
mach-gemini ARM: arm-soc cleanup for 3.10 2013-05-02 09:03:55 -07:00
mach-highbank ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
mach-imx ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions 2013-05-23 00:09:44 +01:00
mach-integrator ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
mach-iop13xx ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions 2013-05-23 00:09:44 +01:00
mach-iop32x
mach-iop33x
mach-ixp4xx ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions 2013-05-23 00:09:44 +01:00
mach-kirkwood ARM: arm-soc platform updates for 3.10, part 3 2013-05-07 11:02:18 -07:00
mach-ks8695
mach-lpc32xx
mach-mmp ARM: arm-soc board specific changes for 3.10, part 1 2013-05-04 12:34:30 -07:00
mach-msm ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions 2013-05-23 00:09:44 +01:00
mach-mv78xx0 arm: mach-mv78xx0: convert to use the mvebu-mbus driver 2013-04-15 14:06:39 +00:00
mach-mvebu ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
mach-mxs ARM: arm-soc device tree changes, part 2 2013-05-07 11:06:17 -07:00
mach-netx
mach-nomadik clocksource: nomadik-mtu: fix up clocksource/timer 2013-04-26 17:10:46 -07:00
mach-omap1 ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init() 2013-05-08 16:48:02 -07:00
mach-omap2 ARM: 7758/1: introduce config HAS_BANDGAP 2013-06-17 09:27:08 +01:00
mach-orion5x ARM: arm-soc platform updates for 3.10, part 3 2013-05-07 11:02:18 -07:00
mach-picoxcell
mach-prima2 Merge branch 'late/fixes' into fixes 2013-05-09 13:05:15 -07:00
mach-pxa - Lots of cleanups from Artem, including deletion of some obsolete drivers 2013-05-09 10:15:46 -07:00
mach-realview Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-05-03 09:13:19 -07:00
mach-rpc
mach-s3c24xx ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
mach-s3c64xx For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
mach-s5p64x0 Merge branch 'samsung/exynos-multiplatform' into next/drivers 2013-04-19 16:50:56 +02:00
mach-s5pc100 ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
mach-s5pv210 ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
mach-sa1100 cpufreq: sa11x0: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:24 +02:00
mach-shark arm: Use generic idle loop 2013-04-08 17:39:24 +02:00
mach-shmobile ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
mach-socfpga Merge branch 'gic/cleanup' into next/soc 2013-04-28 15:06:56 -07:00
mach-spear Merge branch 'late/fixes' into fixes 2013-05-09 13:05:15 -07:00
mach-sunxi ARM: sunxi: Rework the restart code 2013-04-08 21:43:08 +02:00
mach-tegra Merge branch 'late/fixes' into fixes 2013-05-09 13:05:15 -07:00
mach-u300 ARM: u300: fix ages old copy/paste bug 2013-04-26 17:07:38 -07:00
mach-ux500 ARM: ux500: Rid ignored return value of regulator_enable() compiler warning 2013-05-09 13:10:10 -07:00
mach-versatile ARM: versatile: use OF init for sp804 timer 2013-04-11 15:11:21 -05:00
mach-vexpress Moves xenvm to mach-virt. 2013-05-07 15:11:43 -07:00
mach-virt Moves xenvm to mach-virt. 2013-05-07 15:11:43 -07:00
mach-vt8500 irqchip: vt8500: Convert arch-vt8500 to new irqchip infrastructure 2013-04-12 22:43:24 -07:00
mach-w90x900 arm: Use generic idle loop 2013-04-08 17:39:24 +02:00
mach-zynq ARM: arm-soc platform updates for 3.10, part 3 2013-05-07 11:02:18 -07:00
mm ARM: 7767/1: let the ASID allocator handle suspended animation 2013-06-24 15:24:54 +01:00
net
nwfpe
oprofile
plat-iop
plat-omap ARM: arm-soc device tree changes, part 2 2013-05-07 11:06:17 -07:00
plat-orion Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
plat-pxa
plat-samsung ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
plat-versatile ARM: 7766/1: versatile: don't mark pen as __INIT 2013-06-24 15:23:56 +01:00
tools
vfp
xen xen/arm: remove duplicated include from enlighten.c 2013-04-27 14:57:17 +00:00
Kconfig ARM: 7758/1: introduce config HAS_BANDGAP 2013-06-17 09:27:08 +01:00
Kconfig-nommu
Kconfig.debug ARM: arm-soc platform updates for 3.10, part 3 2013-05-07 11:02:18 -07:00
Makefile ARM: arm-soc multiplatform updates for 3.10 2013-05-02 09:38:16 -07:00