Message ID | 20210924125359.2587041-20-tabba@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=n783=OO=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24512C433F5 for <linux-arm-kernel@archiver.kernel.org>; Fri, 24 Sep 2021 13:08:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E4FFC60E8B for <linux-arm-kernel@archiver.kernel.org>; Fri, 24 Sep 2021 13:08:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E4FFC60E8B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc: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=OIVQo4sN/R2D0JT3wvqWkCK/8CmcAfHX+I1SoP6XtHc=; b=kQE5lKc04kO9aAI1th4ix7eAwc 2zywgmvYmMverlzgUg8noJb36GjpxsljP5oQewmMdUrdpKiAW5JsPwjed+v5haNfiDOXYYLAwPLCH uZCtAqI6LyA2yrR7b6mG29g9r4lQgP3LCXuEyrgcYW2tJQ1Wvhj+LU5KJn+ukGG+u0NHOBdJ8boQN 0FrD2+SQyb+tad+NDLhhxX0JkeDs4zoXMtBoKtott/pM+fNU0uOQJJBjZLGAkJENJod8CUaDAgdBv PzumcdYAakqmwLKSG6jfh2nCco6fSUEB712IyyqBOZJ6fVL3kWWeJIVPVLgi2bJ4yNYqK3upymj3P t9qC3vAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTkun-00ERjX-3k; Fri, 24 Sep 2021 13:06:58 +0000 Received: from mail-wr1-x44a.google.com ([2a00:1450:4864:20::44a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTkiy-00EME3-3R for linux-arm-kernel@lists.infradead.org; Fri, 24 Sep 2021 12:54:45 +0000 Received: by mail-wr1-x44a.google.com with SMTP id m1-20020a056000180100b0015e1ec30ac3so7988114wrh.8 for <linux-arm-kernel@lists.infradead.org>; Fri, 24 Sep 2021 05:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=cwm3ilFA18I4Raa0wHdWLMhcRNJhs4J6mMJre+L2FYc=; b=je4bpz+fyu10bGVoeoi6Ty4HR9PtcbFNACuFRPupPpY0oUsa9yZ5kNeaIDZcv5QwY6 CSWs6Xj0h0oAHbTrPGjEnrc19tjy+775oHQ7l2R+CvM0oc6tMMC6N5r96PgmOx00xdqu /v1NV17MqFCcglC9pHP1Qbu34U8sSzUZjeotVPNeCTqztX641tRp+ekL3lADIVhvVZgi oJRGASUfqkRJNbKb/8Affuh+LcyRMJm2VOkoMhL747e5fqGybD2S3VnDAbcslVNjbnLL V/H05WEymc21vdiftZeiBopLIXqyb5J/DJcRcrST4LHoIikUl1cR/NrRfsAcvyRUluMG Flyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=cwm3ilFA18I4Raa0wHdWLMhcRNJhs4J6mMJre+L2FYc=; b=q7drAIKbDG3vTl4cwPXrAtwPzIAeWlvjzFjrPO0e923L3qn7MAHqFUjsTFPD6QQQvn Rc+AU75cMuBIFpU2E8weArCEV51ZbSBnqMbwEPFkHPLXXmUc/EqdJA6tfEMwWnj+bkrP SZLxKVVauGYbC8dqJa2ws5mo5mP7BvLTZ8Odh4kRej9Lm8aXdwci4c48y0x4qrCfJlG6 4A9lUwRqZufaE2X3zcMdlbnImSukHhHqOij6TQnwpAGuo5m3hkESJp06sOhswrah9DZO l0s6YQlxL8n/7QM/TWJlLNP6t6XANaKuQZ9jEyzceCH5Qv/5y0yJHKAAFVTA8DZB+isV 9rqw== X-Gm-Message-State: AOAM532O2ntgeZid49SRwvL95iqsygRwkTsej5xDPlHMPx+iFLfpDphW 5jtkfxS+3gcPZjjyPqiG3SqId5AnyQ== X-Google-Smtp-Source: ABdhPJxkPO4x4XuJuQJSrvaVgGRJ8ovLrP7eMX40+ktCtEBAvOSg0HVW16gwA36lCjJ3bdNlORdKrvWRmA== X-Received: from tabba.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:482]) (user=tabba job=sendgmr) by 2002:a7b:c052:: with SMTP id u18mr1931373wmc.105.1632488081942; Fri, 24 Sep 2021 05:54:41 -0700 (PDT) Date: Fri, 24 Sep 2021 13:53:48 +0100 In-Reply-To: <20210924125359.2587041-1-tabba@google.com> Message-Id: <20210924125359.2587041-20-tabba@google.com> Mime-Version: 1.0 References: <20210924125359.2587041-1-tabba@google.com> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [RFC PATCH v1 19/30] KVM: arm64: change calls of get_loaded_vcpu to get_loaded_vcpu_ctxt From: Fuad Tabba <tabba@google.com> To: kvmarm@lists.cs.columbia.edu Cc: maz@kernel.org, will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, drjones@redhat.com, qperret@google.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, tabba@google.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210924_055444_227050_3104F006 X-CRM114-Status: GOOD ( 12.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Reduce scope of vcpu state at hyp by refactoring out state hyp needs
|
expand
|
diff --git a/arch/arm64/kvm/hyp/entry.S b/arch/arm64/kvm/hyp/entry.S index 996bdc9555da..1804be5b7ead 100644 --- a/arch/arm64/kvm/hyp/entry.S +++ b/arch/arm64/kvm/hyp/entry.S @@ -81,10 +81,10 @@ alternative_else_nop_endif SYM_INNER_LABEL(__guest_exit_panic, SYM_L_GLOBAL) // x2-x29,lr: vcpu regs - // vcpu x0-x1 on the stack + // vcpu ctxt x0-x1 on the stack // If the hyp context is loaded, go straight to hyp_panic - get_loaded_vcpu x0, x1 + get_loaded_vcpu_ctxt x0, x1 cbnz x0, 1f b hyp_panic diff --git a/arch/arm64/kvm/hyp/nvhe/host.S b/arch/arm64/kvm/hyp/nvhe/host.S index 2b23400e0fb3..7de2e8716f69 100644 --- a/arch/arm64/kvm/hyp/nvhe/host.S +++ b/arch/arm64/kvm/hyp/nvhe/host.S @@ -134,7 +134,7 @@ SYM_FUNC_END(__hyp_do_panic) .align 7 /* If a guest is loaded, panic out of it. */ stp x0, x1, [sp, #-16]! - get_loaded_vcpu x0, x1 + get_loaded_vcpu_ctxt x0, x1 cbnz x0, __guest_exit_panic add sp, sp, #16
get_loaded_vcpu is used only as a NULL check. get_loaded_vcpu_ctxt fills the same role and reduces the scope. Signed-off-by: Fuad Tabba <tabba@google.com> --- arch/arm64/kvm/hyp/entry.S | 4 ++-- arch/arm64/kvm/hyp/nvhe/host.S | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)