From nobody Sun Feb 8 05:07:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1617812735; cv=none; d=zohomail.com; s=zohoarc; b=AdWjxIRPr8cxaeEu/zGMnYOwDF5Q00WAzL0vgx5TiZhffwy3tVr/qXggwYiecX3j/fXb8Pj5k9JMmWx/vShY434+xxJI8sv5O1ktFI+miFfeP2dMiRL3M0Gg0HepALICW2p0vGpAm8jy3yBoNOc0uU+cOP758hLCdRcEfz/ASic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617812735; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Aez2Wld+ddc1iskjAr2ku6DWukN84gCKjzcEjA1ATtQ=; b=UEi4eaB+8Naenk+e9CWVPwmA+XqJl5ii8TtWyUeuDifBeJvMXbFtiVXJPc++cV+uGFVHrwEy152QuLAro25ZxREQKg1TMRZsXOftYiA7GQTeS9NTRRIz/NeJvgSj5tz8sOPOVoHGa3ee/d8RdT2WBbcWmEif5xTPRkxpdTPA7Oc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1617812735086248.46779060778658; Wed, 7 Apr 2021 09:25:35 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-94-EUMiD5LSOkCSxKN41YaEOA-1; Wed, 07 Apr 2021 12:25:31 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC6D08030B5; Wed, 7 Apr 2021 16:25:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B4375D6CF; Wed, 7 Apr 2021 16:25:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DE1601806D11; Wed, 7 Apr 2021 16:25:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 137GOoH4011020 for ; Wed, 7 Apr 2021 12:24:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 37EF518811; Wed, 7 Apr 2021 16:24:50 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-28.ams2.redhat.com [10.36.115.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E19F58823; Wed, 7 Apr 2021 16:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617812734; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Aez2Wld+ddc1iskjAr2ku6DWukN84gCKjzcEjA1ATtQ=; b=Zklc4cB5AhD+Lxt4NSDjPm6FlEwvF+qLEhPPFILC74kDWXSyQ4HYUjgJGKnXz2TfkH0mWB InoeKrZ+NQBiDWDi2l4ebUtFMnQN6/1j1jZ2jnwSX9m48PhbrSsfX7gwh075vA/syHL9V8 yyHg3PsnaRwhrR7UchuhHdFotWftv5k= X-MC-Unique: EUMiD5LSOkCSxKN41YaEOA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH v2 4/5] qemu: probe for "acpi-index" property Date: Wed, 7 Apr 2021 17:24:39 +0100 Message-Id: <20210407162440.421508-5-berrange@redhat.com> In-Reply-To: <20210407162440.421508-1-berrange@redhat.com> References: <20210407162440.421508-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This property is exposed by QEMU on any PCI device, but we have to pick some specific device(s) to probe it against. We expect that at least one of the virtio devices will be present, so probe against them. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_capabilities.c | 6 ++++++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + 3 files changed, 8 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 41ef199a79..37ed750f8b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -628,6 +628,7 @@ VIR_ENUM_IMPL(virQEMUCaps, =20 /* 400 */ "compat-deprecated", + "acpi-index", ); =20 =20 @@ -1366,6 +1367,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsVirtioBalloon[] { "ats", QEMU_CAPS_VIRTIO_PCI_ATS, NULL }, { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL }, { "free-page-reporting", QEMU_CAPS_VIRTIO_BALLOON_FREE_PAGE_REPORTING,= NULL }, + { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, }; =20 =20 @@ -1398,6 +1400,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsVirtioBlk[] =3D { { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL }, { "werror", QEMU_CAPS_STORAGE_WERROR, NULL }, { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL }, + { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[= ] =3D { @@ -1411,6 +1414,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsVirtioNet[] =3D { { "ats", QEMU_CAPS_VIRTIO_PCI_ATS, NULL }, { "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER, NULL }, { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL }, + { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPCIeRootPo= rt[] =3D { @@ -1431,6 +1435,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsVirtioSCSI[] =3D { { "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, NULL }, { "ats", QEMU_CAPS_VIRTIO_PCI_ATS, NULL }, { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL }, + { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVfioPCI[] = =3D { @@ -1502,6 +1507,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsVirtioGpu[] =3D { { "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, NULL }, { "ats", QEMU_CAPS_VIRTIO_PCI_ATS, NULL }, { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL }, + { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, }; =20 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsICH9[] =3D= { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index c553a5f4a4..1ca9c1ea7b 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -608,6 +608,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ =20 /* 400 */ QEMU_CAPS_COMPAT_DEPRECATED, /* -compat deprecated-(input|output) is s= upported */ + QEMU_CAPS_ACPI_INDEX, /* PCI device 'acpi-index' property */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index 8d12645a8e..8cc949d735 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -262,6 +262,7 @@ + 5002092 0 43100242 --=20 2.30.2