From patchwork Thu Apr 29 23:41:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shashi Mallela X-Patchwork-Id: 429440 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a99:0:0:0:0 with SMTP id y25csp2064571ejf; Thu, 29 Apr 2021 16:54:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmtuaZhKexNTbKWwiMaiTEfiFsN9qA4iyRKO+dNXWmeiw0EL7NTSbDBufdP64+WGJ/YqBY X-Received: by 2002:a5d:8b56:: with SMTP id c22mr1681472iot.84.1619740461576; Thu, 29 Apr 2021 16:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619740461; cv=none; d=google.com; s=arc-20160816; b=bFGJ+GYt2dtk4knSoroKFTnGrJs8LMS95srBdoochwImtjDe3siomgbbVayea4gC6b qkLzf4daeUVMGLlg4HCYq1KZxkeDQl5tFtoe4nIsDjEDpEE/wSqU7dR4Iyz4fT3mB31+ iZtLUtND9KETwzhyQIbUBFFZGK1yo7s2koKRta01PtsYdV0bdBxvWbJ6an9vkDwvHQql 4O3a+/9ppZAOkjRTkmvdVAIPcTJGqOgQ8BrbFCSZGhwrrGofFWacql8bi4k3EKtqOGzV qgVsg/J3BD03e7NInDohQok1WuuLE+8mjd7zoCG2QAzhz54qWIXZ9P0IT+CBaBpvPM6S UtPw== 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=iXnWCRl8c0ZbS3V9zipcpge4fyvoK9BQ1ATAi7Ar3c8=; b=fx1FKsYiFoyP8dbuaNLXLAwqZbYJWHGGgLSk3BZU92ppZ5MTo49tbKVQwghMx/0gps lnk1RHAsQ1pugn5wkCYMRZNk+dxAL/t0P/UajoiJ2bvRMGBIHaE4u9sTV6/1IUuQQZiN rdheIgowzQb1E1X9e8Vx5NMZZVb+Cq2dipi7o6oxlSTOAkaoHw1RnGUYfrfyq6YNXUSg sq3QfkGNY6S6ZNTKHcjefqc7J5u1zZpElCYzC6DbG0nLyCdDs4Xzy8tMdDJm1BOcmqdG I/ULgpwkympUSd46lo3BumGDuPuXczGPIVQLQq6epAnvljWNmcIBvZiqALUI8kauJPQo JRfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pWioEk+1; 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 c15si200820jag.124.2021.04.29.16.54.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Apr 2021 16:54:21 -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=pWioEk+1; 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]:54124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcGU8-0002BF-WA for patch@linaro.org; Thu, 29 Apr 2021 19:54:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcGIS-0005hD-FD for qemu-devel@nongnu.org; Thu, 29 Apr 2021 19:42:16 -0400 Received: from mail-qk1-x72a.google.com ([2607:f8b0:4864:20::72a]:41817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcGIH-0004K9-21 for qemu-devel@nongnu.org; Thu, 29 Apr 2021 19:42:15 -0400 Received: by mail-qk1-x72a.google.com with SMTP id 8so35301632qkv.8 for ; Thu, 29 Apr 2021 16:42:02 -0700 (PDT) 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=iXnWCRl8c0ZbS3V9zipcpge4fyvoK9BQ1ATAi7Ar3c8=; b=pWioEk+1tpL3rsQ5Fjuhzt4fDbQbJRkC+xo4RoII/nvBKaEIeMVcbY8I1oGfiLzcLg YMdhKnX8HW8FGGMBysKDkGEhdwCxptY2TDnb/M12RJ0WUWFfbbF4yIKp+uILkTdsi4zt Kl8zyj/dKlX/HOfXGUpZ9fMBXFJtdwZLZH0XE7DjBbXyAS353PQECzovaQWbiHLPvYyC sINP6cf/mVp9npdggr7GUb08O43s7E/ZNarA4yXrWxftUEtoxsrDiT6jzBwudidtrxtk DmZvZSIu2VyOlk36kQr5hleA5dYjRzFydTlgxSbyHqb8aN3rye4093svjBkJPu/L+AP9 6PjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iXnWCRl8c0ZbS3V9zipcpge4fyvoK9BQ1ATAi7Ar3c8=; b=C7m0hCX8RORKqkonc+tm1oQB4xkQEp6IovlGtfEykVINmWfT3xmwEWEYrTzh6C3e6x uoIQAa76UB5cGHPNAvdzAV9Q6Rtb/JYyxJK2WFydJoRdNt/S14Kv8wwnd7zk+4lkzSXh xBuc0UJrIzu6uj6Cd0n9jZ5RsUBw/8xnjDJVIaPXKy9wqkYLcoLkiEOh0zX51ui+soqY QNzQHxIGy4o4MIQlC5IM4alPYBhvQsJOAacqfTPNhny3ecqAssHx7GfGjJglI6POJ9VC gTIi7T5SbeyY1lTLKyw+cggw+A7mZzP647NqFs3sujS7i24Cs7pnYSZa3ZMovqpZ378L MPfg== X-Gm-Message-State: AOAM531GpYHUKl9kRnRTN8YaXoIBPV6/feL+pmBORYfr6vlqNW9TVw5S KRes/z7J36iQ4quocCiR9iDp4w== X-Received: by 2002:ae9:ef01:: with SMTP id d1mr2372952qkg.483.1619739722320; Thu, 29 Apr 2021 16:42:02 -0700 (PDT) Received: from localhost.localdomain (bras-base-stsvon1503w-grc-23-174-92-28-28.dsl.bell.ca. [174.92.28.28]) by smtp.googlemail.com with ESMTPSA id i2sm1093229qtg.0.2021.04.29.16.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 16:42:02 -0700 (PDT) From: Shashi Mallela To: peter.maydell@linaro.org, leif@nuviainc.com, rad@semihalf.com Subject: [PATCH v3 0/8] GICv3 LPI and ITS feature implementation Date: Thu, 29 Apr 2021 19:41:53 -0400 Message-Id: <20210429234201.125565-1-shashi.mallela@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72a; envelope-from=shashi.mallela@linaro.org; helo=mail-qk1-x72a.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This patchset implements qemu device model for enabling physical LPI support and ITS functionality in GIC as per GICv3 specification. Both flat table and 2 level tables are implemented.The ITS commands for adding/deleting ITS table entries,trigerring LPI interrupts are implemented.Translated LPI interrupt ids are processed by redistributor to determine priority and set pending state appropriately before forwarding the same to cpu interface. The ITS feature support has been added to sbsa-ref platform as well as virt platform,wherein the emulated functionality co-exists with kvm kernel functionality. Changes in v3: - review comments addressed Shashi Mallela (8): hw/intc: GICv3 ITS initial framework hw/intc: GICv3 ITS register definitions added hw/intc: GICv3 ITS command queue framework hw/intc: GICv3 ITS Command processing hw/intc: GICv3 ITS Feature enablement hw/intc: GICv3 redistributor ITS processing hw/arm/sbsa-ref: add ITS support in SBSA GIC hw/arm/virt: add ITS support in virt GIC hw/arm/sbsa-ref.c | 26 +- hw/arm/virt.c | 27 +- hw/intc/arm_gicv3.c | 6 + hw/intc/arm_gicv3_common.c | 13 + hw/intc/arm_gicv3_cpuif.c | 20 +- hw/intc/arm_gicv3_dist.c | 21 +- hw/intc/arm_gicv3_its.c | 1247 ++++++++++++++++++++++++ hw/intc/arm_gicv3_its_common.c | 11 +- hw/intc/arm_gicv3_its_kvm.c | 2 +- hw/intc/arm_gicv3_redist.c | 163 +++- hw/intc/gicv3_internal.h | 186 +++- hw/intc/meson.build | 1 + include/hw/arm/virt.h | 2 + include/hw/intc/arm_gicv3_common.h | 6 + include/hw/intc/arm_gicv3_its_common.h | 40 +- target/arm/kvm_arm.h | 4 +- 16 files changed, 1738 insertions(+), 37 deletions(-) create mode 100644 hw/intc/arm_gicv3_its.c -- 2.27.0