@@ -312,19 +312,28 @@ static void qemu_s390_inject_crw_mchk(S390FLICState *fs)
bool qemu_s390_flic_has_service(QEMUS390FLICState *flic)
{
- /* called without lock via cc->has_work, will be validated under lock */
+ /*
+ * Called without lock via TCGCPUOps::has_work,
+ * will be validated under lock.
+ */
return !!(flic->pending & FLIC_PENDING_SERVICE);
}
bool qemu_s390_flic_has_io(QEMUS390FLICState *flic, uint64_t cr6)
{
- /* called without lock via cc->has_work, will be validated under lock */
+ /*
+ * Called without lock via TCGCPUOps::has_work,
+ * will be validated under lock.
+ */
return !!(flic->pending & CR6_TO_PENDING_IO(cr6));
}
bool qemu_s390_flic_has_crw_mchk(QEMUS390FLICState *flic)
{
- /* called without lock via cc->has_work, will be validated under lock */
+ /*
+ * Called without lock via TCGCPUOps::has_work,
+ * will be validated under lock.
+ */
return !!(flic->pending & FLIC_PENDING_MCHK_CR);
}
@@ -88,6 +88,7 @@ static void s390_cpu_set_pc(CPUState *cs, vaddr value)
cpu->env.psw.addr = value;
}
+#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
static bool s390_cpu_has_work(CPUState *cs)
{
S390CPU *cpu = S390_CPU(cs);
@@ -104,6 +105,7 @@ static bool s390_cpu_has_work(CPUState *cs)
return s390_cpu_has_int(cpu);
}
+#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
/* S390CPUClass::reset() */
static void s390_cpu_reset(CPUState *s, cpu_reset_type type)
@@ -269,6 +271,7 @@ static const struct TCGCPUOps s390_tcg_ops = {
.tlb_fill = s390_cpu_tlb_fill,
#if !defined(CONFIG_USER_ONLY)
+ .has_work = s390_cpu_has_work,
.cpu_exec_interrupt = s390_cpu_exec_interrupt,
.do_interrupt = s390_cpu_do_interrupt,
.debug_excp_handler = s390x_cpu_debug_excp_handler,
@@ -292,7 +295,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
scc->reset = s390_cpu_reset;
cc->class_by_name = s390_cpu_class_by_name,
- cc->has_work = s390_cpu_has_work;
cc->dump_state = s390_cpu_dump_state;
cc->set_pc = s390_cpu_set_pc;
cc->gdb_read_register = s390_cpu_gdb_read_register;