X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_msr.h;h=0d2391a9b4e9835b59cbfe701e7f533a16d3687f;hb=5d1bbcc86de011e3f0d115b6f10fd8645cdf855e;hp=717d2ba7a9387fe01d8c934b5aed0b9053ca07c5;hpb=c3714b74821dffe63b2fdcf10d8fe614c5ac9bb1;p=palacios.git diff --git a/palacios/include/palacios/vmm_msr.h b/palacios/include/palacios/vmm_msr.h index 717d2ba..0d2391a 100644 --- a/palacios/include/palacios/vmm_msr.h +++ b/palacios/include/palacios/vmm_msr.h @@ -27,7 +27,7 @@ #include struct guest_info; - +struct v3_vm_info; struct v3_msr { @@ -45,10 +45,10 @@ struct v3_msr { typedef struct v3_msr v3_msr_t; struct v3_msr_hook { - uint_t msr; + uint32_t msr; - int (*read)(uint_t msr, struct v3_msr * dst, void * priv_data); - int (*write)(uint_t msr, struct v3_msr src, void * priv_data); + int (*read)(struct guest_info * core, uint32_t msr, struct v3_msr * dst, void * priv_data); + int (*write)(struct guest_info * core, uint32_t msr, struct v3_msr src, void * priv_data); void * priv_data; @@ -63,27 +63,28 @@ struct v3_msr_map { uint_t num_hooks; struct list_head hook_list; - int (*update_map)(struct guest_info * info, uint_t msr, int hook_read, int hook_write); + int (*update_map)(struct v3_vm_info * vm, uint32_t msr, int hook_read, int hook_write); void * arch_data; }; -void v3_init_msr_map(struct guest_info * info); +void v3_init_msr_map(struct v3_vm_info * vm); +int v3_deinit_msr_map(struct v3_vm_info * vm); -int v3_unhook_msr(struct guest_info * info, uint_t msr); +int v3_unhook_msr(struct v3_vm_info * vm, uint32_t msr); -int v3_hook_msr(struct guest_info * info, uint_t msr, - int (*read)(uint_t msr, struct v3_msr * dst, void * priv_data), - int (*write)(uint_t msr, struct v3_msr src, void * priv_data), +int v3_hook_msr(struct v3_vm_info * vm, uint32_t msr, + int (*read)(struct guest_info * core, uint32_t msr, struct v3_msr * dst, void * priv_data), + int (*write)(struct guest_info * core, uint32_t msr, struct v3_msr src, void * priv_data), void * priv_data); -struct v3_msr_hook * v3_get_msr_hook(struct guest_info * info, uint_t msr); +struct v3_msr_hook * v3_get_msr_hook(struct v3_vm_info * vm, uint32_t msr); -void v3_refresh_msr_map(struct guest_info * info); +void v3_refresh_msr_map(struct v3_vm_info * vm); -void v3_print_msr_map(struct guest_info * info); +void v3_print_msr_map(struct v3_vm_info * vm); int v3_handle_msr_write(struct guest_info * info);