• Kalesh Singh's avatar
    KVM: arm64: Introduce hyp_dump_backtrace() · 314a61dc
    Kalesh Singh authored
    In non-protected nVHE mode, unwinds and dumps the hypervisor backtrace
    from EL1. This is possible beacause the host can directly access the
    hypervisor stack pages in non-protected mode.
    
    The nVHE backtrace is dumped on hyp_panic(), before panicking the host.
    
    [  101.498183] kvm [377]: nVHE call trace:
    [  101.498363] kvm [377]:  [<ffff8000090a6570>] __kvm_nvhe_hyp_panic+0xac/0xf8
    [  101.499045] kvm [377]:  [<ffff8000090a65cc>] __kvm_nvhe_hyp_panic_bad_stack+0x10/0x10
    [  101.499498] kvm [377]:  [<ffff8000090a61e4>] __kvm_nvhe_recursive_death+0x24/0x34
    . . .
    [  101.524929] kvm [377]:  [<ffff8000090a61e4>] __kvm_nvhe_recursive_death+0x24/0x34
    [  101.525062] kvm [377]:  [<ffff8000090a61e4>] __kvm_nvhe_recursive_death+0x24/0x34
    [  101.525195] kvm [377]:  [<ffff8000090a5de4>] __kvm_nvhe___kvm_vcpu_run+0x30/0x40c
    [  101.525333] kvm [377]:  [<ffff8000090a8b64>] __kvm_nvhe_handle___kvm_vcpu_run+0x30/0x48
    [  101.525468] kvm [377]:  [<ffff8000090a88b8>] __kvm_nvhe_handle_trap+0xc4/0x128
    [  101.525602] kvm [377]:  [<ffff8000090a7864>] __kvm_nvhe___host_exit+0x64/0x64
    [  101.525745] kvm [377]: ---[ end nVHE call trace ]---
    Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
    Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
    Link: https://lore.kernel.org/r/20220726073750.3219117-12-kaleshsingh@google.com
    314a61dc
nvhe.h 3.95 KB