From patchwork Thu Sep 3 13:53:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Scull X-Patchwork-Id: 11753659 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43927618 for ; Thu, 3 Sep 2020 13:56:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19A3C208B3 for ; Thu, 3 Sep 2020 13:56:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MIOsbWKQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="aLacCg2v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19A3C208B3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=99byFNEN+KFMaZWGGxG2VkFpCKd1GvSDndOHcF8c7QQ=; b=MIOsbWKQY+OHNRtflUTkyFKZa s/Q8qnqF+WsCO8QJT/nzjFbgyRFSRZlKZRyGIxyTYXydh+Mos/A65BFe9HaSz1aMLwJ2L/U+ArHEp /ncavNQeF4UxBG/qtcNGUYGOcA66YvWsLn8tt1T9iLahX5CIwRCoz+0zz3GdfernXMtGIpmZ/SQUp UyQvC7l8vnhqaf2KOOzRaGR9VQ0o26lPwrPxu0qpr+mDLYEiX5tjrTie46/JxmeTKZGenPHdJ22B3 UD0wFHO6ZW0nLlHKgmnsyTqE6PiSXzlVklHMT0kOApNSb6Ki9/Ab0oITonYWijl+3SAtE6kIIJm/K Xcio7HWag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDpiN-0003Dj-Af; Thu, 03 Sep 2020 13:55:47 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDpgT-00026o-N0 for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2020 13:53:51 +0000 Received: by mail-yb1-xb49.google.com with SMTP id a5so2889284ybh.3 for ; Thu, 03 Sep 2020 06:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=4iP/0UmEC3+yJOjmYc8EWVC/sjbrwx1IUcG157f2HaQ=; b=aLacCg2v86hUnmf7odV/s5z/WAbRXvfyamfg7rnFPyJ0c/AHAKFrNblQS/fgSB/ADY A9sP3/R4n9SEbVvduYpp+0MFCoPjIVgZcs6lJy5QEM9Yc3qf2FN6pWSH5QvdS3UWxbLQ mF3Ye2t2/OkpzyifnZjywJToU0kyuZFZdvGy3N9NDBX0TzrKASbz1u0JLN9EepS+VNhh qb3I2rUipw8AKHuLwvfMXzOxixwN58bkmXFIViVmkc6y41aBhclNvE9VESvtX7S6ORQF eYSLOt+17oIAkdySsgqNRt4S5RV/OHHcWHjTmY0xoEsrky1C/3s0GgScRt37729gkU5t tWNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=4iP/0UmEC3+yJOjmYc8EWVC/sjbrwx1IUcG157f2HaQ=; b=NVWAT/CZZeA82k9XIo21ED07aI7prXUHP+DlbkNBvGhq6JieXecoBzfv2qSZKCwWIs n32EiEQC/eNw6UFFC4MEgPdXcKWsKTRpv5YzDJD5N5wZn8z2aQUP0y17oBOwmvWKxlMP 842cxCneMCbb9q/d7mXa6AFHcUjuoKAVpNd4BxT/a6Xcnz8qy4LIcRLMLClrVQZ4h8ke Dq49mcepL/zIewgNvDA6Vc1ekS4rFo/svkRBuaCNL5bD00oo5pCXKNn+G1HQOhDHF2/y E/BZluNcEvylTNFUfCfmFbBBKYf6ERTV4itbtgPUGx5W4bjd3znZQ0IYDn8CUkICNZJn hA4g== X-Gm-Message-State: AOAM530VHVqj6Kla3wkBQoNrYa7cp9aSMxUIdEYcFMsXWykddsNG55sW CSJNMNNY3alGJYFck/4VaRXH9KjySGo= X-Google-Smtp-Source: ABdhPJxRFkOJikYMz+BDwt8BKYMA4bhps+QNVk7nAdKaPI6HmB+eD97tWpk67Ge43bFov2pZjNujt2Ge5eU= X-Received: from ascull.lon.corp.google.com ([2a00:79e0:d:109:4a0f:cfff:fe4a:6363]) (user=ascull job=sendgmr) by 2002:a25:3891:: with SMTP id f139mr2838638yba.174.1599141225490; Thu, 03 Sep 2020 06:53:45 -0700 (PDT) Date: Thu, 3 Sep 2020 14:53:04 +0100 In-Reply-To: <20200903135307.251331-1-ascull@google.com> Message-Id: <20200903135307.251331-16-ascull@google.com> Mime-Version: 1.0 References: <20200903135307.251331-1-ascull@google.com> X-Mailer: git-send-email 2.28.0.402.g5ffc5be6b7-goog Subject: [PATCH v3 15/18] KVM: arm64: nVHE: Pass pointers consistently to hyp-init From: Andrew Scull To: kvmarm@lists.cs.columbia.edu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200903_095349_790117_D4677D73 X-CRM114-Status: GOOD ( 12.92 ) X-Spam-Score: -8.2 (--------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-8.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:b49 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.5 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, kernel-team@android.com, suzuki.poulose@arm.com, maz@kernel.org, Sudeep Holla , james.morse@arm.com, Andrew Scull , catalin.marinas@arm.com, will@kernel.org, julien.thierry.kdev@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Rather than some being kernel pointer and others being hyp pointers, standardize on all pointers being hyp pointers. Signed-off-by: Andrew Scull --- arch/arm64/kvm/arm.c | 1 + arch/arm64/kvm/hyp/nvhe/hyp-init.S | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index ae4b34f91e94..6b7180072c8d 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -1278,6 +1278,7 @@ static void cpu_init_hyp_mode(void) pgd_ptr = kvm_mmu_get_httbr(); hyp_stack_ptr = __this_cpu_read(kvm_arm_hyp_stack_page) + PAGE_SIZE; + hyp_stack_ptr = kern_hyp_va(hyp_stack_ptr); vector_ptr = (unsigned long)kern_hyp_va(kvm_ksym_ref(__kvm_hyp_host_vector)); /* diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S b/arch/arm64/kvm/hyp/nvhe/hyp-init.S index d9434e90c06d..abe885e26fe2 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S +++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S @@ -114,7 +114,6 @@ alternative_else_nop_endif isb /* Set the stack and new vectors */ - kern_hyp_va x1 mov sp, x1 msr vbar_el2, x2