From patchwork Mon Nov 13 09:17:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10055399 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 28E6660586 for ; Mon, 13 Nov 2017 09:27:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1742C29333 for ; Mon, 13 Nov 2017 09:27:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AC522933C; Mon, 13 Nov 2017 09:27:28 +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 86D7029333 for ; Mon, 13 Nov 2017 09:27:27 +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=kF/VDT+9MF5cPoscxjzELD7UsgG+vMvVGnr+/EIE5gI=; b=WceGZFQvU55Avs4jekzjeluA63 XOAgPAfM1PIJnhCrumNEPOMHNUfe2QCkcsMxC3axELTi/a1Mkv8VDSbNZqIbqXdUwkVNeMwGo2vUl +TaN5HAN2Ddhn4kcM/1noyfZ1tyKyZuSfWoowjRaM4hMSUuRkh5aBStl4/xEz6dxvkWi53rHXeDVS gYnXZ08sLOjX12d4gBdZMLDJxCUqK6IpNYz+rcAuL5k5WdubgyK+jCGidzkzWNlf2hpDGl0iMs8V/ 4LapmYre8SRcQkdzHqZEt4UGZsNVJYgBucLD0sBjVtFIel6Eje9tVJLxGykk6pt3sSaPPGEqI9CH1 PNIHHbOQ==; 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 1eEB1a-0003kt-M3; Mon, 13 Nov 2017 09:27:26 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEAt0-00027n-A4 for linux-arm-kernel@lists.infradead.org; Mon, 13 Nov 2017 09:18:41 +0000 Received: by mail-wm0-x243.google.com with SMTP id r68so13645909wmr.3 for ; Mon, 13 Nov 2017 01:18:13 -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=P0pPnCUhvO5dPAtp0soosAA9ZOSOcBs+a0HbkH6nURc=; b=aOdgNensvCy9Qe0pxt4Kttxtf8OOGjjqofI5JpJ3eVgQH2et/ZPrhenkqwBHNjVma5 rlg8Rxyr1CQAzaP7FtDLTtaaLdJJcwTkkn+TzZrq82GieLpSOPo51H2j1OI31N5pOggs 0jdhprr+ruiJ2cOoav0YRot+zM8KOGiZ2IJ08= 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=P0pPnCUhvO5dPAtp0soosAA9ZOSOcBs+a0HbkH6nURc=; b=U3ULmLUKChu0O5N67AGVS0Hxstu2Kj5HqVHCxSPvDP2KyooRXahzg/MVbYKqtk6o4R zuPGXodmImxeCAQxUePjKPUxjT5Kr+cIpgcIxq9xeKSovpbWauADcl6tgRt8nLg8NFDM u2jMp4Zh161SfGFBRIHKuMiDF+3Of45tw2aS4BXi1uk8+95vfcdnjmMiCAbL5ZNcOw1S VkNVyRQxzGe4bPDcTpztB1X+qHs3ctpK9lfs0nk3hC5CusEd4P8Fh1ZikALyLAxIj9aJ Lsf3Tk6HqQFDVl37KgTvGX8N6svOT1+tgDzwypATcYIYTZ3xghXR8fCD5DsvMNHKjswP mmLg== X-Gm-Message-State: AJaThX61modnKWMi58iRFe0EoCkuY/WsPKt/FF1YiTaYpgFA5RNzgkBQ KAUUSaKm7lKgcP6CaUTQCNPZ4QfSj2A= X-Google-Smtp-Source: AGs4zMaPOFnfxTzgnQ/NIkwoCH0mWs/nxnE/LoiFtrYHsID8zy3LZEXrkEz9lSUCyFWD+gx1ZSHzQw== X-Received: by 10.28.110.14 with SMTP id j14mr5673417wmc.46.1510564692496; Mon, 13 Nov 2017 01:18:12 -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.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Nov 2017 01:18:11 -0800 (PST) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 13/27] KVM: arm/arm64: GICv4: Handle CLEAR applied to a VLPI Date: Mon, 13 Nov 2017 10:17:38 +0100 Message-Id: <20171113091752.10663-14-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_011835_200427_1A1CA4E2 X-CRM114-Status: GOOD ( 10.03 ) 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 From: Marc Zyngier Handling CLEAR is pretty easy. Just ask the ITS driver to clear the corresponding pending bit (which will turn into a CLEAR command on the physical side). Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- virt/kvm/arm/vgic/vgic-its.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index 80bea7021e2e..15e79285380d 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -1091,6 +1091,10 @@ static int vgic_its_cmd_handle_clear(struct kvm *kvm, struct vgic_its *its, ite->irq->pending_latch = false; + if (ite->irq->hw) + return irq_set_irqchip_state(ite->irq->host_irq, + IRQCHIP_STATE_PENDING, false); + return 0; }