[PATCH 3/3] nvme-pci: disable namespace identifiers for Qemu controllers

Klaus Jensen its at irrelevant.dk
Wed Apr 13 08:49:29 PDT 2022


On Apr 13 17:34, Christoph Hellwig wrote:
> On Wed, Apr 13, 2022 at 10:40:47AM +0200, Klaus Jensen wrote:
> > On Apr 13 07:34, Niklas Cassel wrote:
> > > On Wed, Apr 13, 2022 at 06:49:05AM +0200, Christoph Hellwig wrote:
> > > > Qemu unconditionally reports a UUID, which depending on the qemu version
> > > 
> > > Since it appears that both older and current QEMU versions are not
> > > implementing this properly, perhaps you should also consider adding
> > > the pci vendor and device id used by older QEMU versions?
> > > 
> > > QEMU nvme pci vendor and device id was changed in commit:
> > > https://github.com/qemu/qemu/commit/6eb7a071292a2f11065127ac152fa24248806021
> > > 
> > > Which was first included in QEMU v5.2.0.
> > > 
> > 
> > That is a good point Niklas. +1 for that. The driver already knows about
> > that ID.
> 
> 5.2.0 is also the first qemu that supports the namespace descriptor
> list, that's why I didn't include it.

However, backwards compatibility in QEMU mandates that a compatibility
parameter is added when a device changes identity like this (i.e. PCI
vendor id).

This means that the 'use-intel-id' compatibility parameter may cause a
5.2 nvme device to present itself with the Intel PCI vendor/device id,
either because the user explicitly set it, or because the machine is
launched using a pre-5.2 machine type (i.e. `-machine pc-q35-5.1`),
which you would normally do if you want launch an existing VM on a new
version of QEMU.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20220413/59bbb1fb/attachment.sig>


More information about the Linux-nvme mailing list