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) 2011, Kyle C. Hale <kh@u.norhtwestern.edu>
11 * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Kyle C. Hale <kh@u.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 #include <palacios/vmm.h>
21 #include <palacios/vm_guest.h>
22 #include <palacios/vmm_extensions.h>
26 static int init_swintr_intercept (struct v3_vm_info * vm, v3_cfg_tree_t * cfg, void ** priv_data);
32 static int deinit_swintr_intercept (struct v3_vm_info * vm, void * priv_data) {
38 static int init_swintr_intercept_core (struct guest_info * core, void * priv_data) {
44 static int deinit_swintr_intercept_core (struct guest_info * core, void * priv_data) {
50 static int swintr_entry (struct guest_info * core, void * priv_data) {
55 static int swintr_exit (struct guest_info * core, void * priv_data) {
62 static struct v3_extension_impl swintr_impl = {
63 .name = "swintr_intercept",
64 .init = init_swintr_intercept,
65 .deinit = deinit_swintr_intercept,
66 .core_init = init_swintr_intercept_core,
67 .core_deinit = deinit_swintr_intercept_core,
68 .on_entry = swintr_entry,
69 .on_exit = swintr_exit
72 register_extension(&swintr_impl);
75 int v3_handle_swintr (struct guest_info * core) {