From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 2/9] KVM: Expose a version 2 architectural PMU to a guests Date: Wed, 2 Nov 2011 14:03:58 +0200 Message-ID: <20111102120358.GE14726@redhat.com> References: <1319993624-20247-1-git-send-email-gleb@redhat.com> <1319993624-20247-3-git-send-email-gleb@redhat.com> <4EAFCE36.4070509@redhat.com> <20111101123041.GV17571@redhat.com> <4EB1150F.3020509@redhat.com> <20111102110945.GC14726@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, mtosatti@redhat.com, mingo@elte.hu, a.p.zijlstra@chello.nl, acme@ghostprotocols.net To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29387 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752969Ab1KBMEN (ORCPT ); Wed, 2 Nov 2011 08:04:13 -0400 Content-Disposition: inline In-Reply-To: <20111102110945.GC14726@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Nov 02, 2011 at 01:09:46PM +0200, Gleb Natapov wrote: > On Wed, Nov 02, 2011 at 12:01:51PM +0200, Avi Kivity wrote: > > No. There is irq_work_queue() for that. Would be good to avoid it if > > we know that it's safe to (for example if we have PF_VCPU set). > > > Checking PF_VCPU will not tell us that vcpu is going to reenter guest > mode again. > Looks like we can check percpu_read(current_vcpu) to see if last vmexit was due to NMI we are processing and decide according to that. -- Gleb.