[prev in list] [next in list] [prev in thread] [next in thread]
List: kvm-ppc
Subject: RE: [PATCH 5 of 5] kvm: powerpc: Map guest userspace with TID=0 mappings
From: "Liu Yu" <Yu.Liu () freescale ! com>
Date: 2008-07-29 10:56:38
Message-ID: E20ABADA5792574791053954EC20B59509B69D () zch01exm26 ! fsl ! freescale ! net
[Download RAW message or body]
=-
> -----Original Message-----
> From: kvm-ppc-owner@vger.kernel.org
> [mailto:kvm-ppc-owner@vger.kernel.org] On Behalf Of Liu Yu
> Sent: Tuesday, July 29, 2008 3:48 PM
> To: Christian Ehrhardt
> Cc: Hollis Blanchard; avi@qumranet.com;
> kvm-ppc@vger.kernel.org; kvm@vger.kernel.org
> Subject: RE: [PATCH 5 of 5] kvm: powerpc: Map guest userspace
> with TID=0 mappings
>
>
> > -----Original Message-----
> > From: Christian Ehrhardt [mailto:ehrhardt@linux.vnet.ibm.com]
> > Sent: Tuesday, July 29, 2008 3:03 PM
> > To: Liu Yu
> > Cc: Hollis Blanchard; avi@qumranet.com; kvm-ppc@vger.kernel.org;
> > kvm@vger.kernel.org
> > Subject: Re: [PATCH 5 of 5] kvm: powerpc: Map guest userspace with
> > TID=0 mappings
> >
> > 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 to
> > > prevent one guest from using others' TLB? For all the
> > guests have the
> > > same TID=0 for userspace and TID=1 for kernel.
> > [...]
> >
> > Hi Yu Liu, thats a good question.
> > Afaik thats solved by the fact that the shadow tlb which is
> used when
> > entering guest context is per vcpu. Therefor a guest has
> always it's
> > own shadow tlb active and no mappings to the content of
> other guests.
>
> Yes, shadow tlb is per vcpu.
> But in the patch 4/5, before entering guest context, not all
> shadow tlb will be written back.
> So if (guest A -> guest B) happen, after entering guest B, is
> there any possibility that A's tlb is still existing in hardware?
I see.
'kvm_arch_vcpu_load' and 'kvm_arch_vcpu_put' will handle this in preempt hooker.
>
>
> >
> > This patch just allows us that a single guest userspace process
> > accessing the kernel 20 times (and changing privilege level
> 20 times
> > by doing so) can run without tlb flushes.
> > Guest-userspace context switch (pid is changing) -> tlb flush; and
> > guest switches (guest A -> guest B) -> other shadow tlb
> active; should
> > still be 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%.
> > > >
> >
> > --
> >
> > Grüsse / regards,
> > Christian Ehrhardt
> > IBM Linux Technology Center, Open Virtualization
> >
> --
> To unsubscribe from this list: send the line "unsubscribe
> kvm-ppc" in the body of a message to
> majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic