Changeset 80308 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Aug 15, 2019 7:48:27 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132766
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp
r80306 r80308 83 83 * of req queues is variable and determined by virtio_scsi_config.num_queues. See VirtIO 1.0 spec section 5.6.4 84 84 */ 85 #define VIRTIOSCSI_ VIRTQ_CONTROLQ0 /* Index of control queue */86 #define VIRTIOSCSI_ VIRTQ_EVENTQ1 /* Index of event queue */85 #define VIRTIOSCSI_CONTROLQ_IDX 0 /* Index of control queue */ 86 #define VIRTIOSCSI_EVENTQ_IDX 1 /* Index of event queue */ 87 87 #define VIRTIOSCSI_VIRTQ_REQ_BASE 2 /* Base index of req queues */ 88 88 89 #define REQ_NBR_TO_QIDX(uReqQueueNum) (VIRTIOSCSI_VIRTQ_REQ_BASE + uReqQueueNum) 90 #define REQ_QIDX_TO_NBR(qIdx) (qIdx - VIRTIOSCSI_VIRTQ_REQ_BASE) 89 91 /** 90 92 * The following struct is the VirtIO SCSI Host Device device-specific configuration described in section 5.6.4 … … 539 541 540 542 541 /**542 * Get this callback from the virtio framework when the driver is ready so we know543 * the request for the number of queues is valid (for now presuming the driver(s) aren't544 * dynamically adding req queues but create them all while initializing545 * based on config information on host).546 */547 543 static DECLCALLBACK(void) virtioScsiStatusChanged(VIRTIOHANDLE hVirtio, bool fVirtioReady) 548 544 { … … 553 549 { 554 550 Log2Func(("VirtIO reports ready... Initializing queues\n")); 555 virtioQueueAttach(hVirtio, VIRTIOSCSI_ VIRTQ_CONTROLQ, "controlq");556 virtioQueueAttach(hVirtio, VIRTIOSCSI_ VIRTQ_EVENTQ, "eventq");551 virtioQueueAttach(hVirtio, VIRTIOSCSI_CONTROLQ_IDX, "controlq"); 552 virtioQueueAttach(hVirtio, VIRTIOSCSI_EVENTQ_IDX, "eventq"); 557 553 for (uint16_t qIdx = VIRTIOSCSI_VIRTQ_REQ_BASE; 558 554 qIdx < VIRTIOSCSI_VIRTQ_REQ_BASE + VIRTIOSCSI_REQ_QUEUE_CNT;
Note:
See TracChangeset
for help on using the changeset viewer.