Changeset 71788 in vbox
- Timestamp:
- Apr 9, 2018 4:06:34 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 3 edited
-
Network/DevE1000.cpp (modified) (3 diffs)
-
Network/DevVirtioNet.cpp (modified) (6 diffs)
-
VirtIO/Virtio.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r71456 r71788 5880 5880 if (index != -1) 5881 5881 { 5882 RT_UNTRUSTED_VALIDATED_FENCE(); /* paranoia because of port I/O. */ 5882 5883 if (g_aE1kRegMap[index].readable) 5883 5884 { … … 5944 5945 if (RT_LIKELY(idxReg != -1)) 5945 5946 { 5947 RT_UNTRUSTED_VALIDATED_FENCE(); /* paranoia because of port I/O. */ 5946 5948 if (RT_UNLIKELY(g_aE1kRegMap[idxReg].readable)) 5947 5949 { … … 5990 5992 if (RT_LIKELY(index != -1)) 5991 5993 { 5994 RT_UNTRUSTED_VALIDATED_FENCE(); /* paranoia because of port I/O. */ 5992 5995 if (RT_LIKELY(g_aE1kRegMap[index].writable)) 5993 5996 { -
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r69500 r71788 515 515 STAM_COUNTER_INC(&pThis->StatRxOverflowWakeup); 516 516 Log(("%s Waking up Out-of-RX-space semaphore\n", INSTANCE(pThis))); 517 /** 518 * @todo r=bird: We can wake stuff up from ring-0 too, see vmsvga, nvme, 519 * buslogic, lsilogic, ata, ahci, xhci. Also, please address similar 520 * TODO in E1000. 521 * 522 * The API Is SUPSem*, btw. 523 */ 517 524 RTSemEventSignal(pThis->hEventMoreRxDescAvail); 518 525 } … … 587 594 PVNETSTATE pThis = (PVNETSTATE)pvState; 588 595 Log(("%s Driver became ready, waking up RX thread...\n", INSTANCE(pThis))); 596 /** 597 * @todo r=bird: We can wake stuff up from ring-0 too, see vmsvga, nvme, 598 * buslogic, lsilogic, ata, ahci, xhci. Also, please address similar 599 * TODO in E1000. 600 * 601 * The API Is SUPSem*, btw. 602 */ 589 603 #ifdef IN_RING3 590 604 vnetWakeupReceive(pThis->VPCI.CTX_SUFF(pDevIns)); … … 1288 1302 vpciSetWriteLed(&pThis->VPCI, true); 1289 1303 1290 VQUEUEELEM elem;1291 1304 /* 1292 1305 * Do not remove descriptors from available ring yet, try to allocate the 1293 1306 * buffer first. 1294 1307 */ 1308 VQUEUEELEM elem; /* This bugger is big! ~48KB on 64-bit hosts. */ 1295 1309 while (vqueuePeek(&pThis->VPCI, pQueue, &elem)) 1296 1310 { … … 1993 2007 static DECLCALLBACK(int) vnetDestruct(PPDMDEVINS pDevIns) 1994 2008 { 2009 PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns); 1995 2010 PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE); 1996 PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);1997 2011 1998 2012 LogRel(("TxTimer stats (avg/min/max): %7d usec %7d usec %7d usec\n", … … 2018 2032 static DECLCALLBACK(int) vnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg) 2019 2033 { 2034 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns); 2020 2035 PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE); 2021 2036 int rc; 2022 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);2023 2037 2024 2038 /* Initialize the instance data suffiencently for the destructor not to blow up. */ … … 2044 2058 */ 2045 2059 if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "LineSpeed\0" "LinkUpDelay\0")) 2046 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 2047 N_("Invalid configuration for VirtioNet device")); 2060 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, N_("Invalid configuration for VirtioNet device")); 2048 2061 2049 2062 /* Get config params */ -
trunk/src/VBox/Devices/VirtIO/Virtio.cpp
r71112 r71788 165 165 break; 166 166 } 167 RT_UNTRUSTED_VALIDATED_FENCE(); 167 168 168 169 vringReadDesc(pState, &pQueue->VRing, idx, &desc); … … 551 552 u32 &= 0xFFFF; 552 553 if (u32 < pState->nQueues) 554 { 555 RT_UNTRUSTED_VALIDATED_FENCE(); 553 556 if (pState->Queues[u32].VRing.addrDescriptors) 554 557 { … … 563 566 Log(("%s The queue (#%d) being notified has not been initialized.\n", 564 567 INSTANCE(pState), u32)); 568 } 565 569 else 566 570 Log(("%s Invalid queue number (%d)\n", INSTANCE(pState), u32)); … … 799 803 else 800 804 pState->nQueues = nQueues; 805 AssertLogRelMsgReturn(pState->nQueues <= VIRTIO_MAX_NQUEUES, ("%#x\n", pState->nQueues), VERR_SSM_LOAD_CONFIG_MISMATCH); 806 AssertLogRelMsgReturn(pState->uQueueSelector < pState->nQueues || (pState->nQueues == 0 && pState->uQueueSelector), 807 ("uQueueSelector=%u nQueues=%u\n", pState->uQueueSelector, pState->nQueues), 808 VERR_SSM_LOAD_CONFIG_MISMATCH); 809 801 810 for (unsigned i = 0; i < pState->nQueues; i++) 802 811 { … … 1010 1019 1011 1020 #endif /* VBOX_DEVICE_STRUCT_TESTCASE */ 1021
Note:
See TracChangeset
for help on using the changeset viewer.

