From patchwork Sat Jan 22 18:24:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 534117 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1685551imr; Sat, 22 Jan 2022 10:59:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLKk1PptgSnx59SwP7sjvwYeaHzP4pCV6BELzJOdCYvTCIwG4bekaiIpSpNoK9YOEAMqgn X-Received: by 2002:a25:e093:: with SMTP id x141mr14590518ybg.247.1642877939943; Sat, 22 Jan 2022 10:58:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642877939; cv=none; d=google.com; s=arc-20160816; b=L6WF55XsVMVL/tcdltULddNIpiy2bTgJptPMPwSljAm4d84OBOPf1k3E61wtnwUZyh oZ/w50h95Zj0bKCPwhkZfXDWr1mJsFlAs5q9uJGwAPJ7A3UZcGH4mdWBWsVsMHiNNfqH ur6/votomb1oxlSDLDcOIb1fpl1+0g4ediz5Vl8ec2Ls4g+l+vcjiQ6XaDkoagkntuPc QQkJb4KcIp/LycmhaB0+YK58GlqOjJ2Y+wt972RX37UPnQdoAhk7EUo440J5fAwNoM0C ZZs0S3QSweRjIaSjv6PDreWe8pj+XWtemA96gTSnSg+NlbZptUygWFpMe0HZGbOfjivp lnZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=NxBpkMVebkfvJDaKJYbHagp3Kx3QPxuJ4FSTved8Gug=; b=Omu61wtKwou5jkZtShRWC6VNAgxPTP9XtlXcYks5S2qw2YH81wmINxNMYoZ3G34/eg M3loXv1QT7JdnbRALo/cvQyVCnDir6k4hJkRmPGxmJOgSXZ+02MSn+R5auam2Ux+IRsK Focb7Y+uLHmxHv7j2vrWEfpAdzlC5GkApu2Y3HCmTFcSdh2j80DA9Mmt2BurZMoAPOGW R9/CpinBVCRsMyNPMxko0zuRuJjYEm1CRjbSmD5IwgpUbuHj3PGXv/819Qj5XuJ8bs8Z bn8eiqUEpAhjdawtWXblfZiAEQqQS9tIvGbwE1xEksTX/ZvcauFWHgRvarnCwX8N4L+G D/Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LO6JD28S; 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 188si9379819ybe.387.2022.01.22.10.58.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Jan 2022 10:58:59 -0800 (PST) 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=LO6JD28S; 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]:56912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBLbH-0006eN-DD for patch@linaro.org; Sat, 22 Jan 2022 13:58:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBL4x-0005m3-Em for qemu-devel@nongnu.org; Sat, 22 Jan 2022 13:25:36 -0500 Received: from [2a00:1450:4864:20::42a] (port=39590 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nBL4u-0007gQ-L3 for qemu-devel@nongnu.org; Sat, 22 Jan 2022 13:25:35 -0500 Received: by mail-wr1-x42a.google.com with SMTP id az25so5905035wrb.6 for ; Sat, 22 Jan 2022 10:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NxBpkMVebkfvJDaKJYbHagp3Kx3QPxuJ4FSTved8Gug=; b=LO6JD28SSRveVnVEfo4UpGmhleAw9kCGUklXWSWAgFkqsu0jt/qlOZ5BCFCqF2CJHI I9UyZWvQzzmeGFQzLHYhourEfjI8Nc7Y4SoYJw5mhMQNkyY3WGvakRI6fQha0QFEbx/+ +8Hei9OocwARhVjS6T+pVXRPVwM2uk6ASPtPPH9jDMAE+d9AfSVc9BJHlulx/aU1XasW HGYbm3qJZyw/K0TSv+3LhNXTroukQuqWFTXwfxqh4cI3+zlxCp8dMd3qo/7Uhr3pZiR2 WK/ggKFxdbtLjgvgfEH+rHHs9UHE7QV06M46EwNE8Cj17HvJrKdQymFIV3UDfcom6Fbu nB5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NxBpkMVebkfvJDaKJYbHagp3Kx3QPxuJ4FSTved8Gug=; b=RpradmooCH4KpgEi92C49xbq10qJ4CpbY1s3mPnpkDKpiNdwAv5G7fNkS1xU50amiM cPg2gU7kz9bVH5Q/Sl0SU8zVUj6ZwJXDm1ztvM5rsYu8igPh/EpF2ViwvyEnRcGRqM7E QU7m38UH7m0wVWeG6sffjkJqkCWOIkiUm9lnzWMcLojWLIWsIU8hhgnKL/2EMnFDmhq2 4q00qbOZNIqBinJuovOpUxMzhVLrZUWOYnkYGkWC7gRLPdhD6F0T+JrsOKmxCCB7FetU WibGQM/p+Zd7EUJXFL2kV+ZsJT1WeeU+Pl6fDKJ+xdxmFbItbtNz6Hq6SaqwwMOOfffs Qn4w== X-Gm-Message-State: AOAM530HEdxzMpSjp9LUDRjFu/VcD2qLyOORB2hNPe1jAVn3yfad4Oyw ihLRzcdmYHWbCp9c0pCZ+BvfNw== X-Received: by 2002:a05:6000:1a8c:: with SMTP id f12mr8408980wry.352.1642875889199; Sat, 22 Jan 2022 10:24:49 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 21sm8870774wmk.45.2022.01.22.10.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jan 2022 10:24:48 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 04/14] hw/intc/arm_gicv3_its: Don't clear GITS_CREADR when GITS_CTLR.ENABLED is set Date: Sat, 22 Jan 2022 18:24:34 +0000 Message-Id: <20220122182444.724087-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220122182444.724087-1-peter.maydell@linaro.org> References: <20220122182444.724087-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Shashi Mallela , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The current ITS code clears GITS_CREADR when GITS_CTLR.ENABLED is set. This is not correct -- guest code can validly clear ENABLED and then set it again and expect the ITS to continue processing where it left off. Remove the erroneous assignment. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- hw/intc/arm_gicv3_its.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c index 67f12d98af3..1763ba4a671 100644 --- a/hw/intc/arm_gicv3_its.c +++ b/hw/intc/arm_gicv3_its.c @@ -853,7 +853,6 @@ static bool its_writel(GICv3ITSState *s, hwaddr offset, s->ctlr |= R_GITS_CTLR_ENABLED_MASK; extract_table_params(s); extract_cmdq_params(s); - s->creadr = 0; process_cmdq(s); } else { s->ctlr &= ~R_GITS_CTLR_ENABLED_MASK;