From patchwork Tue May 24 09:09:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9133229 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 93FFD607D3 for ; Tue, 24 May 2016 09:20:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8821D27BF0 for ; Tue, 24 May 2016 09:20:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D53C2824F; Tue, 24 May 2016 09:20:52 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B18127BF0 for ; Tue, 24 May 2016 09:20:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b58VI-00046A-T4; Tue, 24 May 2016 09:19:56 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b58M3-0006kN-Li for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2016 09:10:26 +0000 Received: by mail-wm0-x22a.google.com with SMTP id a136so62240167wme.0 for ; Tue, 24 May 2016 02:10:03 -0700 (PDT) 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=Yu8b05Xzxd3H9K9NXkTpDqx77buHwboFtrQYfiGuY7I=; b=cLyS0EpNBIKWbpcfPartkaQKdjPjOZ90Hgr3TWzlUJ0eElzmen4iZgqsSZs2F8lFhJ yMwlJ3/l7G4gU9F1+hUv7SwALWGUqvaQcKp39CY6ByQdd9LN3aGkfxGTEV70kgKWzupy GpvLtcowwTTGZVNoHlHtwAdaEauX4R2QeafV0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Yu8b05Xzxd3H9K9NXkTpDqx77buHwboFtrQYfiGuY7I=; b=QktdQiIH68WBsbBAQu5h9xJdVqKDRxrSremxbf4hzLVm3//9cb4pA5ZWIwny4rTx29 FdC/10BTwt2g9mWbfrWNuOzCciUQv0JqbT37cmMw0juMgKkG5FrkDlTNoGOKifdL/lkk wraIiSTgUZ7vzdFKDBPKSnHh7wRrLiI2l7xcijajg3kuOrOrL7mFLgyjn1NMJzV4ukps b1975/tkYLPvkU8TLjZmRRkR9WPxVjXAqamGNeAjIMJgGW3HcbRTrZ2/EZz1hPzJ6Wl4 U/OL3UvZLBZzLr0pMm271gp2HAXaz6XzschsAU7DxQeMouL8vrEaNdrIrsj0Q3JMtfth hJzw== X-Gm-Message-State: ALyK8tJddkTu50cT30kN0Wplq4XWpvm93h7IFqS0n6MQOc+gYSyYEbou1FkLBzYfcKL9K8Yj X-Received: by 10.194.120.69 with SMTP id la5mr3367340wjb.152.1464081001902; Tue, 24 May 2016 02:10:01 -0700 (PDT) Received: from localhost.localdomain ([94.18.191.146]) by smtp.gmail.com with ESMTPSA id f11sm18163246wmf.22.2016.05.24.02.10.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 May 2016 02:10:01 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 07/59] KVM: arm/arm64: arch_timer: Remove irq_phys_map Date: Tue, 24 May 2016 11:09:01 +0200 Message-Id: <1464080993-10884-8-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.1.2.330.g565301e.dirty In-Reply-To: <1464080993-10884-1-git-send-email-christoffer.dall@linaro.org> References: <1464080993-10884-1-git-send-email-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160524_021024_083694_4EFC0E64 X-CRM114-Status: GOOD ( 13.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Andre Przywara , 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: Andre Przywara Now that the interface between the arch timer and the VGIC does not require passing the irq_phys_map entry pointer anymore, let's remove it from the virtual arch timer and use the virtual IRQ number instead directly. The remaining pointer returned by kvm_vgic_map_phys_irq() will be removed in the following patch. Signed-off-by: Andre Przywara Reviewed-by: Eric Auger Reviewed-by: Christoffer Dall --- include/kvm/arm_arch_timer.h | 3 --- virt/kvm/arm/arch_timer.c | 10 ++++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h index b651aed..a47b7de 100644 --- a/include/kvm/arm_arch_timer.h +++ b/include/kvm/arm_arch_timer.h @@ -53,9 +53,6 @@ struct arch_timer_cpu { /* Timer IRQ */ struct kvm_irq_level irq; - /* VGIC mapping */ - struct irq_phys_map *map; - /* Active IRQ state caching */ bool active_cleared_last; }; diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index e45895a..458d4d8 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c @@ -175,10 +175,10 @@ static void kvm_timer_update_irq(struct kvm_vcpu *vcpu, bool new_level) timer->active_cleared_last = false; timer->irq.level = new_level; - trace_kvm_timer_update_irq(vcpu->vcpu_id, timer->map->virt_irq, + trace_kvm_timer_update_irq(vcpu->vcpu_id, timer->irq.irq, timer->irq.level); ret = kvm_vgic_inject_mapped_irq(vcpu->kvm, vcpu->vcpu_id, - timer->map->virt_irq, + timer->irq.irq, timer->irq.level); WARN_ON(ret); } @@ -276,7 +276,7 @@ void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) * exit. */ phys_active = timer->irq.level || - kvm_vgic_map_is_active(vcpu, timer->map->virt_irq); + kvm_vgic_map_is_active(vcpu, timer->irq.irq); /* * We want to avoid hitting the (re)distributor as much as @@ -378,7 +378,6 @@ int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu, if (WARN_ON(IS_ERR(map))) return PTR_ERR(map); - timer->map = map; return 0; } @@ -504,8 +503,7 @@ void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu; timer_disarm(timer); - if (timer->map) - kvm_vgic_unmap_phys_irq(vcpu, timer->map->virt_irq); + kvm_vgic_unmap_phys_irq(vcpu, timer->irq.irq); } void kvm_timer_enable(struct kvm *kvm)