From patchwork Fri May 6 16:21:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 570192 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:66c4:0:0:0:0 with SMTP id x4csp1833464mal; Fri, 6 May 2022 09:23:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7Rf+fXsR0noN9yxjTqnC8de72F0OicYrmGRBr+xsWxz3C10QaFHlOtvy89IjgxnWnFTkX X-Received: by 2002:a05:620a:4252:b0:67e:8977:db80 with SMTP id w18-20020a05620a425200b0067e8977db80mr2910858qko.483.1651854205922; Fri, 06 May 2022 09:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651854205; cv=none; d=google.com; s=arc-20160816; b=AHzqRDsnRAuJBriNUSZ3B3eF2VOQLQeZPikqhCdd3n6uys2CCQl3g3m8b6gn5pwlCk voisOeEG6TJVIWAFMg31gTV/MZ4av/+N8a6rdQdG0Id9IiOBpxhMm+QE/szL29jCuhE0 ig8ig9AQMO9AQiamXmPcMZJ9TYmqw0iA5wmZ5yTAbHtHYkeGFgXknz9oBvQyoipyEqof bT6576Y3J540eavckCUqzhNup0H5nTMECbKhieyhai0hMomvaLM2FTefEhRvxNK9Iva+ layHSGS35qd3QoHewqOuXC9pbjjYAZDI0ZgkX4jaurVuhIhCRthAdftd7nKWost7+5r6 TUyQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=bOxIOXkxIovtGJKfDrlFz7G6tvoSu0yK5tycQxFKtgU=; b=YT0g7ktUwti3evqIAc7BUNpeaX6y7wrvfAr5OViIq9AUFHbYG1Xxy1V+xwlAg7ULfz J8FgmR1QZWp9OnFZXMWXHqqXi0qwoTgwKGZ70M7tGu3xzfC4u3YF/Oibzq7ODvd96IcS nsW9Xf/W+YYvbYkqh1Z/UMmOATAN+WZgnc1J+L47opx0fQa/pruAMwrRwexUXeW2o6Ad JvCsz5vUUnStHso7P/XunYmsGsuBHnSmoWQb53jbgSbhQgy8/4vYHzrtLasDzVohRiqb QKxPlWg8tM7b8xmhzpBFC/BLQlszFXjJrYXBihN7FgM+8w2XgSdMQTz/qZJ/Vg8qXSyO CXsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LFJvEg7E; 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=pass (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 p1-20020a05622a00c100b002f3bd82026dsi2484182qtw.67.2022.05.06.09.23.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 May 2022 09:23:25 -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=pass header.i=@linaro.org header.s=google header.b=LFJvEg7E; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nn0jl-0005P1-GD for patch@linaro.org; Fri, 06 May 2022 12:23:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nn0i0-0005NL-VW for qemu-devel@nongnu.org; Fri, 06 May 2022 12:21:37 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:38837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nn0hy-000526-4i for qemu-devel@nongnu.org; Fri, 06 May 2022 12:21:36 -0400 Received: by mail-wr1-x42c.google.com with SMTP id k2so10681170wrd.5 for ; Fri, 06 May 2022 09:21:33 -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=bOxIOXkxIovtGJKfDrlFz7G6tvoSu0yK5tycQxFKtgU=; b=LFJvEg7EPUuS+Imjoiisw6voPKs7IkJkmV4cPoO6Aiwi9HPYr1UiH9Yhm2rk1COJ/A rK07dAwJln5wVSyEIKsLRTKnlsSSJ/xxrFZQrdh1cmokSGFuHkrhG3vEeZ16NlOy8NQ/ H0xgGAdVqQDR7Nw4E6hm00y57zPdiPjPlkYhOJj9uof1A9bpxNNs2XSzkhedWrBS0Lix EchE+N8hrCs2a3s2WKKMYdvxl62pw8b+Htb8FeOl6gjSKf1fQWHZC9li60rd8OT+jh6f 9i81sNv7betxt+/9P9ImywfpwTkOwU08aNiqz1BzbawwmtxGhTIWyZ+Wyh5lBaItHDxI Y4Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bOxIOXkxIovtGJKfDrlFz7G6tvoSu0yK5tycQxFKtgU=; b=JP3gaVg3ruodNNIxuONpRxXdZM4V7EFybJ0JYMpAwkNLlNt0Nn7aYlp+KMLV5t6GXK axh3tB9zLolmydhJsz4qv/UYhszIp58uN0tICoGAgi4x/Pe+oXd+FH3IM24IF/mKEu1A RTPFx1FK1stMh7JUrfQVvjBJe3FpLU+LUHwPx5DvSYJO50wfY+QeasWJ21LGnEIfsxpS ai37iZJN68JpWlKurir+S2Jj71+2FBdfuSfgt1ZCqrDoI+qhAZtOTWJJ2YBwBWJ16qRJ 6MwdbNrPbRkg6eAGcHWlDTMbQRq+icrNitCVU2rwS3PmQnp+xeHRH4df1Wz9kHmOZihA GaWg== X-Gm-Message-State: AOAM530WEsFh7PfnycgFoU7E8muzO8O61dczgRM7dClF5AtntQONRhv9 Mil6pahjeyR+wbsaa0+wMU4QGQ== X-Received: by 2002:a05:6000:707:b0:20c:4fd8:1d61 with SMTP id bs7-20020a056000070700b0020c4fd81d61mr3396746wrb.407.1651854092561; Fri, 06 May 2022 09:21:32 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id j2-20020a5d4482000000b0020c5253d926sm3782082wrq.114.2022.05.06.09.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 May 2022 09:21:32 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 1/5] hw/intc/arm_gicv3: report correct PRIbits field in ICV_CTLR_EL1 Date: Fri, 6 May 2022 17:21:25 +0100 Message-Id: <20220506162129.2896966-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220506162129.2896966-1-peter.maydell@linaro.org> References: <20220506162129.2896966-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" As noted in the comment, the PRIbits field in ICV_CTLR_EL1 is supposed to match the ICH_VTR_EL2 PRIbits setting; that is, it is the virtual priority bit setting, not the physical priority bit setting. (For QEMU currently we always implement 8 bits of physical priority, so the PRIbits field was previously 7, since it is defined to be "priority bits - 1".) Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_cpuif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c index 9efba798f82..d3b92a36636 100644 --- a/hw/intc/arm_gicv3_cpuif.c +++ b/hw/intc/arm_gicv3_cpuif.c @@ -657,7 +657,7 @@ static uint64_t icv_ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri) * should match the ones reported in ich_vtr_read(). */ value = ICC_CTLR_EL1_A3V | (1 << ICC_CTLR_EL1_IDBITS_SHIFT) | - (7 << ICC_CTLR_EL1_PRIBITS_SHIFT); + ((cs->vpribits - 1) << ICC_CTLR_EL1_PRIBITS_SHIFT); if (cs->ich_vmcr_el2 & ICH_VMCR_EL2_VEOIM) { value |= ICC_CTLR_EL1_EOIMODE;