Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2838673ybh; Mon, 16 Mar 2020 10:39:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvRrpSyWANWHEsPA0a0KyHtvEKlNW6x1I6cdSo8PGllvhB8nv07FndMDZ1kK0JA/yg/fuTH X-Received: by 2002:a05:6830:1d7:: with SMTP id r23mr323178ota.153.1584380360307; Mon, 16 Mar 2020 10:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584380360; cv=none; d=google.com; s=arc-20160816; b=JRbkLYbwlvuQCR75lSEisuQ3RdivBUGFRz7sLwN4BgJBuwf0/oLK9TJrSqXI3viZNk +W/X4nc9OI69ju3iFDssan8JhwO2FcwI0V5jPkAvzSf7cE2broLCWJdhv8KG9nTi4Yhl QwAr+1sIZLkej1M/qLsQZ7Pdt3+BnC0d9XmfnMFuNJtKS6cA15gYJvxGq+VRWrCn8YwV zbYSmMKrSklBZXmxcGfAVL6Bfcg7eR7qnQCcmjw3pckwiziSjj69tjl0gZF7GrUt7mSU GcX2NFAUg0Gqsw+FwvaE333sdle7yGloAy0W1wIlSqZnG6OhMqOFulUG3jUlNkDk3oPr T3JQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=msg6kUjRhvxAi8DnVd/GQrZEQ8stJK5YC+wnR0yoRxI=; b=IqfSjZcCY/k3xagZrqBTFk1iKq55A2N66rVKwoaz+oLORNnpmqow0cZZFTUhmK1KlQ RMyq0sIva/jZjVZsbpEipw8rKmt5m+r2ZWHBB/QlWW3o5n5lacblIj1tpumb1vzdCxU/ pGWXWsnaw+7pqBEBBDeNKYN5887j+Jvi0lgGgf6zBrityX5pZpICk18j5pO2HYhwsshu t1EWoKKNKIDRkuh89VqaG4hlTQXj6enJPJFjk70dxAoifJEqh1ESCfmiEinq2x02HJCe 0DP4d6EUZn/ND1eegQ2q8PnRsYiXlbafsVKKSRJGjjp3LAoy5OmBY2gkCPjWBTiz0+Hv uW/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SLsCS8I+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si243215oiy.229.2020.03.16.10.39.07; Mon, 16 Mar 2020 10:39:20 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SLsCS8I+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731937AbgCPRhr (ORCPT + 99 others); Mon, 16 Mar 2020 13:37:47 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:44874 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731731AbgCPRhr (ORCPT ); Mon, 16 Mar 2020 13:37:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584380266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=msg6kUjRhvxAi8DnVd/GQrZEQ8stJK5YC+wnR0yoRxI=; b=SLsCS8I+R19NJslzj1b5ZqtPNDk42Ra+KuHkXCMs/2p5/mygJqP19KcdMr+zZ+k734K+TO zs0sTz0Y7fdX8R0KK6yNJTEdS2mDNbvgCtUE8WyUvGxFSZXEqDUk2eXxv2HVhsGRKNEkTj iNZQZV7YoG6naeGd0jtj9m2Tw5QHZac= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-215-RNprkJGONFC63U9Ydr7DQQ-1; Mon, 16 Mar 2020 13:27:27 -0400 X-MC-Unique: RNprkJGONFC63U9Ydr7DQQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 84060915510; Mon, 16 Mar 2020 17:10:29 +0000 (UTC) Received: from [10.36.118.12] (ovpn-118-12.ams2.redhat.com [10.36.118.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E26CB9B900; Mon, 16 Mar 2020 17:10:25 +0000 (UTC) Subject: Re: [PATCH v5 06/23] irqchip/gic-v4.1: Advertise support v4.1 to KVM To: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lorenzo Pieralisi , Jason Cooper , Robert Richter , Thomas Gleixner , Zenghui Yu , James Morse , Julien Thierry , Suzuki K Poulose References: <20200304203330.4967-1-maz@kernel.org> <20200304203330.4967-7-maz@kernel.org> From: Auger Eric Message-ID: <12d3a655-1caf-39c0-7d80-f43b0d90677c@redhat.com> Date: Mon, 16 Mar 2020 18:10:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20200304203330.4967-7-maz@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 3/4/20 9:33 PM, Marc Zyngier wrote: > 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 Thanks Eric > --- > 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 fc5788584df7..bcc1a0957cda 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 ba405becab53..03e4eadefb00 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -1785,6 +1785,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); > } > > @@ -2100,6 +2101,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 b9850f5f1906..fa8c0455c352 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); >