loongarch.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: zhaotianrui <zhaotianrui@loongson.cn>
Cc: maobibo <maobibo@loongson.cn>,
	kvm@vger.kernel.org, loongarch@lists.linux.dev,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] LoongArch: KVM: Remove unnecessary CSR register saving during enter guest
Date: Mon, 26 Feb 2024 20:58:00 +0800	[thread overview]
Message-ID: <CAAhV-H6wC95cgo=f2-kx6viSKUPo6Mty+Hrr7XJ=7pKJeHbQOA@mail.gmail.com> (raw)
In-Reply-To: <fbd8b226-1972-322b-d884-bb41d262dd16@loongson.cn>

LGTM, queued for loongarch-kvm.

Huacai

On Thu, Feb 1, 2024 at 11:30 AM zhaotianrui <zhaotianrui@loongson.cn> wrote:
>
> Reviewed-by: Tianrui Zhao <zhaotianrui@loongson.cn>
>
> 在 2024/1/31 上午11:48, maobibo 写道:
> > slightly ping :)
> >
> > On 2024/1/12 上午11:50, Bibo Mao wrote:
> >> Some CSR registers like CRMD/PRMD are saved during enter VM mode. However
> >> they are not restored for actual use, saving for these CSR registers
> >> can be removed.
> >>
> >> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> >> ---
> >>   arch/loongarch/kvm/switch.S | 6 ------
> >>   1 file changed, 6 deletions(-)
> >>
> >> diff --git a/arch/loongarch/kvm/switch.S b/arch/loongarch/kvm/switch.S
> >> index 0ed9040307b7..905b90de50e8 100644
> >> --- a/arch/loongarch/kvm/switch.S
> >> +++ b/arch/loongarch/kvm/switch.S
> >> @@ -213,12 +213,6 @@ SYM_FUNC_START(kvm_enter_guest)
> >>       /* Save host GPRs */
> >>       kvm_save_host_gpr a2
> >> -    /* Save host CRMD, PRMD to stack */
> >> -    csrrd    a3, LOONGARCH_CSR_CRMD
> >> -    st.d    a3, a2, PT_CRMD
> >> -    csrrd    a3, LOONGARCH_CSR_PRMD
> >> -    st.d    a3, a2, PT_PRMD
> >> -
> >>       addi.d    a2, a1, KVM_VCPU_ARCH
> >>       st.d    sp, a2, KVM_ARCH_HSP
> >>       st.d    tp, a2, KVM_ARCH_HTP
> >>
> >> base-commit: de927f6c0b07d9e698416c5b287c521b07694cac
> >>
>
>

      reply	other threads:[~2024-02-26 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  3:50 [PATCH] LoongArch: KVM: Remove unnecessary CSR register saving during enter guest Bibo Mao
2024-01-31  3:48 ` maobibo
2024-02-01  3:29   ` zhaotianrui
2024-02-26 12:58     ` Huacai Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAhV-H6wC95cgo=f2-kx6viSKUPo6Mty+Hrr7XJ=7pKJeHbQOA@mail.gmail.com' \
    --to=chenhuacai@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=maobibo@loongson.cn \
    --cc=zhaotianrui@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).