From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a5d:4308:0:0:0:0:0 with SMTP id h8-v6csp525759wrq; Wed, 11 Jul 2018 11:44:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc03NYE3hV4rBiWvG5pCvKRQ7XTU6wKFwuxzQsqIxSsKRKCZpWREwlv35SE/kA0ForiQlIa X-Received: by 2002:aed:3a29:: with SMTP id n38-v6mr28845077qte.108.1531334646719; Wed, 11 Jul 2018 11:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531334646; cv=none; d=google.com; s=arc-20160816; b=PVDYEDOTfYA+SepbUmtko6vFsHTcoBlu6LXFh9R1cTW4W1oW2sqFTP7KscYPB5U8eZ 1jhQB+TYl0YZGazPI1hlwmAKFZadrWA4lB78gdzYLsgnQgCdQY4bofxVwdTQ5updWy1u D//i+NZT4nWXFbK6z08VCQ1QE1hS3k9Ek6lWjtidZwTXdzS7A5wVvnpZHcDHye6cfx60 L6xTrdqwSK5y14WpWnkkK7dq88vPwEJQZfjcI8+nusgK+SiATge5Ev5q5SI6ybzgtdv7 ZD/gHqBODb7qSsf6yztcdvii9h++/sXN9xnGgXO6uLwez2rsG5OAYjx/7Dy6K8kJ5RTj 8s3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:autocrypt:openpgp:from:references:to :arc-authentication-results; bh=MAhs6/uei2iwmpAHXiZ2cW1clvxpf7Gt07+ztcsLX5s=; b=COz4mHiHiuqzuUwhHIU2IkO2pYXA635b/toD38zIqEvdiyfrZgaB8oLo8c00AsHGJW K4wbHtpC9ug99q52lFCEyN+MVGgvxZdxL/a8iLvcI1fB+Qq0nO+V64FKeVMVTTxPMq+d wyX1eQ9V72iPryrm9LeXhC5sTMAolmLirnir0X/Li7HQCBzIzCny3JKKOlW5tCoUeH7l uK9Un+pfRzPrqM5PEZsqZBWeYK43UzEKeiXRkbdNvl2mbfD8hxJj9KFE7iy7cW4VXuPu Phzf5o44xXYGI822Z6LrSgyrbPF4Asxb02BMTUqT2IjYom2FREbsap0we3kxFQhuDl01 1GAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f6-v6si2220851qkd.374.2018.07.11.11.44.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 11 Jul 2018 11:44:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:55058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdK5u-0002Sr-4O for alex.bennee@linaro.org; Wed, 11 Jul 2018 14:44:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdK5h-0002RU-0x for qemu-arm@nongnu.org; Wed, 11 Jul 2018 14:43:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdK5c-0000Ei-5i for qemu-arm@nongnu.org; Wed, 11 Jul 2018 14:43:53 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38552 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fdK5c-0000Dj-0V; Wed, 11 Jul 2018 14:43:48 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 474CC72621; Wed, 11 Jul 2018 18:43:47 +0000 (UTC) Received: from [10.36.116.133] (ovpn-116-133.ams2.redhat.com [10.36.116.133]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBBF42156889; Wed, 11 Jul 2018 18:43:45 +0000 (UTC) To: Paolo Bonzini , qemu-devel@nongnu.org, Peter Maydell References: <1531170180-21199-1-git-send-email-thuth@redhat.com> From: Thomas Huth Openpgp: preference=signencrypt Autocrypt: addr=thuth@redhat.com; prefer-encrypt=mutual; keydata= xsFNBFH7eUwBEACzyOXKU+5Pcs6wNpKzrlJwzRl3VGZt95VCdb+FgoU9g11m7FWcOafrVRwU yYkTm9+7zBUc0sW5AuPGR/dp3pSLX/yFWsA/UB4nJsHqgDvDU7BImSeiTrnpMOTXb7Arw2a2 4CflIyFqjCpfDM4MuTmzTjXq4Uov1giGE9X6viNo1pxyEpd7PanlKNnf4PqEQp06X4IgUacW tSGj6Gcns1bCuHV8OPWLkf4hkRnu8hdL6i60Yxz4E6TqlrpxsfYwLXgEeswPHOA6Mn4Cso9O 0lewVYfFfsmokfAVMKWzOl1Sr0KGI5T9CpmRfAiSHpthhHWnECcJFwl72NTi6kUcUzG4se81 O6n9d/kTj7pzTmBdfwuOZ0YUSqcqs0W+l1NcASSYZQaDoD3/SLk+nqVeCBB4OnYOGhgmIHNW 0CwMRO/GK+20alxzk//V9GmIM2ACElbfF8+Uug3pqiHkVnKqM7W9/S1NH2qm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X0iFUhFC6y9+O6mP4ZvWoYapp9 ezYNuebMgEr93ob1+4sFg3812wNP01WqsGtWCJHnPv/JoonFdMzD/bIkXGEJMk6ks2kxQQZq g6Ik/s/vxOfao/xCn8nHt7GwvVy41795hzK6tbSl+BuyCRp0vfPRP34OnK7+jR2nvQpJu/pU rCELuGwT9hsYkUPjVd4lfylN3mzEc6iAv/wwjsc0DRTSQCpXT3v2ymTAsRKrVaEZLibTXaf+ WslxWek3xNYRiqwwWAJuL652eAlxUgQ5ZS+fXBRTiQpJ+F26I/2lccScRd9G5w== Message-ID: <163e1c54-c953-e5fe-3142-eab18e0362b8@redhat.com> Date: Wed, 11 Jul 2018 20:43:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 11 Jul 2018 18:43:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 11 Jul 2018 18:43:47 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: Re: [Qemu-arm] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, Markus Armbruster , Eduardo Habkost Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: YyQGHFEK5jSE On 11.07.2018 19:20, Paolo Bonzini wrote: > On 09/07/2018 23:03, Thomas Huth wrote: >> >> The problem is that qdev_set_parent_bus() from instance_init adds a li= nk >> to the child devices which is not valid anymore after the device init >> failed. Thus the qdev_set_parent_bus() must rather be done in the real= ize >> function instead. >=20 > The theoretical behavior should be: >=20 > - realize fails In this case, the failure is before realize is attempted, qdev_device_add() already stop with "Device '%s' can not be hotplugged on this machine". > - object_unparent is called on the device that failed to realize (see > qdev_device_add). object_unparent calls device_unparent Hmm, are you sure? I can see that object_unparent calls device_unparent indirectly for the *child* nodes of the device, but not for the device itself... Thomas From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdK5i-0002Si-Sj for qemu-devel@nongnu.org; Wed, 11 Jul 2018 14:43:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdK5i-0000Hi-2s for qemu-devel@nongnu.org; Wed, 11 Jul 2018 14:43:54 -0400 References: <1531170180-21199-1-git-send-email-thuth@redhat.com> From: Thomas Huth Message-ID: <163e1c54-c953-e5fe-3142-eab18e0362b8@redhat.com> Date: Wed, 11 Jul 2018 20:43:44 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org, Peter Maydell Cc: qemu-arm@nongnu.org, Markus Armbruster , Eduardo Habkost On 11.07.2018 19:20, Paolo Bonzini wrote: > On 09/07/2018 23:03, Thomas Huth wrote: >> >> The problem is that qdev_set_parent_bus() from instance_init adds a li= nk >> to the child devices which is not valid anymore after the device init >> failed. Thus the qdev_set_parent_bus() must rather be done in the real= ize >> function instead. >=20 > The theoretical behavior should be: >=20 > - realize fails In this case, the failure is before realize is attempted, qdev_device_add() already stop with "Device '%s' can not be hotplugged on this machine". > - object_unparent is called on the device that failed to realize (see > qdev_device_add). object_unparent calls device_unparent Hmm, are you sure? I can see that object_unparent calls device_unparent indirectly for the *child* nodes of the device, but not for the device itself... Thomas