Star64_linux/arch/powerpc/include/asm
Nicholas Piggin 6de6638b35 KVM: PPC: Book3S HV: Handle host system reset in guest mode
If the host takes a system reset interrupt while a guest is running,
the CPU must exit the guest before processing the host exception
handler.

After this patch, taking a sysrq+x with a CPU running in a guest
gives a trace like this:

   cpu 0x27: Vector: 100 (System Reset) at [c000000fdf5776f0]
       pc: c008000010158b80: kvmppc_run_core+0x16b8/0x1ad0 [kvm_hv]
       lr: c008000010158b80: kvmppc_run_core+0x16b8/0x1ad0 [kvm_hv]
       sp: c000000fdf577850
      msr: 9000000002803033
     current = 0xc000000fdf4b1e00
     paca    = 0xc00000000fd4d680	 softe: 3	 irq_happened: 0x01
       pid   = 6608, comm = qemu-system-ppc
   Linux version 4.14.0-rc7-01489-g47e1893a404a-dirty #26 SMP
   [c000000fdf577a00] c008000010159dd4 kvmppc_vcpu_run_hv+0x3dc/0x12d0 [kvm_hv]
   [c000000fdf577b30] c0080000100a537c kvmppc_vcpu_run+0x44/0x60 [kvm]
   [c000000fdf577b60] c0080000100a1ae0 kvm_arch_vcpu_ioctl_run+0x118/0x310 [kvm]
   [c000000fdf577c00] c008000010093e98 kvm_vcpu_ioctl+0x530/0x7c0 [kvm]
   [c000000fdf577d50] c000000000357bf8 do_vfs_ioctl+0xd8/0x8c0
   [c000000fdf577df0] c000000000358448 SyS_ioctl+0x68/0x100
   [c000000fdf577e30] c00000000000b220 system_call+0x58/0x6c
   --- Exception: c01 (System Call) at 00007fff76868df0
   SP (7fff7069baf0) is in userspace

