From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: [PATCH RFC V4 4/5] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor Date: Mon, 16 Jan 2012 12:55:24 +0530 Message-ID: <4F13D0E4.3050407@linux.vnet.ibm.com> References: <20120114182501.8604.68416.sendpatchset@oc5400248562.ibm.com> <20120114182645.8604.68884.sendpatchset@oc5400248562.ibm.com> <62E14C21-4DF1-4C06-9CBB-FF36E4D49F64@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Cc: Jeremy Fitzhardinge , Greg Kroah-Hartman , linux-doc@vger.kernel.org, Peter Zijlstra , Jan Kiszka , Virtualization , Paul Mackerras , "H. Peter Anvin" , Stefano Stabellini , Xen , Dave Jiang , KVM , Glauber Costa , X86 , Ingo Molnar , Avi Kivity , Rik van Riel , Konrad Rzeszutek Wilk , Srivatsa Vaddagiri , Sasha Levin , Sedat Dilek , Thomas Gleixner , LKML , Dave Hansen Return-path: In-Reply-To: <62E14C21-4DF1-4C06-9CBB-FF36E4D49F64@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Id: kvm.vger.kernel.org On 01/16/2012 08:42 AM, Alexander Graf wrote: > > On 14.01.2012, at 19:26, Raghavendra K T wrote: > >> Extends Linux guest running on KVM hypervisor to support pv-ticketlocks. >> >> During smp_boot_cpus paravirtualied KVM guest detects if the hypervisor has >> required feature (KVM_FEATURE_PVLOCK_KICK) to support pv-ticketlocks. If so, >> support for pv-ticketlocks is registered via pv_lock_ops. >> >> Use KVM_HC_KICK_CPU hypercall to wakeup waiting/halted vcpu. >> >> Signed-off-by: Srivatsa Vaddagiri >> Signed-off-by: Suzuki Poulose >> Signed-off-by: Raghavendra K T >> --- >> diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h >> index 7a94987..cf5327c 100644 >> --- a/arch/x86/include/asm/kvm_para.h >> +++ b/arch/x86/include/asm/kvm_para.h >> @@ -195,10 +195,20 @@ void kvm_async_pf_task_wait(u32 token); >> void kvm_async_pf_task_wake(u32 token); [...] >> +} >> +#endif /* CONFIG_PARAVIRT_SPINLOCKS */ >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index c7b05fc..4d7a950 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c > > This patch is mixing host and guest code. Please split those up. > > Agree. The host code should have gone to patch 2. > Alex > >> @@ -5754,8 +5754,9 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) >> From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: [PATCH RFC V4 4/5] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor Date: Mon, 16 Jan 2012 12:55:24 +0530 Message-ID: <4F13D0E4.3050407@linux.vnet.ibm.com> References: <20120114182501.8604.68416.sendpatchset@oc5400248562.ibm.com> <20120114182645.8604.68884.sendpatchset@oc5400248562.ibm.com> <62E14C21-4DF1-4C06-9CBB-FF36E4D49F64@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <62E14C21-4DF1-4C06-9CBB-FF36E4D49F64@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Alexander Graf Cc: Jeremy Fitzhardinge , Greg Kroah-Hartman , linux-doc@vger.kernel.org, Peter Zijlstra , Jan Kiszka , Virtualization , Paul Mackerras , "H. Peter Anvin" , Stefano Stabellini , Xen , Dave Jiang , KVM , Glauber Costa , X86 , Ingo Molnar , Avi Kivity , Rik van Riel , Konrad Rzeszutek Wilk , Srivatsa Vaddagiri , Sasha Levin , Sedat Dilek , Thomas Gleixner , LKML , Dave Hansen List-Id: virtualization@lists.linuxfoundation.org On 01/16/2012 08:42 AM, Alexander Graf wrote: > > On 14.01.2012, at 19:26, Raghavendra K T wrote: > >> Extends Linux guest running on KVM hypervisor to support pv-ticketlocks. >> >> During smp_boot_cpus paravirtualied KVM guest detects if the hypervisor has >> required feature (KVM_FEATURE_PVLOCK_KICK) to support pv-ticketlocks. If so, >> support for pv-ticketlocks is registered via pv_lock_ops. >> >> Use KVM_HC_KICK_CPU hypercall to wakeup waiting/halted vcpu. >> >> Signed-off-by: Srivatsa Vaddagiri >> Signed-off-by: Suzuki Poulose >> Signed-off-by: Raghavendra K T >> --- >> diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h >> index 7a94987..cf5327c 100644 >> --- a/arch/x86/include/asm/kvm_para.h >> +++ b/arch/x86/include/asm/kvm_para.h >> @@ -195,10 +195,20 @@ void kvm_async_pf_task_wait(u32 token); >> void kvm_async_pf_task_wake(u32 token); [...] >> +} >> +#endif /* CONFIG_PARAVIRT_SPINLOCKS */ >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index c7b05fc..4d7a950 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c > > This patch is mixing host and guest code. Please split those up. > > Agree. The host code should have gone to patch 2. > Alex > >> @@ -5754,8 +5754,9 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) >>