Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3572183pxv; Mon, 19 Jul 2021 03:41:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh1hqrh43pSUyByQaReQ+T3jhvWtU50Wal25bKlL6TsGVCD7tsY0SYyjAd325eFF4ZYCll X-Received: by 2002:a5e:d911:: with SMTP id n17mr18665559iop.178.1626691298381; Mon, 19 Jul 2021 03:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626691298; cv=none; d=google.com; s=arc-20160816; b=wUya3pnCgwIXFab6Y9BJejvrYwBRwx4xawjYlNHPxbOpH1iUaOkiZu9GygUCDgFWNX p+HTnaxjHuMcpNz/sw8bPA74e1QvFjwCp49NcjNzJfnsE98t9eIObItm5rlUxyJMtaM6 EcT1WcqxAo31rm0pJzWTC7s+8NAmO6pMc90guJ7oOtmklE6e2LQ460C39fiBZQLonxEM AQxzoRlsLpg+qP5kklVssdDclOs6oUhM5LO59akuwI9C/3F0tyHKj1xUqloHjriFrv+X 7bguq85tNNEGrcWRjK9w59aACixSOMpYsq0aDZ1vbWBfG5X8mm18et5U1PazJpH2Yv6Q FykA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=s/ZemnXJKc0aOymBhcyy38JOzgrqzig3Vjf8ok8Eu+0=; b=Jyz7qR+OJygywCL8ELt3Pq9DQZqdO/CNxv5U+Xk1gxDi74474jKP8XbvL8yId+rHCr Zr/q5dad7H38FQgZWCxcmhev9UnV3yrjeVNNP7rq302LaT0Y0zc2JC8scZwi+tGwaoVx jXOParyTqkzMi6+KhBO/krlG0iULdN1f8trmHux8HhLXsVfyGaeX2Q+Gg3V6zUS9HJsp E2t5J+BZbZsTOWMW9nih8T7ZWnDA/v4bSh3pfhHV0nvVDeLFn2VkcTA692dCKBDEvRPO dwVY1S3AM6k/BRwCCmFAdmLixMQrYmetjRXh/ObuZ6RXoLZb2b1Z++8iV5cJlwzgVVpp 3dyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si19789919jad.79.2021.07.19.03.41.26; Mon, 19 Jul 2021 03:41:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236332AbhGSJ7O (ORCPT + 99 others); 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.