From nobody Fri May 3 14:35:39 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=1605004348; cv=none; d=zohomail.com; s=zohoarc; b=FdF5VWEmbHYN0Za9l4HsMQb6Pk3qNBez4KwIVBMtY9FARZS3nnPF+18bxAc8esSL3zOTAl4ZCQnsJye5AvbipBsizG1zjTxJMTfkZw17hly1vi/L38pYBKxA5/eGeW5BmqQIzpZ/38ZXEeygvz1SOwe/hNp6E5XRQsjE+UpgJg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605004348; 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; bh=UrzJC45GUTwQNL9zVxjpEa+9bvbSiE2OiWfnh1rAza0=; b=N3R7jD9UPh5VnJQwjwHpoWYzGevNvkQLDgN5JrC0py1EMX2KgHzDvwD7dX3CvM//RpYJO1XIW3BnG7Vv+z7kh4hSh594l09F5sN0kzsq2Vhcexw+p2BuWqc0+u8wmvntI3v1RZaRzPV+BicUj1kBWRtjD+XLvYNdJtJ1ux4TwFg= 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 1605004348455862.1137666688232; Tue, 10 Nov 2020 02:32:28 -0800 (PST) Received: from localhost ([::1]:57468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcQws-0001LT-7P for importer@patchew.org; Tue, 10 Nov 2020 05:32:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcQvx-0000gm-7R; Tue, 10 Nov 2020 05:31:29 -0500 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:43202 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 1kcQvu-0006wH-Uj; Tue, 10 Nov 2020 05:31:28 -0500 Received: from host86-184-131-53.range86-184.btcentralplus.com ([86.184.131.53] 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 1kcQw2-0005Tt-E0; Tue, 10 Nov 2020 10:31:36 +0000 From: Mark Cave-Ayland To: thuth@redhat.com, armbru@redhat.com, david@gibson.dropbear.id.au, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, qemu-trivial@nongnu.org Date: Tue, 10 Nov 2020 10:31:11 +0000 Message-Id: <20201110103111.18395-1-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.184.131.53 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2-for-5.2] 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" 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 Reviewed-by: David Gibson --- hw/misc/macio/macio.c | 2 ++ 1 file changed, 2 insertions(+) v2: - Rebase onto master - Add for-5.2 into subject prefix - Add R-B tags from Philippe and Thomas 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