From nobody Sun Feb 8 14:11:30 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=fail(p=none dis=none) header.from=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1696575742; cv=none; d=zohomail.com; s=zohoarc; b=claDOBZTamGO098CdZB7c14VCev3HgC2GWOyxTm3y8jRgLRUQ9QGS/oMs3JS1mcbi3yyQMWTK/CM+HM2DWUWe2khm7dfBQ2cjHKZrLFeyMXDUOQ9rBqH1nplQhsHakFcaippmfpuNdAsTmKHQ7vIdoMywlfnnp2i8s7O0StBTZc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696575742; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=omrplJ5DXbdVUBi7nSm2gcgPywdsIfJgLfafMqlPUr4=; b=dfzu5qjdaxgbuRTzG8/Qx+eKJKN0icPBwMIluXs+iDy0W9u3xSEe4v+ioAIzTfvsbsjplko9o3lD6uxmvrAQvcXv9388YgEfC0lAjENqdc6837uZ9xL32O2ZRPejd7c4vN73u+42yhEic4nG2l3x7w79T3+akdmWXex+cY7I0Yg= 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=fail 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 16965757424851018.3869030083931; Fri, 6 Oct 2023 00:02:22 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.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-630-gWV5qGESOCmM3wu-DO36Eg-1; Fri, 06 Oct 2023 03:02:12 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8571A1C0652B; Fri, 6 Oct 2023 07:02:08 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41DAF40C6EA8; Fri, 6 Oct 2023 07:02:08 +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 E14FF19465B8; Fri, 6 Oct 2023 07:02:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 21D9D19465A2 for ; Thu, 5 Oct 2023 23:06:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 04969111CD24; Thu, 5 Oct 2023 23:06:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0869111CD23 for ; Thu, 5 Oct 2023 23:06:21 +0000 (UTC) Received: from us-smtp-inbound-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D1052101AA42 for ; Thu, 5 Oct 2023 23:06:21 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-297-cPNYiwsIMSivTAazoAiqEA-2; Thu, 05 Oct 2023 19:06:19 -0400 Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 16:05:14 -0700 Received: from vivk-mobl.amr.corp.intel.com ([10.209.123.159]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 16:05:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696575741; 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=omrplJ5DXbdVUBi7nSm2gcgPywdsIfJgLfafMqlPUr4=; b=ZwhmsHiGY9Te1E3Cv8A+/9KdR33rpjd7izpU27Ta1fqOkbkBjp7whv6wucRbPyGyQYO05R EIlW0Hr4n84QjsSkv3EFLSu5yq258DphOwf7paId4LtaVCnp35AgAOxKwwrr+TWbVyuEEh /GTfPcblB3OldiDMcQ/zqQhhWBiv6m0= X-MC-Unique: gWV5qGESOCmM3wu-DO36Eg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: cPNYiwsIMSivTAazoAiqEA-2 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="373991640" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="373991640" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="745647273" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="745647273" From: Vivek Kashyap To: libvir-list@redhat.com, ciara.loftus@intel.com, vivek.kashyap@linux.intel.com Subject: [RFC: vf-token 3/5] conf: vf-token flag Date: Thu, 5 Oct 2023 16:05:02 -0700 Message-Id: <20231005230504.16838-4-vivek.kashyap@linux.intel.com> In-Reply-To: <20231005230504.16838-1-vivek.kashyap@linux.intel.com> References: <20231005230504.16838-1-vivek.kashyap@linux.intel.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mailman-Approved-At: Fri, 06 Oct 2023 07:02:06 +0000 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.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linux.intel.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696575743611100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Define PCI address extension flag for vf-token Signed-off-by: Vivek Kashyap --- src/conf/device_conf.h | 3 +++ src/conf/domain_addr.h | 1 + src/qemu/qemu_domain_address.c | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h index a83377417a..29e03baa99 100644 --- a/src/conf/device_conf.h +++ b/src/conf/device_conf.h @@ -188,6 +188,9 @@ bool virDeviceInfoPCIAddressExtensionIsPresent(const vi= rDomainDeviceInfo *info); int virPCIDeviceAddressParseXML(xmlNodePtr node, virPCIDeviceAddress *addr); =20 +int virPCIDeviceTokenParseXML(xmlNodePtr node, + virPCIDeviceAddress *addr); + void virPCIDeviceAddressFormat(virBuffer *buf, virPCIDeviceAddress addr, bool includeTypeInAddr); diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index e72fb48847..bca96ee797 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -29,6 +29,7 @@ typedef enum { VIR_PCI_ADDRESS_EXTENSION_NONE =3D 0, /* no extension */ VIR_PCI_ADDRESS_EXTENSION_ZPCI =3D 1 << 0, /* zPCI support */ + VIR_PCI_ADDRESS_EXTENSION_VFTOKEN =3D 1 << 1, /* Token support */ } virPCIDeviceAddressExtensionFlags; =20 typedef enum { diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 099778b2a8..3be5acbc9e 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -575,6 +575,9 @@ qemuDomainDeviceCalculatePCIAddressExtensionFlags(virQE= MUCaps *qemuCaps, extFlags |=3D VIR_PCI_ADDRESS_EXTENSION_ZPCI; } =20 + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VFIO_VFTOKEN)) + extFlags |=3D VIR_PCI_ADDRESS_EXTENSION_VFTOKEN; + return extFlags; } =20 --=20 2.25.1