From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: missing kvm smp tlb flush in invlpg Date: Sun, 15 Mar 2009 18:05:41 +0100 Message-ID: <20090315170541.GJ27823@random.random> References: <20090312171843.GU27823@random.random> <49BCDA04.1020602@redhat.com> <20090315161642.GH27823@random.random> <49BD2AAE.1040402@redhat.com> <20090315163026.GI27823@random.random> <49BD2E36.8090103@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Marcelo Tosatti To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:54429 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753895AbZCORGY (ORCPT ); Sun, 15 Mar 2009 13:06:24 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2FH6MFd028110 for ; Sun, 15 Mar 2009 13:06:22 -0400 Content-Disposition: inline In-Reply-To: <49BD2E36.8090103@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Mar 15, 2009 at 06:35:02PM +0200, Avi Kivity wrote: > Andrea Arcangeli wrote: >> Ah so this was a proposed fix for this bug, I thought you were talking >> about different bugs, and you didn't acknowledge this as a bug sorry! >> >> > > If ignoring bugs could make them go away... ;) >> About the need_flush that could become a per-vcpu bit too cleared at >> every exit so perhaps we'll never have to flush, but it'd need to stay >> in the vcpu structure to avoid cacheline bouncing. >> > > But then we need to set it for all vcpus on every invlpg. I'm assuming > invlpg is much more frequent than mmu notifiers, so it's better to keep it > global. > > We've already taken a shared cacheline when we acquired mmu_lock. Ok. > btw, it's probably better to apply your patch, then adapt it to the > non-IPIing version; your patch is more suitable for -stable. It's up to you, I guess it'll make life easier with the compat code ;).