From patchwork Sun Apr 23 17:09:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9695131 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 6505B601E9 for ; Sun, 23 Apr 2017 17:24:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59C79203B9 for ; Sun, 23 Apr 2017 17:24:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DBD9262F2; Sun, 23 Apr 2017 17:24:10 +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 [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 EAD2F203B9 for ; Sun, 23 Apr 2017 17:24:09 +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=M0XNYz8doKSCLUCr8scIQuYUSnWc8Dc7Q3kxxC23BuU=; b=nH47+HKjczK8x8dCs/G+LxsXVf uPeucMlh5eEY8zIf1+0PVTRiMLNb+2d4BktwMHN6YcMGoP2khXJGne760VnpHhO2d82ZrreVvDK/Y glt8CBKowc9HNeCj1flm8vwF8YAtQirTkuiDVmJeEEtG0QLb4I6GKPdzG+QMfPK1bv2UwBcIwC5zr hUtiKt8TVufCCLmK3x41o4K0b/tzr9XawhdI9TOhHQDcB63n2GAkw+2XePk+MfHeLshXoNcIJ/Dwi Wjx5ls3PtoEBLb7uWTx0hNXxAFX9jU0jAh6hgdiQzmrj0FEroCGFocGBxAnuKeyOxYnz8zsuR/5Pz n/gnskMw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d2LF3-000643-3H; Sun, 23 Apr 2017 17:24:09 +0000 Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2L2I-0006c0-Aw for linux-arm-kernel@lists.infradead.org; Sun, 23 Apr 2017 17:11:15 +0000 Received: by mail-wr0-x22e.google.com with SMTP id l50so5312574wrc.3 for ; Sun, 23 Apr 2017 10:10:37 -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=QLrSJ59d7V6MN9vQAnV42UHH8ZeYo/zQ3++tTRpG6yA=; b=Oed6vCuiVH/dlgRgYmkNJcTsrrytVBO0Jib6qSslyljYKUTxBrj4XYW3cPAZ7j5HBE jZuliu0vH9ahJnTyLA0ok9MLQ3zEsAVwKyzVV3LOwK7jpmfdV+gdAyJu0TqMRNiPFl9O /TgrYwmseirozNHu7ml5uYSQ7HYU2bzO0TFBo= 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=QLrSJ59d7V6MN9vQAnV42UHH8ZeYo/zQ3++tTRpG6yA=; b=R8dz4k89b/I66q7E5pJAYARk300QADyBjCLQGeby4OufJIeQOco6EL9YcpJli1KrDj 8ikm3avv6UqsFgz3/tdv/83rTYnTe4aro9OYKHp4OzN7MiAbrJomUzTejew/U2fYGfRs Vii5LSz9IPHzBXyaW06Uqjr5ss7mYXv33Rb4J8pNN5W+5FVVcE2fIpBnuifefzxhaMp2 yJYbTxQBuknC+hgJbJANTdtZInE4ipe+RDJduzuYzHPzssqmbIEIZIcKieZC0aM+PUzt DrQX4YemCE3pIwXwmmetTS8NKtOfcCMkZgn1nFyZUztlwH1X9gINxOSq/7Nf4YTsvqos sQjw== X-Gm-Message-State: AN3rC/60Ol/8WD013/AwbvXeUL7sLuEOXs52Mzukk4NWVVfURRTinakI uK26JVieru5OV87A0VGArg== X-Received: by 10.223.160.241 with SMTP id n46mr2586471wrn.201.1492967436327; Sun, 23 Apr 2017 10:10:36 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id 58sm2803521edz.2.2017.04.23.10.10.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:10:35 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 61/79] arm/arm64: KVM: Use __hyp_reset_vectors() directly Date: Sun, 23 Apr 2017 19:09:11 +0200 Message-Id: <20170423170929.27334-62-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170423170929.27334-1-cdall@linaro.org> References: <20170423170929.27334-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170423_101058_953359_F7D7E236 X-CRM114-Status: GOOD ( 10.12 ) 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, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.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 __cpu_reset_hyp_mode doesn't need to be passed any argument now, as the hyp-stub implementations are self-contained, and is now reduced to just calling __hyp_reset_vectors(). Let's drop the wrapper and use the stub hypercall directly. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm/include/asm/kvm_host.h | 6 ------ arch/arm/kvm/arm.c | 3 +-- arch/arm64/include/asm/kvm_host.h | 6 ------ 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index adea307..d488b88 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@ -270,12 +270,6 @@ static inline void __cpu_init_stage2(void) kvm_call_hyp(__init_stage2_translation); } -static inline void __cpu_reset_hyp_mode(unsigned long vector_ptr, - phys_addr_t phys_idmap_start) -{ - __hyp_reset_vectors(); -} - static inline int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext) { return 0; diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 46fd375..c8f4fa6 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -1130,8 +1130,7 @@ static void cpu_hyp_reinit(void) static void cpu_hyp_reset(void) { if (!is_kernel_in_hyp_mode()) - __cpu_reset_hyp_mode(hyp_default_vectors, - kvm_get_idmap_start()); + __hyp_reset_vectors(); } static void _kvm_arch_hardware_enable(void *discard) diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 0355dd1..578df18 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -362,12 +362,6 @@ static inline void __cpu_init_hyp_mode(phys_addr_t pgd_ptr, __kvm_call_hyp((void *)pgd_ptr, hyp_stack_ptr, vector_ptr); } -static inline void __cpu_reset_hyp_mode(unsigned long vector_ptr, - phys_addr_t phys_idmap_start) -{ - __hyp_reset_vectors(); -} - static inline void kvm_arch_hardware_unsetup(void) {} static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}