From patchwork Sat Jan 22 18:24:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 534109 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1674513imr; Sat, 22 Jan 2022 10:33:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwniTr5UaAN9BwZGUv1yVxwY95wjjNAjOh+CxVEKWm9QXsXCnLnkNS6xmqPR8JNwSYHEXB+ X-Received: by 2002:a05:6902:1021:: with SMTP id x1mr1846058ybt.51.1642876435667; Sat, 22 Jan 2022 10:33:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642876435; cv=none; d=google.com; s=arc-20160816; b=OFzZcYB826oOsSQysBj+qIIw22NVwPKMHji0xpvu5CRGqUy0aENQLPOgxyHDqprwuA +y8SDoBrSww6t3I5pqgFnbBhhowPQW1AhVXEraZupnHnyxdoFX4H1IhhQtkfQQUrcu+m v50kE1dJR7XSzebCTBGmK8YR0+bMJjTlO4lRjPu988k5exFTMH8ZLZfo+wiEiU0ZN0eS vc/WYhd+Ro//4T5m/P93PSAV8y3ureSJ2y1QndgJJ2lM6mtp8oyUJRXXk4wraJj9roDp /jIM7QPNPrU4hgsX/ro3F89ic2YZf8YdLM4TtwbpOLdxrPciLET2yLY1rp1ii1Reu2N3 VIHA== 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:message-id:date:subject:to:from:dkim-signature; bh=oio/6hQtxU+ak5mBC4OE0O9hK4DvVfj15JxHsC1mIdI=; b=Sv6X2XzLNwCPyRz5ZuIjXUTuCB+nJlhD8wvbhLfnJE3IZQGTMR7maZiWfyURbkUgKv 3M5MpTzJGkMUwPU+Dt9q6eVD6+rs2XbhmRKX1ZfZG8s4kIF7YlxmVhv93ax3AXIb4b5Q WkdbYydbRyox6YPNfOZoyQCNFESFAzL49Od1okUgCIxMP1udveKQcwMg+1Dp3v/zGqEH 2RX/WZ0zfcOzW7EjjB4za6fVJwvcMwt7OzXs6uCqpdHvFl89kDHDOrYp2ZEC90GjjKxz 3q6WkYFZ9kFoyqONYJtEIeKj57quHTmUNQe+YTZ64RYSgcNUbyicbFUfqaNA5apGMwdY YZPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D+5BRtnh; 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 r80si10804717ybc.27.2022.01.22.10.33.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Jan 2022 10:33:55 -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=D+5BRtnh; 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]:56754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBLD0-0003eT-R6 for patch@linaro.org; Sat, 22 Jan 2022 13:33:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBL4W-0005hz-89 for qemu-devel@nongnu.org; Sat, 22 Jan 2022 13:25:16 -0500 Received: from [2a00:1450:4864:20::42a] (port=37630 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 1nBL4M-0007fv-Bc for qemu-devel@nongnu.org; Sat, 22 Jan 2022 13:25:00 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ba4so5894957wrb.4 for ; Sat, 22 Jan 2022 10:24:47 -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:mime-version :content-transfer-encoding; bh=oio/6hQtxU+ak5mBC4OE0O9hK4DvVfj15JxHsC1mIdI=; b=D+5BRtnhiOOliUfLNP4O6XoCj+XizSg2q9MaO9a6gcjhF2jVTjYrMFjuinpqxPK4Q2 NixPheBwfdzRozt7GXUzZys2bQOH4WPMfNKJNg59nDFuoSwBaeSGBEQdCYqHA7NzFi+Q eucZKJzsgD9ZXoxXxM1ommDDNpWH/AspKs8EyM2DzirNRIqGhhrXTN2OJoG3OLmAjqhk eUmgZh5BKm2QFRn5+921yfpuO/RrhIk73o9oM0EOYqs8irHK3YFul/dX0AZcwFtOMX+f qKPYJitLPb/fdVgi0Vh7bJGFAJ75GCO/IUi8GUkkR/hbbqEXMvmgEi2Nq69Wju0yGHU8 PzGQ== 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:mime-version :content-transfer-encoding; bh=oio/6hQtxU+ak5mBC4OE0O9hK4DvVfj15JxHsC1mIdI=; b=TNolleAN3D8PaarAZ09gvZm0H8Zo0LFCVVe/xZ6aMjSfC+/vV604IrcRzIY6G5bFbf H2C6DTKivpmspXPKrBRjvcQi6IQcPJYaZBIb7belVcgulChmfL685pkC8lT8ti/ZQVgm B4XLGw8kUB/TkAq9uPDl+pY8UY4GbCO+bAv1VEQT6EqVPpe9rk0yManYg3HnaeJUEcUQ WMQ1GX/ENg5sAp/b1urCzPeHMGWp+csW+joy6FTBdFUVNlGsIRZ1wFrFvFP0efH4mvBU nNUyzlQ17yRH5+ZV3h3ajYR4P7MxNpNIk9x3I9K/f4VqAE0d4iNOOsuoAvjyoAppX/YC O+YA== X-Gm-Message-State: AOAM533KFqNMPeLtPKbjTKWTCXTnqi5IfziAQtMD/Y4ZMnjoHZP3JAkj VNN+lgnnFfYe9YehwmmHUXTHZA== X-Received: by 2002:a05:6000:1869:: with SMTP id d9mr8118810wri.398.1642875886232; Sat, 22 Jan 2022 10:24:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jan 2022 10:24:45 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 00/14] arm_gicv3_its: Implement MOVI and MOVALL commands Date: Sat, 22 Jan 2022 18:24:30 +0000 Message-Id: <20220122182444.724087-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 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" I noticed while working on the new-in-GICv4 ITS commands that we'd forgotten to implement the GICv3 MOVI and MOVALL commands. These move interrupts from one redistributor to another; Linux doesn't use MOVALL but does use MOVI if it wants to power down a CPU (when it needs to migrate interrupts formerly targeting that CPU to a different one). This patchseries starts with a couple of patches that I found useful to improve the debug logging when I was writing this. It then has a collection of fixes for various minor bugs that I noticed while I was in the code (including yet another fix to the table lookup bounds checking...). Finally the last two patches implement the two new commands. thanks -- PMM Peter Maydell (14): target/arm: Log CPU index in 'Taking exception' log hw/intc/arm_gicv3_its: Add tracepoints hw/intc/arm_gicv3: Initialise dma_as in GIC, not ITS hw/intc/arm_gicv3_its: Don't clear GITS_CREADR when GITS_CTLR.ENABLED is set hw/intc/arm_gicv3_its: Don't clear GITS_CWRITER on writes to GITS_CBASER hw/intc/arm_gicv3: Honour GICD_CTLR.EnableGrp1NS for LPIs hw/intc/arm_gicv3_its: Sort ITS command list into numeric order hw/intc/arm_gicv3_redist: Remove unnecessary zero checks hw/intc/arm_gicv3: Set GICR_CTLR.CES if LPIs are supported hw/intc/arm_gicv3_its: Provide read accessor for translation_ops hw/intc/arm_gicv3_its: Make GITS_BASER RAZ/WI for unimplemented registers hw/intc/arm_gicv3_its: Check table bounds against correct limit hw/intc/arm_gicv3_its: Implement MOVALL hw/intc/arm_gicv3_its: Implement MOVI hw/intc/gicv3_internal.h | 43 ++++- include/hw/intc/arm_gicv3_its_common.h | 1 - target/arm/internals.h | 2 +- hw/intc/arm_gicv3.c | 1 + hw/intc/arm_gicv3_common.c | 9 + hw/intc/arm_gicv3_its.c | 258 +++++++++++++++++++++++-- hw/intc/arm_gicv3_redist.c | 115 ++++++++++- target/arm/helper.c | 9 +- target/arm/m_helper.c | 2 +- hw/intc/trace-events | 8 + 10 files changed, 416 insertions(+), 32 deletions(-)