2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
21 #ifndef __VMM_INSPECTOR_H__
22 #define __VMM_INSPECTOR_H__
24 #include <palacios/vmm.h>
26 typedef void v3_inspect_node_t;
30 #include <palacios/vmm_multitree.h>
35 #define SERIALIZABLE 1
39 struct v3_inspector_state {
40 struct v3_mtree state_tree;
46 int v3_init_inspector(struct v3_vm_info * vm);
47 int v3_init_inspector_core(struct guest_info * core);
50 int v3_inspect_8(v3_inspect_node_t * node, char * name, uint8_t * val);
51 int v3_inspect_16(v3_inspect_node_t * node, char * name, uint16_t * val);
52 int v3_inspect_32(v3_inspect_node_t * node, char * name, uint32_t * val);
53 int v3_inspect_64(v3_inspect_node_t * node, char * name, uint64_t * val);
54 int v3_inspect_addr(v3_inspect_node_t * node, char * name, addr_t * val);
55 int v3_inspect_buf(v3_inspect_node_t * node, char * name, uint8_t * buf, uint64_t size);
57 v3_inspect_node_t * v3_inspect_add_subtree(v3_inspect_node_t * root, char * name);
66 struct v3_inspection_value {
68 unsigned char * value;
69 unsigned long long size; // Size of 0 means this is a subtree root
76 int v3_find_inspection_value(v3_inspect_node_t * node, char * name,
77 struct v3_inspection_value * value);
79 struct v3_inspection_value v3_inspection_value(v3_inspect_node_t * node);
83 v3_inspect_node_t * v3_get_inspection_root(struct v3_vm_info * vm);
84 v3_inspect_node_t * v3_get_inspection_subtree(v3_inspect_node_t * root, char * name);
86 v3_inspect_node_t * v3_inspection_node_next(v3_inspect_node_t * node);
87 v3_inspect_node_t * v3_inspection_first_child(v3_inspect_node_t * root);