VirtualBox

Ignore:
Timestamp:
Dec 12, 2019 6:55:29 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135433
Message:

Storage/DevVirtioSCSI.cpp: Enabled R0, increased req queue count to 4 for potential performance increased, cleaned up some comments and logging

File:
1 edited

Legend:

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

    r82183 r82559  
    173173    bool fEmpty = uAvailGst == pVirtio->virtqState[idxQueue].uAvailIdx;
    174174
    175     LogFlow(("Q<%u>: uAvailGst=%u uAvailIdx=%u -> fEmpty=%RTbool\n",
     175    Log6Func(("Q<%u>: uAvailGst=%u uAvailIdx=%u -> fEmpty=%RTbool\n",
    176176             idxQueue, uAvailGst, pVirtio->virtqState[idxQueue].uAvailIdx, fEmpty));
    177177    return fEmpty;
     
    788788    virtioWriteUsedElem(pDevIns, pVirtio, idxQueue, pVirtq->uUsedIdx++, pDescChain->uHeadIdx, (uint32_t)cbCopy);
    789789
    790     Log2Func((".... Copied %zu bytes to %u byte buffer, residual=%zu\n",
     790    Log3Func((".... Copied %zu bytes to %u byte buffer, residual=%zu\n",
    791791              cbCopy, pDescChain->cbPhysReturn, pDescChain->cbPhysReturn - cbCopy));
    792792
     
    951951}
    952952
     953
     954
     955/**
     956 * Initiate orderly reset procedure. This is an exposed API for clients that might need it.
     957 * Invoked by client to reset the device and driver (see VirtIO 1.0 section 2.1.1/2.1.2)
     958 */
     959void virtioCoreResetAll(PVIRTIOCORE pVirtio)
     960{
     961    LogFunc(("\n"));
     962    pVirtio->uDeviceStatus |= VIRTIO_STATUS_DEVICE_NEEDS_RESET;
     963    if (pVirtio->uDeviceStatus & VIRTIO_STATUS_DRIVER_OK)
     964    {
     965        pVirtio->fGenUpdatePending = true;
     966        virtioKick(pVirtio->pDevIns, pVirtio, VIRTIO_ISR_DEVICE_CONFIG, pVirtio->uMsixConfig, false /* fForce */);
     967    }
     968}
     969
     970#ifdef IN_RING3
    953971static void virtioResetQueue(PVIRTIOCORE pVirtio, uint16_t idxQueue)
    954972{
     
    9961014}
    9971015
    998 /**
    999  * Initiate orderly reset procedure. This is an exposed API for clients that might need it.
    1000  * Invoked by client to reset the device and driver (see VirtIO 1.0 section 2.1.1/2.1.2)
    1001  */
    1002 void virtioCoreResetAll(PVIRTIOCORE pVirtio)
    1003 {
    1004     LogFunc(("\n"));
    1005     pVirtio->uDeviceStatus |= VIRTIO_STATUS_DEVICE_NEEDS_RESET;
    1006     if (pVirtio->uDeviceStatus & VIRTIO_STATUS_DRIVER_OK)
    1007     {
    1008         pVirtio->fGenUpdatePending = true;
    1009         virtioKick(pVirtio->pDevIns, pVirtio, VIRTIO_ISR_DEVICE_CONFIG, pVirtio->uMsixConfig, false /* fForce */);
    1010     }
    1011 }
    1012 
    1013 #ifdef IN_RING3
    10141016/**
    10151017 * Invoked by this implementation when guest driver resets the device.
     
    18951897    /* Set offset to first capability and enable PCI dev capabilities */
    18961898    PDMPciDevSetCapabilityList(pPciDev, 0x40);
    1897     PDMPciDevSetStatus(pPciDev,         VBOX_PCI_STATUS_CAP_LIST);
     1899    PDMPciDevSetStatus(pPciDev, VBOX_PCI_STATUS_CAP_LIST);
    18981900
    18991901    /* Linux drivers/virtio/virtio_pci_modern.c tries to map at least a page for the
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