Changeset 84882 in vbox
- Timestamp:
- Jun 19, 2020 1:07:08 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138714
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp ¶
r84876 r84882 3086 3086 RTStrPrintf(pThis->szInst, sizeof(pThis->szInst), "VNET%d", iInstance); 3087 3087 3088 /** todo Remove next line (temporary hack used for less logging clutter for single-instance debugging) */3088 /** @todo Remove next line (temporary hack used for less logging clutter for single-instance debugging) */ 3089 3089 *pThis->szInst = '\0'; 3090 3090 -
TabularUnified trunk/src/VBox/Devices/VirtIO/VirtioCore.cpp ¶
r84876 r84882 1597 1597 #ifdef IN_RING3 1598 1598 /* 1599 * Pass this MMIO write access back to the client to handle1599 * Foreward this MMIO write access for client to deal with. 1600 1600 */ 1601 1601 return pVirtioCC->pfnDevCapWrite(pDevIns, uOffset, pv, cb); … … 2088 2088 PDMPciDevSetStatus(pPciDev, VBOX_PCI_STATUS_CAP_LIST); 2089 2089 2090 /* Linux drivers/virtio/virtio_pci_modern.c tries to map at least a page for the 2090 size_t cbSize = RTStrPrintf(pVirtioCC->pcszMmioName, sizeof(pVirtioCC->pcszMmioName), "%s MMIO", pcszInstance); 2091 if (cbSize <= 0) 2092 return PDMDEV_SET_ERROR(pDevIns, rc, N_("virtio: out of memory allocating string")); /* can we put params in this error? */ 2093 2094 /* Note: The Linux driver at drivers/virtio/virtio_pci_modern.c tries to map at least a page for the 2091 2095 * 'unknown' device-specific capability without querying the capability to figure 2092 2096 * out size, so pad with an extra page 2093 2097 */ 2094 size_t cbSize = RTStrPrintf(pVirtioCC->pcszMmioName, sizeof(pVirtioCC->pcszMmioName), "%s MMIO", pcszInstance);2095 if (cbSize <= 0)2096 return PDMDEV_SET_ERROR(pDevIns, rc, N_("virtio: out of memory allocating string")); /* can we put params in this error? */2097 2098 2098 rc = PDMDevHlpPCIIORegionCreateMmio(pDevIns, VIRTIO_REGION_PCI_CAP, RT_ALIGN_32(cbRegion + PAGE_SIZE, PAGE_SIZE), 2099 2099 PCI_ADDRESS_SPACE_MEM, virtioMmioWrite, virtioMmioRead, pVirtio, -
TabularUnified trunk/src/VBox/Devices/VirtIO/VirtioCore.h ¶
r84877 r84882 126 126 127 127 #define VIRTIO_F_VERSION_1 RT_BIT_64(32) /**< Required feature bit for 1.0 devices */ 128 #define VIRTIO_F_INDIRECT_DESC RT_BIT_64(28) /**< Allow descs to point to list of descs*/128 #define VIRTIO_F_INDIRECT_DESC RT_BIT_64(28) /**< Allow descs to point to list of descs */ 129 129 #define VIRTIO_F_EVENT_IDX RT_BIT_64(29) /**< Allow notification disable for n elems */ 130 130 #define VIRTIO_F_RING_INDIRECT_DESC RT_BIT_64(28) /**< Doc bug: Goes under two names in spec */ … … 288 288 uint8_t uISR; /**< Interrupt Status Register. */ 289 289 uint8_t fMsiSupport; /**< Flag set if using MSI instead of ISR */ 290 291 290 /** The MMIO handle for the PCI capability region (\#2). */ 292 291 IOMMMIOHANDLE hMmioPciCap; … … 356 355 /** @} */ 357 356 358 R3PTRTYPE(PVIRTIO_PCI_CFG_CAP_T) pPciCfgCap; /**< Pointer to struct in the PCI configuration area.*/359 R3PTRTYPE(PVIRTIO_PCI_NOTIFY_CAP_T) pNotifyCap; /**< Pointer to struct in the PCI configuration area.*/360 R3PTRTYPE(PVIRTIO_PCI_CAP_T) pCommonCfgCap; /**< Pointer to struct in the PCI configuration area.*/361 R3PTRTYPE(PVIRTIO_PCI_CAP_T) pIsrCap; /**< Pointer to struct in the PCI configuration area.*/362 R3PTRTYPE(PVIRTIO_PCI_CAP_T) pDeviceCap; /**< Pointer to struct in the PCI configuration area.*/363 364 uint32_t cbDevSpecificCfg; 365 R3PTRTYPE(uint8_t *) pbDevSpecificCfg; 366 R3PTRTYPE(uint8_t *) pbPrevDevSpecificCfg; 367 bool fGenUpdatePending; 368 char pcszMmioName[MAX_NAME]; 357 R3PTRTYPE(PVIRTIO_PCI_CFG_CAP_T) pPciCfgCap; /**< Pointer to struct in PCI config area. */ 358 R3PTRTYPE(PVIRTIO_PCI_NOTIFY_CAP_T) pNotifyCap; /**< Pointer to struct in PCI config area. */ 359 R3PTRTYPE(PVIRTIO_PCI_CAP_T) pCommonCfgCap; /**< Pointer to struct in PCI config area. */ 360 R3PTRTYPE(PVIRTIO_PCI_CAP_T) pIsrCap; /**< Pointer to struct in PCI config area. */ 361 R3PTRTYPE(PVIRTIO_PCI_CAP_T) pDeviceCap; /**< Pointer to struct in PCI config area. */ 362 363 uint32_t cbDevSpecificCfg; /**< Size of client's dev-specific config data */ 364 R3PTRTYPE(uint8_t *) pbDevSpecificCfg; /**< Pointer to client's struct */ 365 R3PTRTYPE(uint8_t *) pbPrevDevSpecificCfg; /**< Previous read dev-specific cfg of client */ 366 bool fGenUpdatePending; /**< If set, update cfg gen after driver reads */ 367 char pcszMmioName[MAX_NAME]; /**< MMIO mapping name */ 369 368 } VIRTIOCORER3; 370 369
Note:
See TracChangeset
for help on using the changeset viewer.