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: 10244977 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 7491F60211 for ; Tue, 27 Feb 2018 11:54:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E2A722AFC for ; Tue, 27 Feb 2018 11:54:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CBDC28845; Tue, 27 Feb 2018 11:54:38 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 53867289B2 for ; Tue, 27 Feb 2018 11:51:49 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=Gad5JxrdApFWq/aoZ4lQqVp4NnEsVuLwco9Guct/KGo=; b=Ad2NGIZgEUXEXRhGI+nWr4W8rF xxIAsZR3TI5cXmb27yq2JXfGWpi93dPfRrTXyuoKKq58tremaYPLUtdBuWCcUKEzFdRYXGYJ7MuKg kNaQcQBg/aHdsPYPchnzbqG2qale9FvoYxX455LaIk0yiZpf04BGPmTMh91uREpBcIfwyfbF6K1wG BhvtVunvOk+PmkuTVFFWM0TOIOtAfxHQBWX+uvNfYZ2Pb5DI2Oy2pjRQB7H0K45Opl+U7hem0oRlH g2IjdYTjzTonRf9dITSOV7P126AFHQNtFF9fGKaV0Px9C+LN2MKo6kJMwHH0qpgLpf2DwMGLTWDwF 2P3htWaQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqdnA-0003lD-4x; Tue, 27 Feb 2018 11:51:32 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqdXD-0006br-Os for linux-arm-kernel@lists.infradead.org; Tue, 27 Feb 2018 11:35:19 +0000 Received: by mail-wm0-x243.google.com with SMTP id t3so23399481wmc.2 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=I2PFh+hSttKp3WgCoYL4QM6A2ED6i0m7eh4q+PzDEAGTzM0bDmfkTDlFS9oiCF7lgi CshxEt9EneElZjDfpkwsWsfPIHIIha2o9oyXCWY+RzH6GiJ8WM+e88IPvcUgrXHEOLxY O240VkbZe9lPyZ8D2OltEdvIDPgRVQgTJPCTi8HEA2XkHYR0eZfdyJfXcuX2CRS6zB03 kqfqorrrLqe8vwWhtAQS8lYGB+gS6WiWNhsVLf2FJPvX/4Vpszl9u8OzaXGbFdUAmE8T ErTwmCTMqEuK0ebA5Hb5XnSufWrJS+siFb+6fV+5gozX4BcD/ZEaEYKqo7K4erd06tgY Y35w== X-Gm-Message-State: APf1xPDchrr/4bVSRNDXM4bl51lKF0Vldz9wM4L2TTeLCDeMNElSaJAs XVV8aQAG4moGOL3ipkCrTPLiiw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180227_033504_646927_7857A0AA X-CRM114-Status: GOOD ( 10.41 ) 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: Andrew Jones , kvm@vger.kernel.org, Marc Zyngier , Tomasz Nowicki , Julien Grall , Yury Norov , Dave Martin , Shih-Wei Li MIME-Version: 1.0 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 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;