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.


only handle events after machine has been started, this avoids sending an event to...
Jack Lange [Fri, 22 May 2009 17:16:01 +0000 (12:16 -0500)]
palacios/src/palacios/vmm_host_events.c

index 58ac6ea..90eb032 100644 (file)
@@ -70,6 +70,10 @@ int v3_deliver_keyboard_event(struct guest_info * info,
     struct v3_host_events * host_evts = &(info->host_event_hooks);
     struct v3_host_event_hook * hook = NULL;
 
+    if (info->run_state != VM_RUNNING) {
+       return -1;
+    }
+
     list_for_each_entry(hook, &(host_evts->keyboard_events), link) {
        if (hook->cb.keyboard_handler(info, evt, hook->private_data) == -1) {
            return -1;
@@ -85,6 +89,10 @@ int v3_deliver_mouse_event(struct guest_info * info,
     struct v3_host_events * host_evts = &(info->host_event_hooks);
     struct v3_host_event_hook * hook = NULL;
 
+    if (info->run_state != VM_RUNNING) {
+       return -1;
+    }
+
     list_for_each_entry(hook, &(host_evts->mouse_events), link) {
        if (hook->cb.mouse_handler(info, evt, hook->private_data) == -1) {
            return -1;
@@ -100,6 +108,10 @@ int v3_deliver_timer_event(struct guest_info * info,
     struct v3_host_events * host_evts = &(info->host_event_hooks);
     struct v3_host_event_hook * hook = NULL;
 
+    if (info->run_state != VM_RUNNING) {
+       return -1;
+    }
+
     list_for_each_entry(hook, &(host_evts->timer_events), link) {
        if (hook->cb.timer_handler(info, evt, hook->private_data) == -1) {
            return -1;