linux/arch/powerpc/include/uapi/asm
Paul Mackerras 8563bf52d5 KVM: PPC: Book3S HV: Add support for DABRX register on POWER7
The DABRX (DABR extension) register on POWER7 processors provides finer
control over which accesses cause a data breakpoint interrupt.  It
contains 3 bits which indicate whether to enable accesses in user,
kernel and hypervisor modes respectively to cause data breakpoint
interrupts, plus one bit that enables both real mode and virtual mode
accesses to cause interrupts.  Currently, KVM sets DABRX to allow
both kernel and user accesses to cause interrupts while in the guest.

This adds support for the guest to specify other values for DABRX.
PAPR defines a H_SET_XDABR hcall to allow the guest to set both DABR
and DABRX with one call.  This adds a real-mode implementation of
H_SET_XDABR, which shares most of its code with the existing H_SET_DABR
implementation.  To support this, we add a per-vcpu field to store the
DABRX value plus code to get and set it via the ONE_REG interface.

For Linux guests to use this new hcall, userspace needs to add
"hcall-xdabr" to the set of strings in the /chosen/hypertas-functions
property in the device tree.  If userspace does this and then migrates
the guest to a host where the kernel doesn't include this patch, then
userspace will need to implement H_SET_XDABR by writing the specified
DABR value to the DABR using the ONE_REG interface.  In that case, the
old kernel will set DABRX to DABRX_USER | DABRX_KERNEL.  That should
still work correctly, at least for Linux guests, since Linux guests
cope with getting data breakpoint interrupts in modes that weren't
requested by just ignoring the interrupt, and Linux guests never set
DABRX_BTI.

The other thing this does is to make H_SET_DABR and H_SET_XDABR work
on POWER8, which has the DAWR and DAWRX instead of DABR/X.  Guests that
know about POWER8 should use H_SET_MODE rather than H_SET_[X]DABR, but
guests running in POWER7 compatibility mode will still use H_SET_[X]DABR.
For them, this adds the logic to convert DABR/X values into DAWR/X values
on POWER8.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2014-01-27 16:01:15 +01:00
..
auxvec.h
bitsperlong.h
bootx.h
byteorder.h powerpc: Include the appropriate endianness header 2013-10-11 16:48:33 +11: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
fcntl.h
ioctl.h
ioctls.h tty, ioctls -- Add new ioctl definitions for tty flags fetching 2012-10-25 12:07:18 -07:00
ipcbuf.h
Kbuild powerpc/perf: Export PERF_EVENT_CONFIG_EBB_SHIFT to userspace 2013-08-01 13:11:46 +10:00
kvm_para.h powerpc: Corrected include header path in kvm_para.h 2012-12-20 11:23:32 +01:00
kvm.h KVM: PPC: Book3S HV: Add support for DABRX register on POWER7 2014-01-27 16:01:15 +01:00
mman.h
msgbuf.h
nvram.h
param.h
perf_event.h powerpc/perf: Export PERF_EVENT_CONFIG_EBB_SHIFT to userspace 2013-08-01 13:11:46 +10:00
poll.h
posix_types.h
ps3fb.h
ptrace.h powerpc/ptrace: Add DAWR debug feature info for userspace 2013-04-18 15:59:55 +10:00
resource.h
seccomp.h
sembuf.h
setup.h powerpc: Move most of setup.h out of uapi 2012-11-15 13:00:51 +11:00
shmbuf.h
sigcontext.h
siginfo.h
signal.h powerpc: switch to generic old sigaction() 2013-02-03 18:16:10 -05:00
socket.h net: introduce SO_MAX_PACING_RATE 2013-09-28 15:35:41 -07:00
sockios.h
spu_info.h
stat.h
statfs.h
swab.h
termbits.h
termios.h
tm.h powerpc/tm: Move TM abort cause codes to uapi 2013-06-01 08:29:23 +10:00
types.h
ucontext.h
unistd.h powerpc: Wireup the kcmp syscall to sys_ni 2013-03-05 16:56:29 +11:00