=-

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Liu Yu
> Sent: Tuesday, July 29, 2008 3:48 PM
> To: Christian Ehrhardt
> Cc: Hollis Blanchard; [EMAIL PROTECTED]; 
> [EMAIL PROTECTED]; [email protected]
> Subject: RE: [PATCH 5 of 5] kvm: powerpc: Map guest userspace 
> with TID=0 mappings
> 
> 
> > -----Original Message-----
> > From: Christian Ehrhardt [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 29, 2008 3:03 PM
> > To: Liu Yu
> > Cc: Hollis Blanchard; [EMAIL PROTECTED]; [EMAIL PROTECTED]; 
> > [email protected]
> > 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 
> [EMAIL PROTECTED] More majordomo info at  
> http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to