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 lists.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 3A683F45A18 for ; Sat, 11 Apr 2026 02:29:03 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBO3s-00023g-Tz; Fri, 10 Apr 2026 22:27:04 -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 1wBO3r-00022O-Hb; Fri, 10 Apr 2026 22:27:03 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBO3o-0000LY-EG; Fri, 10 Apr 2026 22:27:03 -0400 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63AFeoUS2302533; Sat, 11 Apr 2026 02:26:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=pp1; bh=5dGHeUZdYw4AwVziYjzw5fzJrURxo/6YCMzIafKFG GQ=; b=Y0r4btxhuFSgx9FVowecRY2z3ZZEE6yHjlL8pP/0u2njJCcb07VxEWC6y 6tdedrlxSi0Dnp4d0C7q72zR3sdyIHH2mwZHWQDoAv9/uWIGs8FHGXvHLDF8zXa4 4AnrkVHrxkHYbREWiTLiRG0OUjrBbDMCPphDUxBnImiQsMqgxm7Mlq8g8SGl9Kua H96mFNYCWkge54cygRkP5xdrIDjsu8WI9iacYOw62EY9Z3uqhJ25J2UbrL7rtRCy 1XFGxIQSN35N9J9HlLkguH4r6YR5tKM2ly2ykvJwLlNFGFUq4vp1b8cuLpNbSaR2 qazULCp7jXRiyfz3ItUwK8SiDO4gw== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dcn2fw3vr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 11 Apr 2026 02:26:53 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 63B0U1ZP019113; Sat, 11 Apr 2026 02:26:53 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4dcme9u230-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 11 Apr 2026 02:26:53 +0000 Received: from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com [10.39.53.230]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 63B2Qpln34734758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 Apr 2026 02:26:51 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 687945805A; Sat, 11 Apr 2026 02:26:51 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CCDFC58054; Sat, 11 Apr 2026 02:26:50 +0000 (GMT) Received: from WIN-DU0DFC9G5VV.ibm.com (unknown [9.61.252.248]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Sat, 11 Apr 2026 02:26:50 +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 v2 00/15] s390x/pci: Implement migration for emulated devices Date: Fri, 10 Apr 2026 21:26:03 -0500 Message-Id: <20260411022618.2136588-1-kshk@linux.ibm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDExMDAxNiBTYWx0ZWRfX7RjsZli60dBE JQd45UnQriZ/Hq45wAzKIeydnyh9JlYDbnm3R7fB+pYPQyI1kazQVR9czCUEIylifzJ+9Pf30fC +ZazqxG/jwxpJG7JF8qnZO4q+s6eaEqzkoe6Uy7S51jMd+AWHCn6xJcBdSO/2y93oJzN/SGaI1F XQR8eO3uaFc6ALDwRCBX17lTexo81r06yq5hJiLFzkKMvYKA8i7k7yIUt8+0ZLkAfQkAWYU9JIh aCTVXlz4AKdy/a50tPHnO9TMbrak4NwVXMkhL7aZ9eavn1XP72/o59yVAFJ3on5fDVazUv5M9Wv pGsecceqCwfxCz20/nUlMtT4PHKvU7G0nDp1eyzZDXyCJJ3V5kPKIeB8T9PN4nICVC+9h/4u15C /4ZvWOiecHhTb422+V6AykpHkWuB4id9J5JVuHUe9rcz1dS90zlVdFL9aRtBEKBny8nETF8AW2z UkT0UMA0amYKxqB5o4A== X-Authority-Analysis: v=2.4 cv=FsY1OWrq c=1 sm=1 tr=0 ts=69d9b16d cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=U7nrCbtTmkRpXpFmAIza:22 a=VwQbUJbxAAAA:8 a=20KFwNOVAAAA:8 a=8Hgc_-vnOkY6PsbUFoQA:9 X-Proofpoint-ORIG-GUID: lV4LbyvLhp-Kc_tY8qx8ZjQd3k07K3kP X-Proofpoint-GUID: lV4LbyvLhp-Kc_tY8qx8ZjQd3k07K3kP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-10_07,2026-04-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 impostorscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 malwarescore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604110016 Received-SPF: pass client-ip=148.163.156.1; envelope-from=kshk@linux.ibm.com; helo=mx0a-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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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 Up until now QEMU marked any zPCI device as "unmigratable." This patch series adds support for migrating emulated devices, which are simpler to migrate. It leaves VFIO devices still unmigratable. To enable migration, the device state needs to be saved/restored to/from the migration stream. There are 2 kinds of emulated devices - those that use the zPCI IOMMU page table emulation in QEMU (e.g., Intel IGB NIC), and those that don't (virtio). This is important to note for testing purposes. This change was tested on IGB, virtio-net and virtio-blk devices by running I/O on them while performing "virsh managedsave, virsh start" and also live migration to another host and back. Changes in v2: - Block migration for machine versions 11.0 and earlier. Because the current version is still 11.0, migration will start working when QEMU gets moved to 11.1 by the following patch: https://lore.kernel.org/qemu-devel/20260331140347.653404-1-cohuck@redhat.com/ Konstantin Shkolnyy (14): s390x/pci: Create function to contain translation status check s390x/pci: Move iommu_mr from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Move dm_mr from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Move iotlb from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Remove a ptr to S390PCIBusDevice from S390PCIIOMMU s390x/pci: Move/rename enabled from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Move dma_limit from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Move g_iota from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Move pba from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Move pal from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Move max_dma_limit from S390PCIIOMMU to S390PCIBusDevice s390x/pci: Add a comment explaining S390PCIIOMMU purpose s390x/pci: Implement migration for emulated devices s390x/pci: Create function to contain fmb_timer start Matthew Rosato (1): s390x/pci: implement IOMMU replay hw/s390x/s390-pci-bus.c | 278 +++++++++++++++++++++++++------ hw/s390x/s390-pci-inst.c | 116 +++++++------ hw/s390x/s390-pci-vfio.c | 4 +- hw/s390x/s390-virtio-ccw.c | 5 + include/hw/s390x/s390-pci-bus.h | 39 +++-- include/hw/s390x/s390-pci-inst.h | 3 +- 6 files changed, 320 insertions(+), 125 deletions(-) -- 2.34.1