Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9B01C531CC for ; Fri, 24 Jul 2026 03:11:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wn6IE-00089M-Le; Thu, 23 Jul 2026 23:09:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wn6IB-0007zO-1b; Thu, 23 Jul 2026 23:09:43 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wn6I9-0008TF-9j; Thu, 23 Jul 2026 23:09:42 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66NLfjIq4190685; Fri, 24 Jul 2026 03:09:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=H4xQAIQokoZki0hhp bWhZgArYxp6R5Y5mllNCEWWDTc=; b=nuNKL6yiJU+xYM0F+74/MOajQgZlqwkPC 55M+uxAHhyeG5QXLPHFi8u2bNzWGvHF3yjxvbO+TJs3+PiUaaSTCpjVeNTJ/Ssds 4P+mH1yTPgZdF8XLbrbi6JvbqrJpO7uW+GREYBwtWtJ/QgQuqwH4lhS9IUyYIBxL miTJWOoeKNhAaKqGsx9/mwlr4tntbhTHR89ZDJulXTmBPUxdoAHGvfnF48iJ8J5G /3zNOZ9qrcj4fJ+388bD9BjztSZjS2/zB4fFh0LySCvIh/N8Hu7dyhAFoYJ7gr/o FbuVmYgvSROopBLtsdlROBDLRaEcahtPH4TwbUPLfk+CKjU2n/aLg== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4fg7ahj3c7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Jul 2026 03:09:38 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 66O34e7t021013; Fri, 24 Jul 2026 03:09:37 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([172.16.1.9]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4fgm6wf8js-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Jul 2026 03:09:37 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 66O39aUW64553256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jul 2026 03:09:36 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E9EC858043; Fri, 24 Jul 2026 03:09:35 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5BF2F58059; Fri, 24 Jul 2026 03:09:35 +0000 (GMT) Received: from WIN-DU0DFC9G5VV.ibm.com (unknown [9.61.251.161]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Fri, 24 Jul 2026 03:09:35 +0000 (GMT) From: Konstantin Shkolnyy To: mjrosato@linux.ibm.com Cc: alifm@linux.ibm.com, richard.henderson@linaro.org, iii@linux.ibm.com, david@kernel.org, cohuck@redhat.com, pasic@linux.ibm.com, borntraeger@linux.ibm.com, qemu-s390x@nongnu.org, qemu-devel@nongnu.org, Konstantin Shkolnyy Subject: [PATCH v4 06/15] s390x/pci: Remove a ptr to S390PCIBusDevice from S390PCIIOMMU Date: Thu, 23 Jul 2026 22:09:10 -0500 Message-Id: <20260724030919.123733-7-kshk@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260724030919.123733-1-kshk@linux.ibm.com> References: <20260724030919.123733-1-kshk@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: QZDVv6B7FT61sWhUGto1wX4mTLHX2dVr X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI0MDAyMiBTYWx0ZWRfX2IV4l1O1nyWZ LzcBAQfwqbYoXxpq4Wr0F532dwfjeh31xllMkfHWarruEqZ5HEqosYL/4CDuybaJgnikrv2vCPC Rg1PSpmcIaYE8AuDMTfSpvLtqe/6yagmwkm50PGLbr2Y/kn/u7wS/ayEkJR30hzWJd6l8+29TK1 j8FGzW1IF2KROoSB64lwgFpg4+jnYdmMCH1u5dmskizrOeYmxbPlEDLqB8x30Y4LNDXbqP68MxZ 8CkqzKFMZocWAjrPCUlQL9UeG+9hFqYu5ub4iV+zsxWNKECSsFYVxzdQncxPN61urzos+fsNIvY 4SiQsEqf+xepDS/43vtq/HQP1qdrvzP0Y8FYclBZadwW0batCrQWqpIjH3ySF73rE8nc2NWYe5s LMe+KymAgP4L7RgbDqqEqwKYeuhYrwfj86/fwDbCsfSJang4CTbkDdeFU2M2Qh1GQubYSalVYL1 sB5s/wioOR3oBhKQR4g== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI0MDAyMiBTYWx0ZWRfX6zuHBykx6iCu 3UKRqt1m41a3MpFgPPDZqLJp5Sk+n0/qtExXAnObpd4qFEwGP3iU1CLQixeF9vZ7bnuJ/P5LPCy qk2iB15j8noh+ovR2jqeDPPN571uWrw= X-Proofpoint-GUID: QZDVv6B7FT61sWhUGto1wX4mTLHX2dVr X-Authority-Analysis: v=2.4 cv=SM5ykuvH c=1 sm=1 tr=0 ts=6a62d772 cx=c_pps a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17 a=RAioF0-LDSMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=VnNF1IyMAAAA:8 a=yINFAIt2aqTEABBYJGoA:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-23_07,2026-07-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 suspectscore=0 adultscore=0 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607240022 Received-SPF: pass client-ip=148.163.158.5; envelope-from=kshk@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This pointer is no longer used, after fields were moved from S390PCIIOMMU to S390PCIBusDevice. Signed-off-by: Konstantin Shkolnyy --- hw/s390x/s390-pci-bus.c | 15 +++++++-------- include/hw/s390x/s390-pci-bus.h | 1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index a08f226ef8..d2abbdab7f 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -552,7 +552,7 @@ static IOMMUTLBEntry s390_translate_iommu(IOMMUMemoryRegion *mr, hwaddr addr, .perm = IOMMU_NONE, }; - switch (iommu->pbdev->state) { + switch (pbdev->state) { case ZPCI_FS_ENABLED: case ZPCI_FS_BLOCKED: if (!iommu->enabled) { @@ -587,9 +587,9 @@ static IOMMUTLBEntry s390_translate_iommu(IOMMUMemoryRegion *mr, hwaddr addr, } err: if (error) { - iommu->pbdev->state = ZPCI_FS_ERROR; - s390_pci_generate_error_event(error, iommu->pbdev->fh, - iommu->pbdev->fid, addr, 0); + pbdev->state = ZPCI_FS_ERROR; + s390_pci_generate_error_event(error, pbdev->fh, + pbdev->fid, addr, 0); } return ret; } @@ -780,7 +780,7 @@ void s390_pci_iommu_enable(S390PCIBusDevice *pbdev) * so the smallest IOMMU region we can define runs from 0 to the end * of the PCI address space. */ - char *name = g_strdup_printf("iommu-s390-%04x", iommu->pbdev->uid); + char *name = g_strdup_printf("iommu-s390-%04x", pbdev->uid); memory_region_init_iommu(&pbdev->iommu_mr, sizeof(pbdev->iommu_mr), TYPE_S390_IOMMU_MEMORY_REGION, OBJECT(&iommu->mr), name, iommu->pal + 1); @@ -801,14 +801,14 @@ void s390_pci_iommu_direct_map_enable(S390PCIBusDevice *pbdev) * IOVA X + SDMA. VFIO will handle pinning via its memory listener. */ g_autofree char *name = g_strdup_printf("iommu-dm-s390-%04x", - iommu->pbdev->uid); + pbdev->uid); pbdev->dm_mr = g_malloc0(sizeof(*pbdev->dm_mr)); memory_region_init_alias(pbdev->dm_mr, OBJECT(&iommu->mr), name, get_system_memory(), 0, s390_get_memory_limit(s390ms)); iommu->enabled = true; - memory_region_add_subregion(&iommu->mr, iommu->pbdev->zpci_fn.sdma, + memory_region_add_subregion(&iommu->mr, pbdev->zpci_fn.sdma, pbdev->dm_mr); } @@ -1200,7 +1200,6 @@ static void s390_pcihost_plug(HotplugHandler *hotplug_dev, DeviceState *dev, pbdev->pdev = pdev; pbdev->iommu = s390_pci_get_iommu(s, pci_get_bus(pdev), pdev->devfn); - pbdev->iommu->pbdev = pbdev; pbdev->state = ZPCI_FS_DISABLED; set_pbdev_info(pbdev); diff --git a/include/hw/s390x/s390-pci-bus.h b/include/hw/s390x/s390-pci-bus.h index d9bafd6859..fcaaf19512 100644 --- a/include/hw/s390x/s390-pci-bus.h +++ b/include/hw/s390x/s390-pci-bus.h @@ -273,7 +273,6 @@ typedef struct S390PCIDMACount { struct S390PCIIOMMU { Object parent_obj; - S390PCIBusDevice *pbdev; AddressSpace as; MemoryRegion mr; bool enabled; -- 2.34.1