public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
	Christian Borntraeger <christian.borntraeger@de.ibm.com>
Subject: Re: [PATCH 0/3] KVM: do not use kvm->online_vcpus to check "has one VCPU been created?"
Date: Mon, 13 Jun 2016 15:33:35 +0200	[thread overview]
Message-ID: <575EB62F.4010107@de.ibm.com> (raw)
In-Reply-To: <1465824332-10628-1-git-send-email-pbonzini@redhat.com>

On 06/13/2016 03:25 PM, Paolo Bonzini wrote:
> kvm->online_vcpus is only updated at the very end of KVM_CREATE_VCPU.
> Thus, it can be racy to use it as a check for "has any VCPU been created
> already?".  While x86 detects the race through kvm_vcpu_compatible,
> it is kinda hackish and s390 does not do anything similar.  Provide a
> better fix for both.
> 
> Paolo Bonzini (3):
>   KVM: introduce created_vcpus
>   KVM: remove kvm_vcpu_compatible
>   KVM: s390: use created_vcpus
> 
>  arch/s390/kvm/kvm-s390.c | 10 +++++-----
>  arch/x86/kvm/Kconfig     |  1 -
>  arch/x86/kvm/x86.c       | 11 +++--------
>  include/linux/kvm_host.h | 14 ++++++++------
>  virt/kvm/Kconfig         |  3 ---
>  virt/kvm/kvm_main.c      | 27 +++++++++++++++++----------
>  6 files changed, 33 insertions(+), 33 deletions(-)
> 

>From a quick look this looks "the right thing". Will do a proper review
later this day or tomorrow.



  parent reply	other threads:[~2016-06-13 13:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 13:25 [PATCH 0/3] KVM: do not use kvm->online_vcpus to check "has one VCPU been created?" Paolo Bonzini
2016-06-13 13:25 ` [PATCH 1/3] KVM: introduce kvm->created_vcpus Paolo Bonzini
2016-06-13 14:43   ` Cornelia Huck
2016-06-13 13:25 ` [PATCH 2/3] KVM: remove kvm_vcpu_compatible Paolo Bonzini
2016-06-13 13:25 ` [PATCH 3/3] KVM: s390: use kvm->created_vcpus Paolo Bonzini
2016-06-13 14:36   ` Cornelia Huck
2016-06-13 13:33 ` Christian Borntraeger [this message]
2016-06-13 14:44 ` [PATCH 0/3] KVM: do not use kvm->online_vcpus to check "has one VCPU been created?" Cornelia Huck
2016-06-15 22:00   ` Paolo Bonzini
2016-06-16  7:30     ` Christian Borntraeger
2016-06-16  7:59       ` Cornelia Huck
2016-06-16  8:23         ` Paolo Bonzini
2016-06-16  8:07       ` 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=575EB62F.4010107@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=christian.borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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