Skip to contentSkip to conversation

pci id documentation updates

PATCH Superseded Gerd Hoffmann 2 participants 7 messages Oct 15

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover pci id documentation updates

Gerd Hoffmann (2):
pci id: clarify pci subsystem id usage
pci id: assign pci subsystem id for osmates

 docs/specs/pci-ids.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.56.0
#1 lore raw

PATCH 1/2 pci id: clarify pci subsystem id usage

Qemu uses the pci subsystem id not only for emulated devices, but also for virtio devices and generic pci class devices such as pci bridges, xhci + nvme controllers etc. Update the documentation accordingly.

---
 docs/specs/pci-ids.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
docs/specs/pci-ids.rst +3 -2
index 261b0f359fe5..832f8bd1b802 100644
@@ -46,8 +46,9 @@ maintained as part of the virtio specification.
   upstream merge or shipping a distro/product) to avoid conflicts.
 
 1af4:1100
-  Used as PCI Subsystem ID for existing hardware devices emulated
-  by QEMU.
+  Used as PCI Subsystem ID for existing hardware devices emulated by
+  QEMU, such as the intel chipset devices.  Also used for virtio
+  devices and generic pci class devices (1b36:00xx, see below).
 
 1af4:1110
   ivshmem device (:doc:`ivshmem-spec`)
Signature · 1 line
2.56.0
#2 lore raw

Re: [PATCH 1/2] pci id: clarify pci subsystem id usage

Quoted 14 lines · Gerd Hoffmann

Qemu uses the pci subsystem id not only for emulated devices, but also for virtio devices and generic pci class devices such as pci bridges, xhci + nvme controllers etc. Update the documentation accordingly.

---
 docs/specs/pci-ids.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
docs/specs/pci-ids.rst +0 -0
index 261b0f359fe5..832f8bd1b802 100644

docs/specs/pci-ids.rst maintained as part of the virtio specification. · line 51

Quoted 8 lines
docs/specs/pci-ids.rst +3 -2
@@ -46,8 +46,9 @@ maintained as part of the virtio specification.
   upstream merge or shipping a distro/product) to avoid conflicts.
 
 1af4:1100
-  Used as PCI Subsystem ID for existing hardware devices emulated
-  by QEMU.
+  Used as PCI Subsystem ID for existing hardware devices emulated by
+  QEMU, such as the intel chipset devices.  Also used for virtio
+  devices and generic pci class devices (1b36:00xx, see below).

When talking virtio devices, does that include virtio devices implemented outside QEMU via vhostuser, or only in-QEMU virtio devices ?

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
#3 lore raw

Re: [PATCH 1/2] pci id: clarify pci subsystem id usage

Quoted 10 lines · Daniel P. Berrangé

docs/specs/pci-ids.rst maintained as part of the virtio specification. · line 51

Quoted 6 lines

1af4:1100

docs/specs/pci-ids.rst +3 -2
-  Used as PCI Subsystem ID for existing hardware devices emulated
-  by QEMU.
+  Used as PCI Subsystem ID for existing hardware devices emulated by
+  QEMU, such as the intel chipset devices.  Also used for virtio
+  devices and generic pci class devices (1b36:00xx, see below).

When talking virtio devices, does that include virtio devices implemented outside QEMU via vhostuser, or only in-QEMU virtio devices ?

For vhost devices the pci config space emulation is still handled by qemu. On a quick check I don't see anything special done for vhost, so I expect the same subsystem ID being used.

Maybe we should extend the vhost protocol to allow overriding the subsystem id, so linux kernel / rust-vmm / ... can have their own subsystem ids?

take care,
Gerd

#4 lore raw

Re: [PATCH 1/2] pci id: clarify pci subsystem id usage

Quoted 8 lines · Gerd Hoffmann
Quoted 7 lines · Daniel P. Berrangé
Quoted 6 lines

1af4:1100

docs/specs/pci-ids.rst +3 -2
-  Used as PCI Subsystem ID for existing hardware devices emulated
-  by QEMU.
+  Used as PCI Subsystem ID for existing hardware devices emulated by
+  QEMU, such as the intel chipset devices.  Also used for virtio
+  devices and generic pci class devices (1b36:00xx, see below).
Quoted 7 lines
Quoted 3 lines

When talking virtio devices, does that include virtio devices implemented outside QEMU via vhostuser, or only in-QEMU virtio devices ?

For vhost devices the pci config space emulation is still handled by qemu. On a quick check I don't see anything special done for vhost, so I expect the same subsystem ID being used.

So IIUC, the QEMU subsystem ID applies to every PCI device exposed from QEMU, except for VFIO passthrough of host devices.

Quoted 4 lines

Maybe we should extend the vhost protocol to allow overriding the subsystem id, so linux kernel / rust-vmm / ... can have their own subsystem ids?

Would be a good idea as a way to distinguish the QEMU impls for virtio devices, from 3rd party ones accessed via vhostuser.

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
#5 lore raw

PATCH 2/2 pci id: assign pci subsystem id for osmates

In reply to Gerd Hoffmann

Allows the guest driver to identify the host implementation, useful to be more specific when applying quirks etc.

Cc Đạt Ngô Quốc <[email protected]>
---
 docs/specs/pci-ids.rst | 4 ++++
 1 file changed, 4 insertions(+)
docs/specs/pci-ids.rst +4 -0
index 832f8bd1b802..45e0d22e71bd 100644
@@ -50,6 +50,10 @@ maintained as part of the virtio specification.
   QEMU, such as the intel chipset devices.  Also used for virtio
   devices and generic pci class devices (1b36:00xx, see below).
 
+1af4:1101
+  PCI Subsystem ID for OSMates (github.com/osmates), will be used
+  for virtio devices and pci class devices (xhci, nvme).
+
 1af4:1110
   ivshmem device (:doc:`ivshmem-spec`)
 
Signature · 1 line
2.56.0
#6 lore raw

Re: [PATCH 2/2] pci id: assign pci subsystem id for osmates

Quoted 14 lines · Gerd Hoffmann

Allows the guest driver to identify the host implementation, useful to be more specific when applying quirks etc.

Cc Đạt Ngô Quốc <[email protected]>
---
 docs/specs/pci-ids.rst | 4 ++++
 1 file changed, 4 insertions(+)
docs/specs/pci-ids.rst +0 -0
index 832f8bd1b802..45e0d22e71bd 100644

docs/specs/pci-ids.rst maintained as part of the virtio specification. · line 55

Quoted 6 lines
docs/specs/pci-ids.rst +3 -0
@@ -50,6 +50,10 @@ maintained as part of the virtio specification.
   QEMU, such as the intel chipset devices.  Also used for virtio
   devices and generic pci class devices (1b36:00xx, see below).
 
+1af4:1101
+  PCI Subsystem ID for OSMates (github.com/osmates), will be used
+  for virtio devices and pci class devices (xhci, nvme).

github.com/osmates appears to have no repositories, and the website linked from that profile has no A records. Does this even exist ?

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|