From patchwork Mon Oct 1 13:06:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 10622103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B50EA6A for ; Mon, 1 Oct 2018 13:07:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0080A2859E for ; Mon, 1 Oct 2018 13:07:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8B5A293D8; Mon, 1 Oct 2018 13:07:31 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 A5DE22859E for ; Mon, 1 Oct 2018 13:07:31 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=nFsj4wlI/raQlUsG55ccIIjkW/C5mcLKQwHJIBHGqpo=; b=rYqcZDAjN9wD2m 6DxbwjVOn6HddcfzjooiITmrHH8LkQ60repT8kcFPJ9BKRHDXGj38UKbQa3FPjcX/yEyqgjpOVH2i 4pwxLY2IXx1k9NwKa8K4wO6WpC1xTqRnybg9q/1i9/RbUBZ9DuvtOcnBZQXfWO72VVIKaJ/J6zLwD fvGIB7IeG0arRUaz2EAm1iJJxLfSIdNZb06ePS6tPem6rbjlRTNEohf22yWIX08pfcl5Ya/cf0INY wYChSiixgWDIHiSw/HoABp0ZAN+YaLCtdtNQuRu3JMjJutHnpfxBecZ7KIEboQZGGDC/UiSgVTfTd xQgo3AvtFMjZ0w5b8BXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g6xuy-0003gG-UD; Mon, 01 Oct 2018 13:07:20 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g6xuv-0003eV-8W for linux-arm-kernel@lists.infradead.org; Mon, 01 Oct 2018 13:07:19 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0229B15AD; Mon, 1 Oct 2018 06:07:08 -0700 (PDT) Received: from filthy-habits.Emea.Arm.com (filthy-habits.emea.arm.com [10.4.13.85]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B97243F5A0; Mon, 1 Oct 2018 06:07:06 -0700 (PDT) From: Marc Zyngier To: Suzuki K Poulose Subject: [PATCH 2/2] KVM: arm64: Drop __cpu_init_stage2 on the VHE path Date: Mon, 1 Oct 2018 14:06:56 +0100 Message-Id: <20181001130656.36999-3-marc.zyngier@arm.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181001130656.36999-1-marc.zyngier@arm.com> References: <20181001130656.36999-1-marc.zyngier@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181001_060717_352304_79E88307 X-CRM114-Status: GOOD ( 13.07 ) 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: Eric Auger , kvm@vger.kernel.org, Christoffer Dall , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu 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 __cpu_init_stage2 doesn't do anything anymore on arm64, and is totally non-sensical if running VHE (as VHE is 64bit only). Signed-off-by: Marc Zyngier Reviewed-by: Suzuki K Poulose Reviewed-by: Eric Auger --- virt/kvm/arm/arm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index 91c464c9cd21..4ce99bb223bc 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -1310,16 +1310,10 @@ static void cpu_hyp_reinit(void) { cpu_hyp_reset(); - if (is_kernel_in_hyp_mode()) { - /* - * __cpu_init_stage2() is safe to call even if the PM - * event was cancelled before the CPU was reset. - */ - __cpu_init_stage2(); + if (is_kernel_in_hyp_mode()) kvm_timer_init_vhe(); - } else { + else cpu_init_hyp_mode(NULL); - } if (vgic_present) kvm_vgic_init_cpu_hardware();