Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2225845/?format=api
{ "id": 2225845, "url": "http://patchwork.ozlabs.org/api/patches/2225845/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260421163438.3447280-10-clg@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260421163438.3447280-10-clg@redhat.com>", "list_archive_url": null, "date": "2026-04-21T16:34:33", "name": "[PULL,09/14] iommufd: Rename all the idev and idevc variables to hiod and hiodc", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c6bbd65cae27bf49e3b6ec392f94302434f23350", "submitter": { "id": 85406, "url": "http://patchwork.ozlabs.org/api/people/85406/?format=api", "name": "Cédric Le Goater", "email": "clg@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260421163438.3447280-10-clg@redhat.com/mbox/", "series": [ { "id": 500853, "url": "http://patchwork.ozlabs.org/api/series/500853/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500853", "date": "2026-04-21T16:34:24", "name": "[PULL,01/14] hw/vfio/listener.c: remove CONFIG_KVM", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500853/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225845/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225845/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ZpkLAKPj;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0Sfd1Lf7z1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 02:36:25 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wFE58-0004zQ-Hy; Tue, 21 Apr 2026 12:36:14 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <clg@redhat.com>) id 1wFE4F-0004lc-Rq\n for qemu-devel@nongnu.org; Tue, 21 Apr 2026 12:35:24 -0400", "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <clg@redhat.com>) id 1wFE47-0007QU-8d\n for qemu-devel@nongnu.org; Tue, 21 Apr 2026 12:35:16 -0400", "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-StKAelf2MLu6nrgatzt8Fg-1; Tue,\n 21 Apr 2026 12:35:03 -0400", "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 9D9AB1956080; Tue, 21 Apr 2026 16:35:02 +0000 (UTC)", "from corto.redhat.com (unknown [10.44.32.70])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id A67441956095; Tue, 21 Apr 2026 16:35:00 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1776789307;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=JEJgk+MKJNK8mlBm/c9Qv5iXP3OMPqQpBC+KEvaYTJ8=;\n b=ZpkLAKPj5I/7QLs4lcKm0h0SaaxkyB6dNXg214lXmEPXQ2tIt29OnAcNLdziex3nnyAvRz\n vdOr5VSmteIeCHlQiV2zbkSqHYyxBQ8CyYdGFbXqqmv1UGdlDEKQuqeKi1hbdtv6dxGJz3\n aNxxerV9Oai5R9hjezTisT180bEMdGg=", "X-MC-Unique": "StKAelf2MLu6nrgatzt8Fg-1", "X-Mimecast-MFC-AGG-ID": "StKAelf2MLu6nrgatzt8Fg_1776789302", "From": "=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Alex Williamson <alex@shazbot.org>,\n Zhenzhong Duan <zhenzhong.duan@intel.com>,\n =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@redhat.com>, =?utf-8?q?Philippe_Math?=\n\t=?utf-8?q?ieu-Daud=C3=A9?= <philmd@linaro.org>", "Subject": "[PULL 09/14] iommufd: Rename all the idev and idevc variables to hiod\n and hiodc", "Date": "Tue, 21 Apr 2026 18:34:33 +0200", "Message-ID": "<20260421163438.3447280-10-clg@redhat.com>", "In-Reply-To": "<20260421163438.3447280-1-clg@redhat.com>", "References": "<20260421163438.3447280-1-clg@redhat.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17", "Received-SPF": "pass client-ip=170.10.129.124; envelope-from=clg@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n SPF_HELO_PASS=-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": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "From: Zhenzhong Duan <zhenzhong.duan@intel.com>\n\nWe used idev and idevc naming for HostIOMMUDeviceIOMMUFD and corresponding\nclass variables which followed the iommufd_device naming in linux kernel.\n\nThis is mixed with the hiod naming for base type HostIOMMUDevice. Rename\nHostIOMMUDeviceIOMMUFD* to hiodi* for consistency in QEMU.\n\nNo functional change intended.\n\nSuggested-by: Cédric Le Goater <clg@redhat.com>\nSigned-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>\nReviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nReviewed-by: Cédric Le Goater <clg@redhat.com>\nLink: https://lore.kernel.org/qemu-devel/20260401080354.1347212-1-zhenzhong.duan@intel.com\nSigned-off-by: Cédric Le Goater <clg@redhat.com>\n---\n hw/arm/smmuv3-accel.h | 2 +-\n include/system/iommufd.h | 12 ++---\n backends/iommufd.c | 26 +++++------\n hw/arm/smmuv3-accel.c | 93 +++++++++++++++++++------------------\n hw/i386/intel_iommu_accel.c | 44 +++++++++---------\n hw/vfio/container-legacy.c | 10 ++--\n hw/vfio/iommufd.c | 24 +++++-----\n 7 files changed, 107 insertions(+), 104 deletions(-)", "diff": "diff --git a/hw/arm/smmuv3-accel.h b/hw/arm/smmuv3-accel.h\nindex dba6c71de5269a2223a9048e703ae2f829513f8e..908a13cbcc6b44c1d524221c489695176bc07ed1 100644\n--- a/hw/arm/smmuv3-accel.h\n+++ b/hw/arm/smmuv3-accel.h\n@@ -34,7 +34,7 @@ typedef struct SMMUS1Hwpt {\n \n typedef struct SMMUv3AccelDevice {\n SMMUDevice sdev;\n- HostIOMMUDeviceIOMMUFD *idev;\n+ HostIOMMUDeviceIOMMUFD *hiodi;\n SMMUS1Hwpt *s1_hwpt;\n IOMMUFDVdev *vdev;\n QLIST_ENTRY(SMMUv3AccelDevice) next;\ndiff --git a/include/system/iommufd.h b/include/system/iommufd.h\nindex 7062944fe61d161fa6ca1c0cff1be879e6449955..2925d116acdf285ae3ff9968a018a924be6138db 100644\n--- a/include/system/iommufd.h\n+++ b/include/system/iommufd.h\n@@ -136,7 +136,7 @@ struct HostIOMMUDeviceIOMMUFDClass {\n *\n * Mandatory callback.\n *\n- * @idev: host IOMMU device backed by IOMMUFD backend.\n+ * @hiodi: host IOMMU device backed by IOMMUFD backend.\n *\n * @hwpt_id: ID of IOMMUFD hardware page table.\n *\n@@ -144,7 +144,7 @@ struct HostIOMMUDeviceIOMMUFDClass {\n *\n * Returns: true on success, false on failure.\n */\n- bool (*attach_hwpt)(HostIOMMUDeviceIOMMUFD *idev, uint32_t hwpt_id,\n+ bool (*attach_hwpt)(HostIOMMUDeviceIOMMUFD *hiodi, uint32_t hwpt_id,\n Error **errp);\n /**\n * @detach_hwpt: detach host IOMMU device from IOMMUFD hardware page table.\n@@ -152,17 +152,17 @@ struct HostIOMMUDeviceIOMMUFDClass {\n *\n * Mandatory callback.\n *\n- * @idev: host IOMMU device backed by IOMMUFD backend.\n+ * @hiodi: host IOMMU device backed by IOMMUFD backend.\n *\n * @errp: pass an Error out when attachment fails.\n *\n * Returns: true on success, false on failure.\n */\n- bool (*detach_hwpt)(HostIOMMUDeviceIOMMUFD *idev, Error **errp);\n+ bool (*detach_hwpt)(HostIOMMUDeviceIOMMUFD *hiodi, Error **errp);\n };\n \n-bool host_iommu_device_iommufd_attach_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n+bool host_iommu_device_iommufd_attach_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,\n uint32_t hwpt_id, Error **errp);\n-bool host_iommu_device_iommufd_detach_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n+bool host_iommu_device_iommufd_detach_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,\n Error **errp);\n #endif\ndiff --git a/backends/iommufd.c b/backends/iommufd.c\nindex e1fee16acf2e15ad1e9066aa32a270bb3945b52d..410b0443707a2baed91ddf221bae4df0f2376c8a 100644\n--- a/backends/iommufd.c\n+++ b/backends/iommufd.c\n@@ -538,24 +538,24 @@ bool iommufd_backend_alloc_veventq(IOMMUFDBackend *be, uint32_t viommu_id,\n return true;\n }\n \n-bool host_iommu_device_iommufd_attach_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n+bool host_iommu_device_iommufd_attach_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,\n uint32_t hwpt_id, Error **errp)\n {\n- HostIOMMUDeviceIOMMUFDClass *idevc =\n- HOST_IOMMU_DEVICE_IOMMUFD_GET_CLASS(idev);\n+ HostIOMMUDeviceIOMMUFDClass *hiodic =\n+ HOST_IOMMU_DEVICE_IOMMUFD_GET_CLASS(hiodi);\n \n- g_assert(idevc->attach_hwpt);\n- return idevc->attach_hwpt(idev, hwpt_id, errp);\n+ g_assert(hiodic->attach_hwpt);\n+ return hiodic->attach_hwpt(hiodi, hwpt_id, errp);\n }\n \n-bool host_iommu_device_iommufd_detach_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n+bool host_iommu_device_iommufd_detach_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,\n Error **errp)\n {\n- HostIOMMUDeviceIOMMUFDClass *idevc =\n- HOST_IOMMU_DEVICE_IOMMUFD_GET_CLASS(idev);\n+ HostIOMMUDeviceIOMMUFDClass *hiodic =\n+ HOST_IOMMU_DEVICE_IOMMUFD_GET_CLASS(hiodi);\n \n- g_assert(idevc->detach_hwpt);\n- return idevc->detach_hwpt(idev, errp);\n+ g_assert(hiodic->detach_hwpt);\n+ return hiodic->detach_hwpt(hiodi, errp);\n }\n \n static int hiod_iommufd_get_cap(HostIOMMUDevice *hiod, int cap, Error **errp)\n@@ -591,10 +591,10 @@ static bool hiod_iommufd_get_pasid_info(HostIOMMUDevice *hiod,\n \n static void hiod_iommufd_class_init(ObjectClass *oc, const void *data)\n {\n- HostIOMMUDeviceClass *hioc = HOST_IOMMU_DEVICE_CLASS(oc);\n+ HostIOMMUDeviceClass *hiodc = HOST_IOMMU_DEVICE_CLASS(oc);\n \n- hioc->get_cap = hiod_iommufd_get_cap;\n- hioc->get_pasid_info = hiod_iommufd_get_pasid_info;\n+ hiodc->get_cap = hiod_iommufd_get_cap;\n+ hiodc->get_pasid_info = hiod_iommufd_get_pasid_info;\n };\n \n static const TypeInfo types[] = {\ndiff --git a/hw/arm/smmuv3-accel.c b/hw/arm/smmuv3-accel.c\nindex 65c2f44880a06402049ec9ba885c7eb082419f79..3630078751ca544d023398ed088047c6c561c1ca 100644\n--- a/hw/arm/smmuv3-accel.c\n+++ b/hw/arm/smmuv3-accel.c\n@@ -129,16 +129,16 @@ smmuv3_accel_check_hw_compatible(SMMUv3State *s,\n }\n \n static bool\n-smmuv3_accel_hw_compatible(SMMUv3State *s, HostIOMMUDeviceIOMMUFD *idev,\n+smmuv3_accel_hw_compatible(SMMUv3State *s, HostIOMMUDeviceIOMMUFD *hiodi,\n Error **errp)\n {\n struct iommu_hw_info_arm_smmuv3 info;\n uint32_t data_type;\n uint64_t caps;\n \n- if (!iommufd_backend_get_device_info(idev->iommufd, idev->devid, &data_type,\n- &info, sizeof(info), &caps, NULL,\n- errp)) {\n+ if (!iommufd_backend_get_device_info(hiodi->iommufd, hiodi->devid,\n+ &data_type, &info, sizeof(info), &caps,\n+ NULL, errp)) {\n return false;\n }\n \n@@ -182,15 +182,15 @@ static bool\n smmuv3_accel_alloc_vdev(SMMUv3AccelDevice *accel_dev, int sid, Error **errp)\n {\n SMMUv3AccelState *accel = accel_dev->s_accel;\n- HostIOMMUDeviceIOMMUFD *idev = accel_dev->idev;\n+ HostIOMMUDeviceIOMMUFD *hiodi = accel_dev->hiodi;\n IOMMUFDVdev *vdev = accel_dev->vdev;\n uint32_t vdevice_id;\n \n- if (!idev || vdev) {\n+ if (!hiodi || vdev) {\n return true;\n }\n \n- if (!iommufd_backend_alloc_vdev(idev->iommufd, idev->devid,\n+ if (!iommufd_backend_alloc_vdev(hiodi->iommufd, hiodi->devid,\n accel->viommu->viommu_id, sid,\n &vdevice_id, errp)) {\n return false;\n@@ -209,7 +209,7 @@ smmuv3_accel_dev_alloc_translate(SMMUv3AccelDevice *accel_dev, STE *ste,\n {\n uint64_t ste_0 = (uint64_t)ste->word[0] | (uint64_t)ste->word[1] << 32;\n uint64_t ste_1 = (uint64_t)ste->word[2] | (uint64_t)ste->word[3] << 32;\n- HostIOMMUDeviceIOMMUFD *idev = accel_dev->idev;\n+ HostIOMMUDeviceIOMMUFD *hiodi = accel_dev->hiodi;\n SMMUv3AccelState *accel = accel_dev->s_accel;\n struct iommu_hwpt_arm_smmuv3 nested_data = {\n .ste = {\n@@ -220,7 +220,7 @@ smmuv3_accel_dev_alloc_translate(SMMUv3AccelDevice *accel_dev, STE *ste,\n uint32_t hwpt_id = 0, flags = 0;\n SMMUS1Hwpt *s1_hwpt;\n \n- if (!iommufd_backend_alloc_hwpt(idev->iommufd, idev->devid,\n+ if (!iommufd_backend_alloc_hwpt(hiodi->iommufd, hiodi->devid,\n accel->viommu->viommu_id, flags,\n IOMMU_HWPT_DATA_ARM_SMMUV3,\n sizeof(nested_data), &nested_data,\n@@ -242,7 +242,7 @@ bool smmuv3_accel_install_ste(SMMUv3State *s, SMMUDevice *sdev, int sid,\n .inval_ste_allowed = true};\n SMMUv3AccelState *accel = s->s_accel;\n SMMUv3AccelDevice *accel_dev;\n- HostIOMMUDeviceIOMMUFD *idev;\n+ HostIOMMUDeviceIOMMUFD *hiodi;\n uint32_t config, hwpt_id = 0;\n SMMUS1Hwpt *s1_hwpt = NULL;\n const char *type;\n@@ -257,7 +257,7 @@ bool smmuv3_accel_install_ste(SMMUv3State *s, SMMUDevice *sdev, int sid,\n return true;\n }\n \n- idev = accel_dev->idev;\n+ hiodi = accel_dev->hiodi;\n if (!smmuv3_accel_alloc_vdev(accel_dev, sid, errp)) {\n return false;\n }\n@@ -300,9 +300,9 @@ bool smmuv3_accel_install_ste(SMMUv3State *s, SMMUDevice *sdev, int sid,\n return false;\n }\n \n- if (!host_iommu_device_iommufd_attach_hwpt(idev, hwpt_id, errp)) {\n+ if (!host_iommu_device_iommufd_attach_hwpt(hiodi, hwpt_id, errp)) {\n if (s1_hwpt) {\n- iommufd_backend_free_id(idev->iommufd, s1_hwpt->hwpt_id);\n+ iommufd_backend_free_id(hiodi->iommufd, s1_hwpt->hwpt_id);\n g_free(s1_hwpt);\n }\n return false;\n@@ -310,7 +310,7 @@ bool smmuv3_accel_install_ste(SMMUv3State *s, SMMUDevice *sdev, int sid,\n \n /* Free the previous s1_hwpt */\n if (accel_dev->s1_hwpt) {\n- iommufd_backend_free_id(idev->iommufd, accel_dev->s1_hwpt->hwpt_id);\n+ iommufd_backend_free_id(hiodi->iommufd, accel_dev->s1_hwpt->hwpt_id);\n g_free(accel_dev->s1_hwpt);\n }\n \n@@ -524,7 +524,7 @@ free_veventq:\n }\n \n static bool\n-smmuv3_accel_alloc_viommu(SMMUv3State *s, HostIOMMUDeviceIOMMUFD *idev,\n+smmuv3_accel_alloc_viommu(SMMUv3State *s, HostIOMMUDeviceIOMMUFD *hiodi,\n Error **errp)\n {\n SMMUv3AccelState *accel = s->s_accel;\n@@ -534,11 +534,11 @@ smmuv3_accel_alloc_viommu(SMMUv3State *s, HostIOMMUDeviceIOMMUFD *idev,\n struct iommu_hwpt_arm_smmuv3 abort_data = {\n .ste = { SMMU_STE_VALID, 0x0ULL },\n };\n- uint32_t s2_hwpt_id = idev->hwpt_id;\n+ uint32_t s2_hwpt_id = hiodi->hwpt_id;\n uint32_t viommu_id, hwpt_id;\n IOMMUFDViommu *viommu;\n \n- if (!iommufd_backend_alloc_viommu(idev->iommufd, idev->devid,\n+ if (!iommufd_backend_alloc_viommu(hiodi->iommufd, hiodi->devid,\n IOMMU_VIOMMU_TYPE_ARM_SMMUV3,\n s2_hwpt_id, &viommu_id, errp)) {\n return false;\n@@ -547,21 +547,21 @@ smmuv3_accel_alloc_viommu(SMMUv3State *s, HostIOMMUDeviceIOMMUFD *idev,\n viommu = g_new0(IOMMUFDViommu, 1);\n viommu->viommu_id = viommu_id;\n viommu->s2_hwpt_id = s2_hwpt_id;\n- viommu->iommufd = idev->iommufd;\n+ viommu->iommufd = hiodi->iommufd;\n accel->viommu = viommu;\n \n /*\n * Pre-allocate HWPTs for S1 bypass and abort cases. These will be attached\n * later for guest STEs or GBPAs that require bypass or abort configuration.\n */\n- if (!iommufd_backend_alloc_hwpt(idev->iommufd, idev->devid, viommu_id,\n+ if (!iommufd_backend_alloc_hwpt(hiodi->iommufd, hiodi->devid, viommu_id,\n 0, IOMMU_HWPT_DATA_ARM_SMMUV3,\n sizeof(abort_data), &abort_data,\n &accel->abort_hwpt_id, errp)) {\n goto free_viommu;\n }\n \n- if (!iommufd_backend_alloc_hwpt(idev->iommufd, idev->devid, viommu_id,\n+ if (!iommufd_backend_alloc_hwpt(hiodi->iommufd, hiodi->devid, viommu_id,\n 0, IOMMU_HWPT_DATA_ARM_SMMUV3,\n sizeof(bypass_data), &bypass_data,\n &accel->bypass_hwpt_id, errp)) {\n@@ -575,7 +575,7 @@ smmuv3_accel_alloc_viommu(SMMUv3State *s, HostIOMMUDeviceIOMMUFD *idev,\n \n /* Attach a HWPT based on SMMUv3 GBPA.ABORT value */\n hwpt_id = smmuv3_accel_gbpa_hwpt(s, accel);\n- if (!host_iommu_device_iommufd_attach_hwpt(idev, hwpt_id, errp)) {\n+ if (!host_iommu_device_iommufd_attach_hwpt(hiodi, hwpt_id, errp)) {\n goto free_veventq;\n }\n return true;\n@@ -583,11 +583,11 @@ smmuv3_accel_alloc_viommu(SMMUv3State *s, HostIOMMUDeviceIOMMUFD *idev,\n free_veventq:\n smmuv3_accel_free_veventq(accel);\n free_bypass_hwpt:\n- iommufd_backend_free_id(idev->iommufd, accel->bypass_hwpt_id);\n+ iommufd_backend_free_id(hiodi->iommufd, accel->bypass_hwpt_id);\n free_abort_hwpt:\n- iommufd_backend_free_id(idev->iommufd, accel->abort_hwpt_id);\n+ iommufd_backend_free_id(hiodi->iommufd, accel->abort_hwpt_id);\n free_viommu:\n- iommufd_backend_free_id(idev->iommufd, viommu->viommu_id);\n+ iommufd_backend_free_id(hiodi->iommufd, viommu->viommu_id);\n g_free(viommu);\n accel->viommu = NULL;\n return false;\n@@ -596,20 +596,20 @@ free_viommu:\n static bool smmuv3_accel_set_iommu_device(PCIBus *bus, void *opaque, int devfn,\n HostIOMMUDevice *hiod, Error **errp)\n {\n- HostIOMMUDeviceIOMMUFD *idev = HOST_IOMMU_DEVICE_IOMMUFD(hiod);\n+ HostIOMMUDeviceIOMMUFD *hiodi = HOST_IOMMU_DEVICE_IOMMUFD(hiod);\n SMMUState *bs = opaque;\n SMMUv3State *s = ARM_SMMUV3(bs);\n SMMUPciBus *sbus = smmu_get_sbus(bs, bus);\n SMMUv3AccelDevice *accel_dev = smmuv3_accel_get_dev(bs, sbus, bus, devfn);\n \n- if (!idev) {\n+ if (!hiodi) {\n return true;\n }\n \n- if (accel_dev->idev) {\n- if (accel_dev->idev != idev) {\n- error_setg(errp, \"Device already has an associated idev 0x%x\",\n- idev->devid);\n+ if (accel_dev->hiodi) {\n+ if (accel_dev->hiodi != hiodi) {\n+ error_setg(errp, \"Device already has an associated hiodi 0x%x\",\n+ hiodi->devid);\n return false;\n }\n return true;\n@@ -619,7 +619,7 @@ static bool smmuv3_accel_set_iommu_device(PCIBus *bus, void *opaque, int devfn,\n * Check the host SMMUv3 associated with the dev is compatible with the\n * QEMU SMMUv3 accel.\n */\n- if (!smmuv3_accel_hw_compatible(s, idev, errp)) {\n+ if (!smmuv3_accel_hw_compatible(s, hiodi, errp)) {\n return false;\n }\n \n@@ -627,17 +627,17 @@ static bool smmuv3_accel_set_iommu_device(PCIBus *bus, void *opaque, int devfn,\n goto done;\n }\n \n- if (!smmuv3_accel_alloc_viommu(s, idev, errp)) {\n- error_append_hint(errp, \"Unable to alloc vIOMMU: idev devid 0x%x: \",\n- idev->devid);\n+ if (!smmuv3_accel_alloc_viommu(s, hiodi, errp)) {\n+ error_append_hint(errp, \"Unable to alloc vIOMMU: hiodi devid 0x%x: \",\n+ hiodi->devid);\n return false;\n }\n \n done:\n- accel_dev->idev = idev;\n+ accel_dev->hiodi = hiodi;\n accel_dev->s_accel = s->s_accel;\n QLIST_INSERT_HEAD(&s->s_accel->device_list, accel_dev, next);\n- trace_smmuv3_accel_set_iommu_device(devfn, idev->devid);\n+ trace_smmuv3_accel_set_iommu_device(devfn, hiodi->devid);\n return true;\n }\n \n@@ -646,7 +646,7 @@ static void smmuv3_accel_unset_iommu_device(PCIBus *bus, void *opaque,\n {\n SMMUState *bs = opaque;\n SMMUPciBus *sbus = g_hash_table_lookup(bs->smmu_pcibus_by_busptr, bus);\n- HostIOMMUDeviceIOMMUFD *idev;\n+ HostIOMMUDeviceIOMMUFD *hiodi;\n SMMUv3AccelDevice *accel_dev;\n SMMUv3AccelState *accel;\n IOMMUFDVdev *vdev;\n@@ -662,16 +662,16 @@ static void smmuv3_accel_unset_iommu_device(PCIBus *bus, void *opaque,\n }\n \n accel_dev = container_of(sdev, SMMUv3AccelDevice, sdev);\n- idev = accel_dev->idev;\n+ hiodi = accel_dev->hiodi;\n accel = accel_dev->s_accel;\n /* Re-attach the default s2 hwpt id */\n- if (!host_iommu_device_iommufd_attach_hwpt(idev, idev->hwpt_id, NULL)) {\n- error_report(\"Unable to attach the default HW pagetable: idev devid \"\n- \"0x%x\", idev->devid);\n+ if (!host_iommu_device_iommufd_attach_hwpt(hiodi, hiodi->hwpt_id, NULL)) {\n+ error_report(\"Unable to attach the default HW pagetable: hiodi devid \"\n+ \"0x%x\", hiodi->devid);\n }\n \n if (accel_dev->s1_hwpt) {\n- iommufd_backend_free_id(accel_dev->idev->iommufd,\n+ iommufd_backend_free_id(accel_dev->hiodi->iommufd,\n accel_dev->s1_hwpt->hwpt_id);\n g_free(accel_dev->s1_hwpt);\n accel_dev->s1_hwpt = NULL;\n@@ -684,10 +684,10 @@ static void smmuv3_accel_unset_iommu_device(PCIBus *bus, void *opaque,\n accel_dev->vdev = NULL;\n }\n \n- accel_dev->idev = NULL;\n+ accel_dev->hiodi = NULL;\n accel_dev->s_accel = NULL;\n QLIST_REMOVE(accel_dev, next);\n- trace_smmuv3_accel_unset_iommu_device(devfn, idev->devid);\n+ trace_smmuv3_accel_unset_iommu_device(devfn, hiodi->devid);\n \n if (QLIST_EMPTY(&accel->device_list)) {\n smmuv3_accel_free_viommu(accel);\n@@ -879,10 +879,11 @@ bool smmuv3_accel_attach_gbpa_hwpt(SMMUv3State *s, Error **errp)\n \n hwpt_id = smmuv3_accel_gbpa_hwpt(s, accel);\n QLIST_FOREACH(accel_dev, &accel->device_list, next) {\n- if (!host_iommu_device_iommufd_attach_hwpt(accel_dev->idev, hwpt_id,\n+ if (!host_iommu_device_iommufd_attach_hwpt(accel_dev->hiodi, hwpt_id,\n &local_err)) {\n error_append_hint(&local_err, \"Failed to attach GBPA hwpt %u for \"\n- \"idev devid %u\", hwpt_id, accel_dev->idev->devid);\n+ \"hiodi devid %u\", hwpt_id,\n+ accel_dev->hiodi->devid);\n error_report_err(local_err);\n local_err = NULL;\n all_ok = false;\ndiff --git a/hw/i386/intel_iommu_accel.c b/hw/i386/intel_iommu_accel.c\nindex 67d54849f2f08187629fca5e2c081f8dd003b6b2..ed3793602bc51bbce0f4428bfabf6ad1772f3d13 100644\n--- a/hw/i386/intel_iommu_accel.c\n+++ b/hw/i386/intel_iommu_accel.c\n@@ -69,7 +69,7 @@ VTDHostIOMMUDevice *vtd_find_hiod_iommufd(VTDAddressSpace *as)\n return NULL;\n }\n \n-static bool vtd_create_fs_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n+static bool vtd_create_fs_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,\n VTDPASIDEntry *pe, uint32_t *fs_hwpt_id,\n Error **errp)\n {\n@@ -81,27 +81,27 @@ static bool vtd_create_fs_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n vtd.addr_width = vtd_pe_get_fs_aw(pe);\n vtd.pgtbl_addr = (uint64_t)vtd_pe_get_fspt_base(pe);\n \n- return iommufd_backend_alloc_hwpt(idev->iommufd, idev->devid, idev->hwpt_id,\n- 0, IOMMU_HWPT_DATA_VTD_S1, sizeof(vtd),\n- &vtd, fs_hwpt_id, errp);\n+ return iommufd_backend_alloc_hwpt(hiodi->iommufd, hiodi->devid,\n+ hiodi->hwpt_id, 0, IOMMU_HWPT_DATA_VTD_S1,\n+ sizeof(vtd), &vtd, fs_hwpt_id, errp);\n }\n \n-static void vtd_destroy_old_fs_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n+static void vtd_destroy_old_fs_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,\n VTDAddressSpace *vtd_as)\n {\n if (!vtd_as->fs_hwpt_id) {\n return;\n }\n- iommufd_backend_free_id(idev->iommufd, vtd_as->fs_hwpt_id);\n+ iommufd_backend_free_id(hiodi->iommufd, vtd_as->fs_hwpt_id);\n vtd_as->fs_hwpt_id = 0;\n }\n \n static bool vtd_device_attach_iommufd(VTDHostIOMMUDevice *vtd_hiod,\n VTDAddressSpace *vtd_as, Error **errp)\n {\n- HostIOMMUDeviceIOMMUFD *idev = HOST_IOMMU_DEVICE_IOMMUFD(vtd_hiod->hiod);\n+ HostIOMMUDeviceIOMMUFD *hiodi = HOST_IOMMU_DEVICE_IOMMUFD(vtd_hiod->hiod);\n VTDPASIDEntry *pe = &vtd_as->pasid_cache_entry.pasid_entry;\n- uint32_t hwpt_id = idev->hwpt_id;\n+ uint32_t hwpt_id = hiodi->hwpt_id;\n bool ret;\n \n /*\n@@ -116,21 +116,21 @@ static bool vtd_device_attach_iommufd(VTDHostIOMMUDevice *vtd_hiod,\n }\n \n if (vtd_pe_pgtt_is_fst(pe)) {\n- if (!vtd_create_fs_hwpt(idev, pe, &hwpt_id, errp)) {\n+ if (!vtd_create_fs_hwpt(hiodi, pe, &hwpt_id, errp)) {\n return false;\n }\n }\n \n- ret = host_iommu_device_iommufd_attach_hwpt(idev, hwpt_id, errp);\n- trace_vtd_device_attach_hwpt(idev->devid, vtd_as->pasid, hwpt_id, ret);\n+ ret = host_iommu_device_iommufd_attach_hwpt(hiodi, hwpt_id, errp);\n+ trace_vtd_device_attach_hwpt(hiodi->devid, vtd_as->pasid, hwpt_id, ret);\n if (ret) {\n /* Destroy old fs_hwpt if it's a replacement */\n- vtd_destroy_old_fs_hwpt(idev, vtd_as);\n+ vtd_destroy_old_fs_hwpt(hiodi, vtd_as);\n if (vtd_pe_pgtt_is_fst(pe)) {\n vtd_as->fs_hwpt_id = hwpt_id;\n }\n } else if (vtd_pe_pgtt_is_fst(pe)) {\n- iommufd_backend_free_id(idev->iommufd, hwpt_id);\n+ iommufd_backend_free_id(hiodi->iommufd, hwpt_id);\n }\n \n return ret;\n@@ -139,27 +139,28 @@ static bool vtd_device_attach_iommufd(VTDHostIOMMUDevice *vtd_hiod,\n static bool vtd_device_detach_iommufd(VTDHostIOMMUDevice *vtd_hiod,\n VTDAddressSpace *vtd_as, Error **errp)\n {\n- HostIOMMUDeviceIOMMUFD *idev = HOST_IOMMU_DEVICE_IOMMUFD(vtd_hiod->hiod);\n+ HostIOMMUDeviceIOMMUFD *hiodi = HOST_IOMMU_DEVICE_IOMMUFD(vtd_hiod->hiod);\n IntelIOMMUState *s = vtd_as->iommu_state;\n uint32_t pasid = vtd_as->pasid;\n bool ret;\n \n if (s->dmar_enabled && s->root_scalable) {\n- ret = host_iommu_device_iommufd_detach_hwpt(idev, errp);\n- trace_vtd_device_detach_hwpt(idev->devid, pasid, ret);\n+ ret = host_iommu_device_iommufd_detach_hwpt(hiodi, errp);\n+ trace_vtd_device_detach_hwpt(hiodi->devid, pasid, ret);\n } else {\n /*\n * If DMAR remapping is disabled or guest switches to legacy mode,\n * we fallback to the default HWPT which contains shadow page table.\n * So guest DMA could still work.\n */\n- ret = host_iommu_device_iommufd_attach_hwpt(idev, idev->hwpt_id, errp);\n- trace_vtd_device_reattach_def_hwpt(idev->devid, pasid, idev->hwpt_id,\n+ ret = host_iommu_device_iommufd_attach_hwpt(hiodi, hiodi->hwpt_id,\n+ errp);\n+ trace_vtd_device_reattach_def_hwpt(hiodi->devid, pasid, hiodi->hwpt_id,\n ret);\n }\n \n if (ret) {\n- vtd_destroy_old_fs_hwpt(idev, vtd_as);\n+ vtd_destroy_old_fs_hwpt(hiodi, vtd_as);\n }\n \n return ret;\n@@ -211,13 +212,14 @@ static void vtd_flush_host_piotlb_locked(gpointer key, gpointer value,\n did = VTD_SM_PASID_ENTRY_DID(&pc_entry->pasid_entry);\n \n if (piotlb_info->domain_id == did && piotlb_info->pasid == PASID_0) {\n- HostIOMMUDeviceIOMMUFD *idev =\n+ HostIOMMUDeviceIOMMUFD *hiodi =\n HOST_IOMMU_DEVICE_IOMMUFD(vtd_hiod->hiod);\n uint32_t entry_num = 1; /* Only implement one request for simplicity */\n Error *local_err = NULL;\n struct iommu_hwpt_vtd_s1_invalidate *cache = piotlb_info->inv_data;\n \n- if (!iommufd_backend_invalidate_cache(idev->iommufd, vtd_as->fs_hwpt_id,\n+ if (!iommufd_backend_invalidate_cache(hiodi->iommufd,\n+ vtd_as->fs_hwpt_id,\n IOMMU_HWPT_INVALIDATE_DATA_VTD_S1,\n sizeof(*cache), &entry_num, cache,\n &local_err)) {\ndiff --git a/hw/vfio/container-legacy.c b/hw/vfio/container-legacy.c\nindex 625f151364c060135076cd19537810bbe61ab998..d301b27aa652964d4f5f2cb5bd22de69048eb337 100644\n--- a/hw/vfio/container-legacy.c\n+++ b/hw/vfio/container-legacy.c\n@@ -1244,12 +1244,12 @@ static void vfio_iommu_legacy_instance_init(Object *obj)\n \n static void hiod_legacy_vfio_class_init(ObjectClass *oc, const void *data)\n {\n- HostIOMMUDeviceClass *hioc = HOST_IOMMU_DEVICE_CLASS(oc);\n+ HostIOMMUDeviceClass *hiodc = HOST_IOMMU_DEVICE_CLASS(oc);\n \n- hioc->realize = hiod_legacy_vfio_realize;\n- hioc->get_cap = hiod_legacy_vfio_get_cap;\n- hioc->get_iova_ranges = hiod_legacy_vfio_get_iova_ranges;\n- hioc->get_page_size_mask = hiod_legacy_vfio_get_page_size_mask;\n+ hiodc->realize = hiod_legacy_vfio_realize;\n+ hiodc->get_cap = hiod_legacy_vfio_get_cap;\n+ hiodc->get_iova_ranges = hiod_legacy_vfio_get_iova_ranges;\n+ hiodc->get_page_size_mask = hiod_legacy_vfio_get_page_size_mask;\n };\n \n static const TypeInfo types[] = {\ndiff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c\nindex 3e33dfbb35652376d1e285485221f27fcea84d16..399b36aa752ebe24d5ea7eb4d0a991785c51e642 100644\n--- a/hw/vfio/iommufd.c\n+++ b/hw/vfio/iommufd.c\n@@ -917,19 +917,19 @@ static void vfio_iommu_iommufd_class_init(ObjectClass *klass, const void *data)\n };\n \n static bool\n-host_iommu_device_iommufd_vfio_attach_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n+host_iommu_device_iommufd_vfio_attach_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,\n uint32_t hwpt_id, Error **errp)\n {\n- VFIODevice *vbasedev = HOST_IOMMU_DEVICE(idev)->agent;\n+ VFIODevice *vbasedev = HOST_IOMMU_DEVICE(hiodi)->agent;\n \n return !iommufd_cdev_attach_ioas_hwpt(vbasedev, hwpt_id, errp);\n }\n \n static bool\n-host_iommu_device_iommufd_vfio_detach_hwpt(HostIOMMUDeviceIOMMUFD *idev,\n+host_iommu_device_iommufd_vfio_detach_hwpt(HostIOMMUDeviceIOMMUFD *hiodi,\n Error **errp)\n {\n- VFIODevice *vbasedev = HOST_IOMMU_DEVICE(idev)->agent;\n+ VFIODevice *vbasedev = HOST_IOMMU_DEVICE(hiodi)->agent;\n \n return iommufd_cdev_detach_ioas_hwpt(vbasedev, errp);\n }\n@@ -938,7 +938,7 @@ static bool hiod_iommufd_vfio_realize(HostIOMMUDevice *hiod, void *opaque,\n Error **errp)\n {\n VFIODevice *vdev = opaque;\n- HostIOMMUDeviceIOMMUFD *idev;\n+ HostIOMMUDeviceIOMMUFD *hiodi;\n HostIOMMUDeviceCaps *caps = &hiod->caps;\n VendorCaps *vendor_caps = &caps->vendor_caps;\n enum iommu_hw_info_type type;\n@@ -958,10 +958,10 @@ static bool hiod_iommufd_vfio_realize(HostIOMMUDevice *hiod, void *opaque,\n caps->hw_caps = hw_caps;\n caps->max_pasid_log2 = max_pasid_log2;\n \n- idev = HOST_IOMMU_DEVICE_IOMMUFD(hiod);\n- idev->iommufd = vdev->iommufd;\n- idev->devid = vdev->devid;\n- idev->hwpt_id = vdev->hwpt->hwpt_id;\n+ hiodi = HOST_IOMMU_DEVICE_IOMMUFD(hiod);\n+ hiodi->iommufd = vdev->iommufd;\n+ hiodi->devid = vdev->devid;\n+ hiodi->hwpt_id = vdev->hwpt->hwpt_id;\n \n return true;\n }\n@@ -988,14 +988,14 @@ hiod_iommufd_vfio_get_page_size_mask(HostIOMMUDevice *hiod)\n static void hiod_iommufd_vfio_class_init(ObjectClass *oc, const void *data)\n {\n HostIOMMUDeviceClass *hiodc = HOST_IOMMU_DEVICE_CLASS(oc);\n- HostIOMMUDeviceIOMMUFDClass *idevc = HOST_IOMMU_DEVICE_IOMMUFD_CLASS(oc);\n+ HostIOMMUDeviceIOMMUFDClass *hiodic = HOST_IOMMU_DEVICE_IOMMUFD_CLASS(oc);\n \n hiodc->realize = hiod_iommufd_vfio_realize;\n hiodc->get_iova_ranges = hiod_iommufd_vfio_get_iova_ranges;\n hiodc->get_page_size_mask = hiod_iommufd_vfio_get_page_size_mask;\n \n- idevc->attach_hwpt = host_iommu_device_iommufd_vfio_attach_hwpt;\n- idevc->detach_hwpt = host_iommu_device_iommufd_vfio_detach_hwpt;\n+ hiodic->attach_hwpt = host_iommu_device_iommufd_vfio_attach_hwpt;\n+ hiodic->detach_hwpt = host_iommu_device_iommufd_vfio_detach_hwpt;\n };\n \n static const TypeInfo types[] = {\n", "prefixes": [ "PULL", "09/14" ] }