From patchwork Thu Apr 11 18:44:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Yoder X-Patchwork-Id: 235871 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id D425A2C01CC for ; Fri, 12 Apr 2013 04:45:19 +1000 (EST) Received: from mail-da0-x231.google.com (mail-da0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 2C0FD2C00C2 for ; Fri, 12 Apr 2013 04:44:51 +1000 (EST) Received: by mail-da0-f49.google.com with SMTP id t11so787771daj.8 for ; Thu, 11 Apr 2013 11:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=HLmDZVtMzlpyPPRkdUUpg78bnUfEuPZPcjl+q2jT54E=; b=eSuvoigbmVfKpAaK9987reYymTS224wSNnVJjyTZh2l8Azka8jWXG74TIk42NvhhpE VQNKt6Ys2u4wJdqE2g2l+W0p4H1k6elec5GHtATzIIwJ4F3aqYgQeMDTDv9IhalFpvlW efIeCkkAkYcJdJZKN0fngJaYAs2BWGa6K89UMnXye0wn6SPez4xdsAGQiPZ/pU5PnEU4 dD1eVI3DJZfZLb84Gk7fm29f2aVpyDHOkGrFpEysLS0CXXS21flPluo1Lwgee1i0atM6 jaWhL3d4wxBcJ6Y0Otn/uJKCWiru3VY4VvCb9Y21wKiynsM4je23JMUk0g9g+Py+fNE6 mWpw== MIME-Version: 1.0 X-Received: by 10.66.120.49 with SMTP id kz17mr11301955pab.133.1365705889725; Thu, 11 Apr 2013 11:44:49 -0700 (PDT) Received: by 10.66.191.2 with HTTP; Thu, 11 Apr 2013 11:44:49 -0700 (PDT) In-Reply-To: References: <1363801557-27436-1-git-send-email-Bharat.Bhushan@freescale.com> <436085E0-D605-40C1-BCDF-EB4D24B01AFA@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D06FC04D4@039-SN2MPN1-013.039d.mgd.msft.net> <6A3DF150A5B70D4F9B66A25E3F7C888D06FC1773@039-SN2MPN1-013.039d.mgd.msft.net> <5A04ECFC-E828-4EBF-895B-043FC038ABB5@kernel.crashing.org> Date: Thu, 11 Apr 2013 13:44:49 -0500 Message-ID: Subject: Re: [PATCH] bookehv: Handle debug exception on guest exit From: Stuart Yoder To: Kumar Gala Cc: Wood Scott-B07421 , KVM list , Alexander Graf , kvm-ppc , Yoder Stuart-B08248 , Bhushan Bharat-R65777 , linuxppc list X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" So the patch should look something like this (on a 3.8 kernel): diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index 5f051ee..92b675a 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h @@ -286,13 +286,13 @@ label: andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \ beq+ 2f; \ \ - lis r10,KERNELBASE@h; /* check if exception in vectors */ \ - ori r10,r10,KERNELBASE@l; \ + lis r10,interrupt_base@h; /* check if exception in vectors */ \ + ori r10,r10,interrupt_base@l; cmplw r12,r10; \ blt+ 2f; /* addr below exception vectors */ \ \ - lis r10,DebugDebug@h; \ - ori r10,r10,DebugDebug@l; \ + lis r10,interrupt_end@h; \ + ori r10,r10,interrupt_end@l; cmplw r12,r10; \ bgt+ 2f; /* addr above exception vectors */ \ \ @@ -339,13 +339,13 @@ label: andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \ beq+ 2f; \ \ - lis r10,KERNELBASE@h; /* check if exception in vectors */ \ - ori r10,r10,KERNELBASE@l; \ + lis r10,interrupt_base@h; /* check if exception in vectors */ \ + ori r10,r10,interrupt_base@l; cmplw r12,r10; \ blt+ 2f; /* addr below exception vectors */ \ \ - lis r10,DebugCrit@h; \ - ori r10,r10,DebugCrit@l; \ + lis r10,interrupt_end@h; \ + ori r10,r10,interrupt_end@l; cmplw r12,r10; \ bgt+ 2f; /* addr above exception vectors */ \ \ diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 7a2e5e4..97e2671 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S @@ -769,6 +769,8 @@ finish_tlb_load_47x: */ DEBUG_CRIT_EXCEPTION +interrupt_end: + /* * Global functions */ diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl index 58925b6..2c3e31d 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S @@ -605,6 +605,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) /* Embedded Hypervisor Privilege */ EXCEPTION(0, HV_PRIV, Ehvpriv, unknown_exception, EXC_XFER_EE) +interrupt_end: + /* * Local functions */