qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: jgross@suse.com, Thomas Huth <thuth@redhat.com>,
	sstabellini@kernel.org, Markus Armbruster <armbru@redhat.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Subject: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class
Date: Thu, 23 Mar 2017 18:28:45 -0300	[thread overview]
Message-ID: <20170323212848.8492-2-ehabkost@redhat.com> (raw)
In-Reply-To: <20170323212848.8492-1-ehabkost@redhat.com>

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 <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 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;
 }
 
-static void xen_set_dynamic_sysbus(void)
-{
-    Object *machine = qdev_get_machine();
-    ObjectClass *oc = object_get_class(machine);
-    MachineClass *mc = MACHINE_CLASS(oc);
-
-    mc->has_dynamic_sysbus = 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)
 
 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);
-- 
2.11.0.259.g40922b1

  reply	other threads:[~2017-03-23 21:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 21:28 [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type whitelist Eduardo Habkost
2017-03-23 21:28 ` Eduardo Habkost [this message]
2017-03-24  8:23   ` [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class Juergen Gross
2017-03-24 10:09     ` Peter Maydell
2017-03-24 10:24       ` Juergen Gross
2017-03-24 11:10         ` Eduardo Habkost
2017-03-24 12:27           ` Juergen Gross
2017-03-24 13:50             ` Eduardo Habkost
2017-03-24 13:59               ` Juergen Gross
2017-03-24 10:32       ` Thomas Huth
2017-03-23 21:28 ` [Qemu-devel] [RFC 2/4] machine: Replace has_dynamic_sysbus with a whitelist Eduardo Habkost
2017-03-23 21:28 ` [Qemu-devel] [RFC 3/4] q35: Remove ioapic devices from sysbus whitelist Eduardo Habkost
2017-03-23 21:28 ` [Qemu-devel] [RFC 4/4] q35: Remove fw_cfg* " Eduardo Habkost
2017-03-24  8:27 ` [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type whitelist Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170323212848.8492-2-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jgross@suse.com \
    --cc=lersek@redhat.com \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).