On Fri, Feb 21, 2014 at 9:02 AM, Waiman Long <waiman.long@xxxxxx> wrote: > On 02/20/2014 02:32 PM, Raghavendra K T wrote: >> >> On 02/20/2014 11:24 PM, Waiman Long wrote: >> >>> Now the key is how to detect if a kernel is really running in a PV >>> environment. I need to ask some virtualization experts on that. >>> >> >> For kvm you could just follow, >> kvm_spinlock_init_jump() and KVM_FEATURE_* encoding in cpuid >> part __do_cpuid_ent(). >> > > I saw that in the arch/x86/kernel/kvm.c file. So I think I can use the > returned value of kvm_para_available() to decide if it is running in a KVM > guest. However, I am not so sure of what to use in xen. Just use that 'paravirt_ticketlocks_enabled' static key. Xen enables it too. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html