From patchwork Mon Jan 9 06:24:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jintack Lim X-Patchwork-Id: 9503853 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 95F2360757 for ; Mon, 9 Jan 2017 06:28:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86CE82811C for ; Mon, 9 Jan 2017 06:28:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B54C28335; Mon, 9 Jan 2017 06:28:56 +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=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18AF22823E for ; Mon, 9 Jan 2017 06:28:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942253AbdAIG2Y (ORCPT ); Mon, 9 Jan 2017 01:28:24 -0500 Received: from outprodmail01.cc.columbia.edu ([128.59.72.39]:38696 "EHLO outprodmail01.cc.columbia.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939893AbdAIG0m (ORCPT ); Mon, 9 Jan 2017 01:26:42 -0500 Received: from hazelnut (hazelnut.cc.columbia.edu [128.59.213.250]) by outprodmail01.cc.columbia.edu (8.14.4/8.14.4) with ESMTP id v096Q5jP017968 for ; Mon, 9 Jan 2017 01:26:36 -0500 Received: from hazelnut (localhost.localdomain [127.0.0.1]) by hazelnut (Postfix) with ESMTP id 9B3F480 for ; Mon, 9 Jan 2017 01:26:36 -0500 (EST) Received: from sendprodmail01.cc.columbia.edu (sendprodmail01.cc.columbia.edu [128.59.72.13]) by hazelnut (Postfix) with ESMTP id 7838380 for ; Mon, 9 Jan 2017 01:26:36 -0500 (EST) Received: from mail-qt0-f200.google.com (mail-qt0-f200.google.com [209.85.216.200]) by sendprodmail01.cc.columbia.edu (8.14.4/8.14.4) with ESMTP id v096Qak5041837 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 9 Jan 2017 01:26:36 -0500 Received: by mail-qt0-f200.google.com with SMTP id a29so74193751qtb.6 for ; Sun, 08 Jan 2017 22:26:36 -0800 (PST) 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=D4I/mN37msIs30SUT8FYmFHKqYeKvwJ3ljTXh2ni+zA=; b=rIDhoTih2oYB2rr99mTjZluTMD6O7YQ/HkTzc8XoomvyxNL7Cju9Gf9TWyyqUuyuuY XhE4gjYYtAroE2SdBITeewy4m7GlTvih31o52bBdW9vRKxOBOwU8QuUf/WK1HVO+QmvK y/fCeiQb78pSLyYTCCYhoj6MLRf9dHWXBuWxpVap37XqBRuY4gPJURES6Jj6grINKaoY PSQj3cDRxYKIzfyi7wkwwYFLDFK9jlDCmS6w1YXHtL6boGa7HaIU82DB+nGDyKYBbhdY nQMVigQvLLHkNyakNThOaLMG7rmKwxVu1f7ezIP+Zf2bDJNh0pF10NpTTJfqxoH+TkeT ZNUA== X-Gm-Message-State: AIkVDXIPfCpf/D7Q/GMSbcKCob5s2qsLJGYeWblXNFYfCEZXCqeGckMwNYPYsVrIumEKLJ7PnW10kDRbuuxaGI7F0dVMldmDAjVAJ3Q5vBNWR2231U6qYljIfAvmdK1EfB9hiERwIyGqDTc= X-Received: by 10.200.39.82 with SMTP id h18mr19011192qth.290.1483943195754; Sun, 08 Jan 2017 22:26:35 -0800 (PST) X-Received: by 10.200.39.82 with SMTP id h18mr19011166qth.290.1483943195626; Sun, 08 Jan 2017 22:26:35 -0800 (PST) Received: from jintack.cs.columbia.edu ([2001:18d8:ffff:16:21a:4aff:feaa:f900]) by smtp.gmail.com with ESMTPSA id h3sm8623257qtc.6.2017.01.08.22.26.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Jan 2017 22:26:35 -0800 (PST) From: Jintack Lim To: christoffer.dall@linaro.org, marc.zyngier@arm.com, pbonzini@redhat.com, rkrcmar@redhat.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, vladimir.murzin@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, james.morse@arm.com, lorenzo.pieralisi@arm.com, kevin.brodsky@arm.com, wcohen@redhat.com, shankerd@codeaurora.org, geoff@infradead.org, andre.przywara@arm.com, eric.auger@redhat.com, anna-maria@linutronix.de, shihwei@cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jintack@cs.columbia.edu Subject: [RFC 51/55] KVM: arm64: Expose physical address of vcpu interface Date: Mon, 9 Jan 2017 01:24:47 -0500 Message-Id: <1483943091-1364-52-git-send-email-jintack@cs.columbia.edu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483943091-1364-1-git-send-email-jintack@cs.columbia.edu> References: <1483943091-1364-1-git-send-email-jintack@cs.columbia.edu> X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.78 on 128.59.72.13 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Expose physical address of vgic virtual cpu interface. Signed-off-by: Jintack Lim --- include/kvm/arm_vgic.h | 1 + virt/kvm/arm/vgic/vgic-v2.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index 5bda20c..05c7811 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h @@ -331,6 +331,7 @@ static inline void vgic_handle_nested_maint_irq(struct kvm_vcpu *vcpu) { } #define vgic_valid_spi(k, i) (((i) >= VGIC_NR_PRIVATE_IRQS) && \ ((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS)) +phys_addr_t vgic_vcpu_base(void); bool kvm_vcpu_has_pending_irqs(struct kvm_vcpu *vcpu); void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu); void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu); diff --git a/virt/kvm/arm/vgic/vgic-v2.c b/virt/kvm/arm/vgic/vgic-v2.c index b8b73fd..5d85041 100644 --- a/virt/kvm/arm/vgic/vgic-v2.c +++ b/virt/kvm/arm/vgic/vgic-v2.c @@ -386,3 +386,9 @@ int vgic_v2_probe(const struct gic_kvm_info *info) return ret; } + +/* Return physical address of vgic virtual cpu interface */ +phys_addr_t vgic_vcpu_base(void) +{ + return kvm_vgic_global_state.vcpu_base; +}