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.


updated virtio block device to partially handle non-aligned IO requests
[palacios.git] / palacios / include / devices / lnx_virtio_pci.h
index c0f2295..f0c5e3d 100644 (file)
 #define VIRTIO_CONSOLE_DEV_ID     0x1003
 #define VIRTIO_SYMBIOTIC_DEV_ID   0x100a
 #define VIRTIO_SYMMOD_DEV_ID      0x100b
-#define VIRTIO_VNET_CTRL_DEV_ID   0x100c
+#define VIRTIO_VNET_DEV_ID        0x100c
 
 #define VIRTIO_NET_SUBDEVICE_ID 1
 #define VIRTIO_BLOCK_SUBDEVICE_ID 2
+#define VIRTIO_CONSOLE_SUBDEVICE_ID 3
 #define VIRTIO_BALLOON_SUBDEVICE_ID 5
 #define VIRTIO_SYMBIOTIC_SUBDEVICE_ID 10
 #define VIRTIO_SYMMOD_SUBDEVICE_ID 11
-#define VIRTIO_VNET_CTRL_SUBDEVICE_ID 12
+#define VIRTIO_VNET_SUBDEVICE_ID 12
+
 
 #define HOST_FEATURES_PORT 0
 #define GUEST_FEATURES_PORT 4
  * 
  */
 struct virtio_config {
-    uint32_t host_features;
-    uint32_t guest_features;
-    uint32_t vring_page_num;
-    uint16_t vring_ring_size;
-    uint16_t vring_queue_selector;
-    uint16_t vring_queue_notifier;
-    uint8_t status;
-    uint8_t pci_isr;
+    union {
+       uint8_t buf[20];
+       struct {
+           uint32_t host_features;
+           uint32_t guest_features;
+           uint32_t vring_page_num;
+           uint16_t vring_ring_size;
+           uint16_t vring_queue_selector;
+           uint16_t vring_queue_notifier;
+           uint8_t status;
+           uint8_t pci_isr;
+       } __attribute__((packed));
+    } __attribute__((packed));
 } __attribute__((packed));
 
 
@@ -136,9 +143,6 @@ struct virtio_queue {
     addr_t ring_avail_addr;
     addr_t ring_used_addr;
   
-    uint16_t last_avail_idx;
-    int idx_overflow;
-
     struct vring_desc * desc; // We can treat this as an array...
     struct vring_avail * avail;
     struct vring_used * used;