Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


added device checkpoint hooks
[palacios.git] / palacios / include / palacios / vmm_symspy.h
1 /* 
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.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
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.
13  *
14  * Author: Jack Lange <jarusl@cs.northwestern.edu>
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20 #ifndef __VMM_SYMSPY_H__
21 #define __VMM_SYMSPY_H__
22
23 #ifdef __V3VEE__
24
25 #include <palacios/vmm.h>
26
27
28
29 struct v3_symspy_global_page {
30     uint64_t magic;
31
32     union {
33         uint32_t feature_flags;
34         struct {
35             uint8_t pci_map_valid      : 1;
36             uint8_t symmod_enabled     : 1;
37             uint8_t sec_symmod_enabled : 1;
38         } __attribute__((packed));
39     } __attribute__((packed));
40     
41     uint8_t pci_pt_map[(4 * 256) / 8]; // we're hardcoding this: (4 busses, 256 max devs)
42
43 } __attribute__((packed));
44
45 struct v3_symspy_local_page {
46     uint64_t magic;
47
48     union { 
49         uint32_t symcall_flags;
50         struct {
51             uint32_t sym_call_active        : 1;
52             uint32_t sym_call_enabled       : 1;
53         } __attribute__((packed));
54     } __attribute__((packed));
55 } __attribute__((packed));
56
57
58
59 struct v3_symspy_global_state {
60     struct v3_symspy_global_page * sym_page;
61
62     addr_t global_page_pa;
63     uint64_t global_guest_pa;
64
65     int active; // activated when symbiotic page MSR is written
66 };
67
68
69 struct v3_symspy_local_state {
70     struct v3_symspy_local_page * local_page;
71
72     addr_t local_page_pa;
73     uint64_t local_guest_pa;
74
75     int active;  // activated when symbiotic page MSR is written
76 };
77
78
79
80
81 int v3_init_symspy_vm(struct v3_vm_info * vm, struct v3_symspy_global_state * state);
82 int v3_init_symspy_core(struct guest_info * core, struct v3_symspy_local_state * state);
83
84
85
86 int v3_sym_map_pci_passthrough(struct v3_vm_info * vm, uint_t bus, uint_t dev, uint_t fn);
87 int v3_sym_unmap_pci_passthrough(struct v3_vm_info * vm, uint_t bus, uint_t dev, uint_t fn);
88
89
90
91
92 struct v3_symspy_global_page * v3_sym_get_symspy_vm(struct v3_vm_info * vm);
93 struct v3_symspy_local_page * v3_sym_get_symspy_core(struct guest_info * core);
94
95 #endif
96
97 #endif