[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v6 05/11] pvqspinlock, x86: Allow unfair spinlock in a PV guest
 
- To: Waiman Long <waiman.long@xxxxxx>
 
- From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
 
- Date: Wed, 19 Mar 2014 18:08:07 +0100
 
- Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>,	Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>,	kvm@xxxxxxxxxxxxxxx, Peter Zijlstra <peterz@xxxxxxxxxxxxx>,	virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx,	Andi Kleen <andi@xxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>,	Michel Lespinasse <walken@xxxxxxxxxx>,	Alok Kataria <akataria@xxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx,	Gleb Natapov <gleb@xxxxxxxxxx>, x86@xxxxxxxxxx,	Ingo Molnar <mingo@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx,	"Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>,	Arnd Bergmann <arnd@xxxxxxxx>, Scott J Norton <scott.norton@xxxxxx>,	Steven Rostedt <rostedt@xxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>,	Thomas Gleixner <tglx@xxxxxxxxxxxxx>,	Aswin Chandramouleeswaran <aswin@xxxxxx>, Chegu Vinod <chegu_vinod@xxxxxx>
 
- Delivery-date: Wed, 19 Mar 2014 17:09:25 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
 
 
 
Il 19/03/2014 17:58, Waiman Long ha scritto:
 
Exactly.  What you want is boot_cpu_has(X86_FEATURE_HYPERVISOR).
 
 
The unfair lock is to be enabled by boot time check, not just by the
presence of a configuration macro during the build process in order to
avoid using unfair lock on bare metal. Of course, Linux distros can
modify this if that suits their need.
 
 
 "boot_cpu_has" is a run-time check.  You can use it after setup_arch has 
called init_hypervisor_platform and kvm_guest_init.  Can you just just 
check if the PV path has been enabled and, if not, do a static_key_inc 
to enable the unfair path?
Paolo
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 
    
     |