qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
	Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH] spapr-pci: enable adding PHB via -device
Date: Mon, 13 Jan 2014 20:29:09 +1100	[thread overview]
Message-ID: <1389605349-1989-1-git-send-email-aik@ozlabs.ru> (raw)

Recent changes introduced cannot_instantiate_with_device_add_yet
and removed capability of adding yet another PCI host bridge via
command line for SPAPR platform (POWERPC64 server).

This brings the capability back and puts SPAPR PHB into "bridge"
category.

This is not much use for emulated PHB but it is absolutely required
for VFIO as we put an IOMMU group onto a separate PHB on SPAPR.

Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

Are -device and device_add considered synonims? SPAPR PHB can be added
via the command line just fine but cannot from device_add as
"Bus 'main-system-bus' does not support hotplugging".
---
 hw/ppc/spapr_pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index ec00300..66ddf10 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -728,6 +728,8 @@ static void spapr_phb_class_init(ObjectClass *klass, void *data)
     dc->props = spapr_phb_properties;
     dc->reset = spapr_phb_reset;
     dc->vmsd = &vmstate_spapr_pci;
+    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
+    dc->cannot_instantiate_with_device_add_yet = false;
 }
 
 static const TypeInfo spapr_phb_info = {
-- 
1.8.4.rc4

             reply	other threads:[~2014-01-13  9:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13  9:29 Alexey Kardashevskiy [this message]
2014-01-20 14:55 ` [Qemu-devel] [PATCH] spapr-pci: enable adding PHB via -device Alexander Graf
2014-01-20 15:27 ` Markus Armbruster
2014-01-21  1:37   ` Alexey Kardashevskiy
2014-01-21  7:56     ` Markus Armbruster
2014-01-21 10:00       ` Alexey Kardashevskiy
2014-01-21 10:19     ` Andreas Färber
2014-01-21 13:00       ` Alexey Kardashevskiy

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=1389605349-1989-1-git-send-email-aik@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=agraf@suse.de \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 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).