From patchwork Thu Nov 10 04:37:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Education Directorate X-Patchwork-Id: 9420601 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 ABBE76048E for ; Thu, 10 Nov 2016 04:38:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CECC2939E for ; Thu, 10 Nov 2016 04:38:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CCA62949A; Thu, 10 Nov 2016 04:38:21 +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 EF0442939E for ; Thu, 10 Nov 2016 04:38:20 +0000 (UTC) Received: from localhost ([::1]:43876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4h7y-00026l-KN for patchwork-qemu-devel@patchwork.kernel.org; Wed, 09 Nov 2016 23:38:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4h7a-00025Y-Be for qemu-devel@nongnu.org; Wed, 09 Nov 2016 23:37:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4h7W-0000Ax-6T for qemu-devel@nongnu.org; Wed, 09 Nov 2016 23:37:54 -0500 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:34005) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4h7V-0000Ac-Sc; Wed, 09 Nov 2016 23:37:50 -0500 Received: by mail-pf0-x243.google.com with SMTP id y68so2634373pfb.1; Wed, 09 Nov 2016 20:37:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=PrqxoGDQW4UDS5Cqs95MxcGoy2jec2THk6ywkFfM8+0=; b=ZjJMZ3xydoSy6jYT2RlOoWklyNW38AmyI/OPOoxI4ndFz/x4+vI/ZFfrvv4SUGYsLx nXolXk0+PFkAKhYGD1UNu3h1e7Bp27Jfjf2pvS86umTNpcSaK274HOHyXgZQgxKQGvxE Mm1NWQMquYBO9qADHuJ0ewWfzprNK7q4apkagU3bGRfDo7b0tuvxNFs2X354DtEwNuN3 ZwMOPxgwZ1ErZpfqfQcFJde9MvzAqE5979kxlypJXPbyVQbWigNb9uLJ9oe3Ay1HLGlq KvlieBjb4L1sQIMcFWj+gSTMvZKwexKUz/7IbplQzzXEgKWlPF8zCUIpblqbq4YNEMFs bCpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=PrqxoGDQW4UDS5Cqs95MxcGoy2jec2THk6ywkFfM8+0=; b=VqnwoGgKAlgFB/mvDlDjeMYjWynbAhurazr5CdMkfizJQuh63tghWKEQPtf9mcilT7 aKGohVS+xDU7lSelMGoswmVp3iFHpE46T5gVx/1ur6C/voBo92UwEeYehEmhsPBNrlE3 nfof5Zv/LAjPvFQmHSaY21o4796JcCo+NstuTJwaox8ozgzNUmdRh0aXadK1cLXjGtRJ p8hmNL31WuuPQoNqZoRNu0n0cKZmpSzJVpP8gq52P0nrD+wOhk4pSm7leiwC1nPS7H67 tW1oW6MNnhV4xpA5HZFqGghPrWug0F/Z/VoPrKiOlmdoUEbf+5JW6dKGO/VlXaNdQeIb vMuA== X-Gm-Message-State: ABUngvcFmyWZSJKA9SnRBNWCjngcUnFmduWz0AT82UezAwBKTzd4xmCuiPSPmoA+C+r62w== X-Received: by 10.98.207.195 with SMTP id b186mr6175490pfg.40.1478752668111; Wed, 09 Nov 2016 20:37:48 -0800 (PST) Received: from [192.168.31.21] (14-202-194-140.static.tpgi.com.au. [14.202.194.140]) by smtp.gmail.com with ESMTPSA id tm1sm2864574pab.18.2016.11.09.20.37.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2016 20:37:47 -0800 (PST) To: David Gibson References: <20161110020617.GE18060@umbus.fritz.box> <20161110024654.GF18060@umbus.fritz.box> From: Balbir Singh Message-ID: Date: Thu, 10 Nov 2016 15:37:31 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::243 Subject: [Qemu-devel] [PATCH v2] FU exceptions should carry a cause (IC) 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-ppc@nongnu.org, Cedric Le Goater , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP As per the ISA we need a cause and executing a tabort r9 in libc for example causes a EXCP_FU exception, we don't wire up the IC (cause) when we post the exception. The cause is required for the kernel to do the right thing. The fix applies only to 64 bit ppc targets. Signed-off-by: Balbir singh --- Changelog v2: Make the code 64 bit specific target-ppc/excp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c index 808760b..93369d4 100644 --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -427,6 +427,9 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp) case POWERPC_EXCP_VPU: /* Vector unavailable exception */ case POWERPC_EXCP_VSXU: /* VSX unavailable exception */ case POWERPC_EXCP_FU: /* Facility unavailable exception */ +#ifdef TARGET_PPC64 + env->spr[SPR_FSCR] |= ((target_ulong)env->error_code << 56); +#endif break; case POWERPC_EXCP_PIT: /* Programmable interval timer interrupt */ LOG_EXCP("PIT exception\n");