From nobody Mon Sep 16 18:52:19 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1675316965; cv=none; d=zohomail.com; s=zohoarc; b=i4MwBAsJuS58PumaDu94pSS8l/eoPgr1RinXpq9mcKeY+ToJwLRvCEICWpUH3J9edMlrpxNsxw+Kk8qZJGBqrjnFyk9h45xFFZdgZWgz7GlTHgjA4EETC4hjTy/M1w1T3XHEIo1DgAZCC/DPUrRB2rsNPHQ0UMo4e1biOswTDPo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675316965; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=AE0X46sHYPRDnHkvwEFACXiZolUwmlU3ghHJd32havE=; b=EJb8/0gv6NHYiO9Y0nE2MToxVbXH9dlb2bBvG6fbIu17CPf7NsdRdPtSGzHSKtBRh65ZS+G5nadc0b+Hmtf7f/iTYLMyMnMiGPncMthFHpxqZoC+7pSFYjTc2Bkyp8i+igs7uCXPxtsEgcscfmFsXSLicxj7Iu8BuYiE1cxdaTI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675316965813496.92296973375346; Wed, 1 Feb 2023 21:49:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNSP8-000866-Gj; Thu, 02 Feb 2023 00:45:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNSP7-00085p-L6 for qemu-devel@nongnu.org; Thu, 02 Feb 2023 00:45:01 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNSP5-0006xN-Ed for qemu-devel@nongnu.org; Thu, 02 Feb 2023 00:45:01 -0500 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3124jErE009389; Thu, 2 Feb 2023 05:44:58 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nfn9yj84a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 Feb 2023 05:44:58 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31254PpW013015; Thu, 2 Feb 2023 05:44:57 GMT Received: from bruckner.us.oracle.com (dhcp-10-65-133-23.vpn.oracle.com [10.65.133.23]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nct5f5gb1-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 02 Feb 2023 05:44:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references; s=corp-2022-7-12; bh=AE0X46sHYPRDnHkvwEFACXiZolUwmlU3ghHJd32havE=; b=BXTr4lXmvj4nu5SAHTj4u/eyZ4CfNW0ZPaGLExCpCbpp7xQ5Au5BnTRTME4GTUcw2kH9 w6ZCXJk4WH5zfGIiB7uuSZ72vNaKTf+pBQnkYgJOOjahgnfW80lXaE+51bBVnixUhcDR EKrMBd9DMhZxZU8fbM/hAuq5cU8ilMeVoqL3GUz+MiEVJCPOpvWQ7rbe/BoohceL5d7K ZNjmaHlUVf1ZRjMwUeEBw1aSDsGUQ6tF7SAUOTLGUn8/s/SbXMm+73AR/u3RapzBaO99 LFXAp2zGw80rZ6kFywD+TGTpiBWFJI70H1td2x5/38EB5CefdJfRHj1HxPuC7UN+IeYx 1g== From: John Johnson To: qemu-devel@nongnu.org Cc: alex.williamson@redhat.com, clg@redhat.com, philmd@linaro.org Subject: [PATCH v2 04/23] vfio-user: add region cache Date: Wed, 1 Feb 2023 21:55:40 -0800 Message-Id: <9a44eb8b8d2737a2655059f796104e64a3cb1960.1675228037.git.john.g.johnson@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-01_15,2023-01-31_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302020053 X-Proofpoint-ORIG-GUID: wQIOQyUaFkufUUgAhByOT0nUmZ1ixbbb X-Proofpoint-GUID: wQIOQyUaFkufUUgAhByOT0nUmZ1ixbbb Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.220.177.32; envelope-from=john.g.johnson@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @oracle.com) X-ZM-MESSAGEID: 1675316966195100001 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" cache VFIO_DEVICE_GET_REGION_INFO results to reduce memory alloc/free cycles and as prep work for vfio-user Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- include/hw/vfio/vfio-common.h | 2 ++ hw/vfio/ccw.c | 5 ----- hw/vfio/common.c | 41 +++++++++++++++++++++++++++++++++++----= -- hw/vfio/igd.c | 23 +++++++++-------------- hw/vfio/migration.c | 2 -- hw/vfio/pci-quirks.c | 19 +++++-------------- hw/vfio/pci.c | 8 -------- 7 files changed, 51 insertions(+), 49 deletions(-) diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 953bc0f..7779cc7 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -145,6 +145,7 @@ typedef struct VFIODevice { VFIOMigration *migration; Error *migration_blocker; OnOffAuto pre_copy_dirty_page_tracking; + struct vfio_region_info **regions; } VFIODevice; =20 struct VFIODeviceOps { @@ -249,6 +250,7 @@ int vfio_get_region_info(VFIODevice *vbasedev, int inde= x, struct vfio_region_info **info); int vfio_get_dev_region_info(VFIODevice *vbasedev, uint32_t type, uint32_t subtype, struct vfio_region_info **i= nfo); +void vfio_get_all_regions(VFIODevice *vbasedev); bool vfio_has_region_cap(VFIODevice *vbasedev, int region, uint16_t cap_ty= pe); struct vfio_info_cap_header * vfio_get_region_info_cap(struct vfio_region_info *info, uint16_t id); diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 0354737..06b588c 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -517,7 +517,6 @@ static void vfio_ccw_get_region(VFIOCCWDevice *vcdev, E= rror **errp) =20 vcdev->io_region_offset =3D info->offset; vcdev->io_region =3D g_malloc0(info->size); - g_free(info); =20 /* check for the optional async command region */ ret =3D vfio_get_dev_region_info(vdev, VFIO_REGION_TYPE_CCW, @@ -530,7 +529,6 @@ static void vfio_ccw_get_region(VFIOCCWDevice *vcdev, E= rror **errp) } vcdev->async_cmd_region_offset =3D info->offset; vcdev->async_cmd_region =3D g_malloc0(info->size); - g_free(info); } =20 ret =3D vfio_get_dev_region_info(vdev, VFIO_REGION_TYPE_CCW, @@ -543,7 +541,6 @@ static void vfio_ccw_get_region(VFIOCCWDevice *vcdev, E= rror **errp) } vcdev->schib_region_offset =3D info->offset; vcdev->schib_region =3D g_malloc(info->size); - g_free(info); } =20 ret =3D vfio_get_dev_region_info(vdev, VFIO_REGION_TYPE_CCW, @@ -557,7 +554,6 @@ static void vfio_ccw_get_region(VFIOCCWDevice *vcdev, E= rror **errp) } vcdev->crw_region_offset =3D info->offset; vcdev->crw_region =3D g_malloc(info->size); - g_free(info); } =20 return; @@ -567,7 +563,6 @@ out_err: g_free(vcdev->schib_region); g_free(vcdev->async_cmd_region); g_free(vcdev->io_region); - g_free(info); return; } =20 diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 9310a7f..f895b51 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -1602,8 +1602,6 @@ int vfio_region_setup(Object *obj, VFIODevice *vbased= ev, VFIORegion *region, } } =20 - g_free(info); - trace_vfio_region_setup(vbasedev->name, index, name, region->flags, region->fd_offset, region->size= ); return 0; @@ -2359,6 +2357,16 @@ void vfio_put_group(VFIOGroup *group) } } =20 +void vfio_get_all_regions(VFIODevice *vbasedev) +{ + struct vfio_region_info *info; + int i; + + for (i =3D 0; i < vbasedev->num_regions; i++) { + vfio_get_region_info(vbasedev, i, &info); + } +} + int vfio_get_device(VFIOGroup *group, const char *name, VFIODevice *vbasedev, Error **errp) { @@ -2414,12 +2422,23 @@ int vfio_get_device(VFIOGroup *group, const char *n= ame, trace_vfio_get_device(name, dev_info.flags, dev_info.num_regions, dev_info.num_irqs); =20 + vfio_get_all_regions(vbasedev); vbasedev->reset_works =3D !!(dev_info.flags & VFIO_DEVICE_FLAGS_RESET); return 0; } =20 void vfio_put_base_device(VFIODevice *vbasedev) { + if (vbasedev->regions !=3D NULL) { + int i; + + for (i =3D 0; i < vbasedev->num_regions; i++) { + g_free(vbasedev->regions[i]); + } + g_free(vbasedev->regions); + vbasedev->regions =3D NULL; + } + if (!vbasedev->group) { return; } @@ -2434,6 +2453,17 @@ int vfio_get_region_info(VFIODevice *vbasedev, int i= ndex, { size_t argsz =3D sizeof(struct vfio_region_info); =20 + /* create region cache */ + if (vbasedev->regions =3D=3D NULL) { + vbasedev->regions =3D g_new0(struct vfio_region_info *, + vbasedev->num_regions); + } + /* check cache */ + if (vbasedev->regions[index] !=3D NULL) { + *info =3D vbasedev->regions[index]; + return 0; + } + *info =3D g_malloc0(argsz); =20 (*info)->index =3D index; @@ -2453,6 +2483,9 @@ retry: goto retry; } =20 + /* fill cache */ + vbasedev->regions[index] =3D *info; + return 0; } =20 @@ -2471,7 +2504,6 @@ int vfio_get_dev_region_info(VFIODevice *vbasedev, ui= nt32_t type, =20 hdr =3D vfio_get_region_info_cap(*info, VFIO_REGION_INFO_CAP_TYPE); if (!hdr) { - g_free(*info); continue; } =20 @@ -2483,8 +2515,6 @@ int vfio_get_dev_region_info(VFIODevice *vbasedev, ui= nt32_t type, if (cap_type->type =3D=3D type && cap_type->subtype =3D=3D subtype= ) { return 0; } - - g_free(*info); } =20 *info =3D NULL; @@ -2500,7 +2530,6 @@ bool vfio_has_region_cap(VFIODevice *vbasedev, int re= gion, uint16_t cap_type) if (vfio_get_region_info_cap(info, cap_type)) { ret =3D true; } - g_free(info); } =20 return ret; diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c index afe3fe7..22efa1a 100644 --- a/hw/vfio/igd.c +++ b/hw/vfio/igd.c @@ -425,7 +425,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) if ((ret || !rom->size) && !vdev->pdev.romfile) { error_report("IGD device %s has no ROM, legacy mode disabled", vdev->vbasedev.name); - goto out; + return; } =20 /* @@ -436,7 +436,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) error_report("IGD device %s hotplugged, ROM disabled, " "legacy mode disabled", vdev->vbasedev.name); vdev->rom_read_failed =3D true; - goto out; + return; } =20 /* @@ -449,7 +449,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) if (ret) { error_report("IGD device %s does not support OpRegion access," "legacy mode disabled", vdev->vbasedev.name); - goto out; + return; } =20 ret =3D vfio_get_dev_region_info(&vdev->vbasedev, @@ -458,7 +458,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) if (ret) { error_report("IGD device %s does not support host bridge access," "legacy mode disabled", vdev->vbasedev.name); - goto out; + return; } =20 ret =3D vfio_get_dev_region_info(&vdev->vbasedev, @@ -467,7 +467,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) if (ret) { error_report("IGD device %s does not support LPC bridge access," "legacy mode disabled", vdev->vbasedev.name); - goto out; + return; } =20 gmch =3D vfio_pci_read_config(&vdev->pdev, IGD_GMCH, 4); @@ -481,7 +481,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) error_reportf_err(err, VFIO_MSG_PREFIX, vdev->vbasedev.name); error_report("IGD device %s failed to enable VGA access, " "legacy mode disabled", vdev->vbasedev.name); - goto out; + return; } =20 /* Create our LPC/ISA bridge */ @@ -489,7 +489,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) if (ret) { error_report("IGD device %s failed to create LPC bridge, " "legacy mode disabled", vdev->vbasedev.name); - goto out; + return; } =20 /* Stuff some host values into the VM PCI host bridge */ @@ -497,7 +497,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) if (ret) { error_report("IGD device %s failed to modify host bridge, " "legacy mode disabled", vdev->vbasedev.name); - goto out; + return; } =20 /* Setup OpRegion access */ @@ -505,7 +505,7 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) if (ret) { error_append_hint(&err, "IGD legacy mode disabled\n"); error_reportf_err(err, VFIO_MSG_PREFIX, vdev->vbasedev.name); - goto out; + return; } =20 /* Setup our quirk to munge GTT addresses to the VM allocated buffer */ @@ -608,9 +608,4 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int= nr) =20 trace_vfio_pci_igd_bdsm_enabled(vdev->vbasedev.name, ggms_mb + gms_mb); =20 -out: - g_free(rom); - g_free(opregion); - g_free(host); - g_free(lpc); } diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index a6ad1f8..397be43 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -879,13 +879,11 @@ int vfio_migration_probe(VFIODevice *vbasedev, Error = **errp) } =20 trace_vfio_migration_probe(vbasedev->name, info->index); - g_free(info); return 0; =20 add_blocker: error_setg(&vbasedev->migration_blocker, "VFIO device doesn't support migration"); - g_free(info); =20 ret =3D migrate_add_blocker(vbasedev->migration_blocker, errp); if (ret < 0) { diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index f0147a0..c04ee19 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -1585,16 +1585,14 @@ int vfio_pci_nvidia_v100_ram_init(VFIOPCIDevice *vd= ev, Error **errp) =20 hdr =3D vfio_get_region_info_cap(nv2reg, VFIO_REGION_INFO_CAP_NVLINK2_= SSATGT); if (!hdr) { - ret =3D -ENODEV; - goto free_exit; + return -ENODEV; } cap =3D (void *) hdr; =20 p =3D mmap(NULL, nv2reg->size, PROT_READ | PROT_WRITE, MAP_SHARED, vdev->vbasedev.fd, nv2reg->offset); if (p =3D=3D MAP_FAILED) { - ret =3D -errno; - goto free_exit; + return -errno; } =20 quirk =3D vfio_quirk_alloc(1); @@ -1607,8 +1605,6 @@ int vfio_pci_nvidia_v100_ram_init(VFIOPCIDevice *vdev= , Error **errp) OBJ_PROP_FLAG_READ); trace_vfio_pci_nvidia_gpu_setup_quirk(vdev->vbasedev.name, cap->tgt, nv2reg->size); -free_exit: - g_free(nv2reg); =20 return ret; } @@ -1635,16 +1631,14 @@ int vfio_pci_nvlink2_init(VFIOPCIDevice *vdev, Erro= r **errp) hdr =3D vfio_get_region_info_cap(atsdreg, VFIO_REGION_INFO_CAP_NVLINK2_SSATGT); if (!hdr) { - ret =3D -ENODEV; - goto free_exit; + return -ENODEV; } captgt =3D (void *) hdr; =20 hdr =3D vfio_get_region_info_cap(atsdreg, VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD); if (!hdr) { - ret =3D -ENODEV; - goto free_exit; + return -ENODEV; } capspeed =3D (void *) hdr; =20 @@ -1653,8 +1647,7 @@ int vfio_pci_nvlink2_init(VFIOPCIDevice *vdev, Error = **errp) p =3D mmap(NULL, atsdreg->size, PROT_READ | PROT_WRITE, MAP_SHARED, vdev->vbasedev.fd, atsdreg->offset); if (p =3D=3D MAP_FAILED) { - ret =3D -errno; - goto free_exit; + return -errno; } =20 quirk =3D vfio_quirk_alloc(1); @@ -1674,8 +1667,6 @@ int vfio_pci_nvlink2_init(VFIOPCIDevice *vdev, Error = **errp) OBJ_PROP_FLAG_READ); trace_vfio_pci_nvlink2_setup_quirk_lnkspd(vdev->vbasedev.name, capspeed->link_speed); -free_exit: - g_free(atsdreg); =20 return ret; } diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 9d70114..b214a93 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -836,8 +836,6 @@ static void vfio_pci_load_rom(VFIOPCIDevice *vdev) vdev->rom_size =3D size =3D reg_info->size; vdev->rom_offset =3D reg_info->offset; =20 - g_free(reg_info); - if (!vdev->rom_size) { vdev->rom_read_failed =3D true; error_report("vfio-pci: Cannot read device rom at " @@ -2564,7 +2562,6 @@ int vfio_populate_vga(VFIOPCIDevice *vdev, Error **er= rp) error_setg(errp, "unexpected VGA info, flags 0x%lx, size 0x%lx", (unsigned long)reg_info->flags, (unsigned long)reg_info->size); - g_free(reg_info); return -EINVAL; } =20 @@ -2573,8 +2570,6 @@ int vfio_populate_vga(VFIOPCIDevice *vdev, Error **er= rp) vdev->vga->fd_offset =3D reg_info->offset; vdev->vga->fd =3D vdev->vbasedev.fd; =20 - g_free(reg_info); - vdev->vga->region[QEMU_PCI_VGA_MEM].offset =3D QEMU_PCI_VGA_MEM_BASE; vdev->vga->region[QEMU_PCI_VGA_MEM].nr =3D QEMU_PCI_VGA_MEM; QLIST_INIT(&vdev->vga->region[QEMU_PCI_VGA_MEM].quirks); @@ -2669,8 +2664,6 @@ static void vfio_populate_device(VFIOPCIDevice *vdev,= Error **errp) } vdev->config_offset =3D reg_info->offset; =20 - g_free(reg_info); - if (vdev->features & VFIO_FEATURE_ENABLE_VGA) { ret =3D vfio_populate_vga(vdev, errp); if (ret) { @@ -3079,7 +3072,6 @@ static void vfio_realize(PCIDevice *pdev, Error **err= p) } =20 ret =3D vfio_pci_igd_opregion_init(vdev, opregion, errp); - g_free(opregion); if (ret) { goto out_teardown; } --=20 1.9.4