Skip to content

Commit 354a83f

Browse files
Devices/Bus: Start implementing a device emulation using VFIO to pass through real devices to the guest, the current PoC is able to pass through a Realtek NIC fully functional, bugref:11054 [missing files]
svn:sync-xref-src-repo-rev: r172594
1 parent e606e2e commit 354a83f

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/VBox/Devices/build/VBoxDD.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: VBoxDD.cpp 112403 2026-01-11 19:29:08Z knut.osmundsen@oracle.com $ */
1+
/* $Id: VBoxDD.cpp 112860 2026-02-06 21:07:19Z alexander.eichner@oracle.com $ */
22
/** @file
33
* VBoxDD - Built-in drivers & devices (part 1).
44
*/
@@ -251,6 +251,11 @@ extern "C" DECLEXPORT(int) VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t
251251
if (RT_FAILURE(rc))
252252
return rc;
253253
#endif
254+
#ifdef VBOX_WITH_VFIO_PCI_PASSTHROUGH
255+
rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciVfio);
256+
if (RT_FAILURE(rc))
257+
return rc;
258+
#endif
254259
#ifdef VBOX_WITH_VIRT_ARMV8
255260
rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEfiArmV8);
256261
if (RT_FAILURE(rc))

src/VBox/Devices/build/VBoxDD.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: VBoxDD.h 112403 2026-01-11 19:29:08Z knut.osmundsen@oracle.com $ */
1+
/* $Id: VBoxDD.h 112860 2026-02-06 21:07:19Z alexander.eichner@oracle.com $ */
22
/** @file
33
* Built-in drivers & devices (part 1) header.
44
*/
@@ -117,6 +117,9 @@ extern const PDMDEVREG g_DeviceQemuFwCfg;
117117
extern const PDMDEVREG g_DeviceTpm;
118118
extern const PDMDEVREG g_DeviceTpmPpi;
119119
#endif
120+
#ifdef VBOX_WITH_VFIO_PCI_PASSTHROUGH
121+
extern const PDMDEVREG g_DevicePciVfio;
122+
#endif
120123

121124
extern const PDMDRVREG g_DrvMouseQueue;
122125
extern const PDMDRVREG g_DrvKeyboardQueue;
@@ -248,6 +251,7 @@ extern const PDMDRVREG g_DrvCardReaderReg;
248251
# endif
249252
#endif
250253

254+
251255
/* VBoxAcpi.cpp */
252256
int acpiPrepareDsdt(PPDMDEVINS pDevIns, void **ppvPtr, size_t *pcbDsdt);
253257
int acpiCleanupDsdt(PPDMDEVINS pDevIns, void *pvPtr);

0 commit comments

Comments
 (0)