There are several places where CONFIG_KVM is used to guard code that should only be built when KVM is supported. It is generally preferable to avoid that and leave such guards in header files for improved readability.
In many cases, the execution of the code is also conditionned by kvm_enabled() which expands to (0) when CONFIG_KVM is not defined. This is likely to cause the compiler to optimize the code out, and if it doesn't, the right way to address compiling issues is to add stubs. Successfuly compile tested on x86_64 and ppc64le linux. Travis shows this builds fine on OSX as well. -- Greg --- Greg Kurz (7): spapr_pci: Drop useless CONFIG_KVM ifdefery hw/ppc/mac_oldworld: Drop useless CONFIG_KVM ifdefery hw/ppc/mac_newworld: Drop useless CONFIG_KVM ifdefery hw/ppc/prep: Drop useless CONFIG_KVM ifdefery hw/ppc: Drop useless CONFIG_KVM ifdefery ppc: Introduce kvmppc_set_reg_tb_offset() helper target/ppc/machine: Add kvmppc_pvr_workaround_required() stub hw/ppc/mac_newworld.c | 4 ---- hw/ppc/mac_oldworld.c | 2 -- hw/ppc/ppc.c | 7 +------ hw/ppc/prep.c | 2 -- hw/ppc/spapr_pci.c | 2 -- target/ppc/kvm.c | 9 +++++++++ target/ppc/kvm_ppc.h | 10 ++++++++++ target/ppc/machine.c | 2 -- 8 files changed, 20 insertions(+), 18 deletions(-)