Skip to content
  • Andrew Jones's avatar
    arm/arm64: introduce thread_info · 1693644d
    Andrew Jones authored
    For smp we need a way to maintain thread local state. The bottom
    of the thread stack is a good place, and is where Linux puts it.
    So we just steal the concept of the thread_info structure that
    lives at the bottom of the stack in Linux, and introduce it to
    kvm-unit-tests/arm[64]. For starters we just have cpu index for
    state, and that's implicitly initialized to zero for CPU0 already.
    So, as we don't have secondary cpus yet, there's not much to do.
    Additionally, sneak a small fixup in to the initial stack setup
    for arm64. We were assuming that spsel is EL1 after reset, which
    has been true so far, but let's not assume.
    Signed-off-by: default avatarAndrew Jones <>
    Signed-off-by: default avatarMarcelo Tosatti <>