From: andre.przywara@linaro.org (Andre Przywara)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: KVM: iterate over all CPUs for CPU compatibility check
Date: Mon, 15 Apr 2013 11:39:28 +0200 [thread overview]
Message-ID: <516BCAD0.9000708@linaro.org> (raw)
In-Reply-To: <CAFEAcA-bPoa8YoPuHPmupzfUW+yR233XquK79eNorzcRpFiK=g@mail.gmail.com>
On 04/15/2013 11:14 AM, Peter Maydell wrote:
> On 15 April 2013 09:54, Christoffer Dall <cdall@cs.columbia.edu> wrote:
>> On Mon, Apr 15, 2013 at 1:43 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>>> As for the affinity, we can enforce this very easily.
>>>
>> OK, but let's not go down this road until we've verified that this is
>> really an issue that needs to be handled by excluding A7s. Andre, can
>> you give us some more details?
Sure, I am about to collect some data.
>
> We *must* exclude KVM vcpu threads from ever running on A7s,
> because the cp15 handling code as it stands does not virtualize
> various registers (most notably the ID/feature registers) and
> so the vcpu will bounce between "looks like an A15" and "looks
> like a weird hybrid between A7 and A15".
Can't we propagate some least common denominator or safe values for
those registers instead of propagating the host ones? Or ignore writes
to them? Or are there any real showstoppers which I overlooked? Things
like cache architecture properties could just be set to some basic
values, right?
On x86 propagating too much of host CPU information has proven to be
problematic, so for instance cache info is very generic. Things are more
complicated here, because CPUID is (guest) userland accessible.
Eventually the user/qemu should be able to override this, but as a
default and for now we should inject one fixed handcrafted CPU
regardless of the actual host CPU. If A7 is easier in this regards, this
should be considered, too.
> Assuming we don't want to tackle full big.LITTLE host support
> right now, I can see two options:
> * forbid KVM completely on a system with any non-A15s
> * force KVM vcpus to only ever run on the A15s
I thought a bit about this. It is not so easy to accomplish in a sane
way. The CPU is chosen by the scheduler, actually for the QEMU thread.
taskset could be of use here, but the affinity could be changed at any
time by userland. I thought about returning -EINVAL for the KVM_RUN
ioctl if the CPU is not appropriate, but a) QEMU does not know how to
handle this properly and b) kvm_arch_vcpu_load currently returns void,
so we would need to change it for all KVM architectures.
Not sure if its worth to establish this until we fix bL support properly.
> [Q: does
> all the hyp mode code have to also run on the A15s or
> is it A7-safe?]
Good point. It seems like the code hangs in init_hyp_mode().
Will do more debugging in there now.
Regards,
Andre.
next prev parent reply other threads:[~2013-04-15 9:39 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 13:04 [PATCH] ARM: KVM: iterate over all CPUs for CPU compatibility check Andre Przywara
2013-04-12 13:24 ` Marc Zyngier
2013-04-12 13:40 ` Peter Maydell
2013-04-12 13:49 ` Marc Zyngier
2013-04-17 10:19 ` Russell King - ARM Linux
2013-04-17 10:35 ` Marc Zyngier
2013-04-17 11:07 ` Christoffer Dall
2013-04-17 11:30 ` Marc Zyngier
2013-04-17 11:38 ` Peter Maydell
2013-04-17 11:42 ` Alexander Graf
2013-04-17 11:45 ` Christoffer Dall
2013-04-17 12:24 ` Marc Zyngier
2013-04-17 12:25 ` Peter Maydell
2013-04-17 12:28 ` Marc Zyngier
2013-04-17 12:38 ` Peter Maydell
2013-04-17 13:00 ` Marc Zyngier
2013-04-17 19:28 ` Christoffer Dall
2013-04-17 11:38 ` Christoffer Dall
2013-04-12 13:58 ` Andre Przywara
2013-04-12 14:14 ` Marc Zyngier
2013-04-15 4:57 ` Christoffer Dall
2013-04-15 7:50 ` Marc Zyngier
2013-04-15 8:28 ` Christoffer Dall
2013-04-15 8:43 ` Marc Zyngier
2013-04-15 8:54 ` Christoffer Dall
2013-04-15 9:14 ` Peter Maydell
2013-04-15 9:39 ` Andre Przywara [this message]
2013-04-15 9:45 ` Peter Maydell
[not found] ` <CAJRNFKJoBzgt4UhxsH65_LyhcGXPnzB_pg3q-zeYT2OVv59q4A@mail.gmail.com>
2013-04-15 13:13 ` Andre Przywara
2013-04-15 13:48 ` Will Deacon
2013-04-15 14:26 ` Andre Przywara
2013-04-15 14:39 ` Peter Maydell
2013-04-15 14:53 ` Alexander Spyridakis
2013-04-16 16:26 ` Christoffer Dall
2013-04-16 16:33 ` Marc Zyngier
2013-04-17 8:08 ` Andre Przywara
2013-04-17 8:16 ` Marc Zyngier
[not found] ` <CAEDV+g+3nkdvbLdj0m-ZdDKt0JY2vgzhP2AQA2nf=R3h4yTQmQ@mail.gmail.com>
2013-04-19 12:58 ` Andre Przywara
2013-04-19 16:13 ` Christoffer Dall
2013-04-22 10:36 ` Andre Przywara
2013-04-22 11:02 ` Marc Zyngier
2013-04-22 11:14 ` Marc Zyngier
2013-04-22 14:35 ` Andre Przywara
2013-04-16 15:59 ` Christoffer Dall
2013-04-16 16:03 ` Christoffer Dall
2013-04-16 18:37 ` Alexander Spyridakis
2013-04-16 18:43 ` Alexander Spyridakis
2013-04-16 23:13 ` Christoffer Dall
2013-04-16 0:26 ` Geoff Levand
2013-04-16 16:24 ` Christoffer Dall
2013-04-16 16:40 ` Marc Zyngier
2013-04-17 8:01 ` Andre Przywara
-- strict thread matches above, loose matches on Subject: below --
2013-04-17 10:52 Andre Przywara
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=516BCAD0.9000708@linaro.org \
--to=andre.przywara@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).