[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/15] start a new cpu thread
From: |
Glauber Costa |
Subject: |
[Qemu-devel] [PATCH 14/15] start a new cpu thread |
Date: |
Tue, 26 Feb 2008 16:56:44 -0300 |
spin up a new cpu thread if not yet running.
Signed-off-by: Glauber Costa <address@hidden>
---
qemu/hw/acpi.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c
index 5a6d1a8..e44c8b5 100644
--- a/qemu/hw/acpi.c
+++ b/qemu/hw/acpi.c
@@ -23,6 +23,9 @@ #include "qemu-timer.h"
#include "sysemu.h"
#include "i2c.h"
#include "smbus.h"
+#ifdef USE_KVM
+#include "qemu-kvm.h"
+#endif
//#define DEBUG
@@ -640,6 +643,19 @@ static void disable_processor(struct gpe
void qemu_system_cpu_hot_add(int cpu, int state)
{
+ CPUState *env;
+
+ if ((state) && (!qemu_kvm_cpu_env(cpu))) {
+ env = pc_new_cpu(cpu, model, 1);
+ if (!env) {
+ fprintf(stderr, "cpu %d creation failed\n", cpu);
+ return;
+ }
+#ifdef USE_KVM
+ kvm_init_new_ap(cpu, env);
+#endif
+ }
+
qemu_set_irq(pm_state->irq, 1);
gpe.up = 0;
gpe.down = 0;
--
1.4.2
- [Qemu-devel] [PATCH 4/15] mark processors as presents, (continued)
- [Qemu-devel] [PATCH 4/15] mark processors as presents, Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 5/15] provide gpe _L0x methods, Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 6/15] provide operation region for pio to the gpes, Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 7/15] implement method _L00 for GPE0, Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 8/15] isolate cpu initialization function in hw/pc.c, Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 9/15] initialize hot add system., Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 10/15] handle gpe data for pio, Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 11/15] manipulate the gpe bits and send sci up the os., Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 12/15] isolate cpu thread creation in qemu-kvm.c, Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 13/15] provide _MAT to acpi processor, Glauber Costa, 2008/02/26
- [Qemu-devel] [PATCH 14/15] start a new cpu thread,
Glauber Costa <=
- [Qemu-devel] [PATCH 15/15] remove acpi_build_processor_ssdt, Glauber Costa, 2008/02/26
- [Qemu-devel] Re: [kvm-devel] [PATCH 4/15] mark processors as presents, Alexander Graf, 2008/02/26
- [Qemu-devel] Re: [kvm-devel] [PATCH 4/15] mark processors as presents, Alexander Graf, 2008/02/26
[Qemu-devel] Re: [kvm-devel] [PATCH 0/15] acpi processor hotplug, Avi Kivity, 2008/02/27