From patchwork Thu Oct 12 10:41:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10001657 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 0E88960325 for ; Thu, 12 Oct 2017 10:54:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0138328D72 for ; Thu, 12 Oct 2017 10:54:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9B5C28D78; Thu, 12 Oct 2017 10:53:59 +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 87C7528D74 for ; Thu, 12 Oct 2017 10:53:59 +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=1XPGxSmdB9oVq3dkdvFfoER8XCRPVJZdyI5IxDefNd0=; b=gCnormMplTFsDk9OSOBAw/E1bX pY+cbRAbNFyIIdGSyr17VlqSBmboMDb72WLirHXc2jGrFtHnuCCHuIFOZYz+GWBImIIgDjs5aYiM4 q5QLObn45TZDRiMqXbQ5ayO1QD47VD/D00/tUS3QylgKqDXkHP5o3XGhM3gOBqOYqF2t7U78Aw9oI cEzKVAuzDgPuNKQ7KWeHzBLfAepZYpwb018SyPLdebGuIy0bXVBRSdWN0ha08VyaL1JpBhsbhe34/ RSrgpGJV+Yxxxx8jbcyiG6bdUmH5IkAvUlZZVUA5LSRtf2s1IOLOppGpU3vaPT7/NjpaCuJ3TBIPw DtA/3IgQ==; 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 1e2b7m-0003JM-DO; Thu, 12 Oct 2017 10:53:58 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e2awV-0007XX-RF for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2017 10:42:37 +0000 Received: by mail-wm0-x235.google.com with SMTP id i124so12074578wmf.3 for ; Thu, 12 Oct 2017 03:42:01 -0700 (PDT) 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=RgFV0rrCQuYaSwnm8OENX3SdAi45HySeggUdtpds8F0=; b=aYxSShrdAH0YRhofS/OSy9ZGTpUamSKJOpaHn7K2VNPa6zDBs8KnzKOcWDRvzxeJL2 cr/uDyXAJmwS0vlyF8Hx0n1R47gJ2+E+sO53pGpGgoXNUQP+6sEuqCigMFgPodhaI8wO /7smfDehAjFyNEhvyPPv2tJXDZ17rB3rm3YIE= 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=RgFV0rrCQuYaSwnm8OENX3SdAi45HySeggUdtpds8F0=; b=fYOblui9ZvOrCn5ReIu+YUlltIEE04TuhR3Y8QCt/tqUOHnhV16ELco5AcH4vzfxMz 8thhUTlM9Z01APDsfdQT99VEQDpG+AAmHZp9vR8Zuda9q9O5Pj6ITSMpP19WbmylqJVw YpZMLVwNjt9VLQr/uNkh4aipmyVLXLGskR4gCdUaxN7TZP/fQz8zLgu0I54JQZk6yDTJ 4p+RWZkjl6aAjnrB5DSGIwu+PRIm1v9WtHn0ab7UjT8TPtaCUgerhQJSR0ImAsOW29Lz LildKxqZMt3ERcuYLwIN6I501qnRUzgm3vn5C46e0Ew+MP7igc4RrhZ1NwM3bvRdnoaE I4XQ== X-Gm-Message-State: AMCzsaXBGNt3TqpkNbZwDNbSKnPp33vheWcRiTiyLZ2w+HPoLFG+58Ex NilQMOtrYuSHoUmp9bg5JE2/xQ== X-Google-Smtp-Source: AOwi7QBJGk7F009VdObVhNCf8iuAINmJxGT9FYM9K9Jo+NlS2FkgUFvquiq7JzI1oFRlbyOYq9cj8w== X-Received: by 10.80.141.19 with SMTP id s19mr2443802eds.241.1507804920648; Thu, 12 Oct 2017 03:42:00 -0700 (PDT) Received: from localhost.localdomain (xd93dd96b.cust.hiper.dk. [217.61.217.107]) by smtp.gmail.com with ESMTPSA id g49sm4798603edc.31.2017.10.12.03.41.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 03:41:59 -0700 (PDT) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH 14/37] KVM: arm64: Remove kern_hyp_va() use in VHE switch function Date: Thu, 12 Oct 2017 12:41:18 +0200 Message-Id: <20171012104141.26902-15-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171012104141.26902-1-christoffer.dall@linaro.org> References: <20171012104141.26902-1-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171012_034220_433471_6AB9FD14 X-CRM114-Status: UNSURE ( 9.21 ) 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 , 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. Signed-off-by: Christoffer Dall Reviewed-by: Andrew Jones --- 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 8a0f38f..b72dc66 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -326,9 +326,7 @@ int kvm_vcpu_run(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;