From patchwork Fri May 31 12:03:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 800491 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp693034wrw; Fri, 31 May 2024 05:05:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWJJMGOKUTuFy5bAnFRwOnj2u1mtpKB0N4YElgap5CmdUvEC1naWEPCeGvcr/hS/7b6/O8xVIZfFTmqyn04GJmK X-Google-Smtp-Source: AGHT+IHKQklxCnBZ7PLfPsWJX+bR/z9Ul8mWUUpktNdsjH3UEQRqIxglpNGFF0WvAAfzXy0f8Dq7 X-Received: by 2002:a05:620a:408a:b0:794:af72:3cd with SMTP id af79cd13be357-794f5b8f720mr194224385a.0.1717157109185; Fri, 31 May 2024 05:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717157109; cv=none; d=google.com; s=arc-20160816; b=ME2MGs5iIOPcbc19hNQIkNrPdXim+b6LxFZN4offmijNJBvIIgQYpbCHLNq5crFKaJ f/7lKwOl2pi9OpnwbIIiUAOPlFpqjkuR/zVzS/sbU4MLZZUk7y2Y1Jk8wOUelYMoI1aM HSwEBk0vFdRqgvwoLwRacXGjMPHuwF+AbVuCQmxG6CkhCwX5n7jjUtCwDSbBbu5VKb+P jy2GuHtc/3j2PIBtUaoO7cycLPD+YG+ApWf8REPZk1d9A+MEohOo9iPR0976fAYHcx8P ka03he3TT4EtPUVoG6tknJhVnXjKCPI1z/7R4WeOHer5kOOrevL5edfLG3dCCPxbCVyK oJKQ== 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=iToqgJBir2tKfGUgEzI3mc84Rqmrk6uHFx118L//EbU=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=Py94A0RNMTowzDv+9xai+ZWJQ9vqmZQw76fzzafDltsfXZxigdUIkohTJdaskIeHEb fOfiEfq+h36oSTi5hvsflid7m/CVXiZU6le37eVP2doZWF1PyF3kBbNslmc/9IpVzd2r EZtcEpqwF8qIJRgWet0AjLZKsgkHMQJ45Cn4LZ8POHNiGUJRMOsQPSupkIcx7gIXsUP1 z/kcVLa4kT8mhats44Uqb61Ilpoe3pj4EvXdhwPD4o6Be+BV12C6SSWXq+h6xMOzo9+F 0ixkCd4NHnhk65KC9er1tc/I2/CLNNXgD6q1Mry25lrLu/OGOKccjQlFuQiH17wXKpYf Z8cw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k9aG1sxE; 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 d75a77b69052e-43ff23ac6a0si18889431cf.47.2024.05.31.05.05.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 May 2024 05:05:09 -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=k9aG1sxE; 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 1sD0zd-0004KT-Bt; Fri, 31 May 2024 08:04:21 -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 1sD0zV-0004Ir-Q0 for qemu-devel@nongnu.org; Fri, 31 May 2024 08:04:14 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD0zQ-0003OR-Ol for qemu-devel@nongnu.org; Fri, 31 May 2024 08:04:13 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-420180b5838so13348715e9.2 for ; Fri, 31 May 2024 05:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717157045; x=1717761845; 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=iToqgJBir2tKfGUgEzI3mc84Rqmrk6uHFx118L//EbU=; b=k9aG1sxEfuBArdQ5KOWSWdJQbhl5CiSkL+i1z9YXb9/rE6tpzN8LmXK2F1b7bK65RB HXxETFdi45OXE1Vnfj46MSkjcLT8tY/ZjX1fB+AXeu82fXZW0H/53BpHi5D6s0F+jRu/ UAWonD+/RVn1cPDq9YN9luQbCUBb3l4a9eQuvaX0KsKg8whbG8+DPkupAwk5G3axoclV qr/G5ifMlsqcq+NJDO1JQRETwIm5/h8WDfBEpIFR430uNxl7TijnKc3JMQHg+Fi/LrCe 5nF9nK1R9v4LvHosfjwwZICE3TvCKxHg4KAQznrPmHagQzIa5ukQeqWvS1Ceao8P/fg8 hD8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717157045; x=1717761845; 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=iToqgJBir2tKfGUgEzI3mc84Rqmrk6uHFx118L//EbU=; b=VGPSRFzGZum2ODzlR6iHcgiyffukQFsn0StLz3PbvDapfA1rM1VTpYbH7sznTqZbVi WOvBcslWFfhnlAnN5YtW0bOY0wiA5NLpxWmWtvV4YnaevjnufNvx34FHRZGLe+iTDHqe PKbOUoleGrcZZPyXj5LmZWfFB6tZKr/r+ttxouESvtYXw74b94jLjFSYxs19488gBt4n rnGSQjONq9CQPg3C2Rn7jX07I2hhHiglFAef6HFpo/zZj6uCp6b5K/T8ZPtsdWW7GPEZ G1I15fvO9HBaZRldq60jFuVWD4CoAclyQi7Rn0wddpWmXSdvK60JsKK/EdGR5tvVYigX sP9Q== X-Gm-Message-State: AOJu0Yz3h8tGHpScbjAoh5ujtyGzrNyck9MM/tj8ou+QdjZ1C4SiHqYu gHFECa3A1iD3yJYTeyxa6M1hFTmcNN0a1Yn/Cio49poAL6v4OSyJFHMW7/u5Gp2253XL4N8lLFN y X-Received: by 2002:a05:600c:19c9:b0:41c:12c:aaa2 with SMTP id 5b1f17b1804b1-4212e0c03d9mr13752675e9.33.1717157044596; Fri, 31 May 2024 05:04:04 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42129de0cf9sm37027685e9.13.2024.05.31.05.04.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:04:04 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/43] hw/intc/arm_gic: Fix set pending of PPIs Date: Fri, 31 May 2024 13:03:19 +0100 Message-Id: <20240531120401.394550-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531120401.394550-1-peter.maydell@linaro.org> References: <20240531120401.394550-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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=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 From: Sebastian Huber According to the GICv2 specification section 4.3.7, "Interrupt Set-Pending Registers, GICD_ISPENDRn": "In a multiprocessor implementation, GICD_ISPENDR0 is banked for each connected processor. This register holds the Set-pending bits for interrupts 0-31." Signed-off-by: Sebastian Huber Message-id: 20240524113256.8102-2-sebastian.huber@embedded-brains.de Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/intc/arm_gic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index e4b8437f8b8..04e5a11660c 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -1308,12 +1308,15 @@ static void gic_dist_writeb(void *opaque, hwaddr offset, for (i = 0; i < 8; i++) { if (value & (1 << i)) { + int mask = (irq < GIC_INTERNAL) ? (1 << cpu) + : GIC_DIST_TARGET(irq + i); + if (s->security_extn && !attrs.secure && !GIC_DIST_TEST_GROUP(irq + i, 1 << cpu)) { continue; /* Ignore Non-secure access of Group0 IRQ */ } - GIC_DIST_SET_PENDING(irq + i, GIC_DIST_TARGET(irq + i)); + GIC_DIST_SET_PENDING(irq + i, mask); } } } else if (offset < 0x300) {