diff options
author | Sam bobroff <sam.bobroff@au1.ibm.com> | 2014-05-21 02:32:38 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-05-27 23:35:40 -0400 |
commit | 1739ea9e13e636590dd56c2f4ca85e783da512e7 (patch) | |
tree | fcdebf258849e18544f05cdabcf176837c0b3778 /arch/powerpc/kvm | |
parent | 39a360ef7234942333436709fd6cf641d5c51b7b (diff) |
powerpc: Fix regression of per-CPU DSCR setting
Since commit "efcac65 powerpc: Per process DSCR + some fixes (try#4)"
it is no longer possible to set the DSCR on a per-CPU basis.
The old behaviour was to minipulate the DSCR SPR directly but this is no
longer sufficient: the value is quickly overwritten by context switching.
This patch stores the per-CPU DSCR value in a kernel variable rather than
directly in the SPR and it is used whenever a process has not set the DSCR
itself. The sysfs interface (/sys/devices/system/cpu/cpuN/dscr) is unchanged.
Writes to the old global default (/sys/devices/system/cpu/dscr_default)
now set all of the per-CPU values and reads return the last written value.
The new per-CPU default is added to the paca_struct and is used everywhere
outside of sysfs.c instead of the old global default.
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 9f0ad718e476..12f4ce5b4f78 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -286,8 +286,7 @@ kvm_start_guest: | |||
286 | beq kvm_no_guest | 286 | beq kvm_no_guest |
287 | 287 | ||
288 | /* Set HSTATE_DSCR(r13) to something sensible */ | 288 | /* Set HSTATE_DSCR(r13) to something sensible */ |
289 | LOAD_REG_ADDR(r6, dscr_default) | 289 | ld r6, PACA_DSCR(r13) |
290 | ld r6, 0(r6) | ||
291 | std r6, HSTATE_DSCR(r13) | 290 | std r6, HSTATE_DSCR(r13) |
292 | 291 | ||
293 | bl kvmppc_hv_entry | 292 | bl kvmppc_hv_entry |