linux/arch/powerpc/include/uapi/asm
Bharat Bhushan ce11e48b7f KVM: PPC: E500: Add userspace debug stub support
This patch adds the debug stub support on booke/bookehv.
Now QEMU debug stub can use hw breakpoint, watchpoint and
software breakpoint to debug guest.

This is how we save/restore debug register context when switching
between guest, userspace and kernel user-process:

When QEMU is running
 -> thread->debug_reg == QEMU debug register context.
 -> Kernel will handle switching the debug register on context switch.
 -> no vcpu_load() called

QEMU makes ioctls (except RUN)
 -> This will call vcpu_load()
 -> should not change context.
 -> Some ioctls can change vcpu debug register, context saved in vcpu->debug_regs

QEMU Makes RUN ioctl
 -> Save thread->debug_reg on STACK
 -> Store thread->debug_reg == vcpu->debug_reg
 -> load thread->debug_reg
 -> RUN VCPU ( So thread points to vcpu context )

Context switch happens When VCPU running
 -> makes vcpu_load() should not load any context
 -> kernel loads the vcpu context as thread->debug_regs points to vcpu context.

On heavyweight_exit
 -> Load the context saved on stack in thread->debug_reg

Currently we do not support debug resource emulation to guest,
On debug exception, always exit to user space irrespective of
user space is expecting the debug exception or not. If this is
unexpected exception (breakpoint/watchpoint event not set by
userspace) then let us leave the action on user space. This
is similar to what it was before, only thing is that now we
have proper exit state available to user space.

Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-10-17 14:49:40 +02:00
..
Kbuild powerpc/perf: Export PERF_EVENT_CONFIG_EBB_SHIFT to userspace 2013-08-01 13:11:46 +10:00
auxvec.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
bitsperlong.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
bootx.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
byteorder.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
cputable.h powerpc/cputable: Reserve bits in HWCAP2 for new features 2013-05-06 09:25:38 +10:00
elf.h powerpc: Fix little endian coredumps 2013-08-14 15:33:39 +10:00
epapr_hcalls.h PPC: ePAPR: Convert hcall header to uapi (round 2) 2012-10-31 13:45:32 +01:00
errno.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
fcntl.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
ioctl.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
ioctls.h tty, ioctls -- Add new ioctl definitions for tty flags fetching 2012-10-25 12:07:18 -07:00
ipcbuf.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
kvm.h KVM: PPC: E500: Add userspace debug stub support 2013-10-17 14:49:40 +02:00
kvm_para.h powerpc: Corrected include header path in kvm_para.h 2012-12-20 11:23:32 +01:00
mman.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
msgbuf.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
nvram.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
param.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
perf_event.h powerpc/perf: Export PERF_EVENT_CONFIG_EBB_SHIFT to userspace 2013-08-01 13:11:46 +10:00
poll.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
posix_types.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
ps3fb.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
ptrace.h powerpc/ptrace: Add DAWR debug feature info for userspace 2013-04-18 15:59:55 +10:00
resource.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
seccomp.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
sembuf.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
setup.h powerpc: Move most of setup.h out of uapi 2012-11-15 13:00:51 +11:00
shmbuf.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
sigcontext.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
siginfo.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
signal.h powerpc: switch to generic old sigaction() 2013-02-03 18:16:10 -05:00
socket.h net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
sockios.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
spu_info.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
stat.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
statfs.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
swab.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
termbits.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
termios.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
tm.h powerpc/tm: Move TM abort cause codes to uapi 2013-06-01 08:29:23 +10:00
types.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
ucontext.h UAPI: (Scripted) Disintegrate arch/powerpc/include/asm 2012-10-09 09:47:26 +01:00
unistd.h powerpc: Wireup the kcmp syscall to sys_ni 2013-03-05 16:56:29 +11:00