From nobody Mon Feb 9 16:02:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1586181122; cv=none; d=zohomail.com; s=zohoarc; b=jQEOID3ubk7LQZ3I8jvW21wb1vycQpiGtw8fvQ8Ek6lJAStcYpCRdoRHzQZ8tggYrwfkKLO09n+tzB3wV4FD7UqtHEpOzjf8khMxB6fgdnGucyKG0RYiagyPkxu+Yi2auoxMjpAVsDphQXZbUpSrNTLmMbfGGc314gglrI3OOD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586181122; 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=icXis0J7pFCjOtODlyPidSwzSqYq/Y2pEAJyfZmt0tc=; b=EtbbPNYOxMC6KDAwY9ap24iz8xtn31a10GES+rre2yE0J//rDpGZobNp0mgXrEPDdmf0alv6BUYEwJLj5pKSNNnFbm92bdjntcBtr8RwaBfqr+8Rq1WFYTAK4h4L0Ata+6IK6ZXZDnLJLPTTHCcchLNGpRJn0Hv/6uQy5EIMaZM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1586181122141557.986419936916; Mon, 6 Apr 2020 06:52:02 -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-278-ZsQ_qJlZObC9r5NMwUSmqw-1; Mon, 06 Apr 2020 09:51:59 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A7555107ACCA; Mon, 6 Apr 2020 13:51:51 +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 6937860BE0; Mon, 6 Apr 2020 13:51:51 +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 0053A18089CD; Mon, 6 Apr 2020 13:51:50 +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 036DpgkS018357 for ; Mon, 6 Apr 2020 09:51:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 596655C1B0; Mon, 6 Apr 2020 13:51:42 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-243.phx2.redhat.com [10.3.112.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A0165C1BB for ; Mon, 6 Apr 2020 13:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586181120; 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=icXis0J7pFCjOtODlyPidSwzSqYq/Y2pEAJyfZmt0tc=; b=CSLKWAFn4dHk2C+xddJwKXwHJodL0d7mzekiFK9Bz/CNg1UqSktdp9cmbzVC2A1c0Wgx76 ZuMcXgKgIcimmUh2LR5DtIGdmHulkIuFVhFQmcXNZkQHg1GDmdmYX69H72MdTZBvL8hflH h/qXfx0Aac4g0OzLZSvgveA2yCjSE0E= X-MC-Unique: ZsQ_qJlZObC9r5NMwUSmqw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 05/10] conf: add new PCI_CONNECT flag AUTOASSIGN Date: Mon, 6 Apr 2020 09:51:25 -0400 Message-Id: <20200406135130.3080946-6-laine@redhat.com> In-Reply-To: <20200406135130.3080946-1-laine@redhat.com> References: <20200406135130.3080946-1-laine@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.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This new flag will be set for any controller that we decide can have devices assigned to it automatically during PCI device assignment. In the past PCI_CONNECT_TYPE_HOTPLUGGABLE was used for this purpose, but that is overloading that flag, and no longer technically correct; what we *really* want is to auto-assign devices to any pcie-root-port or pcie-switch-downstream-port regardless of whether or not that controller happens to have hotplug enabled. This patch just adds the flag, but doesn't use it at all. Note that the numbering of all the other flags was changed in order to insert the new flag near the beginning of the list; that doesn't cause any problem because the connect flags aren't stored anywhere between runs of libvirtd. Signed-off-by: Laine Stump --- src/conf/domain_addr.h | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index dcb90618f8..40738ddb72 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -32,26 +32,27 @@ typedef enum { } virPCIDeviceAddressExtensionFlags; =20 typedef enum { - VIR_PCI_CONNECT_HOTPLUGGABLE =3D 1 << 0, /* is hotplug needed/supported= */ - - /* set for devices that can share a single slot in auto-assignment - * (by assigning one device to each of the 8 functions on the slot) - */ - VIR_PCI_CONNECT_AGGREGATE_SLOT =3D 1 << 1, - - /* kinds of devices as a bitmap so they can be combined (some PCI - * controllers permit connecting multiple types of devices) - */ - VIR_PCI_CONNECT_TYPE_PCI_DEVICE =3D 1 << 2, - VIR_PCI_CONNECT_TYPE_PCIE_DEVICE =3D 1 << 3, - VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT =3D 1 << 4, - VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT =3D 1 << 5, - VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT =3D 1 << 6, - VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE =3D 1 << 7, - VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS =3D 1 << 8, - VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS =3D 1 << 9, - VIR_PCI_CONNECT_TYPE_PCI_BRIDGE =3D 1 << 10, - VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE =3D 1 << 11, + VIR_PCI_CONNECT_AUTOASSIGN =3D 1 << 0, /* okay to autoassign a device = to this controller */ + VIR_PCI_CONNECT_HOTPLUGGABLE =3D 1 << 1, /* is hotplug needed/supporte= d */ + + /* set for devices that can share a single slot in auto-assignment + * (by assigning one device to each of the 8 functions on the slot) + */ + VIR_PCI_CONNECT_AGGREGATE_SLOT =3D 1 << 2, + + /* kinds of devices as a bitmap so they can be combined (some PCI + * controllers permit connecting multiple types of devices) + */ + VIR_PCI_CONNECT_TYPE_PCI_DEVICE =3D 1 << 3, + VIR_PCI_CONNECT_TYPE_PCIE_DEVICE =3D 1 << 4, + VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT =3D 1 << 5, + VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT =3D 1 << 6, + VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT =3D 1 << 7, + VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE =3D 1 << 8, + VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS =3D 1 << 9, + VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS =3D 1 << 10, + VIR_PCI_CONNECT_TYPE_PCI_BRIDGE =3D 1 << 11, + VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE =3D 1 << 12, } virDomainPCIConnectFlags; =20 /* a combination of all bits that describe the type of connections --=20 2.25.2