From patchwork Fri Mar 24 18:41:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nina Schoetterl-Glausch X-Patchwork-Id: 1760922 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=ETenMEAq; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pjrgv3lNgz1yXv for ; Sat, 25 Mar 2023 05:43:22 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfmMd-0001L5-P6; Fri, 24 Mar 2023 14:42:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfmMb-0001Ko-Nx; Fri, 24 Mar 2023 14:42:09 -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 1pfmMX-0007My-QS; Fri, 24 Mar 2023 14:42:09 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32OGMvT3012907; Fri, 24 Mar 2023 18:41:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=ln77u7fJlg4KW6FDh4gjs5kLMzXMHPhi4giVqX2GUCo=; b=ETenMEAqF+ChtpU4ORFiJvczkDJTTsy+8V0tMnidixmOnFDWR4QjKr/nErImnmh5cHpd OhuVo1t2xasDvJXQiaqYW7TyBWpmhhpKXqArCIQWZP5fg6rA9dck6tCEMUvn+Hb1PCiL E0AhxIhV0LQe0inDRdvdim4hmEvap9gMdPa/ryz8klN4bClgldxZ86pHubAnyXgwrIts WQIfmsLa3LxRuBsnToxIzfAun2aZfQCpdrjDCNNenRFs9GG1G9xxKIMR2J79oadRYIcR CPnTuPIXc3lkYeZDJC72NKWZLl4SbAQen1GV3FnErrWPWodAkJUaFpk1O+yrfHwmxBQ7 cw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3phfb6avk7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Mar 2023 18:41:39 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32OHpZYe019838; Fri, 24 Mar 2023 18:41:39 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3phfb6avjp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Mar 2023 18:41:39 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32ODXPA9010760; Fri, 24 Mar 2023 18:41:36 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3pgxua957n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Mar 2023 18:41:35 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32OIfW4g11731514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Mar 2023 18:41:32 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F41620040; Fri, 24 Mar 2023 18:41:32 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7970020043; Fri, 24 Mar 2023 18:41:31 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 24 Mar 2023 18:41:31 +0000 (GMT) From: Nina Schoetterl-Glausch To: qemu-devel@nongnu.org Cc: Nina Schoetterl-Glausch , qemu-block@nongnu.org, Stefan Berger , Stefan Hajnoczi , Halil Pasic , John Snow , David Hildenbrand , Fam Zheng , Thomas Huth , "Daniel P . Berrange" , Laurent Vivier , Vladimir Sementsov-Ogievskiy , qemu-s390x@nongnu.org, Christian Borntraeger , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Juan Quintela , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Marcel Apfelbaum , Coiby Xu , Ilya Leoshkevich , Eduardo Habkost , Yanan Wang , Richard Henderson , Markus Armbruster , Paolo Bonzini , Alex Williamson , Eric Blake , Eric Farman Subject: s390x TCG migration failure Date: Fri, 24 Mar 2023 19:41:29 +0100 Message-Id: <20230324184129.3119575-1-nsg@linux.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230207005650.1810-4-quintela@redhat.com> References: <20230207005650.1810-4-quintela@redhat.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: tOvlCRQy376fbX63k5PvDjmGBcF9vImb X-Proofpoint-GUID: 562eGUJoLtgTS0JqNk5_1bN-7iiqHZ5Z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-24_11,2023-03-24_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 clxscore=1011 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303240145 Received-SPF: pass client-ip=148.163.156.1; envelope-from=nsg@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi, We're seeing failures running s390x migration kvm-unit-tests tests with TCG. Some initial findings: What seems to be happening is that after migration a control block header accessed by the test code is all zeros which causes an unexpected exception. I did a bisection which points to c8df4a7aef ("migration: Split save_live_pending() into state_pending_*") as the culprit. The migration issue persists after applying the fix e264705012 ("migration: I messed state_pending_exact/estimate") on top of c8df4a7aef. Applying on top fixes or hides the issue. (The comparison was removed by c8df4a7aef.) I arrived at this by experimentation, I haven't looked into why this makes a difference. Any thoughts on the matter appreciated. diff --git a/migration/ram.c b/migration/ram.c index 56ff9cd29d..2dc546cf28 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3437,7 +3437,7 @@ static void ram_state_pending_exact(void *opaque, uint64_t max_size, uint64_t remaining_size = rs->migration_dirty_pages * TARGET_PAGE_SIZE; - if (!migration_in_postcopy()) { + if (!migration_in_postcopy() && remaining_size < max_size) { qemu_mutex_lock_iothread(); WITH_RCU_READ_LOCK_GUARD() { migration_bitmap_sync_precopy(rs);