All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Marcel Apfelbaum <marcel@redhat.com>
Cc: qemu-devel@nongnu.org, ehabkost@redhat.com, mst@redhat.com,
	bd.aviv@gmail.com, peterx@redhat.com, alex.williamson@redhat.com,
	jan.kiszka@web.de, pbonzini@redhat.com, davidkiarie4@gmail.com
Subject: Re: [Qemu-devel] [PATCH v2 3/3] q35: allow dynamic sysbus
Date: Fri, 03 Jun 2016 08:33:27 +0200	[thread overview]
Message-ID: <87h9da93yg.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1464898555-14914-4-git-send-email-marcel@redhat.com> (Marcel Apfelbaum's message of "Thu, 2 Jun 2016 23:15:55 +0300")

Marcel Apfelbaum <marcel@redhat.com> writes:

> Allow adding sysbus devices with -device on Q35.
>
> At first Q35 will support only intel-iommu to be added this way,
> however the command line will support all sysbus devices.
>
> Mark with 'cannot_instantiate_with_device_add_yet' the ones
> causing immediate problems (e.g. crashes).
>
> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
> ---
>  hw/i386/pc_q35.c                    | 1 +
>  hw/pci-bridge/pci_expander_bridge.c | 1 +
>  hw/pci-host/piix.c                  | 1 +
>  hw/pci-host/q35.c                   | 1 +
>  4 files changed, 4 insertions(+)
>
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 04aae89..431eaed 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -281,6 +281,7 @@ static void pc_q35_machine_options(MachineClass *m)
>      m->default_machine_opts = "firmware=bios-256k.bin";
>      m->default_display = "std";
>      m->no_floppy = 1;
> +    m->has_dynamic_sysbus = true;
>  }
>  
>  static void pc_q35_2_6_machine_options(MachineClass *m)
> diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
> index ba320bd..40518a2 100644
> --- a/hw/pci-bridge/pci_expander_bridge.c
> +++ b/hw/pci-bridge/pci_expander_bridge.c
> @@ -149,6 +149,7 @@ static void pxb_host_class_init(ObjectClass *class, void *data)
>      PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(class);
>  
>      dc->fw_name = "pci";
> +    dc->cannot_instantiate_with_device_add_yet = true;
>      sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_address;
>      hc->root_bus_path = pxb_host_root_bus_path;
>  }

Any assignment to cannot_instantiate_with_device_add_yet must have a
comment, like this:

       /* Reason: frobnicates some frobs backwards */
       dc->cannot_instantiate_with_device_add_yet = true;

We have one offender in master: hw/ppc/spapr_pci.c (commit 09aa9a52),
which I'll try to get fixed.  Please don't add more.

[...]

  reply	other threads:[~2016-06-03  6:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 20:15 [Qemu-devel] [PATCH v2 0/3] enable iommu with -device Marcel Apfelbaum
2016-06-02 20:15 ` [Qemu-devel] [PATCH v2 1/3] hw/pci: delay bus_master_enable_region initialization Marcel Apfelbaum
2016-06-08 11:16   ` Paolo Bonzini
2016-06-08 11:36     ` Marcel Apfelbaum
2016-06-02 20:15 ` [Qemu-devel] [PATCH v2 2/3] hw/iommu: enable iommu with -device Marcel Apfelbaum
2016-06-03 16:07   ` Michael S. Tsirkin
2016-06-05  8:46     ` Marcel Apfelbaum
2016-06-05  9:59       ` Michael S. Tsirkin
2016-06-05 10:21         ` Marcel Apfelbaum
2016-06-12  4:27   ` Peter Xu
2016-06-13 10:20     ` Marcel Apfelbaum
2016-06-13 13:04       ` Peter Xu
2016-06-02 20:15 ` [Qemu-devel] [PATCH v2 3/3] q35: allow dynamic sysbus Marcel Apfelbaum
2016-06-03  6:33   ` Markus Armbruster [this message]
2016-06-03  6:47     ` Marcel Apfelbaum
2016-06-08  2:56   ` Peter Xu
2016-06-08 11:18     ` Marcel Apfelbaum

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=87h9da93yg.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=bd.aviv@gmail.com \
    --cc=davidkiarie4@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.