VirtualBox

Changeset 71788 in vbox for trunk/src/VBox/Devices/VirtIO


Ignore:
Timestamp:
Apr 9, 2018 4:06:34 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
121891
Message:

DevVirtioNet: A couple of todos and paranoia.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VirtIO/Virtio.cpp

    r71112 r71788  
    165165            break;
    166166        }
     167        RT_UNTRUSTED_VALIDATED_FENCE();
    167168
    168169        vringReadDesc(pState, &pQueue->VRing, idx, &desc);
     
    551552            u32 &= 0xFFFF;
    552553            if (u32 < pState->nQueues)
     554            {
     555                RT_UNTRUSTED_VALIDATED_FENCE();
    553556                if (pState->Queues[u32].VRing.addrDescriptors)
    554557                {
     
    563566                    Log(("%s The queue (#%d) being notified has not been initialized.\n",
    564567                         INSTANCE(pState), u32));
     568            }
    565569            else
    566570                Log(("%s Invalid queue number (%d)\n", INSTANCE(pState), u32));
     
    799803        else
    800804            pState->nQueues = nQueues;
     805        AssertLogRelMsgReturn(pState->nQueues <= VIRTIO_MAX_NQUEUES, ("%#x\n", pState->nQueues), VERR_SSM_LOAD_CONFIG_MISMATCH);
     806        AssertLogRelMsgReturn(pState->uQueueSelector < pState->nQueues || (pState->nQueues == 0 && pState->uQueueSelector),
     807                              ("uQueueSelector=%u nQueues=%u\n", pState->uQueueSelector, pState->nQueues),
     808                              VERR_SSM_LOAD_CONFIG_MISMATCH);
     809
    801810        for (unsigned i = 0; i < pState->nQueues; i++)
    802811        {
     
    10101019
    10111020#endif /* VBOX_DEVICE_STRUCT_TESTCASE */
     1021
Note: See TracChangeset for help on using the changeset viewer.

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