From nobody Mon May 6 15:06:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=1604748552; cv=none; d=zohomail.com; s=zohoarc; b=c8Fqw5aYxv8vnjC5+64eNj9C9uZ7FDKTYb5nxRgMZO/oATnQxprz4/Ny1OwYMVQWsoBXmq9lsKN+B1STQeWWN1CCUrU7JxqSL3Rhhs3nzOQFC4HClIhLH730R3vllAEbirGplxCgDcnch82R9absJcYErSFCpBfiSoruONFC8wQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604748552; h=Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=GIpcl8X3GmNj332Rj5kz4FiRnAjD9sTE0X+k8xOJLeI=; b=GF+EpJ8Ygv1uEtYBsnlcPL2kC5vpoCtSJfaxYbgxRK+EUopoBDqhp+4MoU3CJoVK2iXXRJSwAOdlo3Qk7OOdBjUH7diKbdrwDD29WRfwUnEumfSH2iI64DpxmVoopqa+2V4AQOBiPlIUVDJZWQ0h5n4poT4JZM1e70T/1YKvJP8= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1604748551986821.7576477993728; Sat, 7 Nov 2020 03:29:11 -0800 (PST) Received: from localhost ([::1]:46694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbMP8-0004OH-JE for importer@patchew.org; Sat, 07 Nov 2020 06:29:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbMOQ-0003qD-Kw; Sat, 07 Nov 2020 06:28:26 -0500 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:39210 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbMOO-0008M4-O6; Sat, 07 Nov 2020 06:28:26 -0500 Received: from host81-158-111-11.range81-158.btcentralplus.com ([81.158.111.11] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbMOU-0004pZ-4q; Sat, 07 Nov 2020 11:28:33 +0000 From: Mark Cave-Ayland To: thuth@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Sat, 7 Nov 2020 11:28:11 +0000 Message-Id: <20201107112811.24870-1-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 81.158.111.11 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH] macio: set user_creatable to false in macio_class_init() X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) 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; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.uk0.bigv.io X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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.23 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" Content-Type: text/plain; charset="utf-8" Commit 348b8d1a76 "macio: don't reference serial_hd() directly within the d= evice" removed the setting of user_creatable to false on the basis that the restri= ction was due to the use of serial_hd() in macio_instance_init(). Unfortunately this isn't the full story since the PIC object property links must still be set before the device is realized. Whilst it is possible to u= pdate the macio device and Mac machines to resolve this, the fix is too invasive = at this point in the release cycle. For now simply set user_creatable back to false in macio_class_init() to prevent QEMU from segfaulting in anticipation of the proper fix arriving in QEMU 6.0. Reported-by: Thomas Huth Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- hw/misc/macio/macio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index 51368884d0..bb601f782c 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -456,6 +456,8 @@ static void macio_class_init(ObjectClass *klass, void *= data) k->class_id =3D PCI_CLASS_OTHERS << 8; device_class_set_props(dc, macio_properties); set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); + /* Reason: requires PIC property links to be set in macio_*_realize() = */ + dc->user_creatable =3D false; } =20 static const TypeInfo macio_bus_info =3D { --=20 2.20.1