Changeset 80499 in vbox for trunk/src/VBox/Devices/VirtIO
- Timestamp:
- Aug 29, 2019 2:47:17 PM (5 years ago)
- Location:
- trunk/src/VBox/Devices/VirtIO
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VirtIO/Virtio_1_0.cpp
r80437 r80499 1 1 /* $Id$ */ 2 2 /** @file 3 * Virtio_1_0 - Virtio Common Functions (VirtQ, virtqueue, Virtio PCI)3 * Virtio_1_0 - Virtio Common (PCI, feature & config mgt, queue mgt & proxy, notification mgt) 4 4 */ 5 5 … … 259 259 RTSgBufInit(&pVirtqProxy->outSgBuf,(PCRTSGSEG)&pDescChain->aSegsOut, pDescChain->cSegsOut); 260 260 261 *ppInSegs = &pVirtqProxy->inSgBuf; 262 *ppOutSegs = &pVirtqProxy->outSgBuf; 261 if (ppInSegs) 262 *ppInSegs = &pVirtqProxy->inSgBuf; 263 if (ppOutSegs) 264 *ppOutSegs = &pVirtqProxy->outSgBuf; 263 265 264 266 Log2Func(("%s -- segs out: %u, segs in: %u --\n", … … 362 364 Log2Func(("%s\n", pVirtqProxy->szVirtqName)); 363 365 366 364 367 /** Inform client */ 365 368 pVirtio->virtioCallbacks.pfnVirtioQueueNotified((VIRTIOHANDLE)pVirtio, pVirtio->pClientContext, qIdx); … … 472 475 pVirtQ->uAvailIdx = 0; 473 476 pVirtQ->uUsedIdx = 0; 477 pVirtio->uQueueEnable[qIdx] = false; 474 478 pVirtio->uQueueSize[qIdx] = VIRTQ_MAX_SIZE; 475 479 pVirtio->uQueueNotifyOff[qIdx] = qIdx; 476 480 } 481 477 482 478 483 static void virtioResetDevice(PVIRTIOSTATE pVirtio) … … 519 524 static void virtioGuestResetted(PVIRTIOSTATE pVirtio) 520 525 { 521 LogFunc(("Guest reset the device "));526 LogFunc(("Guest reset the device\n")); 522 527 523 528 /** Let the client know */ … … 770 775 { 771 776 *(uint8_t *)pv = pVirtio->uISR; 772 Log2Func(("Read and clear 0x%02x from uISR (interrupt type: virtq: %d, dev config: %d)\n", 773 pVirtio->uISR, pVirtio->uISR & VIRTIO_ISR_VIRTQ_INTERRUPT, 774 !!(pVirtio->uISR & VIRTIO_ISR_DEVICE_CONFIG))); 777 Log2Func(("Read and clear ISR\n")); 775 778 pVirtio->uISR = 0; /** VirtIO specification requires reads of ISR to clear it */ 776 779 virtioLowerInterrupt(pVirtio); -
trunk/src/VBox/Devices/VirtIO/Virtio_1_0.h
r80437 r80499 215 215 * @param pSgBuf - Caller's sgbuf of one or more virtual memory segments 216 216 * to write to the queue. This is useful because some kinds 217 * of transactions involve variable length sub -components217 * of transactions involve variable length subcomponents 218 218 * whose size can only be known near the time of writing. 219 219 * @parame fFence - If set put up copy fence (memory barrier) after -
trunk/src/VBox/Devices/VirtIO/Virtio_1_0_impl.h
r80437 r80499 40 40 #define VIRTIO_F_RING_EVENT_IDX RT_BIT_64(29) /**< Doc bug: Goes under two names in spec */ 41 41 42 #define VIRTIO_DEV_INDEPENDENT_FEATURES_OFFERED ( VIRTIO_F_EVENT_IDX )/**< TBD: Add VIRTIO_F_INDIRECT_DESC */42 #define VIRTIO_DEV_INDEPENDENT_FEATURES_OFFERED ( 0 ) /**< TBD: Add VIRTIO_F_INDIRECT_DESC */ 43 43 44 44 #define VIRTIO_ISR_VIRTQ_INTERRUPT RT_BIT_32(0) /**< Virtq interrupt bit of ISR register */ … … 364 364 static void virtioWriteUsedAvailEvent (PVIRTIOSTATE pVirtio, uint16_t qIdx, uint32_t uAvailEventIdx); 365 365 366 366 367 DECLINLINE(int) virtqIsEventNeeded(uint16_t uEventIdx, uint16_t uDescIdxNew, uint16_t uDescIdxOld) 367 368 { … … 504 505 &uAvailEventIdx, sizeof(uAvailEventIdx)); 505 506 } 507 506 508 507 509 /**
Note:
See TracChangeset
for help on using the changeset viewer.