From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay53W-0002K9-OK for qemu-devel@nongnu.org; Wed, 04 May 2016 18:14:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay53K-0001AF-No for qemu-devel@nongnu.org; Wed, 04 May 2016 18:14:01 -0400 Received: from mga11.intel.com ([192.55.52.93]:49712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay53K-0000sq-Hi for qemu-devel@nongnu.org; Wed, 04 May 2016 18:13:54 -0400 Date: Wed, 4 May 2016 18:20:01 -0400 From: Keith Busch Message-ID: <20160504222001.GA2108@localhost.localdomain> References: <20160428174421.24544.77308.malonedeb@gac.canonical.com> <20160429091039.GC20753@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160429091039.GC20753@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [Bug 1576347] [NEW] Only one NVMe device is usable in Windows (10) guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Bug 1576347 <1576347@bugs.launchpad.net>, qemu-devel@nongnu.org On Fri, Apr 29, 2016 at 10:10:39AM +0100, Stefan Hajnoczi wrote: > On Thu, Apr 28, 2016 at 05:44:21PM -0000, Tom Yan wrote: > > CCing Keith Busch , maintainer of QEMU NVMe. > Maybe he has an idea. Thanks for the report. Sounds like a Windows specific issue as I have no problem with multiple nvme drives on my dev machines: [Host] # uname -r 4.6.0-rc5+ # qemu-system-x86_64 --version QEMU emulator version 2.5.50, Copyright (c) 2003-2008 Fabrice Bellard # qemu-system-x86_64 -m 4096 -smp 4 -enable-kvm debian.img \ -drive file=nvme.1.img,if=none,id=one -device nvme,drive=one,serial=foo \ -drive file=nvme.2.img,if=none,id=two -device nvme,drive=two,serial=bar [Guest] # uname -r 4.5.0 # ls /dev/nvme* /dev/nvme0 /dev/nvme0n1 /dev/nvme1 /dev/nvme1n1 # nvme id-ctrl /dev/nvme0 | grep sn sn : foo # nvme id-ctrl /dev/nvme1 | grep sn sn : bar > > When there are two NVMe devices specified, only the second one will be > > usable in Windows. The following error is shown under "Device status" of > > the failed NVMe controller in Device Manager: > > > > "This device cannot start. (Code 10) > > > > The I/O device is configured incorrectly or the configuration parameters > > to the driver are incorrect." > > > > The only thing seems suspicious to me is that the nvme emulation in qemu > > does not have WWN/EUI-64 set for the devices, though I have no idea at > > all whether that is mandatory: These are not mandatory. They were only introduced in the 1.1 and 1.2 versions of the NVMe spec, though we only cared to emulate the 1.0 portions rather than provide a full featured NVMe controller. That said, there needs to be care in the host OS to provide an appropriate translation IF it is using a SCSI stack to talk to NVMe. Linux doesn't care, but Windows does. > > "C:\Windows\system32>sg_vpd -i PD1 > > Device Identification VPD page: > > Addressed logical unit: > > designator type: SCSI name string, code set: UTF-8 > > SCSI name string: > > 8086QEMU NVMe Ctrl 00012BDAC262CF831698 The above looks reasonable for your second controller that had serial 2BDAC262CF831698. > > C:\Windows\system32>sg_vpd -p sn PD1 > > Unit serial number VPD page: > > Unit serial number: 0000_0000_0000_0000." This doesn't look like a very good SCSI-NVMe translation and possibly suspicious. But I don't know the first thing about windows; does it care about unique unit serial numbers in order to surface a "SCSI" disk?