From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 798BAD2E9C3 for ; Mon, 11 Nov 2024 09:13:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAQTp-00048V-Bh; Mon, 11 Nov 2024 04:13:05 -0500 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 1tAQPd-0002wh-IZ for qemu-riscv@nongnu.org; Mon, 11 Nov 2024 04:08:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tAQPa-0006LW-LH for qemu-riscv@nongnu.org; Mon, 11 Nov 2024 04:08:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731316120; h=from:from:reply-to: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=Ycpa2WQtoXFERsCdhsQn4GlsqBXBVUgQjJ2umhKNsHU=; b=Mg451vxbbR5OlSl2dfUhMZZzn4Wi6WNVI/4FIlFWpGa4l5VAno1QUqglahPAcpHzkqAgyC KXK3gymFaJtBNGAXB6vx13r/Vgmp+pdgYFdMERPSGc7kj6O9c5V++QvOz9QUQEo271hOn2 HTu7S+NfRjm6NDjDm+gPSQOT9G2HxiA= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-179-qPHxz3ksNZeGQeLN47Sxhw-1; Mon, 11 Nov 2024 04:08:37 -0500 X-MC-Unique: qPHxz3ksNZeGQeLN47Sxhw-1 X-Mimecast-MFC-AGG-ID: qPHxz3ksNZeGQeLN47Sxhw Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7DBD41955BCF; Mon, 11 Nov 2024 09:08:32 +0000 (UTC) Received: from redhat.com (unknown [10.42.28.111]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 441C81956054; Mon, 11 Nov 2024 09:08:19 +0000 (UTC) Date: Mon, 11 Nov 2024 09:08:16 +0000 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Phil Dennis-Jordan Cc: Akihiko Odaki , qemu-devel@nongnu.org, agraf@csgraf.de, peter.maydell@linaro.org, pbonzini@redhat.com, rad@semihalf.com, quic_llindhol@quicinc.com, stefanha@redhat.com, mst@redhat.com, slp@redhat.com, richard.henderson@linaro.org, eduardo@habkost.net, marcel.apfelbaum@gmail.com, gaosong@loongson.cn, jiaxun.yang@flygoat.com, chenhuacai@kernel.org, kwolf@redhat.com, hreitz@redhat.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bmeng.cn@gmail.com, liwei1518@gmail.com, dbarboza@ventanamicro.com, zhiwei_liu@linux.alibaba.com, jcmvbkbc@gmail.com, marcandre.lureau@redhat.com, qemu-arm@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org Subject: Re: [PATCH v8 01/15] ui & main loop: Redesign of system-specific main thread event handling Message-ID: References: <20241108144709.95498-1-phil@philjordan.eu> <20241108144709.95498-2-phil@philjordan.eu> <9c2e0b96-2125-4041-9f66-116d54accb04@daynix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.118, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.743, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Errors-To: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org On Sun, Nov 10, 2024 at 08:08:16AM +0100, Phil Dennis-Jordan wrote: > On Sun 10. Nov 2024 at 08:01, Akihiko Odaki > wrote: > > > On 2024/11/08 23:46, Phil Dennis-Jordan wrote: > > > macOS's Cocoa event handling must be done on the initial (main) thread > > > of the process. Furthermore, if library or application code uses > > > libdispatch, the main dispatch queue must be handling events on the main > > > thread as well. > > > > > > So far, this has affected Qemu in both the Cocoa and SDL UIs, although > > > in different ways: the Cocoa UI replaces the default qemu_main function > > > with one that spins Qemu's internal main event loop off onto a > > > background thread. SDL (which uses Cocoa internally) on the other hand > > > uses a polling approach within Qemu's main event loop. Events are > > > polled during the SDL UI's dpy_refresh callback, which happens to run > > > on the main thread by default. > > > > GTK should also do the same as SDL and requires treatment; I forgot to > > note that in previous reviews. > > > Although it‘s possible to build Qemu with GTK support enabled on macOS, > that UI doesn’t actually work on macOS at all, and apparently hasn’t been > supported since 2018, see: > https://stackoverflow.com/a/51474795 > > I don’t think there’s any point making adjustments to the GTK code by > guessing what might be needed if someone did fix that to work with macOS at > some point. If we don't support GTK on macOS, then we should update meson.build to actively prevent users enabling GTK on macOS builds, rather than letting them suffer random runtime crashes. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|