From nobody Thu Nov 13 23:31:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1583488710; cv=none; d=zohomail.com; s=zohoarc; b=WDbpqPQ73DsC3EypTWj84LADq9L6JjUHj2n7ucU9ePEGL6kQ1rS99abvx6ZD5cRxxxZDT5cBf8pP83rffsOFwzTuQLAsG8vU+LXD6Y/Mxlpev7efIo9kVlaTkU0P8DxlPISBSSiXNeX/Elj2N5f1EmJqmqPXtVB22HQ3GPqiLLw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583488710; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vXRGqYLfLn+t2valEtnzd7cHE0AuNyj6JvhmbRRLP6s=; b=XwQVN3BGSOw8FD3Abt69DBtX0GOCFTfAei6ZNqgnAHM6uaZ7Fs/T0azB5HKnpbdyGo7K0IGT11br1ozb2J3Wiux29murfhO0HIihMFzPinN2oWPCMoigT0B3cXfjoY7zcY1Y9V1FuBzCFLJdT4CEXzHhRqTpV4W8R4luQuEI5/A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1583488710645668.9166996035783; Fri, 6 Mar 2020 01:58:30 -0800 (PST) Received: from localhost ([::1]:33742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jA9kR-0007n3-PC for importer@patchew.org; Fri, 06 Mar 2020 04:58:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50740) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jA9jc-0007Nr-NL for qemu-devel@nongnu.org; Fri, 06 Mar 2020 04:57:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jA9jT-0002pK-8g for qemu-devel@nongnu.org; Fri, 06 Mar 2020 04:57:28 -0500 Received: from mail6.tencent.com ([220.249.245.26]:55528) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jA9jP-0002GI-KU; Fri, 06 Mar 2020 04:57:27 -0500 Received: from EX-SZ019.tencent.com (unknown [10.28.6.74]) by mail6.tencent.com (Postfix) with ESMTP id 1FED3CC538; Fri, 6 Mar 2020 17:57:45 +0800 (CST) Received: from EX-SZ008.tencent.com (10.28.6.32) by EX-SZ019.tencent.com (10.28.6.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 6 Mar 2020 17:57:14 +0800 Received: from EX-SZ005.tencent.com (10.28.6.29) by EX-SZ008.tencent.com (10.28.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 6 Mar 2020 17:57:14 +0800 Received: from EX-SZ005.tencent.com ([fe80::ed4f:20ce:ec0d:e637]) by EX-SZ005.tencent.com ([fe80::ed4f:20ce:ec0d:e637%4]) with mapi id 15.01.1713.004; Fri, 6 Mar 2020 17:57:14 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tencent.com; s=s202002; t=1583488665; bh=vXRGqYLfLn+t2valEtnzd7cHE0AuNyj6JvhmbRRLP6s=; h=From:To:CC:Subject:Date:References; b=EvQLS9FBiYls8vNJNcPG5EZ+GgxvJyhsQ29cjG6yRxBHIwKqNArQ3XOi3LOdGCGWf PACkfkgmAmbIFlfpPv9y3UwZQw7GRuiqYTLDDTTYxh9MfhlBff0kIqHAL57Uqpqsw9 HEJlKmLl/kuuqi6X75qxsT+POrNd3dyIz1GQkAG4= From: =?utf-8?B?YmF1ZXJjaGVuKOmZiOiSmeiSmSk=?= To: Christian Borntraeger , qemu-devel Subject: =?utf-8?B?5Zue5aSNOiBbUEFUQ0hdIG1lbS1wcmVhbGxvYzogaW5pdGlhbGl6ZSBjb25k?= =?utf-8?Q?_and_mutex(Internet_mail)?= Thread-Topic: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail) Thread-Index: AQHV85RZkOhBH6vxAEysUkxz/tkQww== Date: Fri, 6 Mar 2020 09:57:13 +0000 Message-ID: References: <20200306085014.120669-1-borntraeger@de.ibm.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [9.19.161.120] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 220.249.245.26 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian Borntraeger , qemu-s390x , Marc Hartmayer , pbonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Very sorry for my fault, in fact,I test =C2=A0in a old qemu version ,and pa= tch generated based a new one ;=C2=A0 All in all=EF=BC=8Cits my fault, and I will check and test patch carefully = In the future If I =C2=A0need to =C2=A0submit the patch again ? =C2=A0 =C2=A0 =E5=8F=91=E4=BB=B6=E4=BA=BA=EF=BC=9A=C2=A0Christian Borntraeger =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4=EF=BC=9A=C2=A02020-03-06=C2=A016:50 =E6=94=B6=E4=BB=B6=E4=BA=BA=EF=BC=9A=C2=A0qemu-devel =E6=8A=84=E9=80=81=EF=BC=9A=C2=A0qemu-s390x; Christian Borntraeger; bauerch= en(=E9=99=88=E8=92=99=E8=92=99); Paolo Bonzini; Marc Hartmayer =E4=B8=BB=E9=A2=98=EF=BC=9A=C2=A0[PATCH] mem-prealloc: initialize cond and = mutex(Internet mail) Guests with mem-prealloc do fail with qemu-system-s390x: /home/cborntra/REPOS/qemu/util/qemu-thread-posix.c:76: q= emu_mutex_lock_impl: Assertion `mutex->initialized' failed. qemu-system-s390x: /home/cborntra/REPOS/qemu/util/qemu-thread-posix.c:161: = qemu_cond_broadcast: Assertion `cond->initialized' failed. =C2=A0 Let us initialize cond and mutex. =C2=A0 Cc: bauerchen Cc: Paolo Bonzini Reported-by: Marc Hartmayer Fixes: 037fb5eb3941 ("mem-prealloc: optimize large guest startup") Signed-off-by: Christian Borntraeger --- util/oslib-posix.c | 2 ++ 1 file changed, 2 insertions(+) =C2=A0 diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 897e8f3ba6..52650183d3 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -470,6 +470,8 @@ static bool touch_all_pages(char *area, size_t hpagesiz= e, size_t numpages, =C2=A0=C2=A0=C2=A0=C2=A0 char *addr =3D area; =C2=A0=C2=A0=C2=A0=C2=A0 int i =3D 0; +=C2=A0=C2=A0=C2=A0 qemu_cond_init(&page_cond); +=C2=A0=C2=A0=C2=A0 qemu_mutex_init(&page_mutex); =C2=A0=C2=A0=C2=A0=C2=A0 memset_thread_failed =3D false; =C2=A0=C2=A0=C2=A0=C2=A0 threads_created_flag =3D false; =C2=A0=C2=A0=C2=A0=C2=A0 memset_num_threads =3D get_memset_num_threads(smp_= cpus); -- 2.25.0 =C2=A0 =C2=A0