Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1840099ybb; Sun, 29 Mar 2020 14:58:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsc6w8anPW0/vqmDFJtL6di1nBSNiCog/wfasikrgISwpXefWYR7L2PCBR8uExrYhWgDQZY X-Received: by 2002:aca:d44d:: with SMTP id l74mr5911772oig.83.1585519101240; Sun, 29 Mar 2020 14:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585519101; cv=none; d=google.com; s=arc-20160816; b=n3Abv5PhFoME/COwfpuOxoM8JLm+HPb6wIjtGXHzeXlOyHW7mvOvmo4+WZeoq3G4+e uHbpd6/Ef8I/k7rdwKvwtanpGcFDJ5qHVp4bvcZT9rP3bbgCWk5N2X8XPokEYFChOdwV 3UdEX3asrvZPBx18qC+IhmYd7Lw4lluBu36/6HGiBQe5PxpW4XUXra2seVAsZUznPptG g0ZkCbtu/abfS0eZP1cUW9hgzZUEwYsxZMci0PC9e4ngXGXbTv+TFHvIpLwcexrk3dw8 hR/v4ytnl2n1+9doIm6kVtMo/T2wKqnYnOt5lz74rJx9vgJlA6dYAJhObtcXMEC7eir1 ygEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=/fWityNgN7WLW/t6J0qiXSiq9qGEsl06tdmM9u0NHU4=; b=e4wUd1krHTjFHxPDZRDOpqGCaAwpUOA7Cv/spau1U86GJOqBrOW2bdh17nlrRQYVwm Rs+KZj2LKI2PI9RCl1EZzgVV2UBE9tfeF0K5isZU6kXwYMgL8Ib92fFWupKV8880Axih LG8LGR1yNOXgf4Es0KZzRMVwB4H7cTnxRFtqb5KLS1CpzGpgsVgP+av4g543s/9KR1Gm RwRNliM1G6VKx5z1LSmDmF6uhtzFSrfgxGlpwqsRti/u6iiY+y8fjn4pjd7sDstpVbzZ jZf7LGUjbXQjokmw6MQTe6930ss2F30ruI/yagCkd98Xya6R5pHpcIUq5hMGehvqp+JV 4G3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c20si5481833otn.247.2020.03.29.14.57.55; Sun, 29 Mar 2020 14:58:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729112AbgC2U1w (ORCPT + 99 others); Sun, 29 Mar 2020 16:27:52 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56986 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728857AbgC2U0X (ORCPT ); Sun, 29 Mar 2020 16:26:23 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jIeVe-0001Pc-Le; Sun, 29 Mar 2020 22:26:18 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 26C9D1C04E3; Sun, 29 Mar 2020 22:26:15 +0200 (CEST) Date: Sun, 29 Mar 2020 20:26:14 -0000 From: "tip-bot2 for Marc Zyngier" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/gic-v4.1: Advertise support v4.1 to KVM Cc: Marc Zyngier , Zenghui Yu , Eric Auger , x86 , LKML In-Reply-To: <20200304203330.4967-7-maz@kernel.org> References: <20200304203330.4967-7-maz@kernel.org> MIME-Version: 1.0 Message-ID: <158551357472.28353.8586602825466065584.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 3c40706d05fdea421e991da50e72a29d41131a66 Gitweb: https://git.kernel.org/tip/3c40706d05fdea421e991da50e72a29d41131a66 Author: Marc Zyngier AuthorDate: Wed, 04 Mar 2020 20:33:13 Committer: Marc Zyngier CommitterDate: Fri, 20 Mar 2020 17:48:38 irqchip/gic-v4.1: Advertise support v4.1 to KVM Tell KVM that we support v4.1. Nothing uses this information so far. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200304203330.4967-7-maz@kernel.org --- drivers/irqchip/irq-gic-v3-its.c | 9 ++++++++- drivers/irqchip/irq-gic-v3.c | 2 ++ include/linux/irqchip/arm-gic-common.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index fc57885..bcc1a09 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -4870,6 +4870,7 @@ int __init its_init(struct fwnode_handle *handle, struct rdists *rdists, struct device_node *of_node; struct its_node *its; bool has_v4 = false; + bool has_v4_1 = false; int err; gic_rdists = rdists; @@ -4890,8 +4891,14 @@ int __init its_init(struct fwnode_handle *handle, struct rdists *rdists, if (err) return err; - list_for_each_entry(its, &its_nodes, entry) + list_for_each_entry(its, &its_nodes, entry) { has_v4 |= is_v4(its); + has_v4_1 |= is_v4_1(its); + } + + /* Don't bother with inconsistent systems */ + if (WARN_ON(!has_v4_1 && rdists->has_rvpeid)) + rdists->has_rvpeid = false; if (has_v4 & rdists->has_vlpis) { if (its_init_vpe_domain() || diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 0f716c2..8c5de59 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -1764,6 +1764,7 @@ static void __init gic_of_setup_kvm_info(struct device_node *node) gic_v3_kvm_info.vcpu = r; gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis; + gic_v3_kvm_info.has_v4_1 = gic_data.rdists.has_rvpeid; gic_set_kvm_info(&gic_v3_kvm_info); } @@ -2079,6 +2080,7 @@ static void __init gic_acpi_setup_kvm_info(void) } gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis; + gic_v3_kvm_info.has_v4_1 = gic_data.rdists.has_rvpeid; gic_set_kvm_info(&gic_v3_kvm_info); } diff --git a/include/linux/irqchip/arm-gic-common.h b/include/linux/irqchip/arm-gic-common.h index b9850f5..fa8c045 100644 --- a/include/linux/irqchip/arm-gic-common.h +++ b/include/linux/irqchip/arm-gic-common.h @@ -32,6 +32,8 @@ struct gic_kvm_info { struct resource vctrl; /* vlpi support */ bool has_v4; + /* rvpeid support */ + bool has_v4_1; }; const struct gic_kvm_info *gic_get_kvm_info(void);