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]

 



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.


> -----Original Message-----
> From: kvm-ppc-owner@xxxxxxxxxxxxxxx 
> [mailto:kvm-ppc-owner@xxxxxxxxxxxxxxx] On Behalf Of Hollis Blanchard
> Sent: Saturday, July 26, 2008 2:55 AM
> To: avi@xxxxxxxxxxxx
> Cc: kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx
> Subject: [PATCH 5 of 5] kvm: powerpc: Map guest userspace 
> with TID=0 mappings
> 
> # HG changeset patch
> # User Hollis Blanchard <hollisb@xxxxxxxxxx> # Date 
> 1217011852 18000 # Node ID 080b9c9515a5593babc8cac73687b053d7d3f124
> # Parent  c832dfc7a6b50ace3c37d00b16ef9f5b46284b3e
> kvm: powerpc: Map guest userspace with TID=0 mappings.
> 
> When we use TID=N userspace mappings, we must ensure that 
> kernel mappings have been destroyed when entering userspace. 
> Using TID=1/TID=0 for kernel/user mappings and running 
> userspace with PID=0 means that userspace can't access the 
> kernel mappings, but the kernel can directly access userspace.
> 
> 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%.
> 
> Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
> 
> ---
> 7 files changed, 40 insertions(+), 18 deletions(-)
> arch/powerpc/kernel/asm-offsets.c   |    2 -
> arch/powerpc/kvm/44x_tlb.c          |   37 
> ++++++++++++++++++++---------------
> arch/powerpc/kvm/booke_guest.c      |    2 +
> arch/powerpc/kvm/booke_interrupts.S |    2 -
> arch/powerpc/kvm/emulate.c          |    2 -
> include/asm-powerpc/kvm_host.h      |    4 +++
> include/asm-powerpc/kvm_ppc.h       |    9 ++++++++
> 
--
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