RE: [PATCH 5 of 5] kvm: powerpc: Map guest userspace with TID=0 mappings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Christian Ehrhardt [mailto:ehrhardt@xxxxxxxxxxxxxxxxxx] 
> Sent: Tuesday, July 29, 2008 3:03 PM
> To: Liu Yu
> Cc: Hollis Blanchard; avi@xxxxxxxxxxxx; 
> kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx
> 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?


> 
> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux