The CPUID instruction (when you pass function 1H in EAX) returns they hyper threading feature flag in bit 28 of the EDX register. I think that multi-core processors report that they are hyperthreading enabled even though each individual core can run only one thread.
It also returns the number of logical processors per physical processor in bits 23-16 of EBX. I think that you'd have to query each processor individually in order to hit all of the processors on your system.