use HF_HALTED bit
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 23 Nov 2005 21:01:33 +0000 (21:01 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 23 Nov 2005 21:01:33 +0000 (21:01 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1650 c046a42c-6fe2-441c-8c8c-71466251a162

hw/pc.c
monitor.c

diff --git a/hw/pc.c b/hw/pc.c
index 33d2219630641186a51b18f315b7c51635af2da4..b930e4053e4d1fe450bf7fb10cdd51cef21ce2bf 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -594,7 +594,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
     for(i = 0; i < smp_cpus; i++) {
         env = cpu_init();
         if (i != 0)
-            env->cpu_halted = 1;
+            env->hflags |= HF_HALTED_MASK;
         if (smp_cpus > 1) {
             /* XXX: enable it in all cases */
             env->cpuid_features |= CPUID_APIC;
index 85a997db86b5d04f5943cc73efc14f94213dc3ea..9befd82b06eb0607f9ef34678a10c5f24c6589b0 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -253,7 +253,7 @@ static void do_info_cpus(void)
                     env->cpu_index);
 #if defined(TARGET_I386)
         term_printf(" pc=0x" TARGET_FMT_lx, env->eip + env->segs[R_CS].base);
-        if (env->cpu_halted)
+        if (env->hflags & HF_HALTED_MASK)
             term_printf(" (halted)");
 #endif
         term_printf("\n");