From nobody Mon Aug 10 23:15:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hJrGK2jxBz6m8Wn for ; Mon, 10 Aug 2026 23:15:53 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hJrGG5TRBz3xkQ for ; Mon, 10 Aug 2026 23:15:50 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=kev009.com header.s=google header.b=tnzN1d+Q; arc=pass ("google.com:s=arc-20260327:i=1"); spf=pass (mx1.freebsd.org: domain of kevin.bowling@kev009.com designates 2607:f8b0:4864:20::833 as permitted sender) smtp.mailfrom=kevin.bowling@kev009.com; dmarc=none Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-51c149c5722so3675971cf.0 for ; Mon, 10 Aug 2026 16:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1786403748; cv=none; d=google.com; s=arc-20260327; b=MbmRgvzLSFnU9eb8vrJRkUDyahAk2fpufvtfvQcqotuNF7nsaBW6u+1snSjavvw1Xm Wl2QuAOe9IKrKaD2YPJdEgAbFaejbZw4nAygGKgsJuiGvjGLepwRqJcHvTZcYBy/L82u w+0n+RGjuMPbx7RB6kPHEIO+S6wUckd4usZaeZISqRYzBAC4K8jBZGKRoImrNc3wkesU ZXr3ON+OGJzuB5/PGk5v3c0oJl33RQ3ZzBp53bszQGbYTeJ++fRvjyCEAE4AyKpqXYlv ppMNEmj6gDbSOUHSdNBoZqh/JBSCaxWL1a4KyRAkMxu+JvHPbETir1hCy9VA1jDGWQ94 9cLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xrqJE4RmtA8MLO6mnDsLS2oaYMKu+rloP2obZJ2O1pA=; fh=6QBQp4U7y6QoMX3b5ghQq+QGkvAVfkLm/id17u833MM=; b=qd9r42QnIk/oAlfuq9qrDmJZdI0qgoPLvSYWujXHGYoWi2S7QlqH/jpQYfaXQvxs3r eBN0x6AtGPWIhaM1DZiEUK77X3a7nFv5r6SyQxMZxrRKD8Eb9SJZTZ44Cxs/FMsT53aR 1rd2YytcCsvFlPou1YuuOT1tyITbf5hzUXRCVR3lkYYtWoibUzJH98bj7vBsl9bTovFf bLt7zPhvPKAo+6HmZPLHHkqDa3pPNLN5BBDvfyDlEvZmBtUqvxN79RDhlH919lsjlra9 4ECwIbt4/GeNgnWejZTnDyhpQ9lJydJLZP9UMGVS405TxuJZ1qkpGWDIwoIr8ejM7lpa +bEA==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; t=1786403748; x=1787008548; darn=freebsd.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=xrqJE4RmtA8MLO6mnDsLS2oaYMKu+rloP2obZJ2O1pA=; b=tnzN1d+QnsE0c4ulHoX8a3tjxI211Grh3iU5KlIYR9lXsU4IKSCJ0jdMhrY0MHG8w7 s1zz+/DAMK4tI9Jw8nnks1Sv5bE2nXYBOSXUW77m3fTYqS67vP22zKq34qvjAopVeiOW rhmBU3S9GxOJRDsmJadEgPhvbfw3sYDisKdDY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786403748; x=1787008548; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=xrqJE4RmtA8MLO6mnDsLS2oaYMKu+rloP2obZJ2O1pA=; b=nDFAwx6Rtad9gc/V9vVhieppPkCIAfyOBVyFYsIWDNruK00qnm4bZ4FKYv9c7v0OMV GDV2nrqy1lvxcZcuMd+zyrl0Zf9SLws9GxwD+0iOZs6776syCqyPlofjpnvTaJPaJjSu RzY7pf+f7RAUS+SVKigT01mz1eZfRTiMnUhu7HlvEz4xpi07FLcGsWbIKOVfmf+ouYEv 5JppY6LOi2vwJI/ixjygUnvcPEphtRZAKUb9UAfvBWjidLwvIvUBMh8ZpEEvyhwEityj kAQTkVzHN/jQHjHCZN/w0wYS77tokOC3Up0jr0I7LkrecYZ8YILR0QTZb0hk99pAEoip ACxg== X-Forwarded-Encrypted: i=1; AHgh+Rovtv+w+KVRlc6SAKuY4KXC9VUDqY8ivU3WgP38xonsQxk+GMJjzdFn1jxEoQWrqhiTFKCPnQWMunJFkEfJpELwu6QQXQ==@freebsd.org X-Gm-Message-State: AOJu0Yz3sBCktYY500UMcf+xMNCG0l9INcSYzcd/hG74+DPz5DIUJ8mJ KK82Vhwb4RxsuNcjl+9KbTVn32bLnNYM3dDNn5EgAWqhoykZxpRmeXYl3gnkMRU43cnbBbbpmmY rd2jyxoopDhFNbWQElmilKLTNzaENhH+whdZ6Fe99 X-Gm-Gg: AR+sD13qsl0ZXHpS2ZXs+GtobMRD3YN5egDFhkE8WqexGQVbZyWAOW0ftQLXhIdknDs Npv8GgBsWZl2VgLN5yE3B2XzuW9eD7Jp6WqBm0iSwFX9xiEgybGbE7JPMEM8VnGaSsIZp/jm2bC kAMGlixwcZL9YSqY5UUY2b57V/vyNDBwvOOVGhrCftEA5PBjOa8N25npxsWasaMer22twvyQ8Yw Vt95Sc9cbBf2GkbSMT7qUAS+Eo91dqNE31+cwLoOXHJxESJ79PR4djSjGBxAE5kC2haZjtimXnU uiS7qnPXVhXjPKs2GGFFUvG/2vn7H5/iJc6rADPM1LFDm09GYcc1BOXyJ1LEyA+lKLYZrcJLYpB wmwFH1T5tsFlZkMHERiJqBgTRWMsdXkF51h0woVREudbPll2fOxMn3JxrOj7wW3h1ipME35hSpQ MmxP3kaadbdA== X-Received: by 2002:a05:622a:1786:b0:528:1bad:a2a4 with SMTP id d75a77b69052e-52d514f29d4mr18752251cf.15.1786403748076; Mon, 10 Aug 2026 16:15:48 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a782292.1895b.72e40e68@gitrepo.freebsd.org> In-Reply-To: From: Kevin Bowling Date: Mon, 10 Aug 2026 16:15:35 -0700 X-Gm-Features: AUfX_mxPeLLjjDS1pBsPfNutjKlsAseR1tCG9lz5D3n5aSWa51qYNeUNwFixq6s Message-ID: Subject: Re: git: 6f8b3be1fbd6 - main - pci: Add SR-IOV status reporting To: Oliver Pinter Cc: Kevin Bowling , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-4.28 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_LONG(-1.00)[-0.996]; NEURAL_HAM_MEDIUM(-0.99)[-0.989]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::833:from]; R_DKIM_PERMFAIL(0.00)[kev009.com:s=google]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; TAGGED_RCPT(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; MISSING_XM_UA(0.00)[]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[kev009.com]; DKIM_TRACE(0.00)[kev009.com:~] X-Rspamd-Queue-Id: 4hJrGG5TRBz3xkQ X-Spamd-Bar: ---- On Mon, Aug 10, 2026 at 3:52=E2=80=AFPM Oliver Pinter wrote: > > > > On Sunday, August 9, 2026, Kevin Bowling wrote: >> >> The branch main has been updated by kbowling: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D6f8b3be1fbd661bfa11c55081= 851c36ee1d5d2c1 >> >> commit 6f8b3be1fbd661bfa11c55081851c36ee1d5d2c1 >> Author: Kevin Bowling >> AuthorDate: 2026-08-09 02:03:49 +0000 >> Commit: Kevin Bowling >> CommitDate: 2026-08-09 06:46:41 +0000 >> >> pci: Add SR-IOV status reporting >> >> Add a generic packed-nvlist status query to each /dev/iov/ >> control device. Report the live VF Enable state, configured and tot= al >> VF counts, and one record for each configured VF. >> >> Each VF record contains its PF-local index, computed PCI location, >> newbus attachment state, attached driver, and ppt binding. Construc= t >> records for hardware VFs whose newbus child is absent so attachment >> failures remain visible. >> >> Version the extensible schema in sys/iov.h. Use fixed-width request >> fields so the ioctl command and layout are identical for 32-bit call= ers. >> Serialize the topology snapshot with Giant, then pack and copy it af= ter >> releasing Giant. > > > Hi! > > Just curiosity, why introducing Giant lock usage in FreeBSD in 2026? Wasn= 't there some very heavy efforts to kill it with fire from the kernel befor= e? Did you look at https://cgit.freebsd.org/src/tree/sys/dev/pci/pci_iov.c? It's the required topology lock. Take another look and see if you can help. >> >> --- >> sys/dev/pci/pci_iov.c | 174 +++++++++++++++++++++++++++++++++++++++++++= ++++++- >> sys/sys/iov.h | 46 +++++++++++++ >> 2 files changed, 219 insertions(+), 1 deletion(-) >> >> diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c >> index 643f0e59b9b8..00a9c8e8be72 100644 >> --- a/sys/dev/pci/pci_iov.c >> +++ b/sys/dev/pci/pci_iov.c >> @@ -27,6 +27,7 @@ >> #include >> #include "opt_bus.h" >> >> +#include >> #include >> #include >> #include >> @@ -875,6 +876,129 @@ pci_iov_is_child_vf(struct pcicfg_iov *pf, device_= t child) >> return (pf =3D=3D vfinfo->cfg.iov); >> } >> >> +static int >> +pci_iov_build_status(struct pci_devinfo *dinfo, nvlist_t **statusp) >> +{ >> + const char *driver; >> + device_t bus, child, dev, pcib, *devlist, *vfdevs; >> + nvlist_t *pf, *status, **vfs; >> + struct pcicfg_iov *iov; >> + struct pci_devinfo *vfinfo; >> + bool attached, passthrough; >> + int busno, devcount, error, func, i, slot; >> + uint16_t rid_off, rid_stride, vf_rid; >> + >> + mtx_assert(&Giant, MA_OWNED); >> + >> + iov =3D dinfo->cfg.iov; >> + dev =3D dinfo->cfg.dev; >> + bus =3D device_get_parent(dev); >> + pcib =3D device_get_parent(bus); >> + devlist =3D NULL; >> + vfdevs =3D NULL; >> + vfs =3D NULL; >> + status =3D NULL; >> + pf =3D NULL; >> + error =3D 0; >> + >> + if (iov->iov_num_vfs !=3D 0) { >> + vfdevs =3D mallocarray(iov->iov_num_vfs, sizeof(*vfdevs)= , >> + M_SRIOV, M_WAITOK | M_ZERO); >> + error =3D device_get_children(bus, &devlist, &devcount); >> + if (error !=3D 0) >> + goto out; >> + for (i =3D 0; i < devcount; i++) { >> + child =3D devlist[i]; >> + if (!pci_iov_is_child_vf(iov, child)) >> + continue; >> + vfinfo =3D device_get_ivars(child); >> + if (vfinfo->cfg.vf.index < iov->iov_num_vfs) >> + vfdevs[vfinfo->cfg.vf.index] =3D child; >> + } >> + } >> + >> + status =3D nvlist_create(0); >> + pf =3D nvlist_create(0); >> + if (status =3D=3D NULL || pf =3D=3D NULL) { >> + error =3D ENOMEM; >> + goto out; >> + } >> + nvlist_add_number(status, IOV_STATUS_VERSION_NAME, IOV_STATUS_VE= RSION); >> + nvlist_add_string(pf, IOV_STATUS_DEVICE_NAME, device_get_nameuni= t(dev)); >> + nvlist_add_stringf(pf, IOV_STATUS_PCI_LOCATION_NAME, "pci%u:%u:%= u:%u", >> + (u_int)pci_get_domain(dev), (u_int)pci_get_bus(dev), >> + (u_int)pci_get_slot(dev), (u_int)pci_get_function(dev)); >> + nvlist_add_bool(pf, IOV_STATUS_ENABLED_NAME, >> + (IOV_READ(dinfo, PCIR_SRIOV_CTL, 2) & PCIM_SRIOV_VF_EN) !=3D= 0); >> + nvlist_add_number(pf, IOV_STATUS_NUM_VFS_NAME, iov->iov_num_vfs)= ; >> + nvlist_add_number(pf, IOV_STATUS_TOTAL_VFS_NAME, >> + IOV_READ(dinfo, PCIR_SRIOV_TOTAL_VFS, 2)); >> + error =3D nvlist_error(pf); >> + if (error !=3D 0) >> + goto out; >> + nvlist_move_nvlist(status, IOV_STATUS_PF_NAME, pf); >> + pf =3D NULL; >> + >> + if (iov->iov_num_vfs !=3D 0) >> + vfs =3D mallocarray(iov->iov_num_vfs, sizeof(*vfs), M_SR= IOV, >> + M_WAITOK | M_ZERO); >> + rid_off =3D IOV_READ(dinfo, PCIR_SRIOV_VF_OFF, 2); >> + rid_stride =3D IOV_READ(dinfo, PCIR_SRIOV_VF_STRIDE, 2); >> + vf_rid =3D pci_get_rid(dev) + rid_off; >> + for (i =3D 0; i < iov->iov_num_vfs; i++, vf_rid +=3D rid_stride)= { >> + vfs[i] =3D nvlist_create(0); >> + if (vfs[i] =3D=3D NULL) { >> + error =3D ENOMEM; >> + goto out; >> + } >> + nvlist_add_number(vfs[i], IOV_STATUS_VF_INDEX_NAME, i); >> + child =3D vfdevs[i]; >> + if (child !=3D NULL) { >> + busno =3D pci_get_bus(child); >> + slot =3D pci_get_slot(child); >> + func =3D pci_get_function(child); >> + } else >> + PCIB_DECODE_RID(pcib, vf_rid, &busno, &slot, &fu= nc); >> + nvlist_add_stringf(vfs[i], IOV_STATUS_PCI_LOCATION_NAME, >> + "pci%u:%u:%u:%u", (u_int)pci_get_domain(dev), >> + (u_int)busno, (u_int)slot, (u_int)func); >> + attached =3D child !=3D NULL && device_is_attached(child= ); >> + passthrough =3D child !=3D NULL && device_get_name(child= ) !=3D NULL && >> + strcmp(device_get_name(child), "ppt") =3D=3D 0; >> + nvlist_add_bool(vfs[i], IOV_STATUS_ATTACHED_NAME, attach= ed); >> + nvlist_add_bool(vfs[i], IOV_STATUS_PASSTHROUGH_NAME, >> + passthrough); >> + if (attached) { >> + driver =3D device_get_nameunit(child); >> + if (driver !=3D NULL) >> + nvlist_add_string(vfs[i], >> + IOV_STATUS_BOUND_DRIVER_NAME, driver= ); >> + } >> + error =3D nvlist_error(vfs[i]); >> + if (error !=3D 0) >> + goto out; >> + } >> + if (iov->iov_num_vfs !=3D 0) >> + nvlist_add_nvlist_array(status, IOV_STATUS_VFS_NAME, >> + (const nvlist_t * const *)vfs, iov->iov_num_vfs); >> + error =3D nvlist_error(status); >> + if (error !=3D 0) >> + goto out; >> + *statusp =3D status; >> + status =3D NULL; >> +out: >> + if (vfs !=3D NULL) { >> + for (i =3D 0; i < iov->iov_num_vfs; i++) >> + nvlist_destroy(vfs[i]); >> + free(vfs, M_SRIOV); >> + } >> + nvlist_destroy(pf); >> + nvlist_destroy(status); >> + free(vfdevs, M_SRIOV); >> + free(devlist, M_TEMP); >> + return (error); >> +} >> + >> static int >> pci_iov_delete_iov_children(struct pci_devinfo *dinfo) >> { >> @@ -985,7 +1109,8 @@ pci_iov_get_schema_ioctl(struct cdev *cdev, struct = pci_iov_schema *output) >> { >> struct pci_devinfo *dinfo; >> void *packed; >> - size_t output_len, size; >> + size_t size; >> + uint64_t output_len; >> int error; >> >> packed =3D NULL; >> @@ -1025,6 +1150,50 @@ fail: >> return (error); >> } >> >> +static int >> +pci_iov_get_status_ioctl(struct cdev *cdev, struct pci_iov_status *outp= ut) >> +{ >> + struct pci_devinfo *dinfo; >> + nvlist_t *status; >> + void *packed; >> + size_t output_len, size; >> + int error; >> + >> + status =3D NULL; >> + packed =3D NULL; >> + if (output->reserved !=3D 0) >> + return (EINVAL); >> + mtx_lock(&Giant); >> + dinfo =3D cdev->si_drv1; >> + error =3D pci_iov_build_status(dinfo, &status); >> + mtx_unlock(&Giant); >> + if (error !=3D 0) >> + goto out; >> + >> + packed =3D nvlist_pack(status, &size); >> + if (packed =3D=3D NULL) { >> + error =3D ENOMEM; >> + goto out; >> + } >> + >> + output_len =3D output->len; >> + output->len =3D size; >> + if (size <=3D output_len) { >> + error =3D copyout(packed, PTRIN(output->status), size); >> + if (error !=3D 0) >> + goto out; >> + output->error =3D 0; >> + } else { >> + /* Keep the ioctl successful so the required size is cop= ied out. */ >> + output->error =3D EMSGSIZE; >> + } >> + error =3D 0; >> +out: >> + free(packed, M_NVLIST); >> + nvlist_destroy(status); >> + return (error); >> +} >> + >> static int >> pci_iov_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, >> struct thread *td) >> @@ -1038,6 +1207,9 @@ pci_iov_ioctl(struct cdev *dev, u_long cmd, caddr_= t data, int fflag, >> case IOV_GET_SCHEMA: >> return (pci_iov_get_schema_ioctl(dev, >> (struct pci_iov_schema *)data)); >> + case IOV_GET_STATUS: >> + return (pci_iov_get_status_ioctl(dev, >> + (struct pci_iov_status *)data)); >> default: >> return (EINVAL); >> } >> diff --git a/sys/sys/iov.h b/sys/sys/iov.h >> index 2ae7e5ac6767..67a890bba66f 100644 >> --- a/sys/sys/iov.h >> +++ b/sys/sys/iov.h >> @@ -164,6 +164,51 @@ struct pci_iov_schema >> int error; >> }; >> >> +/* >> + * IOV_GET_STATUS schema contract. >> + * >> + * The top-level nvlist contains a version number, a PF nvlist, and, wh= en VFs >> + * are configured, an array of per-VF nvlists. The "vfs" key is omitte= d when >> + * "num-vfs" is zero; its absence therefore means no VFs are configured= . The >> + * PF record identifies the device, reports the live SR-IOV VF Enable s= tate, >> + * and gives the number of VFs configured by the PCI IOV framework and = the >> + * hardware limit. When present, the array contains one VF record for = each >> + * configured VF, even when its newbus child could not be attached. >> + * >> + * PCI locations use FreeBSD's native decimal pciD:B:S:F notation (for >> + * example, pci0:2:16:2). "attached" means that newbus successfully at= tached >> + * a driver. "bound-driver" is present only for an attached VF and con= tains >> + * the driver's nameunit. "passthrough" means that the VF has the ppt = host >> + * devclass; it does not imply that a running virtual machine currently= owns >> + * the VF. >> + * >> + * Consumers must ignore unknown keys. Additive optional keys retain t= he >> + * status version; incompatible type or structural changes require a ne= w >> + * version. >> + */ >> +#define IOV_STATUS_VERSION 1 >> +#define IOV_STATUS_VERSION_NAME "version" >> +#define IOV_STATUS_PF_NAME "pf" >> +#define IOV_STATUS_VFS_NAME "vfs" >> +#define IOV_STATUS_DEVICE_NAME "device" >> +#define IOV_STATUS_PCI_LOCATION_NAME "pci-location" >> +#define IOV_STATUS_ENABLED_NAME "enabled" >> +#define IOV_STATUS_NUM_VFS_NAME "num-vfs" >> +#define IOV_STATUS_TOTAL_VFS_NAME "total-vfs" >> +#define IOV_STATUS_VF_INDEX_NAME "index" >> +#define IOV_STATUS_ATTACHED_NAME "attached" >> +#define IOV_STATUS_BOUND_DRIVER_NAME "bound-driver" >> +#define IOV_STATUS_PASSTHROUGH_NAME "passthrough" >> + >> +/* Fixed-width fields keep the ioctl ABI identical for 32-bit callers. = */ >> +struct pci_iov_status >> +{ >> + uint64_t status; /* User pointer to the packed nvlist. */ >> + uint64_t len; >> + int32_t error; >> + uint32_t reserved; /* Must be zero. */ >> +}; >> + >> /* >> * SR-IOV configuration is passed to the kernel as a packed nvlist. Se= e nv(3) >> * for the details of the nvlist API. The expected format of the nvlis= t is: >> @@ -254,5 +299,6 @@ struct pci_iov_arg >> #define IOV_CONFIG _IOW('p', 10, struct pci_iov_arg) >> #define IOV_DELETE _IO('p', 11) >> #define IOV_GET_SCHEMA _IOWR('p', 12, struct pci_iov_schema) >> +#define IOV_GET_STATUS _IOWR('p', 13, struct pci_iov_status) >> >> #endif >>