VirtualBox

Ticket #17228 (new defect)

Opened 2 years ago

Last modified 17 months ago

5.2.0 breaks NVMe support on Win10 1703 or later [regression]

Reported by: chrfranke Owned by:
Component: other Version: VirtualBox 5.2.0
Keywords: Cc:
Guest type: Windows Host type: Windows

Description

NVMe drive stopped working in a Win10 1703 VM after upgrading VB from 5.1.18 to 5.2.0.

In Device Manager, stornvme.sys is shown with yellow exclamation and (the German version of) this error message: This device cannot start. (Code 10) An invalid parameter was passed to a service or function.

With an older 1607 snapshot of same VM, NVMe worked again. After copying stornvme.sys from 1607 to 1703, NVMe worked again. Same with a fresh install of 1709 (upgrade install crashed VB 5.2.0): NVMe failed and worked again after downgrading the driver.

Test results after downgrading VB to latest 5.1:

stornvme.sys 5.1.18/30 5.2.0
10.0.14393.0 (1607) OK OK
10.0.15063.0 (1703) OK Error
10.0.16299.15 (1709) OK Error

Possibly related or duplicate: #16078.

Change History

comment:1 Changed 2 years ago by aeichner

The NVMe driver in the Fall Creators update doesn't work if the device exposes MSI-X and the controller memory buffer feature of NVMe introduced with 5.2.0. Older versions and other guests don't show this behavior and we are investigating it. Use the following commands to work around this issue in the meantime:

VBoxManage setextradata <VM name> "VBoxInternal/Devices/nvme/0/Config/MsiXSupported" 0
VBoxManage setextradata <VM name> "VBoxInternal/Devices/nvme/0/Config/CtrlMemBufSize" 0

This will disable MSI-X support and the controller memory buffer feature but makes the newer NVMe driver work with our emulation.

comment:2 Changed 2 years ago by chrfranke

Thanks. Works with 1703. On 1709, driver load succeeds, but guest freezes during write commands (e.g. formatting). Workaround: Add a second CPU. In all cases, it worked also without MsiXSupported setting.

Test results:

CtrlMemBufSize unset CtrlMemBufSize 0, 1 CPU CtrlMemBufSize 0, 2 CPUs
1703 Driver not loaded OK OK
1709 Driver not loaded Guest freezes on writes OK

comment:3 Changed 21 months ago by lk3

I am able to get NVMe working on a Windows 10 1709 install using:

VBoxManage setextradata <VM name> "VBoxInternal/Devices/nvme/0/Config/MsiXSupported" 0 VBoxManage setextradata <VM name> "VBoxInternal/Devices/nvme/0/Config/CtrlMemBufSize" 0

However, when I give the VM more than 1 cpu core, the VM will BSOD on boot. Dropping the vm back to 1 core allows the VM to boot. I suspect this is something to do with NVMe. Tested on both 5.2.8 and 5.2.9.

Has anyone else seen this behavior?

comment:4 Changed 18 months ago by csm10495

Actually it looks like the 'drive' is returning error SF.SC == 14 / 0x0E to say feature not supported when stornvme tries to send SetFeatures with a FID of 0x08 for Interrupt Coalescing. Which is leading to the error code 10. In my own build of stornvme, I added a build-switch to ignore that error and continue with initialization. That works, though ultimately the drive should just return success (and could probably just ignore the command data).

That worked for me on a single core VM, haven't tried on multi-core.

Seems like a valid bug since the drive is violating the NVMe Spec by failing a required feature.

comment:5 Changed 17 months ago by Chai T. Rex

Comment 1 works nicely with an NVMe controller, SSD disk image mode, with no host OS cache in VirtualBox 5.2.16.

I couldn't get Windows 10 1803 installer to see the virtual disk even existed initially. With just CtrlMemBufSize, it saw the disk and installed but I kept getting file corruption (for example, I had problems with Windows Update and needed sfc /scannow to get the update to go through, which didn't inspire confidence). With both changes and a clean install, things work nicely.

How do I revert those changes when this bug is fixed?

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use