From patchwork Thu Feb 15 21:03:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10223597 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 C202D60467 for ; Thu, 15 Feb 2018 21:05:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFA52283B9 for ; Thu, 15 Feb 2018 21:05:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A410E29516; Thu, 15 Feb 2018 21:05:30 +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 037D229511 for ; Thu, 15 Feb 2018 21:05:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1167296AbeBOVEM (ORCPT ); Thu, 15 Feb 2018 16:04:12 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:53934 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1167305AbeBOVEJ (ORCPT ); Thu, 15 Feb 2018 16:04:09 -0500 Received: by mail-wm0-f65.google.com with SMTP id t74so3294756wme.3 for ; Thu, 15 Feb 2018 13:04:08 -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=5/33ujZO7kcqNo+rwnwCYZxyZg1kel2IypZ60ebA13M=; b=Wi6KQpGBLc0Y/s1nhHbm61HcqDisi2YiCTwS1+EEy+sIlBGs/Io0kz+nXexoA9ddgQ YxQASRDqKY7nz6m2eoRciFvxV3rf06auPc2veHrKmetNkVroRGW9jxSxBgNG1S4qctjD IzR/+xV1SR2MF3xFrfYS4qecwKy5aH7SamXcc= 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=5/33ujZO7kcqNo+rwnwCYZxyZg1kel2IypZ60ebA13M=; b=K84KlFUI2Np1m8KoyPtGIlPIuvXvhqQuDnZwMOq7uI1oYO+c/lGo3yayAa9ycLNiSw nLuGT1zPjpvr4ZyqAsMCJpMoCKvEeMHV0KgrFrsF6gLtagLC/+51SYjzZKKjAj13aRrL tEA0FG3MM4+nvusgnZYBAd0Qmz8vhysmgVLvdyT4J/EnPVZQ9PxRiQj5jXKCNnmcspO5 9GdHOb6mnft0wU1ERswZ1kFEGBe3UFTbuEKeKpEv3XCKxpTnz59M9DA9UwZ6zsJZaNRX Pbp520nQcAJm932lkBy6XyeipXwFjdgoS2BTVGty/ddjaUv/AO9YZAAaWwpTjdOTNrfM qAPw== X-Gm-Message-State: APf1xPD9pLQJaGSvSXMbworGltSNHsrNHHg8ezmXck255WdLTWHmx2de 6vR6OBxKCqjdmZn/lidFwQgYSsZeS88= X-Google-Smtp-Source: AH8x224Or+4YOjMW8NlH+7uCGaBedwOScq7nyp1FM+E++Cs3y5DSQh6fvkLHjYh/VCQaYXUk4yHViw== X-Received: by 10.80.184.77 with SMTP id k13mr5201903ede.187.1518728647988; Thu, 15 Feb 2018 13:04:07 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id p55sm8220030edc.15.2018.02.15.13.04.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 13:04:07 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, Christoffer Dall , Marc Zyngier , Andrew Jones , Shih-Wei Li , Dave Martin , Julien Grall , Tomasz Nowicki , Yury Norov Subject: [PATCH v4 14/40] KVM: arm64: Remove kern_hyp_va() use in VHE switch function Date: Thu, 15 Feb 2018 22:03:06 +0100 Message-Id: <20180215210332.8648-15-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180215210332.8648-1-christoffer.dall@linaro.org> References: <20180215210332.8648-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 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 b6126af539b6..85dae7b94a0f 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;