struct vm_device * dev = v3_create_device("DMA", &dev_ops, dma);
- return dma;
+ return dev;
}
ret |= v3_dev_hook_io(dev, 0x0cfc + i, &io_read, &io_write);
}
- /*
if (ret != 0) {
PrintError(vm, VCORE_NONE, "Error hooking i440FX io ports\n");
- v3_remove_device(dev);
- return -1;
+ //v3_remove_device(dev);
+ //return -1;
}
- */
for (i = 0; i < 6; i++) {
bars[i].type = PCI_BAR_NONE;
cmd_ret = v3_write_gpa_memory(core, prd_entry.base_addr + prd_offset,
bytes_to_write, drive->data_buf);
- // check cmd_ret
+ if (cmd_ret!=bytes_to_write) {
+ PrintError(core->vm_info, core, "Failed to write data to memory\n");
+ return -1;
+ }
+
bytes_to_write = 0;
struct vm_device * pci_bus;
struct pci_device * pci_dev;
- struct virtio_queue queue[1];
+ struct virtio_queue queue[2];
struct virtio_queue * cur_queue;
uint32_t header, val;
uint8_t bcast_addr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+ header = 0;
+
if (regs->rcr & AcceptAllPhys) {
PrintDebug(VM_NONE, VCORE_NONE, "RTL8139: packet received in promiscuous mode\n");
} else {
return true;
}
else{
- PrintError(core->info->vm_info, core->info,"EDF Sched. delete_core_edf.Attempted to erase unexisting core");
+ PrintError(VM_NONE,VCORE_NONE,"EDF Sched. delete_core_edf.Attempted to erase unexisting core");
return false;
}
}
v3_lock_deinit(&(tm->addr_ctxt_lock));
v3_lock_deinit(&(tm->access_type_lock));
- if (tm) {
- V3_Free(tm);
- }
+ V3_Free(tm);
return 0;
}