From nobody Thu May 2 09:02:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1558609295; cv=none; d=zoho.com; s=zohoarc; b=PwjpwF3NXb/Oyjn0kXBoU9sFCc1Ze+c1LmRwgiKVGL6eSqLBTxdH0S9VGgpowopUb4yLCQlWy2+PjhXdnEFX1cK2dOzfXb2fPyxUkjEL2RXGrNqIPapDbf9TRTls7cxhELGFR2UAsMawFV6ROwJIeWLx0LPtRdDNgO18xsZwTzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558609295; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Tv2Cbli/Tqvu7owPtK43D91girBk3sDgN7PJDxaDH2Y=; b=IlQGgDnO2yBBiunfiX8IDqwZiJBOsERqPdTbLvbn+O+oMco0HPKfeGkgrsX2JVFceQivm/5de5WbmGo7P5UB8pEKGmfpON2IpxNGnmkfcmF9zBFWuWzYLxMQlKEN5OEeAilFokpaCPzhTDmw95EIZJA9W8jZ5JO4sFuX+fP2p0U= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1558609295854625.4546329815594; Thu, 23 May 2019 04:01:35 -0700 (PDT) Received: from localhost ([127.0.0.1]:33680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTlSp-0001l6-LK for importer@patchew.org; Thu, 23 May 2019 07:00:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTlN8-0005GH-4X for qemu-devel@nongnu.org; Thu, 23 May 2019 06:54:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTlN6-0004tD-Jl for qemu-devel@nongnu.org; Thu, 23 May 2019 06:54:53 -0400 Received: from mail-eopbgr10111.outbound.protection.outlook.com ([40.107.1.111]:47693 helo=EUR02-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTlN6-0004rv-CU for qemu-devel@nongnu.org; Thu, 23 May 2019 06:54:52 -0400 Received: from DBBPR08MB4854.eurprd08.prod.outlook.com (20.179.46.205) by DBBPR08MB4425.eurprd08.prod.outlook.com (20.179.43.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.16; Thu, 23 May 2019 10:54:48 +0000 Received: from DBBPR08MB4854.eurprd08.prod.outlook.com ([fe80::4d46:2c95:d6e:ab3f]) by DBBPR08MB4854.eurprd08.prod.outlook.com ([fe80::4d46:2c95:d6e:ab3f%7]) with mapi id 15.20.1900.010; Thu, 23 May 2019 10:54:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tv2Cbli/Tqvu7owPtK43D91girBk3sDgN7PJDxaDH2Y=; b=WH8U7TUpwDL7M5fgaDthqF46qEihBfd/WGJeHI1c+gutrh7P7nt+pDqiJcAcavTSx2oP5awKIXeujLxXpDY6FYcFqtTdllWU/JsRLAzSNkyQ8p1+QxCIjrg/lk2F2Y/DGINE15bdixgisc3y42tE7fxuq4mJJ+0uS3d7WF8uDTg= From: Roman Kagan To: Paolo Bonzini , "qemu-devel@nongnu.org" Thread-Topic: [RFC PATCH 1/2] cpus-common: nuke finish_safe_work Thread-Index: AQHVEVXwRYejWVDaoEKIMQ4+lvoMHA== Date: Thu, 23 May 2019 10:54:48 +0000 Message-ID: <20190523105440.27045-2-rkagan@virtuozzo.com> References: <20190523105440.27045-1-rkagan@virtuozzo.com> In-Reply-To: <20190523105440.27045-1-rkagan@virtuozzo.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [185.231.240.5] x-clientproxiedby: HE1PR0901CA0058.eurprd09.prod.outlook.com (2603:10a6:3:45::26) To DBBPR08MB4854.eurprd08.prod.outlook.com (2603:10a6:10:da::13) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.21.0 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8f746d30-988c-4662-6c5a-08d6df6d12fe x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:DBBPR08MB4425; x-ms-traffictypediagnostic: DBBPR08MB4425: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1443; x-forefront-prvs: 00462943DE x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(136003)(39840400004)(366004)(376002)(396003)(199004)(189003)(81166006)(81156014)(8676002)(8936002)(50226002)(7736002)(2501003)(305945005)(36756003)(53936002)(386003)(6506007)(102836004)(52116002)(6486002)(14454004)(316002)(76176011)(1076003)(478600001)(99286004)(86362001)(6512007)(11346002)(2616005)(476003)(446003)(186003)(66066001)(68736007)(2906002)(26005)(256004)(71200400001)(110136005)(25786009)(66946007)(64756008)(14444005)(71190400001)(66476007)(66556008)(73956011)(5660300002)(3846002)(6436002)(66446008)(486006)(6116002); DIR:OUT; SFP:1102; SCL:1; SRVR:DBBPR08MB4425; H:DBBPR08MB4854.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: pass (zoho.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; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: iQinH8RizUEZu28b2N8lSGYmFRqFrlge6WBPSDwQQf3+3XXRjgAdq9mSWruCLthVkX3cGulT+85GhzTxH7doXQHut5PQ8XKwYzt8FD+Vkimm1RmBRCdK8ttrFw1xMvgmmHEwtgbS19sE370yRtxVN10jqzYd73tSQTA5IkMwmOMpcuKjcF2FuUbNotBrW5x+XBR7ooXb2O1WyGXSP4eJM6RHVo0jlImaqnaZNtw20/Z8BwUOB6Kre7Ylnvk9eSzRmGrp4JN84LgP33fnj1asOTh4bDxgB/rcl8KN1/F3VrZVMiMAXCGDxVOuPw0m3l1yAs9p8G4OQF0VqGZ0vjE42DgZ7asNHn/q9KFX0ll44wG6HH4HtMPTMzz4fz8GbT0DSAosQ008zHXR8VLh1eo+Sh+SEfLeYoT5JfbbRtYCpdE= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f746d30-988c-4662-6c5a-08d6df6d12fe X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2019 10:54:48.5235 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4425 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.1.111 Subject: [Qemu-devel] [RFC PATCH 1/2] cpus-common: nuke finish_safe_work 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) It was introduced in commit b129972c8b41e15b0521895a46fd9c752b68a5e, with the following motivation: Because start_exclusive uses CPU_FOREACH, merge exclusive_lock with qemu_cpu_list_lock: together with a call to exclusive_idle (via cpu_exec_start/end) in cpu_list_add, this protects exclusive work against concurrent CPU addition and removal. However, it seems to be redundant, because the cpu-exclusive infrastructure provides suffificent protection against the newly added CPU starting execution while the cpu-exclusive work is running, and the aforementioned traversing of the cpu list is protected by qemu_cpu_list_lock. Besides, this appears to be the only place where the cpu-exclusive section is entered with the BQL taken, which has been found to trigger AB-BA deadlock as follows: vCPU thread main thread ----------- ----------- async_safe_run_on_cpu(self, async_synic_update) ... [cpu hot-add] process_queued_cpu_work() qemu_mutex_unlock_iothread() [grab BQL] start_exclusive() cpu_list_add() async_synic_update() finish_safe_work() qemu_mutex_lock_iothread() cpu_exec_start() So remove it. This paves the way to establishing a strict nesting rule of never entering the exclusive section with the BQL taken. Signed-off-by: Roman Kagan --- cpus-common.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cpus-common.c b/cpus-common.c index 3ca58c64e8..023cfebfa3 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -69,12 +69,6 @@ static int cpu_get_free_index(void) return cpu_index; } =20 -static void finish_safe_work(CPUState *cpu) -{ - cpu_exec_start(cpu); - cpu_exec_end(cpu); -} - void cpu_list_add(CPUState *cpu) { qemu_mutex_lock(&qemu_cpu_list_lock); @@ -86,8 +80,6 @@ void cpu_list_add(CPUState *cpu) } QTAILQ_INSERT_TAIL_RCU(&cpus, cpu, node); qemu_mutex_unlock(&qemu_cpu_list_lock); - - finish_safe_work(cpu); } =20 void cpu_list_remove(CPUState *cpu) --=20 2.21.0 From nobody Thu May 2 09:02:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1558609375; cv=none; d=zoho.com; s=zohoarc; b=VCkEU7KbEdYKxeqEZ4hh8mF7KELjRXiejuCbkc7grjl8ezqQMJH4NFQkvz9zDLBaF2dk/bXm3C6t4/n6W3tRA4TKdH79BT/pwY47tXuklyKITVy3dgq04jwTQUEnmT2ChDJW2hFsK+MD8SEFkn085G0fsiYjxJbSnJLK2aXGXds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558609375; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=5dG8ZjdUTTrH2EUOGNc9iCD4YPcVF71jqGSB4UceVx8=; b=UBCs8IOpGAhNoid93gh9qR89JnQkY287YDGEiliBXQjy+V/veZjNQliy5WcCWI6rGcuxcrAVyvEK8y1+MOfbDXMAk4FkmtUjqSoNXJHWvNeymCrU0UXDs0MJU83jCSsmQAD6EB932SbnUk42kGTEwsUPVmq6c8ESJjkFFukB3kQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1558609375798157.68828175081308; Thu, 23 May 2019 04:02:55 -0700 (PDT) Received: from localhost ([127.0.0.1]:33728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTlUn-0003JU-AK for importer@patchew.org; Thu, 23 May 2019 07:02:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTlN9-0005H5-2h for qemu-devel@nongnu.org; Thu, 23 May 2019 06:54:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTlN7-0004ua-Lf for qemu-devel@nongnu.org; Thu, 23 May 2019 06:54:54 -0400 Received: from mail-eopbgr10111.outbound.protection.outlook.com ([40.107.1.111]:47693 helo=EUR02-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTlN6-0004rv-Vz for qemu-devel@nongnu.org; Thu, 23 May 2019 06:54:53 -0400 Received: from DBBPR08MB4854.eurprd08.prod.outlook.com (20.179.46.205) by DBBPR08MB4425.eurprd08.prod.outlook.com (20.179.43.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.16; Thu, 23 May 2019 10:54:49 +0000 Received: from DBBPR08MB4854.eurprd08.prod.outlook.com ([fe80::4d46:2c95:d6e:ab3f]) by DBBPR08MB4854.eurprd08.prod.outlook.com ([fe80::4d46:2c95:d6e:ab3f%7]) with mapi id 15.20.1900.010; Thu, 23 May 2019 10:54:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5dG8ZjdUTTrH2EUOGNc9iCD4YPcVF71jqGSB4UceVx8=; b=C9KHl+NOHQF9XCMSXvv2uLHBRIFTgH1c8vCO22MRojOD9TsuC4sSz29au443siURmU1WPoqHC4AnIroge7suWTzWRMZWaOJwUl1gVJpXJWvfEXNZdiKKWHOT6R9Tu8sqWtm6aUpJi6zIY015sNKYveXkJsDEXpLKNA3FFpcoCcM= From: Roman Kagan To: Paolo Bonzini , "qemu-devel@nongnu.org" Thread-Topic: [RFC PATCH 2/2] cpus-common: assert BQL nesting within cpu-exclusive sections Thread-Index: AQHVEVXxmQM6pQZQ6EOMQW2xqwR+sg== Date: Thu, 23 May 2019 10:54:49 +0000 Message-ID: <20190523105440.27045-3-rkagan@virtuozzo.com> References: <20190523105440.27045-1-rkagan@virtuozzo.com> In-Reply-To: <20190523105440.27045-1-rkagan@virtuozzo.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [185.231.240.5] x-clientproxiedby: HE1PR0901CA0058.eurprd09.prod.outlook.com (2603:10a6:3:45::26) To DBBPR08MB4854.eurprd08.prod.outlook.com (2603:10a6:10:da::13) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.21.0 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 831b6e39-52ee-47ef-ecdc-08d6df6d1359 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:DBBPR08MB4425; x-ms-traffictypediagnostic: DBBPR08MB4425: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 00462943DE x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(136003)(39840400004)(366004)(376002)(396003)(199004)(189003)(81166006)(81156014)(8676002)(8936002)(50226002)(7736002)(2501003)(305945005)(36756003)(53936002)(386003)(6506007)(102836004)(52116002)(6486002)(14454004)(316002)(76176011)(1076003)(478600001)(99286004)(86362001)(6512007)(11346002)(2616005)(476003)(446003)(186003)(66066001)(68736007)(2906002)(26005)(256004)(71200400001)(110136005)(25786009)(66946007)(64756008)(14444005)(71190400001)(66476007)(66556008)(73956011)(5660300002)(3846002)(6436002)(66446008)(486006)(6116002); DIR:OUT; SFP:1102; SCL:1; SRVR:DBBPR08MB4425; H:DBBPR08MB4854.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: pass (zoho.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; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: aq/9XU/d3rSV3dXma8TF9AIF8h8T/SIyI2wkCI124H+iTpY8SmJyMqz+LksOV87TvDtWydfAlDgyjojN881adHNKmqwdLVKabIM1dWWWst0nsTsO3pCbq14adfmxqiBWs46P4AdfYnvyCWpu7QZ312NAbOwVbj/SsZGahj1eQmxKBQR+/h4MsWHGHwX9XiFjC2KmvtDhln/vgawbem53iexjzdHIsK//Z/oMTA4ItjoArbO9A+IRN1rkYReK5LZhqP6NInAzTJF1Z24ZkX1SpKNcdGo40LX8INwGBXhaY1fbuFgUe8ssAw51PUZ+ZZnDY9dbqr7FqSJfQ7xWRZDr6SzJKBhZ8ce8nw16oQya2IwDqp/18xHnOivJS52Fl87RCLjot8zTA1pI76ssDX0LBGbgQFDqVTrxni6oxHkynQo= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 831b6e39-52ee-47ef-ecdc-08d6df6d1359 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2019 10:54:49.1342 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4425 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.1.111 Subject: [Qemu-devel] [RFC PATCH 2/2] cpus-common: assert BQL nesting within cpu-exclusive sections 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Assert that the cpu-exclusive sections are never entered/left with the BQL taken. Signed-off-by: Roman Kagan --- cpus-common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpus-common.c b/cpus-common.c index 023cfebfa3..9aa75fe1ba 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -174,6 +174,7 @@ void start_exclusive(void) CPUState *other_cpu; int running_cpus; =20 + assert(!qemu_mutex_iothread_locked()); qemu_mutex_lock(&qemu_cpu_list_lock); exclusive_idle(); =20 @@ -205,6 +206,7 @@ void start_exclusive(void) /* Finish an exclusive operation. */ void end_exclusive(void) { + assert(!qemu_mutex_iothread_locked()); qemu_mutex_lock(&qemu_cpu_list_lock); atomic_set(&pending_cpus, 0); qemu_cond_broadcast(&exclusive_resume); @@ -214,6 +216,7 @@ void end_exclusive(void) /* Wait for exclusive ops to finish, and begin cpu execution. */ void cpu_exec_start(CPUState *cpu) { + assert(!qemu_mutex_iothread_locked()); atomic_set(&cpu->running, true); =20 /* Write cpu->running before reading pending_cpus. */ @@ -255,6 +258,7 @@ void cpu_exec_start(CPUState *cpu) /* Mark cpu as not executing, and release pending exclusive ops. */ void cpu_exec_end(CPUState *cpu) { + assert(!qemu_mutex_iothread_locked()); atomic_set(&cpu->running, false); =20 /* Write cpu->running before reading pending_cpus. */ --=20 2.21.0