diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2008-07-25 14:54:53 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-10-15 04:15:16 -0400 |
commit | 49dd2c492895828a90ecdf889e7fe9cfb40a82a7 (patch) | |
tree | 63b5f85b0ed5a94c8265d86dda4db262b00adf95 /arch/powerpc/kvm/emulate.c | |
parent | 83aae4a8098eb8a40a2e9dab3714354182143b4f (diff) |
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@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/powerpc/kvm/emulate.c')
-rw-r--r-- | arch/powerpc/kvm/emulate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index c3ed63b22210..0fce4fbdc20d 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
@@ -508,7 +508,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
508 | case SPRN_MMUCR: | 508 | case SPRN_MMUCR: |
509 | vcpu->arch.mmucr = vcpu->arch.gpr[rs]; break; | 509 | vcpu->arch.mmucr = vcpu->arch.gpr[rs]; break; |
510 | case SPRN_PID: | 510 | case SPRN_PID: |
511 | vcpu->arch.pid = vcpu->arch.gpr[rs]; break; | 511 | kvmppc_set_pid(vcpu, vcpu->arch.gpr[rs]); break; |
512 | case SPRN_CCR0: | 512 | case SPRN_CCR0: |
513 | vcpu->arch.ccr0 = vcpu->arch.gpr[rs]; break; | 513 | vcpu->arch.ccr0 = vcpu->arch.gpr[rs]; break; |
514 | case SPRN_CCR1: | 514 | case SPRN_CCR1: |