Re: [PATCH v5 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-14 Thread Vitaly Kuznetsov
Zhenzhong Duan writes: > On 2019/10/13 17:02, Vitaly Kuznetsov wrote: >> Zhenzhong Duan writes: > ...snip >> diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c >> index ef836d6..6e14bd4 100644 >> --- a/arch/x86/kernel/kvm.c >> +++ b/arch/x86/kernel/kvm.c >> @@ -825,18 +825,31 @@ __visibl

Re: [PATCH v5 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-13 Thread Zhenzhong Duan
On 2019/10/13 17:02, Vitaly Kuznetsov wrote: Zhenzhong Duan writes: ...snip diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index ef836d6..6e14bd4 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -825,18 +825,31 @@ __visible bool __kvm_vcpu_is_preempted(long cpu)

Re: [PATCH v5 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-13 Thread Vitaly Kuznetsov
Zhenzhong Duan writes: > There are cases where a guest tries to switch spinlocks to bare metal > behavior (e.g. by setting "xen_nopvspin" on XEN platform and > "hv_nopvspin" on HYPER_V). > > That feature is missed on KVM, add a new parameter "nopvspin" to disable > PV spinlocks for KVM guest. > >

[PATCH v5 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-08 Thread Zhenzhong Duan
There are cases where a guest tries to switch spinlocks to bare metal behavior (e.g. by setting "xen_nopvspin" on XEN platform and "hv_nopvspin" on HYPER_V). That feature is missed on KVM, add a new parameter "nopvspin" to disable PV spinlocks for KVM guest. The new 'nopvspin' parameter will also