@@ -421,10 +421,12 @@ static void vhost_set_memory(MemoryListener *listener,
return;
}
+#if 0
if (dev->started) {
r = vhost_verify_ring_mappings(dev, start_addr, size);
assert(r >= 0);
}
+#endif
if (!dev->log_enabled) {
r = ioctl(dev->control, VHOST_SET_MEM_TABLE, dev->mem);
--------------- 8 ---------------> seabios patch:
@@ -147,6 +147,9 @@ init_virtio_scsi(struct pci_device *pci)
goto fail;
}
+ vp_set_status(ioaddr, VIRTIO_CONFIG_S_ACKNOWLEDGE |
+ VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK);
+
int i, tot;
for (tot = 0, i = 0; i < 256; i++)
tot += virtio_scsi_scan_target(pci, ioaddr, vq, i);
@@ -154,8 +157,6 @@ init_virtio_scsi(struct pci_device *pci)
if (!tot)
goto fail;
- vp_set_status(ioaddr, VIRTIO_CONFIG_S_ACKNOWLEDGE |
- VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK);
return;
fail:
@@ -26,7 +26,7 @@ struct virtio_scsi_req_cmd {
u8 prio;
u8 crn;
char cdb[VIRTIO_SCSI_CDB_SIZE];
-};
+} __attribute__((packed));
/* This is the first element of the "in" scatter-gather list. */
struct virtio_scsi_resp_cmd {
@@ -36,7 +36,7 @@ struct virtio_scsi_resp_cmd {
u8 status;
u8 response;
u8 sense[VIRTIO_SCSI_SENSE_SIZE];
-};
+} __attribute__((packed));
#define VIRTIO_SCSI_S_OK 0