From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Subject: Re: [PATCH 5 of 5] kvm: powerpc: Map guest userspace with TID=0 mappings Date: Tue, 29 Jul 2008 09:03:08 +0200 Message-ID: <200807290903.08763.ehrhardt@linux.vnet.ibm.com> References: <080b9c9515a5593babc8.1217012093@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Hollis Blanchard" , avi@qumranet.com, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org To: "Liu Yu" Return-path: Received: from mtagate7.uk.ibm.com ([195.212.29.140]:47044 "EHLO mtagate7.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752640AbYG2HD4 convert rfc822-to-8bit (ORCPT ); Tue, 29 Jul 2008 03:03:56 -0400 In-Reply-To: Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Monday 28 July 2008 12:33:41 Liu Yu wrote: > I have a question that I could not think through. > While multiple qemu/kvm processes are running at the same time, how t= o > prevent one guest from using others' TLB? For all the guests have the > same TID=3D0 for userspace and TID=3D1 for kernel. [...] Hi Yu Liu, thats a good question. Afaik thats solved by the fact that the shadow tlb which is used when e= ntering=20 guest context is per vcpu. Therefor a guest has always it's own shadow = tlb=20 active and no mappings to the content of other guests. This patch just allows us that a single guest userspace process accessi= ng the=20 kernel 20 times (and changing privilege level 20 times by doing so) can= run=20 without tlb flushes. Guest-userspace context switch (pid is changing) -> tlb flush; and gues= t=20 switches (guest A -> guest B) -> other shadow tlb active; should still = be=20 working fine. > > > > The net is that we don't need to flush the TLB on privilege > > switches, but we do on guest context switches (which are far > > more infrequent). Guest boot time performance improvement: about 30= %. > > --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization