Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp11972891ybl; Sat, 28 Dec 2019 02:42:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxebCyUjWFnoVczspMCs0QF+295CF3nzBf7BqHSQFcxU7quzlHF1Jz0pJ9LU5oSzkUr56qp X-Received: by 2002:a05:6830:1401:: with SMTP id v1mr31463257otp.360.1577529765280; Sat, 28 Dec 2019 02:42:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577529765; cv=none; d=google.com; s=arc-20160816; b=DhUoL/FiWQ+YCKIK1HKqpGzq7pF4QBJqBfnuX6PxFkxMdw/kCqSoYCVvnqW2RFB9Vb EJ0jynfCxH+WkX56rL7dLDh/wEYJtC9E4prOt14z9oiy4YaGOjA653pChm+0creh9/kL M+ZTu9e/PQZF07G8wNj9PbywuOHwIG8YSJBMsln554sx56XI8F0T9Jp1MzDF2U5sB3Mk DBvr3uPKtDazwmnwnnAaKV4WOemDO8f7u5UQg7LExgy63crULxcqVpVLpcu7+RRlDlZJ qIE01tiCje2sP79VrjTOXH823rlyYzscfF5AhHwBqrAIiwluJVF1RtwgdQ2Wc4GQ4Zvj Nh7A== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=hA48fsfZ5/M5ZjiAl73lJeT0dbiHltz5iGYq3JlXOeE=; b=Ut40ktQFK0wWoCGYp9WHKRuW0l5FR4ajpu0hka9uzwFNbsB/SwnveWvYSVTKQGl+Zc gbmAjguSNqTf3cYcPfVSeOs11HSHHp+/3G7vxWdB0/qtFrqAT+kTjbywHQeZ+JYPwFni 2Lg4ccquQ9jVYdrmpeBnCSHv/juF4mvaO0ls9tgcy2lmn8FKYyT4cuYAOAU4DL3XhRy6 3egvmCBm4dL2cr7hludMjbGgkVeDkAsRT8dLVhONCWd6ZUWB1x3GksRSJucTj1JalQPU IaYkOK5dRrVcXsQpim2qYHBRb0cl4nLI8TRzL9GgwElxzGLJnME6u333LkvtgdoEX08a shbQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i140si18344248oib.90.2019.12.28.02.42.33; Sat, 28 Dec 2019 02:42:45 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726307AbfL1Klx (ORCPT + 99 others); Sat, 28 Dec 2019 05:41:53 -0500 Received: from disco-boy.misterjones.org ([51.254.78.96]:53316 "EHLO disco-boy.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbfL1Klx (ORCPT ); Sat, 28 Dec 2019 05:41:53 -0500 X-Greylist: delayed 300 seconds by postgrey-1.27 at vger.kernel.org; Sat, 28 Dec 2019 05:41:52 EST Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1il9XY-0003x6-Oe; Sat, 28 Dec 2019 10:41:48 +0000 Date: Sat, 28 Dec 2019 10:41:47 +0000 From: Marc Zyngier To: Zenghui Yu Cc: , , Eric Auger , James Morse , Julien Thierry , Suzuki K Poulose , Thomas Gleixner , Jason Cooper , Lorenzo Pieralisi , "Andrew Murray" , Robert Richter Subject: Re: [PATCH v3 28/32] KVM: arm64: GICv4.1: Add direct injection capability to SGI registers Message-ID: <20191228104147.0e658aa9@why> In-Reply-To: References: <20191224111055.11836-1-maz@kernel.org> <20191224111055.11836-29-maz@kernel.org> Organization: Approximate X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, eric.auger@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, tglx@linutronix.de, jason@lakedaemon.net, lorenzo.pieralisi@arm.com, Andrew.Murray@arm.com, rrichter@marvell.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 28 Dec 2019 17:19:36 +0800 Zenghui Yu wrote: > Hi Marc, > > On 2019/12/24 19:10, Marc Zyngier wrote: > > Most of the GICv3 emulation code that deals with SGIs now has to be > > aware of the v4.1 capabilities in order to benefit from it. > > > > Add such support, keyed on the interrupt having the hw flag set and > > being a SGI. > > > > Signed-off-by: Marc Zyngier > > --- > > > diff --git a/virt/kvm/arm/vgic/vgic-mmio.c b/virt/kvm/arm/vgic/vgic-mmio.c > > index 0d090482720d..6ebf747a7806 100644 > > --- a/virt/kvm/arm/vgic/vgic-mmio.c > > +++ b/virt/kvm/arm/vgic/vgic-mmio.c > > @@ -290,6 +345,20 @@ void vgic_mmio_write_cpending(struct kvm_vcpu *vcpu, > > > raw_spin_lock_irqsave(&irq->irq_lock, flags); > > > + if (irq->hw && vgic_irq_is_sgi(irq->intid)) { > > + /* HW SGI? Ask the GIC to inject it */ > > Shouldn't this be "Ask the GIC to clear its pending state"? yeah, a silly copy-paste mistake, thanks for spotting this! > Otherwise looks good! Thanks for taking the time to review this work! M. -- Jazz is not dead. It just smells funny...