From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch 2/5] KVM: hypercall based pte updates and TLB flushes Date: Sun, 17 Feb 2008 11:51:48 -0300 Message-ID: <20080217145148.GA31750@dmt> References: <20080216220924.733723618@redhat.com>> <20080216221220.843135254@redhat.com>> <47B7F017.10902@qumranet.com> <47B8330B.6050405@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <47B8330B.6050405@qumranet.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Sun, Feb 17, 2008 at 03:13:47PM +0200, Avi Kivity wrote: > Avi Kivity wrote: > >Marcelo Tosatti wrote: > >>Hypercall based pte updates are faster than faults, and also allow use > >>of the lazy MMU mode to batch operations. > >> > >>Don't report the feature if two dimensional paging is enabled. > >> > >>Signed-off-by: Marcelo Tosatti > >>+/* > >>+ * We only need to hook operations that are MMU writes. We hook > >>these so that > >>+ * we can use lazy MMU mode to batch these operations. We could > >>probably > >>+ * improve the performance of the host code if we used some of the > >>information > >>+ * here to simplify processing of batched writes. > >>+ */ > >> > > > >One option is, if the guest promises never to write to a page table > >directly, is to avoid write protecting guest page tables. I think the > >shadow code can handle it (since the gfn/spte relationship is > >maintained by shadow code, and doesn't require reading the guest page > >tables), but am not sure. > > > > In addition to reducing mmu work for write protection, this allows more > efficient use of large pages. Yes, and gets rid of the remote TLB flushing. Issue is the paravirt_ops code in Linux does not cover all pte updates (bit updates, ptep_get_and_clear, etc). The plan is to get the basic infrastructure merged into KVM first (which is a significant improvement already) and then later have paravirt_ops cover all updates, disabling write protection. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/