From nobody Mon Feb 9 10:28:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 14903046521287.567803278235374; Thu, 23 Mar 2017 14:30:52 -0700 (PDT) Received: from localhost ([::1]:58787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crAJm-0004vZ-Ja for importer@patchew.org; Thu, 23 Mar 2017 17:30:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crAIF-0003WH-Bv for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crAIE-0008Ar-Jy for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54732) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1crAIE-0008AI-Dh for qemu-devel@nongnu.org; Thu, 23 Mar 2017 17:29:14 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7110F6A6DD; Thu, 23 Mar 2017 21:29:14 +0000 (UTC) Received: from localhost (ovpn-116-27.gru2.redhat.com [10.97.116.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26B1BA5697; Thu, 23 Mar 2017 21:29:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7110F6A6DD Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ehabkost@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7110F6A6DD From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Thu, 23 Mar 2017 18:28:45 -0300 Message-Id: <20170323212848.8492-2-ehabkost@redhat.com> In-Reply-To: <20170323212848.8492-1-ehabkost@redhat.com> References: <20170323212848.8492-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 23 Mar 2017 21:29:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jgross@suse.com, Thomas Huth , sstabellini@kernel.org, Markus Armbruster , Marcel Apfelbaum , Laszlo Ersek Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The xen-backend devices created by the Xen code are not supposed to be treated as dynamic sysbus devices. This is an attempt to change that and see what happens, but I couldn't test it because I don't have a Xen host set up. If this patch breaks anything, this means we have a bug in foreach_dynamic_sysbus_device(), which is supposed to return only devices created using -device. The original code that sets has_dynamic_sysbus was added by commit 3a6c9172ac5951e6dac2b3f6cbce3cfccdec5894, but I don't see any comment explaining why it was necessary. Cc: Juergen Gross Cc: Stefano Stabellini Signed-off-by: Eduardo Habkost --- hw/xen/xen_backend.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index 6c21c37d68..4607d6d3ee 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_backend.c @@ -550,15 +550,6 @@ err: return -1; } =20 -static void xen_set_dynamic_sysbus(void) -{ - Object *machine =3D qdev_get_machine(); - ObjectClass *oc =3D object_get_class(machine); - MachineClass *mc =3D MACHINE_CLASS(oc); - - mc->has_dynamic_sysbus =3D true; -} - int xen_be_register(const char *type, struct XenDevOps *ops) { char path[50]; @@ -580,8 +571,6 @@ int xen_be_register(const char *type, struct XenDevOps = *ops) =20 void xen_be_register_common(void) { - xen_set_dynamic_sysbus(); - xen_be_register("console", &xen_console_ops); xen_be_register("vkbd", &xen_kbdmouse_ops); xen_be_register("qdisk", &xen_blkdev_ops); --=20 2.11.0.259.g40922b1