Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65D4DC433DF for ; Tue, 30 Jun 2020 15:09:26 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3CD5020720 for ; Tue, 30 Jun 2020 15:09:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CD5020720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jqHsd-0004rN-KY; Tue, 30 Jun 2020 15:09:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jqHsb-0004qr-Ix for xen-devel@lists.xenproject.org; Tue, 30 Jun 2020 15:09:01 +0000 X-Inumbo-ID: 9ffd562c-bae3-11ea-b7bb-bc764e2007e4 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9ffd562c-bae3-11ea-b7bb-bc764e2007e4; Tue, 30 Jun 2020 15:08:59 +0000 (UTC) Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: OjpqnZo3XH7g7b87jmn7DyAGGy6bnb1vG0VaLDdwnbRe5viygiv6JcLiAhoVymBXSaSdifaKYW bu0yCX7KWl3TJWfIEmK9avXh/VBUr6kY2qjK36Fhl+ov/GVYjrQdWlcZjEwZbCuQvvEXoNC1DX uFgiDiABsgJwowLWz9ZYhrlqb/o5mUsCSgMw/LRuw7UfHl+SUQoBXSlKUfYBXoyhPnE2ud8a3U wNQQ83m4aRjNZbCYpsogUZkLpa/mDZfMfOkrXd+R3XWBTTuyXg27l+UEIkPf8F1lI5KZzaKOJ2 sPg= X-SBRS: 2.7 X-MesageID: 21294008 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.75,297,1589256000"; d="scan'208";a="21294008" Date: Tue, 30 Jun 2020 16:08:49 +0100 From: Anthony PERARD To: Paul Durrant Subject: Re: [PATCH 2/2] xen: cleanup unrealized flash devices Message-ID: <20200630150849.GA2110@perard.uk.xensource.com> References: <20200624121841.17971-1-paul@xen.org> <20200624121841.17971-3-paul@xen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200624121841.17971-3-paul@xen.org> X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , Paul Durrant , Jason Andryuk , qemu-devel@nongnu.org, Paolo Bonzini , xen-devel@lists.xenproject.org, Richard Henderson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Wed, Jun 24, 2020 at 01:18:41PM +0100, Paul Durrant wrote: > From: Paul Durrant > > The generic pc_machine_initfn() calls pc_system_flash_create() which creates > 'system.flash0' and 'system.flash1' devices. These devices are then realized > by pc_system_flash_map() which is called from pc_system_firmware_init() which > itself is called via pc_memory_init(). The latter however is not called when > xen_enable() is true and hence the following assertion fails: > > qemu-system-i386: hw/core/qdev.c:439: qdev_assert_realized_properly: > Assertion `dev->realized' failed > > These flash devices are unneeded when using Xen so this patch avoids the > assertion by simply removing them using pc_system_flash_cleanup_unused(). > > Reported-by: Jason Andryuk > Fixes: ebc29e1beab0 ("pc: Support firmware configuration with -blockdev") > Signed-off-by: Paul Durrant > Tested-by: Jason Andryuk Reviewed-by: Anthony PERARD I think I would add: Fixes: dfe8c79c4468 ("qdev: Assert onboard devices all get realized properly") as this is the first commit where the unrealized flash devices are an issue. -- Anthony PERARD