From: Marcelo Tosatti Subject: Re: [PATCH] KVM: MMU: make kvm_mmu_reset_context() flush the guest TLB Date: Mon, 20 Jun 2011 15:32:34 -0300 Message-ID: <20110620183234.GB19717@amt.cnet> References: <1307892300-3288-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47094 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965Ab1FTTGG (ORCPT ); Mon, 20 Jun 2011 15:06:06 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5KJ66hx030196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 20 Jun 2011 15:06:06 -0400 Content-Disposition: inline In-Reply-To: <1307892300-3288-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Jun 12, 2011 at 06:25:00PM +0300, Avi Kivity wrote: > kvm_set_cr0() and kvm_set_cr4(), and possible other functions, > assume that kvm_mmu_reset_context() flushes the guest TLB. However, > it does not. TLB flush should be done lazily during guest entry, in kvm_mmu_load(). Don't see why this patch is needed. > > Fix by flushing the tlb (and syncing the new root as well). > > Signed-off-by: Avi Kivity