summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-06-13 14:50:04 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-06-16 00:05:00 +0200
commit557abc40d121358883d2da8bc8bf976d6e8ec332 (patch)
tree2ff0bd1c4012d2b07eddc0078b7fd8c0d537cc1d /virt
parent6c7caebc26c5f0b618f0ef6b851e9f5f27c3812f (diff)
downloadlinux-0-day-557abc40d121358883d2da8bc8bf976d6e8ec332.tar.gz
linux-0-day-557abc40d121358883d2da8bc8bf976d6e8ec332.tar.xz
KVM: remove kvm_vcpu_compatible
The new created_vcpus field makes it possible to avoid the race between irqchip and VCPU creation in a much nicer way; just check under kvm->lock whether a VCPU has already been created. We can then remove KVM_APIC_ARCHITECTURE too, because at this point the symbol is only governing the default definition of kvm_vcpu_compatible. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/Kconfig3
-rw-r--r--virt/kvm/kvm_main.c4
2 files changed, 0 insertions, 7 deletions
diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
index e5d6108f5e859..b0cc1a34db27a 100644
--- a/virt/kvm/Kconfig
+++ b/virt/kvm/Kconfig
@@ -16,9 +16,6 @@ config HAVE_KVM_EVENTFD
bool
select EVENTFD
-config KVM_APIC_ARCHITECTURE
- bool
-
config KVM_MMIO
bool
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 15b757ae64e14..ef54b4c317926 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2368,10 +2368,6 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id)
goto vcpu_destroy;
mutex_lock(&kvm->lock);
- if (!kvm_vcpu_compatible(vcpu)) {
- r = -EINVAL;
- goto unlock_vcpu_destroy;
- }
if (kvm_get_vcpu_by_id(kvm, id)) {
r = -EEXIST;
goto unlock_vcpu_destroy;