From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43936C12002 for ; Mon, 19 Jul 2021 10:39:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D4AB6101E for ; Mon, 19 Jul 2021 10:39:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236347AbhGSJ7O (ORCPT ); Mon, 19 Jul 2021 05:59:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:45398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236316AbhGSJ7N (ORCPT ); Mon, 19 Jul 2021 05:59:13 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E6DBD60FF4; Mon, 19 Jul 2021 10:39:53 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m5Qgh-00EBhL-B8; Mon, 19 Jul 2021 11:39:52 +0100 Date: Mon, 19 Jul 2021 11:39:50 +0100 Message-ID: <87mtqik2o9.wl-maz@kernel.org> From: Marc Zyngier To: Shaokun Zhang Cc: , wangwudi , Thomas Gleixner Subject: Re: [PATCH v2] irqchip/irq-gic-v3-its: Add the checking of ITS version for KVM In-Reply-To: <6a2aaa52-ef36-f462-5108-6ac53bc497d9@hisilicon.com> References: <1624342353-24595-1-git-send-email-zhangshaokun@hisilicon.com> <6a2aaa52-ef36-f462-5108-6ac53bc497d9@hisilicon.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: zhangshaokun@hisilicon.com, linux-kernel@vger.kernel.org, wangwudi@hisilicon.com, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Jul 2021 06:39:50 +0100, Shaokun Zhang wrote: > > Hi Marc, > > A gentle ping. > > Thanks, > Shaokun > > On 2021/6/22 14:12, Shaokun Zhang wrote: > > From: wangwudi > > > > The version of GIC used by KVM is provided by gic_v3_kvm_info. The > > KVM that supports GICv4 or GICv4.1 only checks GIC version. Actually, > > the GIC and ITS need to work together. If we have multiple ITSs and > > GIC supports v4, there are two cases: > > 1. None of the ITS supports GICv4, gic_v3_kvm_info.has_v4is false, > > so the KVM will use GICv3; > > 2. At least one ITS supports GICv4, gic_v3_kvm_info has_v4 is true, > > so the KVM can use GICv4; > > > > It is the same as GICv4.1. For the first case that the KVM can use > > GICv4, it seems non-sensible. If we do check the ITS version, it > > will give correct version for KVM. So add the checking of ITS > > version for KVM: If and only if both GIC & ITS support GICv4, > > gic_kvm_info.has_v4 is true. If and only if both GIC & ITS support > > GICv4.1, gic_kvm_info.has_v4_1 is true. What you don't explain here is what goes wrong. If there is no ITS that supports GICv4.1 while the CPU interfaces and the RDs are advertising this support, so be it. So please explain what goes wrong, and whether there is any platform in the wild that is showing this problem. Thanks, M. -- Without deviation from the norm, progress is not possible.