On Sun, Aug 27, 2017 at 08:56:43PM -0500, Sergio Andres Gomez Del Real wrote: > @@ -900,6 +904,11 @@ void cpu_synchronize_all_states(void) > > CPU_FOREACH(cpu) { > cpu_synchronize_state(cpu); > +#ifdef CONFIG_HVF > + if (hvf_enabled()) { > + hvf_cpu_synchronize_state(cpu); > + } > +#endif
Searching for CONFIG_KVM and CONFIG_HAX in cpus.c produces no results. How do they solve the same problem without using #ifdef? They define nop stubs in "system/$ACCEL.h" so that cpus.c does not need #ifdefs. Please follow the same approach for hvf. Using stubs avoids "bitrot" because the cpus.c kvm/hax code is always compiled, even when the feature is disabled. This way no compiler errors/warnings can hide in the #ifdef regions that aren't compiled by most people. Please avoid #ifdef whereever possible.