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: 9695061 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 D3A5560245 for ; Sun, 23 Apr 2017 17:13:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF51E26538 for ; Sun, 23 Apr 2017 17:13:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B438F267EC; Sun, 23 Apr 2017 17:13:55 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI 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 5894226538 for ; Sun, 23 Apr 2017 17:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163131AbdDWRNw (ORCPT ); Sun, 23 Apr 2017 13:13:52 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:35930 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162962AbdDWRKh (ORCPT ); Sun, 23 Apr 2017 13:10:37 -0400 Received: by mail-wr0-f181.google.com with SMTP id l50so5312573wrc.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=aLBu8JuhfVIZjPs3O2BLPqaHX4CjyscB2hj2VAqT6GXe+S0LPo6xKaoQJ/xS/n4bH2 EIxZ77CyD+AsTZNA+dOl24Gbd/C3E0HGZ3ZM2hsvK0/Ob3BLmao2teZnTjgTQmwPWLTq A285vLgJhAFNfM+erwfgq5ND9DplF4GvI4haNWyl5q9KIYQsyf3/tXVXLOvVFlCfzaiI 9l7mebnwJ95/9KRkNZwzaK7W89BpZADFUcQl1L8RN8XQf4WKM9eovvNW6J7qwqusPMin LSvNaGRE4ADGWqcmWH7XPHmVz6oKIfZNQC5IM9ZD4tPcI+QpQq9T5j5mVQF6dvkQe+9Z F9cw== X-Gm-Message-State: AN3rC/6JGUChn7/vB9Kn2ihipQBTG3incQKAG1x+XWKg1ezU6kv/f04I /H2vz2FGLqzJCPH4 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?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christoffer Dall 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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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) {}