qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pci-ids: sync docs + header


From: Eric Auger
Subject: Re: [PATCH] pci-ids: sync docs + header
Date: Fri, 30 Sep 2022 10:07:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

Hi Gerd,

On 9/30/22 09:35, Gerd Hoffmann wrote:
> docs/specs/pci-ids.txt and include/hw/pci/pci.h are out of sync,
> fix that.  Try improve the comment which points to pci-ids.txt.
> 
> Also drop the list of modern virtio devices and explain how they
> are calculated instead.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  docs/specs/pci-ids.txt | 19 ++++++++++---------
>  include/hw/pci/pci.h   |  7 ++++++-
>  2 files changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt
> index dd6859d039d0..6be7bc108d66 100644
> --- a/docs/specs/pci-ids.txt
> +++ b/docs/specs/pci-ids.txt
> @@ -22,16 +22,17 @@ maintained as part of the virtio specification.
>  1af4:1004  SCSI host bus adapter device (legacy)
>  1af4:1005  entropy generator device (legacy)
>  1af4:1009  9p filesystem device (legacy)
> +1af4:1012  vsock device (legacy)
> +1af4:1013  pmem device (legacy)
> +1af4:1014  iommu device (legacy)
> +1af4:1015  mem device (legacy)
While I understand the 1af4:1040 range, I do not get where the above ids
come from. Could we add an explanation in the intro. Also there, we may
fix s/Note that this allocation separate/Note that this allocation is
separate. Also why do we have a hole inbetween 1009 and 1012?
>  
> -1af4:1041  network device (modern)
> -1af4:1042  block device (modern)
> -1af4:1043  console device (modern)
> -1af4:1044  entropy generator device (modern)
> -1af4:1045  balloon device (modern)
> -1af4:1048  SCSI host bus adapter device (modern)
> -1af4:1049  9p filesystem device (modern)
> -1af4:1050  virtio gpu device (modern)
> -1af4:1052  virtio input device (modern)
> +1af4:1040  Start of id range for modern virtio devices.  The pci device
> +           id is is calculated from the virtio device id by adding the
s/is is/is
> +           0x1040 offset.  The virtio ids are defined in the virtio
> +           specification.  The linux kernel has a header file with
> +           defines for all virtio ids (linux/virtio_ids.h), qemu has a
> +           copy in include/standard-headers/.
>  
>  1af4:10f0  Available for experimental usage without registration.  Must get
>     to      official ID when the code leaves the test lab (i.e. when seeking
> diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
> index b54b6ef88fc3..3b852199660c 100644
> --- a/include/hw/pci/pci.h
> +++ b/include/hw/pci/pci.h
> @@ -71,7 +71,12 @@ extern bool pci_available;
>  #define PCI_DEVICE_ID_INTEL_82557        0x1229
>  #define PCI_DEVICE_ID_INTEL_82801IR      0x2922
>  
> -/* Red Hat / Qumranet (for QEMU) -- see pci-ids.txt */
> +/*
> + * Red Hat / Qumranet (for QEMU)
> + *
> + * These are documented in docs/specs/pci-ids.txt
> + * PLEASE KEEP HEADER + DOCS IN SYNC
> + */
>  #define PCI_VENDOR_ID_REDHAT_QUMRANET    0x1af4
>  #define PCI_SUBVENDOR_ID_REDHAT_QUMRANET 0x1af4
>  #define PCI_SUBDEVICE_ID_QEMU            0x1100

Adding Jean in copy as we discussed that in
5641321a-4bec-2ca9-bb14-d5ed883a9ded@redhat.com/">https://lore.kernel.org/qemu-devel/5641321a-4bec-2ca9-bb14-d5ed883a9ded@redhat.com/

Thanks

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]