From patchwork Tue Apr 2 10:29:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 785104 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp4859369wrt; Tue, 2 Apr 2024 03:31:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXPfT++MKoRWibsgJmTUyk6tMjHiafZBWg37uQohp6sAHttg9zwjdpQMSYvJwXl0IB54MjVcVGxy8X0keVpHCTm X-Google-Smtp-Source: AGHT+IHCyxpC3mNp9KQ9Idrf60hrF7ghqjuhY1iliYDNsgEfo9YwHG620G/eQLvWgOjPzUm/+Lyx X-Received: by 2002:ac8:7dcf:0:b0:431:4406:6f5f with SMTP id c15-20020ac87dcf000000b0043144066f5fmr23823923qte.1.1712053882970; Tue, 02 Apr 2024 03:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712053882; cv=none; d=google.com; s=arc-20160816; b=YOL7DOPtjF1uoD8L5D2TVYYK8RzPcZK6g2oE1vWnNupE439nOuNZCSA/pjKs+Vr+n+ PXwLyRz5pCgvfYss/s3dqgDc6WQjIogBjaYDyaKEJsbExGxq7a6lQ26P6vh/nI2LsowF YAyP8C1lWdWZRM9rxslpoa99jSNgBS7kqPWHASZYufchoLGBkNAIxpitA+kbLSHQZMAd VjKKPO6+EwG0zgBq3n1uPV2CCY3i4Iteq5iSJkzxXAHq+yFxfbKt3E7I9lj/V7zDF3wt aFlTGeMTkOQcF1S7wCVyWB+2mPNMaiHH/QpwHWl6ejqPZA49qhUHfLA97qB3I5bqxKT2 PK0A== 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=91BZ+bUW9V0rFrI3CQ5Xh/5sgpFgV/x/ACLid6y7DpM=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=ycYdjTodm0Oh0cvWwSjZhSpEH0pgB8ng7NLPYiwYFKkqeGejQyLaeh3hE5eX7JdaCT ndUHqT95b0IYS1B8v2KyjTogY7Y5YSUqPGrWzSKg0pV4yJzRwfJZ+Gmstw3Qj+fcb6IL UikQnmcPGJyCXNQ55YzamZVCt3KfYxdL2S15E1h9QRPiuSG5n3ApFKg+BpEi7fFtXm3N dn+dzU6+yxu65li05OVsYg6mjHHFGRico0tttslkayUGDXuVtXJOmyqlL0VSFCWC4pNk f9MotnqrLdwq+Dw+ztXEfTx0Dvrf9ujK2uUPu97RSUfDbQM3ZJEGsEOnEdybcr/QDmAH IMFA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hq6iGl0t; 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 ep8-20020a05622a548800b00432c7b282a1si7881876qtb.654.2024.04.02.03.31.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2024 03:31:22 -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=hq6iGl0t; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrbP5-0008ME-PZ; Tue, 02 Apr 2024 06:30:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrbP2-0008KM-Uk for qemu-devel@nongnu.org; Tue, 02 Apr 2024 06:30:05 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrbOy-0003er-F0 for qemu-devel@nongnu.org; Tue, 02 Apr 2024 06:30:04 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-415446af364so24613455e9.0 for ; Tue, 02 Apr 2024 03:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712053795; x=1712658595; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=91BZ+bUW9V0rFrI3CQ5Xh/5sgpFgV/x/ACLid6y7DpM=; b=hq6iGl0txrf58Hpo8/N+5s43bnhFAJ2xWkqiccWNH0Mzscb8olzmyuNiR8N4HMD4MF vRYPbfFiAdV+s6DBgi8RlEuFFPK/taiSaxwEnsyk4M9PiS634ZQX+tNt5pt3UCUsUPZM 0psG1XzSPpIpkjZLLp0o0yPmpseeEzCBHOllIGn7Kxed+zzJ6ubFMnyolHU79dO1ZO1T C/Hi9bHiQaj2szIt/Msqy3nfQ1MM19g7pWzLPVARr6JWPiqKHnSzwuJYrv8wLfTdUwfr rF0FPOiDh9cXtUEPGeGbUS6+viM7+DNdx04cqXKrFEaEWwCRr+orHRUnc2wVXppxKasE LRhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712053795; x=1712658595; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=91BZ+bUW9V0rFrI3CQ5Xh/5sgpFgV/x/ACLid6y7DpM=; b=GM9GGpw/EvHmAVmG4V9NFq0Up2orBafzIAAoaVruyHkFKL62un3q/SXDITATZ7HqLV RwINwPeckVWcG2YjxZbC3dlXoUUcHmgvOWVkDL0zfkMk2ZZL0sBIOyk4IhMKhYxqcTWf +zxCYmrLliqPRw4aButzZxooDf1eVZ0uNDtWwiA4glg0TYD9LSw1a/PSMepxsCqhHZY2 Dndze+tuE2LsfuoK1VdrUxRv6BYL3S4jSdpEVV/1qznuyApjQHFr4mKD1DC45mpxSLei CvHpFXJEQF0fjdlDQrv5ZAnprCNR+Hq/guL6yRiz4cPWFjeWT9zu+KwE8NEWORkuJcRw hqyg== X-Gm-Message-State: AOJu0Yw2gBahO+1fmECC+P3/feCnkFeNy5nTXEF6MKd5l6FyLwh49dLA s0jba8Gh6+lrU0D0kwowbrXy5lYH1g9zA2qZXDOEWoFUZSC7/xlYprFZH89ghFb3bKQivGH9IAD Y X-Received: by 2002:a05:600c:4f05:b0:416:1ad7:f1b9 with SMTP id l5-20020a05600c4f0500b004161ad7f1b9mr1383866wmq.17.1712053794876; Tue, 02 Apr 2024 03:29:54 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id o15-20020a05600c4fcf00b0041488895a37sm20586175wmq.33.2024.04.02.03.29.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 03:29:54 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 3/5] hw/intc/arm_gicv3: ICC_HPPIR* return SPURIOUS if int group is disabled Date: Tue, 2 Apr 2024 11:29:49 +0100 Message-Id: <20240402102951.3099078-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240402102951.3099078-1-peter.maydell@linaro.org> References: <20240402102951.3099078-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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 autolearn=ham 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-bounces+patch=linaro.org@nongnu.org If the group of the highest priority pending interrupt is disabled via ICC_IGRPEN*, the ICC_HPPIR* registers should return INTID_SPURIOUS, not the interrupt ID. (See the GIC architecture specification pseudocode functions ICC_HPPIR1_EL1[] and HighestPriorityPendingInterrupt().) Make HPPIR reads honour the group disable, the way we already do when determining whether to preempt in icc_hppi_can_preempt(). Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20240328153333.2522667-1-peter.maydell@linaro.org --- hw/intc/arm_gicv3_cpuif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c index e1a60d8c15b..67d8fd07b7f 100644 --- a/hw/intc/arm_gicv3_cpuif.c +++ b/hw/intc/arm_gicv3_cpuif.c @@ -1067,7 +1067,7 @@ static uint64_t icc_hppir0_value(GICv3CPUState *cs, CPUARMState *env) */ bool irq_is_secure; - if (cs->hppi.prio == 0xff) { + if (icc_no_enabled_hppi(cs)) { return INTID_SPURIOUS; } @@ -1104,7 +1104,7 @@ static uint64_t icc_hppir1_value(GICv3CPUState *cs, CPUARMState *env) */ bool irq_is_secure; - if (cs->hppi.prio == 0xff) { + if (icc_no_enabled_hppi(cs)) { return INTID_SPURIOUS; }