1
0
Fork 0
alistair23-linux/arch/powerpc/kvm
Paul Mackerras df158189db KVM: PPC: Book 3S HV: Do ptesync in radix guest exit path
A radix guest can execute tlbie instructions to invalidate TLB entries.
After a tlbie or a group of tlbies, it must then do the architected
sequence eieio; tlbsync; ptesync to ensure that the TLB invalidation
has been processed by all CPUs in the system before it can rely on
no CPU using any translation that it just invalidated.

In fact it is the ptesync which does the actual synchronization in
this sequence, and hardware has a requirement that the ptesync must
be executed on the same CPU thread as the tlbies which it is expected
to order.  Thus, if a vCPU gets moved from one physical CPU to
another after it has done some tlbies but before it can get to do the
ptesync, the ptesync will not have the desired effect when it is
executed on the second physical CPU.

To fix this, we do a ptesync in the exit path for radix guests.  If
there are any pending tlbies, this will wait for them to complete.
If there aren't, then ptesync will just do the same as sync.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2018-05-17 15:17:13 +10:00
..
Kconfig Second PPC KVM update for 4.16 2018-02-09 22:03:06 +01:00
Makefile KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9 2018-03-24 00:39:13 +11:00
book3s.c KVM: PPC: Remove unused kvm_unmap_hva callback 2018-03-19 10:08:29 +11:00
book3s.h KVM: PPC: Remove unused kvm_unmap_hva callback 2018-03-19 10:08:29 +11:00
book3s_32_mmu.c KVM: PPC: Book3S PR: Ratelimit copy data failure error messages 2017-02-17 14:03:35 +11:00
book3s_32_mmu_host.c powerpc/mm: Move hash related mmu-*.h headers to book3s/ 2016-03-03 21:19:21 +11: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.c KVM: PPC: Book3S PR: Fix WIMG handling under pHyp 2018-01-10 20:45:00 +11:00
book3s_64_mmu_host.c * ARM: HYP mode stub supports kexec/kdump on 32-bit; improved PMU 2017-05-08 12:37:56 -07:00
book3s_64_mmu_hv.c KVM: PPC: Remove unused kvm_unmap_hva callback 2018-03-19 10:08:29 +11:00
book3s_64_mmu_radix.c KVM: PPC: Book3S HV: Make radix clear pte when unmapping 2018-05-17 15:16:59 +10:00
book3s_64_slb.S KVM: PPC: Book3S: Fix gas warning due to using r0 as immediate 0 2017-11-01 15:17:25 +11:00
book3s_64_vio.c KVM: PPC: Book3S: Protect kvmppc_gpa_to_ua() with SRCU 2017-10-14 11:35:41 +11:00
book3s_64_vio_hv.c KVM: PPC: Remove unused kvm_unmap_hva callback 2018-03-19 10:08:29 +11:00
book3s_emulate.c KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs 2017-04-20 11:39:32 +10:00
book3s_exports.c KVM: PPC: Make shared struct aka magic page guest endian 2014-05-30 14:26:21 +02:00
book3s_hv.c KVM: PPC: Book3S HV: Snapshot timebase offset on guest entry 2018-05-17 15:16:45 +10:00
book3s_hv_builtin.c powerpc/64: Use array of paca pointers and allocate pacas individually 2018-03-30 23:34:23 +11:00
book3s_hv_hmi.c powerpc: move hmi.c to arch/powerpc/kvm/ 2016-09-09 16:18:07 +10:00
book3s_hv_interrupts.S powerpc/64s: Do not allocate lppaca if we are not virtualized 2018-03-30 23:34:22 +11:00
book3s_hv_ras.c Merge branch 'topic/ppc-kvm' into next 2018-01-21 22:43:43 +11:00
book3s_hv_rm_mmu.c KVM: PPC: Book3S HV: trace_tlbie must not be called in realmode 2018-04-11 12:35:33 +10:00
book3s_hv_rm_xics.c Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD 2017-05-09 11:50:01 +02:00
book3s_hv_rm_xive.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
book3s_hv_rmhandlers.S KVM: PPC: Book 3S HV: Do ptesync in radix guest exit path 2018-05-17 15:17:13 +10:00
book3s_hv_tm.c KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9 2018-03-24 00:39:13 +11:00
book3s_hv_tm_builtin.c KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9 2018-03-24 00:39:13 +11:00
book3s_interrupts.S KVM: PPC: Book3S PR: Fix svcpu copying with preemption enabled 2018-02-01 13:35:33 +11:00
book3s_mmu_hpte.c sched/headers: Prepare to use <linux/rcuupdate.h> instead of <linux/rculist.h> in <linux/sched.h> 2017-03-02 08:42:38 +01:00
book3s_paired_singles.c powerpc: Create disable_kernel_{fp,altivec,vsx,spe}() 2015-12-01 13:52:25 +11:00
book3s_pr.c KVM: PPC: Remove unused kvm_unmap_hva callback 2018-03-19 10:08:29 +11:00
book3s_pr_papr.c KVM: PPC: Book3S PR: Enable in-kernel TCE handlers for PR KVM 2017-10-14 16:38:19 +11:00
book3s_rmhandlers.S powerpc/64s: Simple RFI macro conversions 2018-01-10 03:07:30 +11:00
book3s_rtas.c KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller 2017-04-27 21:37:29 +10:00
book3s_segment.S powerpc/64s: Simple RFI macro conversions 2018-01-10 03:07:30 +11:00
book3s_xics.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
book3s_xics.h KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller 2017-04-27 21:37:29 +10:00
book3s_xive.c treewide/trivial: Remove ';;$' typo noise 2018-02-22 10:59:33 +01:00
book3s_xive.h KVM: PPC: Book3S HV: Enable use of the new XIVE "single escalation" feature 2018-01-19 12:10:21 +11:00
book3s_xive_template.c KVM: PPC: Book3S HV: XIVE: Resend re-routed interrupts on CPU priority change 2018-05-17 15:17:06 +10:00
booke.c powerpc/kvm/booke: Fix altivec related build break 2018-04-27 16:36:03 +10:00
booke.h KVM: PPC: Book3e: Add AltiVec support 2014-09-22 10:11:32 +02:00
booke_emulate.c KVM: PPC: BOOKE: Emulate debug registers and exception 2014-09-22 10:11:33 +02:00
booke_interrupts.S KVM: PPC: Remove 440 support 2014-07-28 15:23:15 +02:00
bookehv_interrupts.S powerpc/kvm: common sw breakpoint instr across ppc 2014-09-22 10:11:36 +02:00
e500.c KVM: PPC: e500: Fix some NULL dereferences on error 2017-08-31 12:36:44 +10:00
e500.h kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
e500_emulate.c KVM: PPC: e500: Emulate TMCFG0 TMRN register 2015-10-15 15:58:16 +11:00
e500_mmu.c KVM: PPC: e500: Rename jump labels in kvmppc_e500_tlb_init() 2016-09-13 14:32:47 +10:00
e500_mmu_host.c KVM: PPC: Remove unused kvm_unmap_hva callback 2018-03-19 10:08:29 +11:00
e500_mmu_host.h KVM: PPC: E500: Make clear_tlb_refs and clear_tlb1_bitmap static 2013-01-24 19:23:33 +01:00
e500mc.c KVM: PPC: e500mc: Fix a NULL dereference 2017-08-31 12:36:44 +10:00
emulate.c powerpc/64s: Remove POWER4 support 2018-04-01 00:47:50 +11:00
emulate_loadstore.c KVM: PPC: Book3S: Add MMIO emulation for VMX instructions 2018-02-09 16:51:51 +11:00
fpu.S powerpc: Remove fpscr use from [kvm_]cvt_{fd,df} 2010-09-02 14:07:32 +10:00
irq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpic.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
powerpc.c Merge branch 'topic/ppc-kvm' into next 2018-03-24 08:43:18 +11:00
timing.c KVM: PPC: Use seq_puts() in kvmppc_exit_timing_show() 2018-01-11 20:36:06 +11:00
timing.h KVM: PPC: Remove DCR handling 2014-07-28 19:29:15 +02:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_book3s.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_booke.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_hv.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_pr.h KVM: PPC: Remove unused kvm_unmap_hva callback 2018-03-19 10:08:29 +11:00