Fixes: e36d0a2ed5 ("powerpc/powernv: Implement NMI IPI with OPAL_SIGNAL_SYSTEM_RESET")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-11-06 16:48:06 +11:00
..
book3s powerpc/mm: Export flush_all_mm() 2017-09-28 16:28:22 +10:00
nohash powerpc/hugetlb: fix page rights verification in gup_hugepte() 2017-08-15 22:55:58 +10:00
8xx_immap.h
accounting.h
agp.h
archrandom.h
asm-compat.h powerpc/asm: Convert .llong directives to .8byte 2017-08-31 14:26:47 +10:00
asm-offsets.h
asm-prototypes.h
async_tx.h
atomic.h powerpc/64: Fix atomic64_inc_not_zero() to return an int 2017-07-12 21:49:55 +10:00
backlight.h
barrier.h locking: Remove smp_mb__before_spinlock() 2017-08-10 12:29:03 +02:00
bitops.h powerpc: Remove __ilog2()s and use generic ones 2017-06-02 19:23:56 +10:00
bootx.h
btext.h
bug.h powerpc/powernv: Use kernel crash path for machine checks 2017-08-31 14:26:04 +10:00
bugs.h
cache.h powerpc/8xx: Getting rid of remaining use of CONFIG_8xx 2017-08-10 23:32:12 +10:00
cacheflush.h
cell-pmu.h
cell-regs.h
checksum.h
cmpxchg.h
code-patching.h powerpc64/elfv1: Only dereference function descriptor for non-text symbols 2017-07-03 23:08:50 +10:00
compat.h take compat_sys_old_getrlimit() to native syscall 2017-05-27 15:38:06 -04:00
context_tracking.h
copro.h
cpm.h
cpm1.h powerpc/8xx: Adding support of IRQ in MPC8xx GPIO 2017-05-02 22:35:00 -05:00
cpm2.h
cpu_has_feature.h powerpc/64s: Support new device tree binding for discovering CPU features 2017-05-09 23:42:55 +10:00
cpufeature.h
cpuidle.h powerpc/64s: Move IDLE_STATE_ENTER_SEQ[_NORET] into idle_book3s.S 2017-08-29 21:38:47 +10:00
cputable.h powerpc/8xx: Getting rid of remaining use of CONFIG_8xx 2017-08-10 23:32:12 +10:00
cputhreads.h
cputime.h
current.h
dbdma.h
dbell.h powerpc/64s: msgclr when handling doorbell exceptions from system reset 2017-06-19 19:46:27 +10:00
dcr-generic.h
dcr-mmio.h
dcr-native.h
dcr-regs.h
dcr.h
debug.h
debugfs.h
delay.h powerpc: use spin loop primitives in some functions 2017-07-02 20:40:24 +10:00
device.h
disassemble.h
dma-mapping.h powerpc: merge __dma_set_mask into dma_set_mask 2017-06-28 06:54:55 -07:00
dma.h
dt_cpu_ftrs.h powerpc/64s: Support new device tree binding for discovering CPU features 2017-05-09 23:42:55 +10:00
edac.h
eeh.h powerpc/powernv: Rework EEH initialization on powernv 2017-09-26 11:19:07 +10:00
eeh_event.h
ehv_pic.h
elf.h powerpc: move ELF_ET_DYN_BASE to 4GB / 4MB 2017-07-10 16:32:36 -07:00
emergency-restart.h
emulated_ops.h powerpc/64s: Add workaround for P9 vector CI load issue 2017-09-27 08:23:22 +10:00
epapr_hcalls.h powerpc: Always initialize input array when calling epapr_hypercall() 2017-10-06 20:50:58 +11:00
exception-64e.h
exception-64s.h powerpc/mce: Hookup derror (load/store) UE errors 2017-10-16 23:12:01 +11:00
exec.h
extable.h
fadump.h powerpc/powernv: Use kernel crash path for machine checks 2017-08-31 14:26:04 +10:00
fb.h
feature-fixups.h powerpc/asm: Convert .llong directives to .8byte 2017-08-31 14:26:47 +10:00
firmware.h
fixmap.h powerpc/mm: Simplify __set_fixmap() 2017-08-15 22:55:58 +10:00
floppy.h
fs_pd.h powerpc/8xx: Getting rid of remaining use of CONFIG_8xx 2017-08-10 23:32:12 +10:00
fsl_85xx_cache_sram.h
fsl_gtm.h
fsl_hcalls.h
fsl_lbc.h
fsl_pamu_stash.h
fsl_pm.h
ftrace.h
futex.h futex: Remove duplicated code and fix undefined behaviour 2017-08-25 22:49:59 +02:00
grackle.h
hardirq.h powerpc: Add irq accounting for watchdog interrupts 2017-08-10 22:30:02 +10:00
head-64.h powerpc/64s: Add EX_SIZE definition for paca exception save areas 2017-06-20 22:22:00 +10:00
heathrow.h
highmem.h
hmi.h
hugetlb.h powerpc/mm/radix: Drop unneeded NULL check 2017-10-22 12:08:31 +02:00
hvcall.h powerpc/xive: guest exploitation of the XIVE interrupt controller 2017-09-02 21:02:35 +10:00
hvconsole.h
hvcserver.h
hvsi.h
hw_breakpoint.h
hw_irq.h KVM: PPC: Book3S HV: Handle host system reset in guest mode 2017-11-06 16:48:06 +11:00
hydra.h
i8259.h
ibmebus.h
icswx.h crypto/nx: Add P9 NX specific error codes for 842 engine 2017-09-01 16:42:50 +10:00
ide.h
ima.h
imc-pmu.h powerpc/powernv: Detect and create IMC device 2017-07-25 22:55:27 +10:00
immap_cpm2.h
io-defs.h
io-workarounds.h
io.h
io_event_irq.h
iommu.h powerpc: implement ->mapping_error 2017-06-28 06:54:33 -07:00
ipic.h
irq.h
irq_work.h
irqflags.h
isa-bridge.h
jump_label.h
Kbuild powerpc: allow compiling with GENERIC_MSI_IRQ_DOMAIN 2017-07-24 21:19:32 +10:00
kdebug.h
kdump.h
kexec.h
keylargo.h
kgdb.h
kmap_types.h
kprobes.h powerpc/kprobes: Clean up jprobe detection in livepatch handler 2017-10-04 23:42:17 +11:00
kvm_asm.h
kvm_book3s.h KVM: PPC: Book3S HV: Simplify dynamic micro-threading code 2017-07-01 18:59:01 +10:00
kvm_book3s_32.h
kvm_book3s_64.h
kvm_book3s_asm.h Revert "KVM: PPC: Book3S HV: POWER9 does not require secondary thread management" 2017-10-19 15:28:04 +11:00
kvm_booke.h
kvm_booke_hv_asm.h
kvm_fpu.h
kvm_host.h KVM: update to new mmu_notifier semantic v2 2017-08-31 16:13:00 -07:00
kvm_para.h
kvm_ppc.h KVM: PPC: Book3S HV: Allow userspace to set the desired SMT mode 2017-06-19 14:34:20 +10:00
libata-portmap.h
linkage.h
livepatch.h
local.h
lppaca.h
lv1call.h
machdep.h powerpc: Do not call ppc_md.panic in fadump panic notifier 2017-08-31 14:26:01 +10:00
macio.h
mc146818rtc.h
mce.h powerpc/mce: Hookup derror (load/store) UE errors 2017-10-16 23:12:01 +11:00
mediabay.h
mm-arch-hooks.h
mman.h
mmu-8xx.h
mmu-40x.h
mmu-44x.h
mmu-book3e.h
mmu.h
mmu_context.h cxl: Enable global TLBIs for cxl contexts 2017-09-28 17:09:16 +10:00
mmzone.h
module.h powerpc/modules: If mprofile-kernel is enabled add it to vermagic 2017-05-15 19:31:38 +10:00
mpc5xxx.h
mpc6xx.h
mpc52xx.h
mpc52xx_psc.h
mpc85xx.h
mpc5121.h
mpc8260.h
mpic.h
mpic_msgr.h
mpic_timer.h
msi_bitmap.h
nmi.h powerpc/64: Fix watchdog configuration regressions 2017-08-31 14:26:00 +10:00
nvram.h
ohare.h
opal-api.h powerpc/powernv: Enable TM without suspend if possible 2017-10-21 09:33:05 +11:00
opal.h powerpc/powernv: Implement NMI IPI with OPAL_SIGNAL_SYSTEM_RESET 2017-10-04 11:27:27 +11:00
oprofile_impl.h
paca.h powerpc/64s: Add workaround for P9 vector CI load issue 2017-09-27 08:23:22 +10:00
page.h powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash 2017-05-19 13:04:35 +10:00
page_32.h
page_64.h
parport.h
pasemi_dma.h
pci-bridge.h powerpc/pci: Remove OF node back pointer from pci_dn 2017-08-31 14:26:12 +10:00
pci.h
percpu.h
perf_event.h
perf_event_fsl_emb.h
perf_event_server.h
pgalloc.h powerpc/mm/nohash: Move definition of PGALLOC_GFP to fix build errors 2017-08-15 20:02:56 +10:00
pgtable-be-types.h powerpc/mm: Ensure cpumask update is ordered 2017-08-18 13:07:16 +10:00
pgtable-types.h powerpc/mm: Ensure cpumask update is ordered 2017-08-18 13:07:16 +10:00
pgtable.h Merge branch 'topic/ppc-kvm' into next 2017-08-17 23:14:17 +10:00
plpar_wrappers.h
pmac_feature.h
pmac_low_i2c.h
pmac_pfunc.h
pmc.h
pmi.h
pnv-pci.h powerpc/powernv: Enable PCI peer-to-peer 2017-08-08 11:27:30 +10:00
powernv.h powerpc/powernv: Enable TM without suspend if possible 2017-10-21 09:33:05 +11:00
ppc-opcode.h powerpc: Handle most loads and stores in instruction emulation code 2017-09-01 16:39:48 +10:00
ppc-pci.h
ppc4xx.h
ppc4xx_ocm.h
ppc_asm.h powerpc/8xx: Getting rid of remaining use of CONFIG_8xx 2017-08-10 23:32:12 +10:00
probes.h
processor.h powerpc updates for 4.13 2017-07-07 13:55:45 -07:00
prom.h powerpc/xive: add XIVE Exploitation Mode to CAS 2017-09-02 21:02:38 +10:00
ps3.h
ps3av.h
ps3gpu.h
ps3stor.h
pte-common.h
pte-walk.h powerpc/mm: Rename find_linux_pte_or_hugepte() 2017-08-17 23:13:46 +10:00
ptrace.h
reg.h powerpc/asm: Convert .llong directives to .8byte 2017-08-31 14:26:47 +10:00
reg_8xx.h
reg_a2.h
reg_booke.h powerpc: Remove old unused icswx based coprocessor support 2017-08-03 16:06:52 +10:00
reg_fsl_emb.h
rheap.h
rio.h
rtas.h
runlatch.h
scom.h
seccomp.h
sections.h
serial.h
setjmp.h
setup.h powerpc: Do not call ppc_md.panic in fadump panic notifier 2017-08-31 14:26:01 +10:00
sfp-machine.h
shmparam.h
signal.h
smp.h powerpc/smp: Add cpu_l2_cache_map 2017-08-31 14:26:56 +10:00
smu.h
sparsemem.h
spinlock.h Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 11:52:29 -07:00
spinlock_types.h
spu.h
spu_csa.h
spu_info.h
spu_priv1.h
sstep.h powerpc: Emulate load/store floating point as integer word instructions 2017-09-01 16:42:44 +10:00
string.h powerpc/32: add memset16() 2017-09-01 16:42:45 +10:00
swab.h
swiotlb.h
switch_to.h
synch.h
syscall.h
syscalls.h
systbl.h
tce.h
termios.h
thread_info.h powerpc updates for 4.12 part 1. 2017-05-05 11:36:44 -07:00
time.h
timex.h powerpc/8xx: Getting rid of remaining use of CONFIG_8xx 2017-08-10 23:32:12 +10:00
tlb.h powerpc/mm: Optimize detection of thread local mm's 2017-08-23 22:28:38 +10:00
tlbflush.h
tm.h powerpc/powernv: Enable TM without suspend if possible 2017-10-21 09:33:05 +11:00
topology.h powerpc/hotplug: Improve responsiveness of hotplug change 2017-10-16 23:12:04 +11:00
trace.h powerpc/mm: Trace tlbie(l) instructions 2017-06-23 21:14:49 +10:00
trace_clock.h
tsi108.h
tsi108_irq.h
tsi108_pci.h
types.h
uaccess.h powerpc/64s: Add workaround for P9 vector CI load issue 2017-09-27 08:23:22 +10:00
udbg.h
uic.h
unaligned.h
uninorth.h
unistd.h
uprobes.h
user.h
vas.h powerpc/powernv/vas: Define copy/paste interfaces 2017-08-31 14:26:38 +10:00
vdso.h
vdso_datapage.h
vga.h vga: optimise console scrolling 2017-09-08 18:26:48 -07:00
vio.h
word-at-a-time.h
xics.h
xilinx_intc.h
xilinx_pci.h
xive-regs.h
xive.h powerpc/xive: introduce H_INT_ESB hcall 2017-09-02 21:02:37 +10:00
xmon.h
xor.h