VirtualBox

Changeset 88827 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
May 3, 2021 11:46:01 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144161
Message:

Storage/DevVirtioSCSI: Fix a few things to get code working on Windows again well enough to see vscsi disks in Windows Disk formatting utility, see @BugRef(9440), comment #150

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp

    r85415 r88827  
    1212
    1313/*
    14  * Copyright (C) 2006-2020 Oracle Corporation
     14 * Copyright (C) 2006-2021 Oracle Corporation
    1515 *
    1616 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    8484#define VIRTIOSCSI_VIRTQ_CNT                        (VIRTIOSCSI_REQ_VIRTQ_CNT + 2)
    8585#define VIRTIOSCSI_MAX_TARGETS                      256         /**< T.B.D. Figure out a a good value for this.      */
    86 #define VIRTIOSCSI_MAX_LUN                          256         /**< VirtIO specification, section 5.6.4             */
     86#define VIRTIOSCSI_MAX_LUN                                   /**< VirtIO specification, section 5.6.4             */
    8787#define VIRTIOSCSI_MAX_COMMANDS_PER_LUN             128         /**< T.B.D. What is a good value for this?           */
    8888#define VIRTIOSCSI_MAX_SEG_COUNT                    126         /**< T.B.D. What is a good value for this?           */
     
    12701270    }
    12711271
     1272#if 0
    12721273    if (RT_LIKELY(!cbDataIn || !cbDataOut || pThis->fHasInOutBufs)) /* VirtIO 1.0, 5.6.6.1.1 */
    12731274    { /*  likely */ }
     
    12801281                                   VIRTIOSCSI_S_FAILURE, abSense, sizeof(abSense), cbSenseCfg);
    12811282    }
    1282 
     1283#endif
    12831284    /*
    12841285     * Have underlying driver allocate a req of size set during initialization of this device.
     
    17101711        for (unsigned i = 0; i < VIRTIOSCSI_VIRTQ_CNT; i++)
    17111712            pThis->afVirtqAttached[i] = false;
    1712     }
     1713
     1714        /*
     1715         * BIOS may change these values. When the OS comes up, and KVM driver accessed
     1716         * through the Windows, assumes they are the default size. So as per the VirtIO 1.0 spec,
     1717         * 5.6.4, these device configuration values must be set to default upon device reset.
     1718         */
     1719        pThis->virtioScsiConfig.uSenseSize = VIRTIOSCSI_SENSE_SIZE_DEFAULT;
     1720        pThis->virtioScsiConfig.uCdbSize   = VIRTIOSCSI_CDB_SIZE_DEFAULT;
     1721    }
     1722
     1723
    17131724}
    17141725
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