From patchwork Mon May 20 16:28:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 164658 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp507282ili; Mon, 20 May 2019 09:41:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjzE+rNqneLBu3a9mD2iBtVCIwN68ecqHUQhWIutfAqLzKEl0zT+0UBZkSl7kVbAJJFJUi X-Received: by 2002:a50:8965:: with SMTP id f34mr76097608edf.296.1558370490802; Mon, 20 May 2019 09:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558370490; cv=none; d=google.com; s=arc-20160816; b=uVqrCrKM0dsm1q8PY1LOMhnaSjRobdzf0iNyZrsSShTjxiOT2UhwBDhdAkVNWw0LPd CqaSxVeWk1LkyK95wF012veGSnKX6r8iXPQ780cDc50TFyuBsDIl2wKZJRrGrOGqonM7 zJqVlTJKBMcx/jcAh2AGbBSZtzcRWEkXDwuFQEOXjBGEgUH05ZF3YFxvOaYgOAwrdryb DnIMfPMcnZrE5v/bkR9UrQFd/ajY4LIBve/XeyhwB1YuB0kKBErShgZuXlRVXxlpPJb8 P9nronSQKUCIZjnPdPgoU5215cF1yT3g2dtQ03G3Bf/ZQWCyshpjtzUO9XBqJ5kya08W mMQg== 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=dQHnN+4pHJlYmoFJPk7sNMgKdxxuc9MbNwGNtlQi5Ao=; b=D1C1hdqIeYrOUdjZGfq8gkd6JxT+7R+LeLx+2Li0r/plr6ZJ9gaMdfJclk3r8kMH0h SzWDVsQNSRp6LXZZr0Nkootr/qEMYGRjwrwOlzs5dkTD4mdvVlrSk8t2WAs79u6J1CxM X6++w6bgznaTHbuDnil/EZfER2z/cebRpuC/91+oUFfUfUWEnQXm/KDe9uZPg/1cM+97 W8Igi90qtgPiC+qVasueAG22EY70h0+ijT14IePaGLkcdKO2vktSphaN+i9gFT5+xb9g JkA7C4U7699xglivT4gUiIbSUDTlk1KLun2a8lh4zrbPU1Awd+O0vGyGgYJefUCpzrce M18A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="A3gT/Clv"; 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 a1si4028219ejb.137.2019.05.20.09.41.30 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 20 May 2019 09:41:30 -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="A3gT/Clv"; 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 ([127.0.0.1]:38427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSlLt-00051U-DV for patch@linaro.org; Mon, 20 May 2019 12:41:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSl9D-00033b-H5 for qemu-devel@nongnu.org; Mon, 20 May 2019 12:28:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSl9B-0001H4-M6 for qemu-devel@nongnu.org; Mon, 20 May 2019 12:28:23 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:34688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSl98-0001Ev-02 for qemu-devel@nongnu.org; Mon, 20 May 2019 12:28:19 -0400 Received: by mail-wr1-x443.google.com with SMTP id f8so8932535wrt.1 for ; Mon, 20 May 2019 09:28:16 -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=dQHnN+4pHJlYmoFJPk7sNMgKdxxuc9MbNwGNtlQi5Ao=; b=A3gT/ClvCRV7rtEPPnJmn1DsOMTebZrY5pD/AfpV30uVMBPOpEHXpgiWVrtV9TK4Hl AP0HbS3dNqAPrTIvYLokPQrdvhn5xlIKW8Y68A2SZff2mG5VIbW1GMhQPKIUeqB6whKV +NSf6ixOc2BjT69T/0eecTslatzI3woee0R5waM7PeBLNnFlXs1eLf3GFZ8jcNKXWoSX ULUM6hU6VJXZcwkW0Np4q9fQyWeS7AohOA2xpu0iWzGdHNMlHtEk+VrDMxxjGHGoYkLa hpNkwVkYxvAEY7BhnxFC+kUjEJtvHsJ5+yse+UQn/HFEAxK0rmHFW/E0A5UktknsV926 YWjA== 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=dQHnN+4pHJlYmoFJPk7sNMgKdxxuc9MbNwGNtlQi5Ao=; b=WAEkI19FRuCzOYwhtmx4ezOjJJcSdM7CqYjvv93q7b70Ta0AmBeISslueIKvBqtC4M uq7BWV37HMTI7edasFx2xja2oKA5ieyHxQt294H97zrLghbZSNV6Ip/h+OEumy+utO5M +64OfFfmBYJ/R5YK7O76MJ5HDizXoha71PE/ABsLJ09N5sdHMcZe5iz4WeZM25spJDcw 60NR3WqwZs8oBcyAKpRy0KQzBYsV5Esq8jBBrtDe75dHHqEXaBFDEn3cGh4tZl1cnQ6w SmWCIthjk54AlTS56sBEPPvZzBs/tjOifcTZezp+kriSpIsYDOYAy1x3ALAq3i5XrXnR EjQQ== X-Gm-Message-State: APjAAAUzlBjwgCFwmlc4j/P05udABFuVKpAniOq2qyEFe9O5MKvzfG5u WwgjPApyHSEdsgsEefciXiy4Tg== X-Received: by 2002:a5d:68cf:: with SMTP id p15mr17181726wrw.105.1558369695764; Mon, 20 May 2019 09:28:15 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id x2sm5830394wrs.39.2019.05.20.09.28.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 09:28:15 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Mon, 20 May 2019 17:28:08 +0100 Message-Id: <20190520162809.2677-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190520162809.2677-1-peter.maydell@linaro.org> References: <20190520162809.2677-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::443 Subject: [Qemu-devel] [PATCH 3/4] hw/intc/arm_gicv3: Fix write of ICH_VMCR_EL2.{VBPR0, VBPR1} 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In ich_vmcr_write() we enforce "writes of BPR fields to less than their minimum sets them to the minimum" by doing a "read vbpr and write it back" operation. A typo here meant that we weren't handling writes to these fields correctly, because we were reading from VBPR0 but writing to VBPR1. Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_cpuif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c index cbad6037f19..000bdbd6247 100644 --- a/hw/intc/arm_gicv3_cpuif.c +++ b/hw/intc/arm_gicv3_cpuif.c @@ -2366,7 +2366,7 @@ static void ich_vmcr_write(CPUARMState *env, const ARMCPRegInfo *ri, /* Enforce "writing BPRs to less than minimum sets them to the minimum" * by reading and writing back the fields. */ - write_vbpr(cs, GICV3_G1, read_vbpr(cs, GICV3_G0)); + write_vbpr(cs, GICV3_G0, read_vbpr(cs, GICV3_G0)); write_vbpr(cs, GICV3_G1, read_vbpr(cs, GICV3_G1)); gicv3_cpuif_virt_update(cs);