linux/arch/loongarch/kvm
Tiezhu Yang cb8a2ef084 LoongArch: Add ORC stack unwinder support
The kernel CONFIG_UNWINDER_ORC option enables the ORC unwinder, which is
similar in concept to a DWARF unwinder. The difference is that the format
of the ORC data is much simpler than DWARF, which in turn allows the ORC
unwinder to be much simpler and faster.

The ORC data consists of unwind tables which are generated by objtool.
After analyzing all the code paths of a .o file, it determines information
about the stack state at each instruction address in the file and outputs
that information to the .orc_unwind and .orc_unwind_ip sections.

The per-object ORC sections are combined at link time and are sorted and
post-processed at boot time. The unwinder uses the resulting data to
correlate instruction addresses with their stack states at run time.

Most of the logic are similar with x86, in order to get ra info before ra
is saved into stack, add ra_reg and ra_offset into orc_entry. At the same
time, modify some arch-specific code to silence the objtool warnings.

Co-developed-by: Jinyang He <hejinyang@loongson.cn>
Signed-off-by: Jinyang He <hejinyang@loongson.cn>
Co-developed-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-03-11 22:23:47 +08:00
..
exit.c LoongArch: KVM: Add LASX (256bit SIMD) support 2023-12-19 10:48:28 +08:00
interrupt.c LoongArch: KVM: Implement vcpu interrupt operations 2023-10-02 10:01:28 +08:00
Kconfig KVM: introduce CONFIG_KVM_COMMON 2024-01-08 08:09:38 -05:00
main.c LoongArch: KVM: Allow to access HW timer CSR registers always 2023-12-19 10:48:27 +08:00
Makefile LoongArch: KVM: Enable kvm config and add the makefile 2023-10-02 10:01:29 +08:00
mmu.c LoongArch: KVM: Fix build due to API changes 2024-01-26 16:22:07 +08:00
switch.S LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
timer.c LoongArch: KVM: Fix timer emulation with oneshot mode 2023-12-19 10:48:28 +08:00
tlb.c LoongArch: KVM: Implement virtual machine tlb operations 2023-10-02 10:01:28 +08:00
trace.h LoongArch: KVM: Add LASX (256bit SIMD) support 2023-12-19 10:48:28 +08:00
vcpu.c LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments 2024-02-23 14:36:31 +08:00
vm.c LoongArch: KVM: Implement VM related functions 2023-10-02 10:01:27 +08:00