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".
26 #include <palacios/vmm_types.h>
27 #include <palacios/vmm_list.h>
40 } __attribute__((packed));
41 } __attribute__((packed));
42 } __attribute__((packed));
45 typedef struct v3_msr v3_msr_t;
50 int (*read)(struct guest_info * core, uint32_t msr, struct v3_msr * dst, void * priv_data);
51 int (*write)(struct guest_info * core, uint32_t msr, struct v3_msr src, void * priv_data);
55 struct list_head link;
64 struct list_head hook_list;
66 int (*update_map)(struct v3_vm_info * vm, uint32_t msr, int hook_read, int hook_write);
72 void v3_init_msr_map(struct v3_vm_info * vm);
73 int v3_deinit_msr_map(struct v3_vm_info * vm);
75 int v3_unhook_msr(struct v3_vm_info * vm, uint32_t msr);
77 int v3_hook_msr(struct v3_vm_info * vm, uint32_t msr,
78 int (*read)(struct guest_info * core, uint32_t msr, struct v3_msr * dst, void * priv_data),
79 int (*write)(struct guest_info * core, uint32_t msr, struct v3_msr src, void * priv_data),
83 struct v3_msr_hook * v3_get_msr_hook(struct v3_vm_info * vm, uint32_t msr);
85 void v3_refresh_msr_map(struct v3_vm_info * vm);
87 void v3_print_msr_map(struct v3_vm_info * vm);
89 int v3_handle_msr_write(struct guest_info * info);
91 int v3_handle_msr_read(struct guest_info * info);