From: Zenghui Yu <zenghui.yu@linux.dev>
To: maobibo <maobibo@loongson.cn>
Cc: Dandan Zhang <zhangdandan@uniontech.com>,
pbonzini@redhat.com, corbet@lwn.net, zhaotianrui@loongson.cn,
chenhuacai@kernel.org, kernel@xen0n.name, kvm@vger.kernel.org,
loongarch@lists.linux.dev, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, guanwentao@uniontech.com,
wangyuli@uniontech.com, baimingcong@uniontech.com,
Xianglai Li <lixianglai@loongson.cn>,
Mingcong Bai <jeffbai@aosc.io>
Subject: Re: [PATCH v2] Loongarch: KVM: Add KVM hypercalls documentation for LoongArch
Date: Thu, 29 Aug 2024 23:13:23 +0800 [thread overview]
Message-ID: <861e94d5-b031-42e5-81ea-9ec059beba42@linux.dev> (raw)
In-Reply-To: <29999cfc-6ec1-d881-277a-19f51f5c7b96@loongson.cn>
On 2024/8/28 09:07, maobibo wrote:
> Zenghui,
>
> On 2024/8/27 上午1:00, Zenghui Yu wrote:
> >
> > On 2024/8/26 13:47, Dandan Zhang wrote:
> > > +KVM Hypercalls Documentation
> > > +============================
> > > +
> > > +The template for each hypercall is as follows:
> > > +
> > > +1. Hypercall name
> > > +2. Purpose
> > > +
> > > +1. KVM_HCALL_FUNC_PV_IPI
> >
> > Is it still a work-in-progress thing? I don't see it in mainline.
> It should be KVM_HCALL_FUNC_IPI here.
Good! So that I can probably read further. :-)
> > > +------------------------
> > > +
> > > +:Purpose: Send IPIs to multiple vCPUs.
> > > +
> > > +- a0: KVM_HCALL_FUNC_PV_IPI
> > > +- a1: Lower part of the bitmap for destination physical CPUIDs
> > > +- a2: Higher part of the bitmap for destination physical CPUIDs
> > > +- a3: The lowest physical CPUID in the bitmap
> >
> > - Is it a feature that implements IPI broadcast with a PV method?
> > - Don't you need to *at least* specify which IPI to send by issuing this
> > hypercall?
> Good question. It should be documented here. PV IPI on LoongArch
> includes both PV IPI multicast sending and PV IPI receiving, and SWI is
Oh yup, I intended to say "multicast". Thanks for the explanation.
> used for PV IPI inject since there is no VM-exits accessing SWI registers.
>
> >
> > But again, as I said I know nothing about loongarch. I might have
> > missed some obvious points.
> >
> > > +
> > > +The hypercall lets a guest send multiple IPIs (Inter-Process
> > > Interrupts) with
> > > +at most 128 destinations per hypercall.The destinations are
> > > represented in a
> > ^
> > Add a blank space.
> >
> > > +bitmap contained in the first two input registers (a1 and a2).
> > > +
> > > +Bit 0 of a1 corresponds to the physical CPUID in the third input
> > > register (a3)
> > > +and bit 1 corresponds to the physical CPUID in a3+1 (a4), and so on.
> >
> > This looks really confusing. "Bit 63 of a1 corresponds to the physical
> > CPUID in a3+63 (a66)"?
> The description is problematic, thanks for pointing it out.
> It should be value of register a3 plus 1, rather than a4, how about
> *"the physical CPUID in a3 + 1"* here?
Better than the original version, I think.
Thanks,
Zenghui
prev parent reply other threads:[~2024-08-29 15:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 5:47 [PATCH v2] Loongarch: KVM: Add KVM hypercalls documentation for LoongArch Dandan Zhang
2024-08-26 17:00 ` Zenghui Yu
2024-08-28 1:07 ` maobibo
2024-08-28 4:44 ` WangYuli
2024-08-29 15:13 ` Zenghui Yu [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=861e94d5-b031-42e5-81ea-9ec059beba42@linux.dev \
--to=zenghui.yu@linux.dev \
--cc=baimingcong@uniontech.com \
--cc=chenhuacai@kernel.org \
--cc=corbet@lwn.net \
--cc=guanwentao@uniontech.com \
--cc=jeffbai@aosc.io \
--cc=kernel@xen0n.name \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixianglai@loongson.cn \
--cc=loongarch@lists.linux.dev \
--cc=maobibo@loongson.cn \
--cc=pbonzini@redhat.com \
--cc=wangyuli@uniontech.com \
--cc=zhangdandan@uniontech.com \
--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