From patchwork Tue Feb 6 19:14:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 127076 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3204065ljc; Tue, 6 Feb 2018 11:17:10 -0800 (PST) X-Google-Smtp-Source: AH8x226V4RxxHiBubWU5t2Y15irHUi/R1I2QYs82db/GC9Go+DIUEMCB7oJwzI6+lteBfFZQaOAa X-Received: by 10.37.102.6 with SMTP id a6mr2220848ybc.496.1517944630467; Tue, 06 Feb 2018 11:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517944630; cv=none; d=google.com; s=arc-20160816; b=yaEWZCH2JIIIZfxRB6m/5Eqyjjy57jypq2UhubrMzkYX0ofSO8qQXUTy5nnugUsnPe 5CQ50CqxNdcGe8Az4ZDbGBljy7k7y/vcuEZcPqLHruHperAMIT7XnqJ6DN77Qcawsn3+ UardZYeZt1Z3yRTzwm+suL6FPZi1bkUuSy+HMEclDXo24q6lfAwAjqMjJSXA+Wmszd/r QM7KnE9x3uHFItwllgIwHFlgrqCVSEhYZ7oLWAA1GEJRAMGs6qzXIJPjXhRXruzUg0Oq F7SnxC4Eou5eckEPUMACZHCyYBaJ3hG0qnIhHs/OESCKGDHBfknTOPWRVixvZqpwRQRw DN6g== 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=hYd+LK+eZfLpaTZvEX+cM0eDP+9HBKd4dCBerhtkfM8=; b=vn1DcapxC+8QDrCgdzMdsJncJ04kO1dFqpMBLi065uC4R7aBzEdx1b0M7/dlKxWXPV WmO0AYI48PfNLu9D3xogtwEst0O2YhwB/IttKswmmE3mXSSlHUgcxbQk4aDSiSHbqyzp OXY8wW1mahAQhy3c9q8KLFloWYpIpXEIauNPjoz8b+BA/FOeeXaJuTHVizoiwUizNOq1 rMUpd/Y6EKTeGK8Mi6l7493i/DkglN9hC0XD8ZrnxGtp7qAvVjmq3fVt/lm6WWJ7luom o3nCM0bbetTCqnlfLN/JtibypSgigGmWyy2Z5zu/6u8E6M7qatISSjcjl0DEDH+SPNYA m1eg== 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 o125si1964758ybb.705.2018.02.06.11.17.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 06 Feb 2018 11:17:10 -0800 (PST) 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]:53333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej8jt-0005w2-RA for patch@linaro.org; Tue, 06 Feb 2018 14:17:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej8ic-00059m-OZ for qemu-devel@nongnu.org; Tue, 06 Feb 2018 14:15:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ej8ib-0007uD-Jg for qemu-devel@nongnu.org; Tue, 06 Feb 2018 14:15:50 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ej8ib-0007tL-Bo for qemu-devel@nongnu.org; Tue, 06 Feb 2018 14:15:49 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w16JExx4118348 for ; Tue, 6 Feb 2018 14:15:48 -0500 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fyh46kmvc-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 06 Feb 2018 14:15:46 -0500 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 6 Feb 2018 14:15:40 -0500 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 6 Feb 2018 14:15:38 -0500 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w16JFcev42270772; Tue, 6 Feb 2018 19:15:38 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C6369AC046; Tue, 6 Feb 2018 14:16:58 -0500 (EST) Received: from localhost (unknown [9.80.97.150]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 8C6EDAC041; Tue, 6 Feb 2018 14:16:58 -0500 (EST) From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 6 Feb 2018 13:14:33 -0600 X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206191515.25830-1-mdroth@linux.vnet.ibm.com> References: <20180206191515.25830-1-mdroth@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18020619-0052-0000-0000-000002B0F8D2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008485; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000248; SDB=6.00985886; UDB=6.00500282; IPR=6.00765252; BA=6.00005813; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019407; XFM=3.00000015; UTC=2018-02-06 19:15:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020619-0053-0000-0000-0000537EEE68 Message-Id: <20180206191515.25830-13-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-06_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802060241 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 12/54] hw/intc/arm_gic: reserved register addresses are RAZ/WI 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, christian.ehrhardt@canonical.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The GICv2 specification says that reserved register addresses must RAZ/WI; now that we implement external abort handling for Arm CPUs this means we must return MEMTX_OK rather than MEMTX_ERROR, to avoid generating a spurious guest data abort. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Message-id: 1513183941-24300-3-git-send-email-peter.maydell@linaro.org Reviewed-by: Alistair Francis (cherry picked from commit 0cf09852015e47a5fbb974ff7ac320366afd21ee) Signed-off-by: Michael Roth --- hw/intc/arm_gic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 5a0e2a3c1a..d701e49ff9 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -1261,7 +1261,8 @@ static MemTxResult gic_cpu_read(GICState *s, int cpu, int offset, default: qemu_log_mask(LOG_GUEST_ERROR, "gic_cpu_read: Bad offset %x\n", (int)offset); - return MEMTX_ERROR; + *data = 0; + break; } return MEMTX_OK; } @@ -1329,7 +1330,7 @@ static MemTxResult gic_cpu_write(GICState *s, int cpu, int offset, default: qemu_log_mask(LOG_GUEST_ERROR, "gic_cpu_write: Bad offset %x\n", (int)offset); - return MEMTX_ERROR; + return MEMTX_OK; } gic_update(s); return MEMTX_OK;