| 1 |
/* |
| 2 |
* PV event decoding. |
| 3 |
* |
| 4 |
* Copyright (C) 2012 Citrix Systems R&D Ltd. |
| 5 |
* |
| 6 |
* This program is free software; you can redistribute it and/or modify it |
| 7 |
* under the terms and conditions of the GNU General Public License, |
| 8 |
* version 2, as published by the Free Software Foundation. |
| 9 |
*/ |
| 10 |
#ifndef __PV_H |
| 11 |
|
| 12 |
#include "analyze.h" |
| 13 |
#include <xen/trace.h> |
| 14 |
|
| 15 |
#ifdef __cplusplus |
| 16 |
extern "C" { |
| 17 |
#endif |
| 18 |
|
| 19 |
#define ARG_MISSING 0x0 |
| 20 |
#define ARG_32BIT 0x1 |
| 21 |
#define ARG_64BIT 0x2 |
| 22 |
|
| 23 |
#define MMU_UPDATE_PREEMPTED (~(~0U>>1)) |
| 24 |
|
| 25 |
static inline uint32_t pv_hypercall_op(const struct record_info *ri) |
| 26 |
{ |
| 27 |
return ri->d[0] & ~TRC_PV_HYPERCALL_V2_ARG_MASK; |
| 28 |
} |
| 29 |
|
| 30 |
static inline int pv_hypercall_arg_present(const struct record_info *ri, int arg) |
| 31 |
{ |
| 32 |
return (ri->d[0] >> (20 + 2*arg)) & 0x3; |
| 33 |
} |
| 34 |
|
| 35 |
void pv_hypercall_gather_args(const struct record_info *ri, uint64_t *args); |
| 36 |
|
| 37 |
#ifdef __cplusplus |
| 38 |
} /* extern "C" */ |
| 39 |
#endif |
| 40 |
|
| 41 |
#endif |