From patchwork Mon Jun 17 14:33:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 167064 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2997786ilk; Mon, 17 Jun 2019 08:22:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwruDNmJ549DoS0cA8GeRHXclIs5XLUP2fhk2Zrt7R/5IiIet+iJI8r1UtFOoz3hQCIXW35 X-Received: by 2002:a50:92cd:: with SMTP id l13mr44018076eda.136.1560784969880; Mon, 17 Jun 2019 08:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560784969; cv=none; d=google.com; s=arc-20160816; b=XPccOHs4MYLdYi0CM4A5Rx5xL6WLpG3W551mUC11CZEQKox6v0NkhZx/rC1xcNn558 2bBcCf0WOEEWgl5r2tMqIBsOdbsnipgOvrywV2Jw+w3+droee8cqsd5fogZx+qeTZDpH ERS0ZIXLx14gD592YPpdvNBIjNOy7mtif3AicDl/4WAhrAZrWL2gZENaPMy4K0SVcbV6 2SzWsRnovgKhCjWZz8hDPX7zEMVcp6BXmcIwWQHH+c6XdNbXsOAOqnI73IPstpS29oKJ ZmQDFosBCwHHb+KzFSAO2eQf+Y9bbTy0gVVQUvY3Vx82HX01e61ykWX6Q8te4ft7kfDP umrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=DirqTV/zCPX2KcEnjTOe/sMakcabEsqAkkHQvfbYZ04=; b=Al7QbNPsjxYH9Og4xg0HHLB93oy6AUKIIcPOwP8ElOabLMzCbrv6s/IdV5UeSXQuzn jdOSL6iGwIbW3B8XFGgINpstXFKXw/V01hUUKgxhB3GdvVQ7aVUbMRqskAG142eJQTVl c+1dFAkS2FjH3jlIorlM7CXuiXaXRGQxzJGIj4A7yseKf7Mw2tNNbvbGVACouBlNYE+s c1Plo7JjaaJTK9ErOZ4JicxEC+b7D4DWgT+NkH4ilD+uPedh4w7WKW5vqtJMsxPShr3c O+s5KcW15LevvTfrM/eqMZFsgCUg09MaOK1u4EWv/3VN9KZryLTp9uG7frivvRXEIKDD PmbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Ai/YtYns"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l41si8789057eda.255.2019.06.17.08.22.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Jun 2019 08:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Ai/YtYns"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hctT6-0000eJ-SK for patch@linaro.org; Mon, 17 Jun 2019 11:22:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46656) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcsiJ-0003YN-IK for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcsiH-00084O-TR for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:27 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:33228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcsiH-00083e-K0 for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:25 -0400 Received: by mail-wm1-x334.google.com with SMTP id h19so118092wme.0 for ; Mon, 17 Jun 2019 07:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=DirqTV/zCPX2KcEnjTOe/sMakcabEsqAkkHQvfbYZ04=; b=Ai/YtYnsHVQtY/wpR51uTKfFLM7ybf/YPj3D7LXStVlzxUOGCcoCaVJ2Q3bq2ecAbX /rn0Z0AogCO606htw3UR6WA9v6AN2fAKhkee0Ng5CLEhm3z6/D2NmUfMG6gOMkFg+K0U 5e54JL9y6Qtpcu51Q6hJ3cYxromdmd3B6XKvssxxGkf8lMvFhJuUvIv8yjYTVgfW24ss sAGp4nsAwjPg8g4kvMvennnygwwg/t4hwhXnKU8+FCBlQaQT7Zc07yzDI+DPgSqy5iaL cX2LUPnJODgD2gIHl5bULEdNADHRHu9TKUIf3GyWXwXex1YXU48NfROgLoThslH3eVXb ndyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DirqTV/zCPX2KcEnjTOe/sMakcabEsqAkkHQvfbYZ04=; b=RaRNi7SopJX6JU6TGBiBUgcQIvcbJ6ZFo7DeZDAlg3KL7QCSHe62PDeNgdxGMLA+sS MnHXB6dmiSIrfIgHbTFPDXyNAVzgYwOgqAS1ovv3Dtg5QikX9cjQV3O5RPqZFdVPylsI b8VWBTuNi3pDo53t5GOzvs3BW6DMsKQ8GJ24DgW3sletGuvwuSx4c2TbAK/+V+fude4i iddk9odQx0od/zxGptWvs301qmp0PXNM0WuFZg/vFE4HApbmfDjzucfdiRKHFDbexoFB 8TGnAHUA5UKKhyrwOfsez9LGft/mS+sYL5A5RsAzS3UU7xuMUxXwJXyKxmh10vVDCa7E 4qFA== X-Gm-Message-State: APjAAAUW9xwflIa/qlLt0+I9b2pwMo749QHX8eJrXsN2HWDHzTtmC7At C8l14wt4HL9ze1o4S76MKqoSdYEwbY2Efw== X-Received: by 2002:a1c:63d7:: with SMTP id x206mr19679453wmb.19.1560782064289; Mon, 17 Jun 2019 07:34:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id a67sm13819985wmh.40.2019.06.17.07.34.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 07:34:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 17 Jun 2019 15:33:57 +0100 Message-Id: <20190617143412.5734-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190617143412.5734-1-peter.maydell@linaro.org> References: <20190617143412.5734-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 Subject: [Qemu-devel] [PULL 09/24] hw/intc/arm_gicv3: Fix decoding of ID register range X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The GIC ID registers cover an area 0x30 bytes in size (12 registers, 4 bytes each). We were incorrectly decoding only the first 0x20 bytes. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-id: 20190524124248.28394-2-peter.maydell@linaro.org --- hw/intc/arm_gicv3_dist.c | 4 ++-- hw/intc/arm_gicv3_redist.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/hw/intc/arm_gicv3_dist.c b/hw/intc/arm_gicv3_dist.c index 53c55c57291..e6fe4905fd3 100644 --- a/hw/intc/arm_gicv3_dist.c +++ b/hw/intc/arm_gicv3_dist.c @@ -533,7 +533,7 @@ static MemTxResult gicd_readl(GICv3State *s, hwaddr offset, } return MEMTX_OK; } - case GICD_IDREGS ... GICD_IDREGS + 0x1f: + case GICD_IDREGS ... GICD_IDREGS + 0x2f: /* ID registers */ *data = gicv3_idreg(offset - GICD_IDREGS); return MEMTX_OK; @@ -744,7 +744,7 @@ static MemTxResult gicd_writel(GICv3State *s, hwaddr offset, gicd_write_irouter(s, attrs, irq, r); return MEMTX_OK; } - case GICD_IDREGS ... GICD_IDREGS + 0x1f: + case GICD_IDREGS ... GICD_IDREGS + 0x2f: case GICD_TYPER: case GICD_IIDR: /* RO registers, ignore the write */ diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c index 3b0ba6de1ab..8645220d618 100644 --- a/hw/intc/arm_gicv3_redist.c +++ b/hw/intc/arm_gicv3_redist.c @@ -233,7 +233,7 @@ static MemTxResult gicr_readl(GICv3CPUState *cs, hwaddr offset, } *data = cs->gicr_nsacr; return MEMTX_OK; - case GICR_IDREGS ... GICR_IDREGS + 0x1f: + case GICR_IDREGS ... GICR_IDREGS + 0x2f: *data = gicv3_idreg(offset - GICR_IDREGS); return MEMTX_OK; default: @@ -363,7 +363,7 @@ static MemTxResult gicr_writel(GICv3CPUState *cs, hwaddr offset, return MEMTX_OK; case GICR_IIDR: case GICR_TYPER: - case GICR_IDREGS ... GICR_IDREGS + 0x1f: + case GICR_IDREGS ... GICR_IDREGS + 0x2f: /* RO registers, ignore the write */ qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid guest write to RO register at offset "