From mboxrd@z Thu Jan 1 00:00:00 1970 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 1F3C9CA5FC5 for ; Wed, 30 Sep 2026 14:53:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBvgG-0000yp-Lx; Wed, 30 Sep 2026 10:53:12 -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 1xBvgC-0000r1-C6; Wed, 30 Sep 2026 10:53:08 -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 1xBvgA-0006aP-55; Wed, 30 Sep 2026 10:53:07 -0400 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68UE5WH91335891; Wed, 30 Sep 2026 14:52:59 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=r+uYJ4RtfseldbnKU4IQt/Iv1aw3bHKZYehejQe+s vk=; b=dtth2Rso8QIPGeOyoSDjoVxoPpwwZ95OvbdaYwh9zYjHcSuRqXXWqW7Os SPKd5O00iCiPG/EsXZnX+J1049sYJAQ44zhW9CJqBefiENU233wjt3G4ChnWHgGw riwS15sxH/tKIajpux3Ad3VOtwVzycJMBRe+ENNX7m7MB2iKAoRqHIFjJz/T3uDS I/KiDqLIwOOE/7F9Nlx4Sdich36UHSqA6Ol4qutiQwqivornCIsoB2WMj/Vcs1Rv 9maqqRUDSFiofBSw6yEEpCzln/87HABwJTL9YT/zZP2uCmXOV0RrwP8CUEifuGAO NqFCU7HNhECB1MthkJgqT6rvZhVBg== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4gx5qrdmqb-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 30 Sep 2026 14:52:59 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 68UE3Aae3583921; Wed, 30 Sep 2026 14:52:58 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4h0g8e4mbm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Sep 2026 14:52:58 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 68UEqv2T24707628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Sep 2026 14:52:57 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 743F558066; Wed, 30 Sep 2026 14:52:57 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0EFA58055; Wed, 30 Sep 2026 14:52:56 +0000 (GMT) Received: from WIN-DU0DFC9G5VV.atx-us.ibm.com (unknown [9.16.60.171]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 30 Sep 2026 14:52:56 +0000 (GMT) From: Konstantin Shkolnyy To: mjrosato@linux.ibm.com Cc: alifm@linux.ibm.com, farman@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 v11 00/16] s390x/pci: Implement migration for emulated devices Date: Wed, 30 Sep 2026 09:52:39 -0500 Message-Id: <20260930145255.140164-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: AW1haW4tMjYwOTMwMDA1OCBTYWx0ZWRfX3gpu6AZiYwKQ ArrArhiB+mCXOzQm6iTRLfv7qA/txhBNpyKkw27NU8OTbSt3V4mS1bmcd9mVMQlY+9o39AuYi6h 76FiyX/OKCJawsn7DBrcy90jkww6u+CCboWDYBbGlPEZv3UROYvE/Q5LftfHv5nCSMO7iuJcvdS SXKqMts2NrQYnqp104+ega9HAuPSipl/RZnaO0NKKBaV1+dN6/Mqq9pjOxtuTeugmYNfM32Fvgc nDF/PdpoHxT5AOfse4grqYn/dYejsJ5buwverR8FMRJMiVv1vgzopw8VTcsLimosYz39cB9Na9S LFFm3kdgoJGiBe9hf99bUClW01Vp2QRv1OlVrJbTBgSCgBYyiJJV08py+Wh+VlcrmVgvpD2BqWl fGIwwkPShevX3qXawk+xkNIuk35VUBf9T73LsPn6D4O5NMvwjb4rEOujE+092lBNX9zjxDu3SLE 5/Ia6cB6eXULjbCCAxA== X-Authority-Analysis: v=2.4 cv=SPbXx+vH c=1 sm=1 tr=0 ts=6abd224b cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=VdqzKS8jKosA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=uAbxVGIbfxUO_5tXvNgY:22 a=p0WdMEafAAAA:8 a=Ao2d2QTnYvyA5xfeocEA:9 X-Proofpoint-ORIG-GUID: AwDkZRp15-BvnaNQZVaSOSttJ7btF8Ix X-Proofpoint-Spam-Info: AW1haW4tMjYwOTMwMDA1OCBTYWx0ZWRfX3IHceF1mq4zg cmmI7VbX1LgB/KNrBz9EdOxCYdVCrLD8fL/oX6E+RQDJBOxqBU89m2rCP5DTmSF67flrmtAN6mE KaMxHsutoFQYiipG7PFwzdbYcB1k0cc= X-Proofpoint-GUID: AwDkZRp15-BvnaNQZVaSOSttJ7btF8Ix X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-30_03,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 bulkscore=0 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609300058 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, 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 ATTENTION! This series is built to apply on top of https://gitlab.com/efarman/qemu/-/tree/s390-next. 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 v11: - patch 1: Accomodate non-frame-aligned PBA. - patch 14: Update according to different error reporting on branch s390-next. - patch 15: - fail migration at destination if a PCI device is missing that was present at the source, - clear pending SEI queue on machine reset, - make sure migrated pending SEIs are first in the queue. Konstantin Shkolnyy (15): 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: Factor ioat sanity checks into a separate function 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 | 530 +++++++++++++++++++++++++++---- hw/s390x/s390-pci-inst.c | 172 +++++----- hw/s390x/s390-pci-vfio.c | 4 +- hw/s390x/s390-virtio-ccw.c | 4 + include/hw/s390x/s390-pci-bus.h | 43 ++- include/hw/s390x/s390-pci-inst.h | 7 +- 6 files changed, 611 insertions(+), 149 deletions(-) -- 2.34.1