summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/book3s_hv_ras.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2018-01-21 22:43:43 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-21 22:43:43 +1100
commit5400fc229e6078a6964b15fb98e9a994df3d642a (patch)
treeeaaed61828654237ace607f45b5ba3aa42ce1160 /arch/powerpc/kvm/book3s_hv_ras.c
parent02ef6dd8109b581343ebeb1c4c973513682535d6 (diff)
parent76b03dc07eebe9c8829bc4c40ae357ad04b4b8c1 (diff)
Merge branch 'topic/ppc-kvm' into next
Merge the topic branch we share with kvm-ppc, this brings in two xive commits, one from Paul to rework HMI handling, and a minor cleanup to drop an unused flag.
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv_ras.c')
-rw-r--r--arch/powerpc/kvm/book3s_hv_ras.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_ras.c b/arch/powerpc/kvm/book3s_hv_ras.c
index e61066bb6725..b11043b23c18 100644
--- a/arch/powerpc/kvm/book3s_hv_ras.c
+++ b/arch/powerpc/kvm/book3s_hv_ras.c
@@ -266,17 +266,19 @@ static void kvmppc_tb_resync_done(void)
* secondary threads to proceed.
* - All secondary threads will eventually call opal hmi handler on
* their exit path.
+ *
+ * Returns 1 if the timebase offset should be applied, 0 if not.
*/
long kvmppc_realmode_hmi_handler(void)
{
- int ptid = local_paca->kvm_hstate.ptid;
bool resync_req;
- /* This is only called on primary thread. */
- BUG_ON(ptid != 0);
__this_cpu_inc(irq_stat.hmi_exceptions);
+ if (hmi_handle_debugtrig(NULL) >= 0)
+ return 1;
+
/*
* By now primary thread has already completed guest->host
* partition switch but haven't signaled secondaries yet.