qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc
Date: Tue, 10 Jan 2012 20:56:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/10/2012 08:10 PM, Anthony Liguori wrote:
This involves forcing the CPU into the halted state if qtest is enabled and
replacing the local APIC with the qtest interrupt controller.

It should be pretty straight forward to do the same for other machine types on
other architectures.

Signed-off-by: Anthony Liguori<address@hidden>
---
  hw/pc.c      |    7 ++++++-
  hw/pc_piix.c |    9 ++++++---
  2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 85304cf..fac5098 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -43,6 +43,7 @@
  #include "ui/qemu-spice.h"
  #include "memory.h"
  #include "exec-memory.h"
+#include "qtest.h"

  /* output Bochs bios info messages */
  //#define DEBUG_BIOS
@@ -926,7 +927,11 @@ static void pc_cpu_reset(void *opaque)
      CPUState *env = opaque;

      cpu_reset(env);
-    env->halted = !cpu_is_bsp(env);
+    if (qtest_enabled()) {
+        env->halted = 1;
+    } else {
+        env->halted = !cpu_is_bsp(env);
+    }

This is wrong. qtest and Xen should simply not create the CPU threads at all.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]