diff options
author | Bharat Bhushan <r65777@freescale.com> | 2013-07-04 02:57:45 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-10-17 08:49:39 -0400 |
commit | b12c784123ff805c066449ca580f15a903c24994 (patch) | |
tree | 9fe3eadbff1e5acae7ad3c9b05c0fd349af1439c /arch/powerpc/include/uapi | |
parent | fc82cf113bded906e0fc1d4a8636a6776670b1c5 (diff) |
KVM: PPC: E500: exit to user space on "ehpriv 1" instruction
"ehpriv 1" instruction is used for setting software breakpoints
by user space. This patch adds support to exit to user space
with "run->debug" have relevant information.
As this is the first point we are using run->debug, also defined
the run->debug structure.
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/uapi')
-rw-r--r-- | arch/powerpc/include/uapi/asm/kvm.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h index e420d46d363f..482bba56e499 100644 --- a/arch/powerpc/include/uapi/asm/kvm.h +++ b/arch/powerpc/include/uapi/asm/kvm.h | |||
@@ -269,7 +269,24 @@ struct kvm_fpu { | |||
269 | __u64 fpr[32]; | 269 | __u64 fpr[32]; |
270 | }; | 270 | }; |
271 | 271 | ||
272 | /* | ||
273 | * Defines for h/w breakpoint, watchpoint (read, write or both) and | ||
274 | * software breakpoint. | ||
275 | * These are used as "type" in KVM_SET_GUEST_DEBUG ioctl and "status" | ||
276 | * for KVM_DEBUG_EXIT. | ||
277 | */ | ||
278 | #define KVMPPC_DEBUG_NONE 0x0 | ||
279 | #define KVMPPC_DEBUG_BREAKPOINT (1UL << 1) | ||
280 | #define KVMPPC_DEBUG_WATCH_WRITE (1UL << 2) | ||
281 | #define KVMPPC_DEBUG_WATCH_READ (1UL << 3) | ||
272 | struct kvm_debug_exit_arch { | 282 | struct kvm_debug_exit_arch { |
283 | __u64 address; | ||
284 | /* | ||
285 | * exiting to userspace because of h/w breakpoint, watchpoint | ||
286 | * (read, write or both) and software breakpoint. | ||
287 | */ | ||
288 | __u32 status; | ||
289 | __u32 reserved; | ||
273 | }; | 290 | }; |
274 | 291 | ||
275 | /* for KVM_SET_GUEST_DEBUG */ | 292 | /* for KVM_SET_GUEST_DEBUG */ |
@@ -281,10 +298,6 @@ struct kvm_guest_debug_arch { | |||
281 | * Type denotes h/w breakpoint, read watchpoint, write | 298 | * Type denotes h/w breakpoint, read watchpoint, write |
282 | * watchpoint or watchpoint (both read and write). | 299 | * watchpoint or watchpoint (both read and write). |
283 | */ | 300 | */ |
284 | #define KVMPPC_DEBUG_NONE 0x0 | ||
285 | #define KVMPPC_DEBUG_BREAKPOINT (1UL << 1) | ||
286 | #define KVMPPC_DEBUG_WATCH_WRITE (1UL << 2) | ||
287 | #define KVMPPC_DEBUG_WATCH_READ (1UL << 3) | ||
288 | __u32 type; | 301 | __u32 type; |
289 | __u32 reserved; | 302 | __u32 reserved; |
290 | } bp[16]; | 303 | } bp[16]; |