Received: by 2002:a17:505:610b:b0:1be9:327d:8ee3 with SMTP id tt11csp6500965njc; Mon, 11 Nov 2024 01:09:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWHi2FDoRa6PvC+JunkEGQCwhYyCm06p55v8bJLN1GqkV0ypoMr7YAliwvj/JyDFFoJiYVuRbLkqulsjg==@linaro.org X-Google-Smtp-Source: AGHT+IH6ulHxadFXxFmyDyms1cPs7PMX770lfHocLB5NspCXtJwWo1z5sd5sT6ij6Bs7mPrKgcUj X-Received: by 2002:ac8:5d01:0:b0:462:67f0:596e with SMTP id d75a77b69052e-46309306746mr201000461cf.1.1731316163949; Mon, 11 Nov 2024 01:09:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731316163; cv=none; d=google.com; s=arc-20240605; b=Zp5fToCeDl/Ki7Oi+rmOFSx9W6Ah82P83JgwIgotnOoq4kdHbHKcIVqZpfLWEGPqvs WxJaaROvBXFUMKNehgh4Cckyrs+968YooYFoXgJKEsSloUCusCxl31BwtOpSkL6TG0uH xOp56OF0IecYjR8yJEeQXFQqGcjDjb0bNRluwFNh+02GsUJTjnbzITZ3Czj2sMDSFU95 1u4PvUMkOoWJx429uV09ERV83mhwWHRip+PJLtooBC7mBSbiEmhYLXD/vzHYXjd533/M J/s8IiKQsRyIvrk9JkDx/GK1h1uPLijYgj1cbq/7Zah3iz0DlqK1odpF96aqwlU8xJd0 cUsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:user-agent :in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Ycpa2WQtoXFERsCdhsQn4GlsqBXBVUgQjJ2umhKNsHU=; fh=++WOmtow72nGQKdi0H/iCX33/rAt/k23sgM6LPXBk6A=; b=OzVMm29UKhJJ7HgybjmzkcIYBYF/ZZTnGIRg5RWpH71/k1Zyurt31YYC19rije7nBL FXGBfmNnvcTo/dbyrADMHeD7Qdy+10Wk/TqGHWi7oGW8Mt/u2kkV7Xd6XgnN5qfngN3h t9QcuxZmPggoxvz44UdpUGD7K7pi4IV+o8l7Dt1E/kTSdfF4ZOu4WrhVTjZeZjkLaczE BHYM0csSvCrQAjKi3XWs9k5SZrsr4k34McXyWB1bUx4sK22r3i/gFs/yIIaeu27UlRf4 npUr5crCyh7F6zW5SQhv/pY4PN9Qv5LR10BM8Mq8yontlGr4C1SelN+NFJxrFSRBW1NN 2JMQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mg451vxb; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff40fe70si107707081cf.94.2024.11.11.01.09.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Nov 2024 01:09:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mg451vxb; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAQQ7-00032x-DL; Mon, 11 Nov 2024 04:09:15 -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 1tAQPc-0002w7-Ax for qemu-devel@nongnu.org; Mon, 11 Nov 2024 04:08:44 -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-0006LY-74 for qemu-devel@nongnu.org; Mon, 11 Nov 2024 04:08:44 -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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: l4jlDgS888qe 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 :|