From nobody Sat Nov 15 13:20:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=1595265896; cv=none; d=zohomail.com; s=zohoarc; b=PVlezpuZlT+rZ50LEWXJYkgnB/9ho3yJ31NUUHrxgyp9yNDMHd5ozLtLZRAh2TLOZVycuHEOz6qCQMrVovtzCgHX99UCJqcRHtJooo9i1DC31gLfGUTi+JFYmnb7AITeDpB3NeFtiFhQqzdzEr4L+kjPkKYOvXHTynlthpLLb4o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595265896; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=RPtr2B1YzHyMjWgtik1s/pvOZlnzirJaX2W4j3uurgc=; b=YjZWrcMKUq7ZwPezw7de/swY0lJ6MsrUS/qu6VP7TLlzKtDSU/xxcI5LakI138kjXfQ7FjCuHXvJx1K+RDm/U6WEmbncRakuDvC3G3AIM+TWNyTm1bU2FPgGb5vqHq5suBFj6UgfoHbgtW7d6uZsvIZlxeHlD6ACjZ+BblLB3Yg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1595265896120378.0291978517928; Mon, 20 Jul 2020 10:24:56 -0700 (PDT) Received: from localhost ([::1]:56624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jxZX4-00064r-3w for importer@patchew.org; Mon, 20 Jul 2020 13:24:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jxZW7-0005TY-A3; Mon, 20 Jul 2020 13:23:55 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:38617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jxZW5-0003pF-CH; Mon, 20 Jul 2020 13:23:54 -0400 Received: by mail-wr1-x431.google.com with SMTP id a14so3783767wra.5; Mon, 20 Jul 2020 10:23:52 -0700 (PDT) Received: from localhost.localdomain (138.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.138]) by smtp.gmail.com with ESMTPSA id w12sm36994698wrm.79.2020.07.20.10.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 10:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RPtr2B1YzHyMjWgtik1s/pvOZlnzirJaX2W4j3uurgc=; b=DArq+U/983gz+oG39ecUzWe2TB62v60pCUm21zDXOAqNS7cJLbgcO3Ba848pNZS/xn Ay9Ei9NlNt72PqletDe75JFsh2eMz1fnQOnxzeqt4Lh4gyMufovyPB0vU86eM/nb69XX 8v5JVKO7mORADvFNrLj6bZRbLY28HRU0hS7iOflDBBXKpBhqxtMPbIrYtC31Q7+2GPqP jKDmeRJbv2mdafWR5cakihixgLgn1eKksSRD6ma8akPlJOjs8bJB6mJZLHSRfgnATDXb 5ADCpLB9sztXZRkICavxEpnhPUvqZIsh6eSJ04VSFYDr2G4fJLVDlgdtRh84lLvheKCA c/1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=RPtr2B1YzHyMjWgtik1s/pvOZlnzirJaX2W4j3uurgc=; b=eronPVPKHHbKAfTqEoAbSmURucakBJNzxSJF2QEYZoP6bUyzgDcrZ0NOYnF4eDUuX4 UQNFvfxpYx1skzxspIsMWJsGfuYHIxBfIllN/OfLXe0OcKQRHsvzL/v5hvA9GMgCx6Vp gqzvrwd/McBn2T99ilCZcfG8EC6gd2N+T+rA+EZdNydRZfFsEM1xsORsftO4VvxMgdeM QByoOmJI4b5iZGFnZr9bmBthCo1RM6ci9rjah+LLPuwCnxAzqHQ9YeU5B/Y88KjyqS8P D/ONyEkrmzK5SAB7pXW9wyavzU4xpuFSfcTOHEAyVaEdQAv/Yj22R2iWyoCUO9hYGT2W 9nQA== X-Gm-Message-State: AOAM532WDEQ5ZJOUr+X+RhMAZ2Jj2xm39HwCbshLsJOpur/BloDItJWJ ouzC1jaFcqs07mtJ/pza6jM7LNG/CqU= X-Google-Smtp-Source: ABdhPJyRbDcW7cUblcHV/47tvCjYZs89GDI0/B8l6WSVnKMvL9mBgcQ/YQFSEU98rztlzAD2ysMyqw== X-Received: by 2002:adf:f082:: with SMTP id n2mr24379697wro.326.1595265830433; Mon, 20 Jul 2020 10:23:50 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.1] hw/isa/isa-superio: Fix IDE controller realization Date: Mon, 20 Jul 2020 19:23:48 +0200 Message-Id: <20200720172348.23465-1-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::431; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: qemu-trivial@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) When realizing a Super I/O with IDE controller [*], we get: qom/object.c:1684: object_property_try_add_child: Assertion `!child->pare= nt' failed. Aborted (core dumped) This is because the device is already realized when we try to add the QOM property to the parent. Fix by realizing *after* adding the QOM relationship. [*] Set ISASuperIOClass::ide.count =3D N with N not zero Fixes: e508430619 ("hw/isa/superio: Make the components QOM children") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Reviewed-by: Richard Henderson --- hw/isa/isa-superio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index e2e47d8fd9..179c185695 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -158,8 +158,8 @@ static void isa_superio_realize(DeviceState *dev, Error= **errp) if (k->ide.get_irq) { qdev_prop_set_uint32(d, "irq", k->ide.get_irq(sio, 0)); } - isa_realize_and_unref(isa, bus, &error_fatal); object_property_add_child(OBJECT(sio), "isa-ide", OBJECT(isa)); + isa_realize_and_unref(isa, bus, &error_fatal); sio->ide =3D isa; trace_superio_create_ide(0, k->ide.get_iobase ? --=20 2.21.3