WSL2-Linux-Kernel/arch/x86/kvm/svm
Peter Zijlstra a149180fbc x86: Add magic AMD return-thunk
Note: needs to be in a section distinct from Retpolines such that the
Retpoline RET substitution cannot possibly use immediate jumps.

ORC unwinding for zen_untrain_ret() and __x86_return_thunk() is a
little tricky but works due to the fact that zen_untrain_ret() doesn't
have any stack ops and as such will emit a single ORC entry at the
start (+0x3f).

Meanwhile, unwinding an IP, including the __x86_return_thunk() one
(+0x40) will search for the largest ORC entry smaller or equal to the
IP, these will find the one ORC entry (+0x3f) and all works.

  [ Alexandre: SVM part. ]
  [ bp: Build fix, massages. ]

Suggested-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
2022-06-27 10:33:59 +02:00
..
avic.c ARM64: 2022-06-14 07:57:18 -07:00
hyperv.h KVM: nSVM: Split off common definitions for Hyper-V on KVM and KVM on Hyper-V 2022-02-10 13:50:45 -05:00
nested.c KVM: x86: SVM: fix nested PAUSE filtering when L0 intercepts PAUSE 2022-06-09 10:52:21 -04:00
pmu.c KVM/arm64 updates for 5.19 2022-05-25 05:09:23 -04:00
sev.c KVM: SEV: Init target VMCBs in sev_migrate_from 2022-06-24 04:10:18 -04:00
svm.c KVM: SEV: Init target VMCBs in sev_migrate_from 2022-06-24 04:10:18 -04:00
svm.h KVM: SEV: Init target VMCBs in sev_migrate_from 2022-06-24 04:10:18 -04:00
svm_onhyperv.c KVM: SVM: Fix kvm_cache_regs.h inclusions for is_guest_mode() 2022-04-02 05:34:40 -04:00
svm_onhyperv.h KVM: nSVM: Split off common definitions for Hyper-V on KVM and KVM on Hyper-V 2022-02-10 13:50:45 -05:00
svm_ops.h x86/kvm: Always inline vmload() / vmsave() 2021-09-15 15:51:45 +02:00
vmenter.S x86: Add magic AMD return-thunk 2022-06-27 10:33:59 +02:00