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: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc
Date: Wed, 11 Jan 2012 13:44:48 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

On 01/10/2012 01:56 PM, Paolo Bonzini wrote:
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.

This is easier said than done. I started down this road and there's a huge amount of code that assumes that first_cpu != NULL.

I agree it's where we want to go though.

Regards,

Anthony Liguori


Paolo







reply via email to

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