From patchwork Wed Feb 1 09:04:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 722393 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vCy0h1dKSz9s1h for ; Wed, 1 Feb 2017 20:06:12 +1100 (AEDT) Received: from localhost ([::1]:43402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYqrh-0002jL-MP for incoming@patchwork.ozlabs.org; Wed, 01 Feb 2017 04:06:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYqqY-0001ja-2K for qemu-devel@nongnu.org; Wed, 01 Feb 2017 04:04:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYqqV-0004JJ-KZ for qemu-devel@nongnu.org; Wed, 01 Feb 2017 04:04:58 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYqqV-0004Iv-BS for qemu-devel@nongnu.org; Wed, 01 Feb 2017 04:04:55 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1193vmQ095646 for ; Wed, 1 Feb 2017 04:04:54 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 28ba36w826-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 01 Feb 2017 04:04:53 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 1 Feb 2017 09:04:50 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 1 Feb 2017 09:04:47 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id AA0191B08023; Wed, 1 Feb 2017 09:07:37 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1194l5a5308750; Wed, 1 Feb 2017 09:04:47 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A704CAE055; Wed, 1 Feb 2017 08:02:43 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9E86EAE053; Wed, 1 Feb 2017 08:02:43 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 1 Feb 2017 08:02:43 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id EA7BC20F5CC; Wed, 1 Feb 2017 10:04:46 +0100 (CET) From: Christian Borntraeger To: Peter Maydell Date: Wed, 1 Feb 2017 10:04:43 +0100 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485939884-39956-1-git-send-email-borntraeger@de.ibm.com> References: <1485939884-39956-1-git-send-email-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17020109-0020-0000-0000-000002FDD3F2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17020109-0021-0000-0000-0000403CB1BA Message-Id: <1485939884-39956-3-git-send-email-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-01_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702010090 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PULL 2/3] s390x/kvm: fix small race reboot vs. cmma X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Graf , qemu-stable@nongnu.org, qemu-devel , Christian Borntraeger , Jens Freimann , Cornelia Huck Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Right now we reset all devices before we reset the cmma states. This can result in the host kernel discarding guest pages that were previously in the unused state but already contain a bios or a -kernel file before the cmma reset has finished. This race results in random guest crashes or hangs during very early reboot. Fixes: 1cd4e0f6f0a6 ("s390x/cmma: clean up cmma reset") Cc: qemu-stable@nongnu.org Signed-off-by: Christian Borntraeger --- hw/s390x/s390-virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index 0a96347..7a3a7fe 100644 --- a/hw/s390x/s390-virtio.c +++ b/hw/s390x/s390-virtio.c @@ -204,8 +204,8 @@ void s390_machine_reset(void) { S390CPU *ipl_cpu = S390_CPU(qemu_get_cpu(0)); - qemu_devices_reset(); s390_cmma_reset(); + qemu_devices_reset(); s390_crypto_reset(); /* all cpus are stopped - configure and start the ipl cpu only */