All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Bug 1576347 <1576347@bugs.launchpad.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1576347] [NEW] Only one NVMe device is usable in Windows (10) guest
Date: Wed, 4 May 2016 18:20:01 -0400	[thread overview]
Message-ID: <20160504222001.GA2108@localhost.localdomain> (raw)
In-Reply-To: <20160429091039.GC20753@stefanha-x1.localdomain>

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 <keith.busch@intel.com>, 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?

  reply	other threads:[~2016-05-04 22:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 17:44 [Qemu-devel] [Bug 1576347] [NEW] Only one NVMe device is usable in Windows (10) guest Tom Yan
2016-04-28 17:45 ` [Qemu-devel] [Bug 1576347] " Tom Yan
2016-04-28 17:49 ` Tom Yan
2016-04-28 17:49 ` Tom Yan
2016-04-29  2:32 ` Tom Yan
2016-04-29  3:08 ` Tom Yan
2016-04-29  3:29 ` Tom Yan
2016-04-29  9:10 ` [Qemu-devel] [Bug 1576347] [NEW] " Stefan Hajnoczi
2016-05-04 22:20   ` Keith Busch [this message]
2016-05-04 22:42   ` Keith Busch
2016-12-12  9:26 ` [Qemu-devel] [Bug 1576347] " Tom Yan
2017-08-16 21:18 ` Sergey Blagodurov
2018-02-01  8:53 ` Marshall Porter
2020-11-19 20:54 ` Thomas Huth
2021-01-19  4:17 ` Launchpad Bug Tracker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160504222001.GA2108@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=1576347@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.