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 16:26:50 +0200 [thread overview]
Message-ID: <516C0E2A.40809@linaro.org> (raw)
In-Reply-To: <20130415134837.GI9827@mudshark.cambridge.arm.com>
On 04/15/2013 03:48 PM, Will Deacon 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?
Mmh, still thinking about a nice way to get some information out of HYP
mode. schedule_delayed_work() to monitor a memory address didn't work
(too early?).
But meanwhile I compared the A7 and A15 TRM 4.3.32 HSCTLR:
Bit 21 is fixed 0 on A15, but fixed 1 on A7.
Can someone confirm that this is not a typo?
Regards,
Andre.
next prev parent reply other threads:[~2013-04-15 14:26 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 [this message]
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=516C0E2A.40809@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).