From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,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 7DE00C433E0 for ; Wed, 24 Jun 2020 12:17:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 4CE592088E for ; Wed, 24 Jun 2020 12:17:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y4NFK/uT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CE592088E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo4L4-00088l-KF for qemu-devel@archiver.kernel.org; Wed, 24 Jun 2020 08:17:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jo4Jl-0006iY-Rb for qemu-devel@nongnu.org; Wed, 24 Jun 2020 08:15:53 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:40360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jo4Jh-0002rn-PL for qemu-devel@nongnu.org; Wed, 24 Jun 2020 08:15:53 -0400 Received: by mail-wr1-x42f.google.com with SMTP id h5so2051286wrc.7 for ; Wed, 24 Jun 2020 05:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:content-language :thread-index; bh=BDCOUA8lXgFf9Ik42jo2Wjj2xjKI1F5MCW1BsXE9qF8=; b=Y4NFK/uTJO3jFMyfCqBeXeZdEHMdUdnP6eMVgdpGiLXrxeF+CJJVFSYEE9wpNrhhTK sF4U6ojnPDgHRPBc3OIZiGMHAZ0BGq+nB72tGpzHYrKOGg9q+P4D+vIxDkZ3c4ekyVAV bRxUc9h9RUYK/yuz+Rcz4+X6XwzQDSHWoVDFuIZ6BnFMSHWUuahsBAdP6xT2+ivQkuJo ToIC99UrONcQotGAwuW8JvlCGBOr88QnuXyTdaJYVQ+t7xMdh0Jk8SQDWBRaLKY+xz+9 IGlIZ4Aq4IPuAyGVCeWzxV1RbmAhwRPKF5eK/K6KlkZseNS4SO3FssOFtq3yeVr2qhrR mZ4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:to:cc:references:in-reply-to :subject:date:message-id:mime-version:content-transfer-encoding :content-language:thread-index; bh=BDCOUA8lXgFf9Ik42jo2Wjj2xjKI1F5MCW1BsXE9qF8=; b=lXejjbEmBX7rVJz0pRMbz/bz3NO1g5Z6S1tl3X+EsYBhNcmD8TD8U27aysoEihXUi4 FSWwOxqzc+h+cDng8MCJSpFjXrTjtN16N7VR1oeaD+Elobu+u6d0fqFPQQ87lITOnLHJ 3cv4QZ90LECw3KGyfjW1jOdPOwwhlKutTVRHT9qxqi/SqeAngzJTAkcpjKSoHfmj4PL6 joZTggLW4OtAbvY7LZcBggVP8ppq04D4HpNKT5oF1qgnzVNE0Qx6KiVYnZUrosxWHfZj Tutl2cYj1VkGYyTmvTGAQdECTZmlBXLTueusz8ONqApZBzBbk/RNGuOuEbmt27/vBaI+ +WUQ== X-Gm-Message-State: AOAM530cj+rPcJ4VIXXxP+xZOGzOsZL439Qzs2SvVspJ15lr/SZysDTV qVcC6XKliODSZQqLxKokY0w= X-Google-Smtp-Source: ABdhPJyQV/imfl+aT98W+0hyLyKXnzDmyRDkDGc+Dyi/80nZOQB/fGKpFEtu2vdTemIrvrzQO4jZlg== X-Received: by 2002:adf:f350:: with SMTP id e16mr28275829wrp.43.1593000947877; Wed, 24 Jun 2020 05:15:47 -0700 (PDT) Received: from CBGR90WXYV0 (54-240-197-236.amazon.com. [54.240.197.236]) by smtp.gmail.com with ESMTPSA id a2sm12468558wrn.68.2020.06.24.05.15.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jun 2020 05:15:47 -0700 (PDT) From: Paul Durrant X-Google-Original-From: "Paul Durrant" To: "'Jason Andryuk'" References: <87k0zykwdl.fsf@dusky.pond.sub.org> <000001d64953$f67a1f00$e36e5d00$@xen.org> <000801d64a12$5c7c11f0$157435d0$@xen.org> In-Reply-To: Subject: RE: sysbus failed assert for xen_sysdev Date: Wed, 24 Jun 2020 13:15:46 +0100 Message-ID: <000901d64a21$311a4630$934ed290$@xen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-gb Thread-Index: AQIJfv1jP4fCJU6d0eNUL65zTb1lhAKJjZPCAZLY/IEByWeHdwFU8pWtAkUeRcMCDTlHOQHM4CJrqBZ0jpA= Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=xadimgnik@gmail.com; helo=mail-wr1-x42f.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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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: , Reply-To: paul@xen.org Cc: 'Anthony PERARD' , 'xen-devel' , 'Mark Cave-Ayland' , 'Markus Armbruster' , 'QEMU' Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" > -----Original Message----- > From: Jason Andryuk > Sent: 24 June 2020 13:15 > To: Paul Durrant > Cc: Markus Armbruster ; Mark Cave-Ayland ; Anthony > PERARD ; xen-devel ; QEMU devel@nongnu.org> > Subject: Re: sysbus failed assert for xen_sysdev > > On Wed, Jun 24, 2020 at 6:29 AM Paul Durrant wrote: > > > > > -----Original Message----- > > > From: Jason Andryuk > > > Sent: 24 June 2020 04:24 > > > To: Paul Durrant > > > Cc: Markus Armbruster ; Mark Cave-Ayland ; > Anthony > > > PERARD ; xen-devel ; QEMU > > devel@nongnu.org> > > > Subject: Re: sysbus failed assert for xen_sysdev > > > > > > On Tue, Jun 23, 2020 at 7:46 AM Paul Durrant wrote: > > > > > > > > > -----Original Message----- > > > > > From: Markus Armbruster > > > > > Sent: 23 June 2020 09:41 > > > > > To: Jason Andryuk > > > > > Cc: Mark Cave-Ayland ; Anthony PERARD > ; > > > xen- > > > > > devel ; Paul Durrant ; QEMU devel@nongnu.org> > > > > > Subject: Re: sysbus failed assert for xen_sysdev > > > > > > > > > > Jason Andryuk writes: > > > > > > Then it gets farther... until > > > > > > qemu-system-i386: hw/core/qdev.c:439: qdev_assert_realized_properly: > > > > > > Assertion `dev->realized' failed. > > > > > > > > > > > > dev->id is NULL. The failing device is: > > > > > > (gdb) p *dev.parent_obj.class.type > > > > > > $12 = {name = 0x555556207770 "cfi.pflash01", > > > > > > > > > > > > > > Having commented out the call to xen_be_init() entirely (and xen_bus_init() for good measure) I > also > > > get this assertion failure, so > > > > I don't think is related. > > > > > > Yes, this is something different. pc_pflash_create() calls > > > qdev_new(TYPE_PFLASH_CFI01), but it is only realized in > > > pc_system_flash_map()... and pc_system_flash_map() isn't called for > > > Xen. > > > > > > Removing the call to pc_system_flash_create() from pc_machine_initfn() > > > lets QEMU startup and run a Xen HVM again. xen_enabled() doesn't work > > > there since accelerators have not been initialized yes, I guess? > > > > Looks like it can be worked round by the following: > > Yes, thank you. > > Tested-by: Jason Andryuk Thanks. Paul > > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > > index 1497d0e4ae..977d40afb8 100644 > > --- a/hw/i386/pc_piix.c > > +++ b/hw/i386/pc_piix.c > > @@ -186,9 +186,12 @@ static void pc_init1(MachineState *machine, > > if (!xen_enabled()) { > > pc_memory_init(pcms, system_memory, > > rom_memory, &ram_memory); > > - } else if (machine->kernel_filename != NULL) { > > - /* For xen HVM direct kernel boot, load linux here */ > > - xen_load_linux(pcms); > > + } else { > > + pc_system_flash_cleanup_unused(pcms); > > + if (machine->kernel_filename != NULL) { > > + /* For xen HVM direct kernel boot, load linux here */ > > + xen_load_linux(pcms); > > + } > > } > > > > gsi_state = pc_gsi_create(&x86ms->gsi, pcmc->pci_enabled); > > diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c > > index ec2a3b3e7e..0ff47a4b59 100644 > > --- a/hw/i386/pc_sysfw.c > > +++ b/hw/i386/pc_sysfw.c > > @@ -108,7 +108,7 @@ void pc_system_flash_create(PCMachineState *pcms) > > } > > } > > > > -static void pc_system_flash_cleanup_unused(PCMachineState *pcms) > > +void pc_system_flash_cleanup_unused(PCMachineState *pcms) > > { > > char *prop_name; > > int i; > > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h > > index e6135c34d6..497f2b7ab7 100644 > > --- a/include/hw/i386/pc.h > > +++ b/include/hw/i386/pc.h > > @@ -187,6 +187,7 @@ int cmos_get_fd_drive_type(FloppyDriveType fd0); > > > > /* pc_sysfw.c */ > > void pc_system_flash_create(PCMachineState *pcms); > > +void pc_system_flash_cleanup_unused(PCMachineState *pcms); > > void pc_system_firmware_init(PCMachineState *pcms, MemoryRegion *rom_memory); > > > > /* acpi-build.c */ > > > > > > > > > > Regards, > > > Jason > >