linux_dsm_epyc7002/arch/powerpc/kvm
Anton Blanchard 18ad51dd34 powerpc: Add VDSO version of getcpu
We have a request for a fast method of getting CPU and NUMA node IDs
from userspace. This patch implements a getcpu VDSO function,
similar to x86.

Ben suggested we use SPRG3 which is userspace readable. SPRG3 can be
modified by a KVM guest, so we save the SPRG3 value in the paca and
restore it when transitioning from the guest to the host.

I have a glibc patch that implements sched_getcpu on top of this.
Testing on a POWER7:

baseline: 538 cycles
vdso:      30 cycles

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-11 14:18:40 +10:00
..
44x_emulate.c KVM: PPC: Emulator: clean up SPR reads and writes 2012-05-06 16:19:13 +02:00
44x_tlb.c KVM: PPC: e500: Add shadow PID support 2011-07-12 13:16:39 +03:00
44x_tlb.h KVM: ppc: rename 44x MMU functions used in booke.c 2009-03-24 11:02:56 +02:00
44x.c KVM: PPC: booke: Move vm core init/destroy out of booke.c 2012-04-08 12:51:05 +03:00
book3s_32_mmu_host.c KVM: PPC: Use get/set for to_svcpu to help preemption 2012-03-05 14:52:30 +02:00
book3s_32_mmu.c KVM: PPC: Put segment registers in shared page 2010-10-24 10:52:11 +02:00
book3s_32_sr.S KVM: PPC: book3s_pr: Simplify transitions between virtual and real mode 2011-09-25 19:52:29 +03:00
book3s_64_mmu_host.c powerpc/kvm: Fix VSID usage in 64-bit "PR" KVM 2012-05-16 15:02:11 +02:00
book3s_64_mmu_hv.c Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-05-24 16:17:30 -07:00
book3s_64_mmu.c KVM: PPC: Interpret SDR1 as HVA in PAPR mode 2011-09-25 19:52:21 +03:00
book3s_64_slb.S KVM: PPC: Book3S: PR: No isync in slbie path 2012-05-06 16:19:09 +02:00
book3s_64_vio_hv.c kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM 2012-05-06 16:19:11 +02:00
book3s_64_vio.c kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM 2012-05-06 16:19:11 +02:00
book3s_emulate.c KVM: PPC: Emulator: clean up SPR reads and writes 2012-05-06 16:19:13 +02:00
book3s_exports.c powerpc: various straight conversions from module.h --> export.h 2011-10-31 19:30:44 -04:00
book3s_hv_builtin.c KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears exist 2012-04-03 16:42:22 +10:00
book3s_hv_interrupts.S KVM: PPC: Work around POWER7 DABR corruption problem 2012-04-08 14:01:36 +03:00
book3s_hv_rm_mmu.c KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates 2012-05-16 15:02:12 +02:00
book3s_hv_rmhandlers.S powerpc: Add VDSO version of getcpu 2012-07-11 14:18:40 +10:00
book3s_hv.c KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page 2012-06-19 15:04:13 +03:00
book3s_interrupts.S powerpc: Merge VCPU_GPR 2012-07-10 19:18:06 +10:00
book3s_mmu_hpte.c KVM: PPC: Move fields between struct kvm_vcpu_arch and kvmppc_vcpu_book3s 2011-07-12 13:16:46 +03:00
book3s_paired_singles.c powerpc/kvm: Fallout from system.h disintegration 2012-04-02 14:00:04 +10:00
book3s_pr_papr.c kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM 2012-05-06 16:19:11 +02:00
book3s_pr.c kvm/powerpc: Add new ioctl to retreive server MMU infos 2012-05-06 16:19:12 +02:00
book3s_rmhandlers.S powerpc: Move and fix MTMSR_EERI definition 2012-07-10 19:18:08 +10:00
book3s_segment.S powerpc: Move and fix MTMSR_EERI definition 2012-07-10 19:18:08 +10:00
book3s.c powerpc/kvm: Fix magic page vs. 32-bit RTAS on ppc64 2012-04-08 14:02:39 +03:00
booke_emulate.c KVM: PPC: Emulator: clean up SPR reads and writes 2012-05-06 16:19:13 +02:00
booke_interrupts.S powerpc: Enforce usage of R0-R31 where possible 2012-07-10 19:18:30 +10:00
booke.c KVM: PPC: Ignore unhalt request from kvm_vcpu_block 2012-04-08 14:02:38 +03:00
booke.h KVM: PPC: Emulator: clean up SPR reads and writes 2012-05-06 16:19:13 +02:00
bookehv_interrupts.S powerpc: Use CURRENT_THREAD_INFO instead of open coded assembly 2012-07-11 14:18:22 +10:00
e500_emulate.c KVM: PPC: Emulator: clean up SPR reads and writes 2012-05-06 16:19:13 +02:00
e500_tlb.c KVM: Use minimum and maximum address mapped by TLB1 2012-05-06 16:19:07 +02:00
e500.c KVM: PPC: e500: refactor core-specific TLB code 2012-04-08 12:51:12 +03:00
e500.h KVM: Use minimum and maximum address mapped by TLB1 2012-05-06 16:19:07 +02:00
e500mc.c KVM: PPC: e500mc support 2012-04-08 12:54:33 +03:00
emulate.c KVM: PPC: Emulator: clean up SPR reads and writes 2012-05-06 16:19:13 +02:00
fpu.S powerpc: Remove fpscr use from [kvm_]cvt_{fd,df} 2010-09-02 14:07:32 +10:00
Kconfig KVM: PPC: make e500v2 kvm and e500mc cpu mutually exclusive 2012-04-08 12:54:59 +03:00
Makefile kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM 2012-05-06 16:19:11 +02:00
powerpc.c kvm/powerpc: Add new ioctl to retreive server MMU infos 2012-05-06 16:19:12 +02:00
timing.c KVM: PPC: fix partial application of "exit timing in ticks" 2011-07-12 13:16:28 +03:00
timing.h KVM: PPC: booke: category E.HV (GS-mode) support 2012-04-08 12:51:19 +03:00
trace.h KVM: PPC: booke: Add booke206 TLB trace 2012-03-05 14:52:40 +02:00