VirtualBox

Changeset 92996 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Dec 17, 2021 8:18:43 AM (3 years ago)
Author:
vboxsync
Message:

virtio-net works on linux in local testing, and virtio-scsi works on windows. Integrating the switchover to make DevVirtioNet_1_0.cpp the 'virtio-net' option in the Virtual Network Controller list.

Location:
trunk/src/VBox/Devices
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Makefile.kmk

    r92969 r92996  
    523523  VBoxDD_DEFS           += VBOX_WITH_VIRTIO
    524524  VBoxDD_SOURCES        += \
    525         VirtIO/Virtio.cpp \
    526525        VirtIO/VirtioCore.cpp \
    527         Network/DevVirtioNet.cpp
    528  endif
    529 
    530  if defined(VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_NET_1_0)
    531   VBoxDD_DEFS         += VBOX_WITH_VIRTIO_NET_1_0
    532   VBoxDD_SOURCES      += \
    533         Network/DevVirtioNet_1_0.cpp
    534 endif
     526        Network/DevVirtioNet_1_0.cpp
     527 endif
     528
    535529
    536530 ifdef VBOX_WITH_UDPTUNNEL
     
    10641058   VBoxDDRC_DEFS        += VBOX_WITH_VIRTIO
    10651059   VBoxDDRC_SOURCES     += \
    1066         VirtIO/Virtio.cpp \
    10671060        VirtIO/VirtioCore.cpp \
    1068         Network/DevVirtioNet.cpp
    1069   endif
    1070 
    1071   ifdef defined(VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_NET_1_0)
    1072    VBoxDDRC_DEFS         += VBOX_WITH_VIRTIO_NET_1_0
    1073    VBoxDDRC_SOURCES      += \
    1074          Network/DevVirtioNet_1_0.cpp
     1061        Network/DevVirtioNet_1_0.cpp
    10751062  endif
    10761063
     
    12881275  VBoxDDR0_DEFS         += VBOX_WITH_VIRTIO
    12891276  VBoxDDR0_SOURCES      += \
    1290         VirtIO/Virtio.cpp \
    12911277        VirtIO/VirtioCore.cpp \
    1292         Network/DevVirtioNet.cpp
    1293  endif
    1294 
    1295  if defined(VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_NET_1_0)
    1296   VBoxDDR0_DEFS         += VBOX_WITH_VIRTIO_NET_1_0
    1297   VBoxDDR0_SOURCES      += \
    12981278        Network/DevVirtioNet_1_0.cpp
    12991279 endif
  • trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp

    r92995 r92996  
    35873587 * The device registration structure.
    35883588 */
    3589 const PDMDEVREG g_DeviceVirtioNet_1_0 =
     3589const PDMDEVREG g_DeviceVirtioNet =
    35903590{
    35913591    /* .uVersion = */               PDM_DEVREG_VERSION,
    35923592    /* .uReserved0 = */             0,
    3593     /* .szName = */                 "virtio-net-1-dot-0",
     3593    /* .szName = */                 "virtio-net",
    35943594    /* .fFlags = */                 PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_NEW_STYLE | PDM_DEVREG_FLAGS_RZ,
    35953595    /* .fClass = */                 PDM_DEVREG_CLASS_NETWORK,
  • trunk/src/VBox/Devices/build/VBoxDD.cpp

    r91416 r92996  
    117117        return rc;
    118118#endif
    119 #ifdef VBOX_WITH_VIRTIO_NET_1_0
    120     rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVirtioNet_1_0);
    121     if (RT_FAILURE(rc))
    122         return rc;
    123 #endif
    124119#ifdef VBOX_WITH_INIP
    125120    rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceINIP);
  • trunk/src/VBox/Devices/build/VBoxDD.h

    r91416 r92996  
    5757extern const PDMDEVREG g_DeviceVirtioNet;
    5858#endif
    59 #ifdef VBOX_WITH_VIRTIO_NET_1_0
    60 extern const PDMDEVREG g_DeviceVirtioNet_1_0;
    61 #endif
    6259#ifdef VBOX_WITH_INIP
    6360extern const PDMDEVREG g_DeviceINIP;
  • trunk/src/VBox/Devices/build/VBoxDDR0.cpp

    r91214 r92996  
    6060#ifdef VBOX_WITH_VIRTIO
    6161    &g_DeviceVirtioNet,
    62 #endif
    63 #ifdef VBOX_WITH_VIRTIO_NET_1_0
    64     &g_DeviceVirtioNet_1_0,
    6562#endif
    6663    &g_DeviceICHAC97,
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp

    r89590 r92996  
    6565#undef LOG_GROUP
    6666#include "../Network/DevPCNet.cpp"
    67 #ifdef VBOX_WITH_VIRTIO
    68 # undef LOG_GROUP
    69 # include "../Network/DevVirtioNet.cpp"
    70 #endif
    7167#undef LOG_GROUP
    7268#include "../PC/DevACPI.cpp"
     
    347343    CHECK_MEMBER_ALIGNMENT(E1KSTATE, StatReceiveBytes, 8);
    348344#endif
    349 #ifdef VBOX_WITH_VIRTIO
    350     CHECK_MEMBER_ALIGNMENT(VNETSTATE, StatReceiveBytes, 8);
    351 #endif
    352345    //CHECK_MEMBER_ALIGNMENT(E1KSTATE, csTx, 8);
    353346#ifdef VBOX_WITH_USB
     
    407400    CHECK_MEMBER_ALIGNMENT(VGASTATE, CritSectIRQ, 8);
    408401    CHECK_MEMBER_ALIGNMENT(VMMDEV, CritSect, 8);
    409 #ifdef VBOX_WITH_VIRTIO
    410     CHECK_MEMBER_ALIGNMENT(VPCISTATE, cs, 8);
    411     CHECK_MEMBER_ALIGNMENT(VPCISTATE, led, 4);
    412     CHECK_MEMBER_ALIGNMENT(VPCISTATE, Queues, 8);
    413 #endif
    414402#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
    415403    CHECK_MEMBER_ALIGNMENT(PCIRAWSENDREQ, u.aGetRegionInfo.u64RegionSize, 8);
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r89590 r92996  
    121121# undef LOG_GROUP
    122122# include "../Network/DevE1000.cpp"
    123 #endif
    124 #ifdef VBOX_WITH_VIRTIO
    125 # undef LOG_GROUP
    126 # include "../Network/DevVirtioNet.cpp"
    127123#endif
    128124#ifdef VBOX_WITH_BUSLOGIC
     
    15621558#endif /* VBOX_WITH_E1000 */
    15631559
    1564 #ifdef VBOX_WITH_VIRTIO
    1565     GEN_CHECK_OFF(VPCISTATE, cs);
    1566     GEN_CHECK_OFF(VPCISTATE, szInstance);
    1567     GEN_CHECK_OFF(VPCISTATE, IBase);
    1568     GEN_CHECK_OFF(VPCISTATE, ILeds);
    1569     GEN_CHECK_OFF(VPCISTATE, pLedsConnector);
    1570     GEN_CHECK_OFF(VPCISTATE, pDevInsR3);
    1571     GEN_CHECK_OFF(VPCISTATE, pDevInsR0);
    1572     GEN_CHECK_OFF(VPCISTATE, pDevInsRC);
    1573     GEN_CHECK_OFF(VPCISTATE, pciDevice);
    1574     GEN_CHECK_OFF(VPCISTATE, IOPortBase);
    1575     GEN_CHECK_OFF(VPCISTATE, led);
    1576     GEN_CHECK_OFF(VPCISTATE, uGuestFeatures);
    1577     GEN_CHECK_OFF(VPCISTATE, uQueueSelector);
    1578     GEN_CHECK_OFF(VPCISTATE, uStatus);
    1579     GEN_CHECK_OFF(VPCISTATE, uISR);
    1580     GEN_CHECK_OFF(VPCISTATE, Queues);
    1581     GEN_CHECK_OFF(VPCISTATE, Queues[VIRTIO_MAX_NQUEUES]);
    1582     GEN_CHECK_OFF(VNETSTATE, VPCI);
    1583     GEN_CHECK_OFF(VNETSTATE, INetworkDown);
    1584     GEN_CHECK_OFF(VNETSTATE, INetworkConfig);
    1585     GEN_CHECK_OFF(VNETSTATE, pDrvBase);
    1586     GEN_CHECK_OFF(VNETSTATE, pCanRxQueueR3);
    1587     GEN_CHECK_OFF(VNETSTATE, pCanRxQueueR0);
    1588     GEN_CHECK_OFF(VNETSTATE, pCanRxQueueRC);
    1589     GEN_CHECK_OFF(VNETSTATE, pLinkUpTimer);
    1590 # ifdef VNET_TX_DELAY
    1591     GEN_CHECK_OFF(VNETSTATE, pTxTimerR3);
    1592     GEN_CHECK_OFF(VNETSTATE, pTxTimerR0);
    1593     GEN_CHECK_OFF(VNETSTATE, pTxTimerRC);
    1594 # endif /* VNET_TX_DELAY */
    1595     GEN_CHECK_OFF(VNETSTATE, config);
    1596     GEN_CHECK_OFF(VNETSTATE, macConfigured);
    1597     GEN_CHECK_OFF(VNETSTATE, fCableConnected);
    1598     GEN_CHECK_OFF(VNETSTATE, u32PktNo);
    1599     GEN_CHECK_OFF(VNETSTATE, fPromiscuous);
    1600     GEN_CHECK_OFF(VNETSTATE, fAllMulti);
    1601     GEN_CHECK_OFF(VNETSTATE, pRxQueue);
    1602     GEN_CHECK_OFF(VNETSTATE, pTxQueue);
    1603     GEN_CHECK_OFF(VNETSTATE, pCtlQueue);
    1604     GEN_CHECK_OFF(VNETSTATE, fMaybeOutOfSpace);
    1605     GEN_CHECK_OFF(VNETSTATE, hEventMoreRxDescAvail);
    1606 #endif /* VBOX_WITH_VIRTIO */
    1607 
    16081560    /* VMMDev*.cpp/h */
    16091561    GEN_CHECK_SIZE(VMMDEV);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette