[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/7] remove smp restriction from kvm
From: |
Glauber Costa |
Subject: |
[Qemu-devel] [PATCH 7/7] remove smp restriction from kvm |
Date: |
Thu, 26 Nov 2009 15:25:00 -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 | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index dbd69f3..4134be3 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -439,16 +439,25 @@ 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;
+
#endif
return ret;
+
+failed:
+ if (smp_cpus > 1) {
+ fprintf(stderr, "No SMP KVM support, use '-smp 1'\n");
+ ret = -EINVAL;
+ }
+ return ret;
}
int kvm_init(int smp_cpus)
@@ -460,11 +469,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 0/7] KVM SMP support, early version, Glauber Costa, 2009/11/26
- [Qemu-devel] [PATCH 1/7] Don't mess with halted state., Glauber Costa, 2009/11/26
- [Qemu-devel] [PATCH 2/7] store thread-specific env information, Glauber Costa, 2009/11/26
- Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state, Avi Kivity, 2009/11/29
- Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state, Glauber Costa, 2009/11/30
- Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state, Gleb Natapov, 2009/11/30
- Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state, Avi Kivity, 2009/11/30
- Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state, Glauber Costa, 2009/11/30
- Re: [Qemu-devel] [PATCH 5/7] tell kernel about all registers instead of just mp_state, Avi Kivity, 2009/11/30
- Re: [Qemu-devel] [PATCH 4/7] qemu_flush_work for remote vcpu execution, Avi Kivity, 2009/11/29
- Re: [Qemu-devel] [PATCH 4/7] qemu_flush_work for remote vcpu execution, Glauber Costa, 2009/11/30
- Re: [Qemu-devel] [PATCH 4/7] qemu_flush_work for remote vcpu execution, Avi Kivity, 2009/11/30
- [Qemu-devel] Re: [PATCH 4/7] qemu_flush_work for remote vcpu execution, Paolo Bonzini, 2009/11/30