From patchwork Tue Feb 27 11:34:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10244873 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 82EFA60208 for ; Tue, 27 Feb 2018 11:35:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7690A28833 for ; Tue, 27 Feb 2018 11:35:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AE3C28845; Tue, 27 Feb 2018 11:35:44 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 ED58028833 for ; Tue, 27 Feb 2018 11:35:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753161AbeB0Lfl (ORCPT ); Tue, 27 Feb 2018 06:35:41 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54634 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753153AbeB0LfZ (ORCPT ); Tue, 27 Feb 2018 06:35:25 -0500 Received: by mail-wm0-f66.google.com with SMTP id z81so23375754wmb.4 for ; Tue, 27 Feb 2018 03:35:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=christofferdall-dk.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=dSA8omzJ2+kofC6e8Q4yTsh62owwkgl6qHwGTitKeVQ=; b=A+K6J80vdWfLqKMa6oALZu8sZBCZf7a5Hhs+RMIMqCxiEjxL4cdV3p4ojJwWI0WaIv 1DHv+CW/iRDTYHU7bAr4gRAKZH+/cQyA8KzMMt4iAfEK8sprSRPxlm0QlM7PnKQJOdIf fiMHMspBBfg/dOPrUkQDUYvThMx6D0b/PuUg2kLJ0cAi95wIR1RJzQpUDLpR11bK+wjX A3vUk18wtwqQjZZBhN7WEx+mwiCYYwA8EiNrfhKYMf7g/1/Z7sg05f1Kh3y0rwkpXJMW vJ2nkuWW5sEeCks8k+TPzyOWVNH+llls4CP5IQ9biv92Br2Y2EoW/ywUfIN6jRfKgVQD Qmwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=dSA8omzJ2+kofC6e8Q4yTsh62owwkgl6qHwGTitKeVQ=; b=rd7TgAYiD6ia3HiU5HiYGms45lbvnRLq2rx4OT2xKpa1iiprM+7/goq3e1aJbwQnKh 9VEptagnDpPJu+rIH2W6o0bXbMpeczIT+QIe44Iw1ASgXp9+YzSg0/owPkWa/gwA841F gRuWj+pEQPgahm/pQFj0eQ0sWbYbexdXLyFzH1C3sAtVEr49IC1jKu0lTKWXBrRKRdTz uSRD8w4TB3mnyORjYuUO2J1daVXpyKcGQHd1cHCZSiwWqzwiI7AKA9z0OyeGiNKRerW0 v4nB3+cg4sKplPKUMPTP+0IX1aG3gH4Qj14LumOyOOkQjlvaBErOnQvIZU3MaHl89wRD kY5g== X-Gm-Message-State: APf1xPCJcSLzC5JgRUp9DMDsR1RB0mAi8fCdf/0Dt8UR2oiR0RBjpO/k geOrgtBCm/+yNRxaYMt2ld9HUw== X-Google-Smtp-Source: AH8x226QEJAqmtsZgC0e/tJJNb7QsKtObmvD9tm3/a5rskjTTyxQsCH1Eqsyi4NhvXQjxXYl4HovMw== X-Received: by 10.80.170.73 with SMTP id p9mr18303280edc.278.1519731324042; Tue, 27 Feb 2018 03:35:24 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id m1sm9176786ede.39.2018.02.27.03.35.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 03:35:23 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, Marc Zyngier , Andrew Jones , Shih-Wei Li , Dave Martin , Julien Grall , Tomasz Nowicki , Yury Norov Subject: [PATCH v5 37/40] KVM: arm/arm64: Move arm64-only vgic-v2-sr.c file to arm64 Date: Tue, 27 Feb 2018 12:34:26 +0100 Message-Id: <20180227113429.637-38-cdall@kernel.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180227113429.637-1-cdall@kernel.org> References: <20180227113429.637-1-cdall@kernel.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christoffer Dall The vgic-v2-sr.c file now only contains the logic to replay unaligned accesses to the virtual CPU interface on 16K and 64K page systems, which is only relevant on 64-bit platforms. Therefore move this file to the arm64 KVM tree, remove the compile directive from the 32-bit side makefile, and remove the ifdef in the C file. Since this file also no longer saves/restores anything, rename the file to vgic-v2-cpuif-proxy.c to more accurately describe the logic in this file. Reviewed-by: Andre Przywara Signed-off-by: Christoffer Dall --- Notes: Changes since v4: - Renamed file to vgic-v2-cpuif-proxy.c as suggested by Marc. arch/arm/kvm/hyp/Makefile | 1 - arch/arm64/kvm/hyp/Makefile | 2 +- .../arm/hyp/vgic-v2-sr.c => arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) rename virt/kvm/arm/hyp/vgic-v2-sr.c => arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c (98%) diff --git a/arch/arm/kvm/hyp/Makefile b/arch/arm/kvm/hyp/Makefile index 5638ce0c9524..1964111c984a 100644 --- a/arch/arm/kvm/hyp/Makefile +++ b/arch/arm/kvm/hyp/Makefile @@ -7,7 +7,6 @@ ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING KVM=../../../../virt/kvm -obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v2-sr.o obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v3-sr.o obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/timer-sr.o diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/arm64/kvm/hyp/Makefile index f04400d494b7..4313f7475333 100644 --- a/arch/arm64/kvm/hyp/Makefile +++ b/arch/arm64/kvm/hyp/Makefile @@ -7,10 +7,10 @@ ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING KVM=../../../../virt/kvm -obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v2-sr.o obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v3-sr.o obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/timer-sr.o +obj-$(CONFIG_KVM_ARM_HOST) += vgic-v2-cpuif-proxy.o obj-$(CONFIG_KVM_ARM_HOST) += sysreg-sr.o obj-$(CONFIG_KVM_ARM_HOST) += debug-sr.o obj-$(CONFIG_KVM_ARM_HOST) += entry.o diff --git a/virt/kvm/arm/hyp/vgic-v2-sr.c b/arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c similarity index 98% rename from virt/kvm/arm/hyp/vgic-v2-sr.c rename to arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c index 0bbafdfd4adb..97f357ea9c72 100644 --- a/virt/kvm/arm/hyp/vgic-v2-sr.c +++ b/arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c @@ -23,7 +23,6 @@ #include #include -#ifdef CONFIG_ARM64 /* * __vgic_v2_perform_cpuif_access -- perform a GICV access on behalf of the * guest. @@ -77,4 +76,3 @@ int __hyp_text __vgic_v2_perform_cpuif_access(struct kvm_vcpu *vcpu) return 1; } -#endif