From patchwork Wed Sep 20 00:45:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 113073 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp138134qgf; Tue, 19 Sep 2017 17:47:23 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC6oDCB5t9TUZDPw4W9PPRFY1gSUpslKdWoRVzcThF3mUtSGhE5HPiASVMF2SdGst1OWxUx X-Received: by 10.55.102.73 with SMTP id a70mr4407381qkc.345.1505868442963; Tue, 19 Sep 2017 17:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505868442; cv=none; d=google.com; s=arc-20160816; b=g4a4KfT+sJC94M5DvzkoY5g4FxX2ZMiqEHL8SzIO2X5VIY1d2L0kzGMnv18PSvIkAB SG+fEHzMRwxa5Sl/9FUOH3JdzPJedxupvgbgzSoU4O4z1aaizM54FYxHVh6Fx92GTdK6 zJo8g4jlr2gPR7/nkxfdKASDRTJLgexJK4W2tIeIwj9b1+7VmIkf5TsKXsDzvbKJsIDg +Cv8T2cy/Yinr+DNiT6eDy6Q1wp8vyAKbIsjD5mrps1cGAfP+LeiK+PCxktL51PXKPKm 09w0TkkvqcIGlMzva8CI5afWKgsJKK/XOKHdb4Fdiq1RcV1PcoDvJ4vsdGT7BbMff1qA ecTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:references :in-reply-to:date:to:from:arc-authentication-results; bh=4uU4qHK9ro1AQAGAMzKwt+IrJDca5NhS3dzs6x0n0zs=; b=K1RE1zlJp9NcTCHHM8ZUamkTXxixXXIWP1fQy1eBtHrQ7rsllKCni8CXQtGlnrDHs1 7rYNwpFHx3HMvb34A6HI4ou1xXU3nWmL9qBwYbI+gpxn/O5vVwtZY4kzxRcDfjRDZgdi kV1WXoU4TvRT7sFsiruIfXS/NnLYx3U7EgpxAKpGi+5CNmYAqRfwnizFQueb5gaXAJeZ JldIZJNQ7V2Z1/HJdcn0ajJkwLnPM1Ii1ASigM56GHKlHNXuENiNYQmE7NFbBn4XgRln 0GmTGp/LLclMRNv3CsKTW5v8iXSNJMWx+k8fQ7xFX+ZQIMK0CYE/aIcCgLHR8DnMS+uT DIHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 28si121076qtv.153.2017.09.19.17.47.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 19 Sep 2017 17:47:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from localhost ([::1]:46029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duTAe-00051W-Sh for patch@linaro.org; Tue, 19 Sep 2017 20:47:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duT9Y-0004R8-2T for qemu-devel@nongnu.org; Tue, 19 Sep 2017 20:46:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duT9O-0005dm-FL for qemu-devel@nongnu.org; Tue, 19 Sep 2017 20:46:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55284 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duT9O-0005d4-1Y for qemu-devel@nongnu.org; Tue, 19 Sep 2017 20:46:02 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8K0hblp139549 for ; Tue, 19 Sep 2017 20:46:01 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0b-001b2d01.pphosted.com with ESMTP id 2d39xyvars-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 19 Sep 2017 20:46:01 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Sep 2017 18:46:00 -0600 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 19 Sep 2017 18:45:58 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v8K0jvFA63438930; Tue, 19 Sep 2017 17:45:57 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 85960BE039; Tue, 19 Sep 2017 18:45:57 -0600 (MDT) Received: from localhost (unknown [9.80.107.19]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id 4A68BBE038; Tue, 19 Sep 2017 18:45:57 -0600 (MDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 19 Sep 2017 19:45:12 -0500 X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170920004521.9417-1-mdroth@linux.vnet.ibm.com> References: <20170920004521.9417-1-mdroth@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17092000-0004-0000-0000-000012F283D4 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007765; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000230; SDB=6.00919510; UDB=6.00461960; IPR=6.00699736; BA=6.00005598; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017216; XFM=3.00000015; UTC=2017-09-20 00:45:59 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17092000-0005-0000-0000-00008428A8EC Message-Id: <20170920004521.9417-4-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-19_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709200008 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH 03/12] target/arm: Fix aa64 ldp register writeback 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: Peter Maydell , qemu-arm@nongnu.org, Richard Henderson , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson For "ldp x0, x1, [x0]", if the second load is on a second page and the second page is unmapped, the exception would be raised with x0 already modified. This means the instruction couldn't be restarted. Cc: qemu-arm@nongnu.org Cc: qemu-stable@nongnu.org Reported-by: Andrew Signed-off-by: Richard Henderson Message-id: 20170825224833.4463-1-richard.henderson@linaro.org Fixes: https://bugs.launchpad.net/qemu/+bug/1713066 Signed-off-by: Richard Henderson [PMM: tweaked comment format] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell (cherry picked from commit 3e4d91b94ce400326fae0850578d9e9f30a71adb) Signed-off-by: Michael Roth --- target/arm/translate-a64.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) -- 2.11.0 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 2200e25be0..cb44632d16 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2217,29 +2217,34 @@ static void disas_ldst_pair(DisasContext *s, uint32_t insn) } else { do_fp_st(s, rt, tcg_addr, size); } - } else { - TCGv_i64 tcg_rt = cpu_reg(s, rt); - if (is_load) { - do_gpr_ld(s, tcg_rt, tcg_addr, size, is_signed, false, - false, 0, false, false); - } else { - do_gpr_st(s, tcg_rt, tcg_addr, size, - false, 0, false, false); - } - } - tcg_gen_addi_i64(tcg_addr, tcg_addr, 1 << size); - if (is_vector) { + tcg_gen_addi_i64(tcg_addr, tcg_addr, 1 << size); if (is_load) { do_fp_ld(s, rt2, tcg_addr, size); } else { do_fp_st(s, rt2, tcg_addr, size); } } else { + TCGv_i64 tcg_rt = cpu_reg(s, rt); TCGv_i64 tcg_rt2 = cpu_reg(s, rt2); + if (is_load) { + TCGv_i64 tmp = tcg_temp_new_i64(); + + /* Do not modify tcg_rt before recognizing any exception + * from the second load. + */ + do_gpr_ld(s, tmp, tcg_addr, size, is_signed, false, + false, 0, false, false); + tcg_gen_addi_i64(tcg_addr, tcg_addr, 1 << size); do_gpr_ld(s, tcg_rt2, tcg_addr, size, is_signed, false, false, 0, false, false); + + tcg_gen_mov_i64(tcg_rt, tmp); + tcg_temp_free_i64(tmp); } else { + do_gpr_st(s, tcg_rt, tcg_addr, size, + false, 0, false, false); + tcg_gen_addi_i64(tcg_addr, tcg_addr, 1 << size); do_gpr_st(s, tcg_rt2, tcg_addr, size, false, 0, false, false); } From patchwork Wed Sep 20 00:45:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 113072 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp137542qgf; Tue, 19 Sep 2017 17:46:34 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDfY8mLiTFJMKPCysJOVDkGYh4NkH3FhwwAc32ogDeP9JVeWGgHk0x4C+TI2MbvqHwZynV9 X-Received: by 10.233.230.1 with SMTP id z1mr4841456qkf.22.1505868394066; Tue, 19 Sep 2017 17:46:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505868394; cv=none; d=google.com; s=arc-20160816; b=mt/Fx9Ro3g4TWblY6beDX8JrDa5baJFaSfXjuU3/BZsQWZzNTAN/KoWJM8cCOuHGHW 1uI14ScX80eHSkdBwky124pwofTxBytDU+N7TvHdpWTh8mD4TDt1iMDcpj0i/MdytH1M JmwLjoku8PVbYIzjc6j2DXnxWTFgV0WqlYJOe9HUfiYCN2sB8NSKfqI51xgue4ngDEvE HLopKb7I0nYVGJRtmTkq++bUNaVjxcjxnxB0bHEe5GslzbIh7kZpm/cZG+A+fFPS+8aF C5lTicsJmZES2CEpQlW8g26a2e3Lh6vsZuV690oGr2aSROXQr2HYFsl4dfb0jpkfZUKi r8Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:message-id:mime-version:references :in-reply-to:date:to:from:arc-authentication-results; bh=RztOriE6XP98vjxicVGmICg8UXeF6iAmqgraMiKO+bU=; b=DplpUmKEUjSlQcP+qpKGmYpHL3ex5Wv1Crfh9CnxXIPDawACirqDP9u5SqVBXudbl2 Py3wfooAqOfwpKik3sDLv8jhv4exs8qfpTxyFFhrxKUUT+CGWEnScMRzhGT47qNu3tEc FQzo5mv5pqEuO9sNU8gdKjEJfg3zB0VhylgkecXc67+t3FPw042WN4BZZQodsEj93ERt V6CIGzN1k14/k43KGcdhxHOaMfpS4wRrEVkUG1oPLcD/Dtl3UMOhksMQNQuCSuvr+k3g O9pK22uKGxI8R1B1U3GDKDKr55C0GpYcE0qVzmaFq7KJcrAqM5W0ARG1dmMd5ntrrTyx NAug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s68si604862qkf.486.2017.09.19.17.46.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 19 Sep 2017 17:46:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from localhost ([::1]:46023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duT9r-0004Kk-Uh for patch@linaro.org; Tue, 19 Sep 2017 20:46:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duT9M-0004KH-Vd for qemu-devel@nongnu.org; Tue, 19 Sep 2017 20:46:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duT9I-0005YU-Ub for qemu-devel@nongnu.org; Tue, 19 Sep 2017 20:46:01 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59970) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duT9I-0005XW-N6 for qemu-devel@nongnu.org; Tue, 19 Sep 2017 20:45:56 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8K0haV2144782 for ; Tue, 19 Sep 2017 20:45:55 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2d3cbn4y8w-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 19 Sep 2017 20:45:55 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Sep 2017 20:45:54 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 19 Sep 2017 20:45:51 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v8K0jpok50069616; Wed, 20 Sep 2017 00:45:51 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53FF8112054; Tue, 19 Sep 2017 20:45:31 -0400 (EDT) Received: from localhost (unknown [9.80.107.19]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP id 1C1A3112040; Tue, 19 Sep 2017 20:45:31 -0400 (EDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 19 Sep 2017 19:45:18 -0500 X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170920004521.9417-1-mdroth@linux.vnet.ibm.com> References: <20170920004521.9417-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17092000-0048-0000-0000-000001E7F824 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007765; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000230; SDB=6.00919509; UDB=6.00461960; IPR=6.00699736; BA=6.00005598; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017216; XFM=3.00000015; UTC=2017-09-20 00:45:53 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17092000-0049-0000-0000-0000429DF51F Message-Id: <20170920004521.9417-10-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-19_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709200008 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id v8K0haV2144782 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 09/12] mps2-an511: Fix wiring of UART overflow interrupt lines 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: Peter Maydell , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Fix an error that meant we were wiring every UART's overflow interrupts into the same inputs 0 and 1 of the OR gate, rather than giving each its own input. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-id: 1505232834-20890-1-git-send-email-peter.maydell@linaro.org (cherry picked from commit ce3bc112cdb1d462e2d52eaa17a7314e7f3af504) Signed-off-by: Michael Roth --- hw/arm/mps2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index abb0ab6d71..769cff872c 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -287,8 +287,8 @@ static void mps2_common_init(MachineState *machine) cmsdk_apb_uart_create(uartbase[i], qdev_get_gpio_in(txrx_orgate_dev, 0), qdev_get_gpio_in(txrx_orgate_dev, 1), - qdev_get_gpio_in(orgate_dev, 0), - qdev_get_gpio_in(orgate_dev, 1), + qdev_get_gpio_in(orgate_dev, i * 2), + qdev_get_gpio_in(orgate_dev, i * 2 + 1), NULL, uartchr, SYSCLK_FRQ); }