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