Changeset 88827 in vbox for trunk/src/VBox/Devices
- Timestamp:
- May 3, 2021 11:46:01 AM (4 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp
r85415 r88827 12 12 13 13 /* 14 * Copyright (C) 2006-202 0Oracle Corporation14 * Copyright (C) 2006-2021 Oracle Corporation 15 15 * 16 16 * This file is part of VirtualBox Open Source Edition (OSE), as … … 84 84 #define VIRTIOSCSI_VIRTQ_CNT (VIRTIOSCSI_REQ_VIRTQ_CNT + 2) 85 85 #define VIRTIOSCSI_MAX_TARGETS 256 /**< T.B.D. Figure out a a good value for this. */ 86 #define VIRTIOSCSI_MAX_LUN 256/**< VirtIO specification, section 5.6.4 */86 #define VIRTIOSCSI_MAX_LUN 1 /**< VirtIO specification, section 5.6.4 */ 87 87 #define VIRTIOSCSI_MAX_COMMANDS_PER_LUN 128 /**< T.B.D. What is a good value for this? */ 88 88 #define VIRTIOSCSI_MAX_SEG_COUNT 126 /**< T.B.D. What is a good value for this? */ … … 1270 1270 } 1271 1271 1272 #if 0 1272 1273 if (RT_LIKELY(!cbDataIn || !cbDataOut || pThis->fHasInOutBufs)) /* VirtIO 1.0, 5.6.6.1.1 */ 1273 1274 { /* likely */ } … … 1280 1281 VIRTIOSCSI_S_FAILURE, abSense, sizeof(abSense), cbSenseCfg); 1281 1282 } 1282 1283 #endif 1283 1284 /* 1284 1285 * Have underlying driver allocate a req of size set during initialization of this device. … … 1710 1711 for (unsigned i = 0; i < VIRTIOSCSI_VIRTQ_CNT; i++) 1711 1712 pThis->afVirtqAttached[i] = false; 1712 } 1713 1714 /* 1715 * BIOS may change these values. When the OS comes up, and KVM driver accessed 1716 * through the Windows, assumes they are the default size. So as per the VirtIO 1.0 spec, 1717 * 5.6.4, these device configuration values must be set to default upon device reset. 1718 */ 1719 pThis->virtioScsiConfig.uSenseSize = VIRTIOSCSI_SENSE_SIZE_DEFAULT; 1720 pThis->virtioScsiConfig.uCdbSize = VIRTIOSCSI_CDB_SIZE_DEFAULT; 1721 } 1722 1723 1713 1724 } 1714 1725 -
trunk/src/VBox/Devices/VirtIO/VirtioCore.cpp
r85819 r88827 974 974 static void virtioCoreVirtqNotified(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, uint16_t uVirtq, uint16_t uNotifyIdx) 975 975 { 976 PVIRTIOCORECC pVirtioCC = PDMDEVINS_2_DATA_CC(pDevIns, PVIRTIOCORECC); 976 PVIRTIOCORECC pVirtioCC = PDMINS_2_DATA_CC(pDevIns, PVIRTIOCORECC); 977 977 978 978 979 /* See VirtIO 1.0, section 4.1.5.2 It implies that uVirtq and uNotifyIdx should match. … … 1408 1409 return virtioCommonCfgAccessed(pDevIns, pVirtio, pVirtioCC, false /* fWrite */, uOffset, cb, pv); 1409 1410 1410 if (MATCHES_VIRTIO_CAP_STRUCT(off, cb, uOffset, pVirtio->LocIsrCap) && cb == sizeof(uint8_t))1411 if (MATCHES_VIRTIO_CAP_STRUCT(off, cb, uOffset, pVirtio->LocIsrCap)) 1411 1412 { 1412 1413 *(uint8_t *)pv = pVirtio->uISR; 1413 1414 Log6Func(("Read and clear ISR\n")); 1414 pVirtio->uISR = 0; /* VirtIO spec ificationrequires reads of ISR to clear it */1415 pVirtio->uISR = 0; /* VirtIO spec requires reads of ISR to clear it */ 1415 1416 virtioLowerInterrupt(pDevIns, 0); 1416 1417 return VINF_SUCCESS; 1417 1418 } 1418 1419 1419 ASSERT_GUEST_MSG_FAILED(("Bad read access to mapped capabilities region: off=%RGp cb=%u\n" , off, cb));1420 ASSERT_GUEST_MSG_FAILED(("Bad read access to mapped capabilities region: off=%RGp cb=%u\n")); 1420 1421 return VINF_IOM_MMIO_UNUSED_00; 1421 1422 } … … 1500 1501 1501 1502 if ( (uLength != 1 && uLength != 2 && uLength != 4) 1502 || cb != uLength1503 1503 || pPciCap->uBar != VIRTIO_REGION_PCI_CAP) 1504 1504 {
Note:
See TracChangeset
for help on using the changeset viewer.