From nobody Mon May 6 14:31:32 2024 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=1675965635; cv=none; d=zohomail.com; s=zohoarc; b=Eph52EkLY+Lx5TO7AIpu3ozhg3pQO5ups0HOT1nBKf2Yv3Wvbjex8EPOEp7kmgu3cT/6iD9alKgKqLS65EV941k1YalwYMR72lFHEKtAWUZKA4hmZwy0CMgPWDA33pvxuNuFgM5VrnhgVmO1/VEDZT6h/KvgpozQPc47jgqWkqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675965635; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=5luVfsOIiCYYaBIn++/ArOyp8XEMZTTZebdPNMjlwV4=; b=QvYVaQEBi+MXJexyuzRH21VH/njHdSWWP9Ea4prE5uDaIYYVuB08c2eZ8rKQAoDLEuQ7wq8iGPNHCFZBzN9Hs/r3DXCVWuzggLrciFjEviUtHhvnGdER6tRCGxE9WqGAYMMG6Uu3gkPZ15ifef4oR/L4MWd/rYTSbqI5p3hmCkg= 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) 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 1675965635528130.89360543040584; Thu, 9 Feb 2023 10:00:35 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-20-ruhHSwyqNoOhPOVYsZb0vQ-1; Thu, 09 Feb 2023 13:00:30 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0ADB0293248C; Thu, 9 Feb 2023 18:00:28 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7EE640C83B6; Thu, 9 Feb 2023 18:00:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A5C60194658D; Thu, 9 Feb 2023 18:00:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9083B1946589 for ; Thu, 9 Feb 2023 18:00:26 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 65592C16023; Thu, 9 Feb 2023 18:00:26 +0000 (UTC) Received: from harajuku.usersys.redhat.com (ovpn-194-126.brq.redhat.com [10.40.194.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7A1DC16022 for ; Thu, 9 Feb 2023 18:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675965634; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5luVfsOIiCYYaBIn++/ArOyp8XEMZTTZebdPNMjlwV4=; b=AvuS+vdzY8X7qJOtsS3/HcXSHgAcLA7yZqLGLCWMQ6t6+mK8dpgupCYiN9aVktveBz8hX9 /GSttxm3VkKTDrL+phsBv6/oxPPkPC3XGNcIm52YUELAui5JEZxyIEhFpQNjBY4dRo9kAe goHPgXxNTUS5cmGjoQIb1a85LWWzhso= X-MC-Unique: ruhHSwyqNoOhPOVYsZb0vQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] conf: Allow conventional PCI devices to be marked as integrated Date: Thu, 9 Feb 2023 19:00:24 +0100 Message-Id: <20230209180024.927314-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1675965635985100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Integrated PCI devices can be either PCIe (virtio-iommu) or conventional PCI (pvpanic-pci). Right now libvirt will refuse to assign an address on pcie.0 for the latter, but that's an undesirable limitation that we can easily remove. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- src/conf/domain_addr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 76f9c12ca6..b6534f502c 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -306,8 +306,11 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress= *addr, if (addr->bus =3D=3D 0) { /* pcie-root doesn't usually allow endpoint devices to be * plugged directly into it, but for integrated devices - * that's exactly what we want */ - busFlags |=3D VIR_PCI_CONNECT_AUTOASSIGN; + * that's exactly what we want. It also refuses conventional + * PCI devices by default, but in the case of integrated + * devices both types are fine */ + busFlags |=3D VIR_PCI_CONNECT_TYPE_PCI_DEVICE | + VIR_PCI_CONNECT_AUTOASSIGN; } else { if (reportError) { virReportError(errType, --=20 2.39.1