From patchwork Mon Nov 13 09:17:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10055385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD6A160586 for ; Mon, 13 Nov 2017 09:24:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B66A428951 for ; Mon, 13 Nov 2017 09:24:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A85C628CDD; Mon, 13 Nov 2017 09:24:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4424D28951 for ; Mon, 13 Nov 2017 09:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=82Cm7DcMEE/n+zpN/duMPWo88UUctxYI8lexac4LVrk=; b=l0es9oQQvE28GLmnQGQHZjaTvI mXmTy1L/UPZA8HTnFCUp8coDNPbEhStU/bqwhh3dK3ETxZxH3cX0ZoHaf0whsLlOjmbJtvTHurkzA Scg/Zzo0+RiQ94Rv78AFXnMjQNscsZ/CigGK5VYyokqq4vcVvpV39RGBEEKg7mvYVWTZ7Mhi5Ttp5 HAKvZHhzqJkwAEWKMQnKkXygY67Wp1PCgV71+wx2ofzASjKaBupniHvevEiSnkhojga9mfU8QWOIg 2B6R9Y6YT+yDHBUNW/C9RzOjCP02BeWPx9CmbDCZWGcb++nCdOYnvaGtuNkw80fagP7AZK1YGYvY6 148UvNOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eEAyr-0000ZN-7Y; Mon, 13 Nov 2017 09:24:37 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEAtN-0002Ym-UW for linux-arm-kernel@lists.infradead.org; Mon, 13 Nov 2017 09:19:03 +0000 Received: by mail-wm0-x244.google.com with SMTP id v186so4794263wma.2 for ; Mon, 13 Nov 2017 01:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vbMqkEffOVV7e62Tyz+idrVXCrBv5n93lZeucVcrxrk=; b=Zr9HzEJ/zfiycOcVj5Et0Tl9zDhUSLElXm49/jmK9HlxV7juSRGPhSNxEj2oUG1J/U zfG/R+uZ2kcm9NspC39+KAAyorv1XhykUAVhhEV5pSVlG7hcvl1vde7TqJQA6a8/lAGn mGUmLu/KAjfaKIp4xoJlqS6agDyaNHxz5rH4g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vbMqkEffOVV7e62Tyz+idrVXCrBv5n93lZeucVcrxrk=; b=tDjjSsNoisLDTN/8MstVdSPUL+au8pItbJyn1/njGfXuI4nMnNnhzgjnPLDCReS5c2 7+JLFkvNhcTR0jn/PDWO7ivTpo87NdlkEu5BA1fwjvG8riQ/2vzRrD7cSpiGu4RF9al+ GTva/70ez573f24dq+haoES1v5TRJl/KZbe95XTzQrycpg2CpDz3IuweIwjw6tTg+FrA sCBkHlIxM6BA2Cwl4VBAw2pkVT32JO0OWt8JYRvXPU1H/RIF5UmY2QSzVlM8EljRYZWO Df4CLZmc/FZV2wHPQTRsmBn5pQ2JFLfV5ZEoimskssg9usWxW2F3i47Sy/DpKL/h19KJ 8NwQ== X-Gm-Message-State: AJaThX7hH+myypCsIV30iCggKijQLExOz4aEe18bx/O1SX2bCbqsB0Ne yhGoX7NOh3fF1X+DVSPG+uoArqxuDmk= X-Google-Smtp-Source: AGs4zMbCM38h7Pms5WBlAZ7N6ygbt8HQy3foRulACPInhMk5SXNh4OJOYmXlLZH43/feC+jH9Eobig== X-Received: by 10.28.140.15 with SMTP id o15mr5594782wmd.8.1510564716138; Mon, 13 Nov 2017 01:18:36 -0800 (PST) Received: from localhost.localdomain (xd93dd96b.cust.hiper.dk. [217.61.217.107]) by smtp.gmail.com with ESMTPSA id x63sm9651399wma.39.2017.11.13.01.18.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Nov 2017 01:18:35 -0800 (PST) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 27/27] KVM: arm/arm64: Don't queue VLPIs on INV/INVALL Date: Mon, 13 Nov 2017 10:17:52 +0100 Message-Id: <20171113091752.10663-28-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171113091752.10663-1-christoffer.dall@linaro.org> References: <20171113091752.10663-1-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171113_011858_544861_40092826 X-CRM114-Status: GOOD ( 10.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Christoffer Dall , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since VLPIs are injected directly by the hardware there's no need to mark these as pending in software and queue them on the AP list. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall --- virt/kvm/arm/vgic/vgic-its.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index c93ecd4a903b..a3754ec719c4 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -292,11 +292,14 @@ static int update_lpi_config(struct kvm *kvm, struct vgic_irq *irq, irq->priority = LPI_PROP_PRIORITY(prop); irq->enabled = LPI_PROP_ENABLE_BIT(prop); - vgic_queue_irq_unlock(kvm, irq, flags); - } else { - spin_unlock_irqrestore(&irq->irq_lock, flags); + if (!irq->hw) { + vgic_queue_irq_unlock(kvm, irq, flags); + return 0; + } } + spin_unlock_irqrestore(&irq->irq_lock, flags); + if (irq->hw) return its_prop_update_vlpi(irq->host_irq, prop, needs_inv);