[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 31/73] cpu: convert to cpu_halted
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [PATCH v6 31/73] cpu: convert to cpu_halted |
Date: |
Tue, 29 Jan 2019 19:47:29 -0500 |
This finishes the conversion to cpu_halted.
Signed-off-by: Emilio G. Cota <address@hidden>
---
cpus.c | 8 ++++----
qom/cpu.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cpus.c b/cpus.c
index c4fa3cc876..aee129c0b3 100644
--- a/cpus.c
+++ b/cpus.c
@@ -204,7 +204,7 @@ static bool cpu_thread_is_idle(CPUState *cpu)
if (cpu_is_stopped(cpu)) {
return true;
}
- if (!cpu->halted || cpu_has_work(cpu) ||
+ if (!cpu_halted(cpu) || cpu_has_work(cpu) ||
kvm_halt_in_kernel()) {
return false;
}
@@ -1686,7 +1686,7 @@ static void *qemu_hax_cpu_thread_fn(void *arg)
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
- cpu->halted = 0;
+ cpu_halted_set(cpu, 0);
current_cpu = cpu;
hax_init_vcpu(cpu);
@@ -1845,7 +1845,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
*
* cpu->halted should ensure we sleep in wait_io_event
*/
- g_assert(cpu->halted);
+ g_assert(cpu_halted(cpu));
break;
case EXCP_ATOMIC:
qemu_mutex_unlock_iothread();
@@ -2342,7 +2342,7 @@ CpuInfoList *qmp_query_cpus(Error **errp)
info->value = g_malloc0(sizeof(*info->value));
info->value->CPU = cpu->cpu_index;
info->value->current = (cpu == first_cpu);
- info->value->halted = cpu->halted;
+ info->value->halted = cpu_halted(cpu);
info->value->qom_path = object_get_canonical_path(OBJECT(cpu));
info->value->thread_id = cpu->thread_id;
#if defined(TARGET_I386)
diff --git a/qom/cpu.c b/qom/cpu.c
index 2c05aa1bca..c5106d5af8 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -261,7 +261,7 @@ static void cpu_common_reset(CPUState *cpu)
}
cpu->interrupt_request = 0;
- cpu->halted = 0;
+ cpu_halted_set(cpu, 0);
cpu->mem_io_pc = 0;
cpu->mem_io_vaddr = 0;
cpu->icount_extra = 0;
--
2.17.1
- [Qemu-devel] [PATCH v6 27/73] xtensa: convert to cpu_halted, (continued)
- [Qemu-devel] [PATCH v6 27/73] xtensa: convert to cpu_halted, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 20/73] i386: convert to cpu_halted, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 30/73] cpu-exec: convert to cpu_halted, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 29/73] openrisc: convert to cpu_halted, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 32/73] cpu: define cpu_interrupt_request helpers, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 28/73] gdbstub: convert to cpu_halted, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 25/73] s390x: convert to cpu_halted, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 34/73] exec: use cpu_reset_interrupt, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 42/73] i386/whpx-all: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 45/73] sh4: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 31/73] cpu: convert to cpu_halted,
Emilio G. Cota <=
- [Qemu-devel] [PATCH v6 40/73] i386/kvm: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 35/73] i386: use cpu_reset_interrupt, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 39/73] i386: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 46/73] cris: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 48/73] lm32: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 55/73] sparc: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 61/73] cpu: call .cpu_has_work with the CPU lock held, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 37/73] openrisc: use cpu_reset_interrupt, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 51/73] nios: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29
- [Qemu-devel] [PATCH v6 41/73] i386/hax-all: convert to cpu_interrupt_request, Emilio G. Cota, 2019/01/29