Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp438498pxp; Wed, 16 Mar 2022 08:46:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxBhjFg61VnE4kT9WR/6qAXwhvN0iKgahopTrPljNWw4A7cYgy40TEX0p2OTBvw1EMv4yh X-Received: by 2002:a63:1a04:0:b0:381:edc8:66b1 with SMTP id a4-20020a631a04000000b00381edc866b1mr168054pga.131.1647445561044; Wed, 16 Mar 2022 08:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647445561; cv=none; d=google.com; s=arc-20160816; b=hQXYzyxhtdkxhBwNai3/DRO6kd3L12zxHpJIdLVkxhq2kbY2KbzzSAsfvRvGPrrEdL +Yee2YwgVIyuuv6bMvfdAazCjoYY9CeWp7/O7sC7pPTBI2TouZ1IZ4VfQke3fM2G4HEm +8HtSZ5p6nT4lkC2VmXUsqCPWeF2lyQe8IBU5uCyDNKVLR/f33BpJhVItfDStZgBPj3e Cvyc4wA+rMmEYaUpLnCh5tjf04Ya4uDdRKn6y23kfJJYGKuC4Z/cdQ6N7TPx92dpsNam l+L7ciUkO4e28anQDhHJETyBMFxrwrfOGlvvtctbBev2xlIEZwtoqhFM6Oe5RncRQScY YDFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PuQofBb7+tIYgxq4WjR9Y7Armh4WYhCMUVtj9AtLoyE=; b=nLbn4uEAWC49f/ar7Ijt519fswHhQlIKmECHHYArwc4BpyT84mdMi7ej0nUirsjJ6u Bf/5pMKiAdIw+fs2fjtG1fPpsaMADRyWPC3T5bYAgxA0CJwlqKmDYKBZ8NF15cqBlFdq 7+JDnW49W0etA7I8ZRo9FGlU53YM5Fho5i80dIscOyq26tnGuqO5Dl2A2mE2/eedUAvA 4h8JMcQFvw+5k3Y2GQCyF0OTQUH/vSeCp0gjF9gxkPKGPxkKA1USEdZEkRZbPK49bqbp jb7uzUnYcWuQIyIoufxOZpo07rwn1QSruA3j2/XePW2xnj1q7ltM5witTEWroaJkqUff aB+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dO14GkbV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a170902e5d100b00153c2e0720fsi1301981plf.323.2022.03.16.08.45.27; Wed, 16 Mar 2022 08:46:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dO14GkbV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244481AbiCNTtf (ORCPT + 99 others); Mon, 14 Mar 2022 15:49:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244507AbiCNTt0 (ORCPT ); Mon, 14 Mar 2022 15:49:26 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABAAF264D; Mon, 14 Mar 2022 12:48:00 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22EJlWr9006592; Mon, 14 Mar 2022 19:47:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=PuQofBb7+tIYgxq4WjR9Y7Armh4WYhCMUVtj9AtLoyE=; b=dO14GkbV+iZaARMc2bUmcIiuAmMXQ6WjDvWVaWXMw1zSfABlRMyOYrzldTEKMJWd1Jrr EYR6CbrcEBZ3Qmz79j1CjyTC8doUboFPruHnVEnqO6SruadO7wGiZPMdWCAFDgRToLT7 aON/bOVU4x4WVLCeDiInB8rqxSF0iST+spFOmk+I5mnb5bUOD3NE6Zl9N9T79LgwiB0z z88UNzgpyaBw7zH1d6Gb81ujtbMQkOPuJpN5Bv3Y/WDEbZnyR7xRJwB0EDevxxm46xx1 +k2eaxysO+7VC9BX0corrhvlqidyMe0WMfq2CS4H/gI+xpnoom/9urHhUUv4TyVfBIBI jg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3et6d6rj1v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Mar 2022 19:47:52 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 22EJlq28007704; Mon, 14 Mar 2022 19:47:52 GMT Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com with ESMTP id 3et6d6rj1p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Mar 2022 19:47:52 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22EJl6kt014267; Mon, 14 Mar 2022 19:47:51 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma02wdc.us.ibm.com with ESMTP id 3erk59g80w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Mar 2022 19:47:51 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22EJlomM33358132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Mar 2022 19:47:50 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 14C8D112065; Mon, 14 Mar 2022 19:47:50 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B280F11206D; Mon, 14 Mar 2022 19:47:39 +0000 (GMT) Received: from li-c92d2ccc-254b-11b2-a85c-a700b5bfb098.ibm.com.com (unknown [9.211.32.184]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 14 Mar 2022 19:47:39 +0000 (GMT) From: Matthew Rosato To: linux-s390@vger.kernel.org Cc: alex.williamson@redhat.com, cohuck@redhat.com, schnelle@linux.ibm.com, farman@linux.ibm.com, pmorel@linux.ibm.com, borntraeger@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, gerald.schaefer@linux.ibm.com, agordeev@linux.ibm.com, svens@linux.ibm.com, frankja@linux.ibm.com, david@redhat.com, imbrenda@linux.ibm.com, vneethv@linux.ibm.com, oberpar@linux.ibm.com, freude@linux.ibm.com, thuth@redhat.com, pasic@linux.ibm.com, joro@8bytes.org, will@kernel.org, pbonzini@redhat.com, corbet@lwn.net, jgg@nvidia.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-doc@vger.kernel.org Subject: [PATCH v4 16/32] vfio-pci/zdev: add function handle to clp base capability Date: Mon, 14 Mar 2022 15:44:35 -0400 Message-Id: <20220314194451.58266-17-mjrosato@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220314194451.58266-1-mjrosato@linux.ibm.com> References: <20220314194451.58266-1-mjrosato@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 6jbmhAzBg2zm78JKdgnxOhtkfSemGLkY X-Proofpoint-ORIG-GUID: _JmfYbvDKH7XHZ-gd0kDrfBNvKRtmePx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-14_13,2022-03-14_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 suspectscore=0 spamscore=0 mlxlogscore=876 mlxscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203140116 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function handle is a system-wide unique identifier for a zPCI device. It is used as input for various zPCI operations. Signed-off-by: Matthew Rosato --- drivers/vfio/pci/vfio_pci_zdev.c | 5 +++-- include/uapi/linux/vfio_zdev.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_zdev.c b/drivers/vfio/pci/vfio_pci_zdev.c index ea4c0d2b0663..4a653ce480c7 100644 --- a/drivers/vfio/pci/vfio_pci_zdev.c +++ b/drivers/vfio/pci/vfio_pci_zdev.c @@ -23,14 +23,15 @@ static int zpci_base_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps) { struct vfio_device_info_cap_zpci_base cap = { .header.id = VFIO_DEVICE_INFO_CAP_ZPCI_BASE, - .header.version = 1, + .header.version = 2, .start_dma = zdev->start_dma, .end_dma = zdev->end_dma, .pchid = zdev->pchid, .vfn = zdev->vfn, .fmb_length = zdev->fmb_length, .pft = zdev->pft, - .gid = zdev->pfgid + .gid = zdev->pfgid, + .fh = zdev->fh }; return vfio_info_add_capability(caps, &cap.header, sizeof(cap)); diff --git a/include/uapi/linux/vfio_zdev.h b/include/uapi/linux/vfio_zdev.h index b4309397b6b2..78c022af3d29 100644 --- a/include/uapi/linux/vfio_zdev.h +++ b/include/uapi/linux/vfio_zdev.h @@ -29,6 +29,9 @@ struct vfio_device_info_cap_zpci_base { __u16 fmb_length; /* Measurement Block Length (in bytes) */ __u8 pft; /* PCI Function Type */ __u8 gid; /* PCI function group ID */ + /* End of version 1 */ + __u32 fh; /* PCI function handle */ + /* End of version 2 */ }; /** -- 2.27.0