On 3/4/21 7:15 AM, Thomas Huth wrote: > On 02/03/2021 11.27, Philippe Mathieu-Daudé wrote: >> We can only check if a vCPU has work with TCG. >> Restrict the has_work() handler to TCG by moving it to >> the TCGCPUOps structure, and adapt all the targets. >> >> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> >> --- >> RFC: PPC target incomplete >> --- > [...] >> diff --git a/hw/core/cpu.c b/hw/core/cpu.c >> index 00330ba07de..3110867c3a3 100644 >> --- a/hw/core/cpu.c >> +++ b/hw/core/cpu.c >> @@ -261,11 +261,6 @@ static void cpu_common_reset(DeviceState *dev) >> } >> } >> -static bool cpu_common_has_work(CPUState *cs) >> -{ >> - return false; >> -} >> - >> ObjectClass *cpu_class_by_name(const char *typename, const char >> *cpu_model) >> { >> CPUClass *cc = CPU_CLASS(object_class_by_name(typename)); >> @@ -397,7 +392,6 @@ static void cpu_class_init(ObjectClass *klass, >> void *data) >> k->parse_features = cpu_common_parse_features; >> k->get_arch_id = cpu_common_get_arch_id; >> - k->has_work = cpu_common_has_work; >> k->get_paging_enabled = cpu_common_get_paging_enabled; >> k->get_memory_mapping = cpu_common_get_memory_mapping; >> k->write_elf32_qemunote = cpu_common_write_elf32_qemunote; > > cpu_common_has_work() is gone without replacement? Can you be sure that > the pointer in tcg_ops is always initialized?
Oops... Good catch :)