All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
	sstabellini@kernel.org, Markus Armbruster <armbru@redhat.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Subject: Re: [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type whitelist
Date: Fri, 24 Mar 2017 09:27:50 +0100	[thread overview]
Message-ID: <3eb52532-25f4-2761-de73-3cf82d00e6c4@suse.com> (raw)
In-Reply-To: <20170323212848.8492-1-ehabkost@redhat.com>

On 23/03/17 22:28, Eduardo Habkost wrote:
> Summary
> -------
> 
> This series replaces the existing has_dynamic_sysbus flag (that
> makes the machine accept every single sysbus device type on the
> command-line) with a short whitelist.
> 
> This will be helpful when implementing the new query-device-slots
> command, because each machine type will include only the sysbus
> devices it really supports, instead of including a catch-all
> TYPE_SYS_BUS_DEVICE "slot".
> 
> Most of the machines already have an internal whitelist
> implemented using foreach_dynamic_sysbus_device(), so we just
> encode the existing behavior inside the new MachineClass field.
> 
> Caveat: q35
> -----------
> 
> The only problematic case is q35, that accepts all sysbus device
> types. In this case, instead of adding TYPE_SYS_BUS_DEVICE to the
> whitelist, I'm adding the existing list of existing sysbus device
> types to keep compatibility. After that, we can gradually and
> carefully remove unnecessary entries from the q35 whitelist.
> 
> Issue: xen_set_dynamic_sysbus() hack
> ------------------------------------
> 
> We still have an obstacle to get around: the callers of
> qdev_set_id() outside qdev_device_add() are breaking
> foreach_dynamic_sysbus_device(), and xen_set_dynamic_sysbus() is
> a workaround for that bug. We now need to fix that bug to be able
> to remove the xen_set_dynamic_sysbus() hack. This means the first
> patch of this series will probably break Xen, until we fix that
> bug.
> 
> Eduardo Habkost (4):
>   [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class
>   machine: Replace has_dynamic_sysbus with a whitelist
>   q35: Remove ioapic devices from sysbus whitelist
>   q35: Remove fw_cfg* from sysbus whitelist
> 
>  include/hw/arm/sysbus-fdt.h |  7 +++++++
>  include/hw/boards.h         |  3 ++-
>  hw/arm/sysbus-fdt.c         | 10 ++++++++++
>  hw/arm/virt.c               |  4 +++-
>  hw/core/machine.c           | 43 +++++++++++++++++++++++++++++--------------
>  hw/i386/pc_q35.c            | 25 ++++++++++++++++++++++++-
>  hw/ppc/e500plat.c           |  4 +++-
>  hw/ppc/spapr.c              |  2 +-
>  hw/xen/xen_backend.c        | 11 -----------
>  9 files changed, 79 insertions(+), 30 deletions(-)
> 

This seems to break Xen. I got:

qemu-system-i386: Option '-device xen-backend' cannot be handled by this
machine

when using qemu as Xen backend driver.


Juergen

      parent reply	other threads:[~2017-03-24  8:27 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 ` [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class Eduardo Habkost
2017-03-24  8:23   ` 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 ` Juergen Gross [this message]

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=3eb52532-25f4-2761-de73-3cf82d00e6c4@suse.com \
    --to=jgross@suse.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.