From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: cr3 OOS optimisation breaks 32-bit GNU/kFreeBSD guest Date: Mon, 23 Feb 2009 12:06:38 -0300 Message-ID: <20090223150638.GA5798@amt.cnet> References: <20090223003305.GW12976@hall.aurel32.net> <20090223014713.GA11438@amt.cnet> <20090223140115.GB5946@hall.aurel32.net> <20090223145208.GA5782@amt.cnet> <49A2B9D9.3030103@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Aurelien Jarno , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:50714 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755240AbZBWPHS (ORCPT ); Mon, 23 Feb 2009 10:07:18 -0500 Content-Disposition: inline In-Reply-To: <49A2B9D9.3030103@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Feb 23, 2009 at 04:59:37PM +0200, Avi Kivity wrote: > Marcelo Tosatti wrote: >>> Thanks for your fast answer and for your help for debugging. >>> =20 >> >> If you confirm that FreeBSD is indeed relying on cr3 to sync global >> pages, it might be better to disable the optimization. Lets hope tha= t is >> not the case. >> =20 > > cr3 writes explicitly do not flush global pages; otherwise what would= be =20 > the point of global pages at all? =46rom the Intel TLB doc: The processor is always free to invalidate additional entries in the TL= Bs and paging-structure caches. The following are some examples: =E2=80=A2 MOV to CR3 may invalidate TLB entries for global pages. The reasoning was if an optimization breaks an important guest which contains a bug that happens to not trigger on real HW due to positionin= g of the stars, it is reasonable to disable that optimization. > In other words, the only difference between global and non-global pag= es =20 > is visible via cr3 writes.