From nobody Thu May 2 14:09:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664523568; cv=none; d=zohomail.com; s=zohoarc; b=XgkAVkE/JP12CkPh+8E2Hyqt4xq6AIWzMZF9Oy3HNaJbjJ84YTN8WYgg1vooZ2JS8lUXHEkIoVYvDnBuHtUII90GzIbiwEmKZN9nCkGWlQnl5te0rIxIYBYI05/7BRwHoVYFZQfLkoDMYpVtvdGnWYbH2Ec/VDlLmyAHLAIa520= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664523568; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Of1AtkM84qaowSNs9rl8Ms6Mrwaj03kW3fLY4NFyT2g=; b=BPc7tY1YfwdnNOihhoY6Vqq7uEC/fQlax0uTwnFKoxy0qYOoDQ7A1kLCM0YT3WtEel5sS5wmi9d9pN4pjyPSq36TmFfsXHMyc+wzwWijX1jYchd1hlQKuFr0J53uEnaQXJja7kcPdgMD02z8dbZpBGx9x2vpDQ0AEYLR9GuLNu4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1664523568991130.77631793880005; Fri, 30 Sep 2022 00:39:28 -0700 (PDT) Received: from localhost ([::1]:33472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeAcJ-0001WG-UE for importer@patchew.org; Fri, 30 Sep 2022 03:39:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeAYz-0007y4-3o for qemu-devel@nongnu.org; Fri, 30 Sep 2022 03:36:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:46728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeAYx-0006bM-6H for qemu-devel@nongnu.org; Fri, 30 Sep 2022 03:36:00 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-669-oGGkVN6hN_-k-jYyfzVXfQ-1; Fri, 30 Sep 2022 03:35:55 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BAA56185A794; Fri, 30 Sep 2022 07:35:54 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 799A640C6EC2; Fri, 30 Sep 2022 07:35:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2FC6B180039F; Fri, 30 Sep 2022 09:35:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664523358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Of1AtkM84qaowSNs9rl8Ms6Mrwaj03kW3fLY4NFyT2g=; b=GOAhPd4rEB7+evBjFVZykkzB/svYqF6OWwLzuxe9PUlPlS/lVRQkMSwC0uIX6xR/CX1fzN 24CquOkqHuZ52ckw1HZkaRtGZd5y0nYlVPeF261kV0p/YA5iZwA2agbW+YuOdIT4ZitkQ8 bb+ervOz6XPvCsCPFWy0GW3FirdL6TE= X-MC-Unique: oGGkVN6hN_-k-jYyfzVXfQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , "Michael S. Tsirkin" , peter.maydell@linaro.org, Gerd Hoffmann Subject: [PATCH] pci-ids: sync docs + header Date: Fri, 30 Sep 2022 09:35:53 +0200 Message-Id: <20220930073553.1626190-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.08, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664523570259100001 Content-Type: text/plain; charset="utf-8" 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 --- 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) =20 -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 + 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/. =20 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 =20 -/* 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 --=20 2.37.3