From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] KVM: arm/arm64: Add VGICv3 save/restore API documentation
Date: Thu, 8 Oct 2015 10:23:02 +0200 [thread overview]
Message-ID: <20151008082302.GE14315@cbox> (raw)
In-Reply-To: <003a01d10199$58e96590$0abc30b0$@samsung.com>
On Thu, Oct 08, 2015 at 10:17:09AM +0300, Pavel Fedin wrote:
> Hello!
>
> > + The mpidr encoding is based on the affinity information in the
> > + architecture defined MPIDR, and the field is encoded as follows:
> > + | 63 .... 56 | 55 .... 48 | 47 .... 40 | 39 .... 32 |
> > + | Aff3 | Aff2 | Aff1 | Aff0 |
>
> One concern about this... Does it already have "We are Bosses, we Decided it, It's not subject to
> change, We do not care" status?
That's a rather negative question.
We spent a fair amount of time discussing this during SFO15 and arrived
at the conclusion that this was the way to go.
If there are good arguments for why this is not sufficient or causes
problems, then of course we'll make changes as required.
> Actually, current approach with using index instead of Aff bits
> works pretty well. It works fine with qemu too, because internally qemu also maintains CPU index,
> which it uses for GICv2 accesses.
> Keeping index allows to reuse more code, and provides better backwards compatibility. So could we
> do this?
>
The architecture defines how to address a specific CPU, and that's using
the MPIDR, not inventing our own scheme, so that's what we should do.
For example, I don't think you had the full 32-bits available to address
a CPU in your proposal, so if nothing else, that proposal had less
expressive power than what the architecture defines.
I also don't buy the argument that this saves a lot of code.
If you have something that deals with a cpu index, surely two simple
functions can allow the same amount of code reuse:
unsigned long mpidr_to_vcpu_idx(unsigned long mpidr);
unsigned long vcpu_idx_to_mpidr(unsigned long vcpu_idx);
-Christoffer
next prev parent reply other threads:[~2015-10-08 8:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 19:50 [PATCH] KVM: arm/arm64: Add VGICv3 save/restore API documentation Christoffer Dall
2015-10-08 7:17 ` Pavel Fedin
2015-10-08 8:23 ` Christoffer Dall [this message]
2015-10-08 9:10 ` Pavel Fedin
2015-10-08 9:28 ` Christoffer Dall
2015-10-08 10:14 ` Marc Zyngier
2015-10-08 12:28 ` Pavel Fedin
2015-10-08 12:36 ` Christoffer Dall
2015-10-08 12:45 ` Pavel Fedin
2015-10-08 12:51 ` Marc Zyngier
2015-10-08 12:55 ` Peter Maydell
2015-10-08 10:25 ` Peter Maydell
2015-10-09 7:30 ` Pavel Fedin
2015-10-09 8:06 ` Marc Zyngier
2015-10-09 8:10 ` Pavel Fedin
2015-10-09 8:29 ` Marc Zyngier
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=20151008082302.GE14315@cbox \
--to=christoffer.dall@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 NNTP newsgroup(s).