kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: x86@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH 0/3] x86/KVM/VMX: Introduce and use try_cmpxchg64()
Date: Fri, 15 Jan 2021 10:09:53 -0800	[thread overview]
Message-ID: <YAHaceikAK+xYxUg@google.com> (raw)
In-Reply-To: <20201215182805.53913-1-ubizjak@gmail.com>

On Tue, Dec 15, 2020, Uros Bizjak wrote:
> 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 <will@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> Cc: Wanpeng Li <wanpengli@tencent.com>
> Cc: Jim Mattson <jmattson@google.com>
> Cc: Joerg Roedel <joro@8bytes.org>
> 
> 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

For anyone else trying to apply this, it depends on v5.11-rc1 (commit
29f006fdefe6, "asm-generic/atomic: Add try_cmpxchg() fallbacks"), which hasn't
yet been merged into Paolo's tree.

>  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(-)
> 
> -- 
> 2.26.2
> 

  parent reply	other threads:[~2021-01-15 18:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 18:28 [PATCH 0/3] x86/KVM/VMX: Introduce and use try_cmpxchg64() Uros Bizjak
2020-12-15 18:28 ` [PATCH 1/3] asm-generic/atomic: Add try_cmpxchg64() instrumentation Uros Bizjak
2020-12-15 18:28 ` [PATCH 2/3] locking/atomic/x86: Introduce arch_try_cmpxchg64() Uros Bizjak
2020-12-15 20:08   ` Uros Bizjak
2020-12-16 15:37   ` kernel test robot
2020-12-15 18:28 ` [PATCH 3/3] KVM/VMX: Use try_cmpxchg64() in posted_intr.c Uros Bizjak
2021-01-15 19:28   ` Sean Christopherson
2021-01-15 18:09 ` Sean Christopherson [this message]
2021-01-18 18:26 ` [PATCH 0/3] x86/KVM/VMX: Introduce and use try_cmpxchg64() Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YAHaceikAK+xYxUg@google.com \
    --to=seanjc@google.com \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=ubizjak@gmail.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).