{"id":2222250,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2222250/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260411022618.2136588-15-kshk@linux.ibm.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","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":"<20260411022618.2136588-15-kshk@linux.ibm.com>","list_archive_url":null,"date":"2026-04-11T02:26:17","name":"[v2,14/15] s390x/pci: Implement migration for emulated devices","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"354e0f2e2eb5d27ebadbe00128b2e5a067c5b154","submitter":{"id":90249,"url":"http://patchwork.ozlabs.org/api/1.2/people/90249/?format=json","name":"Konstantin Shkolnyy","email":"kshk@linux.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260411022618.2136588-15-kshk@linux.ibm.com/mbox/","series":[{"id":499525,"url":"http://patchwork.ozlabs.org/api/1.2/series/499525/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499525","date":"2026-04-11T02:26:13","name":"s390x/pci: Implement migration for emulated devices","version":2,"mbox":"http://patchwork.ozlabs.org/series/499525/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222250/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222250/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 (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=CdRXDpj4;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists.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 4fsyJ86hWqz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 12:27:51 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wBO40-0002DC-6u; Fri, 10 Apr 2026 22:27:12 -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 <kshk@linux.ibm.com>)\n id 1wBO3x-00028y-I3; Fri, 10 Apr 2026 22:27:09 -0400","from mx0a-001b2d01.pphosted.com ([148.163.156.1])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <kshk@linux.ibm.com>)\n id 1wBO3v-0000Ow-CF; Fri, 10 Apr 2026 22:27:09 -0400","from pps.filterd (m0360083.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63AFnwtG2592757; Sat, 11 Apr 2026 02:27:03 GMT","from ppma13.dal12v.mail.ibm.com\n (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dcn2en5dg-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Sat, 11 Apr 2026 02:27:03 +0000 (GMT)","from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1])\n by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 63B0M3Mn018987;\n Sat, 11 Apr 2026 02:27:02 GMT","from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68])\n by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4dcme9u23p-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Sat, 11 Apr 2026 02:27:02 +0000","from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com\n [10.39.53.230])\n by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 63B2R0mR47251966\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Sat, 11 Apr 2026 02:27:00 GMT","from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id AD3615805F;\n Sat, 11 Apr 2026 02:27:00 +0000 (GMT)","from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 20D1E5805C;\n Sat, 11 Apr 2026 02:27:00 +0000 (GMT)","from WIN-DU0DFC9G5VV.ibm.com (unknown [9.61.252.248])\n by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP;\n Sat, 11 Apr 2026 02:27:00 +0000 (GMT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-transfer-encoding:date:from:in-reply-to:message-id\n :mime-version:references:subject:to; s=pp1; bh=RPnb/3oTyoLut9quX\n SeHc3lwxt57zRTjT6x6s+4abQw=; b=CdRXDpj4QuQU36rIG+WqqtHP3DMTSwzK7\n x3GpnO73X2j9St1xydyMDr7bd8mB4VzP9PZ65Tgs6fuTrGgGDsfqJmY6SpEULpMT\n ih8ymLrnOr3epuRNe2T64Slmh+lPkXx2jl1RVkgU5q98EDMIz3D4S9HkORe0Rtiv\n lpoEl65f7wBsn9EeP8PkGNhOtaxIqRxquJ4cmkfNUYjLZDJPnITiOw1LJDWw0sbd\n WB2uj7FJ1kth+fuD85oeWF4Hk0yC2YBN/iBpx12zTYE7jfxdSb90OKy2L8Exo7ji\n 03SbjB4Nj7bXxrpoIE9tg7cwJSpcSuAU5IihQmP1OWpf5VPiFfzeg==","From":"Konstantin Shkolnyy <kshk@linux.ibm.com>","To":"mjrosato@linux.ibm.com","Cc":"alifm@linux.ibm.com, richard.henderson@linaro.org, iii@linux.ibm.com,\n david@kernel.org, cohuck@redhat.com, pasic@linux.ibm.com,\n borntraeger@linux.ibm.com, qemu-s390x@nongnu.org,\n qemu-devel@nongnu.org, Konstantin Shkolnyy <kshk@linux.ibm.com>","Subject":"[PATCH v2 14/15] s390x/pci: Implement migration for emulated devices","Date":"Fri, 10 Apr 2026 21:26:17 -0500","Message-Id":"<20260411022618.2136588-15-kshk@linux.ibm.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20260411022618.2136588-1-kshk@linux.ibm.com>","References":"<20260411022618.2136588-1-kshk@linux.ibm.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","X-Proofpoint-ORIG-GUID":"-KekZNdbbEh_DN7-D2MkZhDY_ufHAcDL","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDExMDAxNiBTYWx0ZWRfX1d+N+rb7ZKP9\n UuL6kajzJ70/vHXImeipJxgZlani+MwWY1+MDfAZdK3++eOrGqNJPoRqE6igz7F3WEluYf8RL20\n wQYP9bh6hMJWV9ENyIRHlcYW9ZI19EnBqbV+XEUIo9TSHljmlmABm5hhQsFnO360Ay/DgTpmq7j\n 7H5dAw4UX84yveoKmiHOuA+6B+AvVHHMp2oobu4SzXIhr8FdtLT9WOFnvdG1phwQSRMVeK63nST\n pFbbo3bqVE1+73YVrCp2m7XD6RZ5DwD/A0vovuCvzqQJ5h/E5xgHwcHazHh50TYviLLlEZAi5Gb\n 5CAaRTWNKHMzGq52lYSGXQIzNYUYL7BalX8EpFDoA0u/FiwMqxceCpWr5HM+mPb1wR+g3Zhkjsr\n QNqoswFRAL+fRGRA3KV4AW63qn4vgKW6I6BD+1jdoSjeWBbSBexPRB3vipKBs4badhguZY6t/9G\n puOaz5uEufDg+rPVNrw==","X-Authority-Analysis":"v=2.4 cv=Cfw4Irrl c=1 sm=1 tr=0 ts=69d9b177 cx=c_pps\n a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=iQ6ETzBq9ecOQQE5vZCe:22 a=VnNF1IyMAAAA:8 a=lLb58Vng283uxITr1-gA:9","X-Proofpoint-GUID":"-KekZNdbbEh_DN7-D2MkZhDY_ufHAcDL","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-10_07,2026-04-09_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n malwarescore=0 phishscore=0 clxscore=1015 adultscore=0 suspectscore=0\n priorityscore=1501 impostorscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n 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;\n 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,\n DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\n RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n 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 <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":"Implement zPCI device state migration, consequently enabling migration\nof VMs that have emulated PCI devices, whether virtio or not.\nMigration is allowed for devices whose function handle has the\nFH_SHM_EMUL bit set. For these devices QEMU will save and restore the\nstate of its zPCI emulator.\n\nPassthrough devices will continue to block migration.\n\nSigned-off-by: Konstantin Shkolnyy <kshk@linux.ibm.com>\n---\n hw/s390x/s390-pci-bus.c         | 139 ++++++++++++++++++++++++++++++--\n hw/s390x/s390-pci-inst.c        |   2 +-\n hw/s390x/s390-virtio-ccw.c      |   5 ++\n include/hw/s390x/s390-pci-bus.h |   4 +\n 4 files changed, 144 insertions(+), 6 deletions(-)","diff":"diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c\nindex f339a0fd94..ab9339bdc7 100644\n--- a/hw/s390x/s390-pci-bus.c\n+++ b/hw/s390x/s390-pci-bus.c\n@@ -26,6 +26,7 @@\n #include \"hw/pci/pci_bridge.h\"\n #include \"hw/pci/msi.h\"\n #include \"exec/cpu-common.h\"\n+#include \"migration/blocker.h\"\n #include \"qemu/error-report.h\"\n #include \"qemu/module.h\"\n #include \"system/reset.h\"\n@@ -33,6 +34,11 @@\n \n #include \"trace.h\"\n \n+static const Property phb_props[] = {\n+    DEFINE_PROP_BOOL(\"x-zpci-emul-dev-migr-enabled\", S390pciState,\n+                     emul_dev_migr_enabled, true),\n+};\n+\n S390pciState *s390_get_phb(void)\n {\n     static S390pciState *phb;\n@@ -904,6 +910,25 @@ static void set_pbdev_info(S390PCIBusDevice *pbdev)\n     pbdev->pci_group = s390_group_find(ZPCI_DEFAULT_FN_GRP);\n }\n \n+static int s390_set_emul_dev_migration_blocker(S390pciState *s, Error **errp)\n+{\n+    if (s->emul_dev_migr_enabled) {\n+        return 0;\n+    }\n+    error_setg(&s->migr_blocker,\n+               \"Migration disabled for emulated zPCI devices on this machine type\");\n+    return migrate_add_blocker(&s->migr_blocker, errp);\n+}\n+\n+static void s390_clear_emul_dev_migration_blocker(S390pciState *s)\n+{\n+    if (s->migr_blocker) {\n+        migrate_del_blocker(&s->migr_blocker);\n+        error_free(s->migr_blocker);\n+        s->migr_blocker = NULL;\n+    }\n+}\n+\n static void s390_pcihost_realize(DeviceState *dev, Error **errp)\n {\n     PCIBus *b;\n@@ -939,6 +964,7 @@ static void s390_pcihost_realize(DeviceState *dev, Error **errp)\n     css_register_io_adapters(CSS_IO_ADAPTER_PCI, true, false,\n                              S390_ADAPTER_SUPPRESSIBLE, errp);\n     s390_pcihost_kvm_realize();\n+    s390_set_emul_dev_migration_blocker(s, errp);\n }\n \n static void s390_pcihost_unrealize(DeviceState *dev)\n@@ -946,6 +972,8 @@ static void s390_pcihost_unrealize(DeviceState *dev)\n     S390PCIGroup *group;\n     S390pciState *s = S390_PCI_HOST_BRIDGE(dev);\n \n+    s390_clear_emul_dev_migration_blocker(s);\n+\n     while (!QTAILQ_EMPTY(&s->zpci_groups)) {\n         group = QTAILQ_FIRST(&s->zpci_groups);\n         QTAILQ_REMOVE(&s->zpci_groups, group, link);\n@@ -1116,6 +1144,27 @@ static int s390_pci_interp_plug(S390pciState *s, S390PCIBusDevice *pbdev)\n     return 0;\n }\n \n+static int s390_set_passthrough_migration_blocker(S390PCIBusDevice *pbdev,\n+                                            Error **errp)\n+{\n+    pbdev->passthrough_migr_blocker = NULL;\n+\n+    if (pbdev->fh & FH_SHM_EMUL) {\n+        return 0;\n+    }\n+    error_setg(&pbdev->passthrough_migr_blocker,\n+               \"Migration blocked by passthrough zPCI device \"\n+               \"fh 0x%x uid %d fid %d\", pbdev->fh, pbdev->uid, pbdev->fid);\n+    return migrate_add_blocker(&pbdev->passthrough_migr_blocker, errp);\n+}\n+\n+static void s390_clear_passthrough_migration_blocker(S390PCIBusDevice *pbdev)\n+{\n+    if (pbdev->passthrough_migr_blocker) {\n+        migrate_del_blocker(&pbdev->passthrough_migr_blocker);\n+    }\n+}\n+\n static void s390_pcihost_plug(HotplugHandler *hotplug_dev, DeviceState *dev,\n                               Error **errp)\n {\n@@ -1235,6 +1284,11 @@ static void s390_pcihost_plug(HotplugHandler *hotplug_dev, DeviceState *dev,\n             return;\n         }\n \n+        if (s390_set_passthrough_migration_blocker(pbdev, errp)) {\n+            s390_pci_msix_free(pbdev);\n+            return;\n+        }\n+\n         if (dev->hotplugged) {\n             s390_pci_generate_plug_event(HP_EVENT_TO_CONFIGURED ,\n                                          pbdev->fh, pbdev->fid);\n@@ -1271,6 +1325,8 @@ static void s390_pcihost_unplug(HotplugHandler *hotplug_dev, DeviceState *dev,\n             return;\n         }\n \n+        s390_clear_passthrough_migration_blocker(pbdev);\n+\n         s390_pci_generate_plug_event(HP_EVENT_STANDBY_TO_RESERVED,\n                                      pbdev->fh, pbdev->fid);\n         bus = pci_get_bus(pci_dev);\n@@ -1438,6 +1494,7 @@ static void s390_pcihost_class_init(ObjectClass *klass, const void *data)\n     hc->unplug_request = s390_pcihost_unplug_request;\n     hc->unplug = s390_pcihost_unplug;\n     msi_nonbroken = true;\n+    device_class_set_props(dc, phb_props);\n }\n \n static const TypeInfo s390_pcihost_info = {\n@@ -1600,13 +1657,85 @@ static const Property s390_pci_device_properties[] = {\n                      true),\n };\n \n-static const VMStateDescription s390_pci_device_vmstate = {\n-    .name = TYPE_S390_PCI_DEVICE,\n+static int s390_pci_device_post_load(void *opaque, int version_id)\n+{\n+    S390PCIBusDevice *pbdev = S390_PCI_DEVICE(opaque);\n+\n     /*\n-     * TODO: add state handling here, so migration works at least with\n-     * emulated pci devices on s390x\n+     * Now that S390PCIBusDevice fields have been restored, regenerate IOMMU\n+     * state - that includes IOTLB contents and QEMU memory regions.\n      */\n-    .unmigratable = 1,\n+    if (pbdev->iommu_enabled) {\n+        assert(pbdev->iommu);\n+        if (s390_pci_is_translation_enabled(pbdev->g_iota)) {\n+            s390_pci_iommu_enable(pbdev);\n+            s390_pci_ioat_replay(pbdev);\n+        } else {\n+            s390_pci_iommu_direct_map_enable(pbdev);\n+        }\n+    }\n+\n+    /*\n+     * Guest sets fmb_addr by mpcifc.ZPCI_MOD_FC_SET_MEASURE instruction.\n+     * The handler consequently starts fmb_timer. Now that fmb_addr has been\n+     * restored, we may need to restart fmb_timer.\n+     */\n+    if (pbdev->fmb_addr) {\n+        assert(!pbdev->fmb_timer);\n+        assert(pbdev->pci_group);\n+        pbdev->fmb_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL,\n+                                        fmb_update, pbdev);\n+        timer_mod(pbdev->fmb_timer,\n+                  qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) +\n+                                    pbdev->pci_group->zpci_group.mui);\n+    }\n+    return 0;\n+}\n+\n+static const VMStateDescription s390_pci_device_vmstate = {\n+    .name = TYPE_S390_PCI_DEVICE,\n+    .version_id = 1,\n+    .minimum_version_id = 1,\n+    .post_load = s390_pci_device_post_load,\n+    .fields = (const VMStateField[]) {\n+        VMSTATE_UINT32(state, S390PCIBusDevice),\n+        VMSTATE_UINT16(uid, S390PCIBusDevice),\n+        VMSTATE_UINT32(idx, S390PCIBusDevice),\n+        VMSTATE_UINT32(fh, S390PCIBusDevice),\n+        VMSTATE_UINT32(fid, S390PCIBusDevice),\n+        VMSTATE_BOOL(fid_defined, S390PCIBusDevice),\n+        VMSTATE_UINT64(fmb_addr, S390PCIBusDevice),\n+        VMSTATE_UINT32(fmb.format, S390PCIBusDevice),\n+        VMSTATE_UINT32(fmb.sample, S390PCIBusDevice),\n+        VMSTATE_UINT64(fmb.last_update, S390PCIBusDevice),\n+        VMSTATE_UINT64_ARRAY(fmb.counter, S390PCIBusDevice,\n+                ARRAY_SIZE(((S390PCIBusDevice *)0)->fmb.counter)),\n+        VMSTATE_UINT64(fmb.fmt0.dma_rbytes, S390PCIBusDevice),\n+        VMSTATE_UINT64(fmb.fmt0.dma_wbytes, S390PCIBusDevice),\n+        VMSTATE_UINT8(isc, S390PCIBusDevice),\n+        VMSTATE_UINT16(noi, S390PCIBusDevice),\n+        VMSTATE_UINT8(sum, S390PCIBusDevice),\n+        VMSTATE_UINT8(pft, S390PCIBusDevice),\n+        VMSTATE_UINT64(routes.adapter.ind_addr, S390PCIBusDevice),\n+        VMSTATE_UINT64(routes.adapter.summary_addr, S390PCIBusDevice),\n+        VMSTATE_UINT64(routes.adapter.ind_offset, S390PCIBusDevice),\n+        VMSTATE_UINT32(routes.adapter.summary_offset, S390PCIBusDevice),\n+        VMSTATE_UINT32(routes.adapter.adapter_id, S390PCIBusDevice),\n+        VMSTATE_BOOL(iommu_enabled, S390PCIBusDevice),\n+        VMSTATE_UINT64(g_iota, S390PCIBusDevice),\n+        VMSTATE_UINT64(pba, S390PCIBusDevice),\n+        VMSTATE_UINT64(pal, S390PCIBusDevice),\n+        VMSTATE_UINT64(max_dma_limit, S390PCIBusDevice),\n+        VMSTATE_PTR_TO_IND_ADDR(summary_ind, S390PCIBusDevice),\n+        VMSTATE_PTR_TO_IND_ADDR(indicator, S390PCIBusDevice),\n+        VMSTATE_BOOL(pci_unplug_request_processed, S390PCIBusDevice),\n+        VMSTATE_BOOL(unplug_requested, S390PCIBusDevice),\n+        VMSTATE_BOOL(interp, S390PCIBusDevice),\n+        VMSTATE_BOOL(forwarding_assist, S390PCIBusDevice),\n+        VMSTATE_BOOL(aif, S390PCIBusDevice),\n+        VMSTATE_BOOL(rtr_avail, S390PCIBusDevice),\n+        VMSTATE_END_OF_LIST()\n+    }\n };\n \n static void s390_pci_device_class_init(ObjectClass *klass, const void *data)\ndiff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c\nindex 191f549ba7..a9c0a4effb 100644\n--- a/hw/s390x/s390-pci-inst.c\n+++ b/hw/s390x/s390-pci-inst.c\n@@ -1094,7 +1094,7 @@ static int fmb_do_update(S390PCIBusDevice *pbdev, int offset, uint64_t val,\n     return ret;\n }\n \n-static void fmb_update(void *opaque)\n+void fmb_update(void *opaque)\n {\n     S390PCIBusDevice *pbdev = opaque;\n     int64_t t = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL);\ndiff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c\nindex 3ef009463d..da48a2edc0 100644\n--- a/hw/s390x/s390-virtio-ccw.c\n+++ b/hw/s390x/s390-virtio-ccw.c\n@@ -913,6 +913,11 @@ static void ccw_machine_11_0_instance_options(MachineState *machine)\n \n static void ccw_machine_11_0_class_options(MachineClass *mc)\n {\n+    static GlobalProperty compat[] = {\n+        { TYPE_S390_PCI_HOST_BRIDGE, \"x-zpci-emul-dev-migr-enabled\", \"off\" },\n+    };\n+\n+    compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));\n }\n DEFINE_CCW_MACHINE_AS_LATEST(11, 0);\n \ndiff --git a/include/hw/s390x/s390-pci-bus.h b/include/hw/s390x/s390-pci-bus.h\nindex 2fab28e6e0..15cf004c31 100644\n--- a/include/hw/s390x/s390-pci-bus.h\n+++ b/include/hw/s390x/s390-pci-bus.h\n@@ -337,6 +337,7 @@ struct S390PCIBusDevice {\n     uint16_t uid;\n     uint32_t idx;\n     uint32_t fh;\n+    Error *passthrough_migr_blocker;\n     uint32_t fid;\n     bool fid_defined;\n     uint64_t fmb_addr;\n@@ -390,6 +391,8 @@ struct S390pciState {\n     QTAILQ_HEAD(, S390PCIDMACount) zpci_dma_limit;\n     QTAILQ_HEAD(, S390PCIGroup) zpci_groups;\n     uint8_t next_sim_grp;\n+    bool emul_dev_migr_enabled;\n+    Error *migr_blocker;\n };\n \n S390pciState *s390_get_phb(void);\n@@ -415,5 +418,6 @@ S390PCIBusDevice *s390_pci_find_dev_by_pci(S390pciState *s,\n S390PCIBusDevice *s390_pci_find_next_avail_dev(S390pciState *s,\n                                                S390PCIBusDevice *pbdev);\n void s390_pci_ism_reset(void);\n+void fmb_update(void *opaque);\n \n #endif\n","prefixes":["v2","14/15"]}