From patchwork Tue Feb 27 11:34:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10244895 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 E487960208 for ; Tue, 27 Feb 2018 11:36:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7B6628843 for ; Tue, 27 Feb 2018 11:36:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC00428846; Tue, 27 Feb 2018 11:36:16 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 68D2028843 for ; Tue, 27 Feb 2018 11:36:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753180AbeB0LgL (ORCPT ); Tue, 27 Feb 2018 06:36:11 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54509 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932084AbeB0Lex (ORCPT ); Tue, 27 Feb 2018 06:34:53 -0500 Received: by mail-wm0-f65.google.com with SMTP id z81so23372467wmb.4 for ; Tue, 27 Feb 2018 03:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=christofferdall-dk.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=cSlly5CzauMvhNFlbnOx1jNabkaxkkXOLFUZckvgZy8=; b=zpYWqJzN0MO3v+M44pp4Jz+pP1d0nifjU2SISmUaX4JbngDxQQD9Fx1dTVAr1de4mC EGyhQ3175qgfV8DKxEiM3PXRp+LGwAAyfhgIAOvUvhdZobatCc34g6KcHRiATXyT2Ebl mP5vkrGFO/ki/Mw1wDJSWaMdZbaxoWc5kl7uLs7e3cy8wjzpnVDyIsbffq1na4HlRFis SnVAu6m2gmq3Wjd5f/wEbfS/mscOUc5D6C5szMMc8uX5fm3JkuqxH+RdycWBK0oGKN3U t2y1WJtpOqA/55QB+ue7RDKQAumRFsXtfLbZElRx/qvKVgxoAqtDU2tBtdw7ae6NJE+Z 7xoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=cSlly5CzauMvhNFlbnOx1jNabkaxkkXOLFUZckvgZy8=; b=R8xP+ZNUdgTGMCKMgILeALDAz6qopiXedNvsIkrDp5el9N+GUfmLAx2P9pfTv5uzBc d00rc55WMGFjBnNhEAoHsQHl3BRiOEInftOukWL+d1Jm+lujr+zLwR7uBoxjx3o2FOrQ vVHDJfTj1uDeJdjPjcyPjX+EbXoDUBboNu0YfncERwaLVUDx0ryhSEvXHO4YcUookJcB /bClSvFo8rFduMtnA5g3kNMXdTr6K5H/90JFTLXFGqC+DTkK7aYQzkQ0JGwWWh4FlKMX vbXtPmvWhGO8CNm7s5mnn7Bd3u8FX/z+n9j9yaxAYc2fgfBbs618rcstYm//ONSVzqFr RQVg== X-Gm-Message-State: APf1xPDM5u7a1Q0gDO+EmVuGYgrmtq2PcFhYZ5dr+Z2JHgH2IP0uek8v ljJ3MT2kC9fv/Lvy7lAXJw6Vrg== X-Google-Smtp-Source: AH8x2260Xj35FF3bAWmHpdIBC2+EPAk3wO3hKMuT/p7CqOvOzLTEKMWDKot22sajEOKwRskR/7xUuA== X-Received: by 10.80.140.184 with SMTP id q53mr18337134edq.17.1519731292374; Tue, 27 Feb 2018 03:34:52 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id m1sm9176786ede.39.2018.02.27.03.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 03:34:51 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, Marc Zyngier , Andrew Jones , Shih-Wei Li , Dave Martin , Julien Grall , Tomasz Nowicki , Yury Norov Subject: [PATCH v5 14/40] KVM: arm64: Remove kern_hyp_va() use in VHE switch function Date: Tue, 27 Feb 2018 12:34:03 +0100 Message-Id: <20180227113429.637-15-cdall@kernel.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180227113429.637-1-cdall@kernel.org> References: <20180227113429.637-1-cdall@kernel.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: Christoffer Dall VHE kernels run completely in EL2 and therefore don't have a notion of kernel and hyp addresses, they are all just kernel addresses. Therefore don't call kern_hyp_va() in the VHE switch function. Reviewed-by: Andrew Jones Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm64/kvm/hyp/switch.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index 1b94ac6a85e6..1e26a81c0a16 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -370,9 +370,7 @@ int kvm_vcpu_run_vhe(struct kvm_vcpu *vcpu) bool fp_enabled; u64 exit_code; - vcpu = kern_hyp_va(vcpu); - - host_ctxt = kern_hyp_va(vcpu->arch.host_cpu_context); + host_ctxt = vcpu->arch.host_cpu_context; host_ctxt->__hyp_running_vcpu = vcpu; guest_ctxt = &vcpu->arch.ctxt;