From: Huacai Chen <chenhuacai@kernel.org>
To: Bibo Mao <maobibo@loongson.cn>
Cc: Tianrui Zhao <zhaotianrui@loongson.cn>,
kernel@xen0n.name, kvm@vger.kernel.org,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH v3 0/4] LoongArch: KVM: Some small enhanments
Date: Wed, 8 Apr 2026 18:29:23 +0800 [thread overview]
Message-ID: <CAAhV-H6TyXh95QUZcYbQ6_BaSjzCEpNfmCBdMT9S8Sr3YYWyjw@mail.gmail.com> (raw)
In-Reply-To: <20260323025613.3260876-1-maobibo@loongson.cn>
Applied, thanks.
Huacai
On Mon, Mar 23, 2026 at 10:56 AM Bibo Mao <maobibo@loongson.cn> wrote:
>
> There are some small enhancements about LoongArch KVM. There is
> improvement about VM entry path in patch 1 and patch, add pending
> request checking in advance and it is empty at most time.
>
> Also change vcpu_is_preempted() from function to macro method, by actual
> benchmark test such as unixbench. It is affected on physical machine
> with function method. With the macro method, only one nop instruction
> is added and there is no parameter parsing, there is no obvious
> performance influence with physical machine.
> ---
> v2 ... v3:
> 1. Add new patch to move host CSR_GSTAT save and restore in context
> switch stage rather than VM entry, update it only when VMID is
> changed on VM entry.
>
> v1 ... v2:
> 1. Add READ_ONCE() with src->preempted to avoid compiler optimization.
> ---
> Bibo Mao (4):
> LoongArch: KVM: Add kvm_request_pending checking in
> kvm_late_check_requests()
> LoongArch: KVM: Move host CSR_EENTRY save and restore in context
> switch
> LoongArch: KVM: Move host CSR_GSTAT save and restore in context switch
> LoongArch: KVM: Set vcpu_is_preempted() with macro rather than
> function
>
> arch/loongarch/include/asm/qspinlock.h | 27 +++++++++++++++++++++-----
> arch/loongarch/kernel/paravirt.c | 15 ++------------
> arch/loongarch/kvm/main.c | 8 ++++----
> arch/loongarch/kvm/vcpu.c | 26 +++++++++++++------------
> 4 files changed, 42 insertions(+), 34 deletions(-)
>
>
> base-commit: c369299895a591d96745d6492d4888259b004a9e
> --
> 2.39.3
>
prev parent reply other threads:[~2026-04-08 10:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 2:56 [PATCH v3 0/4] LoongArch: KVM: Some small enhanments Bibo Mao
2026-03-23 2:56 ` [PATCH v3 1/4] LoongArch: KVM: Add kvm_request_pending checking in kvm_late_check_requests() Bibo Mao
2026-03-23 2:56 ` [PATCH v3 2/4] LoongArch: KVM: Move host CSR_EENTRY save and restore in context switch Bibo Mao
2026-03-23 2:56 ` [PATCH v3 3/4] LoongArch: KVM: Move host CSR_GSTAT " Bibo Mao
2026-03-23 2:56 ` [PATCH v3 4/4] LoongArch: KVM: Set vcpu_is_preempted() with macro rather than function Bibo Mao
2026-04-08 10:29 ` 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-H6TyXh95QUZcYbQ6_BaSjzCEpNfmCBdMT9S8Sr3YYWyjw@mail.gmail.com \
--to=chenhuacai@kernel.org \
--cc=jgross@suse.com \
--cc=kernel@xen0n.name \
--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).