]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: emulate: do not adjust size of fastop and setcc subroutines
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Jul 2022 11:34:55 +0000 (07:34 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Jul 2022 11:49:40 +0000 (07:49 -0400)
commit7d42ac7e484fe36416d94b5a08a01da37b9e958b
treee5f5fdfd481ba5e0978cd7f661ff7182649c20f7
parent56f06102ed48fabb0a6374e339046d1fb7c079e3
KVM: emulate: do not adjust size of fastop and setcc subroutines

Instead of doing complicated calculations to find the size of the subroutines
(which are even more complicated because they need to be stringified into
an asm statement), just hardcode to 16.

It is less dense for a few combinations of IBT/SLS/retbleed, but it has
the advantage of being really simple.

Cc: stable@vger.kernel.org # 5.15.x: 8db6b1bc7390: x86/kvm: fix FASTOP_SIZE when return thunks are enabled
Cc: stable@vger.kernel.org
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c