Changeset 85045 in vbox
- Timestamp:
- Jul 3, 2020 7:07:42 AM (4 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp
r85016 r85045 2859 2859 PVIRTIONETVIRTQ pVirtq = &pThis->aVirtqs[uVirtqNbr]; 2860 2860 pVirtq->idx = uVirtqNbr; 2861 (void) virtioCore VirtqAttach(&pThis->Virtio, pVirtq->idx, pVirtq->szName);2861 (void) virtioCoreR3VirtqAttach(&pThis->Virtio, pVirtq->idx, pVirtq->szName); 2862 2862 pVirtq->fAttachedToVirtioCore = true; 2863 2863 if (IS_VIRTQ_EMPTY(pThisCC->pDevIns, &pThis->Virtio, pVirtq->idx)) -
trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp
r85025 r85045 2473 2473 for (uint16_t uVirtqNbr = 0; uVirtqNbr < VIRTIOSCSI_VIRTQ_CNT; uVirtqNbr++) 2474 2474 { 2475 rc = virtioCore VirtqAttach(&pThis->Virtio, uVirtqNbr, VIRTQNAME(uVirtqNbr));2475 rc = virtioCoreR3VirtqAttach(&pThis->Virtio, uVirtqNbr, VIRTQNAME(uVirtqNbr)); 2476 2476 if (RT_FAILURE(rc)) 2477 2477 continue; -
trunk/src/VBox/Devices/VirtIO/VirtioCore.cpp
r85025 r85045 296 296 * @param pDevIns The device instance. 297 297 * @param pVirtio Pointer to the shared virtio state. 298 * @param uVirtqNbr 298 * @param uVirtqNbr Virtq number 299 299 * 300 300 * @returns how many entries have been added to ring as a delta of the consumer's … … 657 657 } 658 658 659 int virtioCoreVirtqAttach(PVIRTIOCORE pVirtio, uint16_t uVirtqNbr, const char *pcszName) 659 #ifdef IN_RING3 660 661 int virtioCoreR3VirtqAttach(PVIRTIOCORE pVirtio, uint16_t uVirtqNbr, const char *pcszName) 660 662 { 661 663 LogFunc(("%s\n", pcszName)); … … 668 670 return VINF_SUCCESS; 669 671 } 670 671 #ifdef IN_RING3672 672 673 673 /** API Fuunction: See header file */ … … 749 749 } 750 750 751 752 751 /** API Function: See header file */ 753 752 int virtioCoreR3VirtqAvailBufGet(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, uint16_t uVirtqNbr, … … 1098 1097 } 1099 1098 1100 1101 1099 /** 1100 * This is called from the MMIO callback code when the guest does an MMIO access to the 1101 * mapped queue notification capability area corresponding to a particular queue, to notify 1102 * the queue handler of available data in the avail ring of the queue (VirtIO 1.0, 4.1.4.4.1) 1103 * 1104 * @param pDevIns The device instance. 1105 * @param pVirtio Pointer to the shared virtio state. 1106 * @param uVirtqNbr Virtq to check for guest interrupt handling preference 1107 * @param uNotifyIdx Notification index 1102 1108 */ 1103 1109 static void virtioCoreVirtqNotified(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, uint16_t uVirtqNbr, uint16_t uNotifyIdx) 1104 1110 { 1105 1106 1111 PVIRTIOCORECC pVirtioCC = PDMDEVINS_2_DATA_CC(pDevIns, PVIRTIOCORECC); 1107 1112 … … 1133 1138 * @param pDevIns The device instance. 1134 1139 * @param pVirtio Pointer to the shared virtio state. 1135 * @param uVirtqNbr 1140 * @param uVirtqNbr Virtq to check for guest interrupt handling preference 1136 1141 */ 1137 1142 static void virtioCoreNotifyGuestDriver(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, uint16_t uVirtqNbr) 1138 1143 { 1139 1140 1144 Assert(uVirtqNbr < RT_ELEMENTS(pVirtio->aVirtqState)); 1141 1145 PVIRTQSTATE pVirtqState = &pVirtio->aVirtqState[uVirtqNbr]; … … 1265 1269 /** 1266 1270 * Invoked by this implementation when guest driver resets the device. 1267 * The driver itself will not 1271 * The driver itself will not until the device has read the status change. 1268 1272 */ 1269 1273 static void virtioGuestR3WasReset(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, PVIRTIOCORECC pVirtioCC) … … 1304 1308 VIRTIO_DEV_CONFIG_LOG_ACCESS(uDeviceFeatures, VIRTIO_PCI_COMMON_CFG_T, uOffsetOfAccess); 1305 1309 LogFunc(("... WARNING: Guest attempted to write readonly virtio_pci_common_cfg.device_feature (ignoring)\n")); 1306 // return VINF_SUCCESS; 1307 return VINF_IOM_MMIO_UNUSED_00; /** @todo which is right this or VINF_SUCCESS? */ 1310 return VINF_IOM_MMIO_UNUSED_00; 1308 1311 } 1309 1312 else /* Guest READ pCommonCfg->uDeviceFeatures */ … … 1790 1793 } 1791 1794 1792 1793 1795 /********************************************************************************************************************************* 1794 1796 * Device Level * … … 2015 2017 if (pVirtioCC->pbDevSpecificCfg) 2016 2018 { 2017 /* Following capability (via VirtIO 1.0, section 4.1.4.6). Client defines the 2018 * device-specific config fields struct and passes size to this constructor */ 2019 /* Device specific config capability (via VirtIO 1.0, section 4.1.4.6). 2020 * Client defines the device-specific config struct and passes size to virtioCoreR3Init() 2021 * to inform this. */ 2019 2022 pCfg = (PVIRTIO_PCI_CAP_T)&pPciDev->abConfig[pCfg->uCapNext]; 2020 2023 pCfg->uCfgType = VIRTIO_PCI_CAP_DEVICE_CFG; -
trunk/src/VBox/Devices/VirtIO/VirtioCore.h
r85032 r85045 424 424 * @returns VBox status code. 425 425 */ 426 int virtioCore VirtqAttach(PVIRTIOCORE pVirtio, uint16_t uVirtqNbr, const char *pcszName);426 int virtioCoreR3VirtqAttach(PVIRTIOCORE pVirtio, uint16_t uVirtqNbr, const char *pcszName); 427 427 428 428 /**
Note:
See TracChangeset
for help on using the changeset viewer.