VirtualBox

Changeset 95609 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jul 12, 2022 8:28:41 PM (3 years ago)
Author:
vboxsync
Message:

Devices/DevVirtioNet_1_0: Fix legacy 32-bit guest compatibility. bugref:8651

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp

    r95592 r95609  
    10161016#if FEATURE_OFFERED(STATUS)
    10171017    else
    1018     if (VIRTIO_DEV_CONFIG_MATCH_MEMBER(    uStatus,          VIRTIONET_CONFIG_T, uOffsetOfAccess))
     1018    if (VIRTIO_DEV_CONFIG_SUBMATCH_MEMBER( uStatus,          VIRTIONET_CONFIG_T, uOffsetOfAccess))
    10191019        VIRTIO_DEV_CONFIG_ACCESS_READONLY( uStatus,          VIRTIONET_CONFIG_T, uOffsetOfAccess, &pThis->virtioNetConfig);
    10201020#endif
     
    11991199         */
    12001200        pThis->fNegotiatedFeatures = virtioCoreGetNegotiatedFeatures(&pThis->Virtio);
     1201        /* @todo: shouldn't we update the virtio header size here? it depends on the negotiated features. */
    12011202        virtioCorePrintDeviceFeatures(&pThis->Virtio, NULL, s_aDevSpecificFeatures, RT_ELEMENTS(s_aDevSpecificFeatures));
    12021203
     
    32233224        pThis->fResetting = false;
    32243225        pThis->fNegotiatedFeatures = virtioCoreGetNegotiatedFeatures(pVirtio);
     3226        /* Now we can properly figure out the size of virtio header! */
     3227        virtioNetConfigurePktHdr(pThis, pThis->Virtio.fLegacyDriver);
    32253228        pThis->virtioNetConfig.uStatus = pThis->fCableConnected ? VIRTIONET_F_LINK_UP : 0;
    32263229
     
    35503553
    35513554    pThis->fNegotiatedFeatures = virtioCoreGetNegotiatedFeatures(&pThis->Virtio);
     3555    /* @todo: validating features at this point is most probably pointless, as the negotiation hasn't started yet. */
    35523556    if (!virtioNetValidateRequiredFeatures(pThis->fNegotiatedFeatures))
    35533557        return PDMDEV_SET_ERROR(pDevIns, rc, N_("virtio-net: Required features not successfully negotiated."));
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