[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 11/11] remove smp restriction from kvm
From: |
Glauber Costa |
Subject: |
[Qemu-devel] [PATCH v2 11/11] remove smp restriction from kvm |
Date: |
Tue, 1 Dec 2009 10:51:37 -0200 |
We don't support smp without irqchip in kernel, so only abort in
that situation
Signed-off-by: Glauber Costa <address@hidden>
---
kvm-all.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 286d0ee..db5daf6 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -438,15 +438,23 @@ static int kvm_create_irqchip(KVMState *s)
{
int ret = 0;
#if defined(CONFIG_IOTHREAD)
+ ret = -1;
if (!kvm_check_extension(s, KVM_CAP_IRQCHIP))
- return -1;
+ goto failed;
ret = kvm_vm_ioctl(s, KVM_CREATE_IRQCHIP);
if (ret < 0)
- return ret;
+ goto failed;
s->irqchip_in_kernel = 1;
+
+ return ret;
+failed:
#endif
+ if (smp_cpus > 1) {
+ fprintf(stderr, "No SMP KVM support, use '-smp 1'\n");
+ ret = -EINVAL;
+ }
return ret;
}
@@ -459,11 +467,6 @@ int kvm_init(int smp_cpus)
int ret;
int i;
- if (smp_cpus > 1) {
- fprintf(stderr, "No SMP KVM support, use '-smp 1'\n");
- return -EINVAL;
- }
-
s = qemu_mallocz(sizeof(KVMState));
#ifdef KVM_CAP_SET_GUEST_DEBUG
--
1.6.5.2
- [Qemu-devel] [PATCH v2 01/11] Don't mess with halted state., (continued)
- [Qemu-devel] [PATCH v2 01/11] Don't mess with halted state., Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 02/11] store thread-specific env information, Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 03/11] update halted state on mp_state sync, Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 04/11] qemu_flush_work for remote vcpu execution, Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 05/11] tell kernel about all registers instead of just mp_state, Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 06/11] flush state in migration post_load, Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 07/11] Don't call kvm cpu reset on initialization, Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 08/11] use cpu_kick instead of direct signalling., Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 09/11] Use per-cpu reset handlers., Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 10/11] Use __thread where available., Glauber Costa, 2009/12/01
- [Qemu-devel] [PATCH v2 11/11] remove smp restriction from kvm,
Glauber Costa <=
- Re: [Qemu-devel] [PATCH v2 05/11] tell kernel about all registers instead of just mp_state, Gleb Natapov, 2009/12/02
- Re: [Qemu-devel] [PATCH v2 05/11] tell kernel about all registers instead of just mp_state, Glauber Costa, 2009/12/02
- [Qemu-devel] Re: [PATCH v2 05/11] tell kernel about all registers instead of just mp_state, Jan Kiszka, 2009/12/02
- [Qemu-devel] Re: [PATCH v2 05/11] tell kernel about all registers instead of just mp_state, Gleb Natapov, 2009/12/02
- [Qemu-devel] Re: [PATCH v2 05/11] tell kernel about all registers instead of just mp_state, Jan Kiszka, 2009/12/02
- Re: [Qemu-devel] [PATCH v2 04/11] qemu_flush_work for remote vcpu execution, Marcelo Tosatti, 2009/12/02
- Re: [Qemu-devel] [PATCH v2 04/11] qemu_flush_work for remote vcpu execution, Glauber Costa, 2009/12/02
- Re: [Qemu-devel] [PATCH v2 04/11] qemu_flush_work for remote vcpu execution, Marcelo Tosatti, 2009/12/02
- Re: [Qemu-devel] [PATCH v2 04/11] qemu_flush_work for remote vcpu execution, Glauber Costa, 2009/12/02
Re: [Qemu-devel] [PATCH v2 0/11], Gleb Natapov, 2009/12/02