From patchwork Thu Dec 7 17:06:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10100171 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 67A7A60360 for ; Thu, 7 Dec 2017 17:07:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52932284CE for ; Thu, 7 Dec 2017 17:07:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4779B284F5; Thu, 7 Dec 2017 17:07:06 +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 F39E7284CE for ; Thu, 7 Dec 2017 17:07:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756122AbdLGRHD (ORCPT ); Thu, 7 Dec 2017 12:07:03 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:41018 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756506AbdLGRHB (ORCPT ); Thu, 7 Dec 2017 12:07:01 -0500 Received: by mail-wm0-f68.google.com with SMTP id g75so14430227wme.0 for ; Thu, 07 Dec 2017 09:07:00 -0800 (PST) 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=Rer10PUmvV8sWvk9kkxbdPOilFThVkI1kcmqH7OT2zE=; b=PUKgsjcGQGnCOR6FHYhw+uE1u2oJRL7LbC4fE/DpZ+P3Yg5cRbFIV3plC1WmWTAgxw g5KqYzHg7J0Pw0hSY+oiuO3L+2zufxJ5AsVCnO5vEJLZc5yqDxDW1hFbvF4I7stSmM+5 5aFaBsMjZekL2/FTpw91WUTNgsNVAsvmW+W0M= 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=Rer10PUmvV8sWvk9kkxbdPOilFThVkI1kcmqH7OT2zE=; b=IsxnCqSjq/bVgKRkR/ou/8biZ/vhUpQLRywZEhK5645cstI2zIMB/KohJhcnCAvt93 +/J6teg729PQ5eK6GsfqrpmKl+bZJxhLi0R3kG2wC3GbNnaT3QPVQiTypPmUbfpVUp6Y /ilV+jApTNm2qg+mAiK9kI3/sYWAUV1LA5X28cPM2tleZQUAnacurEBo9nHz0qi1MrAC ATRFl8q42xLBfqmcxL60LlPWQhQpSucxoF5Zm5dpw6GubDCrOro3kTtJnQ6A1RKmtWKz 3PSqD4e8sS+guVpsIJeu8RK+cWe+6ig3LbX1ENUa8gE5FonQ77H2apy/OFaGZLixCIGO eL+A== X-Gm-Message-State: AJaThX4Cr/Ia9SF5PeMlYj9hys5WMK7ll3kX6CK1u/ofV1jDzUZS2eAE 2Q6nOIf74qZnMMZ+bdFwLyR2Vg== X-Google-Smtp-Source: AGs4zMZB8hRD1hfgNMNVeEWxhVazCcIN04A2Heli75nMnGOmKB0qUzMjxLpnSNrtCj48U2e16XiGKg== X-Received: by 10.80.207.193 with SMTP id i1mr31616228edk.55.1512666419884; Thu, 07 Dec 2017 09:06:59 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id a16sm2868270edd.19.2017.12.07.09.06.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Dec 2017 09:06:58 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, Marc Zyngier , Shih-Wei Li , Andrew Jones , Christoffer Dall Subject: [PATCH v2 12/36] KVM: arm64: Remove kern_hyp_va() use in VHE switch function Date: Thu, 7 Dec 2017 18:06:06 +0100 Message-Id: <20171207170630.592-13-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171207170630.592-1-christoffer.dall@linaro.org> References: <20171207170630.592-1-christoffer.dall@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 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 Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier --- 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 8f32f8dcab65..eac2202a179c 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -349,9 +349,7 @@ int kvm_vcpu_run_vhe(struct kvm_vcpu *vcpu) struct kvm_cpu_context *guest_ctxt; 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;