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.


add backend device for direct host network bridge
[palacios.git] / palacios / src / devices / 8259a.c
index 498ab76..6a74e8e 100644 (file)
@@ -464,7 +464,11 @@ static int write_master_port1(struct guest_info * core, ushort_t port, void * sr
                     }
                 }      
                 PrintDebug("8259 PIC: Post ISR = %x (wr_Master1)\n", state->master_isr);
-            } else {
+            } else if (!(cw2->EOI) && (cw2->R) && (cw2->SL)) {
+                PrintDebug("8259 PIC: Ignoring set-priority, priorities not implemented (level=%d, wr_Master1)\n", cw2->level);
+            } else if (!(cw2->EOI) && !(cw2->R) && (cw2->SL)) {
+                PrintDebug("8259 PIC: Ignoring no-op (level=%d, wr_Master1)\n", cw2->level);
+           } else {
                 PrintError("8259 PIC: Command not handled, or in error (wr_Master1)\n");
                 return -1;
             }
@@ -746,7 +750,7 @@ static struct v3_device_ops dev_ops = {
 static int pic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     struct pic_internal * state = NULL;
     state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal));
-    char * name = v3_cfg_val(cfg, "name");
+    char * dev_id = v3_cfg_val(cfg, "ID");
 
     // PIC is only usable in non-multicore environments
     // just hardcode the core context
@@ -754,10 +758,10 @@ static int pic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
 
     V3_ASSERT(state != NULL);
 
-    struct vm_device * dev = v3_allocate_device(name, &dev_ops, state);
+    struct vm_device * dev = v3_allocate_device(dev_id, &dev_ops, state);
 
     if (v3_attach_device(vm, dev) == -1) {
-       PrintError("Could not attach device %s\n", name);
+       PrintError("Could not attach device %s\n", dev_id);
        return -1;
     }