Skip to content

x86/KVM/VMX: Introduce and use try_cmpxchg64()

Uros Bizjak kvm lkml oe-kbuild-all 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3asm-generic/atomic: Add try_cmpxchg64() instrumentationinclude/asm-generic/atomic-instrumented.h scripts/atomic/gen-atomic-instrumented.sh+46 -20 replies
2/3locking/atomic/x86: Introduce arch_try_cmpxchg64()arch/x86/include/asm/cmpxchg_32.h arch/x86/include/asm/cmpxchg_64.h+59 -91 reply
3/3KVM/VMX: Use try_cmpxchg64() in posted_intr.carch/x86/kvm/vmx/posted_intr.c+3 -61 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchSean Christopherson
1/3
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] x86/KVM/VMX: Introduce and use try_cmpxchg64()

This patch series introduces try_cmpxchg64() atomic locking function.

try_cmpxchg64() provides the same interface for 64 bit and 32 bit targets, emits CMPXCHGQ for 64 bit targets and CMPXCHG8B for 32 bit targets, and provides appropriate fallbacks when CMPXCHG8B is unavailable.

try_cmpxchg64() reuses flags from CMPXCHGQ/CMPXCHG8B instructions and avoids unneeded CMP for 64 bit targets or XOR/XOR/OR sequence for 32 bit targets.

Cc Will Deacon <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Boqun Feng <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Sean Christopherson <[email protected]>
Cc Vitaly Kuznetsov <[email protected]>
Cc Wanpeng Li <[email protected]>
Cc Jim Mattson <[email protected]>
Cc Joerg Roedel <[email protected]>

Uros Bizjak (3):
asm-generic/atomic: Add try_cmpxchg64() instrumentation locking/atomic/x86: Introduce arch_try_cmpxchg64() KVM/VMX: Use try_cmpxchg64() in posted_intr.c

 arch/x86/include/asm/cmpxchg_32.h         | 62 +++++++++++++++++++----
 arch/x86/include/asm/cmpxchg_64.h         |  6 +++
 arch/x86/kvm/vmx/posted_intr.c            |  9 ++--
 include/asm-generic/atomic-instrumented.h | 46 ++++++++++++++++-
 scripts/atomic/gen-atomic-instrumented.sh |  2 +-
 5 files changed, 108 insertions(+), 17 deletions(-)
Signature · 1 line
2.26.2