From nobody Mon Feb 9 19:06:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654852897; cv=none; d=zohomail.com; s=zohoarc; b=SuOF4WD+pvnfYmyuWIAVGln4iIwOJkPdoogiyxza4RWZk25LZy63UOcAdAzP8a13RyuaibtbUAQZPtqjnT0y1RA0YzkXcNGnBMQZ1dRT/hd3sHqvePpo2g2IUcGZC6p5O5S/dn3V2K1NMQlt/Ft0Tu4Pgmeg4auSP2yk7WI9lkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654852897; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qgE0u/psF+5HbFaMEFEBF+1+y1Gn5UXWEs7HICOeN3Q=; b=fefL1yaleR9MWBolLSvcxXkxsUhElw3xXKEo4SpuVlvBhpVnfN3rbzWiNtvJv4jf3A33TZacu1VFGQVKevDCx2chDC8ttIZW/nV9u3+FiNJ5Qpov0rKNq6f8qEhe+UfoVU+ZQwxt91hel/4bmgef/X99yrGxuT3jJhstPtHGkdM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1654852897580200.70480709918718; Fri, 10 Jun 2022 02:21:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.346078.571820 (Exim 4.92) (envelope-from ) id 1nzapQ-0005Y7-RG; Fri, 10 Jun 2022 09:21:16 +0000 Received: by outflank-mailman (output) from mailman id 346078.571820; Fri, 10 Jun 2022 09:21:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nzapQ-0005Y0-Ms; Fri, 10 Jun 2022 09:21:16 +0000 Received: by outflank-mailman (input) for mailman id 346078; Fri, 10 Jun 2022 09:21:15 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nzapP-0005HE-NT for xen-devel@lists.xenproject.org; Fri, 10 Jun 2022 09:21:15 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id abd153a6-e89e-11ec-bd2c-47488cf2e6aa; Fri, 10 Jun 2022 11:21:14 +0200 (CEST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-326-7e0wnkN_M06CRWN5m6J7UQ-1; Fri, 10 Jun 2022 05:21:09 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 59C6438149A2; Fri, 10 Jun 2022 09:21:08 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F6E52026D64; Fri, 10 Jun 2022 09:21:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 08DD818003BA; Fri, 10 Jun 2022 11:20:44 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: abd153a6-e89e-11ec-bd2c-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654852872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qgE0u/psF+5HbFaMEFEBF+1+y1Gn5UXWEs7HICOeN3Q=; b=Bzpi+YnN2GH1XcdOhcem911qfpf67Z0BoCv+aJl0L6atMbT614KQxxsSyYPc1XQCXo+U36 TJyi0t50p5zDw5MLY0yCfhrIqUfPgGl6MNrYOajH01TeSdzzNkJ2xKpgyfJspLqHYRiQJx JV/6ZOL9jM/cDFxEETOzjBpb3VTeXUY= X-MC-Unique: 7e0wnkN_M06CRWN5m6J7UQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: "Canokeys.org" , "Michael S. Tsirkin" , Stefano Stabellini , Anthony Perard , Paul Durrant , Akihiko Odaki , Peter Maydell , "Hongren (Zenithal) Zheng" , xen-devel@lists.xenproject.org, Alex Williamson , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 03/17] ui/cocoa: Fix poweroff request code Date: Fri, 10 Jun 2022 11:20:29 +0200 Message-Id: <20220610092043.1874654-4-kraxel@redhat.com> In-Reply-To: <20220610092043.1874654-1-kraxel@redhat.com> References: <20220610092043.1874654-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654852899174100001 From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220529082508.89097-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 09a62817f2a9..84c84e98fc5e 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -35,6 +35,7 @@ #include "ui/kbd-state.h" #include "sysemu/sysemu.h" #include "sysemu/runstate.h" +#include "sysemu/runstate-action.h" #include "sysemu/cpu-throttle.h" #include "qapi/error.h" #include "qapi/qapi-commands-block.h" @@ -1290,7 +1291,10 @@ - (void)applicationWillTerminate:(NSNotification *)a= Notification { COCOA_DEBUG("QemuCocoaAppController: applicationWillTerminate\n"); =20 - qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI); + with_iothread_lock(^{ + shutdown_action =3D SHUTDOWN_ACTION_POWEROFF; + qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI); + }); =20 /* * Sleep here, because returning will cause OSX to kill us --=20 2.36.1