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.


Updated vnc server to correspond to new mouse events
[palacios.git] / linux_usr / v3_guest_mem.h
1 #ifndef _V3_GUEST_MEM_
2 #define _V3_GUEST_MEM_
3
4 #include <stdint.h>
5 #include "v3_ctrl.h"
6
7 struct v3_guest_mem_block {
8   void     *gpa;      // guest physical address is
9   void     *hpa;      // mapped to this host physical address
10   void     *uva;      // which is mapped here in this process
11   uint64_t numpages;  // this many 4K pages
12 };
13
14 // Whole memory map of guest's physical memory
15 // that is backed by host physical memory (ie, everything we 
16 // can read or write from the host user space)
17 struct v3_guest_mem_map {
18   int      fd;              // used by mmap
19   uint64_t numblocks;
20   struct v3_guest_mem_block block[0];
21 };
22
23 // This function gets the basic memory map, but does not map it
24 struct v3_guest_mem_map * v3_guest_mem_get_map(char *vmdev);
25 // This function mmaps it into the guest address space
26 // and fills out the "myaddr" fields
27 int v3_map_guest_mem(struct v3_guest_mem_map *map);
28 // This function unmaps it - it assumes myaddrs are valid
29 int v3_unmap_guest_mem(struct v3_guest_mem_map *map);
30
31
32 #endif
33