From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AA2DC3A5A4 for ; Sun, 1 Sep 2019 21:12:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A4C221897 for ; Sun, 1 Sep 2019 21:12:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567372378; bh=fxnNTYTRajAiVeP624Hg7a5lJu+ZE69zPsUxPj5tOA8=; h=From:To:Cc:Subject:Date:List-ID:From; b=0T0dZiiZsLMYsNCt2KW89zBpKynUlKxYXtwCRnP4c9ttd8o//3JWeiGt1XSD0+mSR RszaPOi4B1sh48+PZEjY5DfQPwWBOm4zAo18CWDOuGksCNLG2Ny+a7/bee3mxbhK1I A0RGjbAQRffgv7QbhEDwbKjkClMunWLPkNFk41d4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729012AbfIAVM5 (ORCPT ); Sun, 1 Sep 2019 17:12:57 -0400 Received: from foss.arm.com ([217.140.110.172]:46412 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728891AbfIAVM4 (ORCPT ); Sun, 1 Sep 2019 17:12:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 552DE28; Sun, 1 Sep 2019 14:12:56 -0700 (PDT) Received: from why.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 180C73F718; Sun, 1 Sep 2019 14:12:54 -0700 (PDT) From: Marc Zyngier To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Cc: James Morse , Julien Thierry , Suzuki K Poulose Subject: [PATCH 0/3] arm64: KVM: Kiss hyp_alternate_select() goodbye Date: Sun, 1 Sep 2019 22:12:34 +0100 Message-Id: <20190901211237.11673-1-maz@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org hyp_alternate_select() is a leftover from the my second attempt at supporting VHE (the first one was never merged, thankfully), and is now an irrelevant relic. It was a way to patch function pointers without having to dereference memory, a bit like static keys for function calls. Lovely idea, but since Christoffer mostly separated the VHE and !VHE hypervisor paths, most of the uses of hyp_alternate_select() are gone. What is left is two instances that are better replaced by already existing static keys. One of the instances becomes cpus_have_const_cap(), and the rest is a light sprinkling of has_vhe(). So off it goes. Marc Zyngier (3): arm64: KVM: Drop hyp_alternate_select for checking for ARM64_WORKAROUND_834220 arm64: KVM: Replace hyp_alternate_select with has_vhe() arm64: KVM: Kill hyp_alternate_select() arch/arm64/include/asm/kvm_hyp.h | 24 --------------------- arch/arm64/kvm/hyp/switch.c | 17 ++------------- arch/arm64/kvm/hyp/tlb.c | 36 +++++++++++++++++++------------- 3 files changed, 24 insertions(+), 53 deletions(-) -- 2.20.1