From nobody Thu Nov 6 20:35:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487747177176933.3426861258818; Tue, 21 Feb 2017 23:06:17 -0800 (PST) Received: from localhost ([::1]:50302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgR0A-0008QM-SK for importer@patchew.org; Wed, 22 Feb 2017 02:06:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgQVB-00038C-BN for qemu-devel@nongnu.org; Wed, 22 Feb 2017 01:34:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgQV8-00089x-Jf for qemu-devel@nongnu.org; Wed, 22 Feb 2017 01:34:13 -0500 Received: from ozlabs.org ([103.22.144.67]:43625) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgQV8-00084e-6f; Wed, 22 Feb 2017 01:34:10 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3vSndL4qg7z9sD6; Wed, 22 Feb 2017 17:33:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1487745238; bh=npGaOC2qNlS+KzR6nqoRUfKeiyYWLmeJJN+EFhC/3YA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VeXYUFj1QObdRlrKDhKfl5OURvYZWuagGUD7mM+VgqIgHJ/EyYKKjyMrnTCvcqXKk pi36Lyfpikl/oIoPCo3KYZ2nWl1em65ET2VUnSXvI7LDncAPmVRM/yGHw5zPP0k6dv sLHvZwwU3BdJyJuLr4ZzTqnWuvaLTi2uQAwUVUws= From: David Gibson To: peter.maydell@linaro.org Date: Wed, 22 Feb 2017 17:33:35 +1100 Message-Id: <20170222063348.32176-31-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170222063348.32176-1-david@gibson.dropbear.id.au> References: <20170222063348.32176-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 30/43] 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: lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org, Suraj Jitindar Singh , imammedo@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Suraj Jitindar Singh 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 Signed-off-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 c09255d..76669ed 100644 --- a/target/ppc/mmu-hash64.c +++ b/target/ppc/mmu-hash64.c @@ -652,7 +652,15 @@ static void ppc_hash64_set_isi(CPUState *cs, CPUPPCSta= te *env, if (msr_ir) { vpm =3D !!(env->spr[SPR_LPCR] & LPCR_VPM1); } else { - vpm =3D !!(env->spr[SPR_LPCR] & LPCR_VPM0); + switch (env->mmu_model) { + case POWERPC_MMU_3_00: + /* Field deprecated in ISAv3.00 - interrupts always go to hype= rv */ + vpm =3D true; + break; + default: + vpm =3D !!(env->spr[SPR_LPCR] & LPCR_VPM0); + break; + } } if (vpm && !msr_hv) { cs->exception_index =3D POWERPC_EXCP_HISI; @@ -670,7 +678,15 @@ static void ppc_hash64_set_dsi(CPUState *cs, CPUPPCSta= te *env, uint64_t dar, if (msr_dr) { vpm =3D !!(env->spr[SPR_LPCR] & LPCR_VPM1); } else { - vpm =3D !!(env->spr[SPR_LPCR] & LPCR_VPM0); + switch (env->mmu_model) { + case POWERPC_MMU_3_00: + /* Field deprecated in ISAv3.00 - interrupts always go to hype= rv */ + vpm =3D true; + break; + default: + vpm =3D !!(env->spr[SPR_LPCR] & LPCR_VPM0); + break; + } } if (vpm && !msr_hv) { cs->exception_index =3D POWERPC_EXCP_HDSI; --=20 2.9.3