From patchwork Wed Jan 31 09:34:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10193657 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 77D5E603EE for ; Wed, 31 Jan 2018 09:38:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A383201BC for ; Wed, 31 Jan 2018 09:38:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EBE8285FC; Wed, 31 Jan 2018 09:38:36 +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=unavailable 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 D0ACC201BC for ; Wed, 31 Jan 2018 09:38:35 +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=lTCv5UWI1m9Rq+njFFKmAR4VWpN3Ub99PdJbHWtBWao=; b=tNll069PWeHWxDnRzsJqteGSIO 8gP4imgIGgCQz15gAquw64j8+8mcTxTIFWOQ9uj/5RmmqS6CYUqjo0nDTYwDU17QRZRUYLwJ4Kz2n gtLkkDxBDGRlp22L0xjAqXLR+i61PfVbYmUihmJWVLzv5AVAyraXYKF6JzIHmKPDUkoKuJm2ymLru RsDa5QIp/35343yjjADiMWjj9TnpisPY9zgNlo3/trnHadMf1kIHvU2q6mFZkNJOFF8shkXtB91Iq fudBsotqVpPylCPyVTLty+ZZfl8o1eo7MNphZW7bboHy0YyZwAaYlI4gILOSZgnfDwsPQERas0x9z 42oT1wpw==; 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 1egoqd-0000KI-Bp; Wed, 31 Jan 2018 09:38:31 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1egonq-0005cc-7j for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2018 09:35:46 +0000 Received: by mail-wm0-x243.google.com with SMTP id r78so6629427wme.0 for ; Wed, 31 Jan 2018 01:35:33 -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=mjCMlWzNX/EYGq4ftgoyhvLjhr0u+7Bf7F7ihjJpii0=; b=GN49v7exLK13e0Z0pCua+apt30oJXHgaevm4Zqi+dhmYWuRX9pIYm5oUgQzIfEXIQ4 6jpJVc9sy2NwBLCaLqD9eCAuSF9jtxNa9CjWZiJXHNZVVb9nt9i2K/JelKIjkU77XWej n7aJ1z5N003A+gUxlcjXuLyTa9YkmvdAPuQ9c= 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=mjCMlWzNX/EYGq4ftgoyhvLjhr0u+7Bf7F7ihjJpii0=; b=W+YxXFhXEaiDEKajpBgIF5GWGNia6wJxG9F0Gwz1s2209Ho59W/wgICZbTGv1SGMrB nSKrT96ucYOEKb0gfnQWqdNyIg8sCqJjnppGkTvGf7U3YPnQVE4UR7ErTKpCncgRL7lE +PDegHu39Y+Ub0d8U2z9SuhaPkmEYAlNBy9FVKvyehaJE3ZBAEsyFkDf700V3Klnq2tE x3rZ9XtEJBpVgPEuqJFjWzPmZeOlMqIdf+pOdE7icR6dULRQFYo7Y6BtDQdcCvH/uG1n 4H1wIj8s0Sg70WTRVglTfdEEGbqeSB753/qmtGPC/SLztX/m5JG8YU93LEhyzHheJuSl zt6w== X-Gm-Message-State: AKwxytet/Nw1ntl5pbTFLBqb3FBC3UGGFVqfItde+ny6edbJuEjfpzDN Xy6hVxV/DLYiQKykk3DBrJHT0h1DlYs= X-Google-Smtp-Source: AH8x225fwYO4Dxw9rScZ9mh6DQ3yGVNMShe7s9sroNeDFHDIcrm+0hZLMrDVXTeQiVb0ap9iHqwouQ== X-Received: by 10.80.148.133 with SMTP id s5mr3441097eda.144.1517391332158; Wed, 31 Jan 2018 01:35:32 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id z2sm10247837edc.50.2018.01.31.01.35.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jan 2018 01:35:31 -0800 (PST) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 13/28] KVM: arm/arm64: Detangle kvm_mmu.h from kvm_hyp.h Date: Wed, 31 Jan 2018 10:34:52 +0100 Message-Id: <20180131093507.22219-14-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180131093507.22219-1-christoffer.dall@linaro.org> References: <20180131093507.22219-1-christoffer.dall@linaro.org> 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 kvm_hyp.h has an odd dependency on kvm_mmu.h, which makes the opposite inclusion impossible. Let's start with breaking that useless dependency. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm/include/asm/kvm_hyp.h | 1 - arch/arm/kvm/hyp/switch.c | 1 + arch/arm/kvm/hyp/tlb.c | 1 + arch/arm64/include/asm/kvm_hyp.h | 1 - arch/arm64/kvm/hyp/debug-sr.c | 1 + arch/arm64/kvm/hyp/switch.c | 1 + arch/arm64/kvm/hyp/tlb.c | 1 + virt/kvm/arm/hyp/vgic-v2-sr.c | 1 + 8 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/kvm_hyp.h b/arch/arm/include/asm/kvm_hyp.h index ab20ffa8b9e7..76368de7237b 100644 --- a/arch/arm/include/asm/kvm_hyp.h +++ b/arch/arm/include/asm/kvm_hyp.h @@ -21,7 +21,6 @@ #include #include #include -#include #include #define __hyp_text __section(.hyp.text) notrace diff --git a/arch/arm/kvm/hyp/switch.c b/arch/arm/kvm/hyp/switch.c index 330c9ce34ba5..ae45ae96aac2 100644 --- a/arch/arm/kvm/hyp/switch.c +++ b/arch/arm/kvm/hyp/switch.c @@ -18,6 +18,7 @@ #include #include +#include __asm__(".arch_extension virt"); diff --git a/arch/arm/kvm/hyp/tlb.c b/arch/arm/kvm/hyp/tlb.c index 6d810af2d9fd..c0edd450e104 100644 --- a/arch/arm/kvm/hyp/tlb.c +++ b/arch/arm/kvm/hyp/tlb.c @@ -19,6 +19,7 @@ */ #include +#include /** * Flush per-VMID TLBs diff --git a/arch/arm64/include/asm/kvm_hyp.h b/arch/arm64/include/asm/kvm_hyp.h index 08d3bb66c8b7..f26f9cd70c72 100644 --- a/arch/arm64/include/asm/kvm_hyp.h +++ b/arch/arm64/include/asm/kvm_hyp.h @@ -20,7 +20,6 @@ #include #include -#include #include #define __hyp_text __section(.hyp.text) notrace diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c index 321c9c05dd9e..360455f86346 100644 --- a/arch/arm64/kvm/hyp/debug-sr.c +++ b/arch/arm64/kvm/hyp/debug-sr.c @@ -21,6 +21,7 @@ #include #include #include +#include #define read_debug(r,n) read_sysreg(r##n##_el1) #define write_debug(v,r,n) write_sysreg(v, r##n##_el1) diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index f7c651f3a8c0..f3d8bed096f5 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm64/kvm/hyp/tlb.c b/arch/arm64/kvm/hyp/tlb.c index 73464a96c365..131c7772703c 100644 --- a/arch/arm64/kvm/hyp/tlb.c +++ b/arch/arm64/kvm/hyp/tlb.c @@ -16,6 +16,7 @@ */ #include +#include #include static void __hyp_text __tlb_switch_to_guest_vhe(struct kvm *kvm) diff --git a/virt/kvm/arm/hyp/vgic-v2-sr.c b/virt/kvm/arm/hyp/vgic-v2-sr.c index d7fd46fe9efb..4fe6e797e8b3 100644 --- a/virt/kvm/arm/hyp/vgic-v2-sr.c +++ b/virt/kvm/arm/hyp/vgic-v2-sr.c @@ -21,6 +21,7 @@ #include #include +#include static void __hyp_text save_elrsr(struct kvm_vcpu *vcpu, void __iomem *base) {