On 13 December 2012 13:19, Alexander Graf <ag...@suse.de> wrote: > > On 13.12.2012, at 14:17, David Gibson wrote: > >> On Thu, Dec 13, 2012 at 01:57:16PM +0100, Alexander Graf wrote: >>> What if I am using TCG on PPC? >> >> Then the stub version of kvmppc_smt_threads() returns 1, and since the >> PPC TCG doesn't do any SMT emulation, that would seem to be correct... > > int kvmppc_smt_threads(void) > { > return cap_ppc_smt ? cap_ppc_smt : 1; > } > > So because we don't call kvm_arch_init, the cap is 0 and thus we return 1?
No, if we aren't CONFIG_KVM then that source file and version of the function aren't compiled at all. David means the stub function, which is in kvm_ppc.h: static inline int kvmppc_smt_threads(void) { return 1; } (if you don't like stubs lurking in the header file you could have a target-ppc/kvm-stub.c by analogy with the i386 one I suppose) -- PMM