From: "BillXiang" <xiangwencheng@lanxincomputing.com>
To: <anup@brainfault.org>
Cc: <ajones@ventanamicro.com>, <xiangwencheng@lanxincomputing.com>,
<kvm-riscv@lists.infradead.org>, <kvm@vger.kernel.org>,
<linux-riscv@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <atishp@atishpatra.org>,
<paul.walmsley@sifive.com>, <palmer@dabbelt.com>,
<aou@eecs.berkeley.edu>
Subject: [PATCH] riscv: KVM: Remove unnecessary vcpu kick
Date: Wed, 19 Feb 2025 09:54:26 +0800 [thread overview]
Message-ID: <20250219015426.1939-1-xiangwencheng@lanxincomputing.com> (raw)
Thank you Andrew Jones, forgive my errors in the last email.
I'm wondering whether it's necessary to kick the virtual hart
after writing to the vsfile of IMSIC.
From my understanding, writing to the vsfile should directly
forward the interrupt as MSI to the virtual hart. This means that
an additional kick should not be necessary, as it would cause the
vCPU to exit unnecessarily and potentially degrade performance.
I've tested this behavior in QEMU, and it seems to work perfectly
fine without the extra kick.
Would appreciate any insights or confirmation on this!
Best regards.
Signed-off-by: BillXiang <xiangwencheng@lanxincomputing.com>
---
arch/riscv/kvm/aia_imsic.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/riscv/kvm/aia_imsic.c b/arch/riscv/kvm/aia_imsic.c
index a8085cd8215e..29ef9c2133a9 100644
--- a/arch/riscv/kvm/aia_imsic.c
+++ b/arch/riscv/kvm/aia_imsic.c
@@ -974,7 +974,6 @@ int kvm_riscv_vcpu_aia_imsic_inject(struct kvm_vcpu *vcpu,
if (imsic->vsfile_cpu >= 0) {
writel(iid, imsic->vsfile_va + IMSIC_MMIO_SETIPNUM_LE);
- kvm_vcpu_kick(vcpu);
} else {
eix = &imsic->swfile->eix[iid / BITS_PER_TYPE(u64)];
set_bit(iid & (BITS_PER_TYPE(u64) - 1), eix->eip);
--
2.46.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2025-02-19 1:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 1:54 BillXiang [this message]
2025-02-19 8:36 ` [PATCH] riscv: KVM: Remove unnecessary vcpu kick Andrew Jones
2025-02-19 8:51 ` Radim Krčmář
2025-02-20 7:12 ` xiangwencheng
2025-02-20 8:01 ` Andrew Jones
2025-02-20 8:17 ` xiangwencheng
2025-02-20 8:50 ` Radim Krčmář
2025-02-20 12:14 ` Andrew Jones
-- strict thread matches above, loose matches on Subject: below --
2025-02-18 8:00 项文成
2025-02-18 17:48 ` Andrew Jones
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=20250219015426.1939-1-xiangwencheng@lanxincomputing.com \
--to=xiangwencheng@lanxincomputing.com \
--cc=ajones@ventanamicro.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@atishpatra.org \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/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