Hi Philippe, took a quick look with grep -R can_do_io and this seems to be in include/hw/core/cpu.h as well as cpu-common.c, maybe there is more meat to address to fully solve this? Before we had stuff for reset in cpu-common.c under a if (tcg_enabled()) { } but now we have cpu_exec_reset_hold(), should the implementation for tcg of cpu_exec_reset_hold() do that (and potentially other tcg-specific non-arch-specific cpu variables we might need)? If can_do_io is TCG-specific, maybe the whole field existence / visibility can be conditioned on TCG actually being at least compiled-in? This might help find problems of the field being used in the wrong context, by virtue of getting an error when compiling with --disable-tcg for example. Ciao, Claudio On 11/29/23 21:50, Philippe Mathieu-Daudé wrote: > 'can_do_io' is specific to TCG. Having it set in non-TCG > code is confusing, so remove it from QTest / HVF / KVM. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> > --- > accel/dummy-cpus.c | 1 - > accel/hvf/hvf-accel-ops.c | 1 - > accel/kvm/kvm-accel-ops.c | 1 - > 3 files changed, 3 deletions(-) > > diff --git a/accel/dummy-cpus.c b/accel/dummy-cpus.c > index b75c919ac3..1005ec6f56 100644 > --- a/accel/dummy-cpus.c > +++ b/accel/dummy-cpus.c > @@ -27,7 +27,6 @@ static void *dummy_cpu_thread_fn(void *arg) > qemu_mutex_lock_iothread(); > qemu_thread_get_self(cpu->thread); > cpu->thread_id = qemu_get_thread_id(); > - cpu->neg.can_do_io = true; > current_cpu = cpu; > > #ifndef _WIN32 > diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c > index abe7adf7ee..2bba54cf70 100644 > --- a/accel/hvf/hvf-accel-ops.c > +++ b/accel/hvf/hvf-accel-ops.c > @@ -428,7 +428,6 @@ static void *hvf_cpu_thread_fn(void *arg) > qemu_thread_get_self(cpu->thread); > > cpu->thread_id = qemu_get_thread_id(); > - cpu->neg.can_do_io = true; > current_cpu = cpu; > > hvf_init_vcpu(cpu); > diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c > index 6195150a0b..f273f415db 100644 > --- a/accel/kvm/kvm-accel-ops.c > +++ b/accel/kvm/kvm-accel-ops.c > @@ -36,7 +36,6 @@ static void *kvm_vcpu_thread_fn(void *arg) > qemu_mutex_lock_iothread(); > qemu_thread_get_self(cpu->thread); > cpu->thread_id = qemu_get_thread_id(); > - cpu->neg.can_do_io = true; > current_cpu = cpu; > > r = kvm_init_vcpu(cpu, &error_fatal);