From patchwork Fri Jan 13 06:28:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jitindar Singh X-Patchwork-Id: 9514647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 79016601E5 for ; Fri, 13 Jan 2017 06:34:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72C91284F9 for ; Fri, 13 Jan 2017 06:34:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6776C28723; Fri, 13 Jan 2017 06:34:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1C3D7284F9 for ; Fri, 13 Jan 2017 06:34:40 +0000 (UTC) Received: from localhost ([::1]:39301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRvRf-00033S-5q for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 Jan 2017 01:34:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRvM5-00064F-Hb for qemu-devel@nongnu.org; Fri, 13 Jan 2017 01:28:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRvM4-0001xU-Ml for qemu-devel@nongnu.org; Fri, 13 Jan 2017 01:28:53 -0500 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:35517) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRvM2-0001wQ-P7; Fri, 13 Jan 2017 01:28:50 -0500 Received: by mail-pf0-x242.google.com with SMTP id f144so6904231pfa.2; Thu, 12 Jan 2017 22:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MVW9JvZpeRslHN04ZdeW9tWu0MHzERwAQmdKDp9B23U=; b=KyaGhnZxJXtnH02R5IEspyn3L2v8nuMbbNabHI2y51RePBPM/9JhmuVS17xVvNvWi5 b5HFPkB0XbCiGOdVtBtrMaa3wGxij3Q4KL3VXEb3mqPXVhvW5WpnD3oCWhH3fQ3Z0Iol wzrzOLRYT/wbpjn7FzKPubX6/ELdVQoN1KgPF+iDbI/3n0Lbwx4GeeLDMDGmtzsOsPwE BxmIzifc/paeBCqWdZkxM+NFTP1bC36QR9nLyfH13IaXrqwWxCJmYbhDo5x/IHXtfQAd JneQHlyey5AbP94LWDOA5T8OFF3Ek3GPf5RffsZoVeM843azytsntMjEjBfCQAYFU0dY WgYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MVW9JvZpeRslHN04ZdeW9tWu0MHzERwAQmdKDp9B23U=; b=jJyJOXSx2RBYIy2XmK5yvziqxaT6pfHKKDeZtzO2qVy7FIk7jPnnmor5HtNHYKI0U9 50eTqVagk6PwVVnYdgaXz3QO96cenyiJ2C/usMLov2sQFOjQdp8QJa2pQ2UdQoJPAVih WGmnGp/p9Jp5xf3s504UZ2RMS9uc3RhWe0hsWNsiYulmIsgy2lG6pcsZSYhfNIj5Fole 1zb80HXNLEUQO1k0+s3xo0wKwrebQwzoF+Jmpr9y1VOixlTqiZrh40lanx5FjSzink+1 1pZtdXfJVc8hp1bh2O87NRbpqWpTNJO1iFSXOecjQfGgztPy/ZLTNo/saP+yyZYgo6sn LtuA== X-Gm-Message-State: AIkVDXK3QQuwO0aLyQrn0WUZE694ELjuLU07mrJLl1fUMe5mLt6dgMLTuG+yvhjQlU94/g== X-Received: by 10.84.200.39 with SMTP id s36mr26924177pld.77.1484288930029; Thu, 12 Jan 2017 22:28:50 -0800 (PST) Received: from dyn253.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id r2sm26004999pfi.67.2017.01.12.22.28.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 22:28:49 -0800 (PST) From: Suraj Jitindar Singh To: qemu-ppc@nongnu.org Date: Fri, 13 Jan 2017 17:28:12 +1100 Message-Id: <1484288903-18807-7-git-send-email-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1484288903-18807-1-git-send-email-sjitindarsingh@gmail.com> References: <1484288903-18807-1-git-send-email-sjitindarsingh@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [RFC PATCH 06/17] target/ppc/POWER9: Direct all instr and data storage interrupts to the hypv X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, agraf@suse.de, Suraj Jitindar Singh , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The vpm0 bit was removed from the LPCR in POWER9, this bit controlled whether ISI and DSI interrupts were directed to the hypervisor or the partition. These interrupts now go to the hypervisor irrespective, thus it is no longer necessary to check the vmp0 bit in the LPCR. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Gibson --- target/ppc/mmu-hash64.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/target/ppc/mmu-hash64.c b/target/ppc/mmu-hash64.c index 3a2acb8..fe7da18 100644 --- a/target/ppc/mmu-hash64.c +++ b/target/ppc/mmu-hash64.c @@ -640,7 +640,15 @@ static void ppc_hash64_set_isi(CPUState *cs, CPUPPCState *env, if (msr_ir) { vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM1); } else { - vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM0); + switch (env->mmu_model) { + case POWERPC_MMU_3_00: + /* Field deprecated in ISAv3.00 - interrupts always go to hyperv */ + vpm = true; + break; + default: + vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM0); + break; + } } if (vpm && !msr_hv) { cs->exception_index = POWERPC_EXCP_HISI; @@ -658,7 +666,15 @@ static void ppc_hash64_set_dsi(CPUState *cs, CPUPPCState *env, uint64_t dar, if (msr_dr) { vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM1); } else { - vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM0); + switch (env->mmu_model) { + case POWERPC_MMU_3_00: + /* Field deprecated in ISAv3.00 - interrupts always go to hyperv */ + vpm = true; + break; + default: + vpm = !!(env->spr[SPR_LPCR] & LPCR_VPM0); + break; + } } if (vpm && !msr_hv) { cs->exception_index = POWERPC_EXCP_HDSI;