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: 10245067 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 2750D60211 for ; Tue, 27 Feb 2018 12:45:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14223288A0 for ; Tue, 27 Feb 2018 12:45:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06C2E288AE; Tue, 27 Feb 2018 12:45:01 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 9D409288A0 for ; Tue, 27 Feb 2018 12:45:00 +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=rgaIXUiDfVdg4k2eX0rbA5YCg/46s0aJQskI7Dkaezw=; b=PC7yp5mr/6xUR78JHsKB7r761I UPWycsCo3yk8YmMuRfuj5i9o4QMewLAzmKXaYdAUac+KRw8YK+wCE/FEIG8r0IH/PWLDQegTCLv0h Jd2no4iCRznF8prThUIuaW316W1phVprT/yZ2fBVQI8BAYXH7WdjbjdIWfZkWtVW0erIVK3un6S49 AKsLazuuHBx8c5yLZpcCFKbzZneBQb0pd8lHcIiYSsmzgesUJmNdUzG2fG+92BHOSRGuXd9xmxDuW XJ+U4mEQ0XEHY1LHKCKq0FleMHuccdmc7A2+Iryz6Ue3OC7rjO+gTCf3QrehLgWAQT2G8Tc9VfdZo PqtHMg4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqecj-0006JD-PH; Tue, 27 Feb 2018 12:44:49 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqeZh-0004jB-Hp for linux-arm-kernel@bombadil.infradead.org; Tue, 27 Feb 2018 12:41:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dSA8omzJ2+kofC6e8Q4yTsh62owwkgl6qHwGTitKeVQ=; b=kkenHrrBlbI8Y5FjUrGhROmHZ 3XUvldb/LFNfRHneKlzn6tTDy1yCzBroSQhpk40Yqk6//bsCHJinNjn3IRlY0h1X5L5/cUW065Hd8 kVITOcxB3g1gQqcw3D30WAyPFKLROVLZhlCge65GCh4NnL088qE2CR+ZRAlmrw/XJt8iuQL0BaYNa L92cEzuAKVaOqIAsvkWAja9cLhJX+5cC59V2Tl0wdh7SCPFtzBttjx200JEEYRKOUQGWKnwUXbvF4 js388AAKXx1/J6NLJrd/zo2Zp4xpzIm+rjexZqxbz2Ra6hPiNv+xHszxRJLZXawki521RERr9o5CZ swoCaKUSA==; Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqdXj-0006LA-OY for linux-arm-kernel@lists.infradead.org; Tue, 27 Feb 2018 11:35:36 +0000 Received: by mail-wm0-x241.google.com with SMTP id w128so17472537wmw.0 for ; Tue, 27 Feb 2018 03:35:25 -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=D870fV09KfEiEqPaCODH32XFJN/xAm/kmyxLfXAHcF5bpfSA+b9Ex2v2RJx7xMC3ZI LfoqaxxOOt2uCsCP8iYQI9yu3ijOPC1mzQOtYUD8PlXpcmlnjwe85q3SRunYb4HCZuYq 22S+GQMJ/t+87+oeKOMK5ZZp8FltMPI8ASOOxY5MabwVNFJw1SFmcv9+SRHTrBP2SqlK r+tStsSMUYgGFh9CX2dorFIk2m1l6VHVtLyJ1/sSJ6C2Ck4resRB39tdc49AoyHxIWhM S3YipGHBb5SZWS//4yM+Z8+1Gq2tdOBSB0UwCDE1jPpWoxOenMcIAvf7Odz+ThX5va2T tF6Q== X-Gm-Message-State: APf1xPAr8wCXK0UTnvMmEzWP5HMxE7vsB1GaowVIhibke8FwRQETKF/h zEreBSFAZXS/DF6lEP086qJ92g== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180227_063535_829893_D17C6C22 X-CRM114-Status: GOOD ( 14.44 ) 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: Andrew Jones , kvm@vger.kernel.org, Marc Zyngier , Tomasz Nowicki , Julien Grall , Yury Norov , Dave Martin , Shih-Wei Li 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: 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