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: 10100351 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 47C4160325 for ; Thu, 7 Dec 2017 17:18:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DB4628468 for ; Thu, 7 Dec 2017 17:18:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2267728502; Thu, 7 Dec 2017 17:18:43 +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 2132028468 for ; Thu, 7 Dec 2017 17:18:42 +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=CB3SyMu57LCiKF4NJispqJgbv25sObWue+fblbXfdts=; b=ZrgQd2Nu+KweGchjcisqyvXc51 mVbyGxJxTqmHMR12iiFDxoiYdUg+vALuXZi0IeHxkX20hHUo0lKidehzZXdnAe8d1uyDrG3eiiwNx NyHCdfssDadJ8tdfSyyrQQWbAM+2iqdQo/NTc3eIISAOx2tKKOXemzuxggbN9Of+nSoAKnsiA8HoH NXYmU7imP5W2e5DAepunzheA8ndXIAFkHab0XcEa55oZfwoEF18DhlJbNgg38hGUSuPd+gy35x1Jl ce5aiJeD4FfZdlzSFOkEeRqROY8kUfmlFC6J2cJv4TdaS0P2dXvn/xRT6rSIgrkWLqavS0haYEBaC h/5sLCxA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMzon-0007T6-7M; Thu, 07 Dec 2017 17:18:41 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMzfT-0004ae-8K for linux-arm-kernel@bombadil.infradead.org; Thu, 07 Dec 2017 17:09:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Rer10PUmvV8sWvk9kkxbdPOilFThVkI1kcmqH7OT2zE=; b=V+q/RIwVx7+OPHuU4pkIzOLCJ DFNPYn064oHg7RoJVYxLR4yufT7OFpr4M1/0IhN6q36NriVNFKxs83EDXIc9VtQA280gaMBb4rvl9 ffzZstEQ7xz1bxg1XKC3TD4z4i3b2LMdj3MUqiyGG72+b7ZIK27Poa/rWaaifGyOaKorNmzupGLMb 0b6qsYKixqhMEGiwsX7KbbEEpdRtWZS+NTnFSW0YHkPapzifVYG2RwMcXo+rc70I0x5Dk/2sW3XWp MXhL5YPC6RIM9TXiogEm6kIo3XzXp2URXEpEdwK5ISqPHPHpfAgqmJKEjTwnlZqgoQ3nNlnPrCCTC Mf6cOvZug==; Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMzdl-0001w1-VH for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2017 17:07:20 +0000 Received: by mail-wm0-x241.google.com with SMTP id n138so14264053wmg.2 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=mfm5rhoBflYoVw4J3ikZIKwJKXH66QPGu/CFwDn7GTiftnVUUWYgJGWjH/8kZ2bw3u HsY5FGZDE78nZ/Nw5lRdS29blLM7Qp4A9tfmN0IJ28y+LtZ60xQEVq4T/zyZ1wr5fxyO O3UWFYAosOh4LD7pbDmv4TOYZ8M561R3DOydDxlclBeq2LuPQUbV5DIqlxeBNONkHZE5 b6xtGmrM+FVYAOo2HQ0Fl6AKUsq6p16F1Qd2IOgY+1lZwLUd4CILoVzJP7oQw8IdZX/x BC0KagRQigAUHLtLm3ISHx8biKobm/L1oztbTlU1ImMOodq/CClSmpltlGuGCLqiABqx h6NA== X-Gm-Message-State: AJaThX5DpNmYQb9qUR7bsrz3wSp0DQDqLDsoYYijCXFURiivieYdH6L2 ATIiCdLd0Bz4Kf4s058769RR7w== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171207_170718_029747_E213671E X-CRM114-Status: GOOD ( 10.44 ) 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 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;