From patchwork Fri Feb 10 05:25:54 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: 9566001 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 54BEA601EA for ; Fri, 10 Feb 2017 05:27:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4315928537 for ; Fri, 10 Feb 2017 05:27:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37E902853D; Fri, 10 Feb 2017 05:27:09 +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 DC3B128537 for ; Fri, 10 Feb 2017 05:27:08 +0000 (UTC) Received: from localhost ([::1]:41894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cc3jf-0006IH-PM for patchwork-qemu-devel@patchwork.kernel.org; Fri, 10 Feb 2017 00:27:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cc3j5-0006DV-1A for qemu-devel@nongnu.org; Fri, 10 Feb 2017 00:26:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cc3j4-0001ZD-5Z for qemu-devel@nongnu.org; Fri, 10 Feb 2017 00:26:31 -0500 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:32825) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cc3j2-0001Xa-5y; Fri, 10 Feb 2017 00:26:28 -0500 Received: by mail-pg0-x241.google.com with SMTP id 194so2208413pgd.0; Thu, 09 Feb 2017 21:26:28 -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=+FgwE+zW7NOf3GKKlR3f4TtJtf7N8IbzIyHtDhimvNE=; b=qjLKdyaaclHiJDR/UbBebvD7NIoIkd2/Qb/hWkdWk5vU7wyh5rGG5pFbpmQDl71Xoy bqvHU6+o2w8s9KE9LIEoKP8BwtKuST1zNFEAhup/hDNtPCaFjDKCpkLrsdmEbWsv8Dlp ORDBxmxs4a0+c8ZlKQAyAELi8iESvuQR40W7wtD6+x3FOTiBPI/5vjQcVzWKBI85bQJQ 4BYw5CkOFxs4tkCMqyuKIVepbfbOTcEkp2J9X7jS5fULmXe5cWzsj2tN4eSv0MPw32wJ DiJNlnfnfqn7G+7Px0c22rXVjAjBoyFywB4JRhQrmu6crXkla1G3VEjGWzqYGbFH/mjD EhhQ== 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=+FgwE+zW7NOf3GKKlR3f4TtJtf7N8IbzIyHtDhimvNE=; b=cU5MQyxUW7POodLX1r7ox7h1XFOvMjgHKLBtY27UVJ/pUwozVrfND/KOhZVlTk3EVt 2kZSGRHLFv0d+Ja9vwDkyV7036nUvkAda5XMk7GOVTshd5ekiOQ7C+1m/MIb7+TZ84l/ zJGtM30hBIZVLwOl1uOZ/0VKSvGZGTDnLCFuOagpvb/rr4GXHgI0Xcr5yNAlnd8VDHPm CswaadyGdjtCsAqrtgHVyH8SebweqkIwscR9djHmTHIqCqgrIIioHBstE9uygXp/ipN8 XfhyJh0jcmJCQT8mHpgKWmrzWfFjfDWl77l/Uj2M/d/86SzuSpZ04YXi7eFJ+H+b/Ulr Vtjw== X-Gm-Message-State: AMke39kjLBxEk34d8BKvuvlgFpgiwklaN/xko6j1a8fyHOkNyBLLVp7unmjeed9W7yb0qw== X-Received: by 10.84.176.131 with SMTP id v3mr9123576plb.20.1486704387377; Thu, 09 Feb 2017 21:26:27 -0800 (PST) Received: from surajjs.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id r78sm1308298pfl.63.2017.02.09.21.26.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Feb 2017 21:26:26 -0800 (PST) From: Suraj Jitindar Singh To: qemu-ppc@nongnu.org Date: Fri, 10 Feb 2017 16:25:54 +1100 Message-Id: <1486704360-27361-5-git-send-email-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1486704360-27361-1-git-send-email-sjitindarsingh@gmail.com> References: <1486704360-27361-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::241 Subject: [Qemu-devel] [QEMU-PPC] [PATCH V2 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, Suraj Jitindar Singh , 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 --- 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;