lkml.org 
[lkml]   [2016]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 0/3] KVM: do not use kvm->online_vcpus to check "has one VCPU been created?"
From
Date
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.


\
 
 \ /
  Last update: 2016-06-13 16:01    [W:0.093 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site