From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: KVM: iterate over all CPUs for CPU compatibility check
Date: Tue, 16 Apr 2013 18:33:05 +0200 [thread overview]
Message-ID: <32d532438f5b621e40679aea9f5888c7@localhost> (raw)
In-Reply-To: <CAEDV+gJB7Bj9O7pftFqoYQ=goORjdurBnEfQVmC5arDuNJfpBg@mail.gmail.com>
On Tue, 16 Apr 2013 09:26:26 -0700, Christoffer Dall
<cdall@cs.columbia.edu> wrote:
> On Mon, Apr 15, 2013 at 6:48 AM, Will Deacon <will.deacon@arm.com>
wrote:
>> On Mon, Apr 15, 2013 at 02:13:55PM +0100, Andre Przywara wrote:
>>> On 04/15/2013 11:52 AM, Alexander Spyridakis wrote:
>>> > I've run on this problem before, while trying to run KVM guests on
A7
>>> > cores.
>>> >
>>> > For some reason the 3rd A7 hangs in arch/arm/kvm/init.S, on the
>>> > instruction that updates HSCTLR between the two isbs on
__do_hyp_init
>>> > (mcr p15, 4, r0, c1, c0, 0). If you boot the system with maxcpus=4
>>> > then
>>> > init_hyp_mode() will not hang on the A7 cluster. Other than that
from
>>> > my
>>> > limited testing KVM on A7 works on a usual linux guest. I also tried
>>> > to
>>> > only boot the 3rd A7 core to rule out any racing issues, but still
the
>>> > same behaviour applies.
>>>
>>> Could well be the same issue here. I chased it down till CPU 2 goes
into
>>> HYP mode to do the initialization.
>>> I am running with maxcpus=3 (this increases the likelyhood that
>>> kvm_target_cpu() runs on an A15), so CPU #2 is the only one A7.
>>> As the HYP mode exception table is empty except for the HVC trap, it
may
>>> be looping here. I am trying now to get the PC of the faulty
>>> instruction.
>>
>> Yes, it sounds like you're taking a recursive fault because the vectors
>> aren't installed yet. Is there any chance you can find out what value
>> you end
>> up writing (or trying to write) to the HSCTLR please?
>>
> Actually I'm a little confused, wasn't Andre seeing a halt on an A15
> cpu, not an A7? Or is the theory that an A7 locks up and the calling
> A15 hangs on the SMP call to cpu_init_hyp_mode, waiting for the A7 to
> complete?
Yes, A15 hanging, not A7. That's why I'm strongly opposed to this patch.
I'm pretty sure the A7s only have a side effect that triggers a kernel bug
on the A15 side. Before taking *any* patch around this, we should
understand the issue fully, and not start patching random stuff just
because Linus is going to tag 3.9.
M.
--
Fast, cheap, reliable. Pick two.
next prev parent reply other threads:[~2013-04-16 16:33 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
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 [this message]
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=32d532438f5b621e40679aea9f5888c7@localhost \
--to=marc.zyngier@arm.com \
--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).