All of lore.kernel.org
 help / color / mirror / Atom feed
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 15:13:55 +0200	[thread overview]
Message-ID: <516BFD13.1000400@linaro.org> (raw)
In-Reply-To: <CAJRNFKJoBzgt4UhxsH65_LyhcGXPnzB_pg3q-zeYT2OVv59q4A@mail.gmail.com>

On 04/15/2013 11:52 AM, Alexander Spyridakis wrote:
> On 15 April 2013 11:39, Andre Przywara <andre.przywara@linaro.org
> <mailto:andre.przywara@linaro.org>> wrote:
>
>      > [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.
>
>
> 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.


(on a TC2: 0-1: A15, 2-4: A7)
kvm_target_cpu() on CPU #1, part is c0f0
kvm [1]: entering init_hyp_mode on CPU 1
kvm [1]: kvm_mmu_init() returned 0 on CPU 1
kvm [1]: hyp_get_vectors() finished on CPU 1
kvm [1]: allocated stack for HV mode on 5 CPUs, now on CPU 1
kvm [0]: entering cpu_init_hyp_mode(8050fde0) on CPU 0
kvm [0]: c_i_h_m: set vectors finished
kvm [0]: c_i_h_m: initialization of local variables finished
kvm [0]: c_i_h_m: kvm_call_hyp() finished, returning...
kvm [1]: entering cpu_init_hyp_mode(8050fde0) on CPU 1
kvm [1]: c_i_h_m: set vectors finished
kvm [1]: c_i_h_m: initialization of local variables finished
kvm [1]: c_i_h_m: kvm_call_hyp() finished, returning...
kvm [0]: entering cpu_init_hyp_mode(8050fde0) on CPU 2
kvm [0]: c_i_h_m: set vectors finished
kvm [0]: c_i_h_m: initialization of local variables finished


Regards,
Andre.

  parent reply	other threads:[~2013-04-15 13:13 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 [this message]
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=516BFD13.1000400@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.