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".
20 #ifndef __VMM_SYMSPY_H__
21 #define __VMM_SYMSPY_H__
25 #include <palacios/vmm.h>
29 struct v3_symspy_global_page {
33 uint32_t feature_flags;
35 uint_t pci_map_valid : 1;
36 } __attribute__((packed));
37 } __attribute__((packed));
39 uint8_t pci_pt_map[(4 * 256) / 8]; // we're hardcoding this: (4 busses, 256 max devs)
41 } __attribute__((packed));
43 struct v3_symspy_local_page {
47 uint32_t symcall_flags;
49 uint32_t sym_call_active : 1;
50 uint32_t sym_call_enabled : 1;
51 } __attribute__((packed));
52 } __attribute__((packed));
53 } __attribute__((packed));
57 struct v3_symspy_global_state {
58 struct v3_symspy_global_page * sym_page;
60 addr_t global_page_pa;
61 uint64_t global_guest_pa;
63 int active; // activated when symbiotic page MSR is written
67 struct v3_symspy_local_state {
68 struct v3_symspy_local_page * local_page;
71 uint64_t local_guest_pa;
73 int active; // activated when symbiotic page MSR is written
79 int v3_init_symspy_vm(struct v3_vm_info * vm, struct v3_symspy_global_state * state);
80 int v3_init_symspy_core(struct guest_info * core, struct v3_symspy_local_state * state);
84 int v3_sym_map_pci_passthrough(struct v3_vm_info * vm, uint_t bus, uint_t dev, uint_t fn);
85 int v3_sym_unmap_pci_passthrough(struct v3_vm_info * vm, uint_t bus, uint_t dev, uint_t fn);