diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2022-08-16 23:10:10 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-09-26 12:02:27 -0400 |
commit | afe30b59d30b80d91c70664f58c05ba149ef3a5d (patch) | |
tree | 030017137ed2e238cd2677e6453cfea264844b69 /arch/x86/kvm/svm/nested.c | |
parent | 5a2a961be2ad6a16eb388a80442443b353c11d16 (diff) | |
download | linux-afe30b59d30b80d91c70664f58c05ba149ef3a5d.tar.gz linux-afe30b59d30b80d91c70664f58c05ba149ef3a5d.tar.bz2 linux-afe30b59d30b80d91c70664f58c05ba149ef3a5d.zip |
KVM/VMX: Avoid stack engine synchronization uop in __vmx_vcpu_run
Avoid instructions with explicit uses of the stack pointer between
instructions that implicitly refer to it. The sequence of
POP %reg; ADD $x, %RSP; POP %reg forces emission of synchronization
uop to synchronize the value of the stack pointer in the stack engine
and the out-of-order core.
Using POP with the dummy register instead of ADD $x, %RSP results in a
smaller code size and faster code.
The patch also fixes the reference to the wrong register in the
nearby comment.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20220816211010.25693-1-ubizjak@gmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm/nested.c')
0 files changed, 0 insertions, 0 deletions