From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753145AbcGFH61 (ORCPT ); Wed, 6 Jul 2016 03:58:27 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:40740 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbcGFH6Z (ORCPT ); Wed, 6 Jul 2016 03:58:25 -0400 Date: Wed, 6 Jul 2016 09:58:14 +0200 From: Peter Zijlstra To: Wanpeng Li Cc: xinhui , "linux-kernel@vger.kernel.org" , linuxppc-dev@lists.ozlabs.org, virtualization@lists.linux-foundation.org, linux-s390 , Ingo Molnar , mpe@ellerman.id.au, Paul Mackerras , benh@kernel.crashing.org, Paul McKenney , Waiman Long , will.deacon@arm.com, boqun.feng@gmail.com, Davidlohr Bueso , schwidefsky@de.ibm.com, Paolo Bonzini , kvm Subject: Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check Message-ID: <20160706075814.GF30921@twins.programming.kicks-ass.net> References: <1467124991-13164-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> <1467124991-13164-3-git-send-email-xinhui.pan@linux.vnet.ibm.com> <577C8FE3.3010208@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: > > SO it's easy for ppc to implement such interface. Note that yield_count is > > set by powerVM/KVM. > > and only pSeries can run a guest for now. :) > > > > I also review x86 related code, looks like we need add one hyer-call to get > > such vcpu preemption info? > > There is no such stuff to record lock holder in x86 kvm, maybe we > don't need to depend on PLE handler algorithm to guess it if we can > know lock holder vCPU directly. x86/kvm has vcpu->preempted to indicate if a vcpu is currently preempted or not. I'm just not sure if that is visible to the guest or how to make it so.