From patchwork Thu May 21 08:27:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gautham R Shenoy X-Patchwork-Id: 474874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3626E14027F for ; Thu, 21 May 2015 18:27:34 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753643AbbEUI1d (ORCPT ); Thu, 21 May 2015 04:27:33 -0400 Received: from e18.ny.us.ibm.com ([129.33.205.208]:55677 "EHLO e18.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751856AbbEUI1b (ORCPT ); Thu, 21 May 2015 04:27:31 -0400 Received: from /spool/local by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 May 2015 04:27:30 -0400 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 21 May 2015 04:27:28 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id E2517C90045; Thu, 21 May 2015 04:18:34 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t4L8RRdd58982446; Thu, 21 May 2015 08:27:27 GMT Received: from d01av02.pok.ibm.com (localhost [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t4L8RQA0015359; Thu, 21 May 2015 04:27:27 -0400 Received: from sofia.in.ibm.com (sofia.in.ibm.com [9.124.35.53]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t4L8RP60015332; Thu, 21 May 2015 04:27:26 -0400 Received: from sofia.in.ibm.com (localhost.localdomain [127.0.0.1]) by sofia.in.ibm.com (Postfix) with ESMTP id 5CB7BA1B81; Thu, 21 May 2015 13:57:24 +0530 (IST) Received: (from ego@localhost) by sofia.in.ibm.com (8.14.8/8.14.8/Submit) id t4L8RMw5021865; Thu, 21 May 2015 13:57:22 +0530 From: "Gautham R. Shenoy" To: Paul Mackerras , Benjamin Herrenschmidt , Michael Ellerman Cc: linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "Aneesh Kumar K.V" , "Gautham R. Shenoy" Subject: [PATCH] book3s_hv_rmhandlers:Pass the correct trap argument to kvmhv_commence_exit Date: Thu, 21 May 2015 13:57:04 +0530 Message-Id: <1432196824-21791-1-git-send-email-ego@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.3 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15052108-0045-0000-0000-0000003C689A Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org In guest_exit_cont we call kvmhv_commence_exit which expects the trap number as the argument. However r3 doesn't contain the trap number at this point and as a result we would be calling the function with a spurious trap number. Fix this by copying r12 into r3 before calling kvmhv_commence_exit as r12 contains the trap number Signed-off-by: Gautham R. Shenoy Reviewed-by: Sam Bobroff --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 4d70df2..f0d7c54 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S @@ -1170,6 +1170,7 @@ mc_cont: bl kvmhv_accumulate_time #endif + mr r3, r12 /* Increment exit count, poke other threads to exit */ bl kvmhv_commence_exit nop