]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Save/restore host values of debug registers
authorPaul Mackerras <paulus@ozlabs.org>
Fri, 16 Jun 2017 01:53:19 +0000 (11:53 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 16 Jun 2017 01:53:19 +0000 (11:53 +1000)
commit2b8305dac433684203fda5619f7fb4487e24a15e
tree57d9601da32fad630e02997ef656bc21d2733eed
parent8feb0164c03675cfa6f52b7bd0135d170c7e87e3
KVM: PPC: Book3S HV: Save/restore host values of debug registers

At present, HV KVM on POWER8 and POWER9 machines loses any instruction
or data breakpoint set in the host whenever a guest is run.
Instruction breakpoints are currently only used by xmon, but ptrace
and the perf_event subsystem can set data breakpoints as well as xmon.

To fix this, we save the host values of the debug registers (CIABR,
DAWR and DAWRX) before entering the guest and restore them on exit.
To provide space to save them in the stack frame, we expand the stack
frame allocated by kvmppc_hv_entry() from 112 to 144 bytes.

Fixes: b92cb2bde0df ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs", 2014-01-08)
Cc: stable@vger.kernel.org # v3.14+
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv_rmhandlers.S