From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: missing kvm smp tlb flush in invlpg Date: Sun, 15 Mar 2009 18:35:02 +0200 Message-ID: <49BD2E36.8090103@redhat.com> References: <20090312171843.GU27823@random.random> <49BCDA04.1020602@redhat.com> <20090315161642.GH27823@random.random> <49BD2AAE.1040402@redhat.com> <20090315163026.GI27823@random.random> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Marcelo Tosatti To: Andrea Arcangeli Return-path: Received: from mx2.redhat.com ([66.187.237.31]:55553 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750935AbZCOQfF (ORCPT ); Sun, 15 Mar 2009 12:35:05 -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 n2FGZ4mJ022690 for ; Sun, 15 Mar 2009 12:35:04 -0400 In-Reply-To: <20090315163026.GI27823@random.random> Sender: kvm-owner@vger.kernel.org List-ID: 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. btw, it's probably better to apply your patch, then adapt it to the non-IPIing version; your patch is more suitable for -stable. -- error compiling committee.c: too many arguments to function