From patchwork Fri Jan 12 12:07:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10160531 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 07CE360327 for ; Fri, 12 Jan 2018 12:16:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF73B289D1 for ; Fri, 12 Jan 2018 12:16:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2621289D3; Fri, 12 Jan 2018 12:16:45 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 4F040289D1 for ; Fri, 12 Jan 2018 12:16:45 +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=qkV5fWpcVuImTBtXWTZfIjQgdi9d0km4+Ob2w4QtIgI=; b=das1aDHbf02aSBwb7UDc3yY5nD zWuSo6EnNhtJWnWw7E/KVlbZ4KNucmRs+6CLmyvyIvKcBW2Hv/wQ7D+45QTgRk+fotuQ+HyBBI4Y4 BfVPB1I0TJUcDsRdjLNC41ZQfFsf93PayA9N1Evi+uKb9nQxkYgfPEtceKB/tuDjdWCyh3LqWkxfO pIBhSfmujN+RKMJy8ecypnRw/4X3uHyBKjfq8oMCSzE11mNp90OF4rSV6TPmQOSYvuvdXketr/BiO V7h9TcPl+8cVm7LET2B5GWIx95/2ItvC48xYkCFpVWC258/DH8TcN4OeP26flSSiVvJuVS8WOkvFc yPimhecA==; 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 1eZyGH-0003vi-Io; Fri, 12 Jan 2018 12:16:41 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZy8B-0000M7-RN for linux-arm-kernel@lists.infradead.org; Fri, 12 Jan 2018 12:08:27 +0000 Received: by mail-wm0-x241.google.com with SMTP id t8so11610509wmc.3 for ; Fri, 12 Jan 2018 04:08:15 -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=4gLoqpEj2wMrn/2Jf7K6HXoWQiXdjyTrURy3HIzLzJM=; b=iSkYxECPDqxPqSsGVaLbqEusLQ/4sj3Q8gkWAbcm74rj01cFhewT/Zk9LAv07ZcPHR Rc29fIwalgGsIOGPOCeA+8DS3yYT80y4AXm9DAs65GKSI66Tfqn/H2iiA2uuzuiNh53L 2D2/bW+Mnc51w+8r37ts199C/v8pp1UCZaY+I= 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=4gLoqpEj2wMrn/2Jf7K6HXoWQiXdjyTrURy3HIzLzJM=; b=QRt8hkYrIz2rg4kWlrq1DaQhlCYhXGGLWTwCFRr7qG/9/MVFUiXuclhohLky1IB3pV ofrGWk4f13tKWi34SGcXzHg3VZ/Fy04hHh7XGyQP1i3CQb3PeaxfFasYpap+yM5zL6+8 N3k70rxojJCJ7NCVGZINlCqplO7ny7rPNZW+zmeBJ+XoJIbaVY227VZcjaLqpcAnKup6 fYjG19A/JnOgGWnmK/7zfuyeFii4STDhZomkpE4Ebcj4M8XBtn3kSZA/aPQArFdWF2Yc ftOmtNWGsQink4PBdiIu4kewHhPFOc3LyHPtQl7VmTVtkG37qQiqoMulVr9Q/ESA0xnW F6lw== X-Gm-Message-State: AKwxytfcAseJHJK/fCA81OR7uy7+XbAtgWjQ3RZtQzFUHZ2Mvt9gAyaI ufqsDu3tts1u2Mi1iMpF9yhTjQ== X-Google-Smtp-Source: ACJfBouZV8KEmR249Hv+Ud73Tjo7qvd3akXzy7p3NBEknrzcx3SAFxCxac2OgQ2V9+4tj/2DDtijSg== X-Received: by 10.80.190.197 with SMTP id e5mr16263670edk.48.1515758894432; Fri, 12 Jan 2018 04:08:14 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id f16sm13489705edj.65.2018.01.12.04.08.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 04:08:13 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 15/41] KVM: arm64: Remove kern_hyp_va() use in VHE switch function Date: Fri, 12 Jan 2018 13:07:21 +0100 Message-Id: <20180112120747.27999-16-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180112120747.27999-1-christoffer.dall@linaro.org> References: <20180112120747.27999-1-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180112_040820_000651_76300EE4 X-CRM114-Status: UNSURE ( 8.84 ) X-CRM114-Notice: Please train this message. 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: Marc Zyngier , Andrew Jones , Christoffer Dall , Shih-Wei Li , kvm@vger.kernel.org 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 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 accfe9a016f9..05fba76ec918 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -345,9 +345,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;