Changeset 80657 in vbox for trunk/src/VBox/Devices/VirtIO
- Timestamp:
- Sep 9, 2019 7:14:32 AM (5 years ago)
- Location:
- trunk/src/VBox/Devices/VirtIO
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VirtIO/Virtio_1_0.cpp
r80647 r80657 64 64 const char *virtioQueueGetName(VIRTIOHANDLE hVirtio, uint16_t qIdx) 65 65 { 66 PVIRTIOSTATE pVirtio = (PVIRTIOSTATE)hVirtio;67 AssertMsgReturn(DRIVER_OK(pVirtio) && pVirtio->uQueueEnable[qIdx],68 ("Guest driver not in ready state.\n"), "<null>");69 70 66 return (const char *)((PVIRTIOSTATE)hVirtio)->virtqProxy[qIdx].szVirtqName; 71 67 } … … 93 89 } 94 90 95 96 91 /** 97 92 * See API comments in header file for description … … 102 97 return pVirtio->uDriverFeatures; 103 98 } 104 105 99 106 100 /** … … 227 221 PVIRTQ_DESC_CHAIN_T pDescChain = pVirtqProxy->pDescChain; 228 222 229 AssertMsgReturn(DRIVER_OK(pVirtio) && pVirtio->uQueueEnable[qIdx],223 AssertMsgReturn(DRIVER_OK(pVirtio) /*&& pVirtio->uQueueEnable[qIdx]*/, 230 224 ("Guest driver not in ready state.\n"), VERR_INVALID_STATE); 231 225 /** … … 451 445 for (uint16_t qIdx = 0; qIdx < pVirtio->uNumQueues; qIdx++) 452 446 virtioResetQueue(pVirtio, qIdx); 447 } 448 449 /** 450 * See API comments in header file for description 451 */ 452 bool virtioIsQueueEnabled(VIRTIOHANDLE hVirtio, uint16_t qIdx) 453 { 454 PVIRTIOSTATE pVirtio = (PVIRTIOSTATE)hVirtio; 455 return pVirtio->uQueueEnable[qIdx]; 456 } 457 458 /** 459 * See API comments in header file for description 460 */ 461 void virtioQueueEnable(VIRTIOHANDLE hVirtio, uint16_t qIdx, bool fEnabled) 462 { 463 PVIRTIOSTATE pVirtio = (PVIRTIOSTATE)hVirtio; 464 if (fEnabled) 465 pVirtio->uQueueSize[qIdx] = VIRTQ_MAX_SIZE; 466 else 467 pVirtio->uQueueSize[qIdx] = 0; 453 468 } 454 469 -
trunk/src/VBox/Devices/VirtIO/Virtio_1_0.h
r80639 r80657 265 265 266 266 /** 267 * Return queue enable state 268 * 269 * @param hVirtio - Handle for VirtIO framework 270 * @param qIdx - Queue number 271 * @param fEnabled - Flag indicating whether to enable queue or not 272 */ 273 bool virtioIsQueueEnabled(VIRTIOHANDLE hVirtio, uint16_t qIdx); 274 275 /** 276 * Enable or disable queue 277 * 278 * @param hVirtio - Handle for VirtIO framework 279 * @param qIdx - Queue number 280 * @param fEnabled - Flag indicating whether to enable queue or not 281 */ 282 void virtioQueueEnable(VIRTIOHANDLE hVirtio, uint16_t qIdx, bool fEnabled); 283 284 /** 267 285 * Request orderly teardown of VirtIO on host and guest 286 * @param hVirtio - Handle for VirtIO framework 287 * 268 288 */ 269 289 void virtioResetAll(VIRTIOHANDLE hVirtio); 290 291 270 292 271 293 /** CLIENT MUST CALL ON RELOCATE CALLBACK! */
Note:
See TracChangeset
for help on using the changeset viewer.