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: 10223657 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 050C760467 for ; Thu, 15 Feb 2018 21:13:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA011294EB for ; Thu, 15 Feb 2018 21:13:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE5F82952D; Thu, 15 Feb 2018 21:13:46 +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 4A113294EB for ; Thu, 15 Feb 2018 21:13:46 +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=oWP67I9z+IuqvXcitJQKWaco45Lkt+kLiQnaZ6lI54o=; b=GF68S2/uCKqqbpBpWXO4RuIBJj 3lgW5YCbJ2nu/H3fqMzNUsZFtui80GGfjrVJ8yZH3CCR6rF2IgbKbfElet/gHZ0PtXssHwirEM6+i /T8/dBdK/6Adgi1IIhM7HdPuybbrRpF9FspOFv69zEl2rnSIGnXdWwVA0zMdXsTQgpsXG9eB691Jb 8xX3oAKGBTkNBrRQTyYMuJaFFa3x4Yjx89mjmlaSSHNWYgY7IlW8nIQU82DFXk3LtReLsMe/SWn/g joNpeceDJl5USknSu5adp3408I3b1KiJng6vig6Hnazm98RgeJ8ti7UB+oUrfVsnQfM/o6Bd/sIIR DBhOQOmA==; 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 1emQqa-0000oT-Q8; Thu, 15 Feb 2018 21:13:40 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1emQhS-0008SQ-RC for linux-arm-kernel@lists.infradead.org; Thu, 15 Feb 2018 21:04:41 +0000 Received: by mail-wm0-x244.google.com with SMTP id k87so3311696wmi.0 for ; Thu, 15 Feb 2018 13:04:09 -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=nYfGFHpjEBUC0w+Q7NuSxBOT4O//g3Jd40Yi058LlB8LRd0QqcluFnRTgaT27q9k0+ lNKDUPM4tjFbamjMT2n6FNg9PlnpK+9gkZ3+DKj6HonHOHvKxZrUZXQnYXsH5gIbwr5/ +KdXSO5hbToP2LRIZMgBQuIqL/VdS8t98BnclO5Cu6wNHK9+7+hQAXescYGBB9aF+HJ0 IwPM47yeDEadZiu3vdGt6wiGgQhX68cSxqbKLFkYedO/8Wdw7LkrVn9pl9BeW4prakvU i8iuChVNovITXXjb+/aLJ3+uZt5A9d1/sTqCiVDgyRqinuwQEaWEE+yXFotPZSM5Mr2i KAtw== X-Gm-Message-State: APf1xPDqLP5XvwkVN17nDXZsbDMwkOzGNib5I/Mi8yzdXV3LT2TXBgi8 sOytDYbRUL1MzYJVfvojq4lapA== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180215_130415_207598_A2ADAAF2 X-CRM114-Status: UNSURE ( 9.79 ) 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: Andrew Jones , kvm@vger.kernel.org, Marc Zyngier , Tomasz Nowicki , Julien Grall , Yury Norov , Christoffer Dall , 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 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;