From patchwork Mon Feb 20 04:04:32 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: 9581965 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 3756A604A0 for ; Mon, 20 Feb 2017 04:05:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29B2F28854 for ; Mon, 20 Feb 2017 04:05:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E07E28857; Mon, 20 Feb 2017 04:05:59 +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 76FCE28854 for ; Mon, 20 Feb 2017 04:05:58 +0000 (UTC) Received: from localhost ([::1]:35966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cffEb-0000gD-EV for patchwork-qemu-devel@patchwork.kernel.org; Sun, 19 Feb 2017 23:05:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cffDj-0000B9-N3 for qemu-devel@nongnu.org; Sun, 19 Feb 2017 23:05:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cffDi-0002aH-Uq for qemu-devel@nongnu.org; Sun, 19 Feb 2017 23:05:03 -0500 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:33657) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cffDg-0002YZ-Du; Sun, 19 Feb 2017 23:05:00 -0500 Received: by mail-pg0-x244.google.com with SMTP id 5so11171737pgj.0; Sun, 19 Feb 2017 20:05:00 -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=8cooe1vqqsPv+Iza7ftVFZz052HDSQzdmByX/jkrcRs=; b=lS4kZ2cNtoQGwCT6GsGQo36J+8a+hgNrAJHscgDTkdoaiP6T8vg8ZgGoe9cknAlNbk sR2zM0oFfuzilCAW459ve/hYIC1r3xX8FfRX0hIRIDv/cHuUXWMz7wNluoDojmbSGVyx uRDh+/xIoVZTw25ve3G/KTWNdQ8v8/IsfIOzq1L+Nfw11argZfAki7r6u/Vbn9yN6R5w ds1YscDX5CWsOD7zSnWI1yMfDSMzBHDBwCf71n5p0a6iOWpSnVSHf/w3pxUpR+GKnY// VY17OVQsmOPBCIa0akJ4jIXOieLIYkXuYJ8bP8Kpu4qe3ei6OgPfi7nHczLFIoFSyT2A OBvw== 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=8cooe1vqqsPv+Iza7ftVFZz052HDSQzdmByX/jkrcRs=; b=gjFQVfpoo5CdGwOLXE/Ah+UvOFdP23br7ddpFzOPzw1588zCvW9MqniqliOknwFxTR HwuX3cpEwK7fXCc+KiNV5zgDv9jE/dWbzp7iz1HxzQnwgbdE+6+pKNy/5qby6B3WKaXQ IaSRu8baNqKHY7mryDe/VIbxJxCYr2eQ43Vx8aFKwF/pu5ZeNXNoOUVCfXgQ9tsfR4so Dy9jyzOjLqOeyvOk+6A/O+aLthwQfbckdUUcQ+lI13UqqX8xwyra7RAV0/lUUq9sBfTB A50wQNacfIoNgDfAwRLjiF1UvNMFQMzRuPhui5T8NQrPnjRqy7ZPVb12hM2pOQvLVESC Zkhw== X-Gm-Message-State: AMke39ntWQJcOGLY6/+9N1MEHEDT1FLGWEvMjpbu6MAlmKsNy+OjNtSuRXLv8P+FriFbmQ== X-Received: by 10.98.7.11 with SMTP id b11mr23389526pfd.154.1487563499607; Sun, 19 Feb 2017 20:04:59 -0800 (PST) Received: from surajjs.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id d78sm31622707pfb.43.2017.02.19.20.04.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Feb 2017 20:04:59 -0800 (PST) From: Suraj Jitindar Singh To: qemu-ppc@nongnu.org Date: Mon, 20 Feb 2017 15:04:32 +1100 Message-Id: <1487563478-22265-5-git-send-email-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1487563478-22265-1-git-send-email-sjitindarsingh@gmail.com> References: <1487563478-22265-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:c05::244 Subject: [Qemu-devel] [QEMU-PPC] [PATCH V3 04/10] 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, sjitindarsingh@gmail.com, agraf@suse.de, sam.bobroff@au1.ibm.com, 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 Acked-by: Balbir Singh --- 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 24d9901..7c5d589 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